@periskope/types 0.6.109 → 0.6.111

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