@elevasis/ui 2.15.0 → 2.17.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 (78) hide show
  1. package/dist/api/index.js +3 -2
  2. package/dist/app/index.js +9 -7
  3. package/dist/auth/index.js +4 -3
  4. package/dist/charts/index.js +11 -10
  5. package/dist/{chunk-C7BX547M.js → chunk-2TDZBYXI.js} +9 -3
  6. package/dist/{chunk-5IBTTMWX.js → chunk-34NQLV2W.js} +2 -2
  7. package/dist/{chunk-FL67C3WY.js → chunk-6IA2OMAE.js} +1 -1
  8. package/dist/{chunk-L4XXM55J.js → chunk-7YQKVWSD.js} +1 -1
  9. package/dist/{chunk-XJ7KC54A.js → chunk-ABUDMATM.js} +7 -8
  10. package/dist/{chunk-TUXTSEAF.js → chunk-DK2HVHCY.js} +1 -1
  11. package/dist/{chunk-GHIPBT5V.js → chunk-E4WQGJNS.js} +1 -1
  12. package/dist/{chunk-5SXYCICG.js → chunk-FNWWVX5N.js} +8 -6
  13. package/dist/{chunk-IOKL7BKE.js → chunk-GCBWGGI6.js} +133 -1
  14. package/dist/chunk-GRGRBWIO.js +383 -0
  15. package/dist/{chunk-SLVC5OJ2.js → chunk-HQ7M6PBW.js} +1 -1
  16. package/dist/chunk-IRW7JMQ4.js +28 -0
  17. package/dist/{chunk-YNPVQDNB.js → chunk-JU6UB4YA.js} +4 -4
  18. package/dist/{chunk-SFW573HS.js → chunk-MDO4UCEJ.js} +4 -4
  19. package/dist/{chunk-STZJ7SY5.js → chunk-MJ6YV2B5.js} +3 -2
  20. package/dist/{chunk-D7HBX5US.js → chunk-MUZIYL5Q.js} +5 -4
  21. package/dist/{chunk-DKQQK3WX.js → chunk-OCCZRPER.js} +1 -1
  22. package/dist/{chunk-FFXHKADZ.js → chunk-OXWQQCDR.js} +13 -32
  23. package/dist/{chunk-ZB5GAV7J.js → chunk-P3TFNFZS.js} +6 -5
  24. package/dist/{chunk-QEPXAWE2.js → chunk-QHSW4WHM.js} +3 -26
  25. package/dist/{chunk-LXHZYSMQ.js → chunk-QSTH6T77.js} +2 -52
  26. package/dist/{chunk-U2RXVZGY.js → chunk-R7GKX4HW.js} +66 -461
  27. package/dist/{chunk-X75JEGHS.js → chunk-S6CYH4RI.js} +7 -6
  28. package/dist/{chunk-MTJ43R2E.js → chunk-SLH2QLKV.js} +1 -1
  29. package/dist/{chunk-32NXXCQU.js → chunk-TP5NMF6K.js} +6 -7
  30. package/dist/{chunk-SQQGLGHW.js → chunk-TTP62HWW.js} +3 -3
  31. package/dist/{chunk-NVOCKXUQ.js → chunk-VDM6DQES.js} +1 -1
  32. package/dist/chunk-ZTWA5H77.js +94 -0
  33. package/dist/components/index.d.ts +2640 -2640
  34. package/dist/components/index.js +38 -35
  35. package/dist/execution/index.js +2 -2
  36. package/dist/features/auth/index.js +5 -4
  37. package/dist/features/crm/index.d.ts +51 -51
  38. package/dist/features/crm/index.js +21 -19
  39. package/dist/features/dashboard/index.js +23 -21
  40. package/dist/features/delivery/index.d.ts +2604 -2604
  41. package/dist/features/delivery/index.js +21 -19
  42. package/dist/features/lead-gen/index.js +29 -26
  43. package/dist/features/monitoring/index.js +26 -24
  44. package/dist/features/monitoring/requests/index.d.ts +26 -26
  45. package/dist/features/monitoring/requests/index.js +21 -19
  46. package/dist/features/operations/index.d.ts +10 -10
  47. package/dist/features/operations/index.js +28 -25
  48. package/dist/features/seo/index.js +1 -1
  49. package/dist/features/settings/index.d.ts +34 -34
  50. package/dist/features/settings/index.js +22 -20
  51. package/dist/hooks/delivery/index.css +589 -0
  52. package/dist/hooks/delivery/index.d.ts +3044 -0
  53. package/dist/hooks/delivery/index.js +4 -0
  54. package/dist/hooks/index.d.ts +3103 -3120
  55. package/dist/hooks/index.js +20 -18
  56. package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +506 -0
  57. package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -0
  58. package/dist/hooks/published.d.ts +3103 -3120
  59. package/dist/hooks/published.js +20 -18
  60. package/dist/index.d.ts +3409 -3361
  61. package/dist/index.js +21 -19
  62. package/dist/initialization/index.js +4 -3
  63. package/dist/layout/index.js +3 -3
  64. package/dist/organization/index.js +4 -3
  65. package/dist/profile/index.js +2 -1
  66. package/dist/provider/ElevasisServiceContext.d.ts +54 -0
  67. package/dist/provider/ElevasisServiceContext.js +1 -0
  68. package/dist/provider/index.d.ts +244 -240
  69. package/dist/provider/index.js +17 -16
  70. package/dist/provider/published.d.ts +244 -240
  71. package/dist/provider/published.js +15 -14
  72. package/dist/types/index.d.ts +2349 -2332
  73. package/dist/utils/index.d.ts +73 -1
  74. package/dist/utils/index.js +2 -1
  75. package/dist/zustand/index.d.ts +7 -7
  76. package/package.json +3 -3
  77. package/dist/{chunk-4BF74JVD.js → chunk-6GUW5GGF.js} +1 -1
  78. package/dist/{chunk-ELJIFLCB.js → chunk-KRWALB24.js} +6 -6
@@ -0,0 +1,3044 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+
3
+ type Json$1 = string | number | boolean | null | {
4
+ [key: string]: Json$1 | undefined;
5
+ } | Json$1[];
6
+
7
+ type Json =
8
+ | string
9
+ | number
10
+ | boolean
11
+ | null
12
+ | { [key: string]: Json | undefined }
13
+ | Json[]
14
+
15
+ type Database = {
16
+ // Allows to automatically instantiate createClient with right options
17
+ // instead of createClient<Database, { PostgrestVersion: 'XX' }>(URL, KEY)
18
+ __InternalSupabase: {
19
+ PostgrestVersion: "12.2.3 (519615d)"
20
+ }
21
+ public: {
22
+ Tables: {
23
+ acq_companies: {
24
+ Row: {
25
+ batch_id: string | null
26
+ category: string | null
27
+ category_pain: string | null
28
+ created_at: string
29
+ domain: string | null
30
+ enrichment_data: Json | null
31
+ filter_reason: string | null
32
+ founded_year: number | null
33
+ id: string
34
+ linkedin_url: string | null
35
+ location_city: string | null
36
+ location_state: string | null
37
+ name: string
38
+ num_employees: number | null
39
+ organization_id: string
40
+ pipeline_status: Json
41
+ segment: string | null
42
+ source: string | null
43
+ status: string
44
+ updated_at: string
45
+ website: string | null
46
+ }
47
+ Insert: {
48
+ batch_id?: string | null
49
+ category?: string | null
50
+ category_pain?: string | null
51
+ created_at?: string
52
+ domain?: string | null
53
+ enrichment_data?: Json | null
54
+ filter_reason?: string | null
55
+ founded_year?: number | null
56
+ id?: string
57
+ linkedin_url?: string | null
58
+ location_city?: string | null
59
+ location_state?: string | null
60
+ name: string
61
+ num_employees?: number | null
62
+ organization_id: string
63
+ pipeline_status?: Json
64
+ segment?: string | null
65
+ source?: string | null
66
+ status?: string
67
+ updated_at?: string
68
+ website?: string | null
69
+ }
70
+ Update: {
71
+ batch_id?: string | null
72
+ category?: string | null
73
+ category_pain?: string | null
74
+ created_at?: string
75
+ domain?: string | null
76
+ enrichment_data?: Json | null
77
+ filter_reason?: string | null
78
+ founded_year?: number | null
79
+ id?: string
80
+ linkedin_url?: string | null
81
+ location_city?: string | null
82
+ location_state?: string | null
83
+ name?: string
84
+ num_employees?: number | null
85
+ organization_id?: string
86
+ pipeline_status?: Json
87
+ segment?: string | null
88
+ source?: string | null
89
+ status?: string
90
+ updated_at?: string
91
+ website?: string | null
92
+ }
93
+ Relationships: [
94
+ {
95
+ foreignKeyName: "acq_companies_organization_id_fkey"
96
+ columns: ["organization_id"]
97
+ isOneToOne: false
98
+ referencedRelation: "organizations"
99
+ referencedColumns: ["id"]
100
+ },
101
+ ]
102
+ }
103
+ acq_contacts: {
104
+ Row: {
105
+ batch_id: string | null
106
+ brochure_first_viewed_at: string | null
107
+ brochure_view_count: number
108
+ company_id: string | null
109
+ created_at: string
110
+ email: string
111
+ email_valid: string | null
112
+ enrichment_data: Json
113
+ filter_reason: string | null
114
+ first_name: string | null
115
+ headline: string | null
116
+ id: string
117
+ last_name: string | null
118
+ linkedin_url: string | null
119
+ nurture: boolean
120
+ opening_line: string | null
121
+ organization_id: string
122
+ pipeline_status: Json
123
+ source: string | null
124
+ source_id: string | null
125
+ status: string
126
+ title: string | null
127
+ updated_at: string
128
+ }
129
+ Insert: {
130
+ batch_id?: string | null
131
+ brochure_first_viewed_at?: string | null
132
+ brochure_view_count?: number
133
+ company_id?: string | null
134
+ created_at?: string
135
+ email: string
136
+ email_valid?: string | null
137
+ enrichment_data?: Json
138
+ filter_reason?: string | null
139
+ first_name?: string | null
140
+ headline?: string | null
141
+ id?: string
142
+ last_name?: string | null
143
+ linkedin_url?: string | null
144
+ nurture?: boolean
145
+ opening_line?: string | null
146
+ organization_id: string
147
+ pipeline_status?: Json
148
+ source?: string | null
149
+ source_id?: string | null
150
+ status?: string
151
+ title?: string | null
152
+ updated_at?: string
153
+ }
154
+ Update: {
155
+ batch_id?: string | null
156
+ brochure_first_viewed_at?: string | null
157
+ brochure_view_count?: number
158
+ company_id?: string | null
159
+ created_at?: string
160
+ email?: string
161
+ email_valid?: string | null
162
+ enrichment_data?: Json
163
+ filter_reason?: string | null
164
+ first_name?: string | null
165
+ headline?: string | null
166
+ id?: string
167
+ last_name?: string | null
168
+ linkedin_url?: string | null
169
+ nurture?: boolean
170
+ opening_line?: string | null
171
+ organization_id?: string
172
+ pipeline_status?: Json
173
+ source?: string | null
174
+ source_id?: string | null
175
+ status?: string
176
+ title?: string | null
177
+ updated_at?: string
178
+ }
179
+ Relationships: [
180
+ {
181
+ foreignKeyName: "acq_contacts_company_id_fkey"
182
+ columns: ["company_id"]
183
+ isOneToOne: false
184
+ referencedRelation: "acq_companies"
185
+ referencedColumns: ["id"]
186
+ },
187
+ {
188
+ foreignKeyName: "acq_contacts_organization_id_fkey"
189
+ columns: ["organization_id"]
190
+ isOneToOne: false
191
+ referencedRelation: "organizations"
192
+ referencedColumns: ["id"]
193
+ },
194
+ ]
195
+ }
196
+ acq_content: {
197
+ Row: {
198
+ body: string | null
199
+ created_at: string
200
+ id: string
201
+ organization_id: string
202
+ pillar: string
203
+ status: string
204
+ title: string
205
+ updated_at: string
206
+ }
207
+ Insert: {
208
+ body?: string | null
209
+ created_at?: string
210
+ id?: string
211
+ organization_id: string
212
+ pillar: string
213
+ status?: string
214
+ title: string
215
+ updated_at?: string
216
+ }
217
+ Update: {
218
+ body?: string | null
219
+ created_at?: string
220
+ id?: string
221
+ organization_id?: string
222
+ pillar?: string
223
+ status?: string
224
+ title?: string
225
+ updated_at?: string
226
+ }
227
+ Relationships: [
228
+ {
229
+ foreignKeyName: "acq_content_organization_id_fkey"
230
+ columns: ["organization_id"]
231
+ isOneToOne: false
232
+ referencedRelation: "organizations"
233
+ referencedColumns: ["id"]
234
+ },
235
+ ]
236
+ }
237
+ acq_content_distributions: {
238
+ Row: {
239
+ adapted_body: string | null
240
+ checklist: Json | null
241
+ content_id: string
242
+ created_at: string
243
+ format: string
244
+ id: string
245
+ media_urls: Json
246
+ metrics: Json
247
+ metrics_updated_at: string | null
248
+ organization_id: string
249
+ platform: string
250
+ platform_content: Json | null
251
+ platform_post_id: string | null
252
+ platform_url: string | null
253
+ published_at: string | null
254
+ status: string
255
+ updated_at: string
256
+ }
257
+ Insert: {
258
+ adapted_body?: string | null
259
+ checklist?: Json | null
260
+ content_id: string
261
+ created_at?: string
262
+ format: string
263
+ id?: string
264
+ media_urls?: Json
265
+ metrics?: Json
266
+ metrics_updated_at?: string | null
267
+ organization_id: string
268
+ platform: string
269
+ platform_content?: Json | null
270
+ platform_post_id?: string | null
271
+ platform_url?: string | null
272
+ published_at?: string | null
273
+ status?: string
274
+ updated_at?: string
275
+ }
276
+ Update: {
277
+ adapted_body?: string | null
278
+ checklist?: Json | null
279
+ content_id?: string
280
+ created_at?: string
281
+ format?: string
282
+ id?: string
283
+ media_urls?: Json
284
+ metrics?: Json
285
+ metrics_updated_at?: string | null
286
+ organization_id?: string
287
+ platform?: string
288
+ platform_content?: Json | null
289
+ platform_post_id?: string | null
290
+ platform_url?: string | null
291
+ published_at?: string | null
292
+ status?: string
293
+ updated_at?: string
294
+ }
295
+ Relationships: [
296
+ {
297
+ foreignKeyName: "acq_content_distributions_content_id_fkey"
298
+ columns: ["content_id"]
299
+ isOneToOne: false
300
+ referencedRelation: "acq_content"
301
+ referencedColumns: ["id"]
302
+ },
303
+ {
304
+ foreignKeyName: "acq_content_distributions_organization_id_fkey"
305
+ columns: ["organization_id"]
306
+ isOneToOne: false
307
+ referencedRelation: "organizations"
308
+ referencedColumns: ["id"]
309
+ },
310
+ ]
311
+ }
312
+ acq_deal_notes: {
313
+ Row: {
314
+ author_user_id: string | null
315
+ body: string
316
+ created_at: string
317
+ deal_id: string
318
+ id: string
319
+ organization_id: string
320
+ updated_at: string
321
+ }
322
+ Insert: {
323
+ author_user_id?: string | null
324
+ body: string
325
+ created_at?: string
326
+ deal_id: string
327
+ id?: string
328
+ organization_id: string
329
+ updated_at?: string
330
+ }
331
+ Update: {
332
+ author_user_id?: string | null
333
+ body?: string
334
+ created_at?: string
335
+ deal_id?: string
336
+ id?: string
337
+ organization_id?: string
338
+ updated_at?: string
339
+ }
340
+ Relationships: [
341
+ {
342
+ foreignKeyName: "acq_deal_notes_deal_id_fkey"
343
+ columns: ["deal_id"]
344
+ isOneToOne: false
345
+ referencedRelation: "acq_deals"
346
+ referencedColumns: ["id"]
347
+ },
348
+ {
349
+ foreignKeyName: "acq_deal_notes_organization_id_fkey"
350
+ columns: ["organization_id"]
351
+ isOneToOne: false
352
+ referencedRelation: "organizations"
353
+ referencedColumns: ["id"]
354
+ },
355
+ ]
356
+ }
357
+ acq_deal_tasks: {
358
+ Row: {
359
+ assignee_user_id: string | null
360
+ completed_at: string | null
361
+ completed_by_user_id: string | null
362
+ created_at: string
363
+ created_by_user_id: string | null
364
+ deal_id: string
365
+ description: string | null
366
+ due_at: string | null
367
+ id: string
368
+ kind: string
369
+ organization_id: string
370
+ title: string
371
+ updated_at: string
372
+ }
373
+ Insert: {
374
+ assignee_user_id?: string | null
375
+ completed_at?: string | null
376
+ completed_by_user_id?: string | null
377
+ created_at?: string
378
+ created_by_user_id?: string | null
379
+ deal_id: string
380
+ description?: string | null
381
+ due_at?: string | null
382
+ id?: string
383
+ kind?: string
384
+ organization_id: string
385
+ title: string
386
+ updated_at?: string
387
+ }
388
+ Update: {
389
+ assignee_user_id?: string | null
390
+ completed_at?: string | null
391
+ completed_by_user_id?: string | null
392
+ created_at?: string
393
+ created_by_user_id?: string | null
394
+ deal_id?: string
395
+ description?: string | null
396
+ due_at?: string | null
397
+ id?: string
398
+ kind?: string
399
+ organization_id?: string
400
+ title?: string
401
+ updated_at?: string
402
+ }
403
+ Relationships: [
404
+ {
405
+ foreignKeyName: "acq_deal_tasks_deal_id_fkey"
406
+ columns: ["deal_id"]
407
+ isOneToOne: false
408
+ referencedRelation: "acq_deals"
409
+ referencedColumns: ["id"]
410
+ },
411
+ {
412
+ foreignKeyName: "acq_deal_tasks_organization_id_fkey"
413
+ columns: ["organization_id"]
414
+ isOneToOne: false
415
+ referencedRelation: "organizations"
416
+ referencedColumns: ["id"]
417
+ },
418
+ ]
419
+ }
420
+ acq_deals: {
421
+ Row: {
422
+ activity_log: Json
423
+ cached_stage: string | null
424
+ closed_lost_at: string | null
425
+ closed_lost_reason: string | null
426
+ contact_email: string
427
+ contact_id: string | null
428
+ created_at: string
429
+ discovery_data: Json | null
430
+ discovery_submitted_at: string | null
431
+ discovery_submitted_by: string | null
432
+ id: string
433
+ initial_fee: number | null
434
+ monthly_fee: number | null
435
+ organization_id: string
436
+ payment_link_sent_at: string | null
437
+ payment_received_at: string | null
438
+ proposal_data: Json | null
439
+ proposal_generated_at: string | null
440
+ proposal_pdf_url: string | null
441
+ proposal_reviewed_at: string | null
442
+ proposal_reviewed_by: string | null
443
+ proposal_sent_at: string | null
444
+ proposal_signed_at: string | null
445
+ proposal_status: string | null
446
+ signature_envelope_id: string | null
447
+ source_list_id: string | null
448
+ source_type: string | null
449
+ stripe_payment_id: string | null
450
+ stripe_payment_link: string | null
451
+ stripe_payment_link_id: string | null
452
+ stripe_subscription_id: string | null
453
+ updated_at: string
454
+ }
455
+ Insert: {
456
+ activity_log?: Json
457
+ cached_stage?: string | null
458
+ closed_lost_at?: string | null
459
+ closed_lost_reason?: string | null
460
+ contact_email: string
461
+ contact_id?: string | null
462
+ created_at?: string
463
+ discovery_data?: Json | null
464
+ discovery_submitted_at?: string | null
465
+ discovery_submitted_by?: string | null
466
+ id?: string
467
+ initial_fee?: number | null
468
+ monthly_fee?: number | null
469
+ organization_id: string
470
+ payment_link_sent_at?: string | null
471
+ payment_received_at?: string | null
472
+ proposal_data?: Json | null
473
+ proposal_generated_at?: string | null
474
+ proposal_pdf_url?: string | null
475
+ proposal_reviewed_at?: string | null
476
+ proposal_reviewed_by?: string | null
477
+ proposal_sent_at?: string | null
478
+ proposal_signed_at?: string | null
479
+ proposal_status?: string | null
480
+ signature_envelope_id?: string | null
481
+ source_list_id?: string | null
482
+ source_type?: string | null
483
+ stripe_payment_id?: string | null
484
+ stripe_payment_link?: string | null
485
+ stripe_payment_link_id?: string | null
486
+ stripe_subscription_id?: string | null
487
+ updated_at?: string
488
+ }
489
+ Update: {
490
+ activity_log?: Json
491
+ cached_stage?: string | null
492
+ closed_lost_at?: string | null
493
+ closed_lost_reason?: string | null
494
+ contact_email?: string
495
+ contact_id?: string | null
496
+ created_at?: string
497
+ discovery_data?: Json | null
498
+ discovery_submitted_at?: string | null
499
+ discovery_submitted_by?: string | null
500
+ id?: string
501
+ initial_fee?: number | null
502
+ monthly_fee?: number | null
503
+ organization_id?: string
504
+ payment_link_sent_at?: string | null
505
+ payment_received_at?: string | null
506
+ proposal_data?: Json | null
507
+ proposal_generated_at?: string | null
508
+ proposal_pdf_url?: string | null
509
+ proposal_reviewed_at?: string | null
510
+ proposal_reviewed_by?: string | null
511
+ proposal_sent_at?: string | null
512
+ proposal_signed_at?: string | null
513
+ proposal_status?: string | null
514
+ signature_envelope_id?: string | null
515
+ source_list_id?: string | null
516
+ source_type?: string | null
517
+ stripe_payment_id?: string | null
518
+ stripe_payment_link?: string | null
519
+ stripe_payment_link_id?: string | null
520
+ stripe_subscription_id?: string | null
521
+ updated_at?: string
522
+ }
523
+ Relationships: [
524
+ {
525
+ foreignKeyName: "acq_deals_contact_id_fkey"
526
+ columns: ["contact_id"]
527
+ isOneToOne: false
528
+ referencedRelation: "acq_contacts"
529
+ referencedColumns: ["id"]
530
+ },
531
+ {
532
+ foreignKeyName: "acq_deals_organization_id_fkey"
533
+ columns: ["organization_id"]
534
+ isOneToOne: false
535
+ referencedRelation: "organizations"
536
+ referencedColumns: ["id"]
537
+ },
538
+ {
539
+ foreignKeyName: "acq_deals_source_list_id_fkey"
540
+ columns: ["source_list_id"]
541
+ isOneToOne: false
542
+ referencedRelation: "acq_lists"
543
+ referencedColumns: ["id"]
544
+ },
545
+ ]
546
+ }
547
+ acq_list_companies: {
548
+ Row: {
549
+ added_at: string
550
+ added_by: string | null
551
+ company_id: string
552
+ id: string
553
+ list_id: string
554
+ source_execution_id: string | null
555
+ source_input_hash: string | null
556
+ source_resource_id: string | null
557
+ stage: string | null
558
+ stage_updated_at: string | null
559
+ }
560
+ Insert: {
561
+ added_at?: string
562
+ added_by?: string | null
563
+ company_id: string
564
+ id?: string
565
+ list_id: string
566
+ source_execution_id?: string | null
567
+ source_input_hash?: string | null
568
+ source_resource_id?: string | null
569
+ stage?: string | null
570
+ stage_updated_at?: string | null
571
+ }
572
+ Update: {
573
+ added_at?: string
574
+ added_by?: string | null
575
+ company_id?: string
576
+ id?: string
577
+ list_id?: string
578
+ source_execution_id?: string | null
579
+ source_input_hash?: string | null
580
+ source_resource_id?: string | null
581
+ stage?: string | null
582
+ stage_updated_at?: string | null
583
+ }
584
+ Relationships: [
585
+ {
586
+ foreignKeyName: "acq_list_companies_company_id_fkey"
587
+ columns: ["company_id"]
588
+ isOneToOne: false
589
+ referencedRelation: "acq_companies"
590
+ referencedColumns: ["id"]
591
+ },
592
+ {
593
+ foreignKeyName: "acq_list_companies_list_id_fkey"
594
+ columns: ["list_id"]
595
+ isOneToOne: false
596
+ referencedRelation: "acq_lists"
597
+ referencedColumns: ["id"]
598
+ },
599
+ {
600
+ foreignKeyName: "acq_list_companies_source_execution_id_fkey"
601
+ columns: ["source_execution_id"]
602
+ isOneToOne: false
603
+ referencedRelation: "execution_logs"
604
+ referencedColumns: ["execution_id"]
605
+ },
606
+ ]
607
+ }
608
+ acq_list_executions: {
609
+ Row: {
610
+ created_at: string
611
+ execution_id: string
612
+ id: string
613
+ list_id: string
614
+ payload: Json
615
+ }
616
+ Insert: {
617
+ created_at?: string
618
+ execution_id: string
619
+ id?: string
620
+ list_id: string
621
+ payload?: Json
622
+ }
623
+ Update: {
624
+ created_at?: string
625
+ execution_id?: string
626
+ id?: string
627
+ list_id?: string
628
+ payload?: Json
629
+ }
630
+ Relationships: [
631
+ {
632
+ foreignKeyName: "acq_list_executions_execution_id_fkey"
633
+ columns: ["execution_id"]
634
+ isOneToOne: false
635
+ referencedRelation: "execution_logs"
636
+ referencedColumns: ["execution_id"]
637
+ },
638
+ {
639
+ foreignKeyName: "acq_list_executions_list_id_fkey"
640
+ columns: ["list_id"]
641
+ isOneToOne: false
642
+ referencedRelation: "acq_lists"
643
+ referencedColumns: ["id"]
644
+ },
645
+ ]
646
+ }
647
+ acq_list_members: {
648
+ Row: {
649
+ added_at: string
650
+ added_by: string | null
651
+ contact_id: string
652
+ id: string
653
+ list_id: string
654
+ source_execution_id: string | null
655
+ source_input_hash: string | null
656
+ source_resource_id: string | null
657
+ stage: string | null
658
+ stage_updated_at: string | null
659
+ }
660
+ Insert: {
661
+ added_at?: string
662
+ added_by?: string | null
663
+ contact_id: string
664
+ id?: string
665
+ list_id: string
666
+ source_execution_id?: string | null
667
+ source_input_hash?: string | null
668
+ source_resource_id?: string | null
669
+ stage?: string | null
670
+ stage_updated_at?: string | null
671
+ }
672
+ Update: {
673
+ added_at?: string
674
+ added_by?: string | null
675
+ contact_id?: string
676
+ id?: string
677
+ list_id?: string
678
+ source_execution_id?: string | null
679
+ source_input_hash?: string | null
680
+ source_resource_id?: string | null
681
+ stage?: string | null
682
+ stage_updated_at?: string | null
683
+ }
684
+ Relationships: [
685
+ {
686
+ foreignKeyName: "acq_list_members_contact_id_fkey"
687
+ columns: ["contact_id"]
688
+ isOneToOne: false
689
+ referencedRelation: "acq_contacts"
690
+ referencedColumns: ["id"]
691
+ },
692
+ {
693
+ foreignKeyName: "acq_list_members_list_id_fkey"
694
+ columns: ["list_id"]
695
+ isOneToOne: false
696
+ referencedRelation: "acq_lists"
697
+ referencedColumns: ["id"]
698
+ },
699
+ {
700
+ foreignKeyName: "acq_list_members_source_execution_id_fkey"
701
+ columns: ["source_execution_id"]
702
+ isOneToOne: false
703
+ referencedRelation: "execution_logs"
704
+ referencedColumns: ["execution_id"]
705
+ },
706
+ ]
707
+ }
708
+ acq_lists: {
709
+ Row: {
710
+ batch_ids: string[]
711
+ completed_at: string | null
712
+ config: Json
713
+ created_at: string
714
+ description: string | null
715
+ id: string
716
+ instantly_campaign_id: string | null
717
+ launched_at: string | null
718
+ metadata: Json
719
+ name: string
720
+ organization_id: string
721
+ status: string
722
+ type: string
723
+ }
724
+ Insert: {
725
+ batch_ids?: string[]
726
+ completed_at?: string | null
727
+ config?: Json
728
+ created_at?: string
729
+ description?: string | null
730
+ id?: string
731
+ instantly_campaign_id?: string | null
732
+ launched_at?: string | null
733
+ metadata?: Json
734
+ name: string
735
+ organization_id: string
736
+ status?: string
737
+ type?: string
738
+ }
739
+ Update: {
740
+ batch_ids?: string[]
741
+ completed_at?: string | null
742
+ config?: Json
743
+ created_at?: string
744
+ description?: string | null
745
+ id?: string
746
+ instantly_campaign_id?: string | null
747
+ launched_at?: string | null
748
+ metadata?: Json
749
+ name?: string
750
+ organization_id?: string
751
+ status?: string
752
+ type?: string
753
+ }
754
+ Relationships: [
755
+ {
756
+ foreignKeyName: "acq_lists_organization_id_fkey"
757
+ columns: ["organization_id"]
758
+ isOneToOne: false
759
+ referencedRelation: "organizations"
760
+ referencedColumns: ["id"]
761
+ },
762
+ ]
763
+ }
764
+ acq_seo_metrics: {
765
+ Row: {
766
+ ai_citations: Json | null
767
+ avg_position: number | null
768
+ clicks: number | null
769
+ created_at: string
770
+ cta_clicks: number | null
771
+ ctr: number | null
772
+ data_point_count: number | null
773
+ faq_count: number | null
774
+ form_submissions: number | null
775
+ id: string
776
+ impressions: number | null
777
+ organization_id: string
778
+ period: string
779
+ quality_score: number | null
780
+ readability: number | null
781
+ scroll_100: number | null
782
+ scroll_25: number | null
783
+ scroll_50: number | null
784
+ scroll_75: number | null
785
+ seo_page_id: string
786
+ word_count: number | null
787
+ }
788
+ Insert: {
789
+ ai_citations?: Json | null
790
+ avg_position?: number | null
791
+ clicks?: number | null
792
+ created_at?: string
793
+ cta_clicks?: number | null
794
+ ctr?: number | null
795
+ data_point_count?: number | null
796
+ faq_count?: number | null
797
+ form_submissions?: number | null
798
+ id?: string
799
+ impressions?: number | null
800
+ organization_id: string
801
+ period: string
802
+ quality_score?: number | null
803
+ readability?: number | null
804
+ scroll_100?: number | null
805
+ scroll_25?: number | null
806
+ scroll_50?: number | null
807
+ scroll_75?: number | null
808
+ seo_page_id: string
809
+ word_count?: number | null
810
+ }
811
+ Update: {
812
+ ai_citations?: Json | null
813
+ avg_position?: number | null
814
+ clicks?: number | null
815
+ created_at?: string
816
+ cta_clicks?: number | null
817
+ ctr?: number | null
818
+ data_point_count?: number | null
819
+ faq_count?: number | null
820
+ form_submissions?: number | null
821
+ id?: string
822
+ impressions?: number | null
823
+ organization_id?: string
824
+ period?: string
825
+ quality_score?: number | null
826
+ readability?: number | null
827
+ scroll_100?: number | null
828
+ scroll_25?: number | null
829
+ scroll_50?: number | null
830
+ scroll_75?: number | null
831
+ seo_page_id?: string
832
+ word_count?: number | null
833
+ }
834
+ Relationships: [
835
+ {
836
+ foreignKeyName: "acq_seo_metrics_organization_id_fkey"
837
+ columns: ["organization_id"]
838
+ isOneToOne: false
839
+ referencedRelation: "organizations"
840
+ referencedColumns: ["id"]
841
+ },
842
+ {
843
+ foreignKeyName: "acq_seo_metrics_seo_page_id_fkey"
844
+ columns: ["seo_page_id"]
845
+ isOneToOne: false
846
+ referencedRelation: "acq_seo_pages"
847
+ referencedColumns: ["id"]
848
+ },
849
+ ]
850
+ }
851
+ acq_seo_pages: {
852
+ Row: {
853
+ city: string | null
854
+ content: Json | null
855
+ created_at: string
856
+ faq_items: Json | null
857
+ hero_image_url: string | null
858
+ id: string
859
+ internal_links: Json | null
860
+ local_data: Json | null
861
+ meta_description: string | null
862
+ organization_id: string
863
+ page_type: string
864
+ published_at: string | null
865
+ refreshed_at: string | null
866
+ schema_markup: Json | null
867
+ slug: string
868
+ state: string | null
869
+ status: string
870
+ title: string
871
+ updated_at: string
872
+ use_case: string | null
873
+ vertical: string
874
+ }
875
+ Insert: {
876
+ city?: string | null
877
+ content?: Json | null
878
+ created_at?: string
879
+ faq_items?: Json | null
880
+ hero_image_url?: string | null
881
+ id?: string
882
+ internal_links?: Json | null
883
+ local_data?: Json | null
884
+ meta_description?: string | null
885
+ organization_id: string
886
+ page_type: string
887
+ published_at?: string | null
888
+ refreshed_at?: string | null
889
+ schema_markup?: Json | null
890
+ slug: string
891
+ state?: string | null
892
+ status?: string
893
+ title: string
894
+ updated_at?: string
895
+ use_case?: string | null
896
+ vertical: string
897
+ }
898
+ Update: {
899
+ city?: string | null
900
+ content?: Json | null
901
+ created_at?: string
902
+ faq_items?: Json | null
903
+ hero_image_url?: string | null
904
+ id?: string
905
+ internal_links?: Json | null
906
+ local_data?: Json | null
907
+ meta_description?: string | null
908
+ organization_id?: string
909
+ page_type?: string
910
+ published_at?: string | null
911
+ refreshed_at?: string | null
912
+ schema_markup?: Json | null
913
+ slug?: string
914
+ state?: string | null
915
+ status?: string
916
+ title?: string
917
+ updated_at?: string
918
+ use_case?: string | null
919
+ vertical?: string
920
+ }
921
+ Relationships: [
922
+ {
923
+ foreignKeyName: "acq_seo_pages_organization_id_fkey"
924
+ columns: ["organization_id"]
925
+ isOneToOne: false
926
+ referencedRelation: "organizations"
927
+ referencedColumns: ["id"]
928
+ },
929
+ ]
930
+ }
931
+ acq_social_posts: {
932
+ Row: {
933
+ author_name: string
934
+ author_url: string | null
935
+ comments_count: number
936
+ created_at: string
937
+ discovered_at: string
938
+ engagement_count: number
939
+ feedback: string | null
940
+ final_response: string | null
941
+ fully_reviewed: boolean
942
+ id: string
943
+ initial_draft: string | null
944
+ matched_keywords: string[]
945
+ matched_query: string | null
946
+ metadata: Json
947
+ organization_id: string
948
+ platform: string
949
+ platform_post_id: string
950
+ post_text: string
951
+ post_title: string
952
+ post_url: string
953
+ posted_at: string
954
+ relevance_score: number
955
+ responded_at: string | null
956
+ reviewed_at: string | null
957
+ skip_reason: string | null
958
+ source_category: string | null
959
+ status: string
960
+ updated_at: string
961
+ }
962
+ Insert: {
963
+ author_name: string
964
+ author_url?: string | null
965
+ comments_count?: number
966
+ created_at?: string
967
+ discovered_at?: string
968
+ engagement_count?: number
969
+ feedback?: string | null
970
+ final_response?: string | null
971
+ fully_reviewed?: boolean
972
+ id?: string
973
+ initial_draft?: string | null
974
+ matched_keywords?: string[]
975
+ matched_query?: string | null
976
+ metadata?: Json
977
+ organization_id: string
978
+ platform: string
979
+ platform_post_id: string
980
+ post_text: string
981
+ post_title: string
982
+ post_url: string
983
+ posted_at: string
984
+ relevance_score?: number
985
+ responded_at?: string | null
986
+ reviewed_at?: string | null
987
+ skip_reason?: string | null
988
+ source_category?: string | null
989
+ status?: string
990
+ updated_at?: string
991
+ }
992
+ Update: {
993
+ author_name?: string
994
+ author_url?: string | null
995
+ comments_count?: number
996
+ created_at?: string
997
+ discovered_at?: string
998
+ engagement_count?: number
999
+ feedback?: string | null
1000
+ final_response?: string | null
1001
+ fully_reviewed?: boolean
1002
+ id?: string
1003
+ initial_draft?: string | null
1004
+ matched_keywords?: string[]
1005
+ matched_query?: string | null
1006
+ metadata?: Json
1007
+ organization_id?: string
1008
+ platform?: string
1009
+ platform_post_id?: string
1010
+ post_text?: string
1011
+ post_title?: string
1012
+ post_url?: string
1013
+ posted_at?: string
1014
+ relevance_score?: number
1015
+ responded_at?: string | null
1016
+ reviewed_at?: string | null
1017
+ skip_reason?: string | null
1018
+ source_category?: string | null
1019
+ status?: string
1020
+ updated_at?: string
1021
+ }
1022
+ Relationships: [
1023
+ {
1024
+ foreignKeyName: "acq_social_posts_organization_id_fkey"
1025
+ columns: ["organization_id"]
1026
+ isOneToOne: false
1027
+ referencedRelation: "organizations"
1028
+ referencedColumns: ["id"]
1029
+ },
1030
+ ]
1031
+ }
1032
+ activities: {
1033
+ Row: {
1034
+ activity_type: string
1035
+ actor_id: string | null
1036
+ actor_type: string | null
1037
+ created_at: string
1038
+ description: string | null
1039
+ entity_id: string
1040
+ entity_name: string | null
1041
+ entity_type: string
1042
+ id: string
1043
+ metadata: Json | null
1044
+ occurred_at: string
1045
+ organization_id: string
1046
+ status: string
1047
+ title: string
1048
+ }
1049
+ Insert: {
1050
+ activity_type: string
1051
+ actor_id?: string | null
1052
+ actor_type?: string | null
1053
+ created_at?: string
1054
+ description?: string | null
1055
+ entity_id: string
1056
+ entity_name?: string | null
1057
+ entity_type: string
1058
+ id?: string
1059
+ metadata?: Json | null
1060
+ occurred_at?: string
1061
+ organization_id: string
1062
+ status: string
1063
+ title: string
1064
+ }
1065
+ Update: {
1066
+ activity_type?: string
1067
+ actor_id?: string | null
1068
+ actor_type?: string | null
1069
+ created_at?: string
1070
+ description?: string | null
1071
+ entity_id?: string
1072
+ entity_name?: string | null
1073
+ entity_type?: string
1074
+ id?: string
1075
+ metadata?: Json | null
1076
+ occurred_at?: string
1077
+ organization_id?: string
1078
+ status?: string
1079
+ title?: string
1080
+ }
1081
+ Relationships: [
1082
+ {
1083
+ foreignKeyName: "activities_organization_id_fkey"
1084
+ columns: ["organization_id"]
1085
+ isOneToOne: false
1086
+ referencedRelation: "organizations"
1087
+ referencedColumns: ["id"]
1088
+ },
1089
+ ]
1090
+ }
1091
+ api_keys: {
1092
+ Row: {
1093
+ created_at: string | null
1094
+ id: string
1095
+ key_hash: string
1096
+ last_used_at: string | null
1097
+ name: string
1098
+ organization_id: string
1099
+ }
1100
+ Insert: {
1101
+ created_at?: string | null
1102
+ id?: string
1103
+ key_hash: string
1104
+ last_used_at?: string | null
1105
+ name: string
1106
+ organization_id: string
1107
+ }
1108
+ Update: {
1109
+ created_at?: string | null
1110
+ id?: string
1111
+ key_hash?: string
1112
+ last_used_at?: string | null
1113
+ name?: string
1114
+ organization_id?: string
1115
+ }
1116
+ Relationships: [
1117
+ {
1118
+ foreignKeyName: "api_keys_organization_id_fkey"
1119
+ columns: ["organization_id"]
1120
+ isOneToOne: false
1121
+ referencedRelation: "organizations"
1122
+ referencedColumns: ["id"]
1123
+ },
1124
+ ]
1125
+ }
1126
+ command_queue: {
1127
+ Row: {
1128
+ action_payload: Json | null
1129
+ actions: Json
1130
+ completed_at: string | null
1131
+ completed_by: string | null
1132
+ context: Json
1133
+ created_at: string
1134
+ description: string | null
1135
+ expires_at: string | null
1136
+ human_checkpoint: string | null
1137
+ id: string
1138
+ idempotency_key: string | null
1139
+ metadata: Json | null
1140
+ organization_id: string
1141
+ origin_execution_id: string
1142
+ origin_resource_id: string
1143
+ origin_resource_type: string
1144
+ priority: number
1145
+ selected_action: string | null
1146
+ status: string
1147
+ target_execution_id: string | null
1148
+ target_resource_id: string | null
1149
+ target_resource_type: string | null
1150
+ }
1151
+ Insert: {
1152
+ action_payload?: Json | null
1153
+ actions: Json
1154
+ completed_at?: string | null
1155
+ completed_by?: string | null
1156
+ context: Json
1157
+ created_at?: string
1158
+ description?: string | null
1159
+ expires_at?: string | null
1160
+ human_checkpoint?: string | null
1161
+ id?: string
1162
+ idempotency_key?: string | null
1163
+ metadata?: Json | null
1164
+ organization_id: string
1165
+ origin_execution_id: string
1166
+ origin_resource_id: string
1167
+ origin_resource_type: string
1168
+ priority?: number
1169
+ selected_action?: string | null
1170
+ status?: string
1171
+ target_execution_id?: string | null
1172
+ target_resource_id?: string | null
1173
+ target_resource_type?: string | null
1174
+ }
1175
+ Update: {
1176
+ action_payload?: Json | null
1177
+ actions?: Json
1178
+ completed_at?: string | null
1179
+ completed_by?: string | null
1180
+ context?: Json
1181
+ created_at?: string
1182
+ description?: string | null
1183
+ expires_at?: string | null
1184
+ human_checkpoint?: string | null
1185
+ id?: string
1186
+ idempotency_key?: string | null
1187
+ metadata?: Json | null
1188
+ organization_id?: string
1189
+ origin_execution_id?: string
1190
+ origin_resource_id?: string
1191
+ origin_resource_type?: string
1192
+ priority?: number
1193
+ selected_action?: string | null
1194
+ status?: string
1195
+ target_execution_id?: string | null
1196
+ target_resource_id?: string | null
1197
+ target_resource_type?: string | null
1198
+ }
1199
+ Relationships: [
1200
+ {
1201
+ foreignKeyName: "command_queue_completed_by_fkey"
1202
+ columns: ["completed_by"]
1203
+ isOneToOne: false
1204
+ referencedRelation: "users"
1205
+ referencedColumns: ["id"]
1206
+ },
1207
+ {
1208
+ foreignKeyName: "command_queue_organization_id_fkey"
1209
+ columns: ["organization_id"]
1210
+ isOneToOne: false
1211
+ referencedRelation: "organizations"
1212
+ referencedColumns: ["id"]
1213
+ },
1214
+ {
1215
+ foreignKeyName: "command_queue_target_execution_id_fkey"
1216
+ columns: ["target_execution_id"]
1217
+ isOneToOne: false
1218
+ referencedRelation: "execution_logs"
1219
+ referencedColumns: ["execution_id"]
1220
+ },
1221
+ ]
1222
+ }
1223
+ credentials: {
1224
+ Row: {
1225
+ created_at: string
1226
+ created_by: string | null
1227
+ encrypted_value: string
1228
+ id: string
1229
+ name: string
1230
+ organization_id: string
1231
+ provider: string | null
1232
+ type: string
1233
+ updated_at: string
1234
+ }
1235
+ Insert: {
1236
+ created_at?: string
1237
+ created_by?: string | null
1238
+ encrypted_value: string
1239
+ id?: string
1240
+ name: string
1241
+ organization_id: string
1242
+ provider?: string | null
1243
+ type?: string
1244
+ updated_at?: string
1245
+ }
1246
+ Update: {
1247
+ created_at?: string
1248
+ created_by?: string | null
1249
+ encrypted_value?: string
1250
+ id?: string
1251
+ name?: string
1252
+ organization_id?: string
1253
+ provider?: string | null
1254
+ type?: string
1255
+ updated_at?: string
1256
+ }
1257
+ Relationships: [
1258
+ {
1259
+ foreignKeyName: "credentials_created_by_fkey"
1260
+ columns: ["created_by"]
1261
+ isOneToOne: false
1262
+ referencedRelation: "users"
1263
+ referencedColumns: ["id"]
1264
+ },
1265
+ {
1266
+ foreignKeyName: "credentials_organization_id_fkey"
1267
+ columns: ["organization_id"]
1268
+ isOneToOne: false
1269
+ referencedRelation: "organizations"
1270
+ referencedColumns: ["id"]
1271
+ },
1272
+ ]
1273
+ }
1274
+ deployments: {
1275
+ Row: {
1276
+ created_at: string
1277
+ deployment_version: string | null
1278
+ error_message: string | null
1279
+ id: string
1280
+ organization_id: string
1281
+ pid: number | null
1282
+ port: number | null
1283
+ sdk_version: string
1284
+ status: string
1285
+ tarball_path: string | null
1286
+ updated_at: string
1287
+ }
1288
+ Insert: {
1289
+ created_at?: string
1290
+ deployment_version?: string | null
1291
+ error_message?: string | null
1292
+ id?: string
1293
+ organization_id: string
1294
+ pid?: number | null
1295
+ port?: number | null
1296
+ sdk_version: string
1297
+ status?: string
1298
+ tarball_path?: string | null
1299
+ updated_at?: string
1300
+ }
1301
+ Update: {
1302
+ created_at?: string
1303
+ deployment_version?: string | null
1304
+ error_message?: string | null
1305
+ id?: string
1306
+ organization_id?: string
1307
+ pid?: number | null
1308
+ port?: number | null
1309
+ sdk_version?: string
1310
+ status?: string
1311
+ tarball_path?: string | null
1312
+ updated_at?: string
1313
+ }
1314
+ Relationships: [
1315
+ {
1316
+ foreignKeyName: "deployments_organization_id_fkey"
1317
+ columns: ["organization_id"]
1318
+ isOneToOne: false
1319
+ referencedRelation: "organizations"
1320
+ referencedColumns: ["id"]
1321
+ },
1322
+ ]
1323
+ }
1324
+ execution_errors: {
1325
+ Row: {
1326
+ created_at: string | null
1327
+ error_category: string
1328
+ error_message: string
1329
+ error_severity: string
1330
+ error_stack_trace: string | null
1331
+ error_type: string
1332
+ execution_id: string
1333
+ id: string
1334
+ metadata: Json | null
1335
+ occurred_at: string
1336
+ organization_id: string
1337
+ resolved: boolean
1338
+ resolved_at: string | null
1339
+ resolved_by: string | null
1340
+ }
1341
+ Insert: {
1342
+ created_at?: string | null
1343
+ error_category: string
1344
+ error_message: string
1345
+ error_severity: string
1346
+ error_stack_trace?: string | null
1347
+ error_type: string
1348
+ execution_id: string
1349
+ id?: string
1350
+ metadata?: Json | null
1351
+ occurred_at?: string
1352
+ organization_id: string
1353
+ resolved?: boolean
1354
+ resolved_at?: string | null
1355
+ resolved_by?: string | null
1356
+ }
1357
+ Update: {
1358
+ created_at?: string | null
1359
+ error_category?: string
1360
+ error_message?: string
1361
+ error_severity?: string
1362
+ error_stack_trace?: string | null
1363
+ error_type?: string
1364
+ execution_id?: string
1365
+ id?: string
1366
+ metadata?: Json | null
1367
+ occurred_at?: string
1368
+ organization_id?: string
1369
+ resolved?: boolean
1370
+ resolved_at?: string | null
1371
+ resolved_by?: string | null
1372
+ }
1373
+ Relationships: [
1374
+ {
1375
+ foreignKeyName: "execution_errors_execution_id_fkey"
1376
+ columns: ["execution_id"]
1377
+ isOneToOne: false
1378
+ referencedRelation: "execution_logs"
1379
+ referencedColumns: ["execution_id"]
1380
+ },
1381
+ {
1382
+ foreignKeyName: "execution_errors_organization_id_fkey"
1383
+ columns: ["organization_id"]
1384
+ isOneToOne: false
1385
+ referencedRelation: "organizations"
1386
+ referencedColumns: ["id"]
1387
+ },
1388
+ {
1389
+ foreignKeyName: "execution_errors_resolved_by_fkey"
1390
+ columns: ["resolved_by"]
1391
+ isOneToOne: false
1392
+ referencedRelation: "users"
1393
+ referencedColumns: ["id"]
1394
+ },
1395
+ ]
1396
+ }
1397
+ execution_logs: {
1398
+ Row: {
1399
+ api_version: string | null
1400
+ completed_at: string | null
1401
+ created_at: string | null
1402
+ error: string | null
1403
+ execution_id: string
1404
+ input: Json | null
1405
+ last_heartbeat_at: string | null
1406
+ logs: Json | null
1407
+ organization_id: string
1408
+ origin_execution_id: string | null
1409
+ output: Json | null
1410
+ resource_id: string
1411
+ resource_status: string
1412
+ resource_type: string
1413
+ resource_version: string | null
1414
+ sdk_version: string | null
1415
+ session_id: string | null
1416
+ session_turn_number: number | null
1417
+ started_at: string
1418
+ status: string
1419
+ trigger_type: string | null
1420
+ updated_at: string | null
1421
+ user_id: string | null
1422
+ }
1423
+ Insert: {
1424
+ api_version?: string | null
1425
+ completed_at?: string | null
1426
+ created_at?: string | null
1427
+ error?: string | null
1428
+ execution_id?: string
1429
+ input?: Json | null
1430
+ last_heartbeat_at?: string | null
1431
+ logs?: Json | null
1432
+ organization_id: string
1433
+ origin_execution_id?: string | null
1434
+ output?: Json | null
1435
+ resource_id: string
1436
+ resource_status?: string
1437
+ resource_type?: string
1438
+ resource_version?: string | null
1439
+ sdk_version?: string | null
1440
+ session_id?: string | null
1441
+ session_turn_number?: number | null
1442
+ started_at?: string
1443
+ status: string
1444
+ trigger_type?: string | null
1445
+ updated_at?: string | null
1446
+ user_id?: string | null
1447
+ }
1448
+ Update: {
1449
+ api_version?: string | null
1450
+ completed_at?: string | null
1451
+ created_at?: string | null
1452
+ error?: string | null
1453
+ execution_id?: string
1454
+ input?: Json | null
1455
+ last_heartbeat_at?: string | null
1456
+ logs?: Json | null
1457
+ organization_id?: string
1458
+ origin_execution_id?: string | null
1459
+ output?: Json | null
1460
+ resource_id?: string
1461
+ resource_status?: string
1462
+ resource_type?: string
1463
+ resource_version?: string | null
1464
+ sdk_version?: string | null
1465
+ session_id?: string | null
1466
+ session_turn_number?: number | null
1467
+ started_at?: string
1468
+ status?: string
1469
+ trigger_type?: string | null
1470
+ updated_at?: string | null
1471
+ user_id?: string | null
1472
+ }
1473
+ Relationships: [
1474
+ {
1475
+ foreignKeyName: "execution_history_organization_id_fkey"
1476
+ columns: ["organization_id"]
1477
+ isOneToOne: false
1478
+ referencedRelation: "organizations"
1479
+ referencedColumns: ["id"]
1480
+ },
1481
+ {
1482
+ foreignKeyName: "execution_logs_origin_execution_id_fkey"
1483
+ columns: ["origin_execution_id"]
1484
+ isOneToOne: false
1485
+ referencedRelation: "execution_logs"
1486
+ referencedColumns: ["execution_id"]
1487
+ },
1488
+ {
1489
+ foreignKeyName: "execution_logs_session_id_fkey"
1490
+ columns: ["session_id"]
1491
+ isOneToOne: false
1492
+ referencedRelation: "sessions"
1493
+ referencedColumns: ["session_id"]
1494
+ },
1495
+ {
1496
+ foreignKeyName: "execution_logs_user_id_fkey"
1497
+ columns: ["user_id"]
1498
+ isOneToOne: false
1499
+ referencedRelation: "users"
1500
+ referencedColumns: ["id"]
1501
+ },
1502
+ ]
1503
+ }
1504
+ execution_metrics: {
1505
+ Row: {
1506
+ ai_call_count: number
1507
+ ai_calls: Json | null
1508
+ automation_savings_usd: number | null
1509
+ created_at: string | null
1510
+ duration_ms: number | null
1511
+ execution_id: string
1512
+ organization_id: string
1513
+ resource_id: string
1514
+ total_cost_usd: number
1515
+ total_input_tokens: number
1516
+ total_output_tokens: number
1517
+ }
1518
+ Insert: {
1519
+ ai_call_count: number
1520
+ ai_calls?: Json | null
1521
+ automation_savings_usd?: number | null
1522
+ created_at?: string | null
1523
+ duration_ms?: number | null
1524
+ execution_id: string
1525
+ organization_id: string
1526
+ resource_id: string
1527
+ total_cost_usd: number
1528
+ total_input_tokens: number
1529
+ total_output_tokens: number
1530
+ }
1531
+ Update: {
1532
+ ai_call_count?: number
1533
+ ai_calls?: Json | null
1534
+ automation_savings_usd?: number | null
1535
+ created_at?: string | null
1536
+ duration_ms?: number | null
1537
+ execution_id?: string
1538
+ organization_id?: string
1539
+ resource_id?: string
1540
+ total_cost_usd?: number
1541
+ total_input_tokens?: number
1542
+ total_output_tokens?: number
1543
+ }
1544
+ Relationships: [
1545
+ {
1546
+ foreignKeyName: "execution_metrics_execution_id_fkey"
1547
+ columns: ["execution_id"]
1548
+ isOneToOne: true
1549
+ referencedRelation: "execution_logs"
1550
+ referencedColumns: ["execution_id"]
1551
+ },
1552
+ {
1553
+ foreignKeyName: "execution_metrics_organization_id_fkey"
1554
+ columns: ["organization_id"]
1555
+ isOneToOne: false
1556
+ referencedRelation: "organizations"
1557
+ referencedColumns: ["id"]
1558
+ },
1559
+ ]
1560
+ }
1561
+ notifications: {
1562
+ Row: {
1563
+ action_url: string | null
1564
+ category: string
1565
+ created_at: string | null
1566
+ id: string
1567
+ message: string
1568
+ organization_id: string
1569
+ read: boolean | null
1570
+ read_at: string | null
1571
+ title: string
1572
+ user_id: string
1573
+ }
1574
+ Insert: {
1575
+ action_url?: string | null
1576
+ category: string
1577
+ created_at?: string | null
1578
+ id?: string
1579
+ message: string
1580
+ organization_id: string
1581
+ read?: boolean | null
1582
+ read_at?: string | null
1583
+ title: string
1584
+ user_id: string
1585
+ }
1586
+ Update: {
1587
+ action_url?: string | null
1588
+ category?: string
1589
+ created_at?: string | null
1590
+ id?: string
1591
+ message?: string
1592
+ organization_id?: string
1593
+ read?: boolean | null
1594
+ read_at?: string | null
1595
+ title?: string
1596
+ user_id?: string
1597
+ }
1598
+ Relationships: [
1599
+ {
1600
+ foreignKeyName: "notifications_organization_id_fkey"
1601
+ columns: ["organization_id"]
1602
+ isOneToOne: false
1603
+ referencedRelation: "organizations"
1604
+ referencedColumns: ["id"]
1605
+ },
1606
+ {
1607
+ foreignKeyName: "notifications_user_id_fkey"
1608
+ columns: ["user_id"]
1609
+ isOneToOne: false
1610
+ referencedRelation: "users"
1611
+ referencedColumns: ["id"]
1612
+ },
1613
+ ]
1614
+ }
1615
+ org_invitations: {
1616
+ Row: {
1617
+ accept_invitation_url: string | null
1618
+ accepted_at: string | null
1619
+ created_at: string | null
1620
+ email: string
1621
+ expires_at: string
1622
+ id: string
1623
+ invitation_state: string | null
1624
+ invitation_token: string | null
1625
+ inviter_user_id: string | null
1626
+ organization_id: string | null
1627
+ revoked_at: string | null
1628
+ role_slug: string | null
1629
+ updated_at: string | null
1630
+ workos_invitation_id: string
1631
+ }
1632
+ Insert: {
1633
+ accept_invitation_url?: string | null
1634
+ accepted_at?: string | null
1635
+ created_at?: string | null
1636
+ email: string
1637
+ expires_at: string
1638
+ id?: string
1639
+ invitation_state?: string | null
1640
+ invitation_token?: string | null
1641
+ inviter_user_id?: string | null
1642
+ organization_id?: string | null
1643
+ revoked_at?: string | null
1644
+ role_slug?: string | null
1645
+ updated_at?: string | null
1646
+ workos_invitation_id: string
1647
+ }
1648
+ Update: {
1649
+ accept_invitation_url?: string | null
1650
+ accepted_at?: string | null
1651
+ created_at?: string | null
1652
+ email?: string
1653
+ expires_at?: string
1654
+ id?: string
1655
+ invitation_state?: string | null
1656
+ invitation_token?: string | null
1657
+ inviter_user_id?: string | null
1658
+ organization_id?: string | null
1659
+ revoked_at?: string | null
1660
+ role_slug?: string | null
1661
+ updated_at?: string | null
1662
+ workos_invitation_id?: string
1663
+ }
1664
+ Relationships: [
1665
+ {
1666
+ foreignKeyName: "org_invitations_inviter_user_id_fkey"
1667
+ columns: ["inviter_user_id"]
1668
+ isOneToOne: false
1669
+ referencedRelation: "users"
1670
+ referencedColumns: ["id"]
1671
+ },
1672
+ {
1673
+ foreignKeyName: "org_invitations_organization_id_fkey"
1674
+ columns: ["organization_id"]
1675
+ isOneToOne: false
1676
+ referencedRelation: "organizations"
1677
+ referencedColumns: ["id"]
1678
+ },
1679
+ ]
1680
+ }
1681
+ org_memberships: {
1682
+ Row: {
1683
+ config: Json
1684
+ created_at: string | null
1685
+ id: string
1686
+ membership_status: string | null
1687
+ organization_id: string
1688
+ role_slug: string | null
1689
+ updated_at: string | null
1690
+ user_id: string
1691
+ workos_membership_id: string | null
1692
+ }
1693
+ Insert: {
1694
+ config?: Json
1695
+ created_at?: string | null
1696
+ id?: string
1697
+ membership_status?: string | null
1698
+ organization_id: string
1699
+ role_slug?: string | null
1700
+ updated_at?: string | null
1701
+ user_id: string
1702
+ workos_membership_id?: string | null
1703
+ }
1704
+ Update: {
1705
+ config?: Json
1706
+ created_at?: string | null
1707
+ id?: string
1708
+ membership_status?: string | null
1709
+ organization_id?: string
1710
+ role_slug?: string | null
1711
+ updated_at?: string | null
1712
+ user_id?: string
1713
+ workos_membership_id?: string | null
1714
+ }
1715
+ Relationships: [
1716
+ {
1717
+ foreignKeyName: "org_memberships_organization_id_fkey"
1718
+ columns: ["organization_id"]
1719
+ isOneToOne: false
1720
+ referencedRelation: "organizations"
1721
+ referencedColumns: ["id"]
1722
+ },
1723
+ {
1724
+ foreignKeyName: "org_memberships_user_id_fkey"
1725
+ columns: ["user_id"]
1726
+ isOneToOne: false
1727
+ referencedRelation: "users"
1728
+ referencedColumns: ["id"]
1729
+ },
1730
+ ]
1731
+ }
1732
+ organizations: {
1733
+ Row: {
1734
+ config: Json
1735
+ created_at: string
1736
+ id: string
1737
+ is_test: boolean
1738
+ metadata: Json
1739
+ name: string
1740
+ status: string
1741
+ updated_at: string
1742
+ workos_org_id: string
1743
+ }
1744
+ Insert: {
1745
+ config?: Json
1746
+ created_at?: string
1747
+ id?: string
1748
+ is_test?: boolean
1749
+ metadata?: Json
1750
+ name: string
1751
+ status?: string
1752
+ updated_at?: string
1753
+ workos_org_id: string
1754
+ }
1755
+ Update: {
1756
+ config?: Json
1757
+ created_at?: string
1758
+ id?: string
1759
+ is_test?: boolean
1760
+ metadata?: Json
1761
+ name?: string
1762
+ status?: string
1763
+ updated_at?: string
1764
+ workos_org_id?: string
1765
+ }
1766
+ Relationships: []
1767
+ }
1768
+ prj_milestones: {
1769
+ Row: {
1770
+ checklist: Json | null
1771
+ completed_at: string | null
1772
+ created_at: string
1773
+ description: string | null
1774
+ due_date: string | null
1775
+ id: string
1776
+ metadata: Json | null
1777
+ name: string
1778
+ organization_id: string
1779
+ project_id: string
1780
+ sequence: number
1781
+ status: string
1782
+ updated_at: string
1783
+ }
1784
+ Insert: {
1785
+ checklist?: Json | null
1786
+ completed_at?: string | null
1787
+ created_at?: string
1788
+ description?: string | null
1789
+ due_date?: string | null
1790
+ id?: string
1791
+ metadata?: Json | null
1792
+ name: string
1793
+ organization_id: string
1794
+ project_id: string
1795
+ sequence?: number
1796
+ status?: string
1797
+ updated_at?: string
1798
+ }
1799
+ Update: {
1800
+ checklist?: Json | null
1801
+ completed_at?: string | null
1802
+ created_at?: string
1803
+ description?: string | null
1804
+ due_date?: string | null
1805
+ id?: string
1806
+ metadata?: Json | null
1807
+ name?: string
1808
+ organization_id?: string
1809
+ project_id?: string
1810
+ sequence?: number
1811
+ status?: string
1812
+ updated_at?: string
1813
+ }
1814
+ Relationships: [
1815
+ {
1816
+ foreignKeyName: "fk_milestones_project"
1817
+ columns: ["project_id"]
1818
+ isOneToOne: false
1819
+ referencedRelation: "prj_projects"
1820
+ referencedColumns: ["id"]
1821
+ },
1822
+ {
1823
+ foreignKeyName: "prj_milestones_organization_id_fkey"
1824
+ columns: ["organization_id"]
1825
+ isOneToOne: false
1826
+ referencedRelation: "organizations"
1827
+ referencedColumns: ["id"]
1828
+ },
1829
+ {
1830
+ foreignKeyName: "prj_milestones_project_id_fkey"
1831
+ columns: ["project_id"]
1832
+ isOneToOne: false
1833
+ referencedRelation: "prj_projects"
1834
+ referencedColumns: ["id"]
1835
+ },
1836
+ ]
1837
+ }
1838
+ prj_notes: {
1839
+ Row: {
1840
+ content: string
1841
+ created_at: string
1842
+ created_by: string | null
1843
+ id: string
1844
+ metadata: Json | null
1845
+ milestone_id: string | null
1846
+ occurred_at: string
1847
+ organization_id: string
1848
+ project_id: string
1849
+ summary: string | null
1850
+ task_id: string | null
1851
+ type: string
1852
+ }
1853
+ Insert: {
1854
+ content: string
1855
+ created_at?: string
1856
+ created_by?: string | null
1857
+ id?: string
1858
+ metadata?: Json | null
1859
+ milestone_id?: string | null
1860
+ occurred_at?: string
1861
+ organization_id: string
1862
+ project_id: string
1863
+ summary?: string | null
1864
+ task_id?: string | null
1865
+ type?: string
1866
+ }
1867
+ Update: {
1868
+ content?: string
1869
+ created_at?: string
1870
+ created_by?: string | null
1871
+ id?: string
1872
+ metadata?: Json | null
1873
+ milestone_id?: string | null
1874
+ occurred_at?: string
1875
+ organization_id?: string
1876
+ project_id?: string
1877
+ summary?: string | null
1878
+ task_id?: string | null
1879
+ type?: string
1880
+ }
1881
+ Relationships: [
1882
+ {
1883
+ foreignKeyName: "fk_notes_created_by"
1884
+ columns: ["created_by"]
1885
+ isOneToOne: false
1886
+ referencedRelation: "users"
1887
+ referencedColumns: ["id"]
1888
+ },
1889
+ {
1890
+ foreignKeyName: "fk_notes_milestone"
1891
+ columns: ["milestone_id"]
1892
+ isOneToOne: false
1893
+ referencedRelation: "prj_milestones"
1894
+ referencedColumns: ["id"]
1895
+ },
1896
+ {
1897
+ foreignKeyName: "fk_notes_project"
1898
+ columns: ["project_id"]
1899
+ isOneToOne: false
1900
+ referencedRelation: "prj_projects"
1901
+ referencedColumns: ["id"]
1902
+ },
1903
+ {
1904
+ foreignKeyName: "fk_notes_task"
1905
+ columns: ["task_id"]
1906
+ isOneToOne: false
1907
+ referencedRelation: "prj_tasks"
1908
+ referencedColumns: ["id"]
1909
+ },
1910
+ {
1911
+ foreignKeyName: "prj_notes_created_by_fkey"
1912
+ columns: ["created_by"]
1913
+ isOneToOne: false
1914
+ referencedRelation: "users"
1915
+ referencedColumns: ["id"]
1916
+ },
1917
+ {
1918
+ foreignKeyName: "prj_notes_milestone_id_fkey"
1919
+ columns: ["milestone_id"]
1920
+ isOneToOne: false
1921
+ referencedRelation: "prj_milestones"
1922
+ referencedColumns: ["id"]
1923
+ },
1924
+ {
1925
+ foreignKeyName: "prj_notes_organization_id_fkey"
1926
+ columns: ["organization_id"]
1927
+ isOneToOne: false
1928
+ referencedRelation: "organizations"
1929
+ referencedColumns: ["id"]
1930
+ },
1931
+ {
1932
+ foreignKeyName: "prj_notes_project_id_fkey"
1933
+ columns: ["project_id"]
1934
+ isOneToOne: false
1935
+ referencedRelation: "prj_projects"
1936
+ referencedColumns: ["id"]
1937
+ },
1938
+ {
1939
+ foreignKeyName: "prj_notes_task_id_fkey"
1940
+ columns: ["task_id"]
1941
+ isOneToOne: false
1942
+ referencedRelation: "prj_tasks"
1943
+ referencedColumns: ["id"]
1944
+ },
1945
+ ]
1946
+ }
1947
+ prj_projects: {
1948
+ Row: {
1949
+ actual_end_date: string | null
1950
+ client_company_id: string | null
1951
+ contract_value: number | null
1952
+ created_at: string
1953
+ deal_id: string | null
1954
+ description: string | null
1955
+ id: string
1956
+ kind: string
1957
+ metadata: Json | null
1958
+ name: string
1959
+ organization_id: string
1960
+ start_date: string | null
1961
+ status: string
1962
+ target_end_date: string | null
1963
+ updated_at: string
1964
+ }
1965
+ Insert: {
1966
+ actual_end_date?: string | null
1967
+ client_company_id?: string | null
1968
+ contract_value?: number | null
1969
+ created_at?: string
1970
+ deal_id?: string | null
1971
+ description?: string | null
1972
+ id?: string
1973
+ kind?: string
1974
+ metadata?: Json | null
1975
+ name: string
1976
+ organization_id: string
1977
+ start_date?: string | null
1978
+ status?: string
1979
+ target_end_date?: string | null
1980
+ updated_at?: string
1981
+ }
1982
+ Update: {
1983
+ actual_end_date?: string | null
1984
+ client_company_id?: string | null
1985
+ contract_value?: number | null
1986
+ created_at?: string
1987
+ deal_id?: string | null
1988
+ description?: string | null
1989
+ id?: string
1990
+ kind?: string
1991
+ metadata?: Json | null
1992
+ name?: string
1993
+ organization_id?: string
1994
+ start_date?: string | null
1995
+ status?: string
1996
+ target_end_date?: string | null
1997
+ updated_at?: string
1998
+ }
1999
+ Relationships: [
2000
+ {
2001
+ foreignKeyName: "fk_projects_company"
2002
+ columns: ["client_company_id"]
2003
+ isOneToOne: false
2004
+ referencedRelation: "acq_companies"
2005
+ referencedColumns: ["id"]
2006
+ },
2007
+ {
2008
+ foreignKeyName: "fk_projects_deal"
2009
+ columns: ["deal_id"]
2010
+ isOneToOne: false
2011
+ referencedRelation: "acq_deals"
2012
+ referencedColumns: ["id"]
2013
+ },
2014
+ {
2015
+ foreignKeyName: "prj_projects_client_company_id_fkey"
2016
+ columns: ["client_company_id"]
2017
+ isOneToOne: false
2018
+ referencedRelation: "acq_companies"
2019
+ referencedColumns: ["id"]
2020
+ },
2021
+ {
2022
+ foreignKeyName: "prj_projects_deal_id_fkey"
2023
+ columns: ["deal_id"]
2024
+ isOneToOne: false
2025
+ referencedRelation: "acq_deals"
2026
+ referencedColumns: ["id"]
2027
+ },
2028
+ {
2029
+ foreignKeyName: "prj_projects_organization_id_fkey"
2030
+ columns: ["organization_id"]
2031
+ isOneToOne: false
2032
+ referencedRelation: "organizations"
2033
+ referencedColumns: ["id"]
2034
+ },
2035
+ ]
2036
+ }
2037
+ prj_tasks: {
2038
+ Row: {
2039
+ checklist: Json
2040
+ completed_at: string | null
2041
+ created_at: string
2042
+ description: string | null
2043
+ due_date: string | null
2044
+ file_url: string | null
2045
+ id: string
2046
+ metadata: Json | null
2047
+ milestone_id: string | null
2048
+ name: string
2049
+ organization_id: string
2050
+ parent_task_id: string | null
2051
+ project_id: string
2052
+ resume_context: Json | null
2053
+ status: string
2054
+ type: string
2055
+ updated_at: string
2056
+ }
2057
+ Insert: {
2058
+ checklist?: Json
2059
+ completed_at?: string | null
2060
+ created_at?: string
2061
+ description?: string | null
2062
+ due_date?: string | null
2063
+ file_url?: string | null
2064
+ id?: string
2065
+ metadata?: Json | null
2066
+ milestone_id?: string | null
2067
+ name: string
2068
+ organization_id: string
2069
+ parent_task_id?: string | null
2070
+ project_id: string
2071
+ resume_context?: Json | null
2072
+ status?: string
2073
+ type?: string
2074
+ updated_at?: string
2075
+ }
2076
+ Update: {
2077
+ checklist?: Json
2078
+ completed_at?: string | null
2079
+ created_at?: string
2080
+ description?: string | null
2081
+ due_date?: string | null
2082
+ file_url?: string | null
2083
+ id?: string
2084
+ metadata?: Json | null
2085
+ milestone_id?: string | null
2086
+ name?: string
2087
+ organization_id?: string
2088
+ parent_task_id?: string | null
2089
+ project_id?: string
2090
+ resume_context?: Json | null
2091
+ status?: string
2092
+ type?: string
2093
+ updated_at?: string
2094
+ }
2095
+ Relationships: [
2096
+ {
2097
+ foreignKeyName: "fk_tasks_milestone"
2098
+ columns: ["milestone_id"]
2099
+ isOneToOne: false
2100
+ referencedRelation: "prj_milestones"
2101
+ referencedColumns: ["id"]
2102
+ },
2103
+ {
2104
+ foreignKeyName: "fk_tasks_parent"
2105
+ columns: ["parent_task_id"]
2106
+ isOneToOne: false
2107
+ referencedRelation: "prj_tasks"
2108
+ referencedColumns: ["id"]
2109
+ },
2110
+ {
2111
+ foreignKeyName: "fk_tasks_project"
2112
+ columns: ["project_id"]
2113
+ isOneToOne: false
2114
+ referencedRelation: "prj_projects"
2115
+ referencedColumns: ["id"]
2116
+ },
2117
+ {
2118
+ foreignKeyName: "prj_tasks_milestone_id_fkey"
2119
+ columns: ["milestone_id"]
2120
+ isOneToOne: false
2121
+ referencedRelation: "prj_milestones"
2122
+ referencedColumns: ["id"]
2123
+ },
2124
+ {
2125
+ foreignKeyName: "prj_tasks_organization_id_fkey"
2126
+ columns: ["organization_id"]
2127
+ isOneToOne: false
2128
+ referencedRelation: "organizations"
2129
+ referencedColumns: ["id"]
2130
+ },
2131
+ {
2132
+ foreignKeyName: "prj_tasks_parent_task_id_fkey"
2133
+ columns: ["parent_task_id"]
2134
+ isOneToOne: false
2135
+ referencedRelation: "prj_tasks"
2136
+ referencedColumns: ["id"]
2137
+ },
2138
+ {
2139
+ foreignKeyName: "prj_tasks_project_id_fkey"
2140
+ columns: ["project_id"]
2141
+ isOneToOne: false
2142
+ referencedRelation: "prj_projects"
2143
+ referencedColumns: ["id"]
2144
+ },
2145
+ ]
2146
+ }
2147
+ reported_requests: {
2148
+ Row: {
2149
+ affected_page: string | null
2150
+ category: string
2151
+ context: Json | null
2152
+ created_at: string
2153
+ description: string
2154
+ evidence: Json | null
2155
+ id: string
2156
+ organization_id: string
2157
+ project_id: string | null
2158
+ reported_at: string
2159
+ reporter_id: string | null
2160
+ resolved_at: string | null
2161
+ severity: string
2162
+ source: string
2163
+ status: string
2164
+ task_id: string | null
2165
+ title: string
2166
+ type: string
2167
+ updated_at: string
2168
+ }
2169
+ Insert: {
2170
+ affected_page?: string | null
2171
+ category: string
2172
+ context?: Json | null
2173
+ created_at?: string
2174
+ description: string
2175
+ evidence?: Json | null
2176
+ id?: string
2177
+ organization_id: string
2178
+ project_id?: string | null
2179
+ reported_at?: string
2180
+ reporter_id?: string | null
2181
+ resolved_at?: string | null
2182
+ severity: string
2183
+ source: string
2184
+ status?: string
2185
+ task_id?: string | null
2186
+ title: string
2187
+ type: string
2188
+ updated_at?: string
2189
+ }
2190
+ Update: {
2191
+ affected_page?: string | null
2192
+ category?: string
2193
+ context?: Json | null
2194
+ created_at?: string
2195
+ description?: string
2196
+ evidence?: Json | null
2197
+ id?: string
2198
+ organization_id?: string
2199
+ project_id?: string | null
2200
+ reported_at?: string
2201
+ reporter_id?: string | null
2202
+ resolved_at?: string | null
2203
+ severity?: string
2204
+ source?: string
2205
+ status?: string
2206
+ task_id?: string | null
2207
+ title?: string
2208
+ type?: string
2209
+ updated_at?: string
2210
+ }
2211
+ Relationships: [
2212
+ {
2213
+ foreignKeyName: "reported_requests_organization_id_fkey"
2214
+ columns: ["organization_id"]
2215
+ isOneToOne: false
2216
+ referencedRelation: "organizations"
2217
+ referencedColumns: ["id"]
2218
+ },
2219
+ {
2220
+ foreignKeyName: "reported_requests_project_id_fkey"
2221
+ columns: ["project_id"]
2222
+ isOneToOne: false
2223
+ referencedRelation: "prj_projects"
2224
+ referencedColumns: ["id"]
2225
+ },
2226
+ {
2227
+ foreignKeyName: "reported_requests_task_id_fkey"
2228
+ columns: ["task_id"]
2229
+ isOneToOne: false
2230
+ referencedRelation: "prj_tasks"
2231
+ referencedColumns: ["id"]
2232
+ },
2233
+ ]
2234
+ }
2235
+ session_messages: {
2236
+ Row: {
2237
+ created_at: string | null
2238
+ id: string
2239
+ message: string
2240
+ message_index: number | null
2241
+ message_type: string | null
2242
+ metadata: Json | null
2243
+ role: string
2244
+ session_id: string
2245
+ session_turn_number: number
2246
+ }
2247
+ Insert: {
2248
+ created_at?: string | null
2249
+ id: string
2250
+ message: string
2251
+ message_index?: number | null
2252
+ message_type?: string | null
2253
+ metadata?: Json | null
2254
+ role: string
2255
+ session_id: string
2256
+ session_turn_number: number
2257
+ }
2258
+ Update: {
2259
+ created_at?: string | null
2260
+ id?: string
2261
+ message?: string
2262
+ message_index?: number | null
2263
+ message_type?: string | null
2264
+ metadata?: Json | null
2265
+ role?: string
2266
+ session_id?: string
2267
+ session_turn_number?: number
2268
+ }
2269
+ Relationships: [
2270
+ {
2271
+ foreignKeyName: "session_messages_session_id_fkey"
2272
+ columns: ["session_id"]
2273
+ isOneToOne: false
2274
+ referencedRelation: "sessions"
2275
+ referencedColumns: ["session_id"]
2276
+ },
2277
+ ]
2278
+ }
2279
+ sessions: {
2280
+ Row: {
2281
+ context_window_size: number
2282
+ created_at: string | null
2283
+ cumulative_input_tokens: number
2284
+ cumulative_output_tokens: number
2285
+ deleted_at: string | null
2286
+ ended_at: string | null
2287
+ memory_snapshot: Json
2288
+ metadata: Json | null
2289
+ organization_id: string
2290
+ resource_id: string
2291
+ session_id: string
2292
+ session_total_turns: number | null
2293
+ updated_at: string | null
2294
+ user_id: string | null
2295
+ }
2296
+ Insert: {
2297
+ context_window_size?: number
2298
+ created_at?: string | null
2299
+ cumulative_input_tokens?: number
2300
+ cumulative_output_tokens?: number
2301
+ deleted_at?: string | null
2302
+ ended_at?: string | null
2303
+ memory_snapshot: Json
2304
+ metadata?: Json | null
2305
+ organization_id: string
2306
+ resource_id: string
2307
+ session_id?: string
2308
+ session_total_turns?: number | null
2309
+ updated_at?: string | null
2310
+ user_id?: string | null
2311
+ }
2312
+ Update: {
2313
+ context_window_size?: number
2314
+ created_at?: string | null
2315
+ cumulative_input_tokens?: number
2316
+ cumulative_output_tokens?: number
2317
+ deleted_at?: string | null
2318
+ ended_at?: string | null
2319
+ memory_snapshot?: Json
2320
+ metadata?: Json | null
2321
+ organization_id?: string
2322
+ resource_id?: string
2323
+ session_id?: string
2324
+ session_total_turns?: number | null
2325
+ updated_at?: string | null
2326
+ user_id?: string | null
2327
+ }
2328
+ Relationships: [
2329
+ {
2330
+ foreignKeyName: "fk_organization"
2331
+ columns: ["organization_id"]
2332
+ isOneToOne: false
2333
+ referencedRelation: "organizations"
2334
+ referencedColumns: ["id"]
2335
+ },
2336
+ {
2337
+ foreignKeyName: "fk_user"
2338
+ columns: ["user_id"]
2339
+ isOneToOne: false
2340
+ referencedRelation: "users"
2341
+ referencedColumns: ["id"]
2342
+ },
2343
+ ]
2344
+ }
2345
+ task_schedules: {
2346
+ Row: {
2347
+ created_at: string
2348
+ current_step: number
2349
+ description: string | null
2350
+ id: string
2351
+ idempotency_key: string | null
2352
+ last_execution_id: string | null
2353
+ last_run_at: string | null
2354
+ max_retries: number
2355
+ metadata: Json | null
2356
+ name: string
2357
+ next_run_at: string | null
2358
+ organization_id: string
2359
+ origin_execution_id: string | null
2360
+ origin_resource_id: string | null
2361
+ origin_resource_type: string | null
2362
+ retry_count: number
2363
+ schedule_config: Json
2364
+ status: string
2365
+ target_resource_id: string
2366
+ target_resource_type: string
2367
+ updated_at: string
2368
+ }
2369
+ Insert: {
2370
+ created_at?: string
2371
+ current_step?: number
2372
+ description?: string | null
2373
+ id?: string
2374
+ idempotency_key?: string | null
2375
+ last_execution_id?: string | null
2376
+ last_run_at?: string | null
2377
+ max_retries?: number
2378
+ metadata?: Json | null
2379
+ name: string
2380
+ next_run_at?: string | null
2381
+ organization_id: string
2382
+ origin_execution_id?: string | null
2383
+ origin_resource_id?: string | null
2384
+ origin_resource_type?: string | null
2385
+ retry_count?: number
2386
+ schedule_config: Json
2387
+ status?: string
2388
+ target_resource_id: string
2389
+ target_resource_type: string
2390
+ updated_at?: string
2391
+ }
2392
+ Update: {
2393
+ created_at?: string
2394
+ current_step?: number
2395
+ description?: string | null
2396
+ id?: string
2397
+ idempotency_key?: string | null
2398
+ last_execution_id?: string | null
2399
+ last_run_at?: string | null
2400
+ max_retries?: number
2401
+ metadata?: Json | null
2402
+ name?: string
2403
+ next_run_at?: string | null
2404
+ organization_id?: string
2405
+ origin_execution_id?: string | null
2406
+ origin_resource_id?: string | null
2407
+ origin_resource_type?: string | null
2408
+ retry_count?: number
2409
+ schedule_config?: Json
2410
+ status?: string
2411
+ target_resource_id?: string
2412
+ target_resource_type?: string
2413
+ updated_at?: string
2414
+ }
2415
+ Relationships: [
2416
+ {
2417
+ foreignKeyName: "task_schedules_organization_id_fkey"
2418
+ columns: ["organization_id"]
2419
+ isOneToOne: false
2420
+ referencedRelation: "organizations"
2421
+ referencedColumns: ["id"]
2422
+ },
2423
+ ]
2424
+ }
2425
+ users: {
2426
+ Row: {
2427
+ config: Json
2428
+ created_at: string
2429
+ display_name: string | null
2430
+ email: string
2431
+ first_name: string | null
2432
+ id: string
2433
+ is_active: boolean
2434
+ is_platform_admin: boolean | null
2435
+ last_login_at: string | null
2436
+ last_name: string | null
2437
+ last_visited_org: string | null
2438
+ profile_picture_url: string | null
2439
+ updated_at: string
2440
+ workos_user_id: string | null
2441
+ }
2442
+ Insert: {
2443
+ config?: Json
2444
+ created_at?: string
2445
+ display_name?: string | null
2446
+ email: string
2447
+ first_name?: string | null
2448
+ id?: string
2449
+ is_active?: boolean
2450
+ is_platform_admin?: boolean | null
2451
+ last_login_at?: string | null
2452
+ last_name?: string | null
2453
+ last_visited_org?: string | null
2454
+ profile_picture_url?: string | null
2455
+ updated_at?: string
2456
+ workos_user_id?: string | null
2457
+ }
2458
+ Update: {
2459
+ config?: Json
2460
+ created_at?: string
2461
+ display_name?: string | null
2462
+ email?: string
2463
+ first_name?: string | null
2464
+ id?: string
2465
+ is_active?: boolean
2466
+ is_platform_admin?: boolean | null
2467
+ last_login_at?: string | null
2468
+ last_name?: string | null
2469
+ last_visited_org?: string | null
2470
+ profile_picture_url?: string | null
2471
+ updated_at?: string
2472
+ workos_user_id?: string | null
2473
+ }
2474
+ Relationships: [
2475
+ {
2476
+ foreignKeyName: "user_profiles_last_visited_org_fkey"
2477
+ columns: ["last_visited_org"]
2478
+ isOneToOne: false
2479
+ referencedRelation: "organizations"
2480
+ referencedColumns: ["id"]
2481
+ },
2482
+ ]
2483
+ }
2484
+ webhook_endpoints: {
2485
+ Row: {
2486
+ created_at: string
2487
+ description: string | null
2488
+ id: string
2489
+ key: string
2490
+ last_triggered_at: string | null
2491
+ name: string
2492
+ organization_id: string
2493
+ request_count: number
2494
+ resource_id: string | null
2495
+ status: string
2496
+ updated_at: string
2497
+ }
2498
+ Insert: {
2499
+ created_at?: string
2500
+ description?: string | null
2501
+ id?: string
2502
+ key: string
2503
+ last_triggered_at?: string | null
2504
+ name: string
2505
+ organization_id: string
2506
+ request_count?: number
2507
+ resource_id?: string | null
2508
+ status?: string
2509
+ updated_at?: string
2510
+ }
2511
+ Update: {
2512
+ created_at?: string
2513
+ description?: string | null
2514
+ id?: string
2515
+ key?: string
2516
+ last_triggered_at?: string | null
2517
+ name?: string
2518
+ organization_id?: string
2519
+ request_count?: number
2520
+ resource_id?: string | null
2521
+ status?: string
2522
+ updated_at?: string
2523
+ }
2524
+ Relationships: [
2525
+ {
2526
+ foreignKeyName: "webhook_endpoints_organization_id_fkey"
2527
+ columns: ["organization_id"]
2528
+ isOneToOne: false
2529
+ referencedRelation: "organizations"
2530
+ referencedColumns: ["id"]
2531
+ },
2532
+ ]
2533
+ }
2534
+ }
2535
+ Views: {
2536
+ [_ in never]: never
2537
+ }
2538
+ Functions: {
2539
+ acq_default_checklist: { Args: { p_platform: string }; Returns: Json }
2540
+ append_deal_activity: {
2541
+ Args: { p_activity: Json; p_deal_id: string; p_organization_id: string }
2542
+ Returns: undefined
2543
+ }
2544
+ auth_jwt_claims: { Args: never; Returns: Json }
2545
+ auth_uid_safe: { Args: never; Returns: string }
2546
+ current_user_is_platform_admin: { Args: never; Returns: boolean }
2547
+ current_user_supabase_id: { Args: never; Returns: string }
2548
+ detect_stalled_executions: { Args: never; Returns: undefined }
2549
+ execute_session_turn: {
2550
+ Args: { p_session_id: string }
2551
+ Returns: {
2552
+ created_at: string
2553
+ ended_at: string
2554
+ memory_snapshot: Json
2555
+ metadata: Json
2556
+ organization_id: string
2557
+ resource_id: string
2558
+ session_id: string
2559
+ session_total_turns: number
2560
+ updated_at: string
2561
+ user_id: string
2562
+ }[]
2563
+ }
2564
+ get_storage_org_id: { Args: { file_path: string }; Returns: string }
2565
+ get_workos_user_id: { Args: never; Returns: string }
2566
+ is_org_admin: { Args: { org_id: string }; Returns: boolean }
2567
+ is_org_member: { Args: { org_id: string }; Returns: boolean }
2568
+ link_workos_membership_on_accept: {
2569
+ Args: {
2570
+ p_email: string
2571
+ p_organization_id: string
2572
+ p_workos_membership_id: string
2573
+ }
2574
+ Returns: boolean
2575
+ }
2576
+ pre_provision_invited_user: {
2577
+ Args: {
2578
+ p_email: string
2579
+ p_organization_id: string
2580
+ p_role_slug?: string
2581
+ }
2582
+ Returns: Json
2583
+ }
2584
+ process_due_schedules: { Args: never; Returns: Json }
2585
+ upsert_user_profile: {
2586
+ Args: never
2587
+ Returns: {
2588
+ profile_display_name: string
2589
+ profile_email: string
2590
+ profile_id: string
2591
+ profile_workos_user_id: string
2592
+ }[]
2593
+ }
2594
+ }
2595
+ Enums: {
2596
+ [_ in never]: never
2597
+ }
2598
+ CompositeTypes: {
2599
+ [_ in never]: never
2600
+ }
2601
+ }
2602
+ }
2603
+
2604
+ // Row types from Supabase
2605
+ type ProjectRow = Database['public']['Tables']['prj_projects']['Row']
2606
+ type ProjectUpdate = Database['public']['Tables']['prj_projects']['Update']
2607
+
2608
+ type MilestoneRow = Database['public']['Tables']['prj_milestones']['Row']
2609
+ type MilestoneUpdate = Database['public']['Tables']['prj_milestones']['Update']
2610
+
2611
+ type TaskRow = Database['public']['Tables']['prj_tasks']['Row']
2612
+ type TaskUpdate = Database['public']['Tables']['prj_tasks']['Update']
2613
+
2614
+ // Status enums
2615
+ type ProjectStatus = 'active' | 'on_track' | 'at_risk' | 'blocked' | 'completed' | 'paused'
2616
+
2617
+ type ProjectKind = 'client_engagement' | 'internal' | 'research' | 'other'
2618
+
2619
+ type MilestoneStatus = 'upcoming' | 'in_progress' | 'completed' | 'overdue' | 'blocked'
2620
+
2621
+ type TaskStatus =
2622
+ | 'planned'
2623
+ | 'in_progress'
2624
+ | 'blocked'
2625
+ | 'completed'
2626
+ | 'cancelled'
2627
+ | 'submitted'
2628
+ | 'approved'
2629
+ | 'rejected'
2630
+ | 'revision_requested'
2631
+
2632
+ type TaskType = 'documentation' | 'code' | 'report' | 'design' | 'other'
2633
+
2634
+ type NoteType = 'call_note' | 'status_update' | 'issue' | 'blocker'
2635
+
2636
+ // Filter types
2637
+ interface ProjectFilters {
2638
+ status?: ProjectStatus
2639
+ kind?: ProjectKind
2640
+ companyId?: string
2641
+ search?: string
2642
+ }
2643
+
2644
+ interface MilestoneFilters {
2645
+ status?: MilestoneStatus
2646
+ projectId?: string
2647
+ }
2648
+
2649
+ interface TaskFilters {
2650
+ status?: TaskStatus
2651
+ type?: TaskType
2652
+ milestoneId?: string
2653
+ projectId?: string
2654
+ }
2655
+
2656
+ interface NoteFilters {
2657
+ type?: NoteType
2658
+ projectId?: string
2659
+ }
2660
+
2661
+ // Display types (for JOINed data)
2662
+ interface ProjectWithCounts extends ProjectRow {
2663
+ milestoneCount: number
2664
+ taskCount: number
2665
+ completedMilestones?: number
2666
+ completedTasks?: number
2667
+ }
2668
+
2669
+ interface ProjectDetail extends ProjectRow {
2670
+ milestones: MilestoneRow[]
2671
+ tasks: TaskRow[]
2672
+ company: { id: string; name: string; domain: string | null } | null
2673
+ }
2674
+
2675
+ declare const projectKeys: {
2676
+ all: readonly ["projects"];
2677
+ lists: () => readonly ["projects", "list"];
2678
+ list: (orgId: string | null, filters: ProjectFilters) => readonly ["projects", "list", string | null, ProjectFilters];
2679
+ details: () => readonly ["projects", "detail"];
2680
+ detail: (id: string) => readonly ["projects", "detail", string];
2681
+ milestones: (id: string) => readonly ["projects", string, "milestones"];
2682
+ tasks: (id: string) => readonly ["projects", string, "tasks"];
2683
+ };
2684
+ declare function useProjects(filters?: ProjectFilters): _tanstack_react_query.UseQueryResult<ProjectWithCounts[], Error>;
2685
+ declare function useProject(id: string): _tanstack_react_query.UseQueryResult<ProjectDetail | null, Error>;
2686
+ /**
2687
+ * Fetches milestones for a single project with a stable, project-scoped query key.
2688
+ *
2689
+ * Query key: ['projects', projectId, 'milestones']
2690
+ *
2691
+ * This key is distinct from the generic `useMilestones` key so that
2692
+ * `queryClient.invalidateQueries({ queryKey: projectKeys.milestones(projectId) })`
2693
+ * invalidates only this project's milestone list -- used by `useProjectRealtime`
2694
+ * to respond to `prj_milestones` Realtime events without forcing a full project refetch.
2695
+ */
2696
+ declare function useProjectMilestones(projectId: string): _tanstack_react_query.UseQueryResult<{
2697
+ checklist: Json$1 | null;
2698
+ completed_at: string | null;
2699
+ created_at: string;
2700
+ description: string | null;
2701
+ due_date: string | null;
2702
+ id: string;
2703
+ metadata: Json$1 | null;
2704
+ name: string;
2705
+ organization_id: string;
2706
+ project_id: string;
2707
+ sequence: number;
2708
+ status: string;
2709
+ updated_at: string;
2710
+ }[], Error>;
2711
+ /**
2712
+ * Fetches tasks for a single project with a stable, project-scoped query key.
2713
+ *
2714
+ * Query key: ['projects', projectId, 'tasks']
2715
+ *
2716
+ * This key is distinct from the generic `useTasks` key so that
2717
+ * `queryClient.invalidateQueries({ queryKey: projectKeys.tasks(projectId) })`
2718
+ * invalidates only this project's task list -- used by `useProjectRealtime`
2719
+ * to respond to `prj_tasks` Realtime events without forcing a full project refetch.
2720
+ */
2721
+ declare function useProjectTasks(projectId: string): _tanstack_react_query.UseQueryResult<{
2722
+ checklist: Json$1;
2723
+ completed_at: string | null;
2724
+ created_at: string;
2725
+ description: string | null;
2726
+ due_date: string | null;
2727
+ file_url: string | null;
2728
+ id: string;
2729
+ metadata: Json$1 | null;
2730
+ milestone_id: string | null;
2731
+ name: string;
2732
+ organization_id: string;
2733
+ parent_task_id: string | null;
2734
+ project_id: string;
2735
+ resume_context: Json$1 | null;
2736
+ status: string;
2737
+ type: string;
2738
+ updated_at: string;
2739
+ }[], Error>;
2740
+ declare function useCreateProject(): _tanstack_react_query.UseMutationResult<{
2741
+ actual_end_date: string | null;
2742
+ client_company_id: string | null;
2743
+ contract_value: number | null;
2744
+ created_at: string;
2745
+ deal_id: string | null;
2746
+ description: string | null;
2747
+ id: string;
2748
+ kind: string;
2749
+ metadata: Json$1 | null;
2750
+ name: string;
2751
+ organization_id: string;
2752
+ start_date: string | null;
2753
+ status: string;
2754
+ target_end_date: string | null;
2755
+ updated_at: string;
2756
+ }, Error, Omit<{
2757
+ actual_end_date?: string | null;
2758
+ client_company_id?: string | null;
2759
+ contract_value?: number | null;
2760
+ created_at?: string;
2761
+ deal_id?: string | null;
2762
+ description?: string | null;
2763
+ id?: string;
2764
+ kind?: string;
2765
+ metadata?: Json$1 | null;
2766
+ name: string;
2767
+ organization_id: string;
2768
+ start_date?: string | null;
2769
+ status?: string;
2770
+ target_end_date?: string | null;
2771
+ updated_at?: string;
2772
+ }, "organization_id">, unknown>;
2773
+ declare function useUpdateProject(): _tanstack_react_query.UseMutationResult<{
2774
+ actual_end_date: string | null;
2775
+ client_company_id: string | null;
2776
+ contract_value: number | null;
2777
+ created_at: string;
2778
+ deal_id: string | null;
2779
+ description: string | null;
2780
+ id: string;
2781
+ kind: string;
2782
+ metadata: Json$1 | null;
2783
+ name: string;
2784
+ organization_id: string;
2785
+ start_date: string | null;
2786
+ status: string;
2787
+ target_end_date: string | null;
2788
+ updated_at: string;
2789
+ }, Error, {
2790
+ id: string;
2791
+ updates: Omit<ProjectUpdate, "organization_id">;
2792
+ }, unknown>;
2793
+ declare function useDeleteProject(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
2794
+
2795
+ declare const milestoneKeys: {
2796
+ all: readonly ["project-milestones"];
2797
+ lists: () => readonly ["project-milestones", "list"];
2798
+ list: (orgId: string | null, filters: MilestoneFilters) => readonly ["project-milestones", "list", string | null, MilestoneFilters];
2799
+ details: () => readonly ["project-milestones", "detail"];
2800
+ detail: (id: string) => readonly ["project-milestones", "detail", string];
2801
+ };
2802
+ /**
2803
+ * Fetches milestones for a project.
2804
+ *
2805
+ * NOTE: The API only supports nested listing via GET /projects/:projectId/milestones.
2806
+ * There is no cross-project milestone endpoint. When filters.projectId is absent,
2807
+ * the query is disabled and returns undefined. Callers that previously relied on
2808
+ * cross-project querying (no projectId) will need to supply a projectId or migrate
2809
+ * to a different approach.
2810
+ *
2811
+ * NOTE: The filters.status field is not forwarded to the API (no querystring support
2812
+ * on the milestones list endpoint). Client-side filtering on the returned array is
2813
+ * required if status filtering is needed.
2814
+ */
2815
+ declare function useMilestones(filters?: MilestoneFilters): _tanstack_react_query.UseQueryResult<{
2816
+ checklist: Json$1 | null;
2817
+ completed_at: string | null;
2818
+ created_at: string;
2819
+ description: string | null;
2820
+ due_date: string | null;
2821
+ id: string;
2822
+ metadata: Json$1 | null;
2823
+ name: string;
2824
+ organization_id: string;
2825
+ project_id: string;
2826
+ sequence: number;
2827
+ status: string;
2828
+ updated_at: string;
2829
+ }[], Error>;
2830
+ declare function useCreateMilestone(): _tanstack_react_query.UseMutationResult<{
2831
+ checklist: Json$1 | null;
2832
+ completed_at: string | null;
2833
+ created_at: string;
2834
+ description: string | null;
2835
+ due_date: string | null;
2836
+ id: string;
2837
+ metadata: Json$1 | null;
2838
+ name: string;
2839
+ organization_id: string;
2840
+ project_id: string;
2841
+ sequence: number;
2842
+ status: string;
2843
+ updated_at: string;
2844
+ }, Error, Omit<{
2845
+ checklist?: Json$1 | null;
2846
+ completed_at?: string | null;
2847
+ created_at?: string;
2848
+ description?: string | null;
2849
+ due_date?: string | null;
2850
+ id?: string;
2851
+ metadata?: Json$1 | null;
2852
+ name: string;
2853
+ organization_id: string;
2854
+ project_id: string;
2855
+ sequence?: number;
2856
+ status?: string;
2857
+ updated_at?: string;
2858
+ }, "organization_id">, unknown>;
2859
+ declare function useUpdateMilestone(): _tanstack_react_query.UseMutationResult<{
2860
+ checklist: Json$1 | null;
2861
+ completed_at: string | null;
2862
+ created_at: string;
2863
+ description: string | null;
2864
+ due_date: string | null;
2865
+ id: string;
2866
+ metadata: Json$1 | null;
2867
+ name: string;
2868
+ organization_id: string;
2869
+ project_id: string;
2870
+ sequence: number;
2871
+ status: string;
2872
+ updated_at: string;
2873
+ }, Error, {
2874
+ id: string;
2875
+ updates: Omit<MilestoneUpdate, "organization_id">;
2876
+ }, unknown>;
2877
+ declare function useDeleteMilestone(): _tanstack_react_query.UseMutationResult<void, Error, {
2878
+ id: string;
2879
+ projectId: string;
2880
+ }, unknown>;
2881
+
2882
+ declare const taskKeys: {
2883
+ all: readonly ["project-tasks"];
2884
+ lists: () => readonly ["project-tasks", "list"];
2885
+ list: (orgId: string | null, filters: TaskFilters) => readonly ["project-tasks", "list", string | null, TaskFilters];
2886
+ details: () => readonly ["project-tasks", "detail"];
2887
+ detail: (id: string) => readonly ["project-tasks", "detail", string];
2888
+ };
2889
+ /**
2890
+ * Fetches tasks for a project.
2891
+ *
2892
+ * NOTE: The API only supports nested listing via GET /projects/:projectId/tasks.
2893
+ * There is no cross-project task endpoint. When filters.projectId is absent,
2894
+ * the query is disabled. Callers that previously relied on cross-project querying
2895
+ * will need to supply a projectId.
2896
+ *
2897
+ * NOTE: filters.type is not forwarded to the API (no querystring support on the
2898
+ * tasks list endpoint for type). Client-side filtering is required if needed.
2899
+ *
2900
+ * Supported API query params: status, milestoneId (mapped to milestone_id).
2901
+ */
2902
+ declare function useTasks(filters?: TaskFilters): _tanstack_react_query.UseQueryResult<{
2903
+ checklist: Json$1;
2904
+ completed_at: string | null;
2905
+ created_at: string;
2906
+ description: string | null;
2907
+ due_date: string | null;
2908
+ file_url: string | null;
2909
+ id: string;
2910
+ metadata: Json$1 | null;
2911
+ milestone_id: string | null;
2912
+ name: string;
2913
+ organization_id: string;
2914
+ parent_task_id: string | null;
2915
+ project_id: string;
2916
+ resume_context: Json$1 | null;
2917
+ status: string;
2918
+ type: string;
2919
+ updated_at: string;
2920
+ }[], Error>;
2921
+ declare function useCreateTask(): _tanstack_react_query.UseMutationResult<{
2922
+ checklist: Json$1;
2923
+ completed_at: string | null;
2924
+ created_at: string;
2925
+ description: string | null;
2926
+ due_date: string | null;
2927
+ file_url: string | null;
2928
+ id: string;
2929
+ metadata: Json$1 | null;
2930
+ milestone_id: string | null;
2931
+ name: string;
2932
+ organization_id: string;
2933
+ parent_task_id: string | null;
2934
+ project_id: string;
2935
+ resume_context: Json$1 | null;
2936
+ status: string;
2937
+ type: string;
2938
+ updated_at: string;
2939
+ }, Error, Omit<{
2940
+ checklist?: Json$1;
2941
+ completed_at?: string | null;
2942
+ created_at?: string;
2943
+ description?: string | null;
2944
+ due_date?: string | null;
2945
+ file_url?: string | null;
2946
+ id?: string;
2947
+ metadata?: Json$1 | null;
2948
+ milestone_id?: string | null;
2949
+ name: string;
2950
+ organization_id: string;
2951
+ parent_task_id?: string | null;
2952
+ project_id: string;
2953
+ resume_context?: Json$1 | null;
2954
+ status?: string;
2955
+ type?: string;
2956
+ updated_at?: string;
2957
+ }, "organization_id">, unknown>;
2958
+ declare function useUpdateTask(): _tanstack_react_query.UseMutationResult<{
2959
+ checklist: Json$1;
2960
+ completed_at: string | null;
2961
+ created_at: string;
2962
+ description: string | null;
2963
+ due_date: string | null;
2964
+ file_url: string | null;
2965
+ id: string;
2966
+ metadata: Json$1 | null;
2967
+ milestone_id: string | null;
2968
+ name: string;
2969
+ organization_id: string;
2970
+ parent_task_id: string | null;
2971
+ project_id: string;
2972
+ resume_context: Json$1 | null;
2973
+ status: string;
2974
+ type: string;
2975
+ updated_at: string;
2976
+ }, Error, {
2977
+ id: string;
2978
+ updates: Omit<TaskUpdate, "organization_id">;
2979
+ }, unknown>;
2980
+ declare function useDeleteTask(): _tanstack_react_query.UseMutationResult<void, Error, {
2981
+ id: string;
2982
+ projectId: string;
2983
+ }, unknown>;
2984
+
2985
+ declare const noteKeys: {
2986
+ all: readonly ["project-notes"];
2987
+ lists: () => readonly ["project-notes", "list"];
2988
+ list: (orgId: string | null, filters: NoteFilters) => readonly ["project-notes", "list", string | null, NoteFilters];
2989
+ details: () => readonly ["project-notes", "detail"];
2990
+ detail: (id: string) => readonly ["project-notes", "detail", string];
2991
+ };
2992
+ /**
2993
+ * Fetches notes for a project.
2994
+ *
2995
+ * NOTE: The API only supports nested listing via GET /projects/:projectId/notes.
2996
+ * There is no cross-project notes endpoint. When filters.projectId is absent,
2997
+ * the query is disabled.
2998
+ *
2999
+ * NOTE: filters.type is not forwarded to the API (the notes list endpoint has no
3000
+ * querystring schema for type filtering). Client-side filtering is required if needed.
3001
+ */
3002
+ declare function useProjectNotes(filters?: NoteFilters): _tanstack_react_query.UseQueryResult<{
3003
+ content: string;
3004
+ created_at: string;
3005
+ created_by: string | null;
3006
+ id: string;
3007
+ metadata: Json$1 | null;
3008
+ milestone_id: string | null;
3009
+ occurred_at: string;
3010
+ organization_id: string;
3011
+ project_id: string;
3012
+ summary: string | null;
3013
+ task_id: string | null;
3014
+ type: string;
3015
+ }[], Error>;
3016
+ declare function useCreateNote(): _tanstack_react_query.UseMutationResult<{
3017
+ content: string;
3018
+ created_at: string;
3019
+ created_by: string | null;
3020
+ id: string;
3021
+ metadata: Json$1 | null;
3022
+ milestone_id: string | null;
3023
+ occurred_at: string;
3024
+ organization_id: string;
3025
+ project_id: string;
3026
+ summary: string | null;
3027
+ task_id: string | null;
3028
+ type: string;
3029
+ }, Error, Omit<{
3030
+ content: string;
3031
+ created_at?: string;
3032
+ created_by?: string | null;
3033
+ id?: string;
3034
+ metadata?: Json$1 | null;
3035
+ milestone_id?: string | null;
3036
+ occurred_at?: string;
3037
+ organization_id: string;
3038
+ project_id: string;
3039
+ summary?: string | null;
3040
+ task_id?: string | null;
3041
+ type?: string;
3042
+ }, "organization_id">, unknown>;
3043
+
3044
+ export { milestoneKeys, noteKeys, projectKeys, taskKeys, useCreateMilestone, useCreateNote, useCreateProject, useCreateTask, useDeleteMilestone, useDeleteProject, useDeleteTask, useMilestones, useProject, useProjectMilestones, useProjectNotes, useProjectTasks, useProjects, useTasks, useUpdateMilestone, useUpdateProject, useUpdateTask };