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