@periskope/types 0.6.87 → 0.6.89

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.
package/supabase.types.ts CHANGED
@@ -1,1914 +1,2078 @@
1
- export type Json = { [key: string]: any } | any
1
+ export type Json = { [key: string]: any } | any
2
+
3
+ export type Database = {
4
+ graphql_public: {
5
+ Tables: {
6
+ [_ in never]: never
7
+ }
8
+ Views: {
9
+ [_ in never]: never
10
+ }
11
+ Functions: {
12
+ graphql: {
13
+ Args: {
14
+ operationName?: string
15
+ query?: string
16
+ variables?: Json
17
+ extensions?: Json
18
+ }
19
+ Returns: Json
20
+ }
21
+ }
22
+ Enums: {
23
+ [_ in never]: never
24
+ }
25
+ CompositeTypes: {
26
+ [_ in never]: never
27
+ }
28
+ }
29
+ public: {
30
+ Tables: {
31
+ tbl_broadcast_logs: {
32
+ Row: {
33
+ broadcast_id: string
34
+ chat_id: string
35
+ completed_at: string | null
36
+ created_at: string
37
+ delivered_count: number | null
38
+ delivery_info: Json | null
39
+ is_success: boolean | null
40
+ member_count: number | null
41
+ message_id: string | null
42
+ org_id: string
43
+ org_phone: string | null
44
+ read_count: number | null
45
+ }
46
+ Insert: {
47
+ broadcast_id: string
48
+ chat_id: string
49
+ completed_at?: string | null
50
+ created_at?: string
51
+ delivered_count?: number | null
52
+ delivery_info?: Json | null
53
+ is_success?: boolean | null
54
+ member_count?: number | null
55
+ message_id?: string | null
56
+ org_id: string
57
+ org_phone?: string | null
58
+ read_count?: number | null
59
+ }
60
+ Update: {
61
+ broadcast_id?: string
62
+ chat_id?: string
63
+ completed_at?: string | null
64
+ created_at?: string
65
+ delivered_count?: number | null
66
+ delivery_info?: Json | null
67
+ is_success?: boolean | null
68
+ member_count?: number | null
69
+ message_id?: string | null
70
+ org_id?: string
71
+ org_phone?: string | null
72
+ read_count?: number | null
73
+ }
74
+ Relationships: [
75
+ {
76
+ foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey"
77
+ columns: ["broadcast_id"]
78
+ isOneToOne: false
79
+ referencedRelation: "tbl_broadcast_messages"
80
+ referencedColumns: ["broadcast_id"]
81
+ },
82
+ {
83
+ foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey"
84
+ columns: ["broadcast_id"]
85
+ isOneToOne: false
86
+ referencedRelation: "view_broadcast_logs"
87
+ referencedColumns: ["broadcast_id"]
88
+ },
89
+ {
90
+ foreignKeyName: "tbl_broadcast_logs_org_id_fkey"
91
+ columns: ["org_id"]
92
+ isOneToOne: false
93
+ referencedRelation: "tbl_org"
94
+ referencedColumns: ["org_id"]
95
+ },
96
+ {
97
+ foreignKeyName: "tbl_broadcast_logs_org_id_fkey"
98
+ columns: ["org_id"]
99
+ isOneToOne: false
100
+ referencedRelation: "view_org"
101
+ referencedColumns: ["org_id"]
102
+ },
103
+ ]
104
+ }
105
+ tbl_broadcast_messages: {
106
+ Row: {
107
+ broadcast_id: string
108
+ broadcast_status: string | null
109
+ chat_ids: string[] | null
110
+ created_at: string
111
+ message_payload: Json | null
112
+ org_id: string
113
+ org_phone: string | null
114
+ performed_at: string | null
115
+ performed_by: string | null
116
+ scheduled_at: string | null
117
+ }
118
+ Insert: {
119
+ broadcast_id?: string
120
+ broadcast_status?: string | null
121
+ chat_ids?: string[] | null
122
+ created_at?: string
123
+ message_payload?: Json | null
124
+ org_id: string
125
+ org_phone?: string | null
126
+ performed_at?: string | null
127
+ performed_by?: string | null
128
+ scheduled_at?: string | null
129
+ }
130
+ Update: {
131
+ broadcast_id?: string
132
+ broadcast_status?: string | null
133
+ chat_ids?: string[] | null
134
+ created_at?: string
135
+ message_payload?: Json | null
136
+ org_id?: string
137
+ org_phone?: string | null
138
+ performed_at?: string | null
139
+ performed_by?: string | null
140
+ scheduled_at?: string | null
141
+ }
142
+ Relationships: [
143
+ {
144
+ foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
145
+ columns: ["org_id"]
146
+ isOneToOne: false
147
+ referencedRelation: "tbl_org"
148
+ referencedColumns: ["org_id"]
149
+ },
150
+ {
151
+ foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
152
+ columns: ["org_id"]
153
+ isOneToOne: false
154
+ referencedRelation: "view_org"
155
+ referencedColumns: ["org_id"]
156
+ },
157
+ ]
158
+ }
159
+ tbl_broadcast_templates: {
160
+ Row: {
161
+ created_at: string
162
+ message_payload: Json | null
163
+ org_id: string
164
+ template_id: string
165
+ template_name: string | null
166
+ updated_at: string | null
167
+ }
168
+ Insert: {
169
+ created_at?: string
170
+ message_payload?: Json | null
171
+ org_id: string
172
+ template_id?: string
173
+ template_name?: string | null
174
+ updated_at?: string | null
175
+ }
176
+ Update: {
177
+ created_at?: string
178
+ message_payload?: Json | null
179
+ org_id?: string
180
+ template_id?: string
181
+ template_name?: string | null
182
+ updated_at?: string | null
183
+ }
184
+ Relationships: [
185
+ {
186
+ foreignKeyName: "tbl_broadcast_templates_org_id_fkey"
187
+ columns: ["org_id"]
188
+ isOneToOne: false
189
+ referencedRelation: "tbl_org"
190
+ referencedColumns: ["org_id"]
191
+ },
192
+ {
193
+ foreignKeyName: "tbl_broadcast_templates_org_id_fkey"
194
+ columns: ["org_id"]
195
+ isOneToOne: false
196
+ referencedRelation: "view_org"
197
+ referencedColumns: ["org_id"]
198
+ },
199
+ ]
200
+ }
201
+ tbl_chat_access: {
202
+ Row: {
203
+ active_phone: string | null
204
+ chat_id: string
205
+ email: string
206
+ has_access: boolean | null
207
+ last_read_timestamp: string | null
208
+ message_unread_count: number | null
209
+ org_id: string
210
+ }
211
+ Insert: {
212
+ active_phone?: string | null
213
+ chat_id: string
214
+ email: string
215
+ has_access?: boolean | null
216
+ last_read_timestamp?: string | null
217
+ message_unread_count?: number | null
218
+ org_id: string
219
+ }
220
+ Update: {
221
+ active_phone?: string | null
222
+ chat_id?: string
223
+ email?: string
224
+ has_access?: boolean | null
225
+ last_read_timestamp?: string | null
226
+ message_unread_count?: number | null
227
+ org_id?: string
228
+ }
229
+ Relationships: [
230
+ {
231
+ foreignKeyName: "tbl_chat_access_org_id_email_fkey"
232
+ columns: ["org_id", "email"]
233
+ isOneToOne: false
234
+ referencedRelation: "tbl_org_members"
235
+ referencedColumns: ["org_id", "email"]
236
+ },
237
+ ]
238
+ }
239
+ tbl_chat_messages: {
240
+ Row: {
241
+ ack: string | null
242
+ author: string | null
243
+ body: string | null
244
+ broadcast: boolean | null
245
+ broadcast_id: string | null
246
+ chat_id: string | null
247
+ delivery_info: Json | null
248
+ device_type: string | null
249
+ duration: string | null
250
+ flag_metadata: Json | null
251
+ flag_response_time: number | null
252
+ forwarding_score: number | null
253
+ from: string | null
254
+ from_me: boolean | null
255
+ has_media: boolean | null
256
+ has_quoted_msg: boolean | null
257
+ has_reaction: boolean | null
258
+ id: Json | null
259
+ invite_v4: Json | null
260
+ is_deleted: boolean | null
261
+ is_ephemeral: boolean | null
262
+ is_forwarded: boolean | null
263
+ is_gif: boolean | null
264
+ is_starred: boolean | null
265
+ is_status: boolean | null
266
+ links: Json | null
267
+ location: Json | null
268
+ media: Json | null
269
+ media_key: string | null
270
+ mentioned_ids: string[] | null
271
+ message_id: string
272
+ message_ticket_id: string | null
273
+ message_type: string | null
274
+ order_id: string | null
275
+ org_id: string
276
+ org_phone: string
277
+ performed_by: string | null
278
+ prev_body: string | null
279
+ quoted_message_id: string | null
280
+ raw_data: Json | null
281
+ sender_phone: string | null
282
+ sent_message_id: string | null
283
+ timestamp: string | null
284
+ to: string | null
285
+ token: string | null
286
+ unique_id: string | null
287
+ updated_at: string | null
288
+ vcards: string[] | null
289
+ }
290
+ Insert: {
291
+ ack?: string | null
292
+ author?: string | null
293
+ body?: string | null
294
+ broadcast?: boolean | null
295
+ broadcast_id?: string | null
296
+ chat_id?: string | null
297
+ delivery_info?: Json | null
298
+ device_type?: string | null
299
+ duration?: string | null
300
+ flag_metadata?: Json | null
301
+ flag_response_time?: number | null
302
+ forwarding_score?: number | null
303
+ from?: string | null
304
+ from_me?: boolean | null
305
+ has_media?: boolean | null
306
+ has_quoted_msg?: boolean | null
307
+ has_reaction?: boolean | null
308
+ id?: Json | null
309
+ invite_v4?: Json | null
310
+ is_deleted?: boolean | null
311
+ is_ephemeral?: boolean | null
312
+ is_forwarded?: boolean | null
313
+ is_gif?: boolean | null
314
+ is_starred?: boolean | null
315
+ is_status?: boolean | null
316
+ links?: Json | null
317
+ location?: Json | null
318
+ media?: Json | null
319
+ media_key?: string | null
320
+ mentioned_ids?: string[] | null
321
+ message_id: string
322
+ message_ticket_id?: string | null
323
+ message_type?: string | null
324
+ order_id?: string | null
325
+ org_id: string
326
+ org_phone: string
327
+ performed_by?: string | null
328
+ prev_body?: string | null
329
+ quoted_message_id?: string | null
330
+ raw_data?: Json | null
331
+ sender_phone?: string | null
332
+ sent_message_id?: string | null
333
+ timestamp?: string | null
334
+ to?: string | null
335
+ token?: string | null
336
+ unique_id?: string | null
337
+ updated_at?: string | null
338
+ vcards?: string[] | null
339
+ }
340
+ Update: {
341
+ ack?: string | null
342
+ author?: string | null
343
+ body?: string | null
344
+ broadcast?: boolean | null
345
+ broadcast_id?: string | null
346
+ chat_id?: string | null
347
+ delivery_info?: Json | null
348
+ device_type?: string | null
349
+ duration?: string | null
350
+ flag_metadata?: Json | null
351
+ flag_response_time?: number | null
352
+ forwarding_score?: number | null
353
+ from?: string | null
354
+ from_me?: boolean | null
355
+ has_media?: boolean | null
356
+ has_quoted_msg?: boolean | null
357
+ has_reaction?: boolean | null
358
+ id?: Json | null
359
+ invite_v4?: Json | null
360
+ is_deleted?: boolean | null
361
+ is_ephemeral?: boolean | null
362
+ is_forwarded?: boolean | null
363
+ is_gif?: boolean | null
364
+ is_starred?: boolean | null
365
+ is_status?: boolean | null
366
+ links?: Json | null
367
+ location?: Json | null
368
+ media?: Json | null
369
+ media_key?: string | null
370
+ mentioned_ids?: string[] | null
371
+ message_id?: string
372
+ message_ticket_id?: string | null
373
+ message_type?: string | null
374
+ order_id?: string | null
375
+ org_id?: string
376
+ org_phone?: string
377
+ performed_by?: string | null
378
+ prev_body?: string | null
379
+ quoted_message_id?: string | null
380
+ raw_data?: Json | null
381
+ sender_phone?: string | null
382
+ sent_message_id?: string | null
383
+ timestamp?: string | null
384
+ to?: string | null
385
+ token?: string | null
386
+ unique_id?: string | null
387
+ updated_at?: string | null
388
+ vcards?: string[] | null
389
+ }
390
+ Relationships: [
391
+ {
392
+ foreignKeyName: "tbl_chat_messages_fkey_tbl_org_phones"
393
+ columns: ["org_phone", "org_id"]
394
+ isOneToOne: false
395
+ referencedRelation: "tbl_org_phones"
396
+ referencedColumns: ["org_phone", "org_id"]
397
+ },
398
+ ]
399
+ }
400
+ tbl_chat_notifications: {
401
+ Row: {
402
+ author: string | null
403
+ body: string | null
404
+ chat_id: string | null
405
+ id: Json | null
406
+ notification_id: string
407
+ org_id: string
408
+ org_phone: string
409
+ recipientids: string[] | null
410
+ timestamp: string | null
411
+ type: string | null
412
+ unique_id: string | null
413
+ }
414
+ Insert: {
415
+ author?: string | null
416
+ body?: string | null
417
+ chat_id?: string | null
418
+ id?: Json | null
419
+ notification_id: string
420
+ org_id: string
421
+ org_phone: string
422
+ recipientids?: string[] | null
423
+ timestamp?: string | null
424
+ type?: string | null
425
+ unique_id?: string | null
426
+ }
427
+ Update: {
428
+ author?: string | null
429
+ body?: string | null
430
+ chat_id?: string | null
431
+ id?: Json | null
432
+ notification_id?: string
433
+ org_id?: string
434
+ org_phone?: string
435
+ recipientids?: string[] | null
436
+ timestamp?: string | null
437
+ type?: string | null
438
+ unique_id?: string | null
439
+ }
440
+ Relationships: [
441
+ {
442
+ foreignKeyName: "tbl_chat_notifications_fkey_tbl_org_phones"
443
+ columns: ["org_id", "org_phone"]
444
+ isOneToOne: false
445
+ referencedRelation: "tbl_org_phones"
446
+ referencedColumns: ["org_id", "org_phone"]
447
+ },
448
+ ]
449
+ }
450
+ tbl_chat_participants: {
451
+ Row: {
452
+ chat_id: string
453
+ contact_id: string
454
+ id: Json | null
455
+ is_admin: boolean | null
456
+ is_super_admin: boolean | null
457
+ org_id: string
458
+ org_phone: string
459
+ }
460
+ Insert: {
461
+ chat_id: string
462
+ contact_id: string
463
+ id?: Json | null
464
+ is_admin?: boolean | null
465
+ is_super_admin?: boolean | null
466
+ org_id: string
467
+ org_phone: string
468
+ }
469
+ Update: {
470
+ chat_id?: string
471
+ contact_id?: string
472
+ id?: Json | null
473
+ is_admin?: boolean | null
474
+ is_super_admin?: boolean | null
475
+ org_id?: string
476
+ org_phone?: string
477
+ }
478
+ Relationships: [
479
+ {
480
+ foreignKeyName: "tbl_chat_participants_fkey_tbl_chats"
481
+ columns: ["org_id", "org_phone", "chat_id"]
482
+ isOneToOne: false
483
+ referencedRelation: "tbl_chats"
484
+ referencedColumns: ["org_id", "org_phone", "chat_id"]
485
+ },
486
+ ]
487
+ }
488
+ tbl_chat_properties: {
489
+ Row: {
490
+ chat_id: string
491
+ custom_properties: Json | null
492
+ flag_count: number
493
+ hubspot_metadata: Json | null
494
+ label_ids: Json | null
495
+ org_id: string
496
+ }
497
+ Insert: {
498
+ chat_id: string
499
+ custom_properties?: Json | null
500
+ flag_count?: number
501
+ hubspot_metadata?: Json | null
502
+ label_ids?: Json | null
503
+ org_id: string
504
+ }
505
+ Update: {
506
+ chat_id?: string
507
+ custom_properties?: Json | null
508
+ flag_count?: number
509
+ hubspot_metadata?: Json | null
510
+ label_ids?: Json | null
511
+ org_id?: string
512
+ }
513
+ Relationships: []
514
+ }
515
+ tbl_chat_reactions: {
516
+ Row: {
517
+ ack: number | null
518
+ chat_id: string | null
519
+ id: Json | null
520
+ message_id: string
521
+ msg_id: Json | null
522
+ org_id: string
523
+ org_phone: string
524
+ orphan: number | null
525
+ orphan_reason: string | null
526
+ reaction: string | null
527
+ reaction_id: string
528
+ read: boolean | null
529
+ sender_id: string
530
+ timestamp: string | null
531
+ unique_id: string | null
532
+ }
533
+ Insert: {
534
+ ack?: number | null
535
+ chat_id?: string | null
536
+ id?: Json | null
537
+ message_id: string
538
+ msg_id?: Json | null
539
+ org_id: string
540
+ org_phone: string
541
+ orphan?: number | null
542
+ orphan_reason?: string | null
543
+ reaction?: string | null
544
+ reaction_id: string
545
+ read?: boolean | null
546
+ sender_id: string
547
+ timestamp?: string | null
548
+ unique_id?: string | null
549
+ }
550
+ Update: {
551
+ ack?: number | null
552
+ chat_id?: string | null
553
+ id?: Json | null
554
+ message_id?: string
555
+ msg_id?: Json | null
556
+ org_id?: string
557
+ org_phone?: string
558
+ orphan?: number | null
559
+ orphan_reason?: string | null
560
+ reaction?: string | null
561
+ reaction_id?: string
562
+ read?: boolean | null
563
+ sender_id?: string
564
+ timestamp?: string | null
565
+ unique_id?: string | null
566
+ }
567
+ Relationships: [
568
+ {
569
+ foreignKeyName: "tbl_chat_reactions_fkey_tbl_org_phones"
570
+ columns: ["org_id", "org_phone"]
571
+ isOneToOne: false
572
+ referencedRelation: "tbl_org_phones"
573
+ referencedColumns: ["org_id", "org_phone"]
574
+ },
575
+ ]
576
+ }
577
+ tbl_chat_tickets: {
578
+ Row: {
579
+ assigned_by: string | null
580
+ assignee: string | null
581
+ chat_id: string
582
+ created_at: string
583
+ due_date: string | null
584
+ hubspot_metadata: Json | null
585
+ is_deleted: boolean
586
+ label_ids: Json | null
587
+ last_updated_at: string
588
+ org_id: string
589
+ priority: number | null
590
+ quoted_message_id: string | null
591
+ raised_by: string | null
592
+ status: Database["public"]["Enums"]["enum_chat_tickets_status"] | null
593
+ subject: string
594
+ ticket_id: string
595
+ }
596
+ Insert: {
597
+ assigned_by?: string | null
598
+ assignee?: string | null
599
+ chat_id: string
600
+ created_at?: string
601
+ due_date?: string | null
602
+ hubspot_metadata?: Json | null
603
+ is_deleted?: boolean
604
+ label_ids?: Json | null
605
+ last_updated_at?: string
606
+ org_id: string
607
+ priority?: number | null
608
+ quoted_message_id?: string | null
609
+ raised_by?: string | null
610
+ status?:
611
+ | Database["public"]["Enums"]["enum_chat_tickets_status"]
612
+ | null
613
+ subject: string
614
+ ticket_id?: string
615
+ }
616
+ Update: {
617
+ assigned_by?: string | null
618
+ assignee?: string | null
619
+ chat_id?: string
620
+ created_at?: string
621
+ due_date?: string | null
622
+ hubspot_metadata?: Json | null
623
+ is_deleted?: boolean
624
+ label_ids?: Json | null
625
+ last_updated_at?: string
626
+ org_id?: string
627
+ priority?: number | null
628
+ quoted_message_id?: string | null
629
+ raised_by?: string | null
630
+ status?:
631
+ | Database["public"]["Enums"]["enum_chat_tickets_status"]
632
+ | null
633
+ subject?: string
634
+ ticket_id?: string
635
+ }
636
+ Relationships: [
637
+ {
638
+ foreignKeyName: "tbl_chat_tickets_org_id_fkey"
639
+ columns: ["org_id"]
640
+ isOneToOne: false
641
+ referencedRelation: "tbl_org"
642
+ referencedColumns: ["org_id"]
643
+ },
644
+ {
645
+ foreignKeyName: "tbl_chat_tickets_org_id_fkey"
646
+ columns: ["org_id"]
647
+ isOneToOne: false
648
+ referencedRelation: "view_org"
649
+ referencedColumns: ["org_id"]
650
+ },
651
+ ]
652
+ }
653
+ tbl_chats: {
654
+ Row: {
655
+ archived: boolean | null
656
+ chat_id: string
657
+ chat_image: string | null
658
+ chat_name: string | null
659
+ chat_type: string | null
660
+ created_at: string
661
+ group_metadata: Json | null
662
+ id: Json | null
663
+ invite_link: string | null
664
+ is_group: boolean | null
665
+ is_muted: boolean | null
666
+ is_read_only: boolean | null
667
+ latest_message: Json | null
668
+ member_count: number | null
669
+ mute_expiration: number | null
670
+ name: string | null
671
+ org_id: string
672
+ org_phone: string
673
+ pinned: boolean | null
674
+ timestamp: string | null
675
+ unread_count: number | null
676
+ updated_at: string
677
+ }
678
+ Insert: {
679
+ archived?: boolean | null
680
+ chat_id: string
681
+ chat_image?: string | null
682
+ chat_name?: string | null
683
+ chat_type?: string | null
684
+ created_at?: string
685
+ group_metadata?: Json | null
686
+ id?: Json | null
687
+ invite_link?: string | null
688
+ is_group?: boolean | null
689
+ is_muted?: boolean | null
690
+ is_read_only?: boolean | null
691
+ latest_message?: Json | null
692
+ member_count?: number | null
693
+ mute_expiration?: number | null
694
+ name?: string | null
695
+ org_id: string
696
+ org_phone: string
697
+ pinned?: boolean | null
698
+ timestamp?: string | null
699
+ unread_count?: number | null
700
+ updated_at?: string
701
+ }
702
+ Update: {
703
+ archived?: boolean | null
704
+ chat_id?: string
705
+ chat_image?: string | null
706
+ chat_name?: string | null
707
+ chat_type?: string | null
708
+ created_at?: string
709
+ group_metadata?: Json | null
710
+ id?: Json | null
711
+ invite_link?: string | null
712
+ is_group?: boolean | null
713
+ is_muted?: boolean | null
714
+ is_read_only?: boolean | null
715
+ latest_message?: Json | null
716
+ member_count?: number | null
717
+ mute_expiration?: number | null
718
+ name?: string | null
719
+ org_id?: string
720
+ org_phone?: string
721
+ pinned?: boolean | null
722
+ timestamp?: string | null
723
+ unread_count?: number | null
724
+ updated_at?: string
725
+ }
726
+ Relationships: [
727
+ {
728
+ foreignKeyName: "tbl_chats_fkey_tbl_org_phones"
729
+ columns: ["org_phone", "org_id"]
730
+ isOneToOne: false
731
+ referencedRelation: "tbl_org_phones"
732
+ referencedColumns: ["org_phone", "org_id"]
733
+ },
734
+ ]
735
+ }
736
+ tbl_contacts: {
737
+ Row: {
738
+ business_profile: Json | null
739
+ contact_color: Database["public"]["Enums"]["enum_chat_colors"] | null
740
+ contact_id: string
741
+ contact_image: string | null
742
+ contact_name: string | null
743
+ contact_type: string | null
744
+ id: Json | null
745
+ is_blocked: boolean | null
746
+ is_business: boolean | null
747
+ is_enterprise: boolean | null
748
+ is_group: boolean | null
749
+ is_internal: boolean | null
750
+ is_me: boolean | null
751
+ is_my_contact: boolean | null
752
+ is_user: boolean | null
753
+ is_wa_contact: boolean | null
754
+ label_ids: Json
755
+ name: string | null
756
+ number: string | null
757
+ org_id: string
758
+ pushname: string | null
759
+ short_name: string | null
760
+ updated_at: string | null
761
+ verified_level: number | null
762
+ verified_name: string | null
763
+ }
764
+ Insert: {
765
+ business_profile?: Json | null
766
+ contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
767
+ contact_id: string
768
+ contact_image?: string | null
769
+ contact_name?: string | null
770
+ contact_type?: string | null
771
+ id?: Json | null
772
+ is_blocked?: boolean | null
773
+ is_business?: boolean | null
774
+ is_enterprise?: boolean | null
775
+ is_group?: boolean | null
776
+ is_internal?: boolean | null
777
+ is_me?: boolean | null
778
+ is_my_contact?: boolean | null
779
+ is_user?: boolean | null
780
+ is_wa_contact?: boolean | null
781
+ label_ids?: Json
782
+ name?: string | null
783
+ number?: string | null
784
+ org_id: string
785
+ pushname?: string | null
786
+ short_name?: string | null
787
+ updated_at?: string | null
788
+ verified_level?: number | null
789
+ verified_name?: string | null
790
+ }
791
+ Update: {
792
+ business_profile?: Json | null
793
+ contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
794
+ contact_id?: string
795
+ contact_image?: string | null
796
+ contact_name?: string | null
797
+ contact_type?: string | null
798
+ id?: Json | null
799
+ is_blocked?: boolean | null
800
+ is_business?: boolean | null
801
+ is_enterprise?: boolean | null
802
+ is_group?: boolean | null
803
+ is_internal?: boolean | null
804
+ is_me?: boolean | null
805
+ is_my_contact?: boolean | null
806
+ is_user?: boolean | null
807
+ is_wa_contact?: boolean | null
808
+ label_ids?: Json
809
+ name?: string | null
810
+ number?: string | null
811
+ org_id?: string
812
+ pushname?: string | null
813
+ short_name?: string | null
814
+ updated_at?: string | null
815
+ verified_level?: number | null
816
+ verified_name?: string | null
817
+ }
818
+ Relationships: [
819
+ {
820
+ foreignKeyName: "tbl_contacts_org_id_fkey"
821
+ columns: ["org_id"]
822
+ isOneToOne: false
823
+ referencedRelation: "tbl_org"
824
+ referencedColumns: ["org_id"]
825
+ },
826
+ {
827
+ foreignKeyName: "tbl_contacts_org_id_fkey"
828
+ columns: ["org_id"]
829
+ isOneToOne: false
830
+ referencedRelation: "view_org"
831
+ referencedColumns: ["org_id"]
832
+ },
833
+ ]
834
+ }
835
+ tbl_custom_properties: {
836
+ Row: {
837
+ created_at: string
838
+ created_by: string | null
839
+ org_id: string | null
840
+ property_id: string
841
+ property_name: string
842
+ property_value: string | null
843
+ property_value_type: string | null
844
+ type: string | null
845
+ }
846
+ Insert: {
847
+ created_at?: string
848
+ created_by?: string | null
849
+ org_id?: string | null
850
+ property_id?: string
851
+ property_name: string
852
+ property_value?: string | null
853
+ property_value_type?: string | null
854
+ type?: string | null
855
+ }
856
+ Update: {
857
+ created_at?: string
858
+ created_by?: string | null
859
+ org_id?: string | null
860
+ property_id?: string
861
+ property_name?: string
862
+ property_value?: string | null
863
+ property_value_type?: string | null
864
+ type?: string | null
865
+ }
866
+ Relationships: [
867
+ {
868
+ foreignKeyName: "tbl_custom_properties_org_id_fkey"
869
+ columns: ["org_id"]
870
+ isOneToOne: false
871
+ referencedRelation: "tbl_org"
872
+ referencedColumns: ["org_id"]
873
+ },
874
+ {
875
+ foreignKeyName: "tbl_custom_properties_org_id_fkey"
876
+ columns: ["org_id"]
877
+ isOneToOne: false
878
+ referencedRelation: "view_org"
879
+ referencedColumns: ["org_id"]
880
+ },
881
+ ]
882
+ }
883
+ tbl_integration_hooks: {
884
+ Row: {
885
+ hook_url: string
886
+ id: string
887
+ integration_id: string | null
888
+ integration_metadata: Json
889
+ integration_name: Database["public"]["Enums"]["enum_integration_name"]
890
+ integration_type: string
891
+ is_subscribed: boolean
892
+ org_id: string
893
+ subscribed_at: string
894
+ type: Database["public"]["Enums"]["enum_integration_type"]
895
+ }
896
+ Insert: {
897
+ hook_url: string
898
+ id?: string
899
+ integration_id?: string | null
900
+ integration_metadata: Json
901
+ integration_name: Database["public"]["Enums"]["enum_integration_name"]
902
+ integration_type: string
903
+ is_subscribed: boolean
904
+ org_id: string
905
+ subscribed_at?: string
906
+ type: Database["public"]["Enums"]["enum_integration_type"]
907
+ }
908
+ Update: {
909
+ hook_url?: string
910
+ id?: string
911
+ integration_id?: string | null
912
+ integration_metadata?: Json
913
+ integration_name?: Database["public"]["Enums"]["enum_integration_name"]
914
+ integration_type?: string
915
+ is_subscribed?: boolean
916
+ org_id?: string
917
+ subscribed_at?: string
918
+ type?: Database["public"]["Enums"]["enum_integration_type"]
919
+ }
920
+ Relationships: [
921
+ {
922
+ foreignKeyName: "tbl_integration_hooks_org_id_fkey"
923
+ columns: ["org_id"]
924
+ isOneToOne: false
925
+ referencedRelation: "tbl_org"
926
+ referencedColumns: ["org_id"]
927
+ },
928
+ {
929
+ foreignKeyName: "tbl_integration_hooks_org_id_fkey"
930
+ columns: ["org_id"]
931
+ isOneToOne: false
932
+ referencedRelation: "view_org"
933
+ referencedColumns: ["org_id"]
934
+ },
935
+ ]
936
+ }
937
+ tbl_integration_logs: {
938
+ Row: {
939
+ created_at: string
940
+ id: string
941
+ integration_name: Database["public"]["Enums"]["enum_integration_name"]
942
+ integration_type: string
943
+ metadata: Json
944
+ org_id: string
945
+ response: Json | null
946
+ success: boolean
947
+ type: Database["public"]["Enums"]["enum_integration_type"]
948
+ }
949
+ Insert: {
950
+ created_at?: string
951
+ id?: string
952
+ integration_name: Database["public"]["Enums"]["enum_integration_name"]
953
+ integration_type: string
954
+ metadata?: Json
955
+ org_id: string
956
+ response?: Json | null
957
+ success?: boolean
958
+ type: Database["public"]["Enums"]["enum_integration_type"]
959
+ }
960
+ Update: {
961
+ created_at?: string
962
+ id?: string
963
+ integration_name?: Database["public"]["Enums"]["enum_integration_name"]
964
+ integration_type?: string
965
+ metadata?: Json
966
+ org_id?: string
967
+ response?: Json | null
968
+ success?: boolean
969
+ type?: Database["public"]["Enums"]["enum_integration_type"]
970
+ }
971
+ Relationships: [
972
+ {
973
+ foreignKeyName: "tbl_integration_logs_org_id_fkey"
974
+ columns: ["org_id"]
975
+ isOneToOne: false
976
+ referencedRelation: "tbl_org"
977
+ referencedColumns: ["org_id"]
978
+ },
979
+ {
980
+ foreignKeyName: "tbl_integration_logs_org_id_fkey"
981
+ columns: ["org_id"]
982
+ isOneToOne: false
983
+ referencedRelation: "view_org"
984
+ referencedColumns: ["org_id"]
985
+ },
986
+ ]
987
+ }
988
+ tbl_integration_tokens: {
989
+ Row: {
990
+ exp: string
991
+ iat: string
992
+ id: string
993
+ is_revealed: boolean
994
+ name: string
995
+ org_id: string
996
+ role: string
997
+ token: string
998
+ token_metadata: Json | null
999
+ type: Database["public"]["Enums"]["enum_integration_type"]
1000
+ }
1001
+ Insert: {
1002
+ exp: string
1003
+ iat: string
1004
+ id?: string
1005
+ is_revealed?: boolean
1006
+ name: string
1007
+ org_id: string
1008
+ role: string
1009
+ token: string
1010
+ token_metadata?: Json | null
1011
+ type: Database["public"]["Enums"]["enum_integration_type"]
1012
+ }
1013
+ Update: {
1014
+ exp?: string
1015
+ iat?: string
1016
+ id?: string
1017
+ is_revealed?: boolean
1018
+ name?: string
1019
+ org_id?: string
1020
+ role?: string
1021
+ token?: string
1022
+ token_metadata?: Json | null
1023
+ type?: Database["public"]["Enums"]["enum_integration_type"]
1024
+ }
1025
+ Relationships: [
1026
+ {
1027
+ foreignKeyName: "public_tbl_integration_tokens_org_id_fkey"
1028
+ columns: ["org_id"]
1029
+ isOneToOne: false
1030
+ referencedRelation: "tbl_org"
1031
+ referencedColumns: ["org_id"]
1032
+ },
1033
+ {
1034
+ foreignKeyName: "public_tbl_integration_tokens_org_id_fkey"
1035
+ columns: ["org_id"]
1036
+ isOneToOne: false
1037
+ referencedRelation: "view_org"
1038
+ referencedColumns: ["org_id"]
1039
+ },
1040
+ ]
1041
+ }
1042
+ tbl_org: {
1043
+ Row: {
1044
+ created_at: string
1045
+ org_id: string
1046
+ org_image: string | null
1047
+ org_metadata: Json | null
1048
+ org_name: string | null
1049
+ org_plan: Json | null
1050
+ stripe_customer_details: Json | null
1051
+ stripe_customer_id: string | null
1052
+ stripe_subscription_details: Json | null
1053
+ support_link: string | null
1054
+ }
1055
+ Insert: {
1056
+ created_at?: string
1057
+ org_id?: string
1058
+ org_image?: string | null
1059
+ org_metadata?: Json | null
1060
+ org_name?: string | null
1061
+ org_plan?: Json | null
1062
+ stripe_customer_details?: Json | null
1063
+ stripe_customer_id?: string | null
1064
+ stripe_subscription_details?: Json | null
1065
+ support_link?: string | null
1066
+ }
1067
+ Update: {
1068
+ created_at?: string
1069
+ org_id?: string
1070
+ org_image?: string | null
1071
+ org_metadata?: Json | null
1072
+ org_name?: string | null
1073
+ org_plan?: Json | null
1074
+ stripe_customer_details?: Json | null
1075
+ stripe_customer_id?: string | null
1076
+ stripe_subscription_details?: Json | null
1077
+ support_link?: string | null
1078
+ }
1079
+ Relationships: []
1080
+ }
1081
+ tbl_org_labels: {
1082
+ Row: {
1083
+ color: string
1084
+ created_at: string
1085
+ label_id: string
1086
+ name: string
1087
+ org_id: string
1088
+ type: string
1089
+ }
1090
+ Insert: {
1091
+ color?: string
1092
+ created_at?: string
1093
+ label_id?: string
1094
+ name: string
1095
+ org_id: string
1096
+ type?: string
1097
+ }
1098
+ Update: {
1099
+ color?: string
1100
+ created_at?: string
1101
+ label_id?: string
1102
+ name?: string
1103
+ org_id?: string
1104
+ type?: string
1105
+ }
1106
+ Relationships: [
1107
+ {
1108
+ foreignKeyName: "tbl_org_labels_org_id_fkey"
1109
+ columns: ["org_id"]
1110
+ isOneToOne: false
1111
+ referencedRelation: "tbl_org"
1112
+ referencedColumns: ["org_id"]
1113
+ },
1114
+ {
1115
+ foreignKeyName: "tbl_org_labels_org_id_fkey"
1116
+ columns: ["org_id"]
1117
+ isOneToOne: false
1118
+ referencedRelation: "view_org"
1119
+ referencedColumns: ["org_id"]
1120
+ },
1121
+ ]
1122
+ }
1123
+ tbl_org_members: {
1124
+ Row: {
1125
+ created_at: string | null
1126
+ email: string
1127
+ invited_at: string | null
1128
+ invited_by: string | null
1129
+ is_active: boolean
1130
+ is_owner: boolean | null
1131
+ label_ids: string[] | null
1132
+ member_color: Database["public"]["Enums"]["enum_chat_colors"]
1133
+ member_image: string | null
1134
+ member_name: string | null
1135
+ org_id: string
1136
+ org_phones: string[] | null
1137
+ preferences: Json
1138
+ role: Database["public"]["Enums"]["enum_member_role"]
1139
+ user_id: string | null
1140
+ }
1141
+ Insert: {
1142
+ created_at?: string | null
1143
+ email: string
1144
+ invited_at?: string | null
1145
+ invited_by?: string | null
1146
+ is_active?: boolean
1147
+ is_owner?: boolean | null
1148
+ label_ids?: string[] | null
1149
+ member_color?: Database["public"]["Enums"]["enum_chat_colors"]
1150
+ member_image?: string | null
1151
+ member_name?: string | null
1152
+ org_id: string
1153
+ org_phones?: string[] | null
1154
+ preferences?: Json
1155
+ role?: Database["public"]["Enums"]["enum_member_role"]
1156
+ user_id?: string | null
1157
+ }
1158
+ Update: {
1159
+ created_at?: string | null
1160
+ email?: string
1161
+ invited_at?: string | null
1162
+ invited_by?: string | null
1163
+ is_active?: boolean
1164
+ is_owner?: boolean | null
1165
+ label_ids?: string[] | null
1166
+ member_color?: Database["public"]["Enums"]["enum_chat_colors"]
1167
+ member_image?: string | null
1168
+ member_name?: string | null
1169
+ org_id?: string
1170
+ org_phones?: string[] | null
1171
+ preferences?: Json
1172
+ role?: Database["public"]["Enums"]["enum_member_role"]
1173
+ user_id?: string | null
1174
+ }
1175
+ Relationships: [
1176
+ {
1177
+ foreignKeyName: "tbl_org_members_fkey_auth_users"
1178
+ columns: ["user_id"]
1179
+ isOneToOne: false
1180
+ referencedRelation: "users"
1181
+ referencedColumns: ["id"]
1182
+ },
1183
+ {
1184
+ foreignKeyName: "tbl_org_members_fkey_tbl_org"
1185
+ columns: ["org_id"]
1186
+ isOneToOne: false
1187
+ referencedRelation: "tbl_org"
1188
+ referencedColumns: ["org_id"]
1189
+ },
1190
+ {
1191
+ foreignKeyName: "tbl_org_members_fkey_tbl_org"
1192
+ columns: ["org_id"]
1193
+ isOneToOne: false
1194
+ referencedRelation: "view_org"
1195
+ referencedColumns: ["org_id"]
1196
+ },
1197
+ ]
1198
+ }
1199
+ tbl_org_phones: {
1200
+ Row: {
1201
+ created_at: string
1202
+ first_connected_at: string | null
1203
+ is_browser_open: boolean
1204
+ is_ready: boolean | null
1205
+ legacy_version: boolean | null
1206
+ org_id: string
1207
+ org_phone: string | null
1208
+ phone_id: string
1209
+ phone_image: string | null
1210
+ phone_name: string | null
1211
+ phone_state: Json | null
1212
+ qr_code: string | null
1213
+ server_ip: string | null
1214
+ updated_at: string | null
1215
+ wa_state: string | null
1216
+ wa_version: string | null
1217
+ }
1218
+ Insert: {
1219
+ created_at?: string
1220
+ first_connected_at?: string | null
1221
+ is_browser_open?: boolean
1222
+ is_ready?: boolean | null
1223
+ legacy_version?: boolean | null
1224
+ org_id: string
1225
+ org_phone?: string | null
1226
+ phone_id?: string
1227
+ phone_image?: string | null
1228
+ phone_name?: string | null
1229
+ phone_state?: Json | null
1230
+ qr_code?: string | null
1231
+ server_ip?: string | null
1232
+ updated_at?: string | null
1233
+ wa_state?: string | null
1234
+ wa_version?: string | null
1235
+ }
1236
+ Update: {
1237
+ created_at?: string
1238
+ first_connected_at?: string | null
1239
+ is_browser_open?: boolean
1240
+ is_ready?: boolean | null
1241
+ legacy_version?: boolean | null
1242
+ org_id?: string
1243
+ org_phone?: string | null
1244
+ phone_id?: string
1245
+ phone_image?: string | null
1246
+ phone_name?: string | null
1247
+ phone_state?: Json | null
1248
+ qr_code?: string | null
1249
+ server_ip?: string | null
1250
+ updated_at?: string | null
1251
+ wa_state?: string | null
1252
+ wa_version?: string | null
1253
+ }
1254
+ Relationships: [
1255
+ {
1256
+ foreignKeyName: "tbl_org_phones_fkey_tbl_org"
1257
+ columns: ["org_id"]
1258
+ isOneToOne: false
1259
+ referencedRelation: "tbl_org"
1260
+ referencedColumns: ["org_id"]
1261
+ },
1262
+ {
1263
+ foreignKeyName: "tbl_org_phones_fkey_tbl_org"
1264
+ columns: ["org_id"]
1265
+ isOneToOne: false
1266
+ referencedRelation: "view_org"
1267
+ referencedColumns: ["org_id"]
1268
+ },
1269
+ {
1270
+ foreignKeyName: "tbl_org_phones_org_id_fkey"
1271
+ columns: ["org_id"]
1272
+ isOneToOne: false
1273
+ referencedRelation: "tbl_org"
1274
+ referencedColumns: ["org_id"]
1275
+ },
1276
+ {
1277
+ foreignKeyName: "tbl_org_phones_org_id_fkey"
1278
+ columns: ["org_id"]
1279
+ isOneToOne: false
1280
+ referencedRelation: "view_org"
1281
+ referencedColumns: ["org_id"]
1282
+ },
1283
+ ]
1284
+ }
1285
+ tbl_quick_replies: {
1286
+ Row: {
1287
+ command: string | null
1288
+ created_at: string
1289
+ message_payload: Json | null
1290
+ org_id: string | null
1291
+ reply_id: string
1292
+ }
1293
+ Insert: {
1294
+ command?: string | null
1295
+ created_at?: string
1296
+ message_payload?: Json | null
1297
+ org_id?: string | null
1298
+ reply_id?: string
1299
+ }
1300
+ Update: {
1301
+ command?: string | null
1302
+ created_at?: string
1303
+ message_payload?: Json | null
1304
+ org_id?: string | null
1305
+ reply_id?: string
1306
+ }
1307
+ Relationships: [
1308
+ {
1309
+ foreignKeyName: "tbl_quick_replies_org_id_fkey"
1310
+ columns: ["org_id"]
1311
+ isOneToOne: false
1312
+ referencedRelation: "tbl_org"
1313
+ referencedColumns: ["org_id"]
1314
+ },
1315
+ {
1316
+ foreignKeyName: "tbl_quick_replies_org_id_fkey"
1317
+ columns: ["org_id"]
1318
+ isOneToOne: false
1319
+ referencedRelation: "view_org"
1320
+ referencedColumns: ["org_id"]
1321
+ },
1322
+ ]
1323
+ }
1324
+ tbl_tools_whatsapp_links: {
1325
+ Row: {
1326
+ created_at: string
1327
+ link_id: string
1328
+ link_name: string
1329
+ message: string | null
1330
+ phone: string
1331
+ }
1332
+ Insert: {
1333
+ created_at?: string
1334
+ link_id?: string
1335
+ link_name: string
1336
+ message?: string | null
1337
+ phone: string
1338
+ }
1339
+ Update: {
1340
+ created_at?: string
1341
+ link_id?: string
1342
+ link_name?: string
1343
+ message?: string | null
1344
+ phone?: string
1345
+ }
1346
+ Relationships: []
1347
+ }
1348
+ }
1349
+ Views: {
1350
+ view_broadcast_logs: {
1351
+ Row: {
1352
+ broadcast_id: string | null
1353
+ created_at: string | null
1354
+ delivery_percentage: number | null
1355
+ failed_chats: number | null
1356
+ message_payload: Json | null
1357
+ org_id: string | null
1358
+ pending_chats: number | null
1359
+ performed_at: string | null
1360
+ performed_by: string | null
1361
+ read_percentage: number | null
1362
+ scheduled_at: string | null
1363
+ sent_chats: number | null
1364
+ total_chats: number | null
1365
+ total_delivered_count: number | null
1366
+ total_member_count: number | null
1367
+ total_read_count: number | null
1368
+ }
1369
+ Relationships: [
1370
+ {
1371
+ foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
1372
+ columns: ["org_id"]
1373
+ isOneToOne: false
1374
+ referencedRelation: "tbl_org"
1375
+ referencedColumns: ["org_id"]
1376
+ },
1377
+ {
1378
+ foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
1379
+ columns: ["org_id"]
1380
+ isOneToOne: false
1381
+ referencedRelation: "view_org"
1382
+ referencedColumns: ["org_id"]
1383
+ },
1384
+ ]
1385
+ }
1386
+ view_chats: {
1387
+ Row: {
1388
+ active_phone: string | null
1389
+ chat_access: Json | null
1390
+ chat_id: string | null
1391
+ chat_image: string | null
1392
+ chat_name: string | null
1393
+ chat_type: string | null
1394
+ created_at: string | null
1395
+ custom_properties: Json | null
1396
+ flag_count: number | null
1397
+ group_description: string | null
1398
+ hubspot_metadata: Json | null
1399
+ invite_link: string | null
1400
+ is_archived: boolean | null
1401
+ is_muted: boolean | null
1402
+ label_ids: Json | null
1403
+ last_read_timestamp: string | null
1404
+ latest_message: Json | null
1405
+ member_count: number | null
1406
+ message_unread_count: number | null
1407
+ org_id: string | null
1408
+ org_phone: string | null
1409
+ updated_at: string | null
1410
+ }
1411
+ Relationships: []
1412
+ }
1413
+ view_org: {
1414
+ Row: {
1415
+ created_at: string | null
1416
+ is_enterprise: boolean | null
1417
+ is_free_trial: boolean | null
1418
+ is_hubspot_connected: boolean | null
1419
+ org_id: string | null
1420
+ org_image: string | null
1421
+ org_metadata: Json | null
1422
+ org_name: string | null
1423
+ org_plan: Json | null
1424
+ pending_days: number | null
1425
+ phone_limit: string | null
1426
+ plan_id: string | null
1427
+ stripe_customer_details: Json | null
1428
+ stripe_customer_id: string | null
1429
+ stripe_subscription_details: Json | null
1430
+ subscription_status: string | null
1431
+ support_link: string | null
1432
+ user_limit: string | null
1433
+ }
1434
+ Insert: {
1435
+ created_at?: string | null
1436
+ is_enterprise?: never
1437
+ is_free_trial?: never
1438
+ is_hubspot_connected?: never
1439
+ org_id?: string | null
1440
+ org_image?: string | null
1441
+ org_metadata?: Json | null
1442
+ org_name?: string | null
1443
+ org_plan?: Json | null
1444
+ pending_days?: never
1445
+ phone_limit?: never
1446
+ plan_id?: never
1447
+ stripe_customer_details?: Json | null
1448
+ stripe_customer_id?: string | null
1449
+ stripe_subscription_details?: Json | null
1450
+ subscription_status?: never
1451
+ support_link?: string | null
1452
+ user_limit?: never
1453
+ }
1454
+ Update: {
1455
+ created_at?: string | null
1456
+ is_enterprise?: never
1457
+ is_free_trial?: never
1458
+ is_hubspot_connected?: never
1459
+ org_id?: string | null
1460
+ org_image?: string | null
1461
+ org_metadata?: Json | null
1462
+ org_name?: string | null
1463
+ org_plan?: Json | null
1464
+ pending_days?: never
1465
+ phone_limit?: never
1466
+ plan_id?: never
1467
+ stripe_customer_details?: Json | null
1468
+ stripe_customer_id?: string | null
1469
+ stripe_subscription_details?: Json | null
1470
+ subscription_status?: never
1471
+ support_link?: string | null
1472
+ user_limit?: never
1473
+ }
1474
+ Relationships: []
1475
+ }
1476
+ }
1477
+ Functions: {
1478
+ gen_id: {
1479
+ Args: {
1480
+ prefix: string
1481
+ size?: number
1482
+ alphabet?: string
1483
+ }
1484
+ Returns: string
1485
+ }
1486
+ gen_ticket_id: {
1487
+ Args: {
1488
+ org_id_input: string
1489
+ }
1490
+ Returns: string
1491
+ }
1492
+ generate_access_token: {
1493
+ Args: {
1494
+ name_input?: string
1495
+ type_input?: Database["public"]["Enums"]["enum_integration_type"]
1496
+ org_id_input?: string
1497
+ }
1498
+ Returns: Json
1499
+ }
1500
+ get_api_auth_details: {
1501
+ Args: {
1502
+ org_id_input?: string
1503
+ org_phone_input?: string
1504
+ token_id_input?: string
1505
+ token_type_input?: Database["public"]["Enums"]["enum_integration_type"]
1506
+ }
1507
+ Returns: Json
1508
+ }
1509
+ get_chat_labels_data: {
1510
+ Args: {
1511
+ org_id_input: string
1512
+ chat_ids_input?: string[]
1513
+ }
1514
+ Returns: Json[]
1515
+ }
1516
+ get_chat_members: {
1517
+ Args: {
1518
+ org_id_input?: string
1519
+ chat_id_input?: string[]
1520
+ }
1521
+ Returns: Json
1522
+ }
1523
+ get_chats: {
1524
+ Args: {
1525
+ org_id_input?: string
1526
+ chat_id_input?: string[]
1527
+ }
1528
+ Returns: Json
1529
+ }
1530
+ get_chats_info: {
1531
+ Args: {
1532
+ chat_id_input: string
1533
+ org_id_input: string
1534
+ org_phone_input?: string
1535
+ }
1536
+ Returns: Json
1537
+ }
1538
+ get_contacts: {
1539
+ Args: {
1540
+ org_id_input: string
1541
+ contact_ids_input?: string[]
1542
+ with_chats?: boolean
1543
+ with_name?: boolean
1544
+ }
1545
+ Returns: Json
1546
+ }
1547
+ get_dashboard_statistics: {
1548
+ Args: {
1549
+ org_id_input: string
1550
+ interval_input?: unknown
1551
+ chat_id_input?: string[]
1552
+ }
1553
+ Returns: Json
1554
+ }
1555
+ get_export_chats_data: {
1556
+ Args: {
1557
+ org_id_input: string
1558
+ chat_ids?: string[]
1559
+ }
1560
+ Returns: Json
1561
+ }
1562
+ get_integration_data: {
1563
+ Args: {
1564
+ org_id_input?: string
1565
+ }
1566
+ Returns: Json
1567
+ }
1568
+ get_messages_notifications_reactions: {
1569
+ Args: {
1570
+ org_id_input: string
1571
+ chat_id_input?: string[]
1572
+ message_limit_input?: number
1573
+ reaction_notification_limit_input?: number
1574
+ last_updated_at_input?: string
1575
+ }
1576
+ Returns: Json
1577
+ }
1578
+ get_org: {
1579
+ Args: {
1580
+ org_id_input?: string
1581
+ }
1582
+ Returns: Json
1583
+ }
1584
+ get_org_phones: {
1585
+ Args: {
1586
+ org_id_input?: string
1587
+ phone_id_input?: string
1588
+ }
1589
+ Returns: Json
1590
+ }
1591
+ get_team_metrics: {
1592
+ Args: {
1593
+ org_id_input: string
1594
+ chat_id_input?: string[]
1595
+ interval_input?: unknown
1596
+ }
1597
+ Returns: Json
1598
+ }
1599
+ get_ticket_info: {
1600
+ Args: {
1601
+ ticket_id_input?: string
1602
+ org_id_input?: string
1603
+ chat_id_input?: string
1604
+ unique_message_id_input?: string
1605
+ }
1606
+ Returns: Json
1607
+ }
1608
+ image_path: {
1609
+ Args: {
1610
+ path_input?: string
1611
+ bucket_name?: string
1612
+ req_base?: boolean
1613
+ }
1614
+ Returns: string
1615
+ }
1616
+ list_org_from_user: {
1617
+ Args: Record<PropertyKey, never>
1618
+ Returns: string[]
1619
+ }
1620
+ list_role_from_user: {
1621
+ Args: Record<PropertyKey, never>
1622
+ Returns: Database["public"]["Enums"]["enum_member_role"]
1623
+ }
1624
+ update_labels: {
1625
+ Args: {
1626
+ org_id_input: string
1627
+ tbl_type: string
1628
+ label_ids_input: Json
1629
+ row_id_input: string[]
1630
+ replace_labels?: boolean
1631
+ }
1632
+ Returns: undefined
1633
+ }
1634
+ }
1635
+ Enums: {
1636
+ enum_chat_colors:
1637
+ | "#B4876E"
1638
+ | "#A5B337"
1639
+ | "#06CF9C"
1640
+ | "#25D366"
1641
+ | "#02A698"
1642
+ | "#7D9EF1"
1643
+ | "#007BFC"
1644
+ | "#5E47DE"
1645
+ | "#7F66FF"
1646
+ | "#9333EA"
1647
+ | "#FA6533"
1648
+ | "#C4532D"
1649
+ | "#DC2626"
1650
+ | "#FF2E74"
1651
+ | "#DB2777"
1652
+ enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived"
1653
+ enum_integration_name:
1654
+ | "org.created"
1655
+ | "org.updated"
1656
+ | "org.member.created"
1657
+ | "org.member.updated"
1658
+ | "org.phone.created"
1659
+ | "org.phone.connected"
1660
+ | "org.phone.disconnected"
1661
+ | "org.subscription.trial_will_end"
1662
+ | "chat.created"
1663
+ | "chat.updated"
1664
+ | "message.created"
1665
+ | "message.updated"
1666
+ | "message.deleted"
1667
+ | "message.ack.updated"
1668
+ | "reaction.created"
1669
+ | "reaction.updated"
1670
+ | "ticket.created"
1671
+ | "ticket.updated"
1672
+ | "ticket.deleted"
1673
+ enum_integration_type:
1674
+ | "zapier"
1675
+ | "pabbly"
1676
+ | "api"
1677
+ | "webhook"
1678
+ | "hubspot"
1679
+ | "freshdesk"
1680
+ | "slack"
1681
+ | "jira"
1682
+ | "salesforce"
1683
+ enum_member_role: "admin" | "member"
1684
+ }
1685
+ CompositeTypes: {
1686
+ [_ in never]: never
1687
+ }
1688
+ }
1689
+ storage: {
1690
+ Tables: {
1691
+ buckets: {
1692
+ Row: {
1693
+ allowed_mime_types: string[] | null
1694
+ avif_autodetection: boolean | null
1695
+ created_at: string | null
1696
+ file_size_limit: number | null
1697
+ id: string
1698
+ name: string
1699
+ owner: string | null
1700
+ owner_id: string | null
1701
+ public: boolean | null
1702
+ updated_at: string | null
1703
+ }
1704
+ Insert: {
1705
+ allowed_mime_types?: string[] | null
1706
+ avif_autodetection?: boolean | null
1707
+ created_at?: string | null
1708
+ file_size_limit?: number | null
1709
+ id: string
1710
+ name: string
1711
+ owner?: string | null
1712
+ owner_id?: string | null
1713
+ public?: boolean | null
1714
+ updated_at?: string | null
1715
+ }
1716
+ Update: {
1717
+ allowed_mime_types?: string[] | null
1718
+ avif_autodetection?: boolean | null
1719
+ created_at?: string | null
1720
+ file_size_limit?: number | null
1721
+ id?: string
1722
+ name?: string
1723
+ owner?: string | null
1724
+ owner_id?: string | null
1725
+ public?: boolean | null
1726
+ updated_at?: string | null
1727
+ }
1728
+ Relationships: []
1729
+ }
1730
+ migrations: {
1731
+ Row: {
1732
+ executed_at: string | null
1733
+ hash: string
1734
+ id: number
1735
+ name: string
1736
+ }
1737
+ Insert: {
1738
+ executed_at?: string | null
1739
+ hash: string
1740
+ id: number
1741
+ name: string
1742
+ }
1743
+ Update: {
1744
+ executed_at?: string | null
1745
+ hash?: string
1746
+ id?: number
1747
+ name?: string
1748
+ }
1749
+ Relationships: []
1750
+ }
1751
+ objects: {
1752
+ Row: {
1753
+ bucket_id: string | null
1754
+ created_at: string | null
1755
+ id: string
1756
+ last_accessed_at: string | null
1757
+ metadata: Json | null
1758
+ name: string | null
1759
+ owner: string | null
1760
+ owner_id: string | null
1761
+ path_tokens: string[] | null
1762
+ updated_at: string | null
1763
+ version: string | null
1764
+ }
1765
+ Insert: {
1766
+ bucket_id?: string | null
1767
+ created_at?: string | null
1768
+ id?: string
1769
+ last_accessed_at?: string | null
1770
+ metadata?: Json | null
1771
+ name?: string | null
1772
+ owner?: string | null
1773
+ owner_id?: string | null
1774
+ path_tokens?: string[] | null
1775
+ updated_at?: string | null
1776
+ version?: string | null
1777
+ }
1778
+ Update: {
1779
+ bucket_id?: string | null
1780
+ created_at?: string | null
1781
+ id?: string
1782
+ last_accessed_at?: string | null
1783
+ metadata?: Json | null
1784
+ name?: string | null
1785
+ owner?: string | null
1786
+ owner_id?: string | null
1787
+ path_tokens?: string[] | null
1788
+ updated_at?: string | null
1789
+ version?: string | null
1790
+ }
1791
+ Relationships: [
1792
+ {
1793
+ foreignKeyName: "objects_bucketId_fkey"
1794
+ columns: ["bucket_id"]
1795
+ isOneToOne: false
1796
+ referencedRelation: "buckets"
1797
+ referencedColumns: ["id"]
1798
+ },
1799
+ ]
1800
+ }
1801
+ s3_multipart_uploads: {
1802
+ Row: {
1803
+ bucket_id: string
1804
+ created_at: string
1805
+ id: string
1806
+ in_progress_size: number
1807
+ key: string
1808
+ owner_id: string | null
1809
+ upload_signature: string
1810
+ version: string
1811
+ }
1812
+ Insert: {
1813
+ bucket_id: string
1814
+ created_at?: string
1815
+ id: string
1816
+ in_progress_size?: number
1817
+ key: string
1818
+ owner_id?: string | null
1819
+ upload_signature: string
1820
+ version: string
1821
+ }
1822
+ Update: {
1823
+ bucket_id?: string
1824
+ created_at?: string
1825
+ id?: string
1826
+ in_progress_size?: number
1827
+ key?: string
1828
+ owner_id?: string | null
1829
+ upload_signature?: string
1830
+ version?: string
1831
+ }
1832
+ Relationships: [
1833
+ {
1834
+ foreignKeyName: "s3_multipart_uploads_bucket_id_fkey"
1835
+ columns: ["bucket_id"]
1836
+ isOneToOne: false
1837
+ referencedRelation: "buckets"
1838
+ referencedColumns: ["id"]
1839
+ },
1840
+ ]
1841
+ }
1842
+ s3_multipart_uploads_parts: {
1843
+ Row: {
1844
+ bucket_id: string
1845
+ created_at: string
1846
+ etag: string
1847
+ id: string
1848
+ key: string
1849
+ owner_id: string | null
1850
+ part_number: number
1851
+ size: number
1852
+ upload_id: string
1853
+ version: string
1854
+ }
1855
+ Insert: {
1856
+ bucket_id: string
1857
+ created_at?: string
1858
+ etag: string
1859
+ id?: string
1860
+ key: string
1861
+ owner_id?: string | null
1862
+ part_number: number
1863
+ size?: number
1864
+ upload_id: string
1865
+ version: string
1866
+ }
1867
+ Update: {
1868
+ bucket_id?: string
1869
+ created_at?: string
1870
+ etag?: string
1871
+ id?: string
1872
+ key?: string
1873
+ owner_id?: string | null
1874
+ part_number?: number
1875
+ size?: number
1876
+ upload_id?: string
1877
+ version?: string
1878
+ }
1879
+ Relationships: [
1880
+ {
1881
+ foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey"
1882
+ columns: ["bucket_id"]
1883
+ isOneToOne: false
1884
+ referencedRelation: "buckets"
1885
+ referencedColumns: ["id"]
1886
+ },
1887
+ {
1888
+ foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey"
1889
+ columns: ["upload_id"]
1890
+ isOneToOne: false
1891
+ referencedRelation: "s3_multipart_uploads"
1892
+ referencedColumns: ["id"]
1893
+ },
1894
+ ]
1895
+ }
1896
+ }
1897
+ Views: {
1898
+ [_ in never]: never
1899
+ }
1900
+ Functions: {
1901
+ can_insert_object: {
1902
+ Args: {
1903
+ bucketid: string
1904
+ name: string
1905
+ owner: string
1906
+ metadata: Json
1907
+ }
1908
+ Returns: undefined
1909
+ }
1910
+ extension: {
1911
+ Args: {
1912
+ name: string
1913
+ }
1914
+ Returns: string
1915
+ }
1916
+ filename: {
1917
+ Args: {
1918
+ name: string
1919
+ }
1920
+ Returns: string
1921
+ }
1922
+ foldername: {
1923
+ Args: {
1924
+ name: string
1925
+ }
1926
+ Returns: string[]
1927
+ }
1928
+ get_size_by_bucket: {
1929
+ Args: Record<PropertyKey, never>
1930
+ Returns: {
1931
+ size: number
1932
+ bucket_id: string
1933
+ }[]
1934
+ }
1935
+ list_multipart_uploads_with_delimiter: {
1936
+ Args: {
1937
+ bucket_id: string
1938
+ prefix_param: string
1939
+ delimiter_param: string
1940
+ max_keys?: number
1941
+ next_key_token?: string
1942
+ next_upload_token?: string
1943
+ }
1944
+ Returns: {
1945
+ key: string
1946
+ id: string
1947
+ created_at: string
1948
+ }[]
1949
+ }
1950
+ list_objects_with_delimiter: {
1951
+ Args: {
1952
+ bucket_id: string
1953
+ prefix_param: string
1954
+ delimiter_param: string
1955
+ max_keys?: number
1956
+ start_after?: string
1957
+ next_token?: string
1958
+ }
1959
+ Returns: {
1960
+ name: string
1961
+ id: string
1962
+ metadata: Json
1963
+ updated_at: string
1964
+ }[]
1965
+ }
1966
+ search: {
1967
+ Args: {
1968
+ prefix: string
1969
+ bucketname: string
1970
+ limits?: number
1971
+ levels?: number
1972
+ offsets?: number
1973
+ search?: string
1974
+ sortcolumn?: string
1975
+ sortorder?: string
1976
+ }
1977
+ Returns: {
1978
+ name: string
1979
+ id: string
1980
+ updated_at: string
1981
+ created_at: string
1982
+ last_accessed_at: string
1983
+ metadata: Json
1984
+ }[]
1985
+ }
1986
+ }
1987
+ Enums: {
1988
+ [_ in never]: never
1989
+ }
1990
+ CompositeTypes: {
1991
+ [_ in never]: never
1992
+ }
1993
+ }
1994
+ }
1995
+
1996
+ type PublicSchema = Database[Extract<keyof Database, "public">]
1997
+
1998
+ export type Tables<
1999
+ PublicTableNameOrOptions extends
2000
+ | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
2001
+ | { schema: keyof Database },
2002
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
2003
+ ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
2004
+ Database[PublicTableNameOrOptions["schema"]]["Views"])
2005
+ : never = never,
2006
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
2007
+ ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
2008
+ Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
2009
+ Row: infer R
2010
+ }
2011
+ ? R
2012
+ : never
2013
+ : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
2014
+ PublicSchema["Views"])
2015
+ ? (PublicSchema["Tables"] &
2016
+ PublicSchema["Views"])[PublicTableNameOrOptions] extends {
2017
+ Row: infer R
2018
+ }
2019
+ ? R
2020
+ : never
2021
+ : never
2022
+
2023
+ export type TablesInsert<
2024
+ PublicTableNameOrOptions extends
2025
+ | keyof PublicSchema["Tables"]
2026
+ | { schema: keyof Database },
2027
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
2028
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
2029
+ : never = never,
2030
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
2031
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2032
+ Insert: infer I
2033
+ }
2034
+ ? I
2035
+ : never
2036
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
2037
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
2038
+ Insert: infer I
2039
+ }
2040
+ ? I
2041
+ : never
2042
+ : never
2043
+
2044
+ export type TablesUpdate<
2045
+ PublicTableNameOrOptions extends
2046
+ | keyof PublicSchema["Tables"]
2047
+ | { schema: keyof Database },
2048
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
2049
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
2050
+ : never = never,
2051
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
2052
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2053
+ Update: infer U
2054
+ }
2055
+ ? U
2056
+ : never
2057
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
2058
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
2059
+ Update: infer U
2060
+ }
2061
+ ? U
2062
+ : never
2063
+ : never
2064
+
2065
+ export type Enums<
2066
+ PublicEnumNameOrOptions extends
2067
+ | keyof PublicSchema["Enums"]
2068
+ | { schema: keyof Database },
2069
+ EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
2070
+ ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
2071
+ : never = never,
2072
+ > = PublicEnumNameOrOptions extends { schema: keyof Database }
2073
+ ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
2074
+ : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
2075
+ ? PublicSchema["Enums"][PublicEnumNameOrOptions]
2076
+ : never
2077
+
2
2078
 
3
- export type Database = {
4
- graphql_public: {
5
- Tables: {
6
- [_ in never]: never
7
- }
8
- Views: {
9
- [_ in never]: never
10
- }
11
- Functions: {
12
- graphql: {
13
- Args: {
14
- operationName?: string
15
- query?: string
16
- variables?: Json
17
- extensions?: Json
18
- }
19
- Returns: Json
20
- }
21
- }
22
- Enums: {
23
- [_ in never]: never
24
- }
25
- CompositeTypes: {
26
- [_ in never]: never
27
- }
28
- }
29
- public: {
30
- Tables: {
31
- tbl_broadcast_logs: {
32
- Row: {
33
- broadcast_id: string
34
- chat_id: string
35
- completed_at: string | null
36
- created_at: string
37
- delivered_count: number | null
38
- delivery_info: Json | null
39
- is_success: boolean | null
40
- member_count: number | null
41
- message_id: string | null
42
- org_id: string
43
- org_phone: string | null
44
- read_count: number | null
45
- }
46
- Insert: {
47
- broadcast_id: string
48
- chat_id: string
49
- completed_at?: string | null
50
- created_at?: string
51
- delivered_count?: number | null
52
- delivery_info?: Json | null
53
- is_success?: boolean | null
54
- member_count?: number | null
55
- message_id?: string | null
56
- org_id: string
57
- org_phone?: string | null
58
- read_count?: number | null
59
- }
60
- Update: {
61
- broadcast_id?: string
62
- chat_id?: string
63
- completed_at?: string | null
64
- created_at?: string
65
- delivered_count?: number | null
66
- delivery_info?: Json | null
67
- is_success?: boolean | null
68
- member_count?: number | null
69
- message_id?: string | null
70
- org_id?: string
71
- org_phone?: string | null
72
- read_count?: number | null
73
- }
74
- Relationships: [
75
- {
76
- foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey"
77
- columns: ["broadcast_id"]
78
- referencedRelation: "tbl_broadcast_messages"
79
- referencedColumns: ["broadcast_id"]
80
- },
81
- {
82
- foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey"
83
- columns: ["broadcast_id"]
84
- referencedRelation: "view_broadcast_logs"
85
- referencedColumns: ["broadcast_id"]
86
- },
87
- {
88
- foreignKeyName: "tbl_broadcast_logs_org_id_fkey"
89
- columns: ["org_id"]
90
- referencedRelation: "tbl_org"
91
- referencedColumns: ["org_id"]
92
- },
93
- {
94
- foreignKeyName: "tbl_broadcast_logs_org_id_fkey"
95
- columns: ["org_id"]
96
- referencedRelation: "view_org"
97
- referencedColumns: ["org_id"]
98
- }
99
- ]
100
- }
101
- tbl_broadcast_messages: {
102
- Row: {
103
- broadcast_id: string
104
- broadcast_status: string | null
105
- chat_ids: string[] | null
106
- created_at: string
107
- message_payload: Json | null
108
- org_id: string
109
- performed_at: string | null
110
- performed_by: string | null
111
- scheduled_at: string | null
112
- }
113
- Insert: {
114
- broadcast_id?: string
115
- broadcast_status?: string | null
116
- chat_ids?: string[] | null
117
- created_at?: string
118
- message_payload?: Json | null
119
- org_id: string
120
- performed_at?: string | null
121
- performed_by?: string | null
122
- scheduled_at?: string | null
123
- }
124
- Update: {
125
- broadcast_id?: string
126
- broadcast_status?: string | null
127
- chat_ids?: string[] | null
128
- created_at?: string
129
- message_payload?: Json | null
130
- org_id?: string
131
- performed_at?: string | null
132
- performed_by?: string | null
133
- scheduled_at?: string | null
134
- }
135
- Relationships: [
136
- {
137
- foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
138
- columns: ["org_id"]
139
- referencedRelation: "tbl_org"
140
- referencedColumns: ["org_id"]
141
- },
142
- {
143
- foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
144
- columns: ["org_id"]
145
- referencedRelation: "view_org"
146
- referencedColumns: ["org_id"]
147
- }
148
- ]
149
- }
150
- tbl_broadcast_templates: {
151
- Row: {
152
- created_at: string
153
- message_payload: Json | null
154
- org_id: string
155
- template_id: string
156
- template_name: string | null
157
- updated_at: string | null
158
- }
159
- Insert: {
160
- created_at?: string
161
- message_payload?: Json | null
162
- org_id: string
163
- template_id?: string
164
- template_name?: string | null
165
- updated_at?: string | null
166
- }
167
- Update: {
168
- created_at?: string
169
- message_payload?: Json | null
170
- org_id?: string
171
- template_id?: string
172
- template_name?: string | null
173
- updated_at?: string | null
174
- }
175
- Relationships: [
176
- {
177
- foreignKeyName: "tbl_broadcast_templates_org_id_fkey"
178
- columns: ["org_id"]
179
- referencedRelation: "tbl_org"
180
- referencedColumns: ["org_id"]
181
- },
182
- {
183
- foreignKeyName: "tbl_broadcast_templates_org_id_fkey"
184
- columns: ["org_id"]
185
- referencedRelation: "view_org"
186
- referencedColumns: ["org_id"]
187
- }
188
- ]
189
- }
190
- tbl_chat_access: {
191
- Row: {
192
- active_phone: string | null
193
- chat_id: string
194
- email: string
195
- has_access: boolean | null
196
- last_read_timestamp: string | null
197
- message_unread_count: number | null
198
- org_id: string
199
- }
200
- Insert: {
201
- active_phone?: string | null
202
- chat_id: string
203
- email: string
204
- has_access?: boolean | null
205
- last_read_timestamp?: string | null
206
- message_unread_count?: number | null
207
- org_id: string
208
- }
209
- Update: {
210
- active_phone?: string | null
211
- chat_id?: string
212
- email?: string
213
- has_access?: boolean | null
214
- last_read_timestamp?: string | null
215
- message_unread_count?: number | null
216
- org_id?: string
217
- }
218
- Relationships: [
219
- {
220
- foreignKeyName: "tbl_chat_access_org_id_email_fkey"
221
- columns: ["org_id", "email"]
222
- referencedRelation: "tbl_org_members"
223
- referencedColumns: ["org_id", "email"]
224
- }
225
- ]
226
- }
227
- tbl_chat_messages: {
228
- Row: {
229
- ack: string | null
230
- author: string | null
231
- body: string | null
232
- broadcast: boolean | null
233
- broadcast_id: string | null
234
- chat_id: string | null
235
- delivery_info: Json | null
236
- device_type: string | null
237
- duration: string | null
238
- flag_metadata: Json | null
239
- flag_response_time: number | null
240
- forwarding_score: number | null
241
- from: string | null
242
- from_me: boolean | null
243
- has_media: boolean | null
244
- has_quoted_msg: boolean | null
245
- has_reaction: boolean | null
246
- id: Json | null
247
- invite_v4: Json | null
248
- is_deleted: boolean | null
249
- is_ephemeral: boolean | null
250
- is_forwarded: boolean | null
251
- is_gif: boolean | null
252
- is_starred: boolean | null
253
- is_status: boolean | null
254
- links: Json | null
255
- location: Json | null
256
- media: Json | null
257
- media_key: string | null
258
- mentioned_ids: string[] | null
259
- message_id: string
260
- message_ticket_id: string | null
261
- message_type: string | null
262
- order_id: string | null
263
- org_id: string
264
- org_phone: string
265
- performed_by: string | null
266
- prev_body: string | null
267
- quoted_message_id: string | null
268
- raw_data: Json | null
269
- sender_phone: string | null
270
- sent_message_id: string | null
271
- timestamp: string | null
272
- to: string | null
273
- token: string | null
274
- unique_id: string | null
275
- updated_at: string | null
276
- vcards: string[] | null
277
- }
278
- Insert: {
279
- ack?: string | null
280
- author?: string | null
281
- body?: string | null
282
- broadcast?: boolean | null
283
- broadcast_id?: string | null
284
- chat_id?: string | null
285
- delivery_info?: Json | null
286
- device_type?: string | null
287
- duration?: string | null
288
- flag_metadata?: Json | null
289
- flag_response_time?: number | null
290
- forwarding_score?: number | null
291
- from?: string | null
292
- from_me?: boolean | null
293
- has_media?: boolean | null
294
- has_quoted_msg?: boolean | null
295
- has_reaction?: boolean | null
296
- id?: Json | null
297
- invite_v4?: Json | null
298
- is_deleted?: boolean | null
299
- is_ephemeral?: boolean | null
300
- is_forwarded?: boolean | null
301
- is_gif?: boolean | null
302
- is_starred?: boolean | null
303
- is_status?: boolean | null
304
- links?: Json | null
305
- location?: Json | null
306
- media?: Json | null
307
- media_key?: string | null
308
- mentioned_ids?: string[] | null
309
- message_id: string
310
- message_ticket_id?: string | null
311
- message_type?: string | null
312
- order_id?: string | null
313
- org_id: string
314
- org_phone: string
315
- performed_by?: string | null
316
- prev_body?: string | null
317
- quoted_message_id?: string | null
318
- raw_data?: Json | null
319
- sender_phone?: string | null
320
- sent_message_id?: string | null
321
- timestamp?: string | null
322
- to?: string | null
323
- token?: string | null
324
- unique_id?: string | null
325
- updated_at?: string | null
326
- vcards?: string[] | null
327
- }
328
- Update: {
329
- ack?: string | null
330
- author?: string | null
331
- body?: string | null
332
- broadcast?: boolean | null
333
- broadcast_id?: string | null
334
- chat_id?: string | null
335
- delivery_info?: Json | null
336
- device_type?: string | null
337
- duration?: string | null
338
- flag_metadata?: Json | null
339
- flag_response_time?: number | null
340
- forwarding_score?: number | null
341
- from?: string | null
342
- from_me?: boolean | null
343
- has_media?: boolean | null
344
- has_quoted_msg?: boolean | null
345
- has_reaction?: boolean | null
346
- id?: Json | null
347
- invite_v4?: Json | null
348
- is_deleted?: boolean | null
349
- is_ephemeral?: boolean | null
350
- is_forwarded?: boolean | null
351
- is_gif?: boolean | null
352
- is_starred?: boolean | null
353
- is_status?: boolean | null
354
- links?: Json | null
355
- location?: Json | null
356
- media?: Json | null
357
- media_key?: string | null
358
- mentioned_ids?: string[] | null
359
- message_id?: string
360
- message_ticket_id?: string | null
361
- message_type?: string | null
362
- order_id?: string | null
363
- org_id?: string
364
- org_phone?: string
365
- performed_by?: string | null
366
- prev_body?: string | null
367
- quoted_message_id?: string | null
368
- raw_data?: Json | null
369
- sender_phone?: string | null
370
- sent_message_id?: string | null
371
- timestamp?: string | null
372
- to?: string | null
373
- token?: string | null
374
- unique_id?: string | null
375
- updated_at?: string | null
376
- vcards?: string[] | null
377
- }
378
- Relationships: [
379
- {
380
- foreignKeyName: "tbl_chat_messages_fkey_tbl_org_phones"
381
- columns: ["org_phone", "org_id"]
382
- referencedRelation: "tbl_org_phones"
383
- referencedColumns: ["org_phone", "org_id"]
384
- }
385
- ]
386
- }
387
- tbl_chat_notifications: {
388
- Row: {
389
- author: string | null
390
- body: string | null
391
- chat_id: string | null
392
- id: Json | null
393
- notification_id: string
394
- org_id: string
395
- org_phone: string
396
- recipientids: string[] | null
397
- timestamp: string | null
398
- type: string | null
399
- unique_id: string | null
400
- }
401
- Insert: {
402
- author?: string | null
403
- body?: string | null
404
- chat_id?: string | null
405
- id?: Json | null
406
- notification_id: string
407
- org_id: string
408
- org_phone: string
409
- recipientids?: string[] | null
410
- timestamp?: string | null
411
- type?: string | null
412
- unique_id?: string | null
413
- }
414
- Update: {
415
- author?: string | null
416
- body?: string | null
417
- chat_id?: string | null
418
- id?: Json | null
419
- notification_id?: string
420
- org_id?: string
421
- org_phone?: string
422
- recipientids?: string[] | null
423
- timestamp?: string | null
424
- type?: string | null
425
- unique_id?: string | null
426
- }
427
- Relationships: [
428
- {
429
- foreignKeyName: "tbl_chat_notifications_fkey_tbl_org_phones"
430
- columns: ["org_id", "org_phone"]
431
- referencedRelation: "tbl_org_phones"
432
- referencedColumns: ["org_id", "org_phone"]
433
- }
434
- ]
435
- }
436
- tbl_chat_participants: {
437
- Row: {
438
- chat_id: string
439
- contact_id: string
440
- id: Json | null
441
- is_admin: boolean | null
442
- is_super_admin: boolean | null
443
- org_id: string
444
- org_phone: string
445
- }
446
- Insert: {
447
- chat_id: string
448
- contact_id: string
449
- id?: Json | null
450
- is_admin?: boolean | null
451
- is_super_admin?: boolean | null
452
- org_id: string
453
- org_phone: string
454
- }
455
- Update: {
456
- chat_id?: string
457
- contact_id?: string
458
- id?: Json | null
459
- is_admin?: boolean | null
460
- is_super_admin?: boolean | null
461
- org_id?: string
462
- org_phone?: string
463
- }
464
- Relationships: [
465
- {
466
- foreignKeyName: "tbl_chat_participants_fkey_tbl_chats"
467
- columns: ["org_id", "org_phone", "chat_id"]
468
- referencedRelation: "tbl_chats"
469
- referencedColumns: ["org_id", "org_phone", "chat_id"]
470
- }
471
- ]
472
- }
473
- tbl_chat_properties: {
474
- Row: {
475
- chat_id: string
476
- custom_properties: Json | null
477
- flag_count: number
478
- hubspot_metadata: Json | null
479
- label_ids: Json | null
480
- org_id: string
481
- }
482
- Insert: {
483
- chat_id: string
484
- custom_properties?: Json | null
485
- flag_count?: number
486
- hubspot_metadata?: Json | null
487
- label_ids?: Json | null
488
- org_id: string
489
- }
490
- Update: {
491
- chat_id?: string
492
- custom_properties?: Json | null
493
- flag_count?: number
494
- hubspot_metadata?: Json | null
495
- label_ids?: Json | null
496
- org_id?: string
497
- }
498
- Relationships: []
499
- }
500
- tbl_chat_reactions: {
501
- Row: {
502
- ack: number | null
503
- chat_id: string | null
504
- id: Json | null
505
- message_id: string
506
- msg_id: Json | null
507
- org_id: string
508
- org_phone: string
509
- orphan: number | null
510
- orphan_reason: string | null
511
- reaction: string | null
512
- reaction_id: string
513
- read: boolean | null
514
- sender_id: string
515
- timestamp: string | null
516
- unique_id: string | null
517
- }
518
- Insert: {
519
- ack?: number | null
520
- chat_id?: string | null
521
- id?: Json | null
522
- message_id: string
523
- msg_id?: Json | null
524
- org_id: string
525
- org_phone: string
526
- orphan?: number | null
527
- orphan_reason?: string | null
528
- reaction?: string | null
529
- reaction_id: string
530
- read?: boolean | null
531
- sender_id: string
532
- timestamp?: string | null
533
- unique_id?: string | null
534
- }
535
- Update: {
536
- ack?: number | null
537
- chat_id?: string | null
538
- id?: Json | null
539
- message_id?: string
540
- msg_id?: Json | null
541
- org_id?: string
542
- org_phone?: string
543
- orphan?: number | null
544
- orphan_reason?: string | null
545
- reaction?: string | null
546
- reaction_id?: string
547
- read?: boolean | null
548
- sender_id?: string
549
- timestamp?: string | null
550
- unique_id?: string | null
551
- }
552
- Relationships: [
553
- {
554
- foreignKeyName: "tbl_chat_reactions_fkey_tbl_org_phones"
555
- columns: ["org_id", "org_phone"]
556
- referencedRelation: "tbl_org_phones"
557
- referencedColumns: ["org_id", "org_phone"]
558
- }
559
- ]
560
- }
561
- tbl_chat_tickets: {
562
- Row: {
563
- assigned_by: string | null
564
- assignee: string | null
565
- chat_id: string
566
- created_at: string
567
- due_date: string | null
568
- hubspot_metadata: Json | null
569
- is_deleted: boolean
570
- label_ids: Json | null
571
- last_updated_at: string
572
- org_id: string
573
- priority: number | null
574
- quoted_message_id: string | null
575
- raised_by: string | null
576
- status: Database["public"]["Enums"]["enum_chat_tickets_status"] | null
577
- subject: string
578
- ticket_id: string
579
- }
580
- Insert: {
581
- assigned_by?: string | null
582
- assignee?: string | null
583
- chat_id: string
584
- created_at?: string
585
- due_date?: string | null
586
- hubspot_metadata?: Json | null
587
- is_deleted?: boolean
588
- label_ids?: Json | null
589
- last_updated_at?: string
590
- org_id: string
591
- priority?: number | null
592
- quoted_message_id?: string | null
593
- raised_by?: string | null
594
- status?:
595
- | Database["public"]["Enums"]["enum_chat_tickets_status"]
596
- | null
597
- subject: string
598
- ticket_id?: string
599
- }
600
- Update: {
601
- assigned_by?: string | null
602
- assignee?: string | null
603
- chat_id?: string
604
- created_at?: string
605
- due_date?: string | null
606
- hubspot_metadata?: Json | null
607
- is_deleted?: boolean
608
- label_ids?: Json | null
609
- last_updated_at?: string
610
- org_id?: string
611
- priority?: number | null
612
- quoted_message_id?: string | null
613
- raised_by?: string | null
614
- status?:
615
- | Database["public"]["Enums"]["enum_chat_tickets_status"]
616
- | null
617
- subject?: string
618
- ticket_id?: string
619
- }
620
- Relationships: [
621
- {
622
- foreignKeyName: "tbl_chat_tickets_org_id_fkey"
623
- columns: ["org_id"]
624
- referencedRelation: "tbl_org"
625
- referencedColumns: ["org_id"]
626
- },
627
- {
628
- foreignKeyName: "tbl_chat_tickets_org_id_fkey"
629
- columns: ["org_id"]
630
- referencedRelation: "view_org"
631
- referencedColumns: ["org_id"]
632
- }
633
- ]
634
- }
635
- tbl_chats: {
636
- Row: {
637
- archived: boolean | null
638
- chat_id: string
639
- chat_image: string | null
640
- chat_name: string | null
641
- chat_type: string | null
642
- created_at: string
643
- group_metadata: Json | null
644
- id: Json | null
645
- invite_link: string | null
646
- is_group: boolean | null
647
- is_muted: boolean | null
648
- is_read_only: boolean | null
649
- latest_message: Json | null
650
- member_count: number | null
651
- mute_expiration: number | null
652
- name: string | null
653
- org_id: string
654
- org_phone: string
655
- pinned: boolean | null
656
- timestamp: string | null
657
- unread_count: number | null
658
- updated_at: string
659
- }
660
- Insert: {
661
- archived?: boolean | null
662
- chat_id: string
663
- chat_image?: string | null
664
- chat_name?: string | null
665
- chat_type?: string | null
666
- created_at?: string
667
- group_metadata?: Json | null
668
- id?: Json | null
669
- invite_link?: string | null
670
- is_group?: boolean | null
671
- is_muted?: boolean | null
672
- is_read_only?: boolean | null
673
- latest_message?: Json | null
674
- member_count?: number | null
675
- mute_expiration?: number | null
676
- name?: string | null
677
- org_id: string
678
- org_phone: string
679
- pinned?: boolean | null
680
- timestamp?: string | null
681
- unread_count?: number | null
682
- updated_at?: string
683
- }
684
- Update: {
685
- archived?: boolean | null
686
- chat_id?: string
687
- chat_image?: string | null
688
- chat_name?: string | null
689
- chat_type?: string | null
690
- created_at?: string
691
- group_metadata?: Json | null
692
- id?: Json | null
693
- invite_link?: string | null
694
- is_group?: boolean | null
695
- is_muted?: boolean | null
696
- is_read_only?: boolean | null
697
- latest_message?: Json | null
698
- member_count?: number | null
699
- mute_expiration?: number | null
700
- name?: string | null
701
- org_id?: string
702
- org_phone?: string
703
- pinned?: boolean | null
704
- timestamp?: string | null
705
- unread_count?: number | null
706
- updated_at?: string
707
- }
708
- Relationships: [
709
- {
710
- foreignKeyName: "tbl_chats_fkey_tbl_org_phones"
711
- columns: ["org_phone", "org_id"]
712
- referencedRelation: "tbl_org_phones"
713
- referencedColumns: ["org_phone", "org_id"]
714
- }
715
- ]
716
- }
717
- tbl_contacts: {
718
- Row: {
719
- business_profile: Json | null
720
- contact_color: Database["public"]["Enums"]["enum_chat_colors"] | null
721
- contact_id: string
722
- contact_image: string | null
723
- contact_name: string | null
724
- contact_type: string | null
725
- id: Json | null
726
- is_blocked: boolean | null
727
- is_business: boolean | null
728
- is_enterprise: boolean | null
729
- is_group: boolean | null
730
- is_internal: boolean | null
731
- is_me: boolean | null
732
- is_my_contact: boolean | null
733
- is_user: boolean | null
734
- is_wa_contact: boolean | null
735
- label_ids: Json
736
- name: string | null
737
- number: string | null
738
- org_id: string
739
- pushname: string | null
740
- short_name: string | null
741
- updated_at: string | null
742
- verified_level: number | null
743
- verified_name: string | null
744
- }
745
- Insert: {
746
- business_profile?: Json | null
747
- contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
748
- contact_id: string
749
- contact_image?: string | null
750
- contact_name?: string | null
751
- contact_type?: string | null
752
- id?: Json | null
753
- is_blocked?: boolean | null
754
- is_business?: boolean | null
755
- is_enterprise?: boolean | null
756
- is_group?: boolean | null
757
- is_internal?: boolean | null
758
- is_me?: boolean | null
759
- is_my_contact?: boolean | null
760
- is_user?: boolean | null
761
- is_wa_contact?: boolean | null
762
- label_ids?: Json
763
- name?: string | null
764
- number?: string | null
765
- org_id: string
766
- pushname?: string | null
767
- short_name?: string | null
768
- updated_at?: string | null
769
- verified_level?: number | null
770
- verified_name?: string | null
771
- }
772
- Update: {
773
- business_profile?: Json | null
774
- contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
775
- contact_id?: string
776
- contact_image?: string | null
777
- contact_name?: string | null
778
- contact_type?: string | null
779
- id?: Json | null
780
- is_blocked?: boolean | null
781
- is_business?: boolean | null
782
- is_enterprise?: boolean | null
783
- is_group?: boolean | null
784
- is_internal?: boolean | null
785
- is_me?: boolean | null
786
- is_my_contact?: boolean | null
787
- is_user?: boolean | null
788
- is_wa_contact?: boolean | null
789
- label_ids?: Json
790
- name?: string | null
791
- number?: string | null
792
- org_id?: string
793
- pushname?: string | null
794
- short_name?: string | null
795
- updated_at?: string | null
796
- verified_level?: number | null
797
- verified_name?: string | null
798
- }
799
- Relationships: [
800
- {
801
- foreignKeyName: "tbl_contacts_org_id_fkey"
802
- columns: ["org_id"]
803
- referencedRelation: "tbl_org"
804
- referencedColumns: ["org_id"]
805
- },
806
- {
807
- foreignKeyName: "tbl_contacts_org_id_fkey"
808
- columns: ["org_id"]
809
- referencedRelation: "view_org"
810
- referencedColumns: ["org_id"]
811
- }
812
- ]
813
- }
814
- tbl_custom_properties: {
815
- Row: {
816
- created_at: string
817
- created_by: string | null
818
- org_id: string | null
819
- property_id: string
820
- property_name: string
821
- property_value: string | null
822
- property_value_type: string | null
823
- type: string | null
824
- }
825
- Insert: {
826
- created_at?: string
827
- created_by?: string | null
828
- org_id?: string | null
829
- property_id?: string
830
- property_name: string
831
- property_value?: string | null
832
- property_value_type?: string | null
833
- type?: string | null
834
- }
835
- Update: {
836
- created_at?: string
837
- created_by?: string | null
838
- org_id?: string | null
839
- property_id?: string
840
- property_name?: string
841
- property_value?: string | null
842
- property_value_type?: string | null
843
- type?: string | null
844
- }
845
- Relationships: [
846
- {
847
- foreignKeyName: "tbl_custom_properties_org_id_fkey"
848
- columns: ["org_id"]
849
- referencedRelation: "tbl_org"
850
- referencedColumns: ["org_id"]
851
- },
852
- {
853
- foreignKeyName: "tbl_custom_properties_org_id_fkey"
854
- columns: ["org_id"]
855
- referencedRelation: "view_org"
856
- referencedColumns: ["org_id"]
857
- }
858
- ]
859
- }
860
- tbl_integration_hooks: {
861
- Row: {
862
- hook_url: string
863
- id: string
864
- integration_id: string | null
865
- integration_metadata: Json
866
- integration_name: Database["public"]["Enums"]["enum_integration_name"]
867
- integration_type: string
868
- is_subscribed: boolean
869
- org_id: string
870
- subscribed_at: string
871
- type: Database["public"]["Enums"]["enum_integration_type"]
872
- }
873
- Insert: {
874
- hook_url: string
875
- id?: string
876
- integration_id?: string | null
877
- integration_metadata: Json
878
- integration_name: Database["public"]["Enums"]["enum_integration_name"]
879
- integration_type: string
880
- is_subscribed: boolean
881
- org_id: string
882
- subscribed_at?: string
883
- type: Database["public"]["Enums"]["enum_integration_type"]
884
- }
885
- Update: {
886
- hook_url?: string
887
- id?: string
888
- integration_id?: string | null
889
- integration_metadata?: Json
890
- integration_name?: Database["public"]["Enums"]["enum_integration_name"]
891
- integration_type?: string
892
- is_subscribed?: boolean
893
- org_id?: string
894
- subscribed_at?: string
895
- type?: Database["public"]["Enums"]["enum_integration_type"]
896
- }
897
- Relationships: [
898
- {
899
- foreignKeyName: "tbl_integration_hooks_org_id_fkey"
900
- columns: ["org_id"]
901
- referencedRelation: "tbl_org"
902
- referencedColumns: ["org_id"]
903
- },
904
- {
905
- foreignKeyName: "tbl_integration_hooks_org_id_fkey"
906
- columns: ["org_id"]
907
- referencedRelation: "view_org"
908
- referencedColumns: ["org_id"]
909
- }
910
- ]
911
- }
912
- tbl_integration_logs: {
913
- Row: {
914
- created_at: string
915
- id: string
916
- integration_name: Database["public"]["Enums"]["enum_integration_name"]
917
- integration_type: string
918
- metadata: Json
919
- org_id: string
920
- response: Json | null
921
- success: boolean
922
- type: Database["public"]["Enums"]["enum_integration_type"]
923
- }
924
- Insert: {
925
- created_at?: string
926
- id?: string
927
- integration_name: Database["public"]["Enums"]["enum_integration_name"]
928
- integration_type: string
929
- metadata?: Json
930
- org_id: string
931
- response?: Json | null
932
- success?: boolean
933
- type: Database["public"]["Enums"]["enum_integration_type"]
934
- }
935
- Update: {
936
- created_at?: string
937
- id?: string
938
- integration_name?: Database["public"]["Enums"]["enum_integration_name"]
939
- integration_type?: string
940
- metadata?: Json
941
- org_id?: string
942
- response?: Json | null
943
- success?: boolean
944
- type?: Database["public"]["Enums"]["enum_integration_type"]
945
- }
946
- Relationships: [
947
- {
948
- foreignKeyName: "tbl_integration_logs_org_id_fkey"
949
- columns: ["org_id"]
950
- referencedRelation: "tbl_org"
951
- referencedColumns: ["org_id"]
952
- },
953
- {
954
- foreignKeyName: "tbl_integration_logs_org_id_fkey"
955
- columns: ["org_id"]
956
- referencedRelation: "view_org"
957
- referencedColumns: ["org_id"]
958
- }
959
- ]
960
- }
961
- tbl_integration_tokens: {
962
- Row: {
963
- exp: string
964
- iat: string
965
- id: string
966
- is_revealed: boolean
967
- name: string
968
- org_id: string
969
- role: string
970
- token: string
971
- token_metadata: Json | null
972
- type: Database["public"]["Enums"]["enum_integration_type"]
973
- }
974
- Insert: {
975
- exp: string
976
- iat: string
977
- id?: string
978
- is_revealed?: boolean
979
- name: string
980
- org_id: string
981
- role: string
982
- token: string
983
- token_metadata?: Json | null
984
- type: Database["public"]["Enums"]["enum_integration_type"]
985
- }
986
- Update: {
987
- exp?: string
988
- iat?: string
989
- id?: string
990
- is_revealed?: boolean
991
- name?: string
992
- org_id?: string
993
- role?: string
994
- token?: string
995
- token_metadata?: Json | null
996
- type?: Database["public"]["Enums"]["enum_integration_type"]
997
- }
998
- Relationships: [
999
- {
1000
- foreignKeyName: "public_tbl_integration_tokens_org_id_fkey"
1001
- columns: ["org_id"]
1002
- referencedRelation: "tbl_org"
1003
- referencedColumns: ["org_id"]
1004
- },
1005
- {
1006
- foreignKeyName: "public_tbl_integration_tokens_org_id_fkey"
1007
- columns: ["org_id"]
1008
- referencedRelation: "view_org"
1009
- referencedColumns: ["org_id"]
1010
- }
1011
- ]
1012
- }
1013
- tbl_org: {
1014
- Row: {
1015
- created_at: string
1016
- org_id: string
1017
- org_image: string | null
1018
- org_metadata: Json | null
1019
- org_name: string | null
1020
- org_plan: Json | null
1021
- stripe_customer_details: Json | null
1022
- stripe_customer_id: string | null
1023
- stripe_subscription_details: Json | null
1024
- support_link: string | null
1025
- }
1026
- Insert: {
1027
- created_at?: string
1028
- org_id?: string
1029
- org_image?: string | null
1030
- org_metadata?: Json | null
1031
- org_name?: string | null
1032
- org_plan?: Json | null
1033
- stripe_customer_details?: Json | null
1034
- stripe_customer_id?: string | null
1035
- stripe_subscription_details?: Json | null
1036
- support_link?: string | null
1037
- }
1038
- Update: {
1039
- created_at?: string
1040
- org_id?: string
1041
- org_image?: string | null
1042
- org_metadata?: Json | null
1043
- org_name?: string | null
1044
- org_plan?: Json | null
1045
- stripe_customer_details?: Json | null
1046
- stripe_customer_id?: string | null
1047
- stripe_subscription_details?: Json | null
1048
- support_link?: string | null
1049
- }
1050
- Relationships: []
1051
- }
1052
- tbl_org_labels: {
1053
- Row: {
1054
- color: string
1055
- created_at: string
1056
- label_id: string
1057
- name: string
1058
- org_id: string
1059
- type: string
1060
- }
1061
- Insert: {
1062
- color?: string
1063
- created_at?: string
1064
- label_id?: string
1065
- name: string
1066
- org_id: string
1067
- type?: string
1068
- }
1069
- Update: {
1070
- color?: string
1071
- created_at?: string
1072
- label_id?: string
1073
- name?: string
1074
- org_id?: string
1075
- type?: string
1076
- }
1077
- Relationships: [
1078
- {
1079
- foreignKeyName: "tbl_org_labels_org_id_fkey"
1080
- columns: ["org_id"]
1081
- referencedRelation: "tbl_org"
1082
- referencedColumns: ["org_id"]
1083
- },
1084
- {
1085
- foreignKeyName: "tbl_org_labels_org_id_fkey"
1086
- columns: ["org_id"]
1087
- referencedRelation: "view_org"
1088
- referencedColumns: ["org_id"]
1089
- }
1090
- ]
1091
- }
1092
- tbl_org_members: {
1093
- Row: {
1094
- created_at: string | null
1095
- email: string
1096
- invited_at: string | null
1097
- invited_by: string | null
1098
- is_active: boolean
1099
- is_owner: boolean | null
1100
- label_ids: string[] | null
1101
- member_color: Database["public"]["Enums"]["enum_chat_colors"]
1102
- member_image: string | null
1103
- member_name: string | null
1104
- org_id: string
1105
- org_phones: string[] | null
1106
- preferences: Json
1107
- role: Database["public"]["Enums"]["enum_member_role"]
1108
- user_id: string | null
1109
- }
1110
- Insert: {
1111
- created_at?: string | null
1112
- email: string
1113
- invited_at?: string | null
1114
- invited_by?: string | null
1115
- is_active?: boolean
1116
- is_owner?: boolean | null
1117
- label_ids?: string[] | null
1118
- member_color?: Database["public"]["Enums"]["enum_chat_colors"]
1119
- member_image?: string | null
1120
- member_name?: string | null
1121
- org_id: string
1122
- org_phones?: string[] | null
1123
- preferences?: Json
1124
- role?: Database["public"]["Enums"]["enum_member_role"]
1125
- user_id?: string | null
1126
- }
1127
- Update: {
1128
- created_at?: string | null
1129
- email?: string
1130
- invited_at?: string | null
1131
- invited_by?: string | null
1132
- is_active?: boolean
1133
- is_owner?: boolean | null
1134
- label_ids?: string[] | null
1135
- member_color?: Database["public"]["Enums"]["enum_chat_colors"]
1136
- member_image?: string | null
1137
- member_name?: string | null
1138
- org_id?: string
1139
- org_phones?: string[] | null
1140
- preferences?: Json
1141
- role?: Database["public"]["Enums"]["enum_member_role"]
1142
- user_id?: string | null
1143
- }
1144
- Relationships: [
1145
- {
1146
- foreignKeyName: "tbl_org_members_fkey_auth_users"
1147
- columns: ["user_id"]
1148
- referencedRelation: "users"
1149
- referencedColumns: ["id"]
1150
- },
1151
- {
1152
- foreignKeyName: "tbl_org_members_fkey_tbl_org"
1153
- columns: ["org_id"]
1154
- referencedRelation: "tbl_org"
1155
- referencedColumns: ["org_id"]
1156
- },
1157
- {
1158
- foreignKeyName: "tbl_org_members_fkey_tbl_org"
1159
- columns: ["org_id"]
1160
- referencedRelation: "view_org"
1161
- referencedColumns: ["org_id"]
1162
- }
1163
- ]
1164
- }
1165
- tbl_org_phones: {
1166
- Row: {
1167
- created_at: string
1168
- first_connected_at: string | null
1169
- is_browser_open: boolean
1170
- is_ready: boolean | null
1171
- legacy_version: boolean | null
1172
- org_id: string
1173
- org_phone: string | null
1174
- phone_id: string
1175
- phone_image: string | null
1176
- phone_name: string | null
1177
- phone_state: Json | null
1178
- qr_code: string | null
1179
- server_ip: string | null
1180
- updated_at: string | null
1181
- wa_state: string | null
1182
- wa_version: string | null
1183
- }
1184
- Insert: {
1185
- created_at?: string
1186
- first_connected_at?: string | null
1187
- is_browser_open?: boolean
1188
- is_ready?: boolean | null
1189
- legacy_version?: boolean | null
1190
- org_id: string
1191
- org_phone?: string | null
1192
- phone_id?: string
1193
- phone_image?: string | null
1194
- phone_name?: string | null
1195
- phone_state?: Json | null
1196
- qr_code?: string | null
1197
- server_ip?: string | null
1198
- updated_at?: string | null
1199
- wa_state?: string | null
1200
- wa_version?: string | null
1201
- }
1202
- Update: {
1203
- created_at?: string
1204
- first_connected_at?: string | null
1205
- is_browser_open?: boolean
1206
- is_ready?: boolean | null
1207
- legacy_version?: boolean | null
1208
- org_id?: string
1209
- org_phone?: string | null
1210
- phone_id?: string
1211
- phone_image?: string | null
1212
- phone_name?: string | null
1213
- phone_state?: Json | null
1214
- qr_code?: string | null
1215
- server_ip?: string | null
1216
- updated_at?: string | null
1217
- wa_state?: string | null
1218
- wa_version?: string | null
1219
- }
1220
- Relationships: [
1221
- {
1222
- foreignKeyName: "tbl_org_phones_fkey_tbl_org"
1223
- columns: ["org_id"]
1224
- referencedRelation: "tbl_org"
1225
- referencedColumns: ["org_id"]
1226
- },
1227
- {
1228
- foreignKeyName: "tbl_org_phones_fkey_tbl_org"
1229
- columns: ["org_id"]
1230
- referencedRelation: "view_org"
1231
- referencedColumns: ["org_id"]
1232
- },
1233
- {
1234
- foreignKeyName: "tbl_org_phones_org_id_fkey"
1235
- columns: ["org_id"]
1236
- referencedRelation: "tbl_org"
1237
- referencedColumns: ["org_id"]
1238
- },
1239
- {
1240
- foreignKeyName: "tbl_org_phones_org_id_fkey"
1241
- columns: ["org_id"]
1242
- referencedRelation: "view_org"
1243
- referencedColumns: ["org_id"]
1244
- }
1245
- ]
1246
- }
1247
- tbl_quick_replies: {
1248
- Row: {
1249
- command: string | null
1250
- created_at: string
1251
- message_payload: Json | null
1252
- org_id: string | null
1253
- reply_id: string
1254
- }
1255
- Insert: {
1256
- command?: string | null
1257
- created_at?: string
1258
- message_payload?: Json | null
1259
- org_id?: string | null
1260
- reply_id?: string
1261
- }
1262
- Update: {
1263
- command?: string | null
1264
- created_at?: string
1265
- message_payload?: Json | null
1266
- org_id?: string | null
1267
- reply_id?: string
1268
- }
1269
- Relationships: [
1270
- {
1271
- foreignKeyName: "tbl_quick_replies_org_id_fkey"
1272
- columns: ["org_id"]
1273
- referencedRelation: "tbl_org"
1274
- referencedColumns: ["org_id"]
1275
- },
1276
- {
1277
- foreignKeyName: "tbl_quick_replies_org_id_fkey"
1278
- columns: ["org_id"]
1279
- referencedRelation: "view_org"
1280
- referencedColumns: ["org_id"]
1281
- }
1282
- ]
1283
- }
1284
- tbl_tools_whatsapp_links: {
1285
- Row: {
1286
- created_at: string
1287
- link_id: string
1288
- link_name: string
1289
- message: string | null
1290
- phone: string
1291
- }
1292
- Insert: {
1293
- created_at?: string
1294
- link_id?: string
1295
- link_name: string
1296
- message?: string | null
1297
- phone: string
1298
- }
1299
- Update: {
1300
- created_at?: string
1301
- link_id?: string
1302
- link_name?: string
1303
- message?: string | null
1304
- phone?: string
1305
- }
1306
- Relationships: []
1307
- }
1308
- }
1309
- Views: {
1310
- view_broadcast_logs: {
1311
- Row: {
1312
- broadcast_id: string | null
1313
- created_at: string | null
1314
- delivery_percentage: number | null
1315
- failed_chats: number | null
1316
- message_payload: Json | null
1317
- org_id: string | null
1318
- pending_chats: number | null
1319
- performed_at: string | null
1320
- performed_by: string | null
1321
- read_percentage: number | null
1322
- scheduled_at: string | null
1323
- sent_chats: number | null
1324
- total_chats: number | null
1325
- total_delivered_count: number | null
1326
- total_member_count: number | null
1327
- total_read_count: number | null
1328
- }
1329
- Relationships: [
1330
- {
1331
- foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
1332
- columns: ["org_id"]
1333
- referencedRelation: "tbl_org"
1334
- referencedColumns: ["org_id"]
1335
- },
1336
- {
1337
- foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
1338
- columns: ["org_id"]
1339
- referencedRelation: "view_org"
1340
- referencedColumns: ["org_id"]
1341
- }
1342
- ]
1343
- }
1344
- view_chats: {
1345
- Row: {
1346
- active_phone: string | null
1347
- chat_access: Json | null
1348
- chat_id: string | null
1349
- chat_image: string | null
1350
- chat_name: string | null
1351
- chat_type: string | null
1352
- created_at: string | null
1353
- custom_properties: Json | null
1354
- flag_count: number | null
1355
- group_description: string | null
1356
- hubspot_metadata: Json | null
1357
- invite_link: string | null
1358
- is_archived: boolean | null
1359
- is_muted: boolean | null
1360
- label_ids: Json | null
1361
- last_read_timestamp: string | null
1362
- latest_message: Json | null
1363
- member_count: number | null
1364
- message_unread_count: number | null
1365
- org_id: string | null
1366
- org_phone: string | null
1367
- updated_at: string | null
1368
- }
1369
- Relationships: []
1370
- }
1371
- view_org: {
1372
- Row: {
1373
- created_at: string | null
1374
- is_enterprise: boolean | null
1375
- is_free_trial: boolean | null
1376
- is_hubspot_connected: boolean | null
1377
- org_id: string | null
1378
- org_image: string | null
1379
- org_metadata: Json | null
1380
- org_name: string | null
1381
- org_plan: Json | null
1382
- pending_days: number | null
1383
- phone_limit: string | null
1384
- plan_id: string | null
1385
- stripe_customer_details: Json | null
1386
- stripe_customer_id: string | null
1387
- stripe_subscription_details: Json | null
1388
- subscription_status: string | null
1389
- support_link: string | null
1390
- user_limit: string | null
1391
- }
1392
- Insert: {
1393
- created_at?: string | null
1394
- is_enterprise?: never
1395
- is_free_trial?: never
1396
- is_hubspot_connected?: never
1397
- org_id?: string | null
1398
- org_image?: string | null
1399
- org_metadata?: Json | null
1400
- org_name?: string | null
1401
- org_plan?: Json | null
1402
- pending_days?: never
1403
- phone_limit?: never
1404
- plan_id?: never
1405
- stripe_customer_details?: Json | null
1406
- stripe_customer_id?: string | null
1407
- stripe_subscription_details?: Json | null
1408
- subscription_status?: never
1409
- support_link?: string | null
1410
- user_limit?: never
1411
- }
1412
- Update: {
1413
- created_at?: string | null
1414
- is_enterprise?: never
1415
- is_free_trial?: never
1416
- is_hubspot_connected?: never
1417
- org_id?: string | null
1418
- org_image?: string | null
1419
- org_metadata?: Json | null
1420
- org_name?: string | null
1421
- org_plan?: Json | null
1422
- pending_days?: never
1423
- phone_limit?: never
1424
- plan_id?: never
1425
- stripe_customer_details?: Json | null
1426
- stripe_customer_id?: string | null
1427
- stripe_subscription_details?: Json | null
1428
- subscription_status?: never
1429
- support_link?: string | null
1430
- user_limit?: never
1431
- }
1432
- Relationships: []
1433
- }
1434
- }
1435
- Functions: {
1436
- calculate_response_time: {
1437
- Args: {
1438
- flag_metadata: Json
1439
- message_timestamp: string
1440
- }
1441
- Returns: number
1442
- }
1443
- gen_id: {
1444
- Args: {
1445
- prefix: string
1446
- size?: number
1447
- alphabet?: string
1448
- }
1449
- Returns: string
1450
- }
1451
- gen_ticket_id: {
1452
- Args: {
1453
- org_id_input: string
1454
- }
1455
- Returns: string
1456
- }
1457
- generate_access_token: {
1458
- Args: {
1459
- name_input?: string
1460
- type_input?: Database["public"]["Enums"]["enum_integration_type"]
1461
- org_id_input?: string
1462
- }
1463
- Returns: Json
1464
- }
1465
- get_api_auth_details: {
1466
- Args: {
1467
- org_id_input?: string
1468
- org_phone_input?: string
1469
- token_id_input?: string
1470
- token_type_input?: Database["public"]["Enums"]["enum_integration_type"]
1471
- }
1472
- Returns: Json
1473
- }
1474
- get_chat_labels_data: {
1475
- Args: {
1476
- org_id_input: string
1477
- chat_ids_input?: string[]
1478
- }
1479
- Returns: Json[]
1480
- }
1481
- get_chat_members: {
1482
- Args: {
1483
- org_id_input?: string
1484
- chat_id_input?: string[]
1485
- }
1486
- Returns: Json
1487
- }
1488
- get_chats: {
1489
- Args: {
1490
- org_id_input?: string
1491
- chat_id_input?: string[]
1492
- }
1493
- Returns: Json
1494
- }
1495
- get_chats_info: {
1496
- Args: {
1497
- chat_id_input: string
1498
- org_id_input: string
1499
- org_phone_input?: string
1500
- }
1501
- Returns: Json
1502
- }
1503
- get_contacts: {
1504
- Args: {
1505
- org_id_input: string
1506
- contact_ids_input?: string[]
1507
- last_updated_at_input?: string
1508
- }
1509
- Returns: Json
1510
- }
1511
- get_dashboard_statistics: {
1512
- Args: {
1513
- org_id_input: string
1514
- interval_input?: unknown
1515
- chat_id_input?: string[]
1516
- }
1517
- Returns: Json
1518
- }
1519
- get_export_chats_data: {
1520
- Args: {
1521
- org_id_input: string
1522
- chat_ids?: string[]
1523
- }
1524
- Returns: Json
1525
- }
1526
- get_integration_data: {
1527
- Args: {
1528
- org_id_input?: string
1529
- }
1530
- Returns: Json
1531
- }
1532
- get_messages_notifications_reactions: {
1533
- Args: {
1534
- org_id_input: string
1535
- chat_id_input?: string[]
1536
- message_limit_input?: number
1537
- reaction_notification_limit_input?: number
1538
- last_updated_at_input?: string
1539
- }
1540
- Returns: Json
1541
- }
1542
- get_org: {
1543
- Args: {
1544
- org_id_input?: string
1545
- }
1546
- Returns: Json
1547
- }
1548
- get_org_phones: {
1549
- Args: {
1550
- org_id_input?: string
1551
- phone_id_input?: string
1552
- }
1553
- Returns: Json
1554
- }
1555
- get_team_metrics: {
1556
- Args: {
1557
- org_id_input: string
1558
- chat_id_input?: string[]
1559
- interval_input?: unknown
1560
- }
1561
- Returns: Json
1562
- }
1563
- get_ticket_info: {
1564
- Args: {
1565
- ticket_id_input?: string
1566
- org_id_input?: string
1567
- chat_id_input?: string
1568
- unique_message_id_input?: string
1569
- }
1570
- Returns: Json
1571
- }
1572
- image_path: {
1573
- Args: {
1574
- path_input?: string
1575
- bucket_name?: string
1576
- req_base?: boolean
1577
- }
1578
- Returns: string
1579
- }
1580
- list_org_from_user: {
1581
- Args: Record<PropertyKey, never>
1582
- Returns: string[]
1583
- }
1584
- list_role_from_user: {
1585
- Args: Record<PropertyKey, never>
1586
- Returns: Database["public"]["Enums"]["enum_member_role"]
1587
- }
1588
- update_labels: {
1589
- Args: {
1590
- org_id_input: string
1591
- tbl_type: string
1592
- label_ids_input: Json
1593
- row_id_input: string[]
1594
- replace_labels?: boolean
1595
- }
1596
- Returns: undefined
1597
- }
1598
- }
1599
- Enums: {
1600
- enum_chat_colors:
1601
- | "#B4876E"
1602
- | "#A5B337"
1603
- | "#06CF9C"
1604
- | "#25D366"
1605
- | "#02A698"
1606
- | "#7D9EF1"
1607
- | "#007BFC"
1608
- | "#5E47DE"
1609
- | "#7F66FF"
1610
- | "#9333EA"
1611
- | "#FA6533"
1612
- | "#C4532D"
1613
- | "#DC2626"
1614
- | "#FF2E74"
1615
- | "#DB2777"
1616
- enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived"
1617
- enum_integration_name:
1618
- | "org.created"
1619
- | "org.updated"
1620
- | "org.member.created"
1621
- | "org.member.updated"
1622
- | "org.phone.created"
1623
- | "org.phone.connected"
1624
- | "org.phone.disconnected"
1625
- | "org.subscription.trial_will_end"
1626
- | "chat.created"
1627
- | "chat.updated"
1628
- | "message.created"
1629
- | "message.updated"
1630
- | "message.deleted"
1631
- | "message.ack.updated"
1632
- | "reaction.created"
1633
- | "reaction.updated"
1634
- | "ticket.created"
1635
- | "ticket.updated"
1636
- | "ticket.deleted"
1637
- enum_integration_type:
1638
- | "zapier"
1639
- | "pabbly"
1640
- | "api"
1641
- | "webhook"
1642
- | "hubspot"
1643
- | "freshdesk"
1644
- | "slack"
1645
- | "jira"
1646
- | "salesforce"
1647
- enum_member_role: "admin" | "member"
1648
- }
1649
- CompositeTypes: {
1650
- [_ in never]: never
1651
- }
1652
- }
1653
- storage: {
1654
- Tables: {
1655
- buckets: {
1656
- Row: {
1657
- allowed_mime_types: string[] | null
1658
- avif_autodetection: boolean | null
1659
- created_at: string | null
1660
- file_size_limit: number | null
1661
- id: string
1662
- name: string
1663
- owner: string | null
1664
- public: boolean | null
1665
- updated_at: string | null
1666
- }
1667
- Insert: {
1668
- allowed_mime_types?: string[] | null
1669
- avif_autodetection?: boolean | null
1670
- created_at?: string | null
1671
- file_size_limit?: number | null
1672
- id: string
1673
- name: string
1674
- owner?: string | null
1675
- public?: boolean | null
1676
- updated_at?: string | null
1677
- }
1678
- Update: {
1679
- allowed_mime_types?: string[] | null
1680
- avif_autodetection?: boolean | null
1681
- created_at?: string | null
1682
- file_size_limit?: number | null
1683
- id?: string
1684
- name?: string
1685
- owner?: string | null
1686
- public?: boolean | null
1687
- updated_at?: string | null
1688
- }
1689
- Relationships: [
1690
- {
1691
- foreignKeyName: "buckets_owner_fkey"
1692
- columns: ["owner"]
1693
- referencedRelation: "users"
1694
- referencedColumns: ["id"]
1695
- }
1696
- ]
1697
- }
1698
- migrations: {
1699
- Row: {
1700
- executed_at: string | null
1701
- hash: string
1702
- id: number
1703
- name: string
1704
- }
1705
- Insert: {
1706
- executed_at?: string | null
1707
- hash: string
1708
- id: number
1709
- name: string
1710
- }
1711
- Update: {
1712
- executed_at?: string | null
1713
- hash?: string
1714
- id?: number
1715
- name?: string
1716
- }
1717
- Relationships: []
1718
- }
1719
- objects: {
1720
- Row: {
1721
- bucket_id: string | null
1722
- created_at: string | null
1723
- id: string
1724
- last_accessed_at: string | null
1725
- metadata: Json | null
1726
- name: string | null
1727
- owner: string | null
1728
- path_tokens: string[] | null
1729
- updated_at: string | null
1730
- version: string | null
1731
- }
1732
- Insert: {
1733
- bucket_id?: string | null
1734
- created_at?: string | null
1735
- id?: string
1736
- last_accessed_at?: string | null
1737
- metadata?: Json | null
1738
- name?: string | null
1739
- owner?: string | null
1740
- path_tokens?: string[] | null
1741
- updated_at?: string | null
1742
- version?: string | null
1743
- }
1744
- Update: {
1745
- bucket_id?: string | null
1746
- created_at?: string | null
1747
- id?: string
1748
- last_accessed_at?: string | null
1749
- metadata?: Json | null
1750
- name?: string | null
1751
- owner?: string | null
1752
- path_tokens?: string[] | null
1753
- updated_at?: string | null
1754
- version?: string | null
1755
- }
1756
- Relationships: [
1757
- {
1758
- foreignKeyName: "objects_bucketId_fkey"
1759
- columns: ["bucket_id"]
1760
- referencedRelation: "buckets"
1761
- referencedColumns: ["id"]
1762
- }
1763
- ]
1764
- }
1765
- }
1766
- Views: {
1767
- [_ in never]: never
1768
- }
1769
- Functions: {
1770
- can_insert_object: {
1771
- Args: {
1772
- bucketid: string
1773
- name: string
1774
- owner: string
1775
- metadata: Json
1776
- }
1777
- Returns: undefined
1778
- }
1779
- extension: {
1780
- Args: {
1781
- name: string
1782
- }
1783
- Returns: string
1784
- }
1785
- filename: {
1786
- Args: {
1787
- name: string
1788
- }
1789
- Returns: string
1790
- }
1791
- foldername: {
1792
- Args: {
1793
- name: string
1794
- }
1795
- Returns: string[]
1796
- }
1797
- get_size_by_bucket: {
1798
- Args: Record<PropertyKey, never>
1799
- Returns: {
1800
- size: number
1801
- bucket_id: string
1802
- }[]
1803
- }
1804
- search: {
1805
- Args: {
1806
- prefix: string
1807
- bucketname: string
1808
- limits?: number
1809
- levels?: number
1810
- offsets?: number
1811
- search?: string
1812
- sortcolumn?: string
1813
- sortorder?: string
1814
- }
1815
- Returns: {
1816
- name: string
1817
- id: string
1818
- updated_at: string
1819
- created_at: string
1820
- last_accessed_at: string
1821
- metadata: Json
1822
- }[]
1823
- }
1824
- }
1825
- Enums: {
1826
- [_ in never]: never
1827
- }
1828
- CompositeTypes: {
1829
- [_ in never]: never
1830
- }
1831
- }
1832
- }
1833
-
1834
- type PublicSchema = Database[Extract<keyof Database, "public">]
1835
-
1836
- export type Tables<
1837
- PublicTableNameOrOptions extends
1838
- | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
1839
- | { schema: keyof Database },
1840
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1841
- ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1842
- Database[PublicTableNameOrOptions["schema"]]["Views"])
1843
- : never = never,
1844
- > = PublicTableNameOrOptions extends { schema: keyof Database }
1845
- ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
1846
- Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
1847
- Row: infer R
1848
- }
1849
- ? R
1850
- : never
1851
- : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
1852
- PublicSchema["Views"])
1853
- ? (PublicSchema["Tables"] &
1854
- PublicSchema["Views"])[PublicTableNameOrOptions] extends {
1855
- Row: infer R
1856
- }
1857
- ? R
1858
- : never
1859
- : never
1860
-
1861
- export type TablesInsert<
1862
- PublicTableNameOrOptions extends
1863
- | keyof PublicSchema["Tables"]
1864
- | { schema: keyof Database },
1865
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1866
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1867
- : never = never,
1868
- > = PublicTableNameOrOptions extends { schema: keyof Database }
1869
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1870
- Insert: infer I
1871
- }
1872
- ? I
1873
- : never
1874
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1875
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1876
- Insert: infer I
1877
- }
1878
- ? I
1879
- : never
1880
- : never
1881
-
1882
- export type TablesUpdate<
1883
- PublicTableNameOrOptions extends
1884
- | keyof PublicSchema["Tables"]
1885
- | { schema: keyof Database },
1886
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
1887
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
1888
- : never = never,
1889
- > = PublicTableNameOrOptions extends { schema: keyof Database }
1890
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
1891
- Update: infer U
1892
- }
1893
- ? U
1894
- : never
1895
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
1896
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
1897
- Update: infer U
1898
- }
1899
- ? U
1900
- : never
1901
- : never
1902
-
1903
- export type Enums<
1904
- PublicEnumNameOrOptions extends
1905
- | keyof PublicSchema["Enums"]
1906
- | { schema: keyof Database },
1907
- EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
1908
- ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
1909
- : never = never,
1910
- > = PublicEnumNameOrOptions extends { schema: keyof Database }
1911
- ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
1912
- : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
1913
- ? PublicSchema["Enums"][PublicEnumNameOrOptions]
1914
- : never