@periskope/types 0.6.241 → 0.6.243

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.
@@ -1,3108 +0,0 @@
1
- export type Json = {
2
- [key: string]: any;
3
- } | any;
4
- export type Database = {
5
- internal: {
6
- Tables: {
7
- config: {
8
- Row: {
9
- key: string;
10
- updated_at: string;
11
- value: string | null;
12
- };
13
- Insert: {
14
- key: string;
15
- updated_at?: string;
16
- value?: string | null;
17
- };
18
- Update: {
19
- key?: string;
20
- updated_at?: string;
21
- value?: string | null;
22
- };
23
- Relationships: [];
24
- };
25
- org_phone_logs: {
26
- Row: {
27
- connection_history: Json | null;
28
- created_at: string;
29
- deleted_at: string | null;
30
- first_connected_at: string | null;
31
- org_id: string;
32
- org_phone: string | null;
33
- phone_id: string;
34
- };
35
- Insert: {
36
- connection_history?: Json | null;
37
- created_at?: string;
38
- deleted_at?: string | null;
39
- first_connected_at?: string | null;
40
- org_id: string;
41
- org_phone?: string | null;
42
- phone_id: string;
43
- };
44
- Update: {
45
- connection_history?: Json | null;
46
- created_at?: string;
47
- deleted_at?: string | null;
48
- first_connected_at?: string | null;
49
- org_id?: string;
50
- org_phone?: string | null;
51
- phone_id?: string;
52
- };
53
- Relationships: [];
54
- };
55
- tbl_communication_logs: {
56
- Row: {
57
- communication_type: string | null;
58
- created_at: string;
59
- id: number;
60
- metadata: Json | null;
61
- org_id: string | null;
62
- recipient: string | null;
63
- success: boolean | null;
64
- type: string | null;
65
- };
66
- Insert: {
67
- communication_type?: string | null;
68
- created_at?: string;
69
- id?: number;
70
- metadata?: Json | null;
71
- org_id?: string | null;
72
- recipient?: string | null;
73
- success?: boolean | null;
74
- type?: string | null;
75
- };
76
- Update: {
77
- communication_type?: string | null;
78
- created_at?: string;
79
- id?: number;
80
- metadata?: Json | null;
81
- org_id?: string | null;
82
- recipient?: string | null;
83
- success?: boolean | null;
84
- type?: string | null;
85
- };
86
- Relationships: [];
87
- };
88
- tbl_feature_flags: {
89
- Row: {
90
- created_at: string | null;
91
- enabled: boolean | null;
92
- excluded_orgs: string[] | null;
93
- exclusive_to_orgs: string[] | null;
94
- feature: string;
95
- included_orgs: string[] | null;
96
- percentage: number | null;
97
- plans: string[] | null;
98
- start_date: string | null;
99
- };
100
- Insert: {
101
- created_at?: string | null;
102
- enabled?: boolean | null;
103
- excluded_orgs?: string[] | null;
104
- exclusive_to_orgs?: string[] | null;
105
- feature: string;
106
- included_orgs?: string[] | null;
107
- percentage?: number | null;
108
- plans?: string[] | null;
109
- start_date?: string | null;
110
- };
111
- Update: {
112
- created_at?: string | null;
113
- enabled?: boolean | null;
114
- excluded_orgs?: string[] | null;
115
- exclusive_to_orgs?: string[] | null;
116
- feature?: string;
117
- included_orgs?: string[] | null;
118
- percentage?: number | null;
119
- plans?: string[] | null;
120
- start_date?: string | null;
121
- };
122
- Relationships: [];
123
- };
124
- tbl_tools_whatsapp_links: {
125
- Row: {
126
- created_at: string;
127
- link_id: string;
128
- link_name: string;
129
- message: string | null;
130
- phone: string;
131
- };
132
- Insert: {
133
- created_at?: string;
134
- link_id?: string;
135
- link_name: string;
136
- message?: string | null;
137
- phone: string;
138
- };
139
- Update: {
140
- created_at?: string;
141
- link_id?: string;
142
- link_name?: string;
143
- message?: string | null;
144
- phone?: string;
145
- };
146
- Relationships: [];
147
- };
148
- tbl_trigger_logs: {
149
- Row: {
150
- created_at: string;
151
- id: number;
152
- request_body: Json;
153
- request_id: string;
154
- trace_id: string;
155
- trigger_name: string;
156
- };
157
- Insert: {
158
- created_at?: string;
159
- id?: number;
160
- request_body: Json;
161
- request_id: string;
162
- trace_id?: string;
163
- trigger_name: string;
164
- };
165
- Update: {
166
- created_at?: string;
167
- id?: number;
168
- request_body?: Json;
169
- request_id?: string;
170
- trace_id?: string;
171
- trigger_name?: string;
172
- };
173
- Relationships: [];
174
- };
175
- };
176
- Views: {
177
- [_ in never]: never;
178
- };
179
- Functions: {
180
- [_ in never]: never;
181
- };
182
- Enums: {
183
- [_ in never]: never;
184
- };
185
- CompositeTypes: {
186
- [_ in never]: never;
187
- };
188
- };
189
- public: {
190
- Tables: {
191
- tbl_api_logs: {
192
- Row: {
193
- org_id: string;
194
- path: string;
195
- req: Json;
196
- request_id: string;
197
- res: Json | null;
198
- status: number;
199
- timestamp: string;
200
- token_id: string;
201
- };
202
- Insert: {
203
- org_id: string;
204
- path: string;
205
- req: Json;
206
- request_id: string;
207
- res?: Json | null;
208
- status: number;
209
- timestamp: string;
210
- token_id: string;
211
- };
212
- Update: {
213
- org_id?: string;
214
- path?: string;
215
- req?: Json;
216
- request_id?: string;
217
- res?: Json | null;
218
- status?: number;
219
- timestamp?: string;
220
- token_id?: string;
221
- };
222
- Relationships: [];
223
- };
224
- tbl_automation_rules: {
225
- Row: {
226
- actions: Json;
227
- conditions: Json;
228
- created_at: string;
229
- id: string;
230
- is_active: boolean;
231
- last_updated_at: string;
232
- last_updated_by: string;
233
- org_id: string;
234
- rule_name: string;
235
- trigger: string;
236
- };
237
- Insert: {
238
- actions: Json;
239
- conditions: Json;
240
- created_at?: string;
241
- id?: string;
242
- is_active?: boolean;
243
- last_updated_at?: string;
244
- last_updated_by: string;
245
- org_id: string;
246
- rule_name: string;
247
- trigger: string;
248
- };
249
- Update: {
250
- actions?: Json;
251
- conditions?: Json;
252
- created_at?: string;
253
- id?: string;
254
- is_active?: boolean;
255
- last_updated_at?: string;
256
- last_updated_by?: string;
257
- org_id?: string;
258
- rule_name?: string;
259
- trigger?: string;
260
- };
261
- Relationships: [
262
- {
263
- foreignKeyName: "public_tbl_automation_rules_org_id_fkey";
264
- columns: ["org_id"];
265
- isOneToOne: false;
266
- referencedRelation: "tbl_org";
267
- referencedColumns: ["org_id"];
268
- },
269
- {
270
- foreignKeyName: "public_tbl_automation_rules_org_id_fkey";
271
- columns: ["org_id"];
272
- isOneToOne: false;
273
- referencedRelation: "view_org";
274
- referencedColumns: ["org_id"];
275
- }
276
- ];
277
- };
278
- tbl_broadcast_logs: {
279
- Row: {
280
- broadcast_id: string;
281
- chat_id: string;
282
- completed_at: string | null;
283
- created_at: string;
284
- delivered_count: number | null;
285
- delivery_info: Json | null;
286
- is_success: boolean | null;
287
- member_count: number | null;
288
- message_id: string | null;
289
- org_id: string;
290
- org_phone: string | null;
291
- read_count: number | null;
292
- remarks: string | null;
293
- };
294
- Insert: {
295
- broadcast_id: string;
296
- chat_id: string;
297
- completed_at?: string | null;
298
- created_at?: string;
299
- delivered_count?: number | null;
300
- delivery_info?: Json | null;
301
- is_success?: boolean | null;
302
- member_count?: number | null;
303
- message_id?: string | null;
304
- org_id: string;
305
- org_phone?: string | null;
306
- read_count?: number | null;
307
- remarks?: string | null;
308
- };
309
- Update: {
310
- broadcast_id?: string;
311
- chat_id?: string;
312
- completed_at?: string | null;
313
- created_at?: string;
314
- delivered_count?: number | null;
315
- delivery_info?: Json | null;
316
- is_success?: boolean | null;
317
- member_count?: number | null;
318
- message_id?: string | null;
319
- org_id?: string;
320
- org_phone?: string | null;
321
- read_count?: number | null;
322
- remarks?: string | null;
323
- };
324
- Relationships: [
325
- {
326
- foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey";
327
- columns: ["broadcast_id"];
328
- isOneToOne: false;
329
- referencedRelation: "tbl_broadcast_messages";
330
- referencedColumns: ["broadcast_id"];
331
- },
332
- {
333
- foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey";
334
- columns: ["broadcast_id"];
335
- isOneToOne: false;
336
- referencedRelation: "view_broadcast_logs";
337
- referencedColumns: ["broadcast_id"];
338
- },
339
- {
340
- foreignKeyName: "tbl_broadcast_logs_org_id_fkey";
341
- columns: ["org_id"];
342
- isOneToOne: false;
343
- referencedRelation: "tbl_org";
344
- referencedColumns: ["org_id"];
345
- },
346
- {
347
- foreignKeyName: "tbl_broadcast_logs_org_id_fkey";
348
- columns: ["org_id"];
349
- isOneToOne: false;
350
- referencedRelation: "view_org";
351
- referencedColumns: ["org_id"];
352
- }
353
- ];
354
- };
355
- tbl_broadcast_messages: {
356
- Row: {
357
- broadcast_id: string;
358
- broadcast_status: Database["public"]["Enums"]["enum_broadcast_status"] | null;
359
- chat_ids: string[] | null;
360
- created_at: string;
361
- delay: number | null;
362
- message_payload: Json | null;
363
- org_id: string;
364
- org_phone: string | null;
365
- performed_at: string | null;
366
- performed_by: string | null;
367
- scheduled_at: string | null;
368
- variables: Json | null;
369
- };
370
- Insert: {
371
- broadcast_id?: string;
372
- broadcast_status?: Database["public"]["Enums"]["enum_broadcast_status"] | null;
373
- chat_ids?: string[] | null;
374
- created_at?: string;
375
- delay?: number | null;
376
- message_payload?: Json | null;
377
- org_id: string;
378
- org_phone?: string | null;
379
- performed_at?: string | null;
380
- performed_by?: string | null;
381
- scheduled_at?: string | null;
382
- variables?: Json | null;
383
- };
384
- Update: {
385
- broadcast_id?: string;
386
- broadcast_status?: Database["public"]["Enums"]["enum_broadcast_status"] | null;
387
- chat_ids?: string[] | null;
388
- created_at?: string;
389
- delay?: number | null;
390
- message_payload?: Json | null;
391
- org_id?: string;
392
- org_phone?: string | null;
393
- performed_at?: string | null;
394
- performed_by?: string | null;
395
- scheduled_at?: string | null;
396
- variables?: Json | null;
397
- };
398
- Relationships: [
399
- {
400
- foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
401
- columns: ["org_id"];
402
- isOneToOne: false;
403
- referencedRelation: "tbl_org";
404
- referencedColumns: ["org_id"];
405
- },
406
- {
407
- foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
408
- columns: ["org_id"];
409
- isOneToOne: false;
410
- referencedRelation: "view_org";
411
- referencedColumns: ["org_id"];
412
- }
413
- ];
414
- };
415
- tbl_broadcast_templates: {
416
- Row: {
417
- created_at: string;
418
- message_payload: Json | null;
419
- org_id: string;
420
- template_id: string;
421
- template_name: string | null;
422
- updated_at: string | null;
423
- variable_names: Json | null;
424
- };
425
- Insert: {
426
- created_at?: string;
427
- message_payload?: Json | null;
428
- org_id: string;
429
- template_id?: string;
430
- template_name?: string | null;
431
- updated_at?: string | null;
432
- variable_names?: Json | null;
433
- };
434
- Update: {
435
- created_at?: string;
436
- message_payload?: Json | null;
437
- org_id?: string;
438
- template_id?: string;
439
- template_name?: string | null;
440
- updated_at?: string | null;
441
- variable_names?: Json | null;
442
- };
443
- Relationships: [
444
- {
445
- foreignKeyName: "tbl_broadcast_templates_org_id_fkey";
446
- columns: ["org_id"];
447
- isOneToOne: false;
448
- referencedRelation: "tbl_org";
449
- referencedColumns: ["org_id"];
450
- },
451
- {
452
- foreignKeyName: "tbl_broadcast_templates_org_id_fkey";
453
- columns: ["org_id"];
454
- isOneToOne: false;
455
- referencedRelation: "view_org";
456
- referencedColumns: ["org_id"];
457
- }
458
- ];
459
- };
460
- tbl_chat_logs: {
461
- Row: {
462
- action: string | null;
463
- chat_id: string | null;
464
- is_success: boolean | null;
465
- log_id: string;
466
- metadata: Json | null;
467
- operation_id: string;
468
- org_id: string;
469
- org_phone: string;
470
- participant_id: string | null;
471
- performed_by: string | null;
472
- timestamp: string | null;
473
- };
474
- Insert: {
475
- action?: string | null;
476
- chat_id?: string | null;
477
- is_success?: boolean | null;
478
- log_id?: string;
479
- metadata?: Json | null;
480
- operation_id: string;
481
- org_id: string;
482
- org_phone: string;
483
- participant_id?: string | null;
484
- performed_by?: string | null;
485
- timestamp?: string | null;
486
- };
487
- Update: {
488
- action?: string | null;
489
- chat_id?: string | null;
490
- is_success?: boolean | null;
491
- log_id?: string;
492
- metadata?: Json | null;
493
- operation_id?: string;
494
- org_id?: string;
495
- org_phone?: string;
496
- participant_id?: string | null;
497
- performed_by?: string | null;
498
- timestamp?: string | null;
499
- };
500
- Relationships: [
501
- {
502
- foreignKeyName: "tbl_chat_logs_org_id_fkey";
503
- columns: ["org_id"];
504
- isOneToOne: false;
505
- referencedRelation: "tbl_org";
506
- referencedColumns: ["org_id"];
507
- },
508
- {
509
- foreignKeyName: "tbl_chat_logs_org_id_fkey";
510
- columns: ["org_id"];
511
- isOneToOne: false;
512
- referencedRelation: "view_org";
513
- referencedColumns: ["org_id"];
514
- }
515
- ];
516
- };
517
- tbl_chat_messages: {
518
- Row: {
519
- ack: string | null;
520
- author: string | null;
521
- body: string | null;
522
- broadcast: boolean | null;
523
- broadcast_id: string | null;
524
- chat_id: string | null;
525
- delivery_info: Json | null;
526
- device_type: string | null;
527
- duration: string | null;
528
- flag_metadata: Json | null;
529
- flag_response_time: number | null;
530
- flag_status: boolean | null;
531
- forwarding_score: number | null;
532
- from: string | null;
533
- from_me: boolean | null;
534
- fts: unknown | null;
535
- has_media: boolean | null;
536
- has_quoted_msg: boolean | null;
537
- has_reaction: boolean | null;
538
- id: Json | null;
539
- invite_v4: Json | null;
540
- is_deleted: boolean | null;
541
- is_ephemeral: boolean | null;
542
- is_forwarded: boolean | null;
543
- is_gif: boolean | null;
544
- is_starred: boolean | null;
545
- is_status: boolean | null;
546
- links: Json | null;
547
- location: Json | null;
548
- media: Json | null;
549
- media_key: string | null;
550
- mentioned_ids: string[] | null;
551
- message_id: string;
552
- message_ticket_id: string | null;
553
- message_type: string | null;
554
- order_id: string | null;
555
- org_id: string;
556
- org_phone: string;
557
- performed_by: string | null;
558
- poll_info: Json | null;
559
- poll_results: Json | null;
560
- prev_body: string | null;
561
- quoted_message_id: string | null;
562
- raw_data: Json | null;
563
- sender_phone: string | null;
564
- sent_message_id: string | null;
565
- timestamp: string;
566
- to: string | null;
567
- token: string | null;
568
- unique_id: string | null;
569
- updated_at: string | null;
570
- vcards: string[] | null;
571
- };
572
- Insert: {
573
- ack?: string | null;
574
- author?: string | null;
575
- body?: string | null;
576
- broadcast?: boolean | null;
577
- broadcast_id?: string | null;
578
- chat_id?: string | null;
579
- delivery_info?: Json | null;
580
- device_type?: string | null;
581
- duration?: string | null;
582
- flag_metadata?: Json | null;
583
- flag_response_time?: number | null;
584
- flag_status?: boolean | null;
585
- forwarding_score?: number | null;
586
- from?: string | null;
587
- from_me?: boolean | null;
588
- fts?: unknown | null;
589
- has_media?: boolean | null;
590
- has_quoted_msg?: boolean | null;
591
- has_reaction?: boolean | null;
592
- id?: Json | null;
593
- invite_v4?: Json | null;
594
- is_deleted?: boolean | null;
595
- is_ephemeral?: boolean | null;
596
- is_forwarded?: boolean | null;
597
- is_gif?: boolean | null;
598
- is_starred?: boolean | null;
599
- is_status?: boolean | null;
600
- links?: Json | null;
601
- location?: Json | null;
602
- media?: Json | null;
603
- media_key?: string | null;
604
- mentioned_ids?: string[] | null;
605
- message_id: string;
606
- message_ticket_id?: string | null;
607
- message_type?: string | null;
608
- order_id?: string | null;
609
- org_id: string;
610
- org_phone: string;
611
- performed_by?: string | null;
612
- poll_info?: Json | null;
613
- poll_results?: Json | null;
614
- prev_body?: string | null;
615
- quoted_message_id?: string | null;
616
- raw_data?: Json | null;
617
- sender_phone?: string | null;
618
- sent_message_id?: string | null;
619
- timestamp: string;
620
- to?: string | null;
621
- token?: string | null;
622
- unique_id?: string | null;
623
- updated_at?: string | null;
624
- vcards?: string[] | null;
625
- };
626
- Update: {
627
- ack?: string | null;
628
- author?: string | null;
629
- body?: string | null;
630
- broadcast?: boolean | null;
631
- broadcast_id?: string | null;
632
- chat_id?: string | null;
633
- delivery_info?: Json | null;
634
- device_type?: string | null;
635
- duration?: string | null;
636
- flag_metadata?: Json | null;
637
- flag_response_time?: number | null;
638
- flag_status?: boolean | null;
639
- forwarding_score?: number | null;
640
- from?: string | null;
641
- from_me?: boolean | null;
642
- fts?: unknown | null;
643
- has_media?: boolean | null;
644
- has_quoted_msg?: boolean | null;
645
- has_reaction?: boolean | null;
646
- id?: Json | null;
647
- invite_v4?: Json | null;
648
- is_deleted?: boolean | null;
649
- is_ephemeral?: boolean | null;
650
- is_forwarded?: boolean | null;
651
- is_gif?: boolean | null;
652
- is_starred?: boolean | null;
653
- is_status?: boolean | null;
654
- links?: Json | null;
655
- location?: Json | null;
656
- media?: Json | null;
657
- media_key?: string | null;
658
- mentioned_ids?: string[] | null;
659
- message_id?: string;
660
- message_ticket_id?: string | null;
661
- message_type?: string | null;
662
- order_id?: string | null;
663
- org_id?: string;
664
- org_phone?: string;
665
- performed_by?: string | null;
666
- poll_info?: Json | null;
667
- poll_results?: Json | null;
668
- prev_body?: string | null;
669
- quoted_message_id?: string | null;
670
- raw_data?: Json | null;
671
- sender_phone?: string | null;
672
- sent_message_id?: string | null;
673
- timestamp?: string;
674
- to?: string | null;
675
- token?: string | null;
676
- unique_id?: string | null;
677
- updated_at?: string | null;
678
- vcards?: string[] | null;
679
- };
680
- Relationships: [];
681
- };
682
- tbl_chat_notes: {
683
- Row: {
684
- ack: string | null;
685
- body: string | null;
686
- chat_id: string | null;
687
- from_me: boolean | null;
688
- is_private_note: boolean;
689
- media: Json | null;
690
- mentioned_ids: string[] | null;
691
- message_id: string;
692
- message_type: string | null;
693
- org_id: string;
694
- org_phone: string;
695
- performed_by: string | null;
696
- prev_body: string | null;
697
- quoted_message_id: string | null;
698
- sender_phone: string | null;
699
- sent_message_id: string | null;
700
- timestamp: string | null;
701
- unique_id: string | null;
702
- updated_at: string | null;
703
- };
704
- Insert: {
705
- ack?: string | null;
706
- body?: string | null;
707
- chat_id?: string | null;
708
- from_me?: boolean | null;
709
- is_private_note?: boolean;
710
- media?: Json | null;
711
- mentioned_ids?: string[] | null;
712
- message_id: string;
713
- message_type?: string | null;
714
- org_id: string;
715
- org_phone: string;
716
- performed_by?: string | null;
717
- prev_body?: string | null;
718
- quoted_message_id?: string | null;
719
- sender_phone?: string | null;
720
- sent_message_id?: string | null;
721
- timestamp?: string | null;
722
- unique_id?: string | null;
723
- updated_at?: string | null;
724
- };
725
- Update: {
726
- ack?: string | null;
727
- body?: string | null;
728
- chat_id?: string | null;
729
- from_me?: boolean | null;
730
- is_private_note?: boolean;
731
- media?: Json | null;
732
- mentioned_ids?: string[] | null;
733
- message_id?: string;
734
- message_type?: string | null;
735
- org_id?: string;
736
- org_phone?: string;
737
- performed_by?: string | null;
738
- prev_body?: string | null;
739
- quoted_message_id?: string | null;
740
- sender_phone?: string | null;
741
- sent_message_id?: string | null;
742
- timestamp?: string | null;
743
- unique_id?: string | null;
744
- updated_at?: string | null;
745
- };
746
- Relationships: [];
747
- };
748
- tbl_chat_notifications: {
749
- Row: {
750
- author: string | null;
751
- body: string | null;
752
- chat_id: string | null;
753
- id: Json | null;
754
- notification_id: string;
755
- org_id: string;
756
- org_phone: string;
757
- recipientids: string[] | null;
758
- timestamp: string | null;
759
- type: string | null;
760
- unique_id: string | null;
761
- };
762
- Insert: {
763
- author?: string | null;
764
- body?: string | null;
765
- chat_id?: string | null;
766
- id?: Json | null;
767
- notification_id: string;
768
- org_id: string;
769
- org_phone: string;
770
- recipientids?: string[] | null;
771
- timestamp?: string | null;
772
- type?: string | null;
773
- unique_id?: string | null;
774
- };
775
- Update: {
776
- author?: string | null;
777
- body?: string | null;
778
- chat_id?: string | null;
779
- id?: Json | null;
780
- notification_id?: string;
781
- org_id?: string;
782
- org_phone?: string;
783
- recipientids?: string[] | null;
784
- timestamp?: string | null;
785
- type?: string | null;
786
- unique_id?: string | null;
787
- };
788
- Relationships: [];
789
- };
790
- tbl_chat_participants: {
791
- Row: {
792
- chat_id: string;
793
- contact_id: string;
794
- id: Json | null;
795
- is_admin: boolean | null;
796
- is_super_admin: boolean | null;
797
- org_id: string;
798
- org_phone: string;
799
- };
800
- Insert: {
801
- chat_id: string;
802
- contact_id: string;
803
- id?: Json | null;
804
- is_admin?: boolean | null;
805
- is_super_admin?: boolean | null;
806
- org_id: string;
807
- org_phone: string;
808
- };
809
- Update: {
810
- chat_id?: string;
811
- contact_id?: string;
812
- id?: Json | null;
813
- is_admin?: boolean | null;
814
- is_super_admin?: boolean | null;
815
- org_id?: string;
816
- org_phone?: string;
817
- };
818
- Relationships: [];
819
- };
820
- tbl_chat_properties: {
821
- Row: {
822
- assigned_to: string | null;
823
- chat_access: Json | null;
824
- chat_id: string;
825
- chat_image: string | null;
826
- chat_name: string | null;
827
- chat_org_phones: string[];
828
- chat_type: string | null;
829
- closed_at: number | null;
830
- custom_properties: Json | null;
831
- flag_count_map: Json | null;
832
- freshdesk_metadata: Json | null;
833
- hubspot_metadata: Json | null;
834
- label_ids: Json | null;
835
- latest_message_timestamp: string | null;
836
- org_id: string;
837
- unread_count: Json | null;
838
- updated_at: string | null;
839
- zohodesk_metadata: Json | null;
840
- };
841
- Insert: {
842
- assigned_to?: string | null;
843
- chat_access?: Json | null;
844
- chat_id: string;
845
- chat_image?: string | null;
846
- chat_name?: string | null;
847
- chat_org_phones?: string[];
848
- chat_type?: string | null;
849
- closed_at?: number | null;
850
- custom_properties?: Json | null;
851
- flag_count_map?: Json | null;
852
- freshdesk_metadata?: Json | null;
853
- hubspot_metadata?: Json | null;
854
- label_ids?: Json | null;
855
- latest_message_timestamp?: string | null;
856
- org_id: string;
857
- unread_count?: Json | null;
858
- updated_at?: string | null;
859
- zohodesk_metadata?: Json | null;
860
- };
861
- Update: {
862
- assigned_to?: string | null;
863
- chat_access?: Json | null;
864
- chat_id?: string;
865
- chat_image?: string | null;
866
- chat_name?: string | null;
867
- chat_org_phones?: string[];
868
- chat_type?: string | null;
869
- closed_at?: number | null;
870
- custom_properties?: Json | null;
871
- flag_count_map?: Json | null;
872
- freshdesk_metadata?: Json | null;
873
- hubspot_metadata?: Json | null;
874
- label_ids?: Json | null;
875
- latest_message_timestamp?: string | null;
876
- org_id?: string;
877
- unread_count?: Json | null;
878
- updated_at?: string | null;
879
- zohodesk_metadata?: Json | null;
880
- };
881
- Relationships: [];
882
- };
883
- tbl_chat_reactions: {
884
- Row: {
885
- ack: number | null;
886
- chat_id: string | null;
887
- id: Json | null;
888
- message_id: string;
889
- msg_id: Json | null;
890
- org_id: string;
891
- org_phone: string;
892
- orphan: number | null;
893
- orphan_reason: string | null;
894
- reaction: string | null;
895
- reaction_id: string;
896
- read: boolean | null;
897
- sender_id: string;
898
- timestamp: string | null;
899
- unique_id: string | null;
900
- };
901
- Insert: {
902
- ack?: number | null;
903
- chat_id?: string | null;
904
- id?: Json | null;
905
- message_id: string;
906
- msg_id?: Json | null;
907
- org_id: string;
908
- org_phone: string;
909
- orphan?: number | null;
910
- orphan_reason?: string | null;
911
- reaction?: string | null;
912
- reaction_id: string;
913
- read?: boolean | null;
914
- sender_id: string;
915
- timestamp?: string | null;
916
- unique_id?: string | null;
917
- };
918
- Update: {
919
- ack?: number | null;
920
- chat_id?: string | null;
921
- id?: Json | null;
922
- message_id?: string;
923
- msg_id?: Json | null;
924
- org_id?: string;
925
- org_phone?: string;
926
- orphan?: number | null;
927
- orphan_reason?: string | null;
928
- reaction?: string | null;
929
- reaction_id?: string;
930
- read?: boolean | null;
931
- sender_id?: string;
932
- timestamp?: string | null;
933
- unique_id?: string | null;
934
- };
935
- Relationships: [];
936
- };
937
- tbl_chat_tickets: {
938
- Row: {
939
- assigned_by: string | null;
940
- assignee: string | null;
941
- chat_id: string;
942
- close_ticket_metadata: Json | null;
943
- closed_at: string | null;
944
- created_at: string;
945
- custom_properties: Json | null;
946
- due_date: string | null;
947
- freshdesk_metadata: Json | null;
948
- hubspot_metadata: Json | null;
949
- is_deleted: boolean;
950
- label_ids: Json | null;
951
- last_updated_at: string;
952
- org_id: string;
953
- priority: number | null;
954
- quoted_message_id: string | null;
955
- raised_by: string | null;
956
- response_time: number | null;
957
- status: Database["public"]["Enums"]["enum_chat_tickets_status"] | null;
958
- subject: string;
959
- ticket_id: string;
960
- zohodesk_metadata: Json | null;
961
- };
962
- Insert: {
963
- assigned_by?: string | null;
964
- assignee?: string | null;
965
- chat_id: string;
966
- close_ticket_metadata?: Json | null;
967
- closed_at?: string | null;
968
- created_at?: string;
969
- custom_properties?: Json | null;
970
- due_date?: string | null;
971
- freshdesk_metadata?: Json | null;
972
- hubspot_metadata?: Json | null;
973
- is_deleted?: boolean;
974
- label_ids?: Json | null;
975
- last_updated_at?: string;
976
- org_id: string;
977
- priority?: number | null;
978
- quoted_message_id?: string | null;
979
- raised_by?: string | null;
980
- response_time?: number | null;
981
- status?: Database["public"]["Enums"]["enum_chat_tickets_status"] | null;
982
- subject: string;
983
- ticket_id?: string;
984
- zohodesk_metadata?: Json | null;
985
- };
986
- Update: {
987
- assigned_by?: string | null;
988
- assignee?: string | null;
989
- chat_id?: string;
990
- close_ticket_metadata?: Json | null;
991
- closed_at?: string | null;
992
- created_at?: string;
993
- custom_properties?: Json | null;
994
- due_date?: string | null;
995
- freshdesk_metadata?: Json | null;
996
- hubspot_metadata?: Json | null;
997
- is_deleted?: boolean;
998
- label_ids?: Json | null;
999
- last_updated_at?: string;
1000
- org_id?: string;
1001
- priority?: number | null;
1002
- quoted_message_id?: string | null;
1003
- raised_by?: string | null;
1004
- response_time?: number | null;
1005
- status?: Database["public"]["Enums"]["enum_chat_tickets_status"] | null;
1006
- subject?: string;
1007
- ticket_id?: string;
1008
- zohodesk_metadata?: Json | null;
1009
- };
1010
- Relationships: [
1011
- {
1012
- foreignKeyName: "tbl_chat_tickets_org_id_fkey";
1013
- columns: ["org_id"];
1014
- isOneToOne: false;
1015
- referencedRelation: "tbl_org";
1016
- referencedColumns: ["org_id"];
1017
- },
1018
- {
1019
- foreignKeyName: "tbl_chat_tickets_org_id_fkey";
1020
- columns: ["org_id"];
1021
- isOneToOne: false;
1022
- referencedRelation: "view_org";
1023
- referencedColumns: ["org_id"];
1024
- }
1025
- ];
1026
- };
1027
- tbl_chats: {
1028
- Row: {
1029
- archived: boolean | null;
1030
- chat_id: string;
1031
- chat_image: string | null;
1032
- chat_name: string | null;
1033
- chat_type: string | null;
1034
- created_at: string;
1035
- created_by: string | null;
1036
- group_metadata: Json | null;
1037
- id: Json | null;
1038
- initiated_by: string | null;
1039
- invite_link: string | null;
1040
- is_exited: boolean | null;
1041
- is_group: boolean | null;
1042
- is_muted: boolean | null;
1043
- is_read_only: boolean | null;
1044
- latest_message: Json | null;
1045
- member_count: number | null;
1046
- member_unread_count: Json | null;
1047
- mute_expiration: number | null;
1048
- name: string | null;
1049
- org_id: string;
1050
- org_phone: string;
1051
- pinned: boolean | null;
1052
- pinned_messages: Json | null;
1053
- timestamp: string | null;
1054
- unread_count: number | null;
1055
- updated_at: string;
1056
- };
1057
- Insert: {
1058
- archived?: boolean | null;
1059
- chat_id: string;
1060
- chat_image?: string | null;
1061
- chat_name?: string | null;
1062
- chat_type?: string | null;
1063
- created_at?: string;
1064
- created_by?: string | null;
1065
- group_metadata?: Json | null;
1066
- id?: Json | null;
1067
- initiated_by?: string | null;
1068
- invite_link?: string | null;
1069
- is_exited?: boolean | null;
1070
- is_group?: boolean | null;
1071
- is_muted?: boolean | null;
1072
- is_read_only?: boolean | null;
1073
- latest_message?: Json | null;
1074
- member_count?: number | null;
1075
- member_unread_count?: Json | null;
1076
- mute_expiration?: number | null;
1077
- name?: string | null;
1078
- org_id: string;
1079
- org_phone: string;
1080
- pinned?: boolean | null;
1081
- pinned_messages?: Json | null;
1082
- timestamp?: string | null;
1083
- unread_count?: number | null;
1084
- updated_at?: string;
1085
- };
1086
- Update: {
1087
- archived?: boolean | null;
1088
- chat_id?: string;
1089
- chat_image?: string | null;
1090
- chat_name?: string | null;
1091
- chat_type?: string | null;
1092
- created_at?: string;
1093
- created_by?: string | null;
1094
- group_metadata?: Json | null;
1095
- id?: Json | null;
1096
- initiated_by?: string | null;
1097
- invite_link?: string | null;
1098
- is_exited?: boolean | null;
1099
- is_group?: boolean | null;
1100
- is_muted?: boolean | null;
1101
- is_read_only?: boolean | null;
1102
- latest_message?: Json | null;
1103
- member_count?: number | null;
1104
- member_unread_count?: Json | null;
1105
- mute_expiration?: number | null;
1106
- name?: string | null;
1107
- org_id?: string;
1108
- org_phone?: string;
1109
- pinned?: boolean | null;
1110
- pinned_messages?: Json | null;
1111
- timestamp?: string | null;
1112
- unread_count?: number | null;
1113
- updated_at?: string;
1114
- };
1115
- Relationships: [];
1116
- };
1117
- tbl_contacts: {
1118
- Row: {
1119
- business_profile: Json | null;
1120
- contact_color: Database["public"]["Enums"]["enum_chat_colors"] | null;
1121
- contact_id: string;
1122
- contact_image: string | null;
1123
- contact_name: string | null;
1124
- contact_type: string | null;
1125
- id: Json | null;
1126
- is_blocked: boolean | null;
1127
- is_business: boolean | null;
1128
- is_enterprise: boolean | null;
1129
- is_group: boolean | null;
1130
- is_imported: boolean | null;
1131
- is_internal: boolean | null;
1132
- is_me: boolean | null;
1133
- is_my_contact: boolean | null;
1134
- is_user: boolean | null;
1135
- is_wa_contact: boolean | null;
1136
- label_ids: Json;
1137
- name: string | null;
1138
- number: string | null;
1139
- org_id: string;
1140
- periskope_name: string | null;
1141
- pushname: string | null;
1142
- short_name: string | null;
1143
- updated_at: string | null;
1144
- verified_level: number | null;
1145
- verified_name: string | null;
1146
- };
1147
- Insert: {
1148
- business_profile?: Json | null;
1149
- contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null;
1150
- contact_id: string;
1151
- contact_image?: string | null;
1152
- contact_name?: string | null;
1153
- contact_type?: string | null;
1154
- id?: Json | null;
1155
- is_blocked?: boolean | null;
1156
- is_business?: boolean | null;
1157
- is_enterprise?: boolean | null;
1158
- is_group?: boolean | null;
1159
- is_imported?: boolean | null;
1160
- is_internal?: boolean | null;
1161
- is_me?: boolean | null;
1162
- is_my_contact?: boolean | null;
1163
- is_user?: boolean | null;
1164
- is_wa_contact?: boolean | null;
1165
- label_ids?: Json;
1166
- name?: string | null;
1167
- number?: string | null;
1168
- org_id: string;
1169
- periskope_name?: string | null;
1170
- pushname?: string | null;
1171
- short_name?: string | null;
1172
- updated_at?: string | null;
1173
- verified_level?: number | null;
1174
- verified_name?: string | null;
1175
- };
1176
- Update: {
1177
- business_profile?: Json | null;
1178
- contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null;
1179
- contact_id?: string;
1180
- contact_image?: string | null;
1181
- contact_name?: string | null;
1182
- contact_type?: string | null;
1183
- id?: Json | null;
1184
- is_blocked?: boolean | null;
1185
- is_business?: boolean | null;
1186
- is_enterprise?: boolean | null;
1187
- is_group?: boolean | null;
1188
- is_imported?: boolean | null;
1189
- is_internal?: boolean | null;
1190
- is_me?: boolean | null;
1191
- is_my_contact?: boolean | null;
1192
- is_user?: boolean | null;
1193
- is_wa_contact?: boolean | null;
1194
- label_ids?: Json;
1195
- name?: string | null;
1196
- number?: string | null;
1197
- org_id?: string;
1198
- periskope_name?: string | null;
1199
- pushname?: string | null;
1200
- short_name?: string | null;
1201
- updated_at?: string | null;
1202
- verified_level?: number | null;
1203
- verified_name?: string | null;
1204
- };
1205
- Relationships: [
1206
- {
1207
- foreignKeyName: "tbl_contacts_org_id_fkey";
1208
- columns: ["org_id"];
1209
- isOneToOne: false;
1210
- referencedRelation: "tbl_org";
1211
- referencedColumns: ["org_id"];
1212
- },
1213
- {
1214
- foreignKeyName: "tbl_contacts_org_id_fkey";
1215
- columns: ["org_id"];
1216
- isOneToOne: false;
1217
- referencedRelation: "view_org";
1218
- referencedColumns: ["org_id"];
1219
- }
1220
- ];
1221
- };
1222
- tbl_custom_properties: {
1223
- Row: {
1224
- created_at: string;
1225
- created_by: string | null;
1226
- is_required: boolean;
1227
- org_id: string | null;
1228
- property_id: string;
1229
- property_metadata: Json | null;
1230
- property_name: string;
1231
- property_value: Json | null;
1232
- property_value_type: string | null;
1233
- type: string | null;
1234
- };
1235
- Insert: {
1236
- created_at?: string;
1237
- created_by?: string | null;
1238
- is_required?: boolean;
1239
- org_id?: string | null;
1240
- property_id?: string;
1241
- property_metadata?: Json | null;
1242
- property_name: string;
1243
- property_value?: Json | null;
1244
- property_value_type?: string | null;
1245
- type?: string | null;
1246
- };
1247
- Update: {
1248
- created_at?: string;
1249
- created_by?: string | null;
1250
- is_required?: boolean;
1251
- org_id?: string | null;
1252
- property_id?: string;
1253
- property_metadata?: Json | null;
1254
- property_name?: string;
1255
- property_value?: Json | null;
1256
- property_value_type?: string | null;
1257
- type?: string | null;
1258
- };
1259
- Relationships: [
1260
- {
1261
- foreignKeyName: "tbl_custom_properties_org_id_fkey";
1262
- columns: ["org_id"];
1263
- isOneToOne: false;
1264
- referencedRelation: "tbl_org";
1265
- referencedColumns: ["org_id"];
1266
- },
1267
- {
1268
- foreignKeyName: "tbl_custom_properties_org_id_fkey";
1269
- columns: ["org_id"];
1270
- isOneToOne: false;
1271
- referencedRelation: "view_org";
1272
- referencedColumns: ["org_id"];
1273
- }
1274
- ];
1275
- };
1276
- tbl_group_templates: {
1277
- Row: {
1278
- created_at: string;
1279
- group_image: string | null;
1280
- group_metadata: Json;
1281
- group_name: string | null;
1282
- last_updated_at: string;
1283
- last_updated_by: string;
1284
- org_id: string;
1285
- org_phone: string;
1286
- participants: Json;
1287
- template_id: string;
1288
- template_name: string;
1289
- };
1290
- Insert: {
1291
- created_at?: string;
1292
- group_image?: string | null;
1293
- group_metadata?: Json;
1294
- group_name?: string | null;
1295
- last_updated_at?: string;
1296
- last_updated_by: string;
1297
- org_id: string;
1298
- org_phone: string;
1299
- participants?: Json;
1300
- template_id?: string;
1301
- template_name: string;
1302
- };
1303
- Update: {
1304
- created_at?: string;
1305
- group_image?: string | null;
1306
- group_metadata?: Json;
1307
- group_name?: string | null;
1308
- last_updated_at?: string;
1309
- last_updated_by?: string;
1310
- org_id?: string;
1311
- org_phone?: string;
1312
- participants?: Json;
1313
- template_id?: string;
1314
- template_name?: string;
1315
- };
1316
- Relationships: [
1317
- {
1318
- foreignKeyName: "tbl_group_templates_org_id_fkey";
1319
- columns: ["org_id"];
1320
- isOneToOne: false;
1321
- referencedRelation: "tbl_org";
1322
- referencedColumns: ["org_id"];
1323
- },
1324
- {
1325
- foreignKeyName: "tbl_group_templates_org_id_fkey";
1326
- columns: ["org_id"];
1327
- isOneToOne: false;
1328
- referencedRelation: "view_org";
1329
- referencedColumns: ["org_id"];
1330
- }
1331
- ];
1332
- };
1333
- tbl_integration_hooks: {
1334
- Row: {
1335
- hook_url: string;
1336
- id: string;
1337
- integration_id: string | null;
1338
- integration_metadata: Json;
1339
- integration_name: Database["public"]["Enums"]["enum_integration_name"];
1340
- integration_type: string;
1341
- is_subscribed: boolean;
1342
- org_id: string;
1343
- subscribed_at: string;
1344
- type: Database["public"]["Enums"]["enum_integration_type"];
1345
- };
1346
- Insert: {
1347
- hook_url: string;
1348
- id?: string;
1349
- integration_id?: string | null;
1350
- integration_metadata: Json;
1351
- integration_name: Database["public"]["Enums"]["enum_integration_name"];
1352
- integration_type: string;
1353
- is_subscribed: boolean;
1354
- org_id: string;
1355
- subscribed_at?: string;
1356
- type: Database["public"]["Enums"]["enum_integration_type"];
1357
- };
1358
- Update: {
1359
- hook_url?: string;
1360
- id?: string;
1361
- integration_id?: string | null;
1362
- integration_metadata?: Json;
1363
- integration_name?: Database["public"]["Enums"]["enum_integration_name"];
1364
- integration_type?: string;
1365
- is_subscribed?: boolean;
1366
- org_id?: string;
1367
- subscribed_at?: string;
1368
- type?: Database["public"]["Enums"]["enum_integration_type"];
1369
- };
1370
- Relationships: [
1371
- {
1372
- foreignKeyName: "tbl_integration_hooks_org_id_fkey";
1373
- columns: ["org_id"];
1374
- isOneToOne: false;
1375
- referencedRelation: "tbl_org";
1376
- referencedColumns: ["org_id"];
1377
- },
1378
- {
1379
- foreignKeyName: "tbl_integration_hooks_org_id_fkey";
1380
- columns: ["org_id"];
1381
- isOneToOne: false;
1382
- referencedRelation: "view_org";
1383
- referencedColumns: ["org_id"];
1384
- }
1385
- ];
1386
- };
1387
- tbl_integration_logs: {
1388
- Row: {
1389
- created_at: string;
1390
- id: string;
1391
- integration_name: Database["public"]["Enums"]["enum_integration_name"];
1392
- integration_type: string;
1393
- metadata: Json;
1394
- org_id: string;
1395
- response: Json | null;
1396
- success: boolean;
1397
- type: Database["public"]["Enums"]["enum_integration_type"];
1398
- };
1399
- Insert: {
1400
- created_at?: string;
1401
- id?: string;
1402
- integration_name: Database["public"]["Enums"]["enum_integration_name"];
1403
- integration_type: string;
1404
- metadata?: Json;
1405
- org_id: string;
1406
- response?: Json | null;
1407
- success?: boolean;
1408
- type: Database["public"]["Enums"]["enum_integration_type"];
1409
- };
1410
- Update: {
1411
- created_at?: string;
1412
- id?: string;
1413
- integration_name?: Database["public"]["Enums"]["enum_integration_name"];
1414
- integration_type?: string;
1415
- metadata?: Json;
1416
- org_id?: string;
1417
- response?: Json | null;
1418
- success?: boolean;
1419
- type?: Database["public"]["Enums"]["enum_integration_type"];
1420
- };
1421
- Relationships: [
1422
- {
1423
- foreignKeyName: "tbl_integration_logs_org_id_fkey";
1424
- columns: ["org_id"];
1425
- isOneToOne: false;
1426
- referencedRelation: "tbl_org";
1427
- referencedColumns: ["org_id"];
1428
- },
1429
- {
1430
- foreignKeyName: "tbl_integration_logs_org_id_fkey";
1431
- columns: ["org_id"];
1432
- isOneToOne: false;
1433
- referencedRelation: "view_org";
1434
- referencedColumns: ["org_id"];
1435
- }
1436
- ];
1437
- };
1438
- tbl_integration_tokens: {
1439
- Row: {
1440
- exp: string;
1441
- iat: string;
1442
- id: string;
1443
- is_revealed: boolean;
1444
- name: string;
1445
- org_id: string;
1446
- role: string;
1447
- token: string;
1448
- token_metadata: Json | null;
1449
- type: Database["public"]["Enums"]["enum_integration_type"];
1450
- };
1451
- Insert: {
1452
- exp: string;
1453
- iat: string;
1454
- id?: string;
1455
- is_revealed?: boolean;
1456
- name: string;
1457
- org_id: string;
1458
- role: string;
1459
- token: string;
1460
- token_metadata?: Json | null;
1461
- type: Database["public"]["Enums"]["enum_integration_type"];
1462
- };
1463
- Update: {
1464
- exp?: string;
1465
- iat?: string;
1466
- id?: string;
1467
- is_revealed?: boolean;
1468
- name?: string;
1469
- org_id?: string;
1470
- role?: string;
1471
- token?: string;
1472
- token_metadata?: Json | null;
1473
- type?: Database["public"]["Enums"]["enum_integration_type"];
1474
- };
1475
- Relationships: [
1476
- {
1477
- foreignKeyName: "public_tbl_integration_tokens_org_id_fkey";
1478
- columns: ["org_id"];
1479
- isOneToOne: false;
1480
- referencedRelation: "tbl_org";
1481
- referencedColumns: ["org_id"];
1482
- },
1483
- {
1484
- foreignKeyName: "public_tbl_integration_tokens_org_id_fkey";
1485
- columns: ["org_id"];
1486
- isOneToOne: false;
1487
- referencedRelation: "view_org";
1488
- referencedColumns: ["org_id"];
1489
- }
1490
- ];
1491
- };
1492
- tbl_org: {
1493
- Row: {
1494
- created_at: string;
1495
- is_deleted: boolean;
1496
- is_platform: boolean | null;
1497
- org_id: string;
1498
- org_image: string | null;
1499
- org_metadata: Json | null;
1500
- org_name: string | null;
1501
- org_plan: Json | null;
1502
- stripe_customer_details: Json | null;
1503
- stripe_customer_id: string | null;
1504
- stripe_subscription_details: Json | null;
1505
- support_link: string | null;
1506
- };
1507
- Insert: {
1508
- created_at?: string;
1509
- is_deleted?: boolean;
1510
- is_platform?: boolean | null;
1511
- org_id?: string;
1512
- org_image?: string | null;
1513
- org_metadata?: Json | null;
1514
- org_name?: string | null;
1515
- org_plan?: Json | null;
1516
- stripe_customer_details?: Json | null;
1517
- stripe_customer_id?: string | null;
1518
- stripe_subscription_details?: Json | null;
1519
- support_link?: string | null;
1520
- };
1521
- Update: {
1522
- created_at?: string;
1523
- is_deleted?: boolean;
1524
- is_platform?: boolean | null;
1525
- org_id?: string;
1526
- org_image?: string | null;
1527
- org_metadata?: Json | null;
1528
- org_name?: string | null;
1529
- org_plan?: Json | null;
1530
- stripe_customer_details?: Json | null;
1531
- stripe_customer_id?: string | null;
1532
- stripe_subscription_details?: Json | null;
1533
- support_link?: string | null;
1534
- };
1535
- Relationships: [];
1536
- };
1537
- tbl_org_labels: {
1538
- Row: {
1539
- color: string;
1540
- created_at: string;
1541
- label_id: string;
1542
- name: string;
1543
- org_id: string;
1544
- type: string;
1545
- };
1546
- Insert: {
1547
- color?: string;
1548
- created_at?: string;
1549
- label_id?: string;
1550
- name: string;
1551
- org_id: string;
1552
- type?: string;
1553
- };
1554
- Update: {
1555
- color?: string;
1556
- created_at?: string;
1557
- label_id?: string;
1558
- name?: string;
1559
- org_id?: string;
1560
- type?: string;
1561
- };
1562
- Relationships: [
1563
- {
1564
- foreignKeyName: "tbl_org_labels_org_id_fkey";
1565
- columns: ["org_id"];
1566
- isOneToOne: false;
1567
- referencedRelation: "tbl_org";
1568
- referencedColumns: ["org_id"];
1569
- },
1570
- {
1571
- foreignKeyName: "tbl_org_labels_org_id_fkey";
1572
- columns: ["org_id"];
1573
- isOneToOne: false;
1574
- referencedRelation: "view_org";
1575
- referencedColumns: ["org_id"];
1576
- }
1577
- ];
1578
- };
1579
- tbl_org_members: {
1580
- Row: {
1581
- created_at: string | null;
1582
- email: string;
1583
- invited_at: string | null;
1584
- invited_by: string | null;
1585
- is_active: boolean;
1586
- is_online: boolean;
1587
- is_owner: boolean | null;
1588
- label_ids: string[] | null;
1589
- member_color: Database["public"]["Enums"]["enum_chat_colors"];
1590
- member_image: string | null;
1591
- member_metadata: Json | null;
1592
- member_name: string | null;
1593
- org_id: string;
1594
- org_phones: string[] | null;
1595
- preferences: Json;
1596
- role: Database["public"]["Enums"]["enum_member_role"];
1597
- user_id: string | null;
1598
- };
1599
- Insert: {
1600
- created_at?: string | null;
1601
- email: string;
1602
- invited_at?: string | null;
1603
- invited_by?: string | null;
1604
- is_active?: boolean;
1605
- is_online?: boolean;
1606
- is_owner?: boolean | null;
1607
- label_ids?: string[] | null;
1608
- member_color?: Database["public"]["Enums"]["enum_chat_colors"];
1609
- member_image?: string | null;
1610
- member_metadata?: Json | null;
1611
- member_name?: string | null;
1612
- org_id: string;
1613
- org_phones?: string[] | null;
1614
- preferences?: Json;
1615
- role?: Database["public"]["Enums"]["enum_member_role"];
1616
- user_id?: string | null;
1617
- };
1618
- Update: {
1619
- created_at?: string | null;
1620
- email?: string;
1621
- invited_at?: string | null;
1622
- invited_by?: string | null;
1623
- is_active?: boolean;
1624
- is_online?: boolean;
1625
- is_owner?: boolean | null;
1626
- label_ids?: string[] | null;
1627
- member_color?: Database["public"]["Enums"]["enum_chat_colors"];
1628
- member_image?: string | null;
1629
- member_metadata?: Json | null;
1630
- member_name?: string | null;
1631
- org_id?: string;
1632
- org_phones?: string[] | null;
1633
- preferences?: Json;
1634
- role?: Database["public"]["Enums"]["enum_member_role"];
1635
- user_id?: string | null;
1636
- };
1637
- Relationships: [
1638
- {
1639
- foreignKeyName: "tbl_org_members_fkey_tbl_org";
1640
- columns: ["org_id"];
1641
- isOneToOne: false;
1642
- referencedRelation: "tbl_org";
1643
- referencedColumns: ["org_id"];
1644
- },
1645
- {
1646
- foreignKeyName: "tbl_org_members_fkey_tbl_org";
1647
- columns: ["org_id"];
1648
- isOneToOne: false;
1649
- referencedRelation: "view_org";
1650
- referencedColumns: ["org_id"];
1651
- }
1652
- ];
1653
- };
1654
- tbl_org_phones: {
1655
- Row: {
1656
- created_at: string;
1657
- first_connected_at: string | null;
1658
- is_browser_open: boolean;
1659
- is_ready: boolean | null;
1660
- label_ids: Json | null;
1661
- legacy_version: boolean | null;
1662
- library: string | null;
1663
- org_id: string;
1664
- org_phone: string | null;
1665
- phone_id: string;
1666
- phone_image: string | null;
1667
- phone_name: string | null;
1668
- phone_state: Json | null;
1669
- qr_code: string | null;
1670
- queue_status: Json | null;
1671
- server_image: string | null;
1672
- server_ip: string | null;
1673
- soft_restart: boolean;
1674
- updated_at: string | null;
1675
- wa_state: string | null;
1676
- wa_version: string | null;
1677
- };
1678
- Insert: {
1679
- created_at?: string;
1680
- first_connected_at?: string | null;
1681
- is_browser_open?: boolean;
1682
- is_ready?: boolean | null;
1683
- label_ids?: Json | null;
1684
- legacy_version?: boolean | null;
1685
- library?: string | null;
1686
- org_id: string;
1687
- org_phone?: string | null;
1688
- phone_id?: string;
1689
- phone_image?: string | null;
1690
- phone_name?: string | null;
1691
- phone_state?: Json | null;
1692
- qr_code?: string | null;
1693
- queue_status?: Json | null;
1694
- server_image?: string | null;
1695
- server_ip?: string | null;
1696
- soft_restart?: boolean;
1697
- updated_at?: string | null;
1698
- wa_state?: string | null;
1699
- wa_version?: string | null;
1700
- };
1701
- Update: {
1702
- created_at?: string;
1703
- first_connected_at?: string | null;
1704
- is_browser_open?: boolean;
1705
- is_ready?: boolean | null;
1706
- label_ids?: Json | null;
1707
- legacy_version?: boolean | null;
1708
- library?: string | null;
1709
- org_id?: string;
1710
- org_phone?: string | null;
1711
- phone_id?: string;
1712
- phone_image?: string | null;
1713
- phone_name?: string | null;
1714
- phone_state?: Json | null;
1715
- qr_code?: string | null;
1716
- queue_status?: Json | null;
1717
- server_image?: string | null;
1718
- server_ip?: string | null;
1719
- soft_restart?: boolean;
1720
- updated_at?: string | null;
1721
- wa_state?: string | null;
1722
- wa_version?: string | null;
1723
- };
1724
- Relationships: [
1725
- {
1726
- foreignKeyName: "tbl_org_phones_fkey_tbl_org";
1727
- columns: ["org_id"];
1728
- isOneToOne: false;
1729
- referencedRelation: "tbl_org";
1730
- referencedColumns: ["org_id"];
1731
- },
1732
- {
1733
- foreignKeyName: "tbl_org_phones_fkey_tbl_org";
1734
- columns: ["org_id"];
1735
- isOneToOne: false;
1736
- referencedRelation: "view_org";
1737
- referencedColumns: ["org_id"];
1738
- },
1739
- {
1740
- foreignKeyName: "tbl_org_phones_org_id_fkey";
1741
- columns: ["org_id"];
1742
- isOneToOne: false;
1743
- referencedRelation: "tbl_org";
1744
- referencedColumns: ["org_id"];
1745
- },
1746
- {
1747
- foreignKeyName: "tbl_org_phones_org_id_fkey";
1748
- columns: ["org_id"];
1749
- isOneToOne: false;
1750
- referencedRelation: "view_org";
1751
- referencedColumns: ["org_id"];
1752
- }
1753
- ];
1754
- };
1755
- tbl_org_tasks: {
1756
- Row: {
1757
- assignee: string | null;
1758
- associated_object_metadata: Json | null;
1759
- completed_metadata: Json | null;
1760
- created_at: string;
1761
- created_by: string;
1762
- due_date: string | null;
1763
- last_updated_at: string;
1764
- last_updated_by: string;
1765
- notes: string | null;
1766
- org_id: string;
1767
- priority: number;
1768
- remind_at: string | null;
1769
- reminder_setting: Json | null;
1770
- status: string;
1771
- task_id: string;
1772
- title: string;
1773
- type: string;
1774
- };
1775
- Insert: {
1776
- assignee?: string | null;
1777
- associated_object_metadata?: Json | null;
1778
- completed_metadata?: Json | null;
1779
- created_at?: string;
1780
- created_by?: string;
1781
- due_date?: string | null;
1782
- last_updated_at?: string;
1783
- last_updated_by: string;
1784
- notes?: string | null;
1785
- org_id: string;
1786
- priority?: number;
1787
- remind_at?: string | null;
1788
- reminder_setting?: Json | null;
1789
- status?: string;
1790
- task_id?: string;
1791
- title: string;
1792
- type: string;
1793
- };
1794
- Update: {
1795
- assignee?: string | null;
1796
- associated_object_metadata?: Json | null;
1797
- completed_metadata?: Json | null;
1798
- created_at?: string;
1799
- created_by?: string;
1800
- due_date?: string | null;
1801
- last_updated_at?: string;
1802
- last_updated_by?: string;
1803
- notes?: string | null;
1804
- org_id?: string;
1805
- priority?: number;
1806
- remind_at?: string | null;
1807
- reminder_setting?: Json | null;
1808
- status?: string;
1809
- task_id?: string;
1810
- title?: string;
1811
- type?: string;
1812
- };
1813
- Relationships: [
1814
- {
1815
- foreignKeyName: "tbl_org_task_org_id_fkey";
1816
- columns: ["org_id"];
1817
- isOneToOne: false;
1818
- referencedRelation: "tbl_org";
1819
- referencedColumns: ["org_id"];
1820
- },
1821
- {
1822
- foreignKeyName: "tbl_org_task_org_id_fkey";
1823
- columns: ["org_id"];
1824
- isOneToOne: false;
1825
- referencedRelation: "view_org";
1826
- referencedColumns: ["org_id"];
1827
- }
1828
- ];
1829
- };
1830
- tbl_org_transactions: {
1831
- Row: {
1832
- amount: number;
1833
- is_top_up: boolean | null;
1834
- org_id: string;
1835
- timestamp: string | null;
1836
- transaction_id: string;
1837
- transaction_metadata: Json | null;
1838
- transaction_type: Database["public"]["Enums"]["enum_credit_transaction_type"];
1839
- usage_metadata: Json | null;
1840
- };
1841
- Insert: {
1842
- amount: number;
1843
- is_top_up?: boolean | null;
1844
- org_id: string;
1845
- timestamp?: string | null;
1846
- transaction_id?: string;
1847
- transaction_metadata?: Json | null;
1848
- transaction_type: Database["public"]["Enums"]["enum_credit_transaction_type"];
1849
- usage_metadata?: Json | null;
1850
- };
1851
- Update: {
1852
- amount?: number;
1853
- is_top_up?: boolean | null;
1854
- org_id?: string;
1855
- timestamp?: string | null;
1856
- transaction_id?: string;
1857
- transaction_metadata?: Json | null;
1858
- transaction_type?: Database["public"]["Enums"]["enum_credit_transaction_type"];
1859
- usage_metadata?: Json | null;
1860
- };
1861
- Relationships: [
1862
- {
1863
- foreignKeyName: "tbl_org_transactions_org_id_fkey";
1864
- columns: ["org_id"];
1865
- isOneToOne: false;
1866
- referencedRelation: "tbl_org";
1867
- referencedColumns: ["org_id"];
1868
- },
1869
- {
1870
- foreignKeyName: "tbl_org_transactions_org_id_fkey";
1871
- columns: ["org_id"];
1872
- isOneToOne: false;
1873
- referencedRelation: "view_org";
1874
- referencedColumns: ["org_id"];
1875
- }
1876
- ];
1877
- };
1878
- tbl_quick_replies: {
1879
- Row: {
1880
- command: string | null;
1881
- created_at: string;
1882
- message_payload: Json | null;
1883
- org_id: string;
1884
- reply_id: string;
1885
- };
1886
- Insert: {
1887
- command?: string | null;
1888
- created_at?: string;
1889
- message_payload?: Json | null;
1890
- org_id: string;
1891
- reply_id?: string;
1892
- };
1893
- Update: {
1894
- command?: string | null;
1895
- created_at?: string;
1896
- message_payload?: Json | null;
1897
- org_id?: string;
1898
- reply_id?: string;
1899
- };
1900
- Relationships: [
1901
- {
1902
- foreignKeyName: "tbl_quick_replies_org_id_fkey";
1903
- columns: ["org_id"];
1904
- isOneToOne: false;
1905
- referencedRelation: "tbl_org";
1906
- referencedColumns: ["org_id"];
1907
- },
1908
- {
1909
- foreignKeyName: "tbl_quick_replies_org_id_fkey";
1910
- columns: ["org_id"];
1911
- isOneToOne: false;
1912
- referencedRelation: "view_org";
1913
- referencedColumns: ["org_id"];
1914
- }
1915
- ];
1916
- };
1917
- tbl_recurring_messages: {
1918
- Row: {
1919
- chat_id: string;
1920
- created_at: string;
1921
- is_repeat: boolean | null;
1922
- message_payload: Json | null;
1923
- org_id: string;
1924
- org_phone: string | null;
1925
- performed_by: string | null;
1926
- repeat_config: Json | null;
1927
- scheduled_at: string;
1928
- scheduled_id: string;
1929
- updated_at: string | null;
1930
- };
1931
- Insert: {
1932
- chat_id: string;
1933
- created_at?: string;
1934
- is_repeat?: boolean | null;
1935
- message_payload?: Json | null;
1936
- org_id: string;
1937
- org_phone?: string | null;
1938
- performed_by?: string | null;
1939
- repeat_config?: Json | null;
1940
- scheduled_at: string;
1941
- scheduled_id?: string;
1942
- updated_at?: string | null;
1943
- };
1944
- Update: {
1945
- chat_id?: string;
1946
- created_at?: string;
1947
- is_repeat?: boolean | null;
1948
- message_payload?: Json | null;
1949
- org_id?: string;
1950
- org_phone?: string | null;
1951
- performed_by?: string | null;
1952
- repeat_config?: Json | null;
1953
- scheduled_at?: string;
1954
- scheduled_id?: string;
1955
- updated_at?: string | null;
1956
- };
1957
- Relationships: [
1958
- {
1959
- foreignKeyName: "tbl_recurring_messages_org_id_fkey";
1960
- columns: ["org_id"];
1961
- isOneToOne: false;
1962
- referencedRelation: "tbl_org";
1963
- referencedColumns: ["org_id"];
1964
- },
1965
- {
1966
- foreignKeyName: "tbl_recurring_messages_org_id_fkey";
1967
- columns: ["org_id"];
1968
- isOneToOne: false;
1969
- referencedRelation: "view_org";
1970
- referencedColumns: ["org_id"];
1971
- }
1972
- ];
1973
- };
1974
- tbl_rules_logs: {
1975
- Row: {
1976
- actions_progress: Json | null;
1977
- conditions_progress: Json | null;
1978
- created_at: string;
1979
- log_id: string;
1980
- metadata: Json | null;
1981
- org_id: string;
1982
- rule_id: string | null;
1983
- trace_id: string | null;
1984
- trigger: string;
1985
- };
1986
- Insert: {
1987
- actions_progress?: Json | null;
1988
- conditions_progress?: Json | null;
1989
- created_at?: string;
1990
- log_id?: string;
1991
- metadata?: Json | null;
1992
- org_id: string;
1993
- rule_id?: string | null;
1994
- trace_id?: string | null;
1995
- trigger: string;
1996
- };
1997
- Update: {
1998
- actions_progress?: Json | null;
1999
- conditions_progress?: Json | null;
2000
- created_at?: string;
2001
- log_id?: string;
2002
- metadata?: Json | null;
2003
- org_id?: string;
2004
- rule_id?: string | null;
2005
- trace_id?: string | null;
2006
- trigger?: string;
2007
- };
2008
- Relationships: [
2009
- {
2010
- foreignKeyName: "tbl_rules_logs_org_id_fkey";
2011
- columns: ["org_id"];
2012
- isOneToOne: false;
2013
- referencedRelation: "tbl_org";
2014
- referencedColumns: ["org_id"];
2015
- },
2016
- {
2017
- foreignKeyName: "tbl_rules_logs_org_id_fkey";
2018
- columns: ["org_id"];
2019
- isOneToOne: false;
2020
- referencedRelation: "view_org";
2021
- referencedColumns: ["org_id"];
2022
- },
2023
- {
2024
- foreignKeyName: "tbl_rules_logs_rule_id_fkey";
2025
- columns: ["rule_id"];
2026
- isOneToOne: false;
2027
- referencedRelation: "tbl_automation_rules";
2028
- referencedColumns: ["id"];
2029
- }
2030
- ];
2031
- };
2032
- tbl_scheduled_logs: {
2033
- Row: {
2034
- chat_id: string | null;
2035
- created_at: string;
2036
- delivered_at: string | null;
2037
- id: string;
2038
- is_success: boolean | null;
2039
- message_id: string | null;
2040
- org_id: string | null;
2041
- scheduled_id: string;
2042
- sent_message_id: string | null;
2043
- };
2044
- Insert: {
2045
- chat_id?: string | null;
2046
- created_at?: string;
2047
- delivered_at?: string | null;
2048
- id?: string;
2049
- is_success?: boolean | null;
2050
- message_id?: string | null;
2051
- org_id?: string | null;
2052
- scheduled_id: string;
2053
- sent_message_id?: string | null;
2054
- };
2055
- Update: {
2056
- chat_id?: string | null;
2057
- created_at?: string;
2058
- delivered_at?: string | null;
2059
- id?: string;
2060
- is_success?: boolean | null;
2061
- message_id?: string | null;
2062
- org_id?: string | null;
2063
- scheduled_id?: string;
2064
- sent_message_id?: string | null;
2065
- };
2066
- Relationships: [
2067
- {
2068
- foreignKeyName: "tbl_scheduled_message_logs_org_id_fkey";
2069
- columns: ["org_id"];
2070
- isOneToOne: false;
2071
- referencedRelation: "tbl_org";
2072
- referencedColumns: ["org_id"];
2073
- },
2074
- {
2075
- foreignKeyName: "tbl_scheduled_message_logs_org_id_fkey";
2076
- columns: ["org_id"];
2077
- isOneToOne: false;
2078
- referencedRelation: "view_org";
2079
- referencedColumns: ["org_id"];
2080
- }
2081
- ];
2082
- };
2083
- };
2084
- Views: {
2085
- view_broadcast_logs: {
2086
- Row: {
2087
- broadcast_id: string | null;
2088
- broadcast_status: Database["public"]["Enums"]["enum_broadcast_status"] | null;
2089
- created_at: string | null;
2090
- delivered_percentage: number | null;
2091
- failed_chats: number | null;
2092
- message_payload: Json | null;
2093
- org_id: string | null;
2094
- pending_chats: number | null;
2095
- performed_at: string | null;
2096
- performed_by: string | null;
2097
- read_percentage: number | null;
2098
- scheduled_at: string | null;
2099
- sent_chats: number | null;
2100
- total_chats: number | null;
2101
- total_delivered_count: number | null;
2102
- total_member_count: number | null;
2103
- total_read_count: number | null;
2104
- };
2105
- Relationships: [
2106
- {
2107
- foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
2108
- columns: ["org_id"];
2109
- isOneToOne: false;
2110
- referencedRelation: "tbl_org";
2111
- referencedColumns: ["org_id"];
2112
- },
2113
- {
2114
- foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
2115
- columns: ["org_id"];
2116
- isOneToOne: false;
2117
- referencedRelation: "view_org";
2118
- referencedColumns: ["org_id"];
2119
- }
2120
- ];
2121
- };
2122
- view_chat_logs: {
2123
- Row: {
2124
- action: string | null;
2125
- failed: number | null;
2126
- operation_id: string | null;
2127
- org_id: string | null;
2128
- pending: number | null;
2129
- performed_at: string | null;
2130
- performed_by: string | null;
2131
- success: number | null;
2132
- total_chats: number | null;
2133
- total_logs: number | null;
2134
- total_participants: number | null;
2135
- };
2136
- Relationships: [
2137
- {
2138
- foreignKeyName: "tbl_chat_logs_org_id_fkey";
2139
- columns: ["org_id"];
2140
- isOneToOne: false;
2141
- referencedRelation: "tbl_org";
2142
- referencedColumns: ["org_id"];
2143
- },
2144
- {
2145
- foreignKeyName: "tbl_chat_logs_org_id_fkey";
2146
- columns: ["org_id"];
2147
- isOneToOne: false;
2148
- referencedRelation: "view_org";
2149
- referencedColumns: ["org_id"];
2150
- }
2151
- ];
2152
- };
2153
- view_chats: {
2154
- Row: {
2155
- add_members_admins_only: boolean | null;
2156
- assigned_to: string | null;
2157
- chat_access: Json | null;
2158
- chat_id: string | null;
2159
- chat_image: string | null;
2160
- chat_name: string | null;
2161
- chat_org_phones: string[] | null;
2162
- chat_type: string | null;
2163
- closed_at: number | null;
2164
- created_at: string | null;
2165
- custom_properties: Json | null;
2166
- flag_count_map: Json | null;
2167
- freshdesk_metadata: Json | null;
2168
- group_description: string | null;
2169
- hubspot_metadata: Json | null;
2170
- info_admins_only: boolean | null;
2171
- initiated_by: string | null;
2172
- invite_link: string | null;
2173
- is_exited: boolean | null;
2174
- is_muted: boolean | null;
2175
- label_ids: Json | null;
2176
- latest_message: Json | null;
2177
- member_count: number | null;
2178
- message_unread_count: number | null;
2179
- messages_admins_only: boolean | null;
2180
- org_id: string | null;
2181
- org_phone: string | null;
2182
- pinned_messages: Json | null;
2183
- updated_at: string | null;
2184
- zohodesk_metadata: Json | null;
2185
- };
2186
- Relationships: [];
2187
- };
2188
- view_org: {
2189
- Row: {
2190
- access_scopes: Json | null;
2191
- created_at: string | null;
2192
- is_enterprise: boolean | null;
2193
- is_free_trial: boolean | null;
2194
- is_freshdesk_connected: boolean | null;
2195
- is_hubspot_connected: boolean | null;
2196
- is_platform: boolean | null;
2197
- is_zohodesk_connected: boolean | null;
2198
- org_id: string | null;
2199
- org_image: string | null;
2200
- org_metadata: Json | null;
2201
- org_name: string | null;
2202
- org_plan: Json | null;
2203
- pending_days: number | null;
2204
- phone_limit: string | null;
2205
- plan_id: string | null;
2206
- stripe_customer_details: Json | null;
2207
- stripe_customer_id: string | null;
2208
- stripe_subscription_details: Json | null;
2209
- subscription_status: string | null;
2210
- support_link: string | null;
2211
- user_limit: string | null;
2212
- };
2213
- Insert: {
2214
- access_scopes?: never;
2215
- created_at?: string | null;
2216
- is_enterprise?: never;
2217
- is_free_trial?: never;
2218
- is_freshdesk_connected?: never;
2219
- is_hubspot_connected?: never;
2220
- is_platform?: boolean | null;
2221
- is_zohodesk_connected?: never;
2222
- org_id?: string | null;
2223
- org_image?: string | null;
2224
- org_metadata?: Json | null;
2225
- org_name?: string | null;
2226
- org_plan?: Json | null;
2227
- pending_days?: never;
2228
- phone_limit?: never;
2229
- plan_id?: never;
2230
- stripe_customer_details?: Json | null;
2231
- stripe_customer_id?: string | null;
2232
- stripe_subscription_details?: Json | null;
2233
- subscription_status?: never;
2234
- support_link?: string | null;
2235
- user_limit?: never;
2236
- };
2237
- Update: {
2238
- access_scopes?: never;
2239
- created_at?: string | null;
2240
- is_enterprise?: never;
2241
- is_free_trial?: never;
2242
- is_freshdesk_connected?: never;
2243
- is_hubspot_connected?: never;
2244
- is_platform?: boolean | null;
2245
- is_zohodesk_connected?: never;
2246
- org_id?: string | null;
2247
- org_image?: string | null;
2248
- org_metadata?: Json | null;
2249
- org_name?: string | null;
2250
- org_plan?: Json | null;
2251
- pending_days?: never;
2252
- phone_limit?: never;
2253
- plan_id?: never;
2254
- stripe_customer_details?: Json | null;
2255
- stripe_customer_id?: string | null;
2256
- stripe_subscription_details?: Json | null;
2257
- subscription_status?: never;
2258
- support_link?: string | null;
2259
- user_limit?: never;
2260
- };
2261
- Relationships: [];
2262
- };
2263
- view_scheduled_logs: {
2264
- Row: {
2265
- chat_id: string | null;
2266
- failed_count: number | null;
2267
- is_repeat: boolean | null;
2268
- message_payload: Json | null;
2269
- org_id: string | null;
2270
- performed_by: string | null;
2271
- scheduled_id: string | null;
2272
- sent_count: number | null;
2273
- success_count: number | null;
2274
- updated_at: string | null;
2275
- };
2276
- Relationships: [
2277
- {
2278
- foreignKeyName: "tbl_recurring_messages_org_id_fkey";
2279
- columns: ["org_id"];
2280
- isOneToOne: false;
2281
- referencedRelation: "tbl_org";
2282
- referencedColumns: ["org_id"];
2283
- },
2284
- {
2285
- foreignKeyName: "tbl_recurring_messages_org_id_fkey";
2286
- columns: ["org_id"];
2287
- isOneToOne: false;
2288
- referencedRelation: "view_org";
2289
- referencedColumns: ["org_id"];
2290
- }
2291
- ];
2292
- };
2293
- };
2294
- Functions: {
2295
- check_feature_flag_access: {
2296
- Args: {
2297
- org_id_input: string;
2298
- feature_input: string;
2299
- };
2300
- Returns: boolean;
2301
- };
2302
- custom_access_token_hook: {
2303
- Args: {
2304
- event: Json;
2305
- };
2306
- Returns: Json;
2307
- };
2308
- delete_org: {
2309
- Args: {
2310
- org_id_input: string;
2311
- };
2312
- Returns: Json;
2313
- };
2314
- drop_partition: {
2315
- Args: {
2316
- org_id_input: string;
2317
- };
2318
- Returns: boolean;
2319
- };
2320
- find_discrepancies: {
2321
- Args: {
2322
- p_org_id: string;
2323
- };
2324
- Returns: {
2325
- a_chat_id: string;
2326
- discrepancy_count: number;
2327
- }[];
2328
- };
2329
- gen_id: {
2330
- Args: {
2331
- prefix: string;
2332
- size?: number;
2333
- alphabet?: string;
2334
- };
2335
- Returns: string;
2336
- };
2337
- gen_ticket_id: {
2338
- Args: {
2339
- org_id_input: string;
2340
- };
2341
- Returns: string;
2342
- };
2343
- generate_access_token: {
2344
- Args: {
2345
- name_input?: string;
2346
- type_input?: Database["public"]["Enums"]["enum_integration_type"];
2347
- org_id_input?: string;
2348
- metadata_input?: Json;
2349
- };
2350
- Returns: Json;
2351
- };
2352
- get_api_auth_details: {
2353
- Args: {
2354
- org_id_input?: string;
2355
- org_phone_input?: string;
2356
- token_id_input?: string;
2357
- token_type_input?: Database["public"]["Enums"]["enum_integration_type"];
2358
- };
2359
- Returns: Json;
2360
- };
2361
- get_chat_labels_data: {
2362
- Args: {
2363
- org_id_input: string;
2364
- chat_ids_input?: string[];
2365
- };
2366
- Returns: Json[];
2367
- };
2368
- get_chat_rule_info: {
2369
- Args: {
2370
- chat_id_input: string;
2371
- org_id_input: string;
2372
- org_phone_input: string;
2373
- };
2374
- Returns: Json;
2375
- };
2376
- get_chats: {
2377
- Args: {
2378
- org_id_input: string;
2379
- chat_id_input?: string[];
2380
- with_members?: boolean;
2381
- last_updated_at?: string;
2382
- batch_limit?: number;
2383
- batch_offset?: number;
2384
- };
2385
- Returns: Json;
2386
- };
2387
- get_chats_info: {
2388
- Args: {
2389
- chat_id_input: string;
2390
- org_id_input: string;
2391
- org_phone_input?: string;
2392
- };
2393
- Returns: Json;
2394
- };
2395
- get_contacts: {
2396
- Args: {
2397
- org_id_input: string;
2398
- contact_ids_input?: string[];
2399
- sync_phone_contacts?: boolean;
2400
- search_input?: string;
2401
- label_ids_input?: string[];
2402
- is_internal_input?: boolean;
2403
- offset_input?: number;
2404
- limit_input?: number;
2405
- };
2406
- Returns: Json;
2407
- };
2408
- get_export_chats_data: {
2409
- Args: {
2410
- org_id_input: string;
2411
- chat_id_input?: string[];
2412
- chat_type_input?: string;
2413
- start_date_input?: string;
2414
- end_date_input?: string;
2415
- };
2416
- Returns: Json;
2417
- };
2418
- get_export_members_data: {
2419
- Args: {
2420
- org_id_input: string;
2421
- chat_id_input?: string[];
2422
- };
2423
- Returns: Json;
2424
- };
2425
- get_export_tickets_data: {
2426
- Args: {
2427
- org_id_input: string;
2428
- ticket_id_input?: string[];
2429
- start_date_input?: string;
2430
- end_date_input?: string;
2431
- status_input?: Database["public"]["Enums"]["enum_chat_tickets_status"];
2432
- priority_input?: number;
2433
- };
2434
- Returns: Json;
2435
- };
2436
- get_feature_flags: {
2437
- Args: {
2438
- org_id_input: string;
2439
- };
2440
- Returns: Json;
2441
- };
2442
- get_formatted_cp_values: {
2443
- Args: {
2444
- org_id_input?: string;
2445
- custom_properties_value_input?: Json;
2446
- cp_type?: string;
2447
- };
2448
- Returns: Json;
2449
- };
2450
- get_integration_data: {
2451
- Args: {
2452
- org_id_input?: string;
2453
- };
2454
- Returns: Json;
2455
- };
2456
- get_message_rule_info: {
2457
- Args: {
2458
- message_id_input: string;
2459
- chat_id_input: string;
2460
- org_id_input: string;
2461
- org_phone_input: string;
2462
- sender_id_input: string;
2463
- };
2464
- Returns: Json;
2465
- };
2466
- get_messages_notifications_reactions: {
2467
- Args: {
2468
- org_id_input: string;
2469
- chat_id_input?: string[];
2470
- limit_input?: number;
2471
- offset_input?: number;
2472
- };
2473
- Returns: Json;
2474
- };
2475
- get_old_credits: {
2476
- Args: {
2477
- org_id_input?: string;
2478
- };
2479
- Returns: Json;
2480
- };
2481
- get_org: {
2482
- Args: {
2483
- org_id_input?: string;
2484
- };
2485
- Returns: Json;
2486
- };
2487
- get_org_credits: {
2488
- Args: {
2489
- org_id_input?: string;
2490
- };
2491
- Returns: Json;
2492
- };
2493
- get_org_phones: {
2494
- Args: {
2495
- org_id_input?: string;
2496
- phone_id_input?: string;
2497
- };
2498
- Returns: Json;
2499
- };
2500
- get_reaction_rule_info: {
2501
- Args: {
2502
- reaction_id_input: string;
2503
- message_id_input: string;
2504
- chat_id_input: string;
2505
- org_id_input: string;
2506
- org_phone_input: string;
2507
- sender_id_input: string;
2508
- };
2509
- Returns: Json;
2510
- };
2511
- get_team_metrics_between_dates: {
2512
- Args: {
2513
- org_id_input: string;
2514
- start_date: string;
2515
- end_date: string;
2516
- chat_id_input?: string[];
2517
- };
2518
- Returns: Json;
2519
- };
2520
- get_ticket_info: {
2521
- Args: {
2522
- ticket_id_input?: string;
2523
- org_id_input?: string;
2524
- chat_id_input?: string;
2525
- unique_message_id_input?: string;
2526
- };
2527
- Returns: Json;
2528
- };
2529
- get_ticket_rule_info: {
2530
- Args: {
2531
- ticket_id_input: string;
2532
- unique_message_id_input: string;
2533
- chat_id_input: string;
2534
- org_id_input: string;
2535
- };
2536
- Returns: Json;
2537
- };
2538
- get_universal_search_result: {
2539
- Args: {
2540
- search_category_input: string;
2541
- search_query_input: string;
2542
- org_id_input: string;
2543
- };
2544
- Returns: {
2545
- category: string;
2546
- result: Json;
2547
- }[];
2548
- };
2549
- list_org_from_user: {
2550
- Args: Record<PropertyKey, never>;
2551
- Returns: string[];
2552
- };
2553
- list_role_from_user: {
2554
- Args: Record<PropertyKey, never>;
2555
- Returns: Database["public"]["Enums"]["enum_member_role"];
2556
- };
2557
- notify_org_tasks: {
2558
- Args: Record<PropertyKey, never>;
2559
- Returns: string;
2560
- };
2561
- update_chat_properties: {
2562
- Args: {
2563
- column_name: string;
2564
- org_id_input: string;
2565
- chat_id_input: string[];
2566
- column_value_input?: string;
2567
- key_input?: string;
2568
- value_input?: Json;
2569
- };
2570
- Returns: undefined;
2571
- };
2572
- update_chat_unread_count: {
2573
- Args: {
2574
- org_id_input: string;
2575
- chat_id_input: string[];
2576
- sync_unread_count?: boolean;
2577
- email_input?: string;
2578
- org_phone_input?: string;
2579
- };
2580
- Returns: {
2581
- archived: boolean | null;
2582
- chat_id: string;
2583
- chat_image: string | null;
2584
- chat_name: string | null;
2585
- chat_type: string | null;
2586
- created_at: string;
2587
- created_by: string | null;
2588
- group_metadata: Json | null;
2589
- id: Json | null;
2590
- initiated_by: string | null;
2591
- invite_link: string | null;
2592
- is_exited: boolean | null;
2593
- is_group: boolean | null;
2594
- is_muted: boolean | null;
2595
- is_read_only: boolean | null;
2596
- latest_message: Json | null;
2597
- member_count: number | null;
2598
- member_unread_count: Json | null;
2599
- mute_expiration: number | null;
2600
- name: string | null;
2601
- org_id: string;
2602
- org_phone: string;
2603
- pinned: boolean | null;
2604
- pinned_messages: Json | null;
2605
- timestamp: string | null;
2606
- unread_count: number | null;
2607
- updated_at: string;
2608
- }[];
2609
- };
2610
- update_custom_properties: {
2611
- Args: {
2612
- org_id_input: string;
2613
- row_properties_map: Json;
2614
- replace_properties?: boolean;
2615
- };
2616
- Returns: undefined;
2617
- };
2618
- update_flag: {
2619
- Args: {
2620
- org_id_input: string;
2621
- flag_metadata_input: Json;
2622
- flag_status_input?: boolean;
2623
- chat_id_input?: string;
2624
- unique_message_id_input?: string;
2625
- org_phone_input?: string;
2626
- replace?: boolean;
2627
- };
2628
- Returns: {
2629
- ack: string | null;
2630
- author: string | null;
2631
- body: string | null;
2632
- broadcast: boolean | null;
2633
- broadcast_id: string | null;
2634
- chat_id: string | null;
2635
- delivery_info: Json | null;
2636
- device_type: string | null;
2637
- duration: string | null;
2638
- flag_metadata: Json | null;
2639
- flag_response_time: number | null;
2640
- flag_status: boolean | null;
2641
- forwarding_score: number | null;
2642
- from: string | null;
2643
- from_me: boolean | null;
2644
- fts: unknown | null;
2645
- has_media: boolean | null;
2646
- has_quoted_msg: boolean | null;
2647
- has_reaction: boolean | null;
2648
- id: Json | null;
2649
- invite_v4: Json | null;
2650
- is_deleted: boolean | null;
2651
- is_ephemeral: boolean | null;
2652
- is_forwarded: boolean | null;
2653
- is_gif: boolean | null;
2654
- is_starred: boolean | null;
2655
- is_status: boolean | null;
2656
- links: Json | null;
2657
- location: Json | null;
2658
- media: Json | null;
2659
- media_key: string | null;
2660
- mentioned_ids: string[] | null;
2661
- message_id: string;
2662
- message_ticket_id: string | null;
2663
- message_type: string | null;
2664
- order_id: string | null;
2665
- org_id: string;
2666
- org_phone: string;
2667
- performed_by: string | null;
2668
- poll_info: Json | null;
2669
- poll_results: Json | null;
2670
- prev_body: string | null;
2671
- quoted_message_id: string | null;
2672
- raw_data: Json | null;
2673
- sender_phone: string | null;
2674
- sent_message_id: string | null;
2675
- timestamp: string;
2676
- to: string | null;
2677
- token: string | null;
2678
- unique_id: string | null;
2679
- updated_at: string | null;
2680
- vcards: string[] | null;
2681
- }[];
2682
- };
2683
- update_labels: {
2684
- Args: {
2685
- org_id_input: string;
2686
- tbl_type: string;
2687
- row_label_map: Json;
2688
- replace_labels?: boolean;
2689
- };
2690
- Returns: undefined;
2691
- };
2692
- update_org_metadata: {
2693
- Args: {
2694
- org_id_input: string;
2695
- key_input?: string;
2696
- value_input?: Json;
2697
- };
2698
- Returns: undefined;
2699
- };
2700
- update_rule_log_entry: {
2701
- Args: {
2702
- log_id_input: string;
2703
- action_id?: string;
2704
- action_update?: Json;
2705
- conditions_update?: Json;
2706
- metadata_update?: Json;
2707
- };
2708
- Returns: Json;
2709
- };
2710
- };
2711
- Enums: {
2712
- enum_broadcast_status: "inprogress" | "completed" | "stopped" | "expired";
2713
- enum_chat_colors: "#B4876E" | "#A5B337" | "#06CF9C" | "#25D366" | "#02A698" | "#7D9EF1" | "#007BFC" | "#5E47DE" | "#7F66FF" | "#9333EA" | "#FA6533" | "#C4532D" | "#DC2626" | "#FF2E74" | "#DB2777";
2714
- enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived";
2715
- enum_credit_transaction_type: "credit" | "debit";
2716
- enum_integration_name: "org.created" | "org.updated" | "org.member.created" | "org.member.updated" | "org.phone.created" | "org.phone.connected" | "org.phone.disconnected" | "org.subscription.trial_will_end" | "chat.created" | "chat.updated" | "chat.notification.created" | "message.created" | "message.updated" | "message.deleted" | "message.ack.updated" | "reaction.created" | "reaction.updated" | "ticket.created" | "ticket.updated" | "ticket.deleted" | "org.integrations.updated" | "message.flagged" | "message.unflagged" | "chat.label.updated" | "reaction.added" | "message.ticket.attached";
2717
- enum_integration_type: "zapier" | "pabbly" | "api" | "webhook" | "hubspot" | "freshdesk" | "slack" | "jira" | "salesforce" | "zohodesk" | "gsheets";
2718
- enum_member_role: "admin" | "member";
2719
- };
2720
- CompositeTypes: {
2721
- [_ in never]: never;
2722
- };
2723
- };
2724
- storage: {
2725
- Tables: {
2726
- buckets: {
2727
- Row: {
2728
- allowed_mime_types: string[] | null;
2729
- avif_autodetection: boolean | null;
2730
- created_at: string | null;
2731
- file_size_limit: number | null;
2732
- id: string;
2733
- name: string;
2734
- owner: string | null;
2735
- owner_id: string | null;
2736
- public: boolean | null;
2737
- updated_at: string | null;
2738
- };
2739
- Insert: {
2740
- allowed_mime_types?: string[] | null;
2741
- avif_autodetection?: boolean | null;
2742
- created_at?: string | null;
2743
- file_size_limit?: number | null;
2744
- id: string;
2745
- name: string;
2746
- owner?: string | null;
2747
- owner_id?: string | null;
2748
- public?: boolean | null;
2749
- updated_at?: string | null;
2750
- };
2751
- Update: {
2752
- allowed_mime_types?: string[] | null;
2753
- avif_autodetection?: boolean | null;
2754
- created_at?: string | null;
2755
- file_size_limit?: number | null;
2756
- id?: string;
2757
- name?: string;
2758
- owner?: string | null;
2759
- owner_id?: string | null;
2760
- public?: boolean | null;
2761
- updated_at?: string | null;
2762
- };
2763
- Relationships: [];
2764
- };
2765
- migrations: {
2766
- Row: {
2767
- executed_at: string | null;
2768
- hash: string;
2769
- id: number;
2770
- name: string;
2771
- };
2772
- Insert: {
2773
- executed_at?: string | null;
2774
- hash: string;
2775
- id: number;
2776
- name: string;
2777
- };
2778
- Update: {
2779
- executed_at?: string | null;
2780
- hash?: string;
2781
- id?: number;
2782
- name?: string;
2783
- };
2784
- Relationships: [];
2785
- };
2786
- objects: {
2787
- Row: {
2788
- bucket_id: string | null;
2789
- created_at: string | null;
2790
- id: string;
2791
- last_accessed_at: string | null;
2792
- metadata: Json | null;
2793
- name: string | null;
2794
- owner: string | null;
2795
- owner_id: string | null;
2796
- path_tokens: string[] | null;
2797
- updated_at: string | null;
2798
- user_metadata: Json | null;
2799
- version: string | null;
2800
- };
2801
- Insert: {
2802
- bucket_id?: string | null;
2803
- created_at?: string | null;
2804
- id?: string;
2805
- last_accessed_at?: string | null;
2806
- metadata?: Json | null;
2807
- name?: string | null;
2808
- owner?: string | null;
2809
- owner_id?: string | null;
2810
- path_tokens?: string[] | null;
2811
- updated_at?: string | null;
2812
- user_metadata?: Json | null;
2813
- version?: string | null;
2814
- };
2815
- Update: {
2816
- bucket_id?: string | null;
2817
- created_at?: string | null;
2818
- id?: string;
2819
- last_accessed_at?: string | null;
2820
- metadata?: Json | null;
2821
- name?: string | null;
2822
- owner?: string | null;
2823
- owner_id?: string | null;
2824
- path_tokens?: string[] | null;
2825
- updated_at?: string | null;
2826
- user_metadata?: Json | null;
2827
- version?: string | null;
2828
- };
2829
- Relationships: [
2830
- {
2831
- foreignKeyName: "objects_bucketId_fkey";
2832
- columns: ["bucket_id"];
2833
- isOneToOne: false;
2834
- referencedRelation: "buckets";
2835
- referencedColumns: ["id"];
2836
- }
2837
- ];
2838
- };
2839
- s3_multipart_uploads: {
2840
- Row: {
2841
- bucket_id: string;
2842
- created_at: string;
2843
- id: string;
2844
- in_progress_size: number;
2845
- key: string;
2846
- owner_id: string | null;
2847
- upload_signature: string;
2848
- user_metadata: Json | null;
2849
- version: string;
2850
- };
2851
- Insert: {
2852
- bucket_id: string;
2853
- created_at?: string;
2854
- id: string;
2855
- in_progress_size?: number;
2856
- key: string;
2857
- owner_id?: string | null;
2858
- upload_signature: string;
2859
- user_metadata?: Json | null;
2860
- version: string;
2861
- };
2862
- Update: {
2863
- bucket_id?: string;
2864
- created_at?: string;
2865
- id?: string;
2866
- in_progress_size?: number;
2867
- key?: string;
2868
- owner_id?: string | null;
2869
- upload_signature?: string;
2870
- user_metadata?: Json | null;
2871
- version?: string;
2872
- };
2873
- Relationships: [
2874
- {
2875
- foreignKeyName: "s3_multipart_uploads_bucket_id_fkey";
2876
- columns: ["bucket_id"];
2877
- isOneToOne: false;
2878
- referencedRelation: "buckets";
2879
- referencedColumns: ["id"];
2880
- }
2881
- ];
2882
- };
2883
- s3_multipart_uploads_parts: {
2884
- Row: {
2885
- bucket_id: string;
2886
- created_at: string;
2887
- etag: string;
2888
- id: string;
2889
- key: string;
2890
- owner_id: string | null;
2891
- part_number: number;
2892
- size: number;
2893
- upload_id: string;
2894
- version: string;
2895
- };
2896
- Insert: {
2897
- bucket_id: string;
2898
- created_at?: string;
2899
- etag: string;
2900
- id?: string;
2901
- key: string;
2902
- owner_id?: string | null;
2903
- part_number: number;
2904
- size?: number;
2905
- upload_id: string;
2906
- version: string;
2907
- };
2908
- Update: {
2909
- bucket_id?: string;
2910
- created_at?: string;
2911
- etag?: string;
2912
- id?: string;
2913
- key?: string;
2914
- owner_id?: string | null;
2915
- part_number?: number;
2916
- size?: number;
2917
- upload_id?: string;
2918
- version?: string;
2919
- };
2920
- Relationships: [
2921
- {
2922
- foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey";
2923
- columns: ["bucket_id"];
2924
- isOneToOne: false;
2925
- referencedRelation: "buckets";
2926
- referencedColumns: ["id"];
2927
- },
2928
- {
2929
- foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey";
2930
- columns: ["upload_id"];
2931
- isOneToOne: false;
2932
- referencedRelation: "s3_multipart_uploads";
2933
- referencedColumns: ["id"];
2934
- }
2935
- ];
2936
- };
2937
- };
2938
- Views: {
2939
- [_ in never]: never;
2940
- };
2941
- Functions: {
2942
- can_insert_object: {
2943
- Args: {
2944
- bucketid: string;
2945
- name: string;
2946
- owner: string;
2947
- metadata: Json;
2948
- };
2949
- Returns: undefined;
2950
- };
2951
- extension: {
2952
- Args: {
2953
- name: string;
2954
- };
2955
- Returns: string;
2956
- };
2957
- filename: {
2958
- Args: {
2959
- name: string;
2960
- };
2961
- Returns: string;
2962
- };
2963
- foldername: {
2964
- Args: {
2965
- name: string;
2966
- };
2967
- Returns: string[];
2968
- };
2969
- get_size_by_bucket: {
2970
- Args: Record<PropertyKey, never>;
2971
- Returns: {
2972
- size: number;
2973
- bucket_id: string;
2974
- }[];
2975
- };
2976
- list_multipart_uploads_with_delimiter: {
2977
- Args: {
2978
- bucket_id: string;
2979
- prefix_param: string;
2980
- delimiter_param: string;
2981
- max_keys?: number;
2982
- next_key_token?: string;
2983
- next_upload_token?: string;
2984
- };
2985
- Returns: {
2986
- key: string;
2987
- id: string;
2988
- created_at: string;
2989
- }[];
2990
- };
2991
- list_objects_with_delimiter: {
2992
- Args: {
2993
- bucket_id: string;
2994
- prefix_param: string;
2995
- delimiter_param: string;
2996
- max_keys?: number;
2997
- start_after?: string;
2998
- next_token?: string;
2999
- };
3000
- Returns: {
3001
- name: string;
3002
- id: string;
3003
- metadata: Json;
3004
- updated_at: string;
3005
- }[];
3006
- };
3007
- operation: {
3008
- Args: Record<PropertyKey, never>;
3009
- Returns: string;
3010
- };
3011
- search: {
3012
- Args: {
3013
- prefix: string;
3014
- bucketname: string;
3015
- limits?: number;
3016
- levels?: number;
3017
- offsets?: number;
3018
- search?: string;
3019
- sortcolumn?: string;
3020
- sortorder?: string;
3021
- };
3022
- Returns: {
3023
- name: string;
3024
- id: string;
3025
- updated_at: string;
3026
- created_at: string;
3027
- last_accessed_at: string;
3028
- metadata: Json;
3029
- }[];
3030
- };
3031
- };
3032
- Enums: {
3033
- [_ in never]: never;
3034
- };
3035
- CompositeTypes: {
3036
- [_ in never]: never;
3037
- };
3038
- };
3039
- };
3040
- type DefaultSchema = Database[Extract<keyof Database, "public">];
3041
- export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
3042
- schema: keyof Database;
3043
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
3044
- schema: keyof Database;
3045
- } ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
3046
- schema: keyof Database;
3047
- } ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3048
- Row: infer R;
3049
- } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
3050
- Row: infer R;
3051
- } ? R : never : never;
3052
- export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
3053
- schema: keyof Database;
3054
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
3055
- schema: keyof Database;
3056
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
3057
- schema: keyof Database;
3058
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3059
- Insert: infer I;
3060
- } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3061
- Insert: infer I;
3062
- } ? I : never : never;
3063
- export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
3064
- schema: keyof Database;
3065
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
3066
- schema: keyof Database;
3067
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
3068
- schema: keyof Database;
3069
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3070
- Update: infer U;
3071
- } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3072
- Update: infer U;
3073
- } ? U : never : never;
3074
- export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
3075
- schema: keyof Database;
3076
- }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
3077
- schema: keyof Database;
3078
- } ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
3079
- schema: keyof Database;
3080
- } ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
3081
- export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
3082
- schema: keyof Database;
3083
- }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
3084
- schema: keyof Database;
3085
- } ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
3086
- schema: keyof Database;
3087
- } ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
3088
- export declare const Constants: {
3089
- readonly internal: {
3090
- readonly Enums: {};
3091
- };
3092
- readonly public: {
3093
- readonly Enums: {
3094
- readonly enum_broadcast_status: readonly ["inprogress", "completed", "stopped", "expired"];
3095
- readonly enum_chat_colors: readonly ["#B4876E", "#A5B337", "#06CF9C", "#25D366", "#02A698", "#7D9EF1", "#007BFC", "#5E47DE", "#7F66FF", "#9333EA", "#FA6533", "#C4532D", "#DC2626", "#FF2E74", "#DB2777"];
3096
- readonly enum_chat_tickets_status: readonly ["open", "inprogress", "closed", "archived"];
3097
- readonly enum_credit_transaction_type: readonly ["credit", "debit"];
3098
- readonly enum_integration_name: readonly ["org.created", "org.updated", "org.member.created", "org.member.updated", "org.phone.created", "org.phone.connected", "org.phone.disconnected", "org.subscription.trial_will_end", "chat.created", "chat.updated", "chat.notification.created", "message.created", "message.updated", "message.deleted", "message.ack.updated", "reaction.created", "reaction.updated", "ticket.created", "ticket.updated", "ticket.deleted", "org.integrations.updated", "message.flagged", "message.unflagged", "chat.label.updated", "reaction.added", "message.ticket.attached"];
3099
- readonly enum_integration_type: readonly ["zapier", "pabbly", "api", "webhook", "hubspot", "freshdesk", "slack", "jira", "salesforce", "zohodesk", "gsheets"];
3100
- readonly enum_member_role: readonly ["admin", "member"];
3101
- };
3102
- };
3103
- readonly storage: {
3104
- readonly Enums: {};
3105
- };
3106
- };
3107
- export {};
3108
- //# sourceMappingURL=supabase.types.d.ts.map