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