@elevasis/ui 2.75.0 → 2.77.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 (110) hide show
  1. package/dist/api/index.js +3 -3
  2. package/dist/app/index.d.ts +277 -249
  3. package/dist/app/index.js +12 -11
  4. package/dist/auth/context.d.ts +1 -2
  5. package/dist/auth/index.d.ts +1 -2
  6. package/dist/auth/index.js +6 -7
  7. package/dist/charts/index.js +6 -7
  8. package/dist/{chunk-CRPH5AAB.js → chunk-2GIHWU5O.js} +4 -3
  9. package/dist/chunk-2Y6AKWGU.js +42 -0
  10. package/dist/chunk-3QYRZSHP.js +854 -0
  11. package/dist/{chunk-L3NBMLRN.js → chunk-3RK2NNJX.js} +1 -1
  12. package/dist/{chunk-R6NMRXNO.js → chunk-4WLAVUPS.js} +1 -1
  13. package/dist/{chunk-DTEGVSJ6.js → chunk-5R4I2PAN.js} +9 -43
  14. package/dist/chunk-6B4ZPBQJ.js +7 -0
  15. package/dist/{chunk-QFS2GZMV.js → chunk-73G3I5HJ.js} +160 -160
  16. package/dist/{chunk-7OOFMEX6.js → chunk-BFLYDVEN.js} +28 -41
  17. package/dist/{chunk-VWGCURZF.js → chunk-BG6PWDJ3.js} +381 -381
  18. package/dist/{chunk-5VF5LPYS.js → chunk-BV2RNLPP.js} +1 -1
  19. package/dist/{chunk-NMHQAYZU.js → chunk-CTT4RDXE.js} +150 -151
  20. package/dist/chunk-E2LJ3FRA.js +237 -0
  21. package/dist/{chunk-5RH6NYZH.js → chunk-EFQLXRYT.js} +1 -2
  22. package/dist/{chunk-M6VAZAQW.js → chunk-EVNLJHDD.js} +3 -3
  23. package/dist/{chunk-NYIIRZSA.js → chunk-GDQQX5SL.js} +4 -42
  24. package/dist/{chunk-IYATYH5I.js → chunk-GFSOQH3N.js} +1 -1
  25. package/dist/{chunk-G7O4CBMC.js → chunk-H5AEYSVX.js} +164 -3
  26. package/dist/{chunk-ZFISGKYW.js → chunk-IIEZXXDD.js} +1 -1
  27. package/dist/{chunk-5SLRGUC4.js → chunk-INCEZAM3.js} +1 -1
  28. package/dist/{chunk-ZG6YJUT4.js → chunk-JZQNUQE4.js} +1 -1
  29. package/dist/{chunk-SB3IHM5Y.js → chunk-K55TU6CC.js} +2023 -1700
  30. package/dist/chunk-KB5CAN5D.js +33 -0
  31. package/dist/{chunk-OGHTJKBV.js → chunk-KMA4FOSV.js} +5682 -5675
  32. package/dist/{chunk-ICHDIVQO.js → chunk-KXNRTJAE.js} +1 -1
  33. package/dist/{chunk-MLHZUN2X.js → chunk-MGAELVTZ.js} +12 -12
  34. package/dist/chunk-MKH2KOAO.js +39 -0
  35. package/dist/{chunk-6BJ5HMMC.js → chunk-NAPXMYFW.js} +35 -362
  36. package/dist/{chunk-GDTK33QT.js → chunk-OGG3QJYW.js} +14 -5
  37. package/dist/{chunk-SN7X5N2A.js → chunk-P6HHXMLJ.js} +1 -1
  38. package/dist/{chunk-SEYOVNS5.js → chunk-QAILYRC2.js} +1 -1
  39. package/dist/{chunk-RBGVNPA6.js → chunk-RXZ3XDBM.js} +1 -1
  40. package/dist/{chunk-2ZRY3ARL.js → chunk-SPW6UA6B.js} +1 -1
  41. package/dist/{chunk-3H5DIJN7.js → chunk-SVZR4GYA.js} +1 -1
  42. package/dist/{chunk-47YJVIZE.js → chunk-UEY4AB3R.js} +789 -66
  43. package/dist/{chunk-LFLM723H.js → chunk-UL6MPMKY.js} +1 -1
  44. package/dist/{chunk-TX3UHDL5.js → chunk-WELN7DDV.js} +2 -2
  45. package/dist/{chunk-D3XXPCCK.js → chunk-WJN2VVVJ.js} +1 -1
  46. package/dist/{chunk-DMSTDZCJ.js → chunk-XODQUPFW.js} +11 -11
  47. package/dist/components/index.d.ts +135 -25
  48. package/dist/components/index.js +2165 -1996
  49. package/dist/components/navigation/index.js +7 -8
  50. package/dist/features/auth/index.d.ts +35 -3716
  51. package/dist/features/auth/index.js +9 -10
  52. package/dist/features/clients/index.js +18 -12
  53. package/dist/features/content/index.js +27 -27
  54. package/dist/features/crm/index.css +59 -59
  55. package/dist/features/crm/index.d.ts +17 -1
  56. package/dist/features/crm/index.js +13 -11
  57. package/dist/features/dashboard/index.css +59 -59
  58. package/dist/features/dashboard/index.js +8 -9
  59. package/dist/features/delivery/index.d.ts +3 -0
  60. package/dist/features/delivery/index.js +21 -20
  61. package/dist/features/knowledge/index.js +6 -7
  62. package/dist/features/lead-gen/index.css +59 -59
  63. package/dist/features/lead-gen/index.d.ts +3921 -4
  64. package/dist/features/lead-gen/index.js +15 -13
  65. package/dist/features/monitoring/index.js +10 -11
  66. package/dist/features/monitoring/requests/index.css +59 -59
  67. package/dist/features/monitoring/requests/index.js +8 -9
  68. package/dist/features/notes/index.js +4 -4
  69. package/dist/features/operations/index.css +59 -59
  70. package/dist/features/operations/index.js +13 -15
  71. package/dist/features/seo/index.css +659 -0
  72. package/dist/features/seo/index.d.ts +3979 -1
  73. package/dist/features/seo/index.js +31 -2
  74. package/dist/features/settings/index.css +59 -59
  75. package/dist/features/settings/index.d.ts +96 -3742
  76. package/dist/features/settings/index.js +10 -12
  77. package/dist/hooks/access/index.js +6 -7
  78. package/dist/hooks/delivery/index.css +59 -59
  79. package/dist/hooks/delivery/index.d.ts +12 -4
  80. package/dist/hooks/delivery/index.js +3 -3
  81. package/dist/hooks/published.d.ts +83 -29
  82. package/dist/hooks/published.js +19 -19
  83. package/dist/initialization/index.d.ts +35 -3716
  84. package/dist/knowledge/index.js +11 -11
  85. package/dist/layout/index.d.ts +55 -2
  86. package/dist/layout/index.js +10 -10
  87. package/dist/organization/index.css +59 -59
  88. package/dist/organization/index.d.ts +20 -4
  89. package/dist/profile/index.d.ts +81 -3716
  90. package/dist/provider/ElevasisServiceContext.d.ts +1 -2
  91. package/dist/provider/index.d.ts +4 -2
  92. package/dist/provider/index.js +6 -7
  93. package/dist/provider/published.d.ts +4 -2
  94. package/dist/provider/published.js +6 -7
  95. package/dist/test-utils/index.d.ts +1 -2
  96. package/dist/test-utils/index.js +3 -3
  97. package/dist/theme/index.js +3 -3
  98. package/dist/theme/presets/index.js +1 -1
  99. package/dist/types/index.d.ts +298 -251
  100. package/dist/utils/index.d.ts +1 -1
  101. package/dist/utils/index.js +1 -1
  102. package/package.json +4 -8
  103. package/src/hooks/README.md +22 -23
  104. package/dist/chunk-6ZAP3FOA.js +0 -93
  105. package/dist/chunk-AH52XQB7.js +0 -1
  106. package/dist/chunk-DVAOCHIF.js +0 -165
  107. package/dist/chunk-MISHPEJX.js +0 -244
  108. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +0 -879
  109. package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +0 -2
  110. /package/dist/{chunk-A2SB32YV.js → chunk-5ZK7K7YP.js} +0 -0
@@ -3,3726 +3,45 @@ import { ReactNode } from 'react';
3
3
  import { z } from 'zod';
4
4
  import { QueryKey } from '@tanstack/react-query';
5
5
 
6
+ /**
7
+ * Concrete row shapes for the published Supabase tables.
8
+ *
9
+ * GENERATED by `scripts/gen-published-rows.mjs` — do not hand-edit; re-run the script instead.
10
+ *
11
+ * These were `Tables<'users'>` / `TablesInsert<...>` aliases in `./index.ts`. Each one indexes
12
+ * into the generated `Database` type, and a published `.d.ts` that references `Database` makes
13
+ * rollup inline the entire schema — every table plus internal RPC signatures such as
14
+ * `get_platform_credential_kek` — into the tenant-facing bundle. Both `@elevasis/core/auth` and
15
+ * `@elevasis/core/test-utils` reached `Database` through this barrel, which is the actual cause
16
+ * of health-audit R3; the two files that audit named were only the ones a literal grep could see.
17
+ *
18
+ * This module deliberately imports NOTHING from `./database.types`. One imported name is enough
19
+ * to pull that module into the rollup graph and bring `Database` with it. Drift is caught by
20
+ * `./published-rows.assertions.ts`, which no published entry point imports.
21
+ */
22
+ /**
23
+ * Structurally identical to `Json` in `./database.types`, redeclared to keep this module free of
24
+ * imports from it. See the note above.
25
+ */
6
26
  type Json = string | number | boolean | null | {
7
27
  [key: string]: Json | undefined;
8
28
  } | Json[];
9
- type Database = {
10
- public: {
11
- Tables: {
12
- acq_companies: {
13
- Row: {
14
- batch_id: string | null;
15
- category: string | null;
16
- category_pain: string | null;
17
- client_id: string | null;
18
- created_at: string;
19
- domain: string | null;
20
- enrichment_data: Json | null;
21
- filter_reason: string | null;
22
- founded_year: number | null;
23
- id: string;
24
- linkedin_url: string | null;
25
- location_city: string | null;
26
- location_state: string | null;
27
- name: string;
28
- num_employees: number | null;
29
- organization_id: string;
30
- processing_state: Json;
31
- qualification_rubric_key: string | null;
32
- qualification_score: number | null;
33
- qualification_signals: Json | null;
34
- segment: string | null;
35
- source: string | null;
36
- status: string;
37
- updated_at: string;
38
- website: string | null;
39
- };
40
- Insert: {
41
- batch_id?: string | null;
42
- category?: string | null;
43
- category_pain?: string | null;
44
- client_id?: string | null;
45
- created_at?: string;
46
- domain?: string | null;
47
- enrichment_data?: Json | null;
48
- filter_reason?: string | null;
49
- founded_year?: number | null;
50
- id?: string;
51
- linkedin_url?: string | null;
52
- location_city?: string | null;
53
- location_state?: string | null;
54
- name: string;
55
- num_employees?: number | null;
56
- organization_id: string;
57
- processing_state?: Json;
58
- qualification_rubric_key?: string | null;
59
- qualification_score?: number | null;
60
- qualification_signals?: Json | null;
61
- segment?: string | null;
62
- source?: string | null;
63
- status?: string;
64
- updated_at?: string;
65
- website?: string | null;
66
- };
67
- Update: {
68
- batch_id?: string | null;
69
- category?: string | null;
70
- category_pain?: string | null;
71
- client_id?: string | null;
72
- created_at?: string;
73
- domain?: string | null;
74
- enrichment_data?: Json | null;
75
- filter_reason?: string | null;
76
- founded_year?: number | null;
77
- id?: string;
78
- linkedin_url?: string | null;
79
- location_city?: string | null;
80
- location_state?: string | null;
81
- name?: string;
82
- num_employees?: number | null;
83
- organization_id?: string;
84
- processing_state?: Json;
85
- qualification_rubric_key?: string | null;
86
- qualification_score?: number | null;
87
- qualification_signals?: Json | null;
88
- segment?: string | null;
89
- source?: string | null;
90
- status?: string;
91
- updated_at?: string;
92
- website?: string | null;
93
- };
94
- Relationships: [
95
- {
96
- foreignKeyName: "acq_companies_client_id_fkey";
97
- columns: ["client_id"];
98
- isOneToOne: false;
99
- referencedRelation: "clients";
100
- referencedColumns: ["id"];
101
- },
102
- {
103
- foreignKeyName: "acq_companies_organization_id_fkey";
104
- columns: ["organization_id"];
105
- isOneToOne: false;
106
- referencedRelation: "organizations";
107
- referencedColumns: ["id"];
108
- }
109
- ];
110
- };
111
- acq_contacts: {
112
- Row: {
113
- batch_id: string | null;
114
- brochure_first_viewed_at: string | null;
115
- brochure_view_count: number;
116
- client_id: string | null;
117
- company_id: string | null;
118
- created_at: string;
119
- email: string;
120
- email_valid: string | null;
121
- enrichment_data: Json;
122
- filter_reason: string | null;
123
- first_name: string | null;
124
- headline: string | null;
125
- id: string;
126
- last_name: string | null;
127
- linkedin_url: string | null;
128
- nurture: boolean;
129
- opening_line: string | null;
130
- organization_id: string;
131
- processing_state: Json;
132
- qualification_rubric_key: string | null;
133
- qualification_score: number | null;
134
- qualification_signals: Json | null;
135
- source: string | null;
136
- source_id: string | null;
137
- status: string;
138
- title: string | null;
139
- updated_at: string;
140
- };
141
- Insert: {
142
- batch_id?: string | null;
143
- brochure_first_viewed_at?: string | null;
144
- brochure_view_count?: number;
145
- client_id?: string | null;
146
- company_id?: string | null;
147
- created_at?: string;
148
- email: string;
149
- email_valid?: string | null;
150
- enrichment_data?: Json;
151
- filter_reason?: string | null;
152
- first_name?: string | null;
153
- headline?: string | null;
154
- id?: string;
155
- last_name?: string | null;
156
- linkedin_url?: string | null;
157
- nurture?: boolean;
158
- opening_line?: string | null;
159
- organization_id: string;
160
- processing_state?: Json;
161
- qualification_rubric_key?: string | null;
162
- qualification_score?: number | null;
163
- qualification_signals?: Json | null;
164
- source?: string | null;
165
- source_id?: string | null;
166
- status?: string;
167
- title?: string | null;
168
- updated_at?: string;
169
- };
170
- Update: {
171
- batch_id?: string | null;
172
- brochure_first_viewed_at?: string | null;
173
- brochure_view_count?: number;
174
- client_id?: string | null;
175
- company_id?: string | null;
176
- created_at?: string;
177
- email?: string;
178
- email_valid?: string | null;
179
- enrichment_data?: Json;
180
- filter_reason?: string | null;
181
- first_name?: string | null;
182
- headline?: string | null;
183
- id?: string;
184
- last_name?: string | null;
185
- linkedin_url?: string | null;
186
- nurture?: boolean;
187
- opening_line?: string | null;
188
- organization_id?: string;
189
- processing_state?: Json;
190
- qualification_rubric_key?: string | null;
191
- qualification_score?: number | null;
192
- qualification_signals?: Json | null;
193
- source?: string | null;
194
- source_id?: string | null;
195
- status?: string;
196
- title?: string | null;
197
- updated_at?: string;
198
- };
199
- Relationships: [
200
- {
201
- foreignKeyName: "acq_contacts_client_id_fkey";
202
- columns: ["client_id"];
203
- isOneToOne: false;
204
- referencedRelation: "clients";
205
- referencedColumns: ["id"];
206
- },
207
- {
208
- foreignKeyName: "acq_contacts_company_id_fkey";
209
- columns: ["company_id"];
210
- isOneToOne: false;
211
- referencedRelation: "acq_companies";
212
- referencedColumns: ["id"];
213
- },
214
- {
215
- foreignKeyName: "acq_contacts_organization_id_fkey";
216
- columns: ["organization_id"];
217
- isOneToOne: false;
218
- referencedRelation: "organizations";
219
- referencedColumns: ["id"];
220
- }
221
- ];
222
- };
223
- acq_deal_notes: {
224
- Row: {
225
- author_user_id: string | null;
226
- body: string;
227
- created_at: string;
228
- deal_id: string;
229
- id: string;
230
- organization_id: string;
231
- updated_at: string;
232
- };
233
- Insert: {
234
- author_user_id?: string | null;
235
- body: string;
236
- created_at?: string;
237
- deal_id: string;
238
- id?: string;
239
- organization_id: string;
240
- updated_at?: string;
241
- };
242
- Update: {
243
- author_user_id?: string | null;
244
- body?: string;
245
- created_at?: string;
246
- deal_id?: string;
247
- id?: string;
248
- organization_id?: string;
249
- updated_at?: string;
250
- };
251
- Relationships: [
252
- {
253
- foreignKeyName: "acq_deal_notes_author_user_id_fkey";
254
- columns: ["author_user_id"];
255
- isOneToOne: false;
256
- referencedRelation: "users";
257
- referencedColumns: ["id"];
258
- },
259
- {
260
- foreignKeyName: "acq_deal_notes_deal_id_fkey";
261
- columns: ["deal_id"];
262
- isOneToOne: false;
263
- referencedRelation: "acq_deals";
264
- referencedColumns: ["id"];
265
- },
266
- {
267
- foreignKeyName: "acq_deal_notes_organization_id_fkey";
268
- columns: ["organization_id"];
269
- isOneToOne: false;
270
- referencedRelation: "organizations";
271
- referencedColumns: ["id"];
272
- }
273
- ];
274
- };
275
- acq_deal_tasks: {
276
- Row: {
277
- assignee_user_id: string | null;
278
- completed_at: string | null;
279
- completed_by_user_id: string | null;
280
- created_at: string;
281
- created_by_user_id: string | null;
282
- deal_id: string;
283
- description: string | null;
284
- due_at: string | null;
285
- id: string;
286
- kind: string;
287
- organization_id: string;
288
- title: string;
289
- updated_at: string;
290
- };
291
- Insert: {
292
- assignee_user_id?: string | null;
293
- completed_at?: string | null;
294
- completed_by_user_id?: string | null;
295
- created_at?: string;
296
- created_by_user_id?: string | null;
297
- deal_id: string;
298
- description?: string | null;
299
- due_at?: string | null;
300
- id?: string;
301
- kind?: string;
302
- organization_id: string;
303
- title: string;
304
- updated_at?: string;
305
- };
306
- Update: {
307
- assignee_user_id?: string | null;
308
- completed_at?: string | null;
309
- completed_by_user_id?: string | null;
310
- created_at?: string;
311
- created_by_user_id?: string | null;
312
- deal_id?: string;
313
- description?: string | null;
314
- due_at?: string | null;
315
- id?: string;
316
- kind?: string;
317
- organization_id?: string;
318
- title?: string;
319
- updated_at?: string;
320
- };
321
- Relationships: [
322
- {
323
- foreignKeyName: "acq_deal_tasks_assignee_user_id_fkey";
324
- columns: ["assignee_user_id"];
325
- isOneToOne: false;
326
- referencedRelation: "users";
327
- referencedColumns: ["id"];
328
- },
329
- {
330
- foreignKeyName: "acq_deal_tasks_completed_by_user_id_fkey";
331
- columns: ["completed_by_user_id"];
332
- isOneToOne: false;
333
- referencedRelation: "users";
334
- referencedColumns: ["id"];
335
- },
336
- {
337
- foreignKeyName: "acq_deal_tasks_created_by_user_id_fkey";
338
- columns: ["created_by_user_id"];
339
- isOneToOne: false;
340
- referencedRelation: "users";
341
- referencedColumns: ["id"];
342
- },
343
- {
344
- foreignKeyName: "acq_deal_tasks_deal_id_fkey";
345
- columns: ["deal_id"];
346
- isOneToOne: false;
347
- referencedRelation: "acq_deals";
348
- referencedColumns: ["id"];
349
- },
350
- {
351
- foreignKeyName: "acq_deal_tasks_organization_id_fkey";
352
- columns: ["organization_id"];
353
- isOneToOne: false;
354
- referencedRelation: "organizations";
355
- referencedColumns: ["id"];
356
- }
357
- ];
358
- };
359
- acq_deals: {
360
- Row: {
361
- activity_log: Json;
362
- client_id: string | null;
363
- closed_lost_at: string | null;
364
- closed_lost_reason: string | null;
365
- company_id: string | null;
366
- contact_email: string;
367
- contact_id: string | null;
368
- created_at: string;
369
- discovery_data: Json | null;
370
- discovery_submitted_at: string | null;
371
- discovery_submitted_by: string | null;
372
- id: string;
373
- initial_fee: number | null;
374
- instantly_email_account: string | null;
375
- instantly_thread_uuid: string | null;
376
- monthly_fee: number | null;
377
- organization_id: string;
378
- payment_link_sent_at: string | null;
379
- payment_received_at: string | null;
380
- pipeline_key: string;
381
- proposal_data: Json | null;
382
- proposal_generated_at: string | null;
383
- proposal_pdf_url: string | null;
384
- proposal_reviewed_at: string | null;
385
- proposal_reviewed_by: string | null;
386
- proposal_sent_at: string | null;
387
- proposal_signed_at: string | null;
388
- signature_envelope_id: string | null;
389
- source_list_id: string | null;
390
- source_type: string | null;
391
- stage_key: string | null;
392
- state_key: string | null;
393
- stripe_payment_id: string | null;
394
- stripe_payment_link: string | null;
395
- stripe_payment_link_id: string | null;
396
- stripe_subscription_id: string | null;
397
- updated_at: string;
398
- };
399
- Insert: {
400
- activity_log?: Json;
401
- client_id?: string | null;
402
- closed_lost_at?: string | null;
403
- closed_lost_reason?: string | null;
404
- company_id?: string | null;
405
- contact_email: string;
406
- contact_id?: string | null;
407
- created_at?: string;
408
- discovery_data?: Json | null;
409
- discovery_submitted_at?: string | null;
410
- discovery_submitted_by?: string | null;
411
- id?: string;
412
- initial_fee?: number | null;
413
- instantly_email_account?: string | null;
414
- instantly_thread_uuid?: string | null;
415
- monthly_fee?: number | null;
416
- organization_id: string;
417
- payment_link_sent_at?: string | null;
418
- payment_received_at?: string | null;
419
- pipeline_key?: string;
420
- proposal_data?: Json | null;
421
- proposal_generated_at?: string | null;
422
- proposal_pdf_url?: string | null;
423
- proposal_reviewed_at?: string | null;
424
- proposal_reviewed_by?: string | null;
425
- proposal_sent_at?: string | null;
426
- proposal_signed_at?: string | null;
427
- signature_envelope_id?: string | null;
428
- source_list_id?: string | null;
429
- source_type?: string | null;
430
- stage_key?: string | null;
431
- state_key?: string | null;
432
- stripe_payment_id?: string | null;
433
- stripe_payment_link?: string | null;
434
- stripe_payment_link_id?: string | null;
435
- stripe_subscription_id?: string | null;
436
- updated_at?: string;
437
- };
438
- Update: {
439
- activity_log?: Json;
440
- client_id?: string | null;
441
- closed_lost_at?: string | null;
442
- closed_lost_reason?: string | null;
443
- company_id?: string | null;
444
- contact_email?: string;
445
- contact_id?: string | null;
446
- created_at?: string;
447
- discovery_data?: Json | null;
448
- discovery_submitted_at?: string | null;
449
- discovery_submitted_by?: string | null;
450
- id?: string;
451
- initial_fee?: number | null;
452
- instantly_email_account?: string | null;
453
- instantly_thread_uuid?: string | null;
454
- monthly_fee?: number | null;
455
- organization_id?: string;
456
- payment_link_sent_at?: string | null;
457
- payment_received_at?: string | null;
458
- pipeline_key?: string;
459
- proposal_data?: Json | null;
460
- proposal_generated_at?: string | null;
461
- proposal_pdf_url?: string | null;
462
- proposal_reviewed_at?: string | null;
463
- proposal_reviewed_by?: string | null;
464
- proposal_sent_at?: string | null;
465
- proposal_signed_at?: string | null;
466
- signature_envelope_id?: string | null;
467
- source_list_id?: string | null;
468
- source_type?: string | null;
469
- stage_key?: string | null;
470
- state_key?: string | null;
471
- stripe_payment_id?: string | null;
472
- stripe_payment_link?: string | null;
473
- stripe_payment_link_id?: string | null;
474
- stripe_subscription_id?: string | null;
475
- updated_at?: string;
476
- };
477
- Relationships: [
478
- {
479
- foreignKeyName: "acq_deals_client_id_fkey";
480
- columns: ["client_id"];
481
- isOneToOne: false;
482
- referencedRelation: "clients";
483
- referencedColumns: ["id"];
484
- },
485
- {
486
- foreignKeyName: "acq_deals_company_id_fkey";
487
- columns: ["company_id"];
488
- isOneToOne: false;
489
- referencedRelation: "acq_companies";
490
- referencedColumns: ["id"];
491
- },
492
- {
493
- foreignKeyName: "acq_deals_contact_id_fkey";
494
- columns: ["contact_id"];
495
- isOneToOne: false;
496
- referencedRelation: "acq_contacts";
497
- referencedColumns: ["id"];
498
- },
499
- {
500
- foreignKeyName: "acq_deals_discovery_submitted_by_fkey";
501
- columns: ["discovery_submitted_by"];
502
- isOneToOne: false;
503
- referencedRelation: "users";
504
- referencedColumns: ["id"];
505
- },
506
- {
507
- foreignKeyName: "acq_deals_organization_id_fkey";
508
- columns: ["organization_id"];
509
- isOneToOne: false;
510
- referencedRelation: "organizations";
511
- referencedColumns: ["id"];
512
- },
513
- {
514
- foreignKeyName: "acq_deals_proposal_reviewed_by_fkey";
515
- columns: ["proposal_reviewed_by"];
516
- isOneToOne: false;
517
- referencedRelation: "users";
518
- referencedColumns: ["id"];
519
- },
520
- {
521
- foreignKeyName: "acq_deals_source_list_id_fkey";
522
- columns: ["source_list_id"];
523
- isOneToOne: false;
524
- referencedRelation: "acq_lists";
525
- referencedColumns: ["id"];
526
- }
527
- ];
528
- };
529
- acq_list_companies: {
530
- Row: {
531
- activity_log: Json;
532
- added_at: string;
533
- added_by: string | null;
534
- company_id: string;
535
- id: string;
536
- list_id: string;
537
- pipeline_key: string;
538
- source_execution_id: string | null;
539
- source_input_hash: string | null;
540
- source_resource_id: string | null;
541
- stage_key: string;
542
- state_key: string;
543
- };
544
- Insert: {
545
- activity_log?: Json;
546
- added_at?: string;
547
- added_by?: string | null;
548
- company_id: string;
549
- id?: string;
550
- list_id: string;
551
- pipeline_key?: string;
552
- source_execution_id?: string | null;
553
- source_input_hash?: string | null;
554
- source_resource_id?: string | null;
555
- stage_key: string;
556
- state_key: string;
557
- };
558
- Update: {
559
- activity_log?: Json;
560
- added_at?: string;
561
- added_by?: string | null;
562
- company_id?: string;
563
- id?: string;
564
- list_id?: string;
565
- pipeline_key?: string;
566
- source_execution_id?: string | null;
567
- source_input_hash?: string | null;
568
- source_resource_id?: string | null;
569
- stage_key?: string;
570
- state_key?: string;
571
- };
572
- Relationships: [
573
- {
574
- foreignKeyName: "acq_list_companies_added_by_fkey";
575
- columns: ["added_by"];
576
- isOneToOne: false;
577
- referencedRelation: "users";
578
- referencedColumns: ["id"];
579
- },
580
- {
581
- foreignKeyName: "acq_list_companies_company_id_fkey";
582
- columns: ["company_id"];
583
- isOneToOne: false;
584
- referencedRelation: "acq_companies";
585
- referencedColumns: ["id"];
586
- },
587
- {
588
- foreignKeyName: "acq_list_companies_list_id_fkey";
589
- columns: ["list_id"];
590
- isOneToOne: false;
591
- referencedRelation: "acq_lists";
592
- referencedColumns: ["id"];
593
- },
594
- {
595
- foreignKeyName: "acq_list_companies_source_execution_id_fkey";
596
- columns: ["source_execution_id"];
597
- isOneToOne: false;
598
- referencedRelation: "execution_logs";
599
- referencedColumns: ["execution_id"];
600
- }
601
- ];
602
- };
603
- acq_list_executions: {
604
- Row: {
605
- created_at: string;
606
- execution_id: string;
607
- id: string;
608
- list_id: string;
609
- payload: Json;
610
- };
611
- Insert: {
612
- created_at?: string;
613
- execution_id: string;
614
- id?: string;
615
- list_id: string;
616
- payload?: Json;
617
- };
618
- Update: {
619
- created_at?: string;
620
- execution_id?: string;
621
- id?: string;
622
- list_id?: string;
623
- payload?: Json;
624
- };
625
- Relationships: [
626
- {
627
- foreignKeyName: "acq_list_executions_execution_id_fkey";
628
- columns: ["execution_id"];
629
- isOneToOne: false;
630
- referencedRelation: "execution_logs";
631
- referencedColumns: ["execution_id"];
632
- },
633
- {
634
- foreignKeyName: "acq_list_executions_list_id_fkey";
635
- columns: ["list_id"];
636
- isOneToOne: false;
637
- referencedRelation: "acq_lists";
638
- referencedColumns: ["id"];
639
- }
640
- ];
641
- };
642
- acq_list_members: {
643
- Row: {
644
- activity_log: Json;
645
- added_at: string;
646
- added_by: string | null;
647
- contact_id: string;
648
- id: string;
649
- list_id: string;
650
- pipeline_key: string;
651
- source_execution_id: string | null;
652
- source_input_hash: string | null;
653
- source_resource_id: string | null;
654
- stage_key: string;
655
- state_key: string;
656
- };
657
- Insert: {
658
- activity_log?: Json;
659
- added_at?: string;
660
- added_by?: string | null;
661
- contact_id: string;
662
- id?: string;
663
- list_id: string;
664
- pipeline_key?: string;
665
- source_execution_id?: string | null;
666
- source_input_hash?: string | null;
667
- source_resource_id?: string | null;
668
- stage_key: string;
669
- state_key: string;
670
- };
671
- Update: {
672
- activity_log?: Json;
673
- added_at?: string;
674
- added_by?: string | null;
675
- contact_id?: string;
676
- id?: string;
677
- list_id?: string;
678
- pipeline_key?: string;
679
- source_execution_id?: string | null;
680
- source_input_hash?: string | null;
681
- source_resource_id?: string | null;
682
- stage_key?: string;
683
- state_key?: string;
684
- };
685
- Relationships: [
686
- {
687
- foreignKeyName: "acq_list_members_added_by_fkey";
688
- columns: ["added_by"];
689
- isOneToOne: false;
690
- referencedRelation: "users";
691
- referencedColumns: ["id"];
692
- },
693
- {
694
- foreignKeyName: "acq_list_members_contact_id_fkey";
695
- columns: ["contact_id"];
696
- isOneToOne: false;
697
- referencedRelation: "acq_contacts";
698
- referencedColumns: ["id"];
699
- },
700
- {
701
- foreignKeyName: "acq_list_members_list_id_fkey";
702
- columns: ["list_id"];
703
- isOneToOne: false;
704
- referencedRelation: "acq_lists";
705
- referencedColumns: ["id"];
706
- },
707
- {
708
- foreignKeyName: "acq_list_members_source_execution_id_fkey";
709
- columns: ["source_execution_id"];
710
- isOneToOne: false;
711
- referencedRelation: "execution_logs";
712
- referencedColumns: ["execution_id"];
713
- }
714
- ];
715
- };
716
- acq_lists: {
717
- Row: {
718
- batch_ids: string[];
719
- completed_at: string | null;
720
- created_at: string;
721
- description: string | null;
722
- icp: Json;
723
- id: string;
724
- instantly_campaign_id: string | null;
725
- launched_at: string | null;
726
- metadata: Json;
727
- name: string;
728
- organization_id: string;
729
- pipeline_config: Json;
730
- scraping_config: Json;
731
- status: string;
732
- };
733
- Insert: {
734
- batch_ids?: string[];
735
- completed_at?: string | null;
736
- created_at?: string;
737
- description?: string | null;
738
- icp?: Json;
739
- id?: string;
740
- instantly_campaign_id?: string | null;
741
- launched_at?: string | null;
742
- metadata?: Json;
743
- name: string;
744
- organization_id: string;
745
- pipeline_config?: Json;
746
- scraping_config?: Json;
747
- status?: string;
748
- };
749
- Update: {
750
- batch_ids?: string[];
751
- completed_at?: string | null;
752
- created_at?: string;
753
- description?: string | null;
754
- icp?: Json;
755
- id?: string;
756
- instantly_campaign_id?: string | null;
757
- launched_at?: string | null;
758
- metadata?: Json;
759
- name?: string;
760
- organization_id?: string;
761
- pipeline_config?: Json;
762
- scraping_config?: Json;
763
- status?: string;
764
- };
765
- Relationships: [
766
- {
767
- foreignKeyName: "acq_lists_organization_id_fkey";
768
- columns: ["organization_id"];
769
- isOneToOne: false;
770
- referencedRelation: "organizations";
771
- referencedColumns: ["id"];
772
- }
773
- ];
774
- };
775
- acq_seo_metrics: {
776
- Row: {
777
- ai_citations: Json | null;
778
- avg_position: number | null;
779
- clicks: number | null;
780
- created_at: string;
781
- cta_clicks: number | null;
782
- ctr: number | null;
783
- data_point_count: number | null;
784
- faq_count: number | null;
785
- form_submissions: number | null;
786
- id: string;
787
- impressions: number | null;
788
- organization_id: string;
789
- period: string;
790
- quality_score: number | null;
791
- readability: number | null;
792
- scroll_100: number | null;
793
- scroll_25: number | null;
794
- scroll_50: number | null;
795
- scroll_75: number | null;
796
- seo_page_id: string;
797
- word_count: number | null;
798
- };
799
- Insert: {
800
- ai_citations?: Json | null;
801
- avg_position?: number | null;
802
- clicks?: number | null;
803
- created_at?: string;
804
- cta_clicks?: number | null;
805
- ctr?: number | null;
806
- data_point_count?: number | null;
807
- faq_count?: number | null;
808
- form_submissions?: number | null;
809
- id?: string;
810
- impressions?: number | null;
811
- organization_id: string;
812
- period: string;
813
- quality_score?: number | null;
814
- readability?: number | null;
815
- scroll_100?: number | null;
816
- scroll_25?: number | null;
817
- scroll_50?: number | null;
818
- scroll_75?: number | null;
819
- seo_page_id: string;
820
- word_count?: number | null;
821
- };
822
- Update: {
823
- ai_citations?: Json | null;
824
- avg_position?: number | null;
825
- clicks?: number | null;
826
- created_at?: string;
827
- cta_clicks?: number | null;
828
- ctr?: number | null;
829
- data_point_count?: number | null;
830
- faq_count?: number | null;
831
- form_submissions?: number | null;
832
- id?: string;
833
- impressions?: number | null;
834
- organization_id?: string;
835
- period?: string;
836
- quality_score?: number | null;
837
- readability?: number | null;
838
- scroll_100?: number | null;
839
- scroll_25?: number | null;
840
- scroll_50?: number | null;
841
- scroll_75?: number | null;
842
- seo_page_id?: string;
843
- word_count?: number | null;
844
- };
845
- Relationships: [
846
- {
847
- foreignKeyName: "acq_seo_metrics_organization_id_fkey";
848
- columns: ["organization_id"];
849
- isOneToOne: false;
850
- referencedRelation: "organizations";
851
- referencedColumns: ["id"];
852
- },
853
- {
854
- foreignKeyName: "acq_seo_metrics_seo_page_id_fkey";
855
- columns: ["seo_page_id"];
856
- isOneToOne: false;
857
- referencedRelation: "acq_seo_pages";
858
- referencedColumns: ["id"];
859
- }
860
- ];
861
- };
862
- acq_seo_pages: {
863
- Row: {
864
- city: string | null;
865
- content: Json | null;
866
- created_at: string;
867
- faq_items: Json | null;
868
- hero_image_url: string | null;
869
- id: string;
870
- internal_links: Json | null;
871
- local_data: Json | null;
872
- meta_description: string | null;
873
- organization_id: string;
874
- page_type: string;
875
- published_at: string | null;
876
- refreshed_at: string | null;
877
- schema_markup: Json | null;
878
- slug: string;
879
- state: string | null;
880
- status: string;
881
- title: string;
882
- updated_at: string;
883
- use_case: string | null;
884
- vertical: string;
885
- };
886
- Insert: {
887
- city?: string | null;
888
- content?: Json | null;
889
- created_at?: string;
890
- faq_items?: Json | null;
891
- hero_image_url?: string | null;
892
- id?: string;
893
- internal_links?: Json | null;
894
- local_data?: Json | null;
895
- meta_description?: string | null;
896
- organization_id: string;
897
- page_type: string;
898
- published_at?: string | null;
899
- refreshed_at?: string | null;
900
- schema_markup?: Json | null;
901
- slug: string;
902
- state?: string | null;
903
- status?: string;
904
- title: string;
905
- updated_at?: string;
906
- use_case?: string | null;
907
- vertical: string;
908
- };
909
- Update: {
910
- city?: string | null;
911
- content?: Json | null;
912
- created_at?: string;
913
- faq_items?: Json | null;
914
- hero_image_url?: string | null;
915
- id?: string;
916
- internal_links?: Json | null;
917
- local_data?: Json | null;
918
- meta_description?: string | null;
919
- organization_id?: string;
920
- page_type?: string;
921
- published_at?: string | null;
922
- refreshed_at?: string | null;
923
- schema_markup?: Json | null;
924
- slug?: string;
925
- state?: string | null;
926
- status?: string;
927
- title?: string;
928
- updated_at?: string;
929
- use_case?: string | null;
930
- vertical?: string;
931
- };
932
- Relationships: [
933
- {
934
- foreignKeyName: "acq_seo_pages_organization_id_fkey";
935
- columns: ["organization_id"];
936
- isOneToOne: false;
937
- referencedRelation: "organizations";
938
- referencedColumns: ["id"];
939
- }
940
- ];
941
- };
942
- acq_social_posts: {
943
- Row: {
944
- author_name: string;
945
- author_url: string | null;
946
- comments_count: number;
947
- created_at: string;
948
- discovered_at: string;
949
- engagement_count: number;
950
- feedback: string | null;
951
- final_response: string | null;
952
- fully_reviewed: boolean;
953
- id: string;
954
- initial_draft: string | null;
955
- matched_keywords: string[];
956
- matched_query: string | null;
957
- metadata: Json;
958
- organization_id: string;
959
- platform: string;
960
- platform_post_id: string;
961
- post_text: string;
962
- post_title: string;
963
- post_url: string;
964
- posted_at: string;
965
- relevance_score: number;
966
- responded_at: string | null;
967
- reviewed_at: string | null;
968
- skip_reason: string | null;
969
- source_category: string | null;
970
- status: string;
971
- updated_at: string;
972
- };
973
- Insert: {
974
- author_name: string;
975
- author_url?: string | null;
976
- comments_count?: number;
977
- created_at?: string;
978
- discovered_at?: string;
979
- engagement_count?: number;
980
- feedback?: string | null;
981
- final_response?: string | null;
982
- fully_reviewed?: boolean;
983
- id?: string;
984
- initial_draft?: string | null;
985
- matched_keywords?: string[];
986
- matched_query?: string | null;
987
- metadata?: Json;
988
- organization_id: string;
989
- platform: string;
990
- platform_post_id: string;
991
- post_text: string;
992
- post_title: string;
993
- post_url: string;
994
- posted_at: string;
995
- relevance_score?: number;
996
- responded_at?: string | null;
997
- reviewed_at?: string | null;
998
- skip_reason?: string | null;
999
- source_category?: string | null;
1000
- status?: string;
1001
- updated_at?: string;
1002
- };
1003
- Update: {
1004
- author_name?: string;
1005
- author_url?: string | null;
1006
- comments_count?: number;
1007
- created_at?: string;
1008
- discovered_at?: string;
1009
- engagement_count?: number;
1010
- feedback?: string | null;
1011
- final_response?: string | null;
1012
- fully_reviewed?: boolean;
1013
- id?: string;
1014
- initial_draft?: string | null;
1015
- matched_keywords?: string[];
1016
- matched_query?: string | null;
1017
- metadata?: Json;
1018
- organization_id?: string;
1019
- platform?: string;
1020
- platform_post_id?: string;
1021
- post_text?: string;
1022
- post_title?: string;
1023
- post_url?: string;
1024
- posted_at?: string;
1025
- relevance_score?: number;
1026
- responded_at?: string | null;
1027
- reviewed_at?: string | null;
1028
- skip_reason?: string | null;
1029
- source_category?: string | null;
1030
- status?: string;
1031
- updated_at?: string;
1032
- };
1033
- Relationships: [
1034
- {
1035
- foreignKeyName: "acq_social_posts_organization_id_fkey";
1036
- columns: ["organization_id"];
1037
- isOneToOne: false;
1038
- referencedRelation: "organizations";
1039
- referencedColumns: ["id"];
1040
- }
1041
- ];
1042
- };
1043
- activities: {
1044
- Row: {
1045
- activity_type: string;
1046
- actor_api_key_id: string | null;
1047
- actor_id: string | null;
1048
- actor_type: string | null;
1049
- created_at: string;
1050
- description: string | null;
1051
- entity_id: string;
1052
- entity_name: string | null;
1053
- entity_type: string;
1054
- id: string;
1055
- metadata: Json | null;
1056
- occurred_at: string;
1057
- organization_id: string;
1058
- status: string;
1059
- title: string;
1060
- };
1061
- Insert: {
1062
- activity_type: string;
1063
- actor_api_key_id?: string | null;
1064
- actor_id?: string | null;
1065
- actor_type?: string | null;
1066
- created_at?: string;
1067
- description?: string | null;
1068
- entity_id: string;
1069
- entity_name?: string | null;
1070
- entity_type: string;
1071
- id?: string;
1072
- metadata?: Json | null;
1073
- occurred_at?: string;
1074
- organization_id: string;
1075
- status: string;
1076
- title: string;
1077
- };
1078
- Update: {
1079
- activity_type?: string;
1080
- actor_api_key_id?: string | null;
1081
- actor_id?: string | null;
1082
- actor_type?: string | null;
1083
- created_at?: string;
1084
- description?: string | null;
1085
- entity_id?: string;
1086
- entity_name?: string | null;
1087
- entity_type?: string;
1088
- id?: string;
1089
- metadata?: Json | null;
1090
- occurred_at?: string;
1091
- organization_id?: string;
1092
- status?: string;
1093
- title?: string;
1094
- };
1095
- Relationships: [
1096
- {
1097
- foreignKeyName: "activities_actor_api_key_id_fkey";
1098
- columns: ["actor_api_key_id"];
1099
- isOneToOne: false;
1100
- referencedRelation: "api_keys";
1101
- referencedColumns: ["id"];
1102
- },
1103
- {
1104
- foreignKeyName: "activities_actor_id_fkey";
1105
- columns: ["actor_id"];
1106
- isOneToOne: false;
1107
- referencedRelation: "users";
1108
- referencedColumns: ["id"];
1109
- },
1110
- {
1111
- foreignKeyName: "activities_organization_id_fkey";
1112
- columns: ["organization_id"];
1113
- isOneToOne: false;
1114
- referencedRelation: "organizations";
1115
- referencedColumns: ["id"];
1116
- }
1117
- ];
1118
- };
1119
- agent_access_grants: {
1120
- Row: {
1121
- allowed_origins: string[];
1122
- branding: Json;
1123
- capture_fields: Json;
1124
- code_hash: string | null;
1125
- code_salt: string | null;
1126
- created_at: string;
1127
- disabled_at: string | null;
1128
- expires_at: string | null;
1129
- id: string;
1130
- max_sessions_per_visitor: number;
1131
- max_turns_per_session: number;
1132
- mode: string;
1133
- organization_id: string;
1134
- resource_id: string;
1135
- slug: string;
1136
- tool_policy: Json;
1137
- updated_at: string;
1138
- };
1139
- Insert: {
1140
- allowed_origins?: string[];
1141
- branding?: Json;
1142
- capture_fields?: Json;
1143
- code_hash?: string | null;
1144
- code_salt?: string | null;
1145
- created_at?: string;
1146
- disabled_at?: string | null;
1147
- expires_at?: string | null;
1148
- id?: string;
1149
- max_sessions_per_visitor?: number;
1150
- max_turns_per_session?: number;
1151
- mode?: string;
1152
- organization_id: string;
1153
- resource_id: string;
1154
- slug: string;
1155
- tool_policy?: Json;
1156
- updated_at?: string;
1157
- };
1158
- Update: {
1159
- allowed_origins?: string[];
1160
- branding?: Json;
1161
- capture_fields?: Json;
1162
- code_hash?: string | null;
1163
- code_salt?: string | null;
1164
- created_at?: string;
1165
- disabled_at?: string | null;
1166
- expires_at?: string | null;
1167
- id?: string;
1168
- max_sessions_per_visitor?: number;
1169
- max_turns_per_session?: number;
1170
- mode?: string;
1171
- organization_id?: string;
1172
- resource_id?: string;
1173
- slug?: string;
1174
- tool_policy?: Json;
1175
- updated_at?: string;
1176
- };
1177
- Relationships: [
1178
- {
1179
- foreignKeyName: "agent_access_grants_organization_id_fkey";
1180
- columns: ["organization_id"];
1181
- isOneToOne: false;
1182
- referencedRelation: "organizations";
1183
- referencedColumns: ["id"];
1184
- }
1185
- ];
1186
- };
1187
- api_keys: {
1188
- Row: {
1189
- created_at: string | null;
1190
- created_by: string | null;
1191
- id: string;
1192
- key_hash: string;
1193
- last_used_at: string | null;
1194
- name: string;
1195
- organization_id: string;
1196
- };
1197
- Insert: {
1198
- created_at?: string | null;
1199
- created_by?: string | null;
1200
- id?: string;
1201
- key_hash: string;
1202
- last_used_at?: string | null;
1203
- name: string;
1204
- organization_id: string;
1205
- };
1206
- Update: {
1207
- created_at?: string | null;
1208
- created_by?: string | null;
1209
- id?: string;
1210
- key_hash?: string;
1211
- last_used_at?: string | null;
1212
- name?: string;
1213
- organization_id?: string;
1214
- };
1215
- Relationships: [
1216
- {
1217
- foreignKeyName: "api_keys_created_by_fkey";
1218
- columns: ["created_by"];
1219
- isOneToOne: false;
1220
- referencedRelation: "users";
1221
- referencedColumns: ["id"];
1222
- },
1223
- {
1224
- foreignKeyName: "api_keys_organization_id_fkey";
1225
- columns: ["organization_id"];
1226
- isOneToOne: false;
1227
- referencedRelation: "organizations";
1228
- referencedColumns: ["id"];
1229
- }
1230
- ];
1231
- };
1232
- artifacts: {
1233
- Row: {
1234
- content: Json;
1235
- created_at: string;
1236
- created_by: string | null;
1237
- id: string;
1238
- is_active: boolean;
1239
- kind: string;
1240
- organization_id: string;
1241
- owner_id: string | null;
1242
- owner_kind: string;
1243
- pipeline_id: string | null;
1244
- source_execution_id: string | null;
1245
- updated_at: string;
1246
- version: number;
1247
- };
1248
- Insert: {
1249
- content: Json;
1250
- created_at?: string;
1251
- created_by?: string | null;
1252
- id?: string;
1253
- is_active?: boolean;
1254
- kind: string;
1255
- organization_id: string;
1256
- owner_id?: string | null;
1257
- owner_kind: string;
1258
- pipeline_id?: string | null;
1259
- source_execution_id?: string | null;
1260
- updated_at?: string;
1261
- version?: number;
1262
- };
1263
- Update: {
1264
- content?: Json;
1265
- created_at?: string;
1266
- created_by?: string | null;
1267
- id?: string;
1268
- is_active?: boolean;
1269
- kind?: string;
1270
- organization_id?: string;
1271
- owner_id?: string | null;
1272
- owner_kind?: string;
1273
- pipeline_id?: string | null;
1274
- source_execution_id?: string | null;
1275
- updated_at?: string;
1276
- version?: number;
1277
- };
1278
- Relationships: [
1279
- {
1280
- foreignKeyName: "artifacts_organization_id_fkey";
1281
- columns: ["organization_id"];
1282
- isOneToOne: false;
1283
- referencedRelation: "organizations";
1284
- referencedColumns: ["id"];
1285
- }
1286
- ];
1287
- };
1288
- clients: {
1289
- Row: {
1290
- converted_at: string | null;
1291
- created_at: string;
1292
- id: string;
1293
- metadata: Json;
1294
- name: string;
1295
- organization_id: string;
1296
- primary_company_id: string | null;
1297
- primary_contact_id: string | null;
1298
- source: string;
1299
- source_deal_id: string | null;
1300
- status: string;
1301
- updated_at: string;
1302
- };
1303
- Insert: {
1304
- converted_at?: string | null;
1305
- created_at?: string;
1306
- id?: string;
1307
- metadata?: Json;
1308
- name: string;
1309
- organization_id: string;
1310
- primary_company_id?: string | null;
1311
- primary_contact_id?: string | null;
1312
- source?: string;
1313
- source_deal_id?: string | null;
1314
- status?: string;
1315
- updated_at?: string;
1316
- };
1317
- Update: {
1318
- converted_at?: string | null;
1319
- created_at?: string;
1320
- id?: string;
1321
- metadata?: Json;
1322
- name?: string;
1323
- organization_id?: string;
1324
- primary_company_id?: string | null;
1325
- primary_contact_id?: string | null;
1326
- source?: string;
1327
- source_deal_id?: string | null;
1328
- status?: string;
1329
- updated_at?: string;
1330
- };
1331
- Relationships: [
1332
- {
1333
- foreignKeyName: "clients_organization_id_fkey";
1334
- columns: ["organization_id"];
1335
- isOneToOne: false;
1336
- referencedRelation: "organizations";
1337
- referencedColumns: ["id"];
1338
- },
1339
- {
1340
- foreignKeyName: "clients_primary_company_id_fkey";
1341
- columns: ["primary_company_id"];
1342
- isOneToOne: false;
1343
- referencedRelation: "acq_companies";
1344
- referencedColumns: ["id"];
1345
- },
1346
- {
1347
- foreignKeyName: "clients_primary_contact_id_fkey";
1348
- columns: ["primary_contact_id"];
1349
- isOneToOne: false;
1350
- referencedRelation: "acq_contacts";
1351
- referencedColumns: ["id"];
1352
- },
1353
- {
1354
- foreignKeyName: "clients_source_deal_id_fkey";
1355
- columns: ["source_deal_id"];
1356
- isOneToOne: false;
1357
- referencedRelation: "acq_deals";
1358
- referencedColumns: ["id"];
1359
- }
1360
- ];
1361
- };
1362
- command_queue: {
1363
- Row: {
1364
- action_payload: Json | null;
1365
- actions: Json;
1366
- completed_at: string | null;
1367
- completed_by: string | null;
1368
- context: Json;
1369
- created_at: string;
1370
- description: string | null;
1371
- expires_at: string | null;
1372
- human_checkpoint: string | null;
1373
- id: string;
1374
- idempotency_key: string | null;
1375
- metadata: Json | null;
1376
- organization_id: string;
1377
- origin_execution_id: string;
1378
- origin_resource_id: string;
1379
- origin_resource_type: string;
1380
- priority: number;
1381
- selected_action: string | null;
1382
- status: string;
1383
- target_execution_id: string | null;
1384
- target_resource_id: string | null;
1385
- target_resource_type: string | null;
1386
- };
1387
- Insert: {
1388
- action_payload?: Json | null;
1389
- actions: Json;
1390
- completed_at?: string | null;
1391
- completed_by?: string | null;
1392
- context: Json;
1393
- created_at?: string;
1394
- description?: string | null;
1395
- expires_at?: string | null;
1396
- human_checkpoint?: string | null;
1397
- id?: string;
1398
- idempotency_key?: string | null;
1399
- metadata?: Json | null;
1400
- organization_id: string;
1401
- origin_execution_id: string;
1402
- origin_resource_id: string;
1403
- origin_resource_type: string;
1404
- priority?: number;
1405
- selected_action?: string | null;
1406
- status?: string;
1407
- target_execution_id?: string | null;
1408
- target_resource_id?: string | null;
1409
- target_resource_type?: string | null;
1410
- };
1411
- Update: {
1412
- action_payload?: Json | null;
1413
- actions?: Json;
1414
- completed_at?: string | null;
1415
- completed_by?: string | null;
1416
- context?: Json;
1417
- created_at?: string;
1418
- description?: string | null;
1419
- expires_at?: string | null;
1420
- human_checkpoint?: string | null;
1421
- id?: string;
1422
- idempotency_key?: string | null;
1423
- metadata?: Json | null;
1424
- organization_id?: string;
1425
- origin_execution_id?: string;
1426
- origin_resource_id?: string;
1427
- origin_resource_type?: string;
1428
- priority?: number;
1429
- selected_action?: string | null;
1430
- status?: string;
1431
- target_execution_id?: string | null;
1432
- target_resource_id?: string | null;
1433
- target_resource_type?: string | null;
1434
- };
1435
- Relationships: [
1436
- {
1437
- foreignKeyName: "command_queue_completed_by_fkey";
1438
- columns: ["completed_by"];
1439
- isOneToOne: false;
1440
- referencedRelation: "users";
1441
- referencedColumns: ["id"];
1442
- },
1443
- {
1444
- foreignKeyName: "command_queue_organization_id_fkey";
1445
- columns: ["organization_id"];
1446
- isOneToOne: false;
1447
- referencedRelation: "organizations";
1448
- referencedColumns: ["id"];
1449
- },
1450
- {
1451
- foreignKeyName: "command_queue_target_execution_id_fkey";
1452
- columns: ["target_execution_id"];
1453
- isOneToOne: false;
1454
- referencedRelation: "execution_logs";
1455
- referencedColumns: ["execution_id"];
1456
- }
1457
- ];
1458
- };
1459
- content_distribution_metrics: {
1460
- Row: {
1461
- captured_at: string;
1462
- created_at: string;
1463
- distribution_id: string;
1464
- id: string;
1465
- metrics: Json;
1466
- organization_id: string;
1467
- raw: Json;
1468
- source: string;
1469
- source_execution_id: string | null;
1470
- };
1471
- Insert: {
1472
- captured_at?: string;
1473
- created_at?: string;
1474
- distribution_id: string;
1475
- id?: string;
1476
- metrics?: Json;
1477
- organization_id: string;
1478
- raw?: Json;
1479
- source: string;
1480
- source_execution_id?: string | null;
1481
- };
1482
- Update: {
1483
- captured_at?: string;
1484
- created_at?: string;
1485
- distribution_id?: string;
1486
- id?: string;
1487
- metrics?: Json;
1488
- organization_id?: string;
1489
- raw?: Json;
1490
- source?: string;
1491
- source_execution_id?: string | null;
1492
- };
1493
- Relationships: [
1494
- {
1495
- foreignKeyName: "content_distribution_metrics_distribution_fkey";
1496
- columns: ["distribution_id", "organization_id"];
1497
- isOneToOne: false;
1498
- referencedRelation: "content_distributions";
1499
- referencedColumns: ["id", "organization_id"];
1500
- },
1501
- {
1502
- foreignKeyName: "content_distribution_metrics_organization_id_fkey";
1503
- columns: ["organization_id"];
1504
- isOneToOne: false;
1505
- referencedRelation: "organizations";
1506
- referencedColumns: ["id"];
1507
- },
1508
- {
1509
- foreignKeyName: "content_distribution_metrics_source_execution_id_fkey";
1510
- columns: ["source_execution_id"];
1511
- isOneToOne: false;
1512
- referencedRelation: "execution_logs";
1513
- referencedColumns: ["execution_id"];
1514
- }
1515
- ];
1516
- };
1517
- content_distributions: {
1518
- Row: {
1519
- adapted_body: string | null;
1520
- checklist: Json | null;
1521
- content_item_id: string;
1522
- created_at: string;
1523
- format: string;
1524
- id: string;
1525
- media_urls: Json;
1526
- metrics: Json;
1527
- metrics_updated_at: string | null;
1528
- organization_id: string;
1529
- platform: string;
1530
- platform_content: Json | null;
1531
- platform_post_id: string | null;
1532
- platform_url: string | null;
1533
- processing_state: Json;
1534
- publish_method: string | null;
1535
- published_at: string | null;
1536
- status: string;
1537
- updated_at: string;
1538
- };
1539
- Insert: {
1540
- adapted_body?: string | null;
1541
- checklist?: Json | null;
1542
- content_item_id: string;
1543
- created_at?: string;
1544
- format: string;
1545
- id?: string;
1546
- media_urls?: Json;
1547
- metrics?: Json;
1548
- metrics_updated_at?: string | null;
1549
- organization_id: string;
1550
- platform: string;
1551
- platform_content?: Json | null;
1552
- platform_post_id?: string | null;
1553
- platform_url?: string | null;
1554
- processing_state?: Json;
1555
- publish_method?: string | null;
1556
- published_at?: string | null;
1557
- status?: string;
1558
- updated_at?: string;
1559
- };
1560
- Update: {
1561
- adapted_body?: string | null;
1562
- checklist?: Json | null;
1563
- content_item_id?: string;
1564
- created_at?: string;
1565
- format?: string;
1566
- id?: string;
1567
- media_urls?: Json;
1568
- metrics?: Json;
1569
- metrics_updated_at?: string | null;
1570
- organization_id?: string;
1571
- platform?: string;
1572
- platform_content?: Json | null;
1573
- platform_post_id?: string | null;
1574
- platform_url?: string | null;
1575
- processing_state?: Json;
1576
- publish_method?: string | null;
1577
- published_at?: string | null;
1578
- status?: string;
1579
- updated_at?: string;
1580
- };
1581
- Relationships: [
1582
- {
1583
- foreignKeyName: "content_distributions_content_item_id_fkey";
1584
- columns: ["content_item_id"];
1585
- isOneToOne: false;
1586
- referencedRelation: "content_items";
1587
- referencedColumns: ["id"];
1588
- },
1589
- {
1590
- foreignKeyName: "content_distributions_organization_id_fkey";
1591
- columns: ["organization_id"];
1592
- isOneToOne: false;
1593
- referencedRelation: "organizations";
1594
- referencedColumns: ["id"];
1595
- }
1596
- ];
1597
- };
1598
- content_item_attempts: {
1599
- Row: {
1600
- attempt_number: number;
1601
- content_item_id: string;
1602
- created_at: string;
1603
- created_by: string | null;
1604
- id: string;
1605
- organization_id: string;
1606
- payload: Json;
1607
- source_execution_id: string | null;
1608
- status: string;
1609
- step_key: string | null;
1610
- };
1611
- Insert: {
1612
- attempt_number: number;
1613
- content_item_id: string;
1614
- created_at?: string;
1615
- created_by?: string | null;
1616
- id?: string;
1617
- organization_id: string;
1618
- payload?: Json;
1619
- source_execution_id?: string | null;
1620
- status: string;
1621
- step_key?: string | null;
1622
- };
1623
- Update: {
1624
- attempt_number?: number;
1625
- content_item_id?: string;
1626
- created_at?: string;
1627
- created_by?: string | null;
1628
- id?: string;
1629
- organization_id?: string;
1630
- payload?: Json;
1631
- source_execution_id?: string | null;
1632
- status?: string;
1633
- step_key?: string | null;
1634
- };
1635
- Relationships: [
1636
- {
1637
- foreignKeyName: "content_item_attempts_content_item_id_fkey";
1638
- columns: ["content_item_id"];
1639
- isOneToOne: false;
1640
- referencedRelation: "content_items";
1641
- referencedColumns: ["id"];
1642
- },
1643
- {
1644
- foreignKeyName: "content_item_attempts_created_by_fkey";
1645
- columns: ["created_by"];
1646
- isOneToOne: false;
1647
- referencedRelation: "users";
1648
- referencedColumns: ["id"];
1649
- },
1650
- {
1651
- foreignKeyName: "content_item_attempts_organization_id_fkey";
1652
- columns: ["organization_id"];
1653
- isOneToOne: false;
1654
- referencedRelation: "organizations";
1655
- referencedColumns: ["id"];
1656
- },
1657
- {
1658
- foreignKeyName: "content_item_attempts_source_execution_id_fkey";
1659
- columns: ["source_execution_id"];
1660
- isOneToOne: false;
1661
- referencedRelation: "execution_logs";
1662
- referencedColumns: ["execution_id"];
1663
- }
1664
- ];
1665
- };
1666
- content_item_source_assets: {
1667
- Row: {
1668
- alt_text: string | null;
1669
- content_item_id: string;
1670
- created_at: string;
1671
- crop: Json | null;
1672
- derivative_crop: Json | null;
1673
- derivative_path: string | null;
1674
- derivative_rendered_at: string | null;
1675
- id: string;
1676
- organization_id: string;
1677
- position: number;
1678
- source_asset_id: string;
1679
- };
1680
- Insert: {
1681
- alt_text?: string | null;
1682
- content_item_id: string;
1683
- created_at?: string;
1684
- crop?: Json | null;
1685
- derivative_crop?: Json | null;
1686
- derivative_path?: string | null;
1687
- derivative_rendered_at?: string | null;
1688
- id?: string;
1689
- organization_id: string;
1690
- position: number;
1691
- source_asset_id: string;
1692
- };
1693
- Update: {
1694
- alt_text?: string | null;
1695
- content_item_id?: string;
1696
- created_at?: string;
1697
- crop?: Json | null;
1698
- derivative_crop?: Json | null;
1699
- derivative_path?: string | null;
1700
- derivative_rendered_at?: string | null;
1701
- id?: string;
1702
- organization_id?: string;
1703
- position?: number;
1704
- source_asset_id?: string;
1705
- };
1706
- Relationships: [
1707
- {
1708
- foreignKeyName: "content_item_source_assets_asset_fkey";
1709
- columns: ["source_asset_id", "organization_id"];
1710
- isOneToOne: false;
1711
- referencedRelation: "content_source_assets";
1712
- referencedColumns: ["id", "organization_id"];
1713
- },
1714
- {
1715
- foreignKeyName: "content_item_source_assets_item_fkey";
1716
- columns: ["content_item_id", "organization_id"];
1717
- isOneToOne: false;
1718
- referencedRelation: "content_items";
1719
- referencedColumns: ["id", "organization_id"];
1720
- }
1721
- ];
1722
- };
1723
- content_items: {
1724
- Row: {
1725
- body: string | null;
1726
- client_id: string | null;
1727
- created_at: string;
1728
- created_by: string | null;
1729
- id: string;
1730
- organization_id: string;
1731
- payload: Json;
1732
- pillar: string | null;
1733
- pipeline_id: string | null;
1734
- processing_state: Json;
1735
- reject_reason: string | null;
1736
- reviewed_at: string | null;
1737
- reviewed_by: string | null;
1738
- reviewer_feedback: string | null;
1739
- source_asset_id: string | null;
1740
- status: string;
1741
- title: string;
1742
- updated_at: string;
1743
- updated_by: string | null;
1744
- };
1745
- Insert: {
1746
- body?: string | null;
1747
- client_id?: string | null;
1748
- created_at?: string;
1749
- created_by?: string | null;
1750
- id?: string;
1751
- organization_id: string;
1752
- payload?: Json;
1753
- pillar?: string | null;
1754
- pipeline_id?: string | null;
1755
- processing_state?: Json;
1756
- reject_reason?: string | null;
1757
- reviewed_at?: string | null;
1758
- reviewed_by?: string | null;
1759
- reviewer_feedback?: string | null;
1760
- source_asset_id?: string | null;
1761
- status?: string;
1762
- title: string;
1763
- updated_at?: string;
1764
- updated_by?: string | null;
1765
- };
1766
- Update: {
1767
- body?: string | null;
1768
- client_id?: string | null;
1769
- created_at?: string;
1770
- created_by?: string | null;
1771
- id?: string;
1772
- organization_id?: string;
1773
- payload?: Json;
1774
- pillar?: string | null;
1775
- pipeline_id?: string | null;
1776
- processing_state?: Json;
1777
- reject_reason?: string | null;
1778
- reviewed_at?: string | null;
1779
- reviewed_by?: string | null;
1780
- reviewer_feedback?: string | null;
1781
- source_asset_id?: string | null;
1782
- status?: string;
1783
- title?: string;
1784
- updated_at?: string;
1785
- updated_by?: string | null;
1786
- };
1787
- Relationships: [
1788
- {
1789
- foreignKeyName: "content_items_client_id_fkey";
1790
- columns: ["client_id"];
1791
- isOneToOne: false;
1792
- referencedRelation: "clients";
1793
- referencedColumns: ["id"];
1794
- },
1795
- {
1796
- foreignKeyName: "content_items_created_by_fkey";
1797
- columns: ["created_by"];
1798
- isOneToOne: false;
1799
- referencedRelation: "users";
1800
- referencedColumns: ["id"];
1801
- },
1802
- {
1803
- foreignKeyName: "content_items_organization_id_fkey";
1804
- columns: ["organization_id"];
1805
- isOneToOne: false;
1806
- referencedRelation: "organizations";
1807
- referencedColumns: ["id"];
1808
- },
1809
- {
1810
- foreignKeyName: "content_items_reviewed_by_fkey";
1811
- columns: ["reviewed_by"];
1812
- isOneToOne: false;
1813
- referencedRelation: "users";
1814
- referencedColumns: ["id"];
1815
- },
1816
- {
1817
- foreignKeyName: "content_items_source_asset_id_fkey";
1818
- columns: ["source_asset_id"];
1819
- isOneToOne: false;
1820
- referencedRelation: "content_source_assets";
1821
- referencedColumns: ["id"];
1822
- },
1823
- {
1824
- foreignKeyName: "content_items_updated_by_fkey";
1825
- columns: ["updated_by"];
1826
- isOneToOne: false;
1827
- referencedRelation: "users";
1828
- referencedColumns: ["id"];
1829
- }
1830
- ];
1831
- };
1832
- content_source_assets: {
1833
- Row: {
1834
- created_at: string;
1835
- duration_seconds: number | null;
1836
- external_url: string | null;
1837
- id: string;
1838
- kind: string;
1839
- metadata: Json;
1840
- organization_id: string;
1841
- payload: Json;
1842
- processing_state: Json;
1843
- storage_path: string | null;
1844
- title: string;
1845
- updated_at: string;
1846
- };
1847
- Insert: {
1848
- created_at?: string;
1849
- duration_seconds?: number | null;
1850
- external_url?: string | null;
1851
- id?: string;
1852
- kind: string;
1853
- metadata?: Json;
1854
- organization_id: string;
1855
- payload?: Json;
1856
- processing_state?: Json;
1857
- storage_path?: string | null;
1858
- title: string;
1859
- updated_at?: string;
1860
- };
1861
- Update: {
1862
- created_at?: string;
1863
- duration_seconds?: number | null;
1864
- external_url?: string | null;
1865
- id?: string;
1866
- kind?: string;
1867
- metadata?: Json;
1868
- organization_id?: string;
1869
- payload?: Json;
1870
- processing_state?: Json;
1871
- storage_path?: string | null;
1872
- title?: string;
1873
- updated_at?: string;
1874
- };
1875
- Relationships: [
1876
- {
1877
- foreignKeyName: "content_source_assets_organization_id_fkey";
1878
- columns: ["organization_id"];
1879
- isOneToOne: false;
1880
- referencedRelation: "organizations";
1881
- referencedColumns: ["id"];
1882
- }
1883
- ];
1884
- };
1885
- credentials: {
1886
- Row: {
1887
- created_at: string;
1888
- created_by: string | null;
1889
- encrypted_value: string;
1890
- id: string;
1891
- name: string;
1892
- organization_id: string;
1893
- provider: string | null;
1894
- type: string;
1895
- updated_at: string;
1896
- };
1897
- Insert: {
1898
- created_at?: string;
1899
- created_by?: string | null;
1900
- encrypted_value: string;
1901
- id?: string;
1902
- name: string;
1903
- organization_id: string;
1904
- provider?: string | null;
1905
- type?: string;
1906
- updated_at?: string;
1907
- };
1908
- Update: {
1909
- created_at?: string;
1910
- created_by?: string | null;
1911
- encrypted_value?: string;
1912
- id?: string;
1913
- name?: string;
1914
- organization_id?: string;
1915
- provider?: string | null;
1916
- type?: string;
1917
- updated_at?: string;
1918
- };
1919
- Relationships: [
1920
- {
1921
- foreignKeyName: "credentials_created_by_fkey";
1922
- columns: ["created_by"];
1923
- isOneToOne: false;
1924
- referencedRelation: "users";
1925
- referencedColumns: ["id"];
1926
- },
1927
- {
1928
- foreignKeyName: "credentials_organization_id_fkey";
1929
- columns: ["organization_id"];
1930
- isOneToOne: false;
1931
- referencedRelation: "organizations";
1932
- referencedColumns: ["id"];
1933
- }
1934
- ];
1935
- };
1936
- deployment_organization_models: {
1937
- Row: {
1938
- created_at: string;
1939
- deployment_id: string;
1940
- model_hash: string | null;
1941
- organization_id: string;
1942
- organization_model: Json;
1943
- schema_version: string;
1944
- updated_at: string;
1945
- };
1946
- Insert: {
1947
- created_at?: string;
1948
- deployment_id: string;
1949
- model_hash?: string | null;
1950
- organization_id: string;
1951
- organization_model: Json;
1952
- schema_version?: string;
1953
- updated_at?: string;
1954
- };
1955
- Update: {
1956
- created_at?: string;
1957
- deployment_id?: string;
1958
- model_hash?: string | null;
1959
- organization_id?: string;
1960
- organization_model?: Json;
1961
- schema_version?: string;
1962
- updated_at?: string;
1963
- };
1964
- Relationships: [
1965
- {
1966
- foreignKeyName: "deployment_organization_models_deployment_id_fkey";
1967
- columns: ["deployment_id"];
1968
- isOneToOne: true;
1969
- referencedRelation: "deployments";
1970
- referencedColumns: ["id"];
1971
- },
1972
- {
1973
- foreignKeyName: "deployment_organization_models_organization_id_fkey";
1974
- columns: ["organization_id"];
1975
- isOneToOne: false;
1976
- referencedRelation: "organizations";
1977
- referencedColumns: ["id"];
1978
- }
1979
- ];
1980
- };
1981
- deployments: {
1982
- Row: {
1983
- created_at: string;
1984
- deployment_version: string | null;
1985
- error_message: string | null;
1986
- id: string;
1987
- organization_id: string;
1988
- pid: number | null;
1989
- port: number | null;
1990
- sdk_version: string;
1991
- status: string;
1992
- tarball_path: string | null;
1993
- updated_at: string;
1994
- };
1995
- Insert: {
1996
- created_at?: string;
1997
- deployment_version?: string | null;
1998
- error_message?: string | null;
1999
- id?: string;
2000
- organization_id: string;
2001
- pid?: number | null;
2002
- port?: number | null;
2003
- sdk_version: string;
2004
- status?: string;
2005
- tarball_path?: string | null;
2006
- updated_at?: string;
2007
- };
2008
- Update: {
2009
- created_at?: string;
2010
- deployment_version?: string | null;
2011
- error_message?: string | null;
2012
- id?: string;
2013
- organization_id?: string;
2014
- pid?: number | null;
2015
- port?: number | null;
2016
- sdk_version?: string;
2017
- status?: string;
2018
- tarball_path?: string | null;
2019
- updated_at?: string;
2020
- };
2021
- Relationships: [
2022
- {
2023
- foreignKeyName: "deployments_organization_id_fkey";
2024
- columns: ["organization_id"];
2025
- isOneToOne: false;
2026
- referencedRelation: "organizations";
2027
- referencedColumns: ["id"];
2028
- }
2029
- ];
2030
- };
2031
- execution_errors: {
2032
- Row: {
2033
- created_at: string | null;
2034
- error_category: string;
2035
- error_message: string;
2036
- error_severity: string;
2037
- error_stack_trace: string | null;
2038
- error_type: string;
2039
- execution_id: string;
2040
- id: string;
2041
- metadata: Json | null;
2042
- occurred_at: string;
2043
- organization_id: string;
2044
- resolved: boolean;
2045
- resolved_at: string | null;
2046
- resolved_by: string | null;
2047
- };
2048
- Insert: {
2049
- created_at?: string | null;
2050
- error_category: string;
2051
- error_message: string;
2052
- error_severity: string;
2053
- error_stack_trace?: string | null;
2054
- error_type: string;
2055
- execution_id: string;
2056
- id?: string;
2057
- metadata?: Json | null;
2058
- occurred_at?: string;
2059
- organization_id: string;
2060
- resolved?: boolean;
2061
- resolved_at?: string | null;
2062
- resolved_by?: string | null;
2063
- };
2064
- Update: {
2065
- created_at?: string | null;
2066
- error_category?: string;
2067
- error_message?: string;
2068
- error_severity?: string;
2069
- error_stack_trace?: string | null;
2070
- error_type?: string;
2071
- execution_id?: string;
2072
- id?: string;
2073
- metadata?: Json | null;
2074
- occurred_at?: string;
2075
- organization_id?: string;
2076
- resolved?: boolean;
2077
- resolved_at?: string | null;
2078
- resolved_by?: string | null;
2079
- };
2080
- Relationships: [
2081
- {
2082
- foreignKeyName: "execution_errors_execution_id_fkey";
2083
- columns: ["execution_id"];
2084
- isOneToOne: false;
2085
- referencedRelation: "execution_logs";
2086
- referencedColumns: ["execution_id"];
2087
- },
2088
- {
2089
- foreignKeyName: "execution_errors_organization_id_fkey";
2090
- columns: ["organization_id"];
2091
- isOneToOne: false;
2092
- referencedRelation: "organizations";
2093
- referencedColumns: ["id"];
2094
- },
2095
- {
2096
- foreignKeyName: "execution_errors_resolved_by_fkey";
2097
- columns: ["resolved_by"];
2098
- isOneToOne: false;
2099
- referencedRelation: "users";
2100
- referencedColumns: ["id"];
2101
- }
2102
- ];
2103
- };
2104
- execution_logs: {
2105
- Row: {
2106
- api_version: string | null;
2107
- completed_at: string | null;
2108
- created_at: string | null;
2109
- error: string | null;
2110
- execution_id: string;
2111
- input: Json | null;
2112
- last_heartbeat_at: string | null;
2113
- logs: Json | null;
2114
- organization_id: string;
2115
- origin_execution_id: string | null;
2116
- output: Json | null;
2117
- resource_id: string;
2118
- resource_snapshot: Json | null;
2119
- resource_status: string;
2120
- resource_type: string;
2121
- resource_version: string | null;
2122
- sdk_version: string | null;
2123
- session_id: string | null;
2124
- session_turn_number: number | null;
2125
- started_at: string;
2126
- status: string;
2127
- trigger_type: string | null;
2128
- updated_at: string | null;
2129
- user_id: string | null;
2130
- };
2131
- Insert: {
2132
- api_version?: string | null;
2133
- completed_at?: string | null;
2134
- created_at?: string | null;
2135
- error?: string | null;
2136
- execution_id?: string;
2137
- input?: Json | null;
2138
- last_heartbeat_at?: string | null;
2139
- logs?: Json | null;
2140
- organization_id: string;
2141
- origin_execution_id?: string | null;
2142
- output?: Json | null;
2143
- resource_id: string;
2144
- resource_snapshot?: Json | null;
2145
- resource_status?: string;
2146
- resource_type?: string;
2147
- resource_version?: string | null;
2148
- sdk_version?: string | null;
2149
- session_id?: string | null;
2150
- session_turn_number?: number | null;
2151
- started_at?: string;
2152
- status: string;
2153
- trigger_type?: string | null;
2154
- updated_at?: string | null;
2155
- user_id?: string | null;
2156
- };
2157
- Update: {
2158
- api_version?: string | null;
2159
- completed_at?: string | null;
2160
- created_at?: string | null;
2161
- error?: string | null;
2162
- execution_id?: string;
2163
- input?: Json | null;
2164
- last_heartbeat_at?: string | null;
2165
- logs?: Json | null;
2166
- organization_id?: string;
2167
- origin_execution_id?: string | null;
2168
- output?: Json | null;
2169
- resource_id?: string;
2170
- resource_snapshot?: Json | null;
2171
- resource_status?: string;
2172
- resource_type?: string;
2173
- resource_version?: string | null;
2174
- sdk_version?: string | null;
2175
- session_id?: string | null;
2176
- session_turn_number?: number | null;
2177
- started_at?: string;
2178
- status?: string;
2179
- trigger_type?: string | null;
2180
- updated_at?: string | null;
2181
- user_id?: string | null;
2182
- };
2183
- Relationships: [
2184
- {
2185
- foreignKeyName: "execution_history_organization_id_fkey";
2186
- columns: ["organization_id"];
2187
- isOneToOne: false;
2188
- referencedRelation: "organizations";
2189
- referencedColumns: ["id"];
2190
- },
2191
- {
2192
- foreignKeyName: "execution_logs_origin_execution_id_fkey";
2193
- columns: ["origin_execution_id"];
2194
- isOneToOne: false;
2195
- referencedRelation: "execution_logs";
2196
- referencedColumns: ["execution_id"];
2197
- },
2198
- {
2199
- foreignKeyName: "execution_logs_session_id_fkey";
2200
- columns: ["session_id"];
2201
- isOneToOne: false;
2202
- referencedRelation: "sessions";
2203
- referencedColumns: ["session_id"];
2204
- },
2205
- {
2206
- foreignKeyName: "execution_logs_user_id_fkey";
2207
- columns: ["user_id"];
2208
- isOneToOne: false;
2209
- referencedRelation: "users";
2210
- referencedColumns: ["id"];
2211
- }
2212
- ];
2213
- };
2214
- execution_metrics: {
2215
- Row: {
2216
- ai_call_count: number;
2217
- ai_calls: Json | null;
2218
- automation_savings_usd: number | null;
2219
- created_at: string | null;
2220
- duration_ms: number | null;
2221
- execution_id: string;
2222
- organization_id: string;
2223
- resource_id: string;
2224
- total_cost_usd: number;
2225
- total_input_tokens: number;
2226
- total_output_tokens: number;
2227
- };
2228
- Insert: {
2229
- ai_call_count: number;
2230
- ai_calls?: Json | null;
2231
- automation_savings_usd?: number | null;
2232
- created_at?: string | null;
2233
- duration_ms?: number | null;
2234
- execution_id: string;
2235
- organization_id: string;
2236
- resource_id: string;
2237
- total_cost_usd: number;
2238
- total_input_tokens: number;
2239
- total_output_tokens: number;
2240
- };
2241
- Update: {
2242
- ai_call_count?: number;
2243
- ai_calls?: Json | null;
2244
- automation_savings_usd?: number | null;
2245
- created_at?: string | null;
2246
- duration_ms?: number | null;
2247
- execution_id?: string;
2248
- organization_id?: string;
2249
- resource_id?: string;
2250
- total_cost_usd?: number;
2251
- total_input_tokens?: number;
2252
- total_output_tokens?: number;
2253
- };
2254
- Relationships: [
2255
- {
2256
- foreignKeyName: "execution_metrics_execution_id_fkey";
2257
- columns: ["execution_id"];
2258
- isOneToOne: true;
2259
- referencedRelation: "execution_logs";
2260
- referencedColumns: ["execution_id"];
2261
- },
2262
- {
2263
- foreignKeyName: "execution_metrics_organization_id_fkey";
2264
- columns: ["organization_id"];
2265
- isOneToOne: false;
2266
- referencedRelation: "organizations";
2267
- referencedColumns: ["id"];
2268
- }
2269
- ];
2270
- };
2271
- notifications: {
2272
- Row: {
2273
- action_url: string | null;
2274
- category: string;
2275
- created_at: string | null;
2276
- id: string;
2277
- message: string;
2278
- organization_id: string;
2279
- read: boolean | null;
2280
- read_at: string | null;
2281
- title: string;
2282
- user_id: string;
2283
- };
2284
- Insert: {
2285
- action_url?: string | null;
2286
- category: string;
2287
- created_at?: string | null;
2288
- id?: string;
2289
- message: string;
2290
- organization_id: string;
2291
- read?: boolean | null;
2292
- read_at?: string | null;
2293
- title: string;
2294
- user_id: string;
2295
- };
2296
- Update: {
2297
- action_url?: string | null;
2298
- category?: string;
2299
- created_at?: string | null;
2300
- id?: string;
2301
- message?: string;
2302
- organization_id?: string;
2303
- read?: boolean | null;
2304
- read_at?: string | null;
2305
- title?: string;
2306
- user_id?: string;
2307
- };
2308
- Relationships: [
2309
- {
2310
- foreignKeyName: "notifications_organization_id_fkey";
2311
- columns: ["organization_id"];
2312
- isOneToOne: false;
2313
- referencedRelation: "organizations";
2314
- referencedColumns: ["id"];
2315
- },
2316
- {
2317
- foreignKeyName: "notifications_user_id_fkey";
2318
- columns: ["user_id"];
2319
- isOneToOne: false;
2320
- referencedRelation: "users";
2321
- referencedColumns: ["id"];
2322
- }
2323
- ];
2324
- };
2325
- org_invitations: {
2326
- Row: {
2327
- accept_invitation_url: string | null;
2328
- accepted_at: string | null;
2329
- created_at: string | null;
2330
- email: string;
2331
- expires_at: string;
2332
- id: string;
2333
- invitation_state: string | null;
2334
- invitation_token: string | null;
2335
- inviter_user_id: string | null;
2336
- organization_id: string | null;
2337
- revoked_at: string | null;
2338
- role_slug: string | null;
2339
- updated_at: string | null;
2340
- workos_invitation_id: string;
2341
- };
2342
- Insert: {
2343
- accept_invitation_url?: string | null;
2344
- accepted_at?: string | null;
2345
- created_at?: string | null;
2346
- email: string;
2347
- expires_at: string;
2348
- id?: string;
2349
- invitation_state?: string | null;
2350
- invitation_token?: string | null;
2351
- inviter_user_id?: string | null;
2352
- organization_id?: string | null;
2353
- revoked_at?: string | null;
2354
- role_slug?: string | null;
2355
- updated_at?: string | null;
2356
- workos_invitation_id: string;
2357
- };
2358
- Update: {
2359
- accept_invitation_url?: string | null;
2360
- accepted_at?: string | null;
2361
- created_at?: string | null;
2362
- email?: string;
2363
- expires_at?: string;
2364
- id?: string;
2365
- invitation_state?: string | null;
2366
- invitation_token?: string | null;
2367
- inviter_user_id?: string | null;
2368
- organization_id?: string | null;
2369
- revoked_at?: string | null;
2370
- role_slug?: string | null;
2371
- updated_at?: string | null;
2372
- workos_invitation_id?: string;
2373
- };
2374
- Relationships: [
2375
- {
2376
- foreignKeyName: "org_invitations_inviter_user_id_fkey";
2377
- columns: ["inviter_user_id"];
2378
- isOneToOne: false;
2379
- referencedRelation: "users";
2380
- referencedColumns: ["id"];
2381
- },
2382
- {
2383
- foreignKeyName: "org_invitations_organization_id_fkey";
2384
- columns: ["organization_id"];
2385
- isOneToOne: false;
2386
- referencedRelation: "organizations";
2387
- referencedColumns: ["id"];
2388
- }
2389
- ];
2390
- };
2391
- org_memberships: {
2392
- Row: {
2393
- config: Json;
2394
- created_at: string | null;
2395
- effective_permissions: string[];
2396
- id: string;
2397
- membership_status: string | null;
2398
- organization_id: string;
2399
- role_slug: string | null;
2400
- updated_at: string | null;
2401
- user_id: string;
2402
- workos_membership_id: string | null;
2403
- };
2404
- Insert: {
2405
- config?: Json;
2406
- created_at?: string | null;
2407
- effective_permissions?: string[];
2408
- id?: string;
2409
- membership_status?: string | null;
2410
- organization_id: string;
2411
- role_slug?: string | null;
2412
- updated_at?: string | null;
2413
- user_id: string;
2414
- workos_membership_id?: string | null;
2415
- };
2416
- Update: {
2417
- config?: Json;
2418
- created_at?: string | null;
2419
- effective_permissions?: string[];
2420
- id?: string;
2421
- membership_status?: string | null;
2422
- organization_id?: string;
2423
- role_slug?: string | null;
2424
- updated_at?: string | null;
2425
- user_id?: string;
2426
- workos_membership_id?: string | null;
2427
- };
2428
- Relationships: [
2429
- {
2430
- foreignKeyName: "org_memberships_organization_id_fkey";
2431
- columns: ["organization_id"];
2432
- isOneToOne: false;
2433
- referencedRelation: "organizations";
2434
- referencedColumns: ["id"];
2435
- },
2436
- {
2437
- foreignKeyName: "org_memberships_user_id_fkey";
2438
- columns: ["user_id"];
2439
- isOneToOne: false;
2440
- referencedRelation: "users";
2441
- referencedColumns: ["id"];
2442
- }
2443
- ];
2444
- };
2445
- org_rol_assignments: {
2446
- Row: {
2447
- granted_at: string;
2448
- granted_by: string | null;
2449
- membership_id: string;
2450
- role_id: string;
2451
- };
2452
- Insert: {
2453
- granted_at?: string;
2454
- granted_by?: string | null;
2455
- membership_id: string;
2456
- role_id: string;
2457
- };
2458
- Update: {
2459
- granted_at?: string;
2460
- granted_by?: string | null;
2461
- membership_id?: string;
2462
- role_id?: string;
2463
- };
2464
- Relationships: [
2465
- {
2466
- foreignKeyName: "org_rol_assignments_granted_by_fkey";
2467
- columns: ["granted_by"];
2468
- isOneToOne: false;
2469
- referencedRelation: "users";
2470
- referencedColumns: ["id"];
2471
- },
2472
- {
2473
- foreignKeyName: "org_rol_assignments_membership_id_fkey";
2474
- columns: ["membership_id"];
2475
- isOneToOne: false;
2476
- referencedRelation: "org_memberships";
2477
- referencedColumns: ["id"];
2478
- },
2479
- {
2480
- foreignKeyName: "org_rol_assignments_role_id_fkey";
2481
- columns: ["role_id"];
2482
- isOneToOne: false;
2483
- referencedRelation: "org_rol_definitions";
2484
- referencedColumns: ["id"];
2485
- }
2486
- ];
2487
- };
2488
- org_rol_definitions: {
2489
- Row: {
2490
- created_at: string;
2491
- description: string | null;
2492
- id: string;
2493
- is_system: boolean;
2494
- name: string;
2495
- organization_id: string | null;
2496
- slug: string;
2497
- updated_at: string;
2498
- };
2499
- Insert: {
2500
- created_at?: string;
2501
- description?: string | null;
2502
- id?: string;
2503
- is_system?: boolean;
2504
- name: string;
2505
- organization_id?: string | null;
2506
- slug: string;
2507
- updated_at?: string;
2508
- };
2509
- Update: {
2510
- created_at?: string;
2511
- description?: string | null;
2512
- id?: string;
2513
- is_system?: boolean;
2514
- name?: string;
2515
- organization_id?: string | null;
2516
- slug?: string;
2517
- updated_at?: string;
2518
- };
2519
- Relationships: [
2520
- {
2521
- foreignKeyName: "org_rol_definitions_organization_id_fkey";
2522
- columns: ["organization_id"];
2523
- isOneToOne: false;
2524
- referencedRelation: "organizations";
2525
- referencedColumns: ["id"];
2526
- }
2527
- ];
2528
- };
2529
- org_rol_grants: {
2530
- Row: {
2531
- granted_at: string;
2532
- permission_key: string;
2533
- role_id: string;
2534
- };
2535
- Insert: {
2536
- granted_at?: string;
2537
- permission_key: string;
2538
- role_id: string;
2539
- };
2540
- Update: {
2541
- granted_at?: string;
2542
- permission_key?: string;
2543
- role_id?: string;
2544
- };
2545
- Relationships: [
2546
- {
2547
- foreignKeyName: "org_rol_grants_permission_key_fkey";
2548
- columns: ["permission_key"];
2549
- isOneToOne: false;
2550
- referencedRelation: "org_rol_permissions";
2551
- referencedColumns: ["key"];
2552
- },
2553
- {
2554
- foreignKeyName: "org_rol_grants_role_id_fkey";
2555
- columns: ["role_id"];
2556
- isOneToOne: false;
2557
- referencedRelation: "org_rol_definitions";
2558
- referencedColumns: ["id"];
2559
- }
2560
- ];
2561
- };
2562
- org_rol_permissions: {
2563
- Row: {
2564
- created_at: string;
2565
- description: string;
2566
- is_org_grantable: boolean;
2567
- key: string;
2568
- updated_at: string;
2569
- };
2570
- Insert: {
2571
- created_at?: string;
2572
- description: string;
2573
- is_org_grantable?: boolean;
2574
- key: string;
2575
- updated_at?: string;
2576
- };
2577
- Update: {
2578
- created_at?: string;
2579
- description?: string;
2580
- is_org_grantable?: boolean;
2581
- key?: string;
2582
- updated_at?: string;
2583
- };
2584
- Relationships: [];
2585
- };
2586
- organizations: {
2587
- Row: {
2588
- config: Json;
2589
- created_at: string;
2590
- id: string;
2591
- is_test: boolean;
2592
- metadata: Json;
2593
- name: string;
2594
- status: string;
2595
- updated_at: string;
2596
- workos_org_id: string;
2597
- };
2598
- Insert: {
2599
- config?: Json;
2600
- created_at?: string;
2601
- id?: string;
2602
- is_test?: boolean;
2603
- metadata?: Json;
2604
- name: string;
2605
- status?: string;
2606
- updated_at?: string;
2607
- workos_org_id: string;
2608
- };
2609
- Update: {
2610
- config?: Json;
2611
- created_at?: string;
2612
- id?: string;
2613
- is_test?: boolean;
2614
- metadata?: Json;
2615
- name?: string;
2616
- status?: string;
2617
- updated_at?: string;
2618
- workos_org_id?: string;
2619
- };
2620
- Relationships: [];
2621
- };
2622
- prj_milestones: {
2623
- Row: {
2624
- checklist: Json | null;
2625
- completed_at: string | null;
2626
- created_at: string;
2627
- description: string | null;
2628
- due_date: string | null;
2629
- id: string;
2630
- metadata: Json | null;
2631
- name: string;
2632
- organization_id: string;
2633
- project_id: string;
2634
- sequence: number;
2635
- status: string;
2636
- updated_at: string;
2637
- };
2638
- Insert: {
2639
- checklist?: Json | null;
2640
- completed_at?: string | null;
2641
- created_at?: string;
2642
- description?: string | null;
2643
- due_date?: string | null;
2644
- id?: string;
2645
- metadata?: Json | null;
2646
- name: string;
2647
- organization_id: string;
2648
- project_id: string;
2649
- sequence?: number;
2650
- status?: string;
2651
- updated_at?: string;
2652
- };
2653
- Update: {
2654
- checklist?: Json | null;
2655
- completed_at?: string | null;
2656
- created_at?: string;
2657
- description?: string | null;
2658
- due_date?: string | null;
2659
- id?: string;
2660
- metadata?: Json | null;
2661
- name?: string;
2662
- organization_id?: string;
2663
- project_id?: string;
2664
- sequence?: number;
2665
- status?: string;
2666
- updated_at?: string;
2667
- };
2668
- Relationships: [
2669
- {
2670
- foreignKeyName: "fk_milestones_project";
2671
- columns: ["project_id"];
2672
- isOneToOne: false;
2673
- referencedRelation: "prj_projects";
2674
- referencedColumns: ["id"];
2675
- },
2676
- {
2677
- foreignKeyName: "prj_milestones_organization_id_fkey";
2678
- columns: ["organization_id"];
2679
- isOneToOne: false;
2680
- referencedRelation: "organizations";
2681
- referencedColumns: ["id"];
2682
- },
2683
- {
2684
- foreignKeyName: "prj_milestones_project_id_fkey";
2685
- columns: ["project_id"];
2686
- isOneToOne: false;
2687
- referencedRelation: "prj_projects";
2688
- referencedColumns: ["id"];
2689
- }
2690
- ];
2691
- };
2692
- prj_notes: {
2693
- Row: {
2694
- content: string;
2695
- created_at: string;
2696
- created_by: string | null;
2697
- id: string;
2698
- metadata: Json | null;
2699
- milestone_id: string | null;
2700
- occurred_at: string;
2701
- organization_id: string;
2702
- project_id: string;
2703
- summary: string | null;
2704
- task_id: string | null;
2705
- type: string;
2706
- };
2707
- Insert: {
2708
- content: string;
2709
- created_at?: string;
2710
- created_by?: string | null;
2711
- id?: string;
2712
- metadata?: Json | null;
2713
- milestone_id?: string | null;
2714
- occurred_at?: string;
2715
- organization_id: string;
2716
- project_id: string;
2717
- summary?: string | null;
2718
- task_id?: string | null;
2719
- type?: string;
2720
- };
2721
- Update: {
2722
- content?: string;
2723
- created_at?: string;
2724
- created_by?: string | null;
2725
- id?: string;
2726
- metadata?: Json | null;
2727
- milestone_id?: string | null;
2728
- occurred_at?: string;
2729
- organization_id?: string;
2730
- project_id?: string;
2731
- summary?: string | null;
2732
- task_id?: string | null;
2733
- type?: string;
2734
- };
2735
- Relationships: [
2736
- {
2737
- foreignKeyName: "fk_notes_created_by";
2738
- columns: ["created_by"];
2739
- isOneToOne: false;
2740
- referencedRelation: "users";
2741
- referencedColumns: ["id"];
2742
- },
2743
- {
2744
- foreignKeyName: "fk_notes_milestone";
2745
- columns: ["milestone_id"];
2746
- isOneToOne: false;
2747
- referencedRelation: "prj_milestones";
2748
- referencedColumns: ["id"];
2749
- },
2750
- {
2751
- foreignKeyName: "fk_notes_project";
2752
- columns: ["project_id"];
2753
- isOneToOne: false;
2754
- referencedRelation: "prj_projects";
2755
- referencedColumns: ["id"];
2756
- },
2757
- {
2758
- foreignKeyName: "fk_notes_task";
2759
- columns: ["task_id"];
2760
- isOneToOne: false;
2761
- referencedRelation: "prj_tasks";
2762
- referencedColumns: ["id"];
2763
- },
2764
- {
2765
- foreignKeyName: "prj_notes_created_by_fkey";
2766
- columns: ["created_by"];
2767
- isOneToOne: false;
2768
- referencedRelation: "users";
2769
- referencedColumns: ["id"];
2770
- },
2771
- {
2772
- foreignKeyName: "prj_notes_milestone_id_fkey";
2773
- columns: ["milestone_id"];
2774
- isOneToOne: false;
2775
- referencedRelation: "prj_milestones";
2776
- referencedColumns: ["id"];
2777
- },
2778
- {
2779
- foreignKeyName: "prj_notes_organization_id_fkey";
2780
- columns: ["organization_id"];
2781
- isOneToOne: false;
2782
- referencedRelation: "organizations";
2783
- referencedColumns: ["id"];
2784
- },
2785
- {
2786
- foreignKeyName: "prj_notes_project_id_fkey";
2787
- columns: ["project_id"];
2788
- isOneToOne: false;
2789
- referencedRelation: "prj_projects";
2790
- referencedColumns: ["id"];
2791
- },
2792
- {
2793
- foreignKeyName: "prj_notes_task_id_fkey";
2794
- columns: ["task_id"];
2795
- isOneToOne: false;
2796
- referencedRelation: "prj_tasks";
2797
- referencedColumns: ["id"];
2798
- }
2799
- ];
2800
- };
2801
- prj_projects: {
2802
- Row: {
2803
- actual_end_date: string | null;
2804
- client_company_id: string | null;
2805
- client_id: string | null;
2806
- contract_value: number | null;
2807
- created_at: string;
2808
- deal_id: string | null;
2809
- description: string | null;
2810
- id: string;
2811
- kind: string;
2812
- metadata: Json | null;
2813
- name: string;
2814
- organization_id: string;
2815
- start_date: string | null;
2816
- status: string;
2817
- target_end_date: string | null;
2818
- updated_at: string;
2819
- };
2820
- Insert: {
2821
- actual_end_date?: string | null;
2822
- client_company_id?: string | null;
2823
- client_id?: string | null;
2824
- contract_value?: number | null;
2825
- created_at?: string;
2826
- deal_id?: string | null;
2827
- description?: string | null;
2828
- id?: string;
2829
- kind?: string;
2830
- metadata?: Json | null;
2831
- name: string;
2832
- organization_id: string;
2833
- start_date?: string | null;
2834
- status?: string;
2835
- target_end_date?: string | null;
2836
- updated_at?: string;
2837
- };
2838
- Update: {
2839
- actual_end_date?: string | null;
2840
- client_company_id?: string | null;
2841
- client_id?: string | null;
2842
- contract_value?: number | null;
2843
- created_at?: string;
2844
- deal_id?: string | null;
2845
- description?: string | null;
2846
- id?: string;
2847
- kind?: string;
2848
- metadata?: Json | null;
2849
- name?: string;
2850
- organization_id?: string;
2851
- start_date?: string | null;
2852
- status?: string;
2853
- target_end_date?: string | null;
2854
- updated_at?: string;
2855
- };
2856
- Relationships: [
2857
- {
2858
- foreignKeyName: "fk_projects_company";
2859
- columns: ["client_company_id"];
2860
- isOneToOne: false;
2861
- referencedRelation: "acq_companies";
2862
- referencedColumns: ["id"];
2863
- },
2864
- {
2865
- foreignKeyName: "fk_projects_deal";
2866
- columns: ["deal_id"];
2867
- isOneToOne: false;
2868
- referencedRelation: "acq_deals";
2869
- referencedColumns: ["id"];
2870
- },
2871
- {
2872
- foreignKeyName: "prj_projects_client_company_id_fkey";
2873
- columns: ["client_company_id"];
2874
- isOneToOne: false;
2875
- referencedRelation: "acq_companies";
2876
- referencedColumns: ["id"];
2877
- },
2878
- {
2879
- foreignKeyName: "prj_projects_client_id_fkey";
2880
- columns: ["client_id"];
2881
- isOneToOne: false;
2882
- referencedRelation: "clients";
2883
- referencedColumns: ["id"];
2884
- },
2885
- {
2886
- foreignKeyName: "prj_projects_deal_id_fkey";
2887
- columns: ["deal_id"];
2888
- isOneToOne: false;
2889
- referencedRelation: "acq_deals";
2890
- referencedColumns: ["id"];
2891
- },
2892
- {
2893
- foreignKeyName: "prj_projects_organization_id_fkey";
2894
- columns: ["organization_id"];
2895
- isOneToOne: false;
2896
- referencedRelation: "organizations";
2897
- referencedColumns: ["id"];
2898
- }
2899
- ];
2900
- };
2901
- prj_tasks: {
2902
- Row: {
2903
- checklist: Json;
2904
- completed_at: string | null;
2905
- created_at: string;
2906
- description: string | null;
2907
- due_date: string | null;
2908
- file_url: string | null;
2909
- id: string;
2910
- metadata: Json | null;
2911
- milestone_id: string | null;
2912
- name: string;
2913
- organization_id: string;
2914
- parent_task_id: string | null;
2915
- project_id: string;
2916
- resume_context: Json | null;
2917
- status: string;
2918
- type: string;
2919
- updated_at: string;
2920
- };
2921
- Insert: {
2922
- checklist?: Json;
2923
- completed_at?: string | null;
2924
- created_at?: string;
2925
- description?: string | null;
2926
- due_date?: string | null;
2927
- file_url?: string | null;
2928
- id?: string;
2929
- metadata?: Json | null;
2930
- milestone_id?: string | null;
2931
- name: string;
2932
- organization_id: string;
2933
- parent_task_id?: string | null;
2934
- project_id: string;
2935
- resume_context?: Json | null;
2936
- status?: string;
2937
- type?: string;
2938
- updated_at?: string;
2939
- };
2940
- Update: {
2941
- checklist?: Json;
2942
- completed_at?: string | null;
2943
- created_at?: string;
2944
- description?: string | null;
2945
- due_date?: string | null;
2946
- file_url?: string | null;
2947
- id?: string;
2948
- metadata?: Json | null;
2949
- milestone_id?: string | null;
2950
- name?: string;
2951
- organization_id?: string;
2952
- parent_task_id?: string | null;
2953
- project_id?: string;
2954
- resume_context?: Json | null;
2955
- status?: string;
2956
- type?: string;
2957
- updated_at?: string;
2958
- };
2959
- Relationships: [
2960
- {
2961
- foreignKeyName: "fk_tasks_milestone";
2962
- columns: ["milestone_id"];
2963
- isOneToOne: false;
2964
- referencedRelation: "prj_milestones";
2965
- referencedColumns: ["id"];
2966
- },
2967
- {
2968
- foreignKeyName: "fk_tasks_parent";
2969
- columns: ["parent_task_id"];
2970
- isOneToOne: false;
2971
- referencedRelation: "prj_tasks";
2972
- referencedColumns: ["id"];
2973
- },
2974
- {
2975
- foreignKeyName: "fk_tasks_project";
2976
- columns: ["project_id"];
2977
- isOneToOne: false;
2978
- referencedRelation: "prj_projects";
2979
- referencedColumns: ["id"];
2980
- },
2981
- {
2982
- foreignKeyName: "prj_tasks_milestone_id_fkey";
2983
- columns: ["milestone_id"];
2984
- isOneToOne: false;
2985
- referencedRelation: "prj_milestones";
2986
- referencedColumns: ["id"];
2987
- },
2988
- {
2989
- foreignKeyName: "prj_tasks_organization_id_fkey";
2990
- columns: ["organization_id"];
2991
- isOneToOne: false;
2992
- referencedRelation: "organizations";
2993
- referencedColumns: ["id"];
2994
- },
2995
- {
2996
- foreignKeyName: "prj_tasks_parent_task_id_fkey";
2997
- columns: ["parent_task_id"];
2998
- isOneToOne: false;
2999
- referencedRelation: "prj_tasks";
3000
- referencedColumns: ["id"];
3001
- },
3002
- {
3003
- foreignKeyName: "prj_tasks_project_id_fkey";
3004
- columns: ["project_id"];
3005
- isOneToOne: false;
3006
- referencedRelation: "prj_projects";
3007
- referencedColumns: ["id"];
3008
- }
3009
- ];
3010
- };
3011
- reported_requests: {
3012
- Row: {
3013
- affected_page: string | null;
3014
- category: string;
3015
- context: Json | null;
3016
- created_at: string;
3017
- description: string;
3018
- evidence: Json | null;
3019
- id: string;
3020
- organization_id: string;
3021
- project_id: string | null;
3022
- reported_at: string;
3023
- reporter_id: string | null;
3024
- resolved_at: string | null;
3025
- severity: string;
3026
- source: string;
3027
- status: string;
3028
- task_id: string | null;
3029
- title: string;
3030
- type: string;
3031
- updated_at: string;
3032
- };
3033
- Insert: {
3034
- affected_page?: string | null;
3035
- category: string;
3036
- context?: Json | null;
3037
- created_at?: string;
3038
- description: string;
3039
- evidence?: Json | null;
3040
- id?: string;
3041
- organization_id: string;
3042
- project_id?: string | null;
3043
- reported_at?: string;
3044
- reporter_id?: string | null;
3045
- resolved_at?: string | null;
3046
- severity: string;
3047
- source: string;
3048
- status?: string;
3049
- task_id?: string | null;
3050
- title: string;
3051
- type: string;
3052
- updated_at?: string;
3053
- };
3054
- Update: {
3055
- affected_page?: string | null;
3056
- category?: string;
3057
- context?: Json | null;
3058
- created_at?: string;
3059
- description?: string;
3060
- evidence?: Json | null;
3061
- id?: string;
3062
- organization_id?: string;
3063
- project_id?: string | null;
3064
- reported_at?: string;
3065
- reporter_id?: string | null;
3066
- resolved_at?: string | null;
3067
- severity?: string;
3068
- source?: string;
3069
- status?: string;
3070
- task_id?: string | null;
3071
- title?: string;
3072
- type?: string;
3073
- updated_at?: string;
3074
- };
3075
- Relationships: [
3076
- {
3077
- foreignKeyName: "reported_requests_organization_id_fkey";
3078
- columns: ["organization_id"];
3079
- isOneToOne: false;
3080
- referencedRelation: "organizations";
3081
- referencedColumns: ["id"];
3082
- },
3083
- {
3084
- foreignKeyName: "reported_requests_project_id_fkey";
3085
- columns: ["project_id"];
3086
- isOneToOne: false;
3087
- referencedRelation: "prj_projects";
3088
- referencedColumns: ["id"];
3089
- },
3090
- {
3091
- foreignKeyName: "reported_requests_task_id_fkey";
3092
- columns: ["task_id"];
3093
- isOneToOne: false;
3094
- referencedRelation: "prj_tasks";
3095
- referencedColumns: ["id"];
3096
- }
3097
- ];
3098
- };
3099
- session_messages: {
3100
- Row: {
3101
- created_at: string | null;
3102
- id: string;
3103
- message: string;
3104
- message_index: number | null;
3105
- message_type: string | null;
3106
- metadata: Json | null;
3107
- role: string;
3108
- session_id: string;
3109
- session_turn_number: number;
3110
- };
3111
- Insert: {
3112
- created_at?: string | null;
3113
- id: string;
3114
- message: string;
3115
- message_index?: number | null;
3116
- message_type?: string | null;
3117
- metadata?: Json | null;
3118
- role: string;
3119
- session_id: string;
3120
- session_turn_number: number;
3121
- };
3122
- Update: {
3123
- created_at?: string | null;
3124
- id?: string;
3125
- message?: string;
3126
- message_index?: number | null;
3127
- message_type?: string | null;
3128
- metadata?: Json | null;
3129
- role?: string;
3130
- session_id?: string;
3131
- session_turn_number?: number;
3132
- };
3133
- Relationships: [
3134
- {
3135
- foreignKeyName: "session_messages_session_id_fkey";
3136
- columns: ["session_id"];
3137
- isOneToOne: false;
3138
- referencedRelation: "sessions";
3139
- referencedColumns: ["session_id"];
3140
- }
3141
- ];
3142
- };
3143
- sessions: {
3144
- Row: {
3145
- context_window_size: number;
3146
- created_at: string | null;
3147
- cumulative_input_tokens: number;
3148
- cumulative_output_tokens: number;
3149
- deleted_at: string | null;
3150
- ended_at: string | null;
3151
- memory_snapshot: Json;
3152
- memory_version: number;
3153
- metadata: Json | null;
3154
- organization_id: string;
3155
- resource_id: string;
3156
- session_id: string;
3157
- session_total_turns: number | null;
3158
- updated_at: string | null;
3159
- user_id: string | null;
3160
- };
3161
- Insert: {
3162
- context_window_size?: number;
3163
- created_at?: string | null;
3164
- cumulative_input_tokens?: number;
3165
- cumulative_output_tokens?: number;
3166
- deleted_at?: string | null;
3167
- ended_at?: string | null;
3168
- memory_snapshot: Json;
3169
- memory_version?: number;
3170
- metadata?: Json | null;
3171
- organization_id: string;
3172
- resource_id: string;
3173
- session_id?: string;
3174
- session_total_turns?: number | null;
3175
- updated_at?: string | null;
3176
- user_id?: string | null;
3177
- };
3178
- Update: {
3179
- context_window_size?: number;
3180
- created_at?: string | null;
3181
- cumulative_input_tokens?: number;
3182
- cumulative_output_tokens?: number;
3183
- deleted_at?: string | null;
3184
- ended_at?: string | null;
3185
- memory_snapshot?: Json;
3186
- memory_version?: number;
3187
- metadata?: Json | null;
3188
- organization_id?: string;
3189
- resource_id?: string;
3190
- session_id?: string;
3191
- session_total_turns?: number | null;
3192
- updated_at?: string | null;
3193
- user_id?: string | null;
3194
- };
3195
- Relationships: [
3196
- {
3197
- foreignKeyName: "fk_organization";
3198
- columns: ["organization_id"];
3199
- isOneToOne: false;
3200
- referencedRelation: "organizations";
3201
- referencedColumns: ["id"];
3202
- },
3203
- {
3204
- foreignKeyName: "fk_user";
3205
- columns: ["user_id"];
3206
- isOneToOne: false;
3207
- referencedRelation: "users";
3208
- referencedColumns: ["id"];
3209
- }
3210
- ];
3211
- };
3212
- task_schedules: {
3213
- Row: {
3214
- created_at: string;
3215
- current_step: number;
3216
- description: string | null;
3217
- id: string;
3218
- idempotency_key: string | null;
3219
- last_execution_id: string | null;
3220
- last_run_at: string | null;
3221
- max_retries: number;
3222
- metadata: Json | null;
3223
- name: string;
3224
- next_run_at: string | null;
3225
- organization_id: string;
3226
- origin_execution_id: string | null;
3227
- origin_resource_id: string | null;
3228
- origin_resource_type: string | null;
3229
- retry_count: number;
3230
- schedule_config: Json;
3231
- status: string;
3232
- target_resource_id: string;
3233
- target_resource_type: string;
3234
- updated_at: string;
3235
- };
3236
- Insert: {
3237
- created_at?: string;
3238
- current_step?: number;
3239
- description?: string | null;
3240
- id?: string;
3241
- idempotency_key?: string | null;
3242
- last_execution_id?: string | null;
3243
- last_run_at?: string | null;
3244
- max_retries?: number;
3245
- metadata?: Json | null;
3246
- name: string;
3247
- next_run_at?: string | null;
3248
- organization_id: string;
3249
- origin_execution_id?: string | null;
3250
- origin_resource_id?: string | null;
3251
- origin_resource_type?: string | null;
3252
- retry_count?: number;
3253
- schedule_config: Json;
3254
- status?: string;
3255
- target_resource_id: string;
3256
- target_resource_type: string;
3257
- updated_at?: string;
3258
- };
3259
- Update: {
3260
- created_at?: string;
3261
- current_step?: number;
3262
- description?: string | null;
3263
- id?: string;
3264
- idempotency_key?: string | null;
3265
- last_execution_id?: string | null;
3266
- last_run_at?: string | null;
3267
- max_retries?: number;
3268
- metadata?: Json | null;
3269
- name?: string;
3270
- next_run_at?: string | null;
3271
- organization_id?: string;
3272
- origin_execution_id?: string | null;
3273
- origin_resource_id?: string | null;
3274
- origin_resource_type?: string | null;
3275
- retry_count?: number;
3276
- schedule_config?: Json;
3277
- status?: string;
3278
- target_resource_id?: string;
3279
- target_resource_type?: string;
3280
- updated_at?: string;
3281
- };
3282
- Relationships: [
3283
- {
3284
- foreignKeyName: "task_schedules_organization_id_fkey";
3285
- columns: ["organization_id"];
3286
- isOneToOne: false;
3287
- referencedRelation: "organizations";
3288
- referencedColumns: ["id"];
3289
- }
3290
- ];
3291
- };
3292
- user_notes: {
3293
- Row: {
3294
- content: string;
3295
- created_at: string;
3296
- created_by: string;
3297
- id: string;
3298
- metadata: Json;
3299
- organization_id: string | null;
3300
- pinned: boolean;
3301
- priority: string;
3302
- source: string | null;
3303
- title: string | null;
3304
- updated_at: string;
3305
- user_id: string;
3306
- visibility: string;
3307
- };
3308
- Insert: {
3309
- content: string;
3310
- created_at?: string;
3311
- created_by?: string;
3312
- id?: string;
3313
- metadata?: Json;
3314
- organization_id?: string | null;
3315
- pinned?: boolean;
3316
- priority?: string;
3317
- source?: string | null;
3318
- title?: string | null;
3319
- updated_at?: string;
3320
- user_id: string;
3321
- visibility?: string;
3322
- };
3323
- Update: {
3324
- content?: string;
3325
- created_at?: string;
3326
- created_by?: string;
3327
- id?: string;
3328
- metadata?: Json;
3329
- organization_id?: string | null;
3330
- pinned?: boolean;
3331
- priority?: string;
3332
- source?: string | null;
3333
- title?: string | null;
3334
- updated_at?: string;
3335
- user_id?: string;
3336
- visibility?: string;
3337
- };
3338
- Relationships: [
3339
- {
3340
- foreignKeyName: "user_notes_organization_id_fkey";
3341
- columns: ["organization_id"];
3342
- isOneToOne: false;
3343
- referencedRelation: "organizations";
3344
- referencedColumns: ["id"];
3345
- },
3346
- {
3347
- foreignKeyName: "user_notes_user_id_fkey";
3348
- columns: ["user_id"];
3349
- isOneToOne: false;
3350
- referencedRelation: "users";
3351
- referencedColumns: ["id"];
3352
- }
3353
- ];
3354
- };
3355
- users: {
3356
- Row: {
3357
- config: Json;
3358
- created_at: string;
3359
- display_name: string | null;
3360
- email: string;
3361
- first_name: string | null;
3362
- id: string;
3363
- is_active: boolean;
3364
- is_platform_admin: boolean | null;
3365
- last_login_at: string | null;
3366
- last_name: string | null;
3367
- last_visited_org: string | null;
3368
- profile_picture_url: string | null;
3369
- updated_at: string;
3370
- workos_user_id: string | null;
3371
- };
3372
- Insert: {
3373
- config?: Json;
3374
- created_at?: string;
3375
- display_name?: string | null;
3376
- email: string;
3377
- first_name?: string | null;
3378
- id?: string;
3379
- is_active?: boolean;
3380
- is_platform_admin?: boolean | null;
3381
- last_login_at?: string | null;
3382
- last_name?: string | null;
3383
- last_visited_org?: string | null;
3384
- profile_picture_url?: string | null;
3385
- updated_at?: string;
3386
- workos_user_id?: string | null;
3387
- };
3388
- Update: {
3389
- config?: Json;
3390
- created_at?: string;
3391
- display_name?: string | null;
3392
- email?: string;
3393
- first_name?: string | null;
3394
- id?: string;
3395
- is_active?: boolean;
3396
- is_platform_admin?: boolean | null;
3397
- last_login_at?: string | null;
3398
- last_name?: string | null;
3399
- last_visited_org?: string | null;
3400
- profile_picture_url?: string | null;
3401
- updated_at?: string;
3402
- workos_user_id?: string | null;
3403
- };
3404
- Relationships: [
3405
- {
3406
- foreignKeyName: "user_profiles_last_visited_org_fkey";
3407
- columns: ["last_visited_org"];
3408
- isOneToOne: false;
3409
- referencedRelation: "organizations";
3410
- referencedColumns: ["id"];
3411
- }
3412
- ];
3413
- };
3414
- webhook_endpoints: {
3415
- Row: {
3416
- created_at: string;
3417
- description: string | null;
3418
- id: string;
3419
- key_hash: string;
3420
- key_prefix: string | null;
3421
- last_triggered_at: string | null;
3422
- name: string;
3423
- organization_id: string;
3424
- request_count: number;
3425
- resource_id: string | null;
3426
- status: string;
3427
- updated_at: string;
3428
- };
3429
- Insert: {
3430
- created_at?: string;
3431
- description?: string | null;
3432
- id?: string;
3433
- key_hash: string;
3434
- key_prefix?: string | null;
3435
- last_triggered_at?: string | null;
3436
- name: string;
3437
- organization_id: string;
3438
- request_count?: number;
3439
- resource_id?: string | null;
3440
- status?: string;
3441
- updated_at?: string;
3442
- };
3443
- Update: {
3444
- created_at?: string;
3445
- description?: string | null;
3446
- id?: string;
3447
- key_hash?: string;
3448
- key_prefix?: string | null;
3449
- last_triggered_at?: string | null;
3450
- name?: string;
3451
- organization_id?: string;
3452
- request_count?: number;
3453
- resource_id?: string | null;
3454
- status?: string;
3455
- updated_at?: string;
3456
- };
3457
- Relationships: [
3458
- {
3459
- foreignKeyName: "webhook_endpoints_organization_id_fkey";
3460
- columns: ["organization_id"];
3461
- isOneToOne: false;
3462
- referencedRelation: "organizations";
3463
- referencedColumns: ["id"];
3464
- }
3465
- ];
3466
- };
3467
- };
3468
- Views: {
3469
- [_ in never]: never;
3470
- };
3471
- Functions: {
3472
- acq_default_checklist: {
3473
- Args: {
3474
- p_platform: string;
3475
- };
3476
- Returns: Json;
3477
- };
3478
- activate_deployment_atomic: {
3479
- Args: {
3480
- p_deployment_id: string;
3481
- p_organization_id: string;
3482
- };
3483
- Returns: {
3484
- created_at: string;
3485
- deployment_version: string | null;
3486
- error_message: string | null;
3487
- id: string;
3488
- organization_id: string;
3489
- pid: number | null;
3490
- port: number | null;
3491
- sdk_version: string;
3492
- status: string;
3493
- tarball_path: string | null;
3494
- updated_at: string;
3495
- };
3496
- };
3497
- append_deal_activity: {
3498
- Args: {
3499
- p_activity: Json;
3500
- p_deal_id: string;
3501
- p_organization_id: string;
3502
- };
3503
- Returns: undefined;
3504
- };
3505
- auth_jwt_claims: {
3506
- Args: Record<PropertyKey, never>;
3507
- Returns: Json;
3508
- };
3509
- auth_uid_safe: {
3510
- Args: Record<PropertyKey, never>;
3511
- Returns: string;
3512
- };
3513
- can_assign_role_in_org: {
3514
- Args: {
3515
- p_role_id: string;
3516
- p_target_membership_id: string;
3517
- };
3518
- Returns: boolean;
3519
- };
3520
- create_artifact_version: {
3521
- Args: {
3522
- p_content: Json;
3523
- p_created_by?: string;
3524
- p_kind: string;
3525
- p_organization_id: string;
3526
- p_owner_id?: string;
3527
- p_owner_kind: string;
3528
- p_pipeline_id?: string;
3529
- p_source_execution_id?: string;
3530
- };
3531
- Returns: {
3532
- content: Json;
3533
- created_at: string;
3534
- created_by: string | null;
3535
- id: string;
3536
- is_active: boolean;
3537
- kind: string;
3538
- organization_id: string;
3539
- owner_id: string | null;
3540
- owner_kind: string;
3541
- pipeline_id: string | null;
3542
- source_execution_id: string | null;
3543
- updated_at: string;
3544
- version: number;
3545
- };
3546
- };
3547
- current_user_is_platform_admin: {
3548
- Args: Record<PropertyKey, never>;
3549
- Returns: boolean;
3550
- };
3551
- current_user_shares_org_with: {
3552
- Args: {
3553
- other_user_id: string;
3554
- };
3555
- Returns: boolean;
3556
- };
3557
- current_user_supabase_id: {
3558
- Args: Record<PropertyKey, never>;
3559
- Returns: string;
3560
- };
3561
- execute_session_turn: {
3562
- Args: {
3563
- p_session_id: string;
3564
- };
3565
- Returns: {
3566
- context_window_size: number;
3567
- created_at: string;
3568
- cumulative_input_tokens: number;
3569
- cumulative_output_tokens: number;
3570
- deleted_at: string;
3571
- ended_at: string;
3572
- memory_snapshot: Json;
3573
- memory_version: number;
3574
- metadata: Json;
3575
- organization_id: string;
3576
- resource_id: string;
3577
- session_id: string;
3578
- session_total_turns: number;
3579
- updated_at: string;
3580
- user_id: string;
3581
- }[];
3582
- };
3583
- get_platform_credential_kek: {
3584
- Args: Record<PropertyKey, never>;
3585
- Returns: string;
3586
- };
3587
- get_storage_org_id: {
3588
- Args: {
3589
- file_path: string;
3590
- };
3591
- Returns: string;
3592
- };
3593
- get_workos_user_id: {
3594
- Args: Record<PropertyKey, never>;
3595
- Returns: string;
3596
- };
3597
- has_org_access: {
3598
- Args: {
3599
- action?: string;
3600
- org_id: string;
3601
- system_path: string;
3602
- } | {
3603
- action?: string;
3604
- system_path: string;
3605
- };
3606
- Returns: boolean;
3607
- };
3608
- has_org_permission: {
3609
- Args: {
3610
- org_id: string;
3611
- perm_key: string;
3612
- };
3613
- Returns: boolean;
3614
- };
3615
- increment_session_tokens: {
3616
- Args: {
3617
- p_input_tokens: number;
3618
- p_output_tokens: number;
3619
- p_session_id: string;
3620
- };
3621
- Returns: {
3622
- context_window_size: number;
3623
- cumulative_input_tokens: number;
3624
- cumulative_output_tokens: number;
3625
- }[];
3626
- };
3627
- is_org_member: {
3628
- Args: {
3629
- org_id: string;
3630
- };
3631
- Returns: boolean;
3632
- };
3633
- link_workos_membership_on_accept: {
3634
- Args: {
3635
- p_email: string;
3636
- p_organization_id: string;
3637
- p_workos_membership_id: string;
3638
- };
3639
- Returns: boolean;
3640
- };
3641
- pre_provision_invited_user: {
3642
- Args: {
3643
- p_email: string;
3644
- p_organization_id: string;
3645
- p_role_slug?: string;
3646
- };
3647
- Returns: Json;
3648
- };
3649
- process_due_schedules: {
3650
- Args: Record<PropertyKey, never>;
3651
- Returns: Json;
3652
- };
3653
- purge_stale_test_data: {
3654
- Args: {
3655
- p_max_age?: unknown;
3656
- };
3657
- Returns: Json;
3658
- };
3659
- recompute_all_memberships: {
3660
- Args: Record<PropertyKey, never>;
3661
- Returns: undefined;
3662
- };
3663
- repair_membership_role_assignments: {
3664
- Args: Record<PropertyKey, never>;
3665
- Returns: {
3666
- membership_id: string;
3667
- organization_id: string;
3668
- repaired: boolean;
3669
- role_id: string;
3670
- role_slug: string;
3671
- user_id: string;
3672
- }[];
3673
- };
3674
- sync_all_memberships_with_role: {
3675
- Args: {
3676
- p_role_id: string;
3677
- };
3678
- Returns: undefined;
3679
- };
3680
- sync_one_membership: {
3681
- Args: {
3682
- p_membership_id: string;
3683
- };
3684
- Returns: undefined;
3685
- };
3686
- update_membership_role_assignment: {
3687
- Args: {
3688
- p_role_slug: string;
3689
- p_workos_membership_id: string;
3690
- };
3691
- Returns: string;
3692
- };
3693
- upsert_user_profile: {
3694
- Args: Record<PropertyKey, never>;
3695
- Returns: {
3696
- profile_display_name: string;
3697
- profile_email: string;
3698
- profile_id: string;
3699
- profile_workos_user_id: string;
3700
- }[];
3701
- };
3702
- };
3703
- Enums: {
3704
- [_ in never]: never;
3705
- };
3706
- CompositeTypes: {
3707
- [_ in never]: never;
3708
- };
3709
- };
29
+ type SupabaseUserProfile = {
30
+ config: Json;
31
+ created_at: string;
32
+ display_name: string | null;
33
+ email: string;
34
+ first_name: string | null;
35
+ id: string;
36
+ is_active: boolean;
37
+ is_platform_admin: boolean | null;
38
+ last_login_at: string | null;
39
+ last_name: string | null;
40
+ last_visited_org: string | null;
41
+ profile_picture_url: string | null;
42
+ updated_at: string;
43
+ workos_user_id: string | null;
3710
44
  };
3711
- type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
3712
- type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
3713
- type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
3714
- schema: keyof DatabaseWithoutInternals;
3715
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
3716
- schema: keyof DatabaseWithoutInternals;
3717
- } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
3718
- schema: keyof DatabaseWithoutInternals;
3719
- } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3720
- Row: infer R;
3721
- } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
3722
- Row: infer R;
3723
- } ? R : never : never;
3724
-
3725
- type SupabaseUserProfile = Tables<'users'>;
3726
45
 
3727
46
  declare const AccessKeyInputSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
3728
47
  systemPath: z.ZodString;