@periskope/types 0.6.145 → 0.6.147

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