@periskope/types 0.6.2 → 0.6.4

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