@periskope/types 0.6.133 → 0.6.135

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