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