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