@periskope/types 0.6.4 → 0.6.5

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,1012 +1,1004 @@
1
- export type Json = { [key: string]: any } | any
2
-
3
- export interface 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_chat_access: {
32
- Row: {
33
- chat_id: string
34
- email: string
35
- has_access: boolean | null
36
- last_read_timestamp: string | null
37
- org_id: string
38
- }
39
- Insert: {
40
- chat_id: string
41
- email: string
42
- has_access?: boolean | null
43
- last_read_timestamp?: string | null
44
- org_id?: string
45
- }
46
- Update: {
47
- chat_id?: string
48
- email?: string
49
- has_access?: boolean | null
50
- last_read_timestamp?: string | null
51
- org_id?: string
52
- }
53
- Relationships: []
54
- }
55
- tbl_chat_messages: {
56
- Row: {
57
- ack: string | null
58
- author: string | null
59
- body: string | null
60
- broadcast: boolean | null
61
- chat_id: string | null
62
- device_type: string | null
63
- duration: string | null
64
- forwarding_score: number | null
65
- from: string | null
66
- from_me: boolean | null
67
- has_media: boolean | null
68
- has_quoted_msg: boolean | null
69
- has_reaction: boolean | null
70
- id: Json | null
71
- invite_v4: Json | null
72
- is_ephemeral: boolean | null
73
- is_forwarded: boolean | null
74
- is_gif: boolean | null
75
- is_starred: boolean | null
76
- is_status: boolean | null
77
- links: Json | null
78
- location: Json | null
79
- media_key: string | null
80
- mentioned_ids: string[] | null
81
- message_id: string
82
- order_id: string | null
83
- org_id: string
84
- org_phone: string
85
- performed_by: string | null
86
- raw_data: Json | null
87
- timestamp: string | null
88
- to: string | null
89
- token: string | null
90
- type: string | null
91
- url: string | null
92
- vcards: string[] | null
93
- }
94
- Insert: {
95
- ack?: string | null
96
- author?: string | null
97
- body?: string | null
98
- broadcast?: boolean | null
99
- chat_id?: string | null
100
- device_type?: string | null
101
- duration?: string | null
102
- forwarding_score?: number | null
103
- from?: string | null
104
- from_me?: boolean | null
105
- has_media?: boolean | null
106
- has_quoted_msg?: boolean | null
107
- has_reaction?: boolean | null
108
- id?: Json | null
109
- invite_v4?: Json | null
110
- is_ephemeral?: boolean | null
111
- is_forwarded?: boolean | null
112
- is_gif?: boolean | null
113
- is_starred?: boolean | null
114
- is_status?: boolean | null
115
- links?: Json | null
116
- location?: Json | null
117
- media_key?: string | null
118
- mentioned_ids?: string[] | null
119
- message_id: string
120
- order_id?: string | null
121
- org_id: string
122
- org_phone: string
123
- performed_by?: string | null
124
- raw_data?: Json | null
125
- timestamp?: string | null
126
- to?: string | null
127
- token?: string | null
128
- type?: string | null
129
- url?: string | null
130
- vcards?: string[] | null
131
- }
132
- Update: {
133
- ack?: string | null
134
- author?: string | null
135
- body?: string | null
136
- broadcast?: boolean | null
137
- chat_id?: string | null
138
- device_type?: string | null
139
- duration?: string | null
140
- forwarding_score?: number | null
141
- from?: string | null
142
- from_me?: boolean | null
143
- has_media?: boolean | null
144
- has_quoted_msg?: boolean | null
145
- has_reaction?: boolean | null
146
- id?: Json | null
147
- invite_v4?: Json | null
148
- is_ephemeral?: boolean | null
149
- is_forwarded?: boolean | null
150
- is_gif?: boolean | null
151
- is_starred?: boolean | null
152
- is_status?: boolean | null
153
- links?: Json | null
154
- location?: Json | null
155
- media_key?: string | null
156
- mentioned_ids?: string[] | null
157
- message_id?: string
158
- order_id?: string | null
159
- org_id?: string
160
- org_phone?: string
161
- performed_by?: string | null
162
- raw_data?: Json | null
163
- timestamp?: string | null
164
- to?: string | null
165
- token?: string | null
166
- type?: string | null
167
- url?: string | null
168
- vcards?: string[] | null
169
- }
170
- Relationships: [
171
- {
172
- foreignKeyName: "tbl_chat_messages_fkey_tbl_org_phones"
173
- columns: ["org_id", "org_phone"]
174
- isOneToOne: false
175
- referencedRelation: "tbl_org_phones"
176
- referencedColumns: ["org_id", "org_phone"]
177
- }
178
- ]
179
- }
180
- tbl_chat_notifications: {
181
- Row: {
182
- author: string | null
183
- body: string | null
184
- chat_id: string | null
185
- group_notification_id: string
186
- id: Json | null
187
- org_id: string
188
- org_phone: string
189
- recipientids: string[] | null
190
- timestamp: string | null
191
- type: string | null
192
- }
193
- Insert: {
194
- author?: string | null
195
- body?: string | null
196
- chat_id?: string | null
197
- group_notification_id: string
198
- id?: Json | null
199
- org_id: string
200
- org_phone: string
201
- recipientids?: string[] | null
202
- timestamp?: string | null
203
- type?: string | null
204
- }
205
- Update: {
206
- author?: string | null
207
- body?: string | null
208
- chat_id?: string | null
209
- group_notification_id?: string
210
- id?: Json | null
211
- org_id?: string
212
- org_phone?: string
213
- recipientids?: string[] | null
214
- timestamp?: string | null
215
- type?: string | null
216
- }
217
- Relationships: [
218
- {
219
- foreignKeyName: "tbl_chat_notifications_fkey_tbl_org_phones"
220
- columns: ["org_id", "org_phone"]
221
- isOneToOne: false
222
- referencedRelation: "tbl_org_phones"
223
- referencedColumns: ["org_id", "org_phone"]
224
- }
225
- ]
226
- }
227
- tbl_chat_participants: {
228
- Row: {
229
- chat_id: string
230
- contact_id: string
231
- id: Json | null
232
- is_admin: boolean | null
233
- is_super_admin: boolean | null
234
- org_id: string
235
- }
236
- Insert: {
237
- chat_id: string
238
- contact_id: string
239
- id?: Json | null
240
- is_admin?: boolean | null
241
- is_super_admin?: boolean | null
242
- org_id: string
243
- }
244
- Update: {
245
- chat_id?: string
246
- contact_id?: string
247
- id?: Json | null
248
- is_admin?: boolean | null
249
- is_super_admin?: boolean | null
250
- org_id?: string
251
- }
252
- Relationships: []
253
- }
254
- tbl_chat_reactions: {
255
- Row: {
256
- ack: number | null
257
- id: Json | null
258
- message_id: string | null
259
- msg_id: Json | null
260
- org_id: string
261
- org_phone: string
262
- orphan: number | null
263
- orphan_reason: string | null
264
- reaction: string | null
265
- reaction_id: string
266
- read: boolean | null
267
- sender_id: string | null
268
- timestamp: string | null
269
- }
270
- Insert: {
271
- ack?: number | null
272
- id?: Json | null
273
- message_id?: string | null
274
- msg_id?: Json | null
275
- org_id: string
276
- org_phone: string
277
- orphan?: number | null
278
- orphan_reason?: string | null
279
- reaction?: string | null
280
- reaction_id: string
281
- read?: boolean | null
282
- sender_id?: string | null
283
- timestamp?: string | null
284
- }
285
- Update: {
286
- ack?: number | null
287
- id?: Json | null
288
- message_id?: string | null
289
- msg_id?: Json | null
290
- org_id?: string
291
- org_phone?: string
292
- orphan?: number | null
293
- orphan_reason?: string | null
294
- reaction?: string | null
295
- reaction_id?: string
296
- read?: boolean | null
297
- sender_id?: string | null
298
- timestamp?: string | null
299
- }
300
- Relationships: [
301
- {
302
- foreignKeyName: "tbl_chat_reactions_fkey_tbl_org_phones"
303
- columns: ["org_id", "org_phone"]
304
- isOneToOne: false
305
- referencedRelation: "tbl_org_phones"
306
- referencedColumns: ["org_id", "org_phone"]
307
- }
308
- ]
309
- }
310
- tbl_chats: {
311
- Row: {
312
- archived: boolean | null
313
- chat_id: string
314
- chat_image: string | null
315
- group_metadata: Json | null
316
- id: Json | null
317
- invite_link: string | null
318
- is_group: boolean | null
319
- is_muted: boolean | null
320
- is_read_only: boolean | null
321
- label_ids: string[] | null
322
- mute_expiration: number | null
323
- name: string | null
324
- org_id: string
325
- org_phone: string
326
- pinned: boolean | null
327
- timestamp: string | null
328
- unread_count: number | null
329
- }
330
- Insert: {
331
- archived?: boolean | null
332
- chat_id: string
333
- chat_image?: string | null
334
- group_metadata?: Json | null
335
- id?: Json | null
336
- invite_link?: string | null
337
- is_group?: boolean | null
338
- is_muted?: boolean | null
339
- is_read_only?: boolean | null
340
- label_ids?: string[] | null
341
- mute_expiration?: number | null
342
- name?: string | null
343
- org_id: string
344
- org_phone: string
345
- pinned?: boolean | null
346
- timestamp?: string | null
347
- unread_count?: number | null
348
- }
349
- Update: {
350
- archived?: boolean | null
351
- chat_id?: string
352
- chat_image?: string | null
353
- group_metadata?: Json | null
354
- id?: Json | null
355
- invite_link?: string | null
356
- is_group?: boolean | null
357
- is_muted?: boolean | null
358
- is_read_only?: boolean | null
359
- label_ids?: string[] | null
360
- mute_expiration?: number | null
361
- name?: string | null
362
- org_id?: string
363
- org_phone?: string
364
- pinned?: boolean | null
365
- timestamp?: string | null
366
- unread_count?: number | null
367
- }
368
- Relationships: []
369
- }
370
- tbl_contacts: {
371
- Row: {
372
- contact_color: Database["public"]["Enums"]["enum_chat_colors"] | null
373
- contact_id: string
374
- contact_image: string | null
375
- id: Json | null
376
- is_blocked: boolean | null
377
- is_business: boolean | null
378
- is_enterprise: boolean | null
379
- is_group: boolean | null
380
- is_me: boolean | null
381
- is_my_contact: boolean | null
382
- is_user: boolean | null
383
- is_wa_contact: boolean | null
384
- label_ids: string[] | null
385
- name: string | null
386
- number: string | null
387
- org_id: string
388
- pushname: string | null
389
- short_name: string | null
390
- type: string | null
391
- }
392
- Insert: {
393
- contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
394
- contact_id: string
395
- contact_image?: string | null
396
- id?: Json | null
397
- is_blocked?: boolean | null
398
- is_business?: boolean | null
399
- is_enterprise?: boolean | null
400
- is_group?: boolean | null
401
- is_me?: boolean | null
402
- is_my_contact?: boolean | null
403
- is_user?: boolean | null
404
- is_wa_contact?: boolean | null
405
- label_ids?: string[] | null
406
- name?: string | null
407
- number?: string | null
408
- org_id: string
409
- pushname?: string | null
410
- short_name?: string | null
411
- type?: string | null
412
- }
413
- Update: {
414
- contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
415
- contact_id?: string
416
- contact_image?: string | null
417
- id?: Json | null
418
- is_blocked?: boolean | null
419
- is_business?: boolean | null
420
- is_enterprise?: boolean | null
421
- is_group?: boolean | null
422
- is_me?: boolean | null
423
- is_my_contact?: boolean | null
424
- is_user?: boolean | null
425
- is_wa_contact?: boolean | null
426
- label_ids?: string[] | null
427
- name?: string | null
428
- number?: string | null
429
- org_id?: string
430
- pushname?: string | null
431
- short_name?: string | null
432
- type?: string | null
433
- }
434
- Relationships: [
435
- {
436
- foreignKeyName: "tbl_contacts_org_id_fkey"
437
- columns: ["org_id"]
438
- isOneToOne: false
439
- referencedRelation: "tbl_org"
440
- referencedColumns: ["org_id"]
441
- }
442
- ]
443
- }
444
- tbl_org: {
445
- Row: {
446
- created_at: string
447
- org_id: string
448
- org_image: string | null
449
- org_name: string | null
450
- support_link: string | null
451
- }
452
- Insert: {
453
- created_at?: string
454
- org_id?: string
455
- org_image?: string | null
456
- org_name?: string | null
457
- support_link?: string | null
458
- }
459
- Update: {
460
- created_at?: string
461
- org_id?: string
462
- org_image?: string | null
463
- org_name?: string | null
464
- support_link?: string | null
465
- }
466
- Relationships: []
467
- }
468
- tbl_org_labels: {
469
- Row: {
470
- color: string
471
- created_at: string
472
- label_id: string
473
- name: string
474
- org_id: string
475
- type: string
476
- }
477
- Insert: {
478
- color?: string
479
- created_at?: string
480
- label_id?: string
481
- name: string
482
- org_id?: string
483
- type?: string
484
- }
485
- Update: {
486
- color?: string
487
- created_at?: string
488
- label_id?: string
489
- name?: string
490
- org_id?: string
491
- type?: string
492
- }
493
- Relationships: [
494
- {
495
- foreignKeyName: "tbl_org_labels_org_id_fkey"
496
- columns: ["org_id"]
497
- isOneToOne: false
498
- referencedRelation: "tbl_org"
499
- referencedColumns: ["org_id"]
500
- }
501
- ]
502
- }
503
- tbl_org_members: {
504
- Row: {
505
- created_at: string | null
506
- email: string
507
- invited_at: string | null
508
- invited_by: string | null
509
- is_active: boolean
510
- member_image: string | null
511
- member_name: string | null
512
- org_id: string
513
- role: Database["public"]["Enums"]["enum_member_role"]
514
- user_id: string | null
515
- }
516
- Insert: {
517
- created_at?: string | null
518
- email: string
519
- invited_at?: string | null
520
- invited_by?: string | null
521
- is_active?: boolean
522
- member_image?: string | null
523
- member_name?: string | null
524
- org_id: string
525
- role?: Database["public"]["Enums"]["enum_member_role"]
526
- user_id?: string | null
527
- }
528
- Update: {
529
- created_at?: string | null
530
- email?: string
531
- invited_at?: string | null
532
- invited_by?: string | null
533
- is_active?: boolean
534
- member_image?: string | null
535
- member_name?: string | null
536
- org_id?: string
537
- role?: Database["public"]["Enums"]["enum_member_role"]
538
- user_id?: string | null
539
- }
540
- Relationships: [
541
- {
542
- foreignKeyName: "tbl_org_members_fkey_auth_users"
543
- columns: ["user_id"]
544
- isOneToOne: false
545
- referencedRelation: "users"
546
- referencedColumns: ["id"]
547
- },
548
- {
549
- foreignKeyName: "tbl_org_members_fkey_tbl_org"
550
- columns: ["org_id"]
551
- isOneToOne: false
552
- referencedRelation: "tbl_org"
553
- referencedColumns: ["org_id"]
554
- }
555
- ]
556
- }
557
- tbl_org_phones: {
558
- Row: {
559
- created_at: string
560
- is_ready: boolean
561
- org_id: string
562
- org_phone: string | null
563
- phone_id: string
564
- qr_code: string | null
565
- updated_at: string
566
- wa_state: string | null
567
- }
568
- Insert: {
569
- created_at?: string
570
- is_ready?: boolean
571
- org_id: string
572
- org_phone?: string | null
573
- phone_id?: string
574
- qr_code?: string | null
575
- updated_at?: string
576
- wa_state?: string | null
577
- }
578
- Update: {
579
- created_at?: string
580
- is_ready?: boolean
581
- org_id?: string
582
- org_phone?: string | null
583
- phone_id?: string
584
- qr_code?: string | null
585
- updated_at?: string
586
- wa_state?: string | null
587
- }
588
- Relationships: [
589
- {
590
- foreignKeyName: "tbl_org_phones_fkey_tbl_org"
591
- columns: ["org_id"]
592
- isOneToOne: false
593
- referencedRelation: "tbl_org"
594
- referencedColumns: ["org_id"]
595
- }
596
- ]
597
- }
598
- }
599
- Views: {
600
- view_chat_messages: {
601
- Row: {
602
- ack: string | null
603
- author: string | null
604
- body: string | null
605
- broadcast: boolean | null
606
- chat_id: string | null
607
- contact_color: Database["public"]["Enums"]["enum_chat_colors"] | null
608
- device_type: string | null
609
- duration: string | null
610
- forwarding_score: number | null
611
- from: string | null
612
- from_me: boolean | null
613
- has_media: boolean | null
614
- has_quoted_msg: boolean | null
615
- has_reaction: boolean | null
616
- id: Json | null
617
- invite_v4: Json | null
618
- is_ephemeral: boolean | null
619
- is_forwarded: boolean | null
620
- is_gif: boolean | null
621
- is_starred: boolean | null
622
- is_status: boolean | null
623
- links: Json | null
624
- location: Json | null
625
- media_key: string | null
626
- mentioned_ids: string[] | null
627
- message_id: string | null
628
- name: string | null
629
- order_id: string | null
630
- org_id: string | null
631
- org_phone: string | null
632
- performed_by: string | null
633
- pushname: string | null
634
- raw_data: Json | null
635
- sender_phone: string | null
636
- timestamp: string | null
637
- to: string | null
638
- token: string | null
639
- type: string | null
640
- url: string | null
641
- vcards: string[] | null
642
- }
643
- Relationships: [
644
- {
645
- foreignKeyName: "tbl_chat_messages_fkey_tbl_org_phones"
646
- columns: ["org_id", "org_phone"]
647
- isOneToOne: false
648
- referencedRelation: "tbl_org_phones"
649
- referencedColumns: ["org_id", "org_phone"]
650
- }
651
- ]
652
- }
653
- view_chats: {
654
- Row: {
655
- archived: boolean | null
656
- chat_access: Json | null
657
- chat_id: string | null
658
- chat_image: string | null
659
- chat_type: string | null
660
- group_metadata: Json | null
661
- has_access: boolean | 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
- label_ids: string[] | null
668
- last_read_timestamp: string | null
669
- latest_message: Json | null
670
- latest_message_timestamp: string | null
671
- member_count: number | null
672
- mute_expiration: number | null
673
- name: string | null
674
- org_id: string | null
675
- org_participants: Json | null
676
- org_phone: string | null
677
- pinned: boolean | null
678
- timestamp: string | null
679
- unread_count: number | null
680
- }
681
- Relationships: []
682
- }
683
- }
684
- Functions: {
685
- gen_id: {
686
- Args: {
687
- prefix: string
688
- size?: number
689
- alphabet?: string
690
- }
691
- Returns: string
692
- }
693
- get_chats: {
694
- Args: {
695
- chat_id_input?: string[]
696
- with_metadata?: boolean
697
- }
698
- Returns: Json
699
- }
700
- get_contacts: {
701
- Args: {
702
- contact_id_input?: string
703
- }
704
- Returns: Json
705
- }
706
- get_media: {
707
- Args: {
708
- filters?: Json
709
- page_num?: number
710
- }
711
- Returns: Json
712
- }
713
- get_org: {
714
- Args: {
715
- org_id_input?: string
716
- }
717
- Returns: Json
718
- }
719
- list_org_from_user: {
720
- Args: Record<PropertyKey, never>
721
- Returns: string
722
- }
723
- list_role_from_user: {
724
- Args: Record<PropertyKey, never>
725
- Returns: Database["public"]["Enums"]["enum_member_role"]
726
- }
727
- }
728
- Enums: {
729
- enum_chat_colors:
730
- | "#B4876E"
731
- | "#A5B337"
732
- | "#06CF9C"
733
- | "#25D366"
734
- | "#02A698"
735
- | "#7D9EF1"
736
- | "#007BFC"
737
- | "#5E47DE"
738
- | "#7F66FF"
739
- | "#9333EA"
740
- | "#FA6533"
741
- | "#C4532D"
742
- | "#DC2626"
743
- | "#FF2E74"
744
- | "#DB2777"
745
- enum_member_role: "admin" | "member"
746
- }
747
- CompositeTypes: {
748
- [_ in never]: never
749
- }
750
- }
751
- storage: {
752
- Tables: {
753
- buckets: {
754
- Row: {
755
- allowed_mime_types: string[] | null
756
- avif_autodetection: boolean | null
757
- created_at: string | null
758
- file_size_limit: number | null
759
- id: string
760
- name: string
761
- owner: string | null
762
- owner_id: string | null
763
- public: boolean | null
764
- updated_at: string | null
765
- }
766
- Insert: {
767
- allowed_mime_types?: string[] | null
768
- avif_autodetection?: boolean | null
769
- created_at?: string | null
770
- file_size_limit?: number | null
771
- id: string
772
- name: string
773
- owner?: string | null
774
- owner_id?: string | null
775
- public?: boolean | null
776
- updated_at?: string | null
777
- }
778
- Update: {
779
- allowed_mime_types?: string[] | null
780
- avif_autodetection?: boolean | null
781
- created_at?: string | null
782
- file_size_limit?: number | null
783
- id?: string
784
- name?: string
785
- owner?: string | null
786
- owner_id?: string | null
787
- public?: boolean | null
788
- updated_at?: string | null
789
- }
790
- Relationships: []
791
- }
792
- migrations: {
793
- Row: {
794
- executed_at: string | null
795
- hash: string
796
- id: number
797
- name: string
798
- }
799
- Insert: {
800
- executed_at?: string | null
801
- hash: string
802
- id: number
803
- name: string
804
- }
805
- Update: {
806
- executed_at?: string | null
807
- hash?: string
808
- id?: number
809
- name?: string
810
- }
811
- Relationships: []
812
- }
813
- objects: {
814
- Row: {
815
- bucket_id: string | null
816
- created_at: string | null
817
- id: string
818
- last_accessed_at: string | null
819
- metadata: Json | null
820
- name: string | null
821
- owner: string | null
822
- owner_id: string | null
823
- path_tokens: string[] | null
824
- updated_at: string | null
825
- version: string | null
826
- }
827
- Insert: {
828
- bucket_id?: string | null
829
- created_at?: string | null
830
- id?: string
831
- last_accessed_at?: string | null
832
- metadata?: Json | null
833
- name?: string | null
834
- owner?: string | null
835
- owner_id?: string | null
836
- path_tokens?: string[] | null
837
- updated_at?: string | null
838
- version?: string | null
839
- }
840
- Update: {
841
- bucket_id?: string | null
842
- created_at?: string | null
843
- id?: string
844
- last_accessed_at?: string | null
845
- metadata?: Json | null
846
- name?: string | null
847
- owner?: string | null
848
- owner_id?: string | null
849
- path_tokens?: string[] | null
850
- updated_at?: string | null
851
- version?: string | null
852
- }
853
- Relationships: [
854
- {
855
- foreignKeyName: "objects_bucketId_fkey"
856
- columns: ["bucket_id"]
857
- isOneToOne: false
858
- referencedRelation: "buckets"
859
- referencedColumns: ["id"]
860
- }
861
- ]
862
- }
863
- }
864
- Views: {
865
- [_ in never]: never
866
- }
867
- Functions: {
868
- can_insert_object: {
869
- Args: {
870
- bucketid: string
871
- name: string
872
- owner: string
873
- metadata: Json
874
- }
875
- Returns: undefined
876
- }
877
- extension: {
878
- Args: {
879
- name: string
880
- }
881
- Returns: string
882
- }
883
- filename: {
884
- Args: {
885
- name: string
886
- }
887
- Returns: string
888
- }
889
- foldername: {
890
- Args: {
891
- name: string
892
- }
893
- Returns: unknown
894
- }
895
- get_size_by_bucket: {
896
- Args: Record<PropertyKey, never>
897
- Returns: {
898
- size: number
899
- bucket_id: string
900
- }[]
901
- }
902
- search: {
903
- Args: {
904
- prefix: string
905
- bucketname: string
906
- limits?: number
907
- levels?: number
908
- offsets?: number
909
- search?: string
910
- sortcolumn?: string
911
- sortorder?: string
912
- }
913
- Returns: {
914
- name: string
915
- id: string
916
- updated_at: string
917
- created_at: string
918
- last_accessed_at: string
919
- metadata: Json
920
- }[]
921
- }
922
- }
923
- Enums: {
924
- [_ in never]: never
925
- }
926
- CompositeTypes: {
927
- [_ in never]: never
928
- }
929
- }
930
- }
931
-
932
- export type Tables<
933
- PublicTableNameOrOptions extends
934
- | keyof (Database["public"]["Tables"] & Database["public"]["Views"])
935
- | { schema: keyof Database },
936
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
937
- ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
938
- Database[PublicTableNameOrOptions["schema"]]["Views"])
939
- : never = never
940
- > = PublicTableNameOrOptions extends { schema: keyof Database }
941
- ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
942
- Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
943
- Row: infer R
944
- }
945
- ? R
946
- : never
947
- : PublicTableNameOrOptions extends keyof (Database["public"]["Tables"] &
948
- Database["public"]["Views"])
949
- ? (Database["public"]["Tables"] &
950
- Database["public"]["Views"])[PublicTableNameOrOptions] extends {
951
- Row: infer R
952
- }
953
- ? R
954
- : never
955
- : never
956
-
957
- export type TablesInsert<
958
- PublicTableNameOrOptions extends
959
- | keyof Database["public"]["Tables"]
960
- | { schema: keyof Database },
961
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
962
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
963
- : never = never
964
- > = PublicTableNameOrOptions extends { schema: keyof Database }
965
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
966
- Insert: infer I
967
- }
968
- ? I
969
- : never
970
- : PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
971
- ? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
972
- Insert: infer I
973
- }
974
- ? I
975
- : never
976
- : never
977
-
978
- export type TablesUpdate<
979
- PublicTableNameOrOptions extends
980
- | keyof Database["public"]["Tables"]
981
- | { schema: keyof Database },
982
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
983
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
984
- : never = never
985
- > = PublicTableNameOrOptions extends { schema: keyof Database }
986
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
987
- Update: infer U
988
- }
989
- ? U
990
- : never
991
- : PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
992
- ? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
993
- Update: infer U
994
- }
995
- ? U
996
- : never
997
- : never
998
-
999
- export type Enums<
1000
- PublicEnumNameOrOptions extends
1001
- | keyof Database["public"]["Enums"]
1002
- | { schema: keyof Database },
1003
- EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
1004
- ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
1005
- : never = never
1006
- > = PublicEnumNameOrOptions extends { schema: keyof Database }
1007
- ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
1008
- : PublicEnumNameOrOptions extends keyof Database["public"]["Enums"]
1009
- ? Database["public"]["Enums"][PublicEnumNameOrOptions]
1010
- : never
1011
-
1
+ export type Json = { [key: string]: any } | any
2
+
3
+ export interface 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_chat_access: {
32
+ Row: {
33
+ chat_id: string
34
+ email: string
35
+ has_access: boolean | null
36
+ last_read_timestamp: string | null
37
+ org_id: string
38
+ }
39
+ Insert: {
40
+ chat_id: string
41
+ email: string
42
+ has_access?: boolean | null
43
+ last_read_timestamp?: string | null
44
+ org_id?: string
45
+ }
46
+ Update: {
47
+ chat_id?: string
48
+ email?: string
49
+ has_access?: boolean | null
50
+ last_read_timestamp?: string | null
51
+ org_id?: string
52
+ }
53
+ Relationships: [
54
+ {
55
+ foreignKeyName: "tbl_chat_access_org_id_fkey"
56
+ columns: ["org_id"]
57
+ isOneToOne: false
58
+ referencedRelation: "tbl_org"
59
+ referencedColumns: ["org_id"]
60
+ }
61
+ ]
62
+ }
63
+ tbl_chat_messages: {
64
+ Row: {
65
+ ack: string | null
66
+ author: string | null
67
+ body: string | null
68
+ broadcast: boolean | null
69
+ chat_id: string | null
70
+ device_type: string | null
71
+ duration: string | null
72
+ forwarding_score: number | null
73
+ from: string | null
74
+ from_me: boolean | null
75
+ has_media: boolean | null
76
+ has_quoted_msg: boolean | null
77
+ has_reaction: boolean | null
78
+ id: Json | null
79
+ invite_v4: Json | null
80
+ is_ephemeral: boolean | null
81
+ is_forwarded: boolean | null
82
+ is_gif: boolean | null
83
+ is_starred: boolean | null
84
+ is_status: boolean | null
85
+ links: Json | null
86
+ location: Json | null
87
+ media_key: string | null
88
+ mentioned_ids: string[] | null
89
+ message_id: string
90
+ message_type: string | null
91
+ order_id: string | null
92
+ org_id: string
93
+ org_phone: string
94
+ performed_by: string | null
95
+ raw_data: Json | null
96
+ sender_phone: string | null
97
+ timestamp: string | null
98
+ to: string | null
99
+ token: string | null
100
+ url: string | null
101
+ vcards: string[] | null
102
+ }
103
+ Insert: {
104
+ ack?: string | null
105
+ author?: string | null
106
+ body?: string | null
107
+ broadcast?: boolean | null
108
+ chat_id?: string | null
109
+ device_type?: string | null
110
+ duration?: string | null
111
+ forwarding_score?: number | null
112
+ from?: string | null
113
+ from_me?: boolean | null
114
+ has_media?: boolean | null
115
+ has_quoted_msg?: boolean | null
116
+ has_reaction?: boolean | null
117
+ id?: Json | null
118
+ invite_v4?: Json | null
119
+ is_ephemeral?: boolean | null
120
+ is_forwarded?: boolean | null
121
+ is_gif?: boolean | null
122
+ is_starred?: boolean | null
123
+ is_status?: boolean | null
124
+ links?: Json | null
125
+ location?: Json | null
126
+ media_key?: string | null
127
+ mentioned_ids?: string[] | null
128
+ message_id: string
129
+ message_type?: string | null
130
+ order_id?: string | null
131
+ org_id: string
132
+ org_phone: string
133
+ performed_by?: string | null
134
+ raw_data?: Json | null
135
+ sender_phone?: string | null
136
+ timestamp?: string | null
137
+ to?: string | null
138
+ token?: string | null
139
+ url?: string | null
140
+ vcards?: string[] | null
141
+ }
142
+ Update: {
143
+ ack?: string | null
144
+ author?: string | null
145
+ body?: string | null
146
+ broadcast?: boolean | null
147
+ chat_id?: string | null
148
+ device_type?: string | null
149
+ duration?: string | null
150
+ forwarding_score?: number | null
151
+ from?: string | null
152
+ from_me?: boolean | null
153
+ has_media?: boolean | null
154
+ has_quoted_msg?: boolean | null
155
+ has_reaction?: boolean | null
156
+ id?: Json | null
157
+ invite_v4?: Json | null
158
+ is_ephemeral?: boolean | null
159
+ is_forwarded?: boolean | null
160
+ is_gif?: boolean | null
161
+ is_starred?: boolean | null
162
+ is_status?: boolean | null
163
+ links?: Json | null
164
+ location?: Json | null
165
+ media_key?: string | null
166
+ mentioned_ids?: string[] | null
167
+ message_id?: string
168
+ message_type?: string | null
169
+ order_id?: string | null
170
+ org_id?: string
171
+ org_phone?: string
172
+ performed_by?: string | null
173
+ raw_data?: Json | null
174
+ sender_phone?: string | null
175
+ timestamp?: string | null
176
+ to?: string | null
177
+ token?: string | null
178
+ url?: string | null
179
+ vcards?: string[] | null
180
+ }
181
+ Relationships: [
182
+ {
183
+ foreignKeyName: "tbl_chat_messages_fkey_tbl_org_phones"
184
+ columns: ["org_id", "org_phone"]
185
+ isOneToOne: false
186
+ referencedRelation: "tbl_org_phones"
187
+ referencedColumns: ["org_id", "org_phone"]
188
+ }
189
+ ]
190
+ }
191
+ tbl_chat_notifications: {
192
+ Row: {
193
+ author: string | null
194
+ body: string | null
195
+ chat_id: string | null
196
+ group_notification_id: string
197
+ id: Json | null
198
+ org_id: string
199
+ org_phone: string
200
+ recipientids: string[] | null
201
+ timestamp: string | null
202
+ type: string | null
203
+ }
204
+ Insert: {
205
+ author?: string | null
206
+ body?: string | null
207
+ chat_id?: string | null
208
+ group_notification_id: string
209
+ id?: Json | null
210
+ org_id: string
211
+ org_phone: string
212
+ recipientids?: string[] | null
213
+ timestamp?: string | null
214
+ type?: string | null
215
+ }
216
+ Update: {
217
+ author?: string | null
218
+ body?: string | null
219
+ chat_id?: string | null
220
+ group_notification_id?: string
221
+ id?: Json | null
222
+ org_id?: string
223
+ org_phone?: string
224
+ recipientids?: string[] | null
225
+ timestamp?: string | null
226
+ type?: string | null
227
+ }
228
+ Relationships: [
229
+ {
230
+ foreignKeyName: "tbl_chat_notifications_fkey_tbl_org_phones"
231
+ columns: ["org_id", "org_phone"]
232
+ isOneToOne: false
233
+ referencedRelation: "tbl_org_phones"
234
+ referencedColumns: ["org_id", "org_phone"]
235
+ }
236
+ ]
237
+ }
238
+ tbl_chat_participants: {
239
+ Row: {
240
+ chat_id: string
241
+ contact_id: string
242
+ id: Json | null
243
+ is_admin: boolean | null
244
+ is_super_admin: boolean | null
245
+ org_id: string
246
+ }
247
+ Insert: {
248
+ chat_id: string
249
+ contact_id: string
250
+ id?: Json | null
251
+ is_admin?: boolean | null
252
+ is_super_admin?: boolean | null
253
+ org_id: string
254
+ }
255
+ Update: {
256
+ chat_id?: string
257
+ contact_id?: string
258
+ id?: Json | null
259
+ is_admin?: boolean | null
260
+ is_super_admin?: boolean | null
261
+ org_id?: string
262
+ }
263
+ Relationships: []
264
+ }
265
+ tbl_chat_reactions: {
266
+ Row: {
267
+ ack: number | null
268
+ id: Json | null
269
+ message_id: string | null
270
+ msg_id: Json | null
271
+ org_id: string
272
+ org_phone: string
273
+ orphan: number | null
274
+ orphan_reason: string | null
275
+ reaction: string | null
276
+ reaction_id: string
277
+ read: boolean | null
278
+ sender_id: string | null
279
+ timestamp: string | null
280
+ }
281
+ Insert: {
282
+ ack?: number | null
283
+ id?: Json | null
284
+ message_id?: string | null
285
+ msg_id?: Json | null
286
+ org_id: string
287
+ org_phone: string
288
+ orphan?: number | null
289
+ orphan_reason?: string | null
290
+ reaction?: string | null
291
+ reaction_id: string
292
+ read?: boolean | null
293
+ sender_id?: string | null
294
+ timestamp?: string | null
295
+ }
296
+ Update: {
297
+ ack?: number | null
298
+ id?: Json | null
299
+ message_id?: string | null
300
+ msg_id?: Json | null
301
+ org_id?: string
302
+ org_phone?: string
303
+ orphan?: number | null
304
+ orphan_reason?: string | null
305
+ reaction?: string | null
306
+ reaction_id?: string
307
+ read?: boolean | null
308
+ sender_id?: string | null
309
+ timestamp?: string | null
310
+ }
311
+ Relationships: [
312
+ {
313
+ foreignKeyName: "tbl_chat_reactions_fkey_tbl_org_phones"
314
+ columns: ["org_id", "org_phone"]
315
+ isOneToOne: false
316
+ referencedRelation: "tbl_org_phones"
317
+ referencedColumns: ["org_id", "org_phone"]
318
+ }
319
+ ]
320
+ }
321
+ tbl_chats: {
322
+ Row: {
323
+ archived: boolean | null
324
+ chat_id: string
325
+ chat_image: string | null
326
+ group_metadata: Json | null
327
+ id: Json | null
328
+ invite_link: string | null
329
+ is_group: boolean | null
330
+ is_muted: boolean | null
331
+ is_read_only: boolean | null
332
+ label_ids: Json
333
+ mute_expiration: number | null
334
+ name: string | null
335
+ org_id: string
336
+ org_phone: string
337
+ pinned: boolean | null
338
+ timestamp: string | null
339
+ unread_count: number | null
340
+ }
341
+ Insert: {
342
+ archived?: boolean | null
343
+ chat_id: string
344
+ chat_image?: string | null
345
+ group_metadata?: Json | null
346
+ id?: Json | null
347
+ invite_link?: string | null
348
+ is_group?: boolean | null
349
+ is_muted?: boolean | null
350
+ is_read_only?: boolean | null
351
+ label_ids?: Json
352
+ mute_expiration?: number | null
353
+ name?: string | null
354
+ org_id: string
355
+ org_phone: string
356
+ pinned?: boolean | null
357
+ timestamp?: string | null
358
+ unread_count?: number | null
359
+ }
360
+ Update: {
361
+ archived?: boolean | null
362
+ chat_id?: string
363
+ chat_image?: string | null
364
+ group_metadata?: Json | null
365
+ id?: Json | null
366
+ invite_link?: string | null
367
+ is_group?: boolean | null
368
+ is_muted?: boolean | null
369
+ is_read_only?: boolean | null
370
+ label_ids?: Json
371
+ mute_expiration?: number | null
372
+ name?: string | null
373
+ org_id?: string
374
+ org_phone?: string
375
+ pinned?: boolean | null
376
+ timestamp?: string | null
377
+ unread_count?: number | null
378
+ }
379
+ Relationships: [
380
+ {
381
+ foreignKeyName: "tbl_chats_org_id_fkey"
382
+ columns: ["org_id"]
383
+ isOneToOne: false
384
+ referencedRelation: "tbl_org"
385
+ referencedColumns: ["org_id"]
386
+ }
387
+ ]
388
+ }
389
+ tbl_contacts: {
390
+ Row: {
391
+ contact_color: Database["public"]["Enums"]["enum_chat_colors"] | null
392
+ contact_id: string
393
+ contact_image: string | null
394
+ contact_type: string | null
395
+ id: Json | null
396
+ is_blocked: boolean | null
397
+ is_business: boolean | null
398
+ is_enterprise: boolean | null
399
+ is_group: boolean | null
400
+ is_internal: boolean | null
401
+ is_me: boolean | null
402
+ is_my_contact: boolean | null
403
+ is_user: boolean | null
404
+ is_wa_contact: boolean | null
405
+ label_ids: Json
406
+ name: string | null
407
+ number: string | null
408
+ org_id: string
409
+ pushname: string | null
410
+ short_name: string | null
411
+ }
412
+ Insert: {
413
+ contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
414
+ contact_id: string
415
+ contact_image?: string | null
416
+ contact_type?: string | null
417
+ id?: Json | null
418
+ is_blocked?: boolean | null
419
+ is_business?: boolean | null
420
+ is_enterprise?: boolean | null
421
+ is_group?: boolean | null
422
+ is_internal?: boolean | null
423
+ is_me?: boolean | null
424
+ is_my_contact?: boolean | null
425
+ is_user?: boolean | null
426
+ is_wa_contact?: boolean | null
427
+ label_ids?: Json
428
+ name?: string | null
429
+ number?: string | null
430
+ org_id: string
431
+ pushname?: string | null
432
+ short_name?: string | null
433
+ }
434
+ Update: {
435
+ contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
436
+ contact_id?: string
437
+ contact_image?: string | null
438
+ contact_type?: string | null
439
+ id?: Json | null
440
+ is_blocked?: boolean | null
441
+ is_business?: boolean | null
442
+ is_enterprise?: boolean | null
443
+ is_group?: boolean | null
444
+ is_internal?: boolean | null
445
+ is_me?: boolean | null
446
+ is_my_contact?: boolean | null
447
+ is_user?: boolean | null
448
+ is_wa_contact?: boolean | null
449
+ label_ids?: Json
450
+ name?: string | null
451
+ number?: string | null
452
+ org_id?: string
453
+ pushname?: string | null
454
+ short_name?: string | null
455
+ }
456
+ Relationships: [
457
+ {
458
+ foreignKeyName: "tbl_contacts_org_id_fkey"
459
+ columns: ["org_id"]
460
+ isOneToOne: false
461
+ referencedRelation: "tbl_org"
462
+ referencedColumns: ["org_id"]
463
+ }
464
+ ]
465
+ }
466
+ tbl_org: {
467
+ Row: {
468
+ created_at: string
469
+ org_id: string
470
+ org_image: string | null
471
+ org_name: string | null
472
+ support_link: string | null
473
+ }
474
+ Insert: {
475
+ created_at?: string
476
+ org_id?: string
477
+ org_image?: string | null
478
+ org_name?: string | null
479
+ support_link?: string | null
480
+ }
481
+ Update: {
482
+ created_at?: string
483
+ org_id?: string
484
+ org_image?: string | null
485
+ org_name?: string | null
486
+ support_link?: string | null
487
+ }
488
+ Relationships: []
489
+ }
490
+ tbl_org_labels: {
491
+ Row: {
492
+ color: string
493
+ created_at: string
494
+ label_id: string
495
+ name: string
496
+ org_id: string
497
+ type: string
498
+ }
499
+ Insert: {
500
+ color?: string
501
+ created_at?: string
502
+ label_id?: string
503
+ name: string
504
+ org_id?: string
505
+ type?: string
506
+ }
507
+ Update: {
508
+ color?: string
509
+ created_at?: string
510
+ label_id?: string
511
+ name?: string
512
+ org_id?: string
513
+ type?: string
514
+ }
515
+ Relationships: [
516
+ {
517
+ foreignKeyName: "tbl_org_labels_org_id_fkey"
518
+ columns: ["org_id"]
519
+ isOneToOne: false
520
+ referencedRelation: "tbl_org"
521
+ referencedColumns: ["org_id"]
522
+ }
523
+ ]
524
+ }
525
+ tbl_org_members: {
526
+ Row: {
527
+ created_at: string | null
528
+ email: string
529
+ invited_at: string | null
530
+ invited_by: string | null
531
+ is_active: boolean
532
+ member_image: string | null
533
+ member_name: string | null
534
+ org_id: string
535
+ role: Database["public"]["Enums"]["enum_member_role"]
536
+ user_id: string | null
537
+ }
538
+ Insert: {
539
+ created_at?: string | null
540
+ email: string
541
+ invited_at?: string | null
542
+ invited_by?: string | null
543
+ is_active?: boolean
544
+ member_image?: string | null
545
+ member_name?: string | null
546
+ org_id: string
547
+ role?: Database["public"]["Enums"]["enum_member_role"]
548
+ user_id?: string | null
549
+ }
550
+ Update: {
551
+ created_at?: string | null
552
+ email?: string
553
+ invited_at?: string | null
554
+ invited_by?: string | null
555
+ is_active?: boolean
556
+ member_image?: string | null
557
+ member_name?: string | null
558
+ org_id?: string
559
+ role?: Database["public"]["Enums"]["enum_member_role"]
560
+ user_id?: string | null
561
+ }
562
+ Relationships: [
563
+ {
564
+ foreignKeyName: "tbl_org_members_fkey_auth_users"
565
+ columns: ["user_id"]
566
+ isOneToOne: false
567
+ referencedRelation: "users"
568
+ referencedColumns: ["id"]
569
+ },
570
+ {
571
+ foreignKeyName: "tbl_org_members_fkey_tbl_org"
572
+ columns: ["org_id"]
573
+ isOneToOne: false
574
+ referencedRelation: "tbl_org"
575
+ referencedColumns: ["org_id"]
576
+ }
577
+ ]
578
+ }
579
+ tbl_org_phones: {
580
+ Row: {
581
+ created_at: string
582
+ is_ready: boolean
583
+ org_id: string
584
+ org_phone: string | null
585
+ phone_id: string
586
+ phone_image: string | null
587
+ phone_name: string | null
588
+ qr_code: string | null
589
+ updated_at: string
590
+ wa_state: string | null
591
+ }
592
+ Insert: {
593
+ created_at?: string
594
+ is_ready?: boolean
595
+ org_id: string
596
+ org_phone?: string | null
597
+ phone_id?: string
598
+ phone_image?: string | null
599
+ phone_name?: string | null
600
+ qr_code?: string | null
601
+ updated_at?: string
602
+ wa_state?: string | null
603
+ }
604
+ Update: {
605
+ created_at?: string
606
+ is_ready?: boolean
607
+ org_id?: string
608
+ org_phone?: string | null
609
+ phone_id?: string
610
+ phone_image?: string | null
611
+ phone_name?: string | null
612
+ qr_code?: string | null
613
+ updated_at?: string
614
+ wa_state?: string | null
615
+ }
616
+ Relationships: [
617
+ {
618
+ foreignKeyName: "tbl_org_phones_fkey_tbl_org"
619
+ columns: ["org_id"]
620
+ isOneToOne: false
621
+ referencedRelation: "tbl_org"
622
+ referencedColumns: ["org_id"]
623
+ }
624
+ ]
625
+ }
626
+ }
627
+ Views: {
628
+ view_chats: {
629
+ Row: {
630
+ archived: boolean | null
631
+ chat_access: Json | null
632
+ chat_id: string | null
633
+ chat_image: string | null
634
+ chat_type: string | null
635
+ group_metadata: Json | null
636
+ has_access: boolean | null
637
+ id: Json | null
638
+ invite_link: string | null
639
+ is_group: boolean | null
640
+ is_muted: boolean | null
641
+ is_read_only: boolean | null
642
+ label_ids: Json | null
643
+ last_read_timestamp: string | null
644
+ latest_message: Json | null
645
+ latest_message_timestamp: string | null
646
+ member_count: number | null
647
+ message_unread_count: number | null
648
+ mute_expiration: number | null
649
+ name: string | null
650
+ org_id: string | null
651
+ org_participants: Json | null
652
+ org_phone: string | null
653
+ pinned: boolean | null
654
+ timestamp: string | null
655
+ unread_count: number | null
656
+ }
657
+ Relationships: [
658
+ {
659
+ foreignKeyName: "tbl_chats_org_id_fkey"
660
+ columns: ["org_id"]
661
+ isOneToOne: false
662
+ referencedRelation: "tbl_org"
663
+ referencedColumns: ["org_id"]
664
+ }
665
+ ]
666
+ }
667
+ }
668
+ Functions: {
669
+ gen_id: {
670
+ Args: {
671
+ prefix: string
672
+ size?: number
673
+ alphabet?: string
674
+ }
675
+ Returns: string
676
+ }
677
+ get_chats: {
678
+ Args: {
679
+ chat_id_input?: string[]
680
+ with_metadata?: boolean
681
+ }
682
+ Returns: Json
683
+ }
684
+ get_contacts: {
685
+ Args: {
686
+ contact_ids_input?: string[]
687
+ }
688
+ Returns: Json
689
+ }
690
+ get_media: {
691
+ Args: {
692
+ filters?: Json
693
+ page_num?: number
694
+ }
695
+ Returns: Json
696
+ }
697
+ get_org: {
698
+ Args: {
699
+ org_id_input?: string
700
+ }
701
+ Returns: Json
702
+ }
703
+ list_org_from_user: {
704
+ Args: Record<PropertyKey, never>
705
+ Returns: string
706
+ }
707
+ list_role_from_user: {
708
+ Args: Record<PropertyKey, never>
709
+ Returns: Database["public"]["Enums"]["enum_member_role"]
710
+ }
711
+ update_labels: {
712
+ Args: {
713
+ tbl_type: string
714
+ label_ids_input: Json
715
+ row_id_input: string[]
716
+ }
717
+ Returns: undefined
718
+ }
719
+ }
720
+ Enums: {
721
+ enum_chat_colors:
722
+ | "#B4876E"
723
+ | "#A5B337"
724
+ | "#06CF9C"
725
+ | "#25D366"
726
+ | "#02A698"
727
+ | "#7D9EF1"
728
+ | "#007BFC"
729
+ | "#5E47DE"
730
+ | "#7F66FF"
731
+ | "#9333EA"
732
+ | "#FA6533"
733
+ | "#C4532D"
734
+ | "#DC2626"
735
+ | "#FF2E74"
736
+ | "#DB2777"
737
+ enum_member_role: "admin" | "member"
738
+ }
739
+ CompositeTypes: {
740
+ [_ in never]: never
741
+ }
742
+ }
743
+ storage: {
744
+ Tables: {
745
+ buckets: {
746
+ Row: {
747
+ allowed_mime_types: string[] | null
748
+ avif_autodetection: boolean | null
749
+ created_at: string | null
750
+ file_size_limit: number | null
751
+ id: string
752
+ name: string
753
+ owner: string | null
754
+ owner_id: string | null
755
+ public: boolean | null
756
+ updated_at: string | null
757
+ }
758
+ Insert: {
759
+ allowed_mime_types?: string[] | null
760
+ avif_autodetection?: boolean | null
761
+ created_at?: string | null
762
+ file_size_limit?: number | null
763
+ id: string
764
+ name: string
765
+ owner?: string | null
766
+ owner_id?: string | null
767
+ public?: boolean | null
768
+ updated_at?: string | null
769
+ }
770
+ Update: {
771
+ allowed_mime_types?: string[] | null
772
+ avif_autodetection?: boolean | null
773
+ created_at?: string | null
774
+ file_size_limit?: number | null
775
+ id?: string
776
+ name?: string
777
+ owner?: string | null
778
+ owner_id?: string | null
779
+ public?: boolean | null
780
+ updated_at?: string | null
781
+ }
782
+ Relationships: []
783
+ }
784
+ migrations: {
785
+ Row: {
786
+ executed_at: string | null
787
+ hash: string
788
+ id: number
789
+ name: string
790
+ }
791
+ Insert: {
792
+ executed_at?: string | null
793
+ hash: string
794
+ id: number
795
+ name: string
796
+ }
797
+ Update: {
798
+ executed_at?: string | null
799
+ hash?: string
800
+ id?: number
801
+ name?: string
802
+ }
803
+ Relationships: []
804
+ }
805
+ objects: {
806
+ Row: {
807
+ bucket_id: string | null
808
+ created_at: string | null
809
+ id: string
810
+ last_accessed_at: string | null
811
+ metadata: Json | null
812
+ name: string | null
813
+ owner: string | null
814
+ owner_id: string | null
815
+ path_tokens: string[] | null
816
+ updated_at: string | null
817
+ version: string | null
818
+ }
819
+ Insert: {
820
+ bucket_id?: string | null
821
+ created_at?: string | null
822
+ id?: string
823
+ last_accessed_at?: string | null
824
+ metadata?: Json | null
825
+ name?: string | null
826
+ owner?: string | null
827
+ owner_id?: string | null
828
+ path_tokens?: string[] | null
829
+ updated_at?: string | null
830
+ version?: string | null
831
+ }
832
+ Update: {
833
+ bucket_id?: string | null
834
+ created_at?: string | null
835
+ id?: string
836
+ last_accessed_at?: string | null
837
+ metadata?: Json | null
838
+ name?: string | null
839
+ owner?: string | null
840
+ owner_id?: string | null
841
+ path_tokens?: string[] | null
842
+ updated_at?: string | null
843
+ version?: string | null
844
+ }
845
+ Relationships: [
846
+ {
847
+ foreignKeyName: "objects_bucketId_fkey"
848
+ columns: ["bucket_id"]
849
+ isOneToOne: false
850
+ referencedRelation: "buckets"
851
+ referencedColumns: ["id"]
852
+ }
853
+ ]
854
+ }
855
+ }
856
+ Views: {
857
+ [_ in never]: never
858
+ }
859
+ Functions: {
860
+ can_insert_object: {
861
+ Args: {
862
+ bucketid: string
863
+ name: string
864
+ owner: string
865
+ metadata: Json
866
+ }
867
+ Returns: undefined
868
+ }
869
+ extension: {
870
+ Args: {
871
+ name: string
872
+ }
873
+ Returns: string
874
+ }
875
+ filename: {
876
+ Args: {
877
+ name: string
878
+ }
879
+ Returns: string
880
+ }
881
+ foldername: {
882
+ Args: {
883
+ name: string
884
+ }
885
+ Returns: unknown
886
+ }
887
+ get_size_by_bucket: {
888
+ Args: Record<PropertyKey, never>
889
+ Returns: {
890
+ size: number
891
+ bucket_id: string
892
+ }[]
893
+ }
894
+ search: {
895
+ Args: {
896
+ prefix: string
897
+ bucketname: string
898
+ limits?: number
899
+ levels?: number
900
+ offsets?: number
901
+ search?: string
902
+ sortcolumn?: string
903
+ sortorder?: string
904
+ }
905
+ Returns: {
906
+ name: string
907
+ id: string
908
+ updated_at: string
909
+ created_at: string
910
+ last_accessed_at: string
911
+ metadata: Json
912
+ }[]
913
+ }
914
+ }
915
+ Enums: {
916
+ [_ in never]: never
917
+ }
918
+ CompositeTypes: {
919
+ [_ in never]: never
920
+ }
921
+ }
922
+ }
923
+
924
+ export type Tables<
925
+ PublicTableNameOrOptions extends
926
+ | keyof (Database["public"]["Tables"] & Database["public"]["Views"])
927
+ | { schema: keyof Database },
928
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
929
+ ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
930
+ Database[PublicTableNameOrOptions["schema"]]["Views"])
931
+ : never = never
932
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
933
+ ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
934
+ Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
935
+ Row: infer R
936
+ }
937
+ ? R
938
+ : never
939
+ : PublicTableNameOrOptions extends keyof (Database["public"]["Tables"] &
940
+ Database["public"]["Views"])
941
+ ? (Database["public"]["Tables"] &
942
+ Database["public"]["Views"])[PublicTableNameOrOptions] extends {
943
+ Row: infer R
944
+ }
945
+ ? R
946
+ : never
947
+ : never
948
+
949
+ export type TablesInsert<
950
+ PublicTableNameOrOptions extends
951
+ | keyof Database["public"]["Tables"]
952
+ | { schema: keyof Database },
953
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
954
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
955
+ : never = never
956
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
957
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
958
+ Insert: infer I
959
+ }
960
+ ? I
961
+ : never
962
+ : PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
963
+ ? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
964
+ Insert: infer I
965
+ }
966
+ ? I
967
+ : never
968
+ : never
969
+
970
+ export type TablesUpdate<
971
+ PublicTableNameOrOptions extends
972
+ | keyof Database["public"]["Tables"]
973
+ | { schema: keyof Database },
974
+ TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
975
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
976
+ : never = never
977
+ > = PublicTableNameOrOptions extends { schema: keyof Database }
978
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
979
+ Update: infer U
980
+ }
981
+ ? U
982
+ : never
983
+ : PublicTableNameOrOptions extends keyof Database["public"]["Tables"]
984
+ ? Database["public"]["Tables"][PublicTableNameOrOptions] extends {
985
+ Update: infer U
986
+ }
987
+ ? U
988
+ : never
989
+ : never
990
+
991
+ export type Enums<
992
+ PublicEnumNameOrOptions extends
993
+ | keyof Database["public"]["Enums"]
994
+ | { schema: keyof Database },
995
+ EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
996
+ ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
997
+ : never = never
998
+ > = PublicEnumNameOrOptions extends { schema: keyof Database }
999
+ ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
1000
+ : PublicEnumNameOrOptions extends keyof Database["public"]["Enums"]
1001
+ ? Database["public"]["Enums"][PublicEnumNameOrOptions]
1002
+ : never
1003
+
1012
1004