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