@periskope/types 0.6.141 → 0.6.143

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,2560 +1,2528 @@
1
- export type Json = { [key: string]: any } | any;
1
+ export type Json = { [key: string]: any } | any
2
2
 
3
3
  export type Database = {
4
4
  internal: {
5
5
  Tables: {
6
6
  config: {
7
7
  Row: {
8
- key: string;
9
- updated_at: string;
10
- value: string | null;
11
- };
8
+ key: string
9
+ updated_at: string
10
+ value: string | null
11
+ }
12
12
  Insert: {
13
- key: string;
14
- updated_at?: string;
15
- value?: string | null;
16
- };
13
+ key: string
14
+ updated_at?: string
15
+ value?: string | null
16
+ }
17
17
  Update: {
18
- key?: string;
19
- updated_at?: string;
20
- value?: string | null;
21
- };
22
- Relationships: [];
23
- };
18
+ key?: string
19
+ updated_at?: string
20
+ value?: string | null
21
+ }
22
+ Relationships: []
23
+ }
24
24
  org_phone_logs: {
25
25
  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
- };
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
+ }
34
34
  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
- };
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
+ }
43
43
  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
- };
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
+ }
54
54
  tbl_communication_logs: {
55
55
  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
- };
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
+ }
65
65
  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
- };
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
+ }
75
75
  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
- };
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
+ }
87
87
  tbl_trigger_logs: {
88
88
  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
- };
89
+ created_at: string
90
+ id: number
91
+ request_body: Json
92
+ request_id: string
93
+ trace_id: string
94
+ trigger_name: string
95
+ }
96
96
  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
- };
97
+ created_at?: string
98
+ id?: number
99
+ request_body: Json
100
+ request_id: string
101
+ trace_id?: string
102
+ trigger_name: string
103
+ }
104
104
  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
- };
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
+ }
115
115
  Views: {
116
- [_ in never]: never;
117
- };
116
+ [_ in never]: never
117
+ }
118
118
  Functions: {
119
- [_ in never]: never;
120
- };
119
+ [_ in never]: never
120
+ }
121
121
  Enums: {
122
- [_ in never]: never;
123
- };
122
+ [_ in never]: never
123
+ }
124
124
  CompositeTypes: {
125
- [_ in never]: never;
126
- };
127
- };
125
+ [_ in never]: never
126
+ }
127
+ }
128
128
  public: {
129
129
  Tables: {
130
130
  tbl_api_logs: {
131
131
  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
- };
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
+ }
141
141
  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
- };
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
+ }
151
151
  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
- };
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
+ }
163
163
  tbl_automation_rules: {
164
164
  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
- };
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
+ }
176
176
  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
- };
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
+ }
188
188
  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
- };
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
+ }
200
200
  Relationships: [
201
201
  {
202
- foreignKeyName: 'public_tbl_automation_rules_org_id_fkey';
203
- columns: ['org_id'];
204
- isOneToOne: false;
205
- referencedRelation: 'tbl_org';
206
- referencedColumns: ['org_id'];
202
+ foreignKeyName: "public_tbl_automation_rules_org_id_fkey"
203
+ columns: ["org_id"]
204
+ isOneToOne: false
205
+ referencedRelation: "tbl_org"
206
+ referencedColumns: ["org_id"]
207
207
  },
208
208
  {
209
- foreignKeyName: 'public_tbl_automation_rules_org_id_fkey';
210
- columns: ['org_id'];
211
- isOneToOne: false;
212
- referencedRelation: 'view_org';
213
- referencedColumns: ['org_id'];
209
+ foreignKeyName: "public_tbl_automation_rules_org_id_fkey"
210
+ columns: ["org_id"]
211
+ isOneToOne: false
212
+ referencedRelation: "view_org"
213
+ referencedColumns: ["org_id"]
214
214
  },
215
- ];
216
- };
215
+ ]
216
+ }
217
217
  tbl_broadcast_logs: {
218
218
  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
- };
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
+ }
233
233
  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
- };
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
+ }
248
248
  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
- };
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
+ }
263
263
  Relationships: [
264
264
  {
265
- foreignKeyName: 'tbl_broadcast_logs_broadcast_id_fkey';
266
- columns: ['broadcast_id'];
267
- isOneToOne: false;
268
- referencedRelation: 'tbl_broadcast_messages';
269
- referencedColumns: ['broadcast_id'];
265
+ foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey"
266
+ columns: ["broadcast_id"]
267
+ isOneToOne: false
268
+ referencedRelation: "tbl_broadcast_messages"
269
+ referencedColumns: ["broadcast_id"]
270
270
  },
271
271
  {
272
- foreignKeyName: 'tbl_broadcast_logs_broadcast_id_fkey';
273
- columns: ['broadcast_id'];
274
- isOneToOne: false;
275
- referencedRelation: 'view_broadcast_logs';
276
- referencedColumns: ['broadcast_id'];
272
+ foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey"
273
+ columns: ["broadcast_id"]
274
+ isOneToOne: false
275
+ referencedRelation: "view_broadcast_logs"
276
+ referencedColumns: ["broadcast_id"]
277
277
  },
278
278
  {
279
- foreignKeyName: 'tbl_broadcast_logs_org_id_fkey';
280
- columns: ['org_id'];
281
- isOneToOne: false;
282
- referencedRelation: 'tbl_org';
283
- referencedColumns: ['org_id'];
279
+ foreignKeyName: "tbl_broadcast_logs_org_id_fkey"
280
+ columns: ["org_id"]
281
+ isOneToOne: false
282
+ referencedRelation: "tbl_org"
283
+ referencedColumns: ["org_id"]
284
284
  },
285
285
  {
286
- foreignKeyName: 'tbl_broadcast_logs_org_id_fkey';
287
- columns: ['org_id'];
288
- isOneToOne: false;
289
- referencedRelation: 'view_org';
290
- referencedColumns: ['org_id'];
286
+ foreignKeyName: "tbl_broadcast_logs_org_id_fkey"
287
+ columns: ["org_id"]
288
+ isOneToOne: false
289
+ referencedRelation: "view_org"
290
+ referencedColumns: ["org_id"]
291
291
  },
292
- ];
293
- };
292
+ ]
293
+ }
294
294
  tbl_broadcast_messages: {
295
295
  Row: {
296
- broadcast_id: string;
296
+ broadcast_id: string
297
297
  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
- };
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
+ }
310
310
  Insert: {
311
- broadcast_id?: string;
311
+ broadcast_id?: string
312
312
  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
- };
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
+ }
325
325
  Update: {
326
- broadcast_id?: string;
326
+ broadcast_id?: string
327
327
  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
- };
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
+ }
340
340
  Relationships: [
341
341
  {
342
- foreignKeyName: 'tbl_broadcast_messages_org_id_fkey';
343
- columns: ['org_id'];
344
- isOneToOne: false;
345
- referencedRelation: 'tbl_org';
346
- referencedColumns: ['org_id'];
342
+ foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
343
+ columns: ["org_id"]
344
+ isOneToOne: false
345
+ referencedRelation: "tbl_org"
346
+ referencedColumns: ["org_id"]
347
347
  },
348
348
  {
349
- foreignKeyName: 'tbl_broadcast_messages_org_id_fkey';
350
- columns: ['org_id'];
351
- isOneToOne: false;
352
- referencedRelation: 'view_org';
353
- referencedColumns: ['org_id'];
349
+ foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
350
+ columns: ["org_id"]
351
+ isOneToOne: false
352
+ referencedRelation: "view_org"
353
+ referencedColumns: ["org_id"]
354
354
  },
355
- ];
356
- };
355
+ ]
356
+ }
357
357
  tbl_broadcast_templates: {
358
358
  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
- };
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
+ }
367
367
  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
- };
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
+ }
376
376
  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
- };
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
+ }
385
385
  Relationships: [
386
386
  {
387
- foreignKeyName: 'tbl_broadcast_templates_org_id_fkey';
388
- columns: ['org_id'];
389
- isOneToOne: false;
390
- referencedRelation: 'tbl_org';
391
- referencedColumns: ['org_id'];
387
+ foreignKeyName: "tbl_broadcast_templates_org_id_fkey"
388
+ columns: ["org_id"]
389
+ isOneToOne: false
390
+ referencedRelation: "tbl_org"
391
+ referencedColumns: ["org_id"]
392
392
  },
393
393
  {
394
- foreignKeyName: 'tbl_broadcast_templates_org_id_fkey';
395
- columns: ['org_id'];
396
- isOneToOne: false;
397
- referencedRelation: 'view_org';
398
- referencedColumns: ['org_id'];
394
+ foreignKeyName: "tbl_broadcast_templates_org_id_fkey"
395
+ columns: ["org_id"]
396
+ isOneToOne: false
397
+ referencedRelation: "view_org"
398
+ referencedColumns: ["org_id"]
399
399
  },
400
- ];
401
- };
400
+ ]
401
+ }
402
402
  tbl_chat_logs: {
403
403
  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
- };
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
+ }
416
416
  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
- };
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
+ }
429
429
  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
- };
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
+ }
442
442
  Relationships: [
443
443
  {
444
- foreignKeyName: 'tbl_chat_logs_org_id_fkey';
445
- columns: ['org_id'];
446
- isOneToOne: false;
447
- referencedRelation: 'tbl_org';
448
- referencedColumns: ['org_id'];
444
+ foreignKeyName: "tbl_chat_logs_org_id_fkey"
445
+ columns: ["org_id"]
446
+ isOneToOne: false
447
+ referencedRelation: "tbl_org"
448
+ referencedColumns: ["org_id"]
449
449
  },
450
450
  {
451
- foreignKeyName: 'tbl_chat_logs_org_id_fkey';
452
- columns: ['org_id'];
453
- isOneToOne: false;
454
- referencedRelation: 'view_org';
455
- referencedColumns: ['org_id'];
451
+ foreignKeyName: "tbl_chat_logs_org_id_fkey"
452
+ columns: ["org_id"]
453
+ isOneToOne: false
454
+ referencedRelation: "view_org"
455
+ referencedColumns: ["org_id"]
456
456
  },
457
- ];
458
- };
457
+ ]
458
+ }
459
459
  tbl_chat_messages: {
460
460
  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
- };
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
+ }
514
514
  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
- };
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
+ }
568
568
  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
- };
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
+ }
624
624
  tbl_chat_notifications: {
625
625
  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
- };
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
+ }
638
638
  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
- };
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
+ }
651
651
  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
- };
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
+ }
666
666
  tbl_chat_participants: {
667
667
  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
- };
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
+ }
676
676
  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
- };
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
+ }
685
685
  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
- };
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
+ }
696
696
  tbl_chat_properties: {
697
697
  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
- };
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
+ }
710
710
  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
- };
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
+ }
723
723
  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
- };
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
+ }
738
738
  tbl_chat_reactions: {
739
739
  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
- };
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
+ }
756
756
  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
- };
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
+ }
773
773
  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
- };
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
+ }
792
792
  tbl_chat_tickets: {
793
793
  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
- };
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: Database["public"]["Enums"]["enum_chat_tickets_status"] | null
813
+ subject: string
814
+ ticket_id: string
815
+ zohodesk_metadata: Json | null
816
+ }
819
817
  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;
818
+ assigned_by?: string | null
819
+ assignee?: string | null
820
+ chat_id: string
821
+ close_ticket_metadata?: Json | null
822
+ closed_at?: string | null
823
+ created_at?: string
824
+ custom_properties?: Json | null
825
+ due_date?: string | null
826
+ freshdesk_metadata?: Json | null
827
+ hubspot_metadata?: Json | null
828
+ is_deleted?: boolean
829
+ label_ids?: Json | null
830
+ last_updated_at?: string
831
+ org_id: string
832
+ priority?: number | null
833
+ quoted_message_id?: string | null
834
+ raised_by?: string | null
835
+ response_time?: number | null
838
836
  status?:
839
- | Database['public']['Enums']['enum_chat_tickets_status']
840
- | null;
841
- subject: string;
842
- ticket_id?: string;
843
- zohodesk_metadata?: Json | null;
844
- };
837
+ | Database["public"]["Enums"]["enum_chat_tickets_status"]
838
+ | null
839
+ subject: string
840
+ ticket_id?: string
841
+ zohodesk_metadata?: Json | null
842
+ }
845
843
  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;
844
+ assigned_by?: string | null
845
+ assignee?: string | null
846
+ chat_id?: string
847
+ close_ticket_metadata?: Json | null
848
+ closed_at?: string | null
849
+ created_at?: string
850
+ custom_properties?: Json | null
851
+ due_date?: string | null
852
+ freshdesk_metadata?: Json | null
853
+ hubspot_metadata?: Json | null
854
+ is_deleted?: boolean
855
+ label_ids?: Json | null
856
+ last_updated_at?: string
857
+ org_id?: string
858
+ priority?: number | null
859
+ quoted_message_id?: string | null
860
+ raised_by?: string | null
861
+ response_time?: number | null
864
862
  status?:
865
- | Database['public']['Enums']['enum_chat_tickets_status']
866
- | null;
867
- subject?: string;
868
- ticket_id?: string;
869
- zohodesk_metadata?: Json | null;
870
- };
863
+ | Database["public"]["Enums"]["enum_chat_tickets_status"]
864
+ | null
865
+ subject?: string
866
+ ticket_id?: string
867
+ zohodesk_metadata?: Json | null
868
+ }
871
869
  Relationships: [
872
870
  {
873
- foreignKeyName: 'tbl_chat_tickets_org_id_fkey';
874
- columns: ['org_id'];
875
- isOneToOne: false;
876
- referencedRelation: 'tbl_org';
877
- referencedColumns: ['org_id'];
871
+ foreignKeyName: "tbl_chat_tickets_org_id_fkey"
872
+ columns: ["org_id"]
873
+ isOneToOne: false
874
+ referencedRelation: "tbl_org"
875
+ referencedColumns: ["org_id"]
878
876
  },
879
877
  {
880
- foreignKeyName: 'tbl_chat_tickets_org_id_fkey';
881
- columns: ['org_id'];
882
- isOneToOne: false;
883
- referencedRelation: 'view_org';
884
- referencedColumns: ['org_id'];
878
+ foreignKeyName: "tbl_chat_tickets_org_id_fkey"
879
+ columns: ["org_id"]
880
+ isOneToOne: false
881
+ referencedRelation: "view_org"
882
+ referencedColumns: ["org_id"]
885
883
  },
886
- ];
887
- };
884
+ ]
885
+ }
888
886
  tbl_chats: {
889
887
  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
- };
888
+ archived: boolean | null
889
+ chat_id: string
890
+ chat_image: string | null
891
+ chat_name: string | null
892
+ chat_type: string | null
893
+ created_at: string
894
+ group_metadata: Json | null
895
+ id: Json | null
896
+ invite_link: string | null
897
+ is_exited: boolean | null
898
+ is_group: boolean | null
899
+ is_muted: boolean | null
900
+ is_read_only: boolean | null
901
+ latest_message: Json | null
902
+ member_count: number | null
903
+ mute_expiration: number | null
904
+ name: string | null
905
+ org_id: string
906
+ org_phone: string
907
+ pinned: boolean | null
908
+ timestamp: string | null
909
+ unread_count: number | null
910
+ updated_at: string
911
+ }
914
912
  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
- };
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
+ }
939
937
  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
- };
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
+ }
962
+ Relationships: []
963
+ }
966
964
  tbl_contacts: {
967
965
  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
- };
966
+ business_profile: Json | null
967
+ contact_color: Database["public"]["Enums"]["enum_chat_colors"] | null
968
+ contact_id: string
969
+ contact_image: string | null
970
+ contact_name: string | null
971
+ contact_type: string | null
972
+ id: Json | null
973
+ is_blocked: boolean | null
974
+ is_business: boolean | null
975
+ is_enterprise: boolean | null
976
+ is_group: boolean | null
977
+ is_imported: boolean | null
978
+ is_internal: boolean | null
979
+ is_me: boolean | null
980
+ is_my_contact: boolean | null
981
+ is_user: boolean | null
982
+ is_wa_contact: boolean | null
983
+ label_ids: Json
984
+ name: string | null
985
+ number: string | null
986
+ org_id: string
987
+ periskope_name: string | null
988
+ pushname: string | null
989
+ short_name: string | null
990
+ updated_at: string | null
991
+ verified_level: number | null
992
+ verified_name: string | null
993
+ }
996
994
  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
- };
995
+ business_profile?: Json | null
996
+ contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
997
+ contact_id: string
998
+ contact_image?: string | null
999
+ contact_name?: string | null
1000
+ contact_type?: string | null
1001
+ id?: Json | null
1002
+ is_blocked?: boolean | null
1003
+ is_business?: boolean | null
1004
+ is_enterprise?: boolean | null
1005
+ is_group?: boolean | null
1006
+ is_imported?: boolean | null
1007
+ is_internal?: boolean | null
1008
+ is_me?: boolean | null
1009
+ is_my_contact?: boolean | null
1010
+ is_user?: boolean | null
1011
+ is_wa_contact?: boolean | null
1012
+ label_ids?: Json
1013
+ name?: string | null
1014
+ number?: string | null
1015
+ org_id: string
1016
+ periskope_name?: string | null
1017
+ pushname?: string | null
1018
+ short_name?: string | null
1019
+ updated_at?: string | null
1020
+ verified_level?: number | null
1021
+ verified_name?: string | null
1022
+ }
1027
1023
  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
- };
1024
+ business_profile?: Json | null
1025
+ contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null
1026
+ contact_id?: string
1027
+ contact_image?: string | null
1028
+ contact_name?: string | null
1029
+ contact_type?: string | null
1030
+ id?: Json | null
1031
+ is_blocked?: boolean | null
1032
+ is_business?: boolean | null
1033
+ is_enterprise?: boolean | null
1034
+ is_group?: boolean | null
1035
+ is_imported?: boolean | null
1036
+ is_internal?: boolean | null
1037
+ is_me?: boolean | null
1038
+ is_my_contact?: boolean | null
1039
+ is_user?: boolean | null
1040
+ is_wa_contact?: boolean | null
1041
+ label_ids?: Json
1042
+ name?: string | null
1043
+ number?: string | null
1044
+ org_id?: string
1045
+ periskope_name?: string | null
1046
+ pushname?: string | null
1047
+ short_name?: string | null
1048
+ updated_at?: string | null
1049
+ verified_level?: number | null
1050
+ verified_name?: string | null
1051
+ }
1058
1052
  Relationships: [
1059
1053
  {
1060
- foreignKeyName: 'tbl_contacts_org_id_fkey';
1061
- columns: ['org_id'];
1062
- isOneToOne: false;
1063
- referencedRelation: 'tbl_org';
1064
- referencedColumns: ['org_id'];
1054
+ foreignKeyName: "tbl_contacts_org_id_fkey"
1055
+ columns: ["org_id"]
1056
+ isOneToOne: false
1057
+ referencedRelation: "tbl_org"
1058
+ referencedColumns: ["org_id"]
1065
1059
  },
1066
1060
  {
1067
- foreignKeyName: 'tbl_contacts_org_id_fkey';
1068
- columns: ['org_id'];
1069
- isOneToOne: false;
1070
- referencedRelation: 'view_org';
1071
- referencedColumns: ['org_id'];
1061
+ foreignKeyName: "tbl_contacts_org_id_fkey"
1062
+ columns: ["org_id"]
1063
+ isOneToOne: false
1064
+ referencedRelation: "view_org"
1065
+ referencedColumns: ["org_id"]
1072
1066
  },
1073
- ];
1074
- };
1067
+ ]
1068
+ }
1075
1069
  tbl_custom_properties: {
1076
1070
  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
- };
1071
+ created_at: string
1072
+ created_by: string | null
1073
+ org_id: string | null
1074
+ property_id: string
1075
+ property_name: string
1076
+ property_value: Json | null
1077
+ property_value_type: string | null
1078
+ type: string | null
1079
+ }
1086
1080
  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
- };
1081
+ created_at?: string
1082
+ created_by?: string | null
1083
+ org_id?: string | null
1084
+ property_id?: string
1085
+ property_name: string
1086
+ property_value?: Json | null
1087
+ property_value_type?: string | null
1088
+ type?: string | null
1089
+ }
1096
1090
  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
- };
1091
+ created_at?: string
1092
+ created_by?: string | null
1093
+ org_id?: string | null
1094
+ property_id?: string
1095
+ property_name?: string
1096
+ property_value?: Json | null
1097
+ property_value_type?: string | null
1098
+ type?: string | null
1099
+ }
1106
1100
  Relationships: [
1107
1101
  {
1108
- foreignKeyName: 'tbl_custom_properties_org_id_fkey';
1109
- columns: ['org_id'];
1110
- isOneToOne: false;
1111
- referencedRelation: 'tbl_org';
1112
- referencedColumns: ['org_id'];
1102
+ foreignKeyName: "tbl_custom_properties_org_id_fkey"
1103
+ columns: ["org_id"]
1104
+ isOneToOne: false
1105
+ referencedRelation: "tbl_org"
1106
+ referencedColumns: ["org_id"]
1113
1107
  },
1114
1108
  {
1115
- foreignKeyName: 'tbl_custom_properties_org_id_fkey';
1116
- columns: ['org_id'];
1117
- isOneToOne: false;
1118
- referencedRelation: 'view_org';
1119
- referencedColumns: ['org_id'];
1109
+ foreignKeyName: "tbl_custom_properties_org_id_fkey"
1110
+ columns: ["org_id"]
1111
+ isOneToOne: false
1112
+ referencedRelation: "view_org"
1113
+ referencedColumns: ["org_id"]
1120
1114
  },
1121
- ];
1122
- };
1115
+ ]
1116
+ }
1123
1117
  tbl_integration_hooks: {
1124
1118
  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
- };
1119
+ hook_url: string
1120
+ id: string
1121
+ integration_id: string | null
1122
+ integration_metadata: Json
1123
+ integration_name: Database["public"]["Enums"]["enum_integration_name"]
1124
+ integration_type: string
1125
+ is_subscribed: boolean
1126
+ org_id: string
1127
+ subscribed_at: string
1128
+ type: Database["public"]["Enums"]["enum_integration_type"]
1129
+ }
1136
1130
  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
- };
1131
+ hook_url: string
1132
+ id?: string
1133
+ integration_id?: string | null
1134
+ integration_metadata: Json
1135
+ integration_name: Database["public"]["Enums"]["enum_integration_name"]
1136
+ integration_type: string
1137
+ is_subscribed: boolean
1138
+ org_id: string
1139
+ subscribed_at?: string
1140
+ type: Database["public"]["Enums"]["enum_integration_type"]
1141
+ }
1148
1142
  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
- };
1143
+ hook_url?: string
1144
+ id?: string
1145
+ integration_id?: string | null
1146
+ integration_metadata?: Json
1147
+ integration_name?: Database["public"]["Enums"]["enum_integration_name"]
1148
+ integration_type?: string
1149
+ is_subscribed?: boolean
1150
+ org_id?: string
1151
+ subscribed_at?: string
1152
+ type?: Database["public"]["Enums"]["enum_integration_type"]
1153
+ }
1160
1154
  Relationships: [
1161
1155
  {
1162
- foreignKeyName: 'tbl_integration_hooks_org_id_fkey';
1163
- columns: ['org_id'];
1164
- isOneToOne: false;
1165
- referencedRelation: 'tbl_org';
1166
- referencedColumns: ['org_id'];
1156
+ foreignKeyName: "tbl_integration_hooks_org_id_fkey"
1157
+ columns: ["org_id"]
1158
+ isOneToOne: false
1159
+ referencedRelation: "tbl_org"
1160
+ referencedColumns: ["org_id"]
1167
1161
  },
1168
1162
  {
1169
- foreignKeyName: 'tbl_integration_hooks_org_id_fkey';
1170
- columns: ['org_id'];
1171
- isOneToOne: false;
1172
- referencedRelation: 'view_org';
1173
- referencedColumns: ['org_id'];
1163
+ foreignKeyName: "tbl_integration_hooks_org_id_fkey"
1164
+ columns: ["org_id"]
1165
+ isOneToOne: false
1166
+ referencedRelation: "view_org"
1167
+ referencedColumns: ["org_id"]
1174
1168
  },
1175
- ];
1176
- };
1169
+ ]
1170
+ }
1177
1171
  tbl_integration_logs: {
1178
1172
  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
- };
1173
+ created_at: string
1174
+ id: string
1175
+ integration_name: Database["public"]["Enums"]["enum_integration_name"]
1176
+ integration_type: string
1177
+ metadata: Json
1178
+ org_id: string
1179
+ response: Json | null
1180
+ success: boolean
1181
+ type: Database["public"]["Enums"]["enum_integration_type"]
1182
+ }
1189
1183
  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
- };
1184
+ created_at?: string
1185
+ id?: string
1186
+ integration_name: Database["public"]["Enums"]["enum_integration_name"]
1187
+ integration_type: string
1188
+ metadata?: Json
1189
+ org_id: string
1190
+ response?: Json | null
1191
+ success?: boolean
1192
+ type: Database["public"]["Enums"]["enum_integration_type"]
1193
+ }
1200
1194
  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
- };
1195
+ created_at?: string
1196
+ id?: string
1197
+ integration_name?: Database["public"]["Enums"]["enum_integration_name"]
1198
+ integration_type?: string
1199
+ metadata?: Json
1200
+ org_id?: string
1201
+ response?: Json | null
1202
+ success?: boolean
1203
+ type?: Database["public"]["Enums"]["enum_integration_type"]
1204
+ }
1211
1205
  Relationships: [
1212
1206
  {
1213
- foreignKeyName: 'tbl_integration_logs_org_id_fkey';
1214
- columns: ['org_id'];
1215
- isOneToOne: false;
1216
- referencedRelation: 'tbl_org';
1217
- referencedColumns: ['org_id'];
1207
+ foreignKeyName: "tbl_integration_logs_org_id_fkey"
1208
+ columns: ["org_id"]
1209
+ isOneToOne: false
1210
+ referencedRelation: "tbl_org"
1211
+ referencedColumns: ["org_id"]
1218
1212
  },
1219
1213
  {
1220
- foreignKeyName: 'tbl_integration_logs_org_id_fkey';
1221
- columns: ['org_id'];
1222
- isOneToOne: false;
1223
- referencedRelation: 'view_org';
1224
- referencedColumns: ['org_id'];
1214
+ foreignKeyName: "tbl_integration_logs_org_id_fkey"
1215
+ columns: ["org_id"]
1216
+ isOneToOne: false
1217
+ referencedRelation: "view_org"
1218
+ referencedColumns: ["org_id"]
1225
1219
  },
1226
- ];
1227
- };
1220
+ ]
1221
+ }
1228
1222
  tbl_integration_tokens: {
1229
1223
  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
- };
1224
+ exp: string
1225
+ iat: string
1226
+ id: string
1227
+ is_revealed: boolean
1228
+ name: string
1229
+ org_id: string
1230
+ role: string
1231
+ token: string
1232
+ token_metadata: Json | null
1233
+ type: Database["public"]["Enums"]["enum_integration_type"]
1234
+ }
1241
1235
  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
- };
1236
+ exp: string
1237
+ iat: string
1238
+ id?: string
1239
+ is_revealed?: boolean
1240
+ name: string
1241
+ org_id: string
1242
+ role: string
1243
+ token: string
1244
+ token_metadata?: Json | null
1245
+ type: Database["public"]["Enums"]["enum_integration_type"]
1246
+ }
1253
1247
  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
- };
1248
+ exp?: string
1249
+ iat?: string
1250
+ id?: string
1251
+ is_revealed?: boolean
1252
+ name?: string
1253
+ org_id?: string
1254
+ role?: string
1255
+ token?: string
1256
+ token_metadata?: Json | null
1257
+ type?: Database["public"]["Enums"]["enum_integration_type"]
1258
+ }
1265
1259
  Relationships: [
1266
1260
  {
1267
- foreignKeyName: 'public_tbl_integration_tokens_org_id_fkey';
1268
- columns: ['org_id'];
1269
- isOneToOne: false;
1270
- referencedRelation: 'tbl_org';
1271
- referencedColumns: ['org_id'];
1261
+ foreignKeyName: "public_tbl_integration_tokens_org_id_fkey"
1262
+ columns: ["org_id"]
1263
+ isOneToOne: false
1264
+ referencedRelation: "tbl_org"
1265
+ referencedColumns: ["org_id"]
1272
1266
  },
1273
1267
  {
1274
- foreignKeyName: 'public_tbl_integration_tokens_org_id_fkey';
1275
- columns: ['org_id'];
1276
- isOneToOne: false;
1277
- referencedRelation: 'view_org';
1278
- referencedColumns: ['org_id'];
1268
+ foreignKeyName: "public_tbl_integration_tokens_org_id_fkey"
1269
+ columns: ["org_id"]
1270
+ isOneToOne: false
1271
+ referencedRelation: "view_org"
1272
+ referencedColumns: ["org_id"]
1279
1273
  },
1280
- ];
1281
- };
1274
+ ]
1275
+ }
1282
1276
  tbl_org: {
1283
1277
  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
- };
1278
+ created_at: string
1279
+ org_id: string
1280
+ org_image: string | null
1281
+ org_metadata: Json | null
1282
+ org_name: string | null
1283
+ org_plan: Json | null
1284
+ stripe_customer_details: Json | null
1285
+ stripe_customer_id: string | null
1286
+ stripe_subscription_details: Json | null
1287
+ support_link: string | null
1288
+ }
1295
1289
  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
- };
1290
+ created_at?: string
1291
+ org_id?: string
1292
+ org_image?: string | null
1293
+ org_metadata?: Json | null
1294
+ org_name?: string | null
1295
+ org_plan?: Json | null
1296
+ stripe_customer_details?: Json | null
1297
+ stripe_customer_id?: string | null
1298
+ stripe_subscription_details?: Json | null
1299
+ support_link?: string | null
1300
+ }
1307
1301
  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
- };
1302
+ created_at?: string
1303
+ org_id?: string
1304
+ org_image?: string | null
1305
+ org_metadata?: Json | null
1306
+ org_name?: string | null
1307
+ org_plan?: Json | null
1308
+ stripe_customer_details?: Json | null
1309
+ stripe_customer_id?: string | null
1310
+ stripe_subscription_details?: Json | null
1311
+ support_link?: string | null
1312
+ }
1313
+ Relationships: []
1314
+ }
1321
1315
  tbl_org_labels: {
1322
1316
  Row: {
1323
- color: string;
1324
- created_at: string;
1325
- label_id: string;
1326
- name: string;
1327
- org_id: string;
1328
- type: string;
1329
- };
1317
+ color: string
1318
+ created_at: string
1319
+ label_id: string
1320
+ name: string
1321
+ org_id: string
1322
+ type: string
1323
+ }
1330
1324
  Insert: {
1331
- color?: string;
1332
- created_at?: string;
1333
- label_id?: string;
1334
- name: string;
1335
- org_id: string;
1336
- type?: string;
1337
- };
1325
+ color?: string
1326
+ created_at?: string
1327
+ label_id?: string
1328
+ name: string
1329
+ org_id: string
1330
+ type?: string
1331
+ }
1338
1332
  Update: {
1339
- color?: string;
1340
- created_at?: string;
1341
- label_id?: string;
1342
- name?: string;
1343
- org_id?: string;
1344
- type?: string;
1345
- };
1333
+ color?: string
1334
+ created_at?: string
1335
+ label_id?: string
1336
+ name?: string
1337
+ org_id?: string
1338
+ type?: string
1339
+ }
1346
1340
  Relationships: [
1347
1341
  {
1348
- foreignKeyName: 'tbl_org_labels_org_id_fkey';
1349
- columns: ['org_id'];
1350
- isOneToOne: false;
1351
- referencedRelation: 'tbl_org';
1352
- referencedColumns: ['org_id'];
1342
+ foreignKeyName: "tbl_org_labels_org_id_fkey"
1343
+ columns: ["org_id"]
1344
+ isOneToOne: false
1345
+ referencedRelation: "tbl_org"
1346
+ referencedColumns: ["org_id"]
1353
1347
  },
1354
1348
  {
1355
- foreignKeyName: 'tbl_org_labels_org_id_fkey';
1356
- columns: ['org_id'];
1357
- isOneToOne: false;
1358
- referencedRelation: 'view_org';
1359
- referencedColumns: ['org_id'];
1349
+ foreignKeyName: "tbl_org_labels_org_id_fkey"
1350
+ columns: ["org_id"]
1351
+ isOneToOne: false
1352
+ referencedRelation: "view_org"
1353
+ referencedColumns: ["org_id"]
1360
1354
  },
1361
- ];
1362
- };
1355
+ ]
1356
+ }
1363
1357
  tbl_org_members: {
1364
1358
  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
- };
1359
+ created_at: string | null
1360
+ email: string
1361
+ invited_at: string | null
1362
+ invited_by: string | null
1363
+ is_active: boolean
1364
+ is_owner: boolean | null
1365
+ label_ids: string[] | null
1366
+ member_color: Database["public"]["Enums"]["enum_chat_colors"]
1367
+ member_image: string | null
1368
+ member_name: string | null
1369
+ org_id: string
1370
+ org_phones: string[] | null
1371
+ preferences: Json
1372
+ role: Database["public"]["Enums"]["enum_member_role"]
1373
+ user_id: string | null
1374
+ }
1381
1375
  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
- };
1376
+ created_at?: string | null
1377
+ email: string
1378
+ invited_at?: string | null
1379
+ invited_by?: string | null
1380
+ is_active?: boolean
1381
+ is_owner?: boolean | null
1382
+ label_ids?: string[] | null
1383
+ member_color?: Database["public"]["Enums"]["enum_chat_colors"]
1384
+ member_image?: string | null
1385
+ member_name?: string | null
1386
+ org_id: string
1387
+ org_phones?: string[] | null
1388
+ preferences?: Json
1389
+ role?: Database["public"]["Enums"]["enum_member_role"]
1390
+ user_id?: string | null
1391
+ }
1398
1392
  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
- };
1393
+ created_at?: string | null
1394
+ email?: string
1395
+ invited_at?: string | null
1396
+ invited_by?: string | null
1397
+ is_active?: boolean
1398
+ is_owner?: boolean | null
1399
+ label_ids?: string[] | null
1400
+ member_color?: Database["public"]["Enums"]["enum_chat_colors"]
1401
+ member_image?: string | null
1402
+ member_name?: string | null
1403
+ org_id?: string
1404
+ org_phones?: string[] | null
1405
+ preferences?: Json
1406
+ role?: Database["public"]["Enums"]["enum_member_role"]
1407
+ user_id?: string | null
1408
+ }
1415
1409
  Relationships: [
1416
1410
  {
1417
- foreignKeyName: 'tbl_org_members_fkey_auth_users';
1418
- columns: ['user_id'];
1419
- isOneToOne: false;
1420
- referencedRelation: 'users';
1421
- referencedColumns: ['id'];
1411
+ foreignKeyName: "tbl_org_members_fkey_auth_users"
1412
+ columns: ["user_id"]
1413
+ isOneToOne: false
1414
+ referencedRelation: "users"
1415
+ referencedColumns: ["id"]
1422
1416
  },
1423
1417
  {
1424
- foreignKeyName: 'tbl_org_members_fkey_tbl_org';
1425
- columns: ['org_id'];
1426
- isOneToOne: false;
1427
- referencedRelation: 'tbl_org';
1428
- referencedColumns: ['org_id'];
1418
+ foreignKeyName: "tbl_org_members_fkey_tbl_org"
1419
+ columns: ["org_id"]
1420
+ isOneToOne: false
1421
+ referencedRelation: "tbl_org"
1422
+ referencedColumns: ["org_id"]
1429
1423
  },
1430
1424
  {
1431
- foreignKeyName: 'tbl_org_members_fkey_tbl_org';
1432
- columns: ['org_id'];
1433
- isOneToOne: false;
1434
- referencedRelation: 'view_org';
1435
- referencedColumns: ['org_id'];
1425
+ foreignKeyName: "tbl_org_members_fkey_tbl_org"
1426
+ columns: ["org_id"]
1427
+ isOneToOne: false
1428
+ referencedRelation: "view_org"
1429
+ referencedColumns: ["org_id"]
1436
1430
  },
1437
- ];
1438
- };
1431
+ ]
1432
+ }
1439
1433
  tbl_org_phones: {
1440
1434
  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
- };
1435
+ created_at: string
1436
+ first_connected_at: string | null
1437
+ is_browser_open: boolean
1438
+ is_ready: boolean | null
1439
+ legacy_version: boolean | null
1440
+ library: string | null
1441
+ org_id: string
1442
+ org_phone: string | null
1443
+ phone_id: string
1444
+ phone_image: string | null
1445
+ phone_name: string | null
1446
+ phone_state: Json | null
1447
+ qr_code: string | null
1448
+ server_image: string | null
1449
+ server_ip: string | null
1450
+ soft_restart: boolean
1451
+ updated_at: string | null
1452
+ wa_state: string | null
1453
+ wa_version: string | null
1454
+ }
1461
1455
  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
- };
1456
+ created_at?: string
1457
+ first_connected_at?: string | null
1458
+ is_browser_open?: boolean
1459
+ is_ready?: boolean | null
1460
+ legacy_version?: boolean | null
1461
+ library?: string | null
1462
+ org_id: string
1463
+ org_phone?: string | null
1464
+ phone_id?: string
1465
+ phone_image?: string | null
1466
+ phone_name?: string | null
1467
+ phone_state?: Json | null
1468
+ qr_code?: string | null
1469
+ server_image?: string | null
1470
+ server_ip?: string | null
1471
+ soft_restart?: boolean
1472
+ updated_at?: string | null
1473
+ wa_state?: string | null
1474
+ wa_version?: string | null
1475
+ }
1482
1476
  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
- };
1477
+ created_at?: string
1478
+ first_connected_at?: string | null
1479
+ is_browser_open?: boolean
1480
+ is_ready?: boolean | null
1481
+ legacy_version?: boolean | null
1482
+ library?: string | null
1483
+ org_id?: string
1484
+ org_phone?: string | null
1485
+ phone_id?: string
1486
+ phone_image?: string | null
1487
+ phone_name?: string | null
1488
+ phone_state?: Json | null
1489
+ qr_code?: string | null
1490
+ server_image?: string | null
1491
+ server_ip?: string | null
1492
+ soft_restart?: boolean
1493
+ updated_at?: string | null
1494
+ wa_state?: string | null
1495
+ wa_version?: string | null
1496
+ }
1503
1497
  Relationships: [
1504
1498
  {
1505
- foreignKeyName: 'tbl_org_phones_fkey_tbl_org';
1506
- columns: ['org_id'];
1507
- isOneToOne: false;
1508
- referencedRelation: 'tbl_org';
1509
- referencedColumns: ['org_id'];
1499
+ foreignKeyName: "tbl_org_phones_fkey_tbl_org"
1500
+ columns: ["org_id"]
1501
+ isOneToOne: false
1502
+ referencedRelation: "tbl_org"
1503
+ referencedColumns: ["org_id"]
1510
1504
  },
1511
1505
  {
1512
- foreignKeyName: 'tbl_org_phones_fkey_tbl_org';
1513
- columns: ['org_id'];
1514
- isOneToOne: false;
1515
- referencedRelation: 'view_org';
1516
- referencedColumns: ['org_id'];
1506
+ foreignKeyName: "tbl_org_phones_fkey_tbl_org"
1507
+ columns: ["org_id"]
1508
+ isOneToOne: false
1509
+ referencedRelation: "view_org"
1510
+ referencedColumns: ["org_id"]
1517
1511
  },
1518
1512
  {
1519
- foreignKeyName: 'tbl_org_phones_org_id_fkey';
1520
- columns: ['org_id'];
1521
- isOneToOne: false;
1522
- referencedRelation: 'tbl_org';
1523
- referencedColumns: ['org_id'];
1513
+ foreignKeyName: "tbl_org_phones_org_id_fkey"
1514
+ columns: ["org_id"]
1515
+ isOneToOne: false
1516
+ referencedRelation: "tbl_org"
1517
+ referencedColumns: ["org_id"]
1524
1518
  },
1525
1519
  {
1526
- foreignKeyName: 'tbl_org_phones_org_id_fkey';
1527
- columns: ['org_id'];
1528
- isOneToOne: false;
1529
- referencedRelation: 'view_org';
1530
- referencedColumns: ['org_id'];
1520
+ foreignKeyName: "tbl_org_phones_org_id_fkey"
1521
+ columns: ["org_id"]
1522
+ isOneToOne: false
1523
+ referencedRelation: "view_org"
1524
+ referencedColumns: ["org_id"]
1531
1525
  },
1532
- ];
1533
- };
1526
+ ]
1527
+ }
1534
1528
  tbl_org_transactions: {
1535
1529
  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
- };
1530
+ amount: number
1531
+ is_top_up: boolean | null
1532
+ org_id: string
1533
+ timestamp: string | null
1534
+ transaction_id: string
1535
+ transaction_metadata: Json | null
1536
+ transaction_type: Database["public"]["Enums"]["enum_credit_transaction_type"]
1537
+ usage_metadata: Json | null
1538
+ }
1545
1539
  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
- };
1540
+ amount: number
1541
+ is_top_up?: boolean | null
1542
+ org_id: string
1543
+ timestamp?: string | null
1544
+ transaction_id?: string
1545
+ transaction_metadata?: Json | null
1546
+ transaction_type: Database["public"]["Enums"]["enum_credit_transaction_type"]
1547
+ usage_metadata?: Json | null
1548
+ }
1555
1549
  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
- };
1550
+ amount?: number
1551
+ is_top_up?: boolean | null
1552
+ org_id?: string
1553
+ timestamp?: string | null
1554
+ transaction_id?: string
1555
+ transaction_metadata?: Json | null
1556
+ transaction_type?: Database["public"]["Enums"]["enum_credit_transaction_type"]
1557
+ usage_metadata?: Json | null
1558
+ }
1559
+ Relationships: []
1560
+ }
1567
1561
  tbl_quick_replies: {
1568
1562
  Row: {
1569
- command: string | null;
1570
- created_at: string;
1571
- message_payload: Json | null;
1572
- org_id: string;
1573
- reply_id: string;
1574
- };
1563
+ command: string | null
1564
+ created_at: string
1565
+ message_payload: Json | null
1566
+ org_id: string
1567
+ reply_id: string
1568
+ }
1575
1569
  Insert: {
1576
- command?: string | null;
1577
- created_at?: string;
1578
- message_payload?: Json | null;
1579
- org_id: string;
1580
- reply_id?: string;
1581
- };
1570
+ command?: string | null
1571
+ created_at?: string
1572
+ message_payload?: Json | null
1573
+ org_id: string
1574
+ reply_id?: string
1575
+ }
1582
1576
  Update: {
1583
- command?: string | null;
1584
- created_at?: string;
1585
- message_payload?: Json | null;
1586
- org_id?: string;
1587
- reply_id?: string;
1588
- };
1577
+ command?: string | null
1578
+ created_at?: string
1579
+ message_payload?: Json | null
1580
+ org_id?: string
1581
+ reply_id?: string
1582
+ }
1589
1583
  Relationships: [
1590
1584
  {
1591
- foreignKeyName: 'tbl_quick_replies_org_id_fkey';
1592
- columns: ['org_id'];
1593
- isOneToOne: false;
1594
- referencedRelation: 'tbl_org';
1595
- referencedColumns: ['org_id'];
1585
+ foreignKeyName: "tbl_quick_replies_org_id_fkey"
1586
+ columns: ["org_id"]
1587
+ isOneToOne: false
1588
+ referencedRelation: "tbl_org"
1589
+ referencedColumns: ["org_id"]
1596
1590
  },
1597
1591
  {
1598
- foreignKeyName: 'tbl_quick_replies_org_id_fkey';
1599
- columns: ['org_id'];
1600
- isOneToOne: false;
1601
- referencedRelation: 'view_org';
1602
- referencedColumns: ['org_id'];
1592
+ foreignKeyName: "tbl_quick_replies_org_id_fkey"
1593
+ columns: ["org_id"]
1594
+ isOneToOne: false
1595
+ referencedRelation: "view_org"
1596
+ referencedColumns: ["org_id"]
1603
1597
  },
1604
- ];
1605
- };
1598
+ ]
1599
+ }
1606
1600
  tbl_scheduled_messages: {
1607
1601
  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
- };
1602
+ chat_id: string
1603
+ created_at: string
1604
+ message_id: string | null
1605
+ message_payload: Json | null
1606
+ org_id: string
1607
+ org_phone: string | null
1608
+ performed_by: string | null
1609
+ scheduled_at: string
1610
+ sent_message_id: string
1611
+ status: boolean | null
1612
+ updated_at: string | null
1613
+ }
1620
1614
  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
- };
1615
+ chat_id: string
1616
+ created_at?: string
1617
+ message_id?: string | null
1618
+ message_payload?: Json | null
1619
+ org_id: string
1620
+ org_phone?: string | null
1621
+ performed_by?: string | null
1622
+ scheduled_at: string
1623
+ sent_message_id: string
1624
+ status?: boolean | null
1625
+ updated_at?: string | null
1626
+ }
1633
1627
  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
- };
1628
+ chat_id?: string
1629
+ created_at?: string
1630
+ message_id?: string | null
1631
+ message_payload?: Json | null
1632
+ org_id?: string
1633
+ org_phone?: string | null
1634
+ performed_by?: string | null
1635
+ scheduled_at?: string
1636
+ sent_message_id?: string
1637
+ status?: boolean | null
1638
+ updated_at?: string | null
1639
+ }
1646
1640
  Relationships: [
1647
1641
  {
1648
- foreignKeyName: 'tbl_scheduled_messages_org_id_fkey';
1649
- columns: ['org_id'];
1650
- isOneToOne: false;
1651
- referencedRelation: 'tbl_org';
1652
- referencedColumns: ['org_id'];
1642
+ foreignKeyName: "tbl_scheduled_messages_org_id_fkey"
1643
+ columns: ["org_id"]
1644
+ isOneToOne: false
1645
+ referencedRelation: "tbl_org"
1646
+ referencedColumns: ["org_id"]
1653
1647
  },
1654
1648
  {
1655
- foreignKeyName: 'tbl_scheduled_messages_org_id_fkey';
1656
- columns: ['org_id'];
1657
- isOneToOne: false;
1658
- referencedRelation: 'view_org';
1659
- referencedColumns: ['org_id'];
1649
+ foreignKeyName: "tbl_scheduled_messages_org_id_fkey"
1650
+ columns: ["org_id"]
1651
+ isOneToOne: false
1652
+ referencedRelation: "view_org"
1653
+ referencedColumns: ["org_id"]
1660
1654
  },
1661
- ];
1662
- };
1655
+ ]
1656
+ }
1663
1657
  tbl_tools_whatsapp_links: {
1664
1658
  Row: {
1665
- created_at: string;
1666
- link_id: string;
1667
- link_name: string;
1668
- message: string | null;
1669
- phone: string;
1670
- };
1659
+ created_at: string
1660
+ link_id: string
1661
+ link_name: string
1662
+ message: string | null
1663
+ phone: string
1664
+ }
1671
1665
  Insert: {
1672
- created_at?: string;
1673
- link_id?: string;
1674
- link_name: string;
1675
- message?: string | null;
1676
- phone: string;
1677
- };
1666
+ created_at?: string
1667
+ link_id?: string
1668
+ link_name: string
1669
+ message?: string | null
1670
+ phone: string
1671
+ }
1678
1672
  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
- };
1673
+ created_at?: string
1674
+ link_id?: string
1675
+ link_name?: string
1676
+ message?: string | null
1677
+ phone?: string
1678
+ }
1679
+ Relationships: []
1680
+ }
1681
+ }
1688
1682
  Views: {
1689
1683
  view_broadcast_logs: {
1690
1684
  Row: {
1691
- broadcast_id: string | null;
1685
+ broadcast_id: string | null
1692
1686
  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
- };
1687
+ | Database["public"]["Enums"]["enum_broadcast_status"]
1688
+ | null
1689
+ created_at: string | null
1690
+ delivered_percentage: number | null
1691
+ failed_chats: number | null
1692
+ message_payload: Json | null
1693
+ org_id: string | null
1694
+ pending_chats: number | null
1695
+ performed_at: string | null
1696
+ performed_by: string | null
1697
+ read_percentage: number | null
1698
+ scheduled_at: string | null
1699
+ sent_chats: number | null
1700
+ total_chats: number | null
1701
+ total_delivered_count: number | null
1702
+ total_member_count: number | null
1703
+ total_read_count: number | null
1704
+ }
1711
1705
  Relationships: [
1712
1706
  {
1713
- foreignKeyName: 'tbl_broadcast_messages_org_id_fkey';
1714
- columns: ['org_id'];
1715
- isOneToOne: false;
1716
- referencedRelation: 'tbl_org';
1717
- referencedColumns: ['org_id'];
1707
+ foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
1708
+ columns: ["org_id"]
1709
+ isOneToOne: false
1710
+ referencedRelation: "tbl_org"
1711
+ referencedColumns: ["org_id"]
1718
1712
  },
1719
1713
  {
1720
- foreignKeyName: 'tbl_broadcast_messages_org_id_fkey';
1721
- columns: ['org_id'];
1722
- isOneToOne: false;
1723
- referencedRelation: 'view_org';
1724
- referencedColumns: ['org_id'];
1714
+ foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
1715
+ columns: ["org_id"]
1716
+ isOneToOne: false
1717
+ referencedRelation: "view_org"
1718
+ referencedColumns: ["org_id"]
1725
1719
  },
1726
- ];
1727
- };
1720
+ ]
1721
+ }
1728
1722
  view_chat_logs: {
1729
1723
  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
- };
1724
+ action: string | null
1725
+ failed: number | null
1726
+ operation_id: string | null
1727
+ org_id: string | null
1728
+ pending: number | null
1729
+ performed_at: string | null
1730
+ performed_by: string | null
1731
+ success: number | null
1732
+ total_chats: number | null
1733
+ total_logs: number | null
1734
+ total_participants: number | null
1735
+ }
1742
1736
  Relationships: [
1743
1737
  {
1744
- foreignKeyName: 'tbl_chat_logs_org_id_fkey';
1745
- columns: ['org_id'];
1746
- isOneToOne: false;
1747
- referencedRelation: 'tbl_org';
1748
- referencedColumns: ['org_id'];
1738
+ foreignKeyName: "tbl_chat_logs_org_id_fkey"
1739
+ columns: ["org_id"]
1740
+ isOneToOne: false
1741
+ referencedRelation: "tbl_org"
1742
+ referencedColumns: ["org_id"]
1749
1743
  },
1750
1744
  {
1751
- foreignKeyName: 'tbl_chat_logs_org_id_fkey';
1752
- columns: ['org_id'];
1753
- isOneToOne: false;
1754
- referencedRelation: 'view_org';
1755
- referencedColumns: ['org_id'];
1745
+ foreignKeyName: "tbl_chat_logs_org_id_fkey"
1746
+ columns: ["org_id"]
1747
+ isOneToOne: false
1748
+ referencedRelation: "view_org"
1749
+ referencedColumns: ["org_id"]
1756
1750
  },
1757
- ];
1758
- };
1751
+ ]
1752
+ }
1759
1753
  view_chats: {
1760
1754
  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
- };
1755
+ assigned_to: string | null
1756
+ chat_access: Json | null
1757
+ chat_id: string | null
1758
+ chat_image: string | null
1759
+ chat_name: string | null
1760
+ chat_org_phones: string[] | null
1761
+ chat_type: string | null
1762
+ created_at: string | null
1763
+ custom_properties: Json | null
1764
+ flag_count: number | null
1765
+ flag_count_map: Json | null
1766
+ group_description: string | null
1767
+ hubspot_metadata: Json | null
1768
+ info_admins_only: boolean | null
1769
+ invite_link: string | null
1770
+ is_archived: boolean | null
1771
+ is_exited: boolean | null
1772
+ is_muted: boolean | null
1773
+ label_ids: Json | null
1774
+ last_read_timestamp: string | null
1775
+ latest_message: Json | null
1776
+ member_add_mode: string | null
1777
+ member_count: number | null
1778
+ message_unread_count: number | null
1779
+ messages_admins_only: boolean | null
1780
+ org_id: string | null
1781
+ org_phone: string | null
1782
+ updated_at: string | null
1783
+ }
1784
+ Relationships: []
1785
+ }
1792
1786
  view_org: {
1793
1787
  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
- };
1788
+ access_scopes: Json | null
1789
+ created_at: string | null
1790
+ is_enterprise: boolean | null
1791
+ is_free_trial: boolean | null
1792
+ is_freshdesk_connected: boolean | null
1793
+ is_hubspot_connected: boolean | null
1794
+ is_zohodesk_connected: boolean | null
1795
+ org_id: string | null
1796
+ org_image: string | null
1797
+ org_metadata: Json | null
1798
+ org_name: string | null
1799
+ org_plan: Json | null
1800
+ pending_days: number | null
1801
+ phone_limit: string | null
1802
+ plan_id: string | null
1803
+ stripe_customer_details: Json | null
1804
+ stripe_customer_id: string | null
1805
+ stripe_subscription_details: Json | null
1806
+ subscription_status: string | null
1807
+ support_link: string | null
1808
+ user_limit: string | null
1809
+ }
1816
1810
  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
- };
1811
+ access_scopes?: never
1812
+ created_at?: string | null
1813
+ is_enterprise?: never
1814
+ is_free_trial?: never
1815
+ is_freshdesk_connected?: never
1816
+ is_hubspot_connected?: never
1817
+ is_zohodesk_connected?: never
1818
+ org_id?: string | null
1819
+ org_image?: string | null
1820
+ org_metadata?: Json | null
1821
+ org_name?: string | null
1822
+ org_plan?: Json | null
1823
+ pending_days?: never
1824
+ phone_limit?: never
1825
+ plan_id?: never
1826
+ stripe_customer_details?: Json | null
1827
+ stripe_customer_id?: string | null
1828
+ stripe_subscription_details?: Json | null
1829
+ subscription_status?: never
1830
+ support_link?: string | null
1831
+ user_limit?: never
1832
+ }
1839
1833
  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
- };
1834
+ access_scopes?: never
1835
+ created_at?: string | null
1836
+ is_enterprise?: never
1837
+ is_free_trial?: never
1838
+ is_freshdesk_connected?: never
1839
+ is_hubspot_connected?: never
1840
+ is_zohodesk_connected?: never
1841
+ org_id?: string | null
1842
+ org_image?: string | null
1843
+ org_metadata?: Json | null
1844
+ org_name?: string | null
1845
+ org_plan?: Json | null
1846
+ pending_days?: never
1847
+ phone_limit?: never
1848
+ plan_id?: never
1849
+ stripe_customer_details?: Json | null
1850
+ stripe_customer_id?: string | null
1851
+ stripe_subscription_details?: Json | null
1852
+ subscription_status?: never
1853
+ support_link?: string | null
1854
+ user_limit?: never
1855
+ }
1856
+ Relationships: []
1857
+ }
1858
+ }
1865
1859
  Functions: {
1866
1860
  create_partition: {
1867
1861
  Args: {
1868
- org_id_input: string;
1869
- };
1870
- Returns: boolean;
1871
- };
1862
+ org_id_input: string
1863
+ }
1864
+ Returns: boolean
1865
+ }
1872
1866
  custom_access_token_hook: {
1873
1867
  Args: {
1874
- event: Json;
1875
- };
1876
- Returns: Json;
1877
- };
1868
+ event: Json
1869
+ }
1870
+ Returns: Json
1871
+ }
1878
1872
  drop_partition: {
1879
1873
  Args: {
1880
- org_id_input: string;
1881
- };
1882
- Returns: boolean;
1883
- };
1874
+ org_id_input: string
1875
+ }
1876
+ Returns: boolean
1877
+ }
1884
1878
  gen_id: {
1885
1879
  Args: {
1886
- prefix: string;
1887
- size?: number;
1888
- alphabet?: string;
1889
- };
1890
- Returns: string;
1891
- };
1880
+ prefix: string
1881
+ size?: number
1882
+ alphabet?: string
1883
+ }
1884
+ Returns: string
1885
+ }
1892
1886
  gen_ticket_id: {
1893
1887
  Args: {
1894
- org_id_input: string;
1895
- };
1896
- Returns: string;
1897
- };
1888
+ org_id_input: string
1889
+ }
1890
+ Returns: string
1891
+ }
1898
1892
  generate_access_token: {
1899
1893
  Args: {
1900
- name_input?: string;
1901
- type_input?: Database['public']['Enums']['enum_integration_type'];
1902
- org_id_input?: string;
1903
- };
1904
- Returns: Json;
1905
- };
1894
+ name_input?: string
1895
+ type_input?: Database["public"]["Enums"]["enum_integration_type"]
1896
+ org_id_input?: string
1897
+ }
1898
+ Returns: Json
1899
+ }
1906
1900
  get_api_auth_details: {
1907
1901
  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
- };
1902
+ org_id_input?: string
1903
+ org_phone_input?: string
1904
+ token_id_input?: string
1905
+ token_type_input?: Database["public"]["Enums"]["enum_integration_type"]
1906
+ }
1907
+ Returns: Json
1908
+ }
1915
1909
  get_chat_labels_data: {
1916
1910
  Args: {
1917
- org_id_input: string;
1918
- chat_ids_input?: string[];
1919
- };
1920
- Returns: Json[];
1921
- };
1922
- get_chat_rule_info: {
1923
- Args: {
1924
- chat_id_input: string;
1925
- org_id_input: string;
1926
- org_phone_input: string;
1927
- };
1928
- Returns: Json;
1929
- };
1911
+ org_id_input: string
1912
+ chat_ids_input?: string[]
1913
+ }
1914
+ Returns: Json[]
1915
+ }
1930
1916
  get_chats: {
1931
1917
  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
- };
1918
+ org_id_input: string
1919
+ chat_id_input?: string[]
1920
+ with_members?: boolean
1921
+ last_updated_at?: string
1922
+ batch_limit?: number
1923
+ batch_offset?: number
1924
+ }
1925
+ Returns: Json
1926
+ }
1941
1927
  get_chats_info: {
1942
1928
  Args: {
1943
- chat_id_input: string;
1944
- org_id_input: string;
1945
- org_phone_input?: string;
1946
- };
1947
- Returns: Json;
1948
- };
1929
+ chat_id_input: string
1930
+ org_id_input: string
1931
+ org_phone_input?: string
1932
+ }
1933
+ Returns: Json
1934
+ }
1949
1935
  get_contacts: {
1950
1936
  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
- };
1937
+ org_id_input: string
1938
+ contact_ids_input?: string[]
1939
+ sync_phone_contacts?: boolean
1940
+ search_input?: string
1941
+ label_ids_input?: string[]
1942
+ is_internal_input?: boolean
1943
+ offset_input?: number
1944
+ limit_input?: number
1945
+ }
1946
+ Returns: Json
1947
+ }
1962
1948
  get_export_chats_data: {
1963
1949
  Args: {
1964
- org_id_input: string;
1965
- chat_id_input?: string[];
1966
- };
1967
- Returns: Json;
1968
- };
1950
+ org_id_input: string
1951
+ chat_id_input?: string[]
1952
+ }
1953
+ Returns: Json
1954
+ }
1969
1955
  get_export_tickets_data: {
1970
1956
  Args: {
1971
- org_id_input: string;
1972
- ticket_id_input?: string[];
1973
- };
1974
- Returns: Json;
1975
- };
1957
+ org_id_input: string
1958
+ ticket_id_input?: string[]
1959
+ }
1960
+ Returns: Json
1961
+ }
1976
1962
  get_integration_data: {
1977
1963
  Args: {
1978
- org_id_input?: string;
1979
- };
1980
- Returns: Json;
1981
- };
1982
- get_message_rule_info: {
1983
- Args: {
1984
- message_id_input: string;
1985
- chat_id_input: string;
1986
- org_id_input: string;
1987
- org_phone_input: string;
1988
- sender_id_input: string;
1989
- };
1990
- Returns: Json;
1991
- };
1964
+ org_id_input?: string
1965
+ }
1966
+ Returns: Json
1967
+ }
1992
1968
  get_messages_notifications_reactions: {
1993
1969
  Args: {
1994
- org_id_input: string;
1995
- chat_id_input?: string[];
1996
- limit_input?: number;
1997
- offset_input?: number;
1998
- };
1999
- Returns: Json;
2000
- };
1970
+ org_id_input: string
1971
+ chat_id_input?: string[]
1972
+ limit_input?: number
1973
+ offset_input?: number
1974
+ }
1975
+ Returns: Json
1976
+ }
2001
1977
  get_org: {
2002
1978
  Args: {
2003
- org_id_input?: string;
2004
- };
2005
- Returns: Json;
2006
- };
1979
+ org_id_input?: string
1980
+ }
1981
+ Returns: Json
1982
+ }
2007
1983
  get_org_credits: {
2008
1984
  Args: {
2009
- org_id_input?: string;
2010
- };
2011
- Returns: Json;
2012
- };
1985
+ org_id_input?: string
1986
+ }
1987
+ Returns: Json
1988
+ }
2013
1989
  get_org_phones: {
2014
1990
  Args: {
2015
- org_id_input?: string;
2016
- phone_id_input?: string;
2017
- };
2018
- Returns: Json;
2019
- };
2020
- get_reaction_rule_info: {
2021
- Args: {
2022
- reaction_id_input: string;
2023
- message_id_input: string;
2024
- chat_id_input: string;
2025
- org_id_input: string;
2026
- org_phone_input: string;
2027
- sender_id_input: string;
2028
- };
2029
- Returns: Json;
2030
- };
1991
+ org_id_input?: string
1992
+ phone_id_input?: string
1993
+ }
1994
+ Returns: Json
1995
+ }
2031
1996
  get_team_metrics_between_dates: {
2032
1997
  Args: {
2033
- org_id_input: string;
2034
- start_date: string;
2035
- end_date: string;
2036
- chat_id_input?: string[];
2037
- };
2038
- Returns: Json;
2039
- };
1998
+ org_id_input: string
1999
+ start_date: string
2000
+ end_date: string
2001
+ chat_id_input?: string[]
2002
+ }
2003
+ Returns: Json
2004
+ }
2040
2005
  get_ticket_info: {
2041
2006
  Args: {
2042
- ticket_id_input?: string;
2043
- org_id_input?: string;
2044
- chat_id_input?: string;
2045
- unique_message_id_input?: string;
2046
- };
2047
- Returns: Json;
2048
- };
2049
- get_ticket_rule_info: {
2050
- Args: {
2051
- ticket_id_input: string;
2052
- unique_message_id_input: string;
2053
- chat_id_input: string;
2054
- org_id_input: string;
2055
- };
2056
- Returns: Json;
2057
- };
2007
+ ticket_id_input?: string
2008
+ org_id_input?: string
2009
+ chat_id_input?: string
2010
+ unique_message_id_input?: string
2011
+ }
2012
+ Returns: Json
2013
+ }
2058
2014
  get_universal_search_result: {
2059
2015
  Args: {
2060
- search_category_input: string;
2061
- search_query_input: string;
2062
- org_id_input: string;
2063
- };
2016
+ search_category_input: string
2017
+ search_query_input: string
2018
+ org_id_input: string
2019
+ }
2064
2020
  Returns: {
2065
- category: string;
2066
- result: Json;
2067
- }[];
2068
- };
2021
+ category: string
2022
+ result: Json
2023
+ }[]
2024
+ }
2069
2025
  image_path: {
2070
2026
  Args: {
2071
- path_input?: string;
2072
- bucket_name?: string;
2073
- req_base?: boolean;
2074
- };
2075
- Returns: string;
2076
- };
2027
+ path_input?: string
2028
+ bucket_name?: string
2029
+ req_base?: boolean
2030
+ }
2031
+ Returns: string
2032
+ }
2077
2033
  list_org_from_user: {
2078
- Args: Record<PropertyKey, never>;
2079
- Returns: string[];
2080
- };
2034
+ Args: Record<PropertyKey, never>
2035
+ Returns: string[]
2036
+ }
2081
2037
  list_role_from_user: {
2082
- Args: Record<PropertyKey, never>;
2083
- Returns: Database['public']['Enums']['enum_member_role'];
2084
- };
2038
+ Args: Record<PropertyKey, never>
2039
+ Returns: Database["public"]["Enums"]["enum_member_role"]
2040
+ }
2085
2041
  update_chat_properties: {
2086
2042
  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
- };
2043
+ column_name: string
2044
+ org_id_input: string
2045
+ chat_id_input: string[]
2046
+ key_input: string
2047
+ value_input: Json
2048
+ }
2049
+ Returns: undefined
2050
+ }
2095
2051
  update_custom_properties: {
2096
2052
  Args: {
2097
- org_id_input: string;
2098
- row_properties_map: Json;
2099
- replace_properties?: boolean;
2100
- };
2101
- Returns: undefined;
2102
- };
2053
+ org_id_input: string
2054
+ row_properties_map: Json
2055
+ replace_properties?: boolean
2056
+ }
2057
+ Returns: undefined
2058
+ }
2103
2059
  update_labels: {
2104
2060
  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
- };
2061
+ org_id_input: string
2062
+ tbl_type: string
2063
+ row_label_map: Json
2064
+ replace_labels?: boolean
2065
+ }
2066
+ Returns: undefined
2067
+ }
2068
+ }
2113
2069
  Enums: {
2114
- enum_broadcast_status: 'inprogress' | 'completed' | 'stopped' | 'expired';
2070
+ enum_broadcast_status: "inprogress" | "completed" | "stopped" | "expired"
2115
2071
  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';
2072
+ | "#B4876E"
2073
+ | "#A5B337"
2074
+ | "#06CF9C"
2075
+ | "#25D366"
2076
+ | "#02A698"
2077
+ | "#7D9EF1"
2078
+ | "#007BFC"
2079
+ | "#5E47DE"
2080
+ | "#7F66FF"
2081
+ | "#9333EA"
2082
+ | "#FA6533"
2083
+ | "#C4532D"
2084
+ | "#DC2626"
2085
+ | "#FF2E74"
2086
+ | "#DB2777"
2087
+ enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived"
2088
+ enum_credit_transaction_type: "credit" | "debit"
2133
2089
  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';
2090
+ | "org.created"
2091
+ | "org.updated"
2092
+ | "org.member.created"
2093
+ | "org.member.updated"
2094
+ | "org.phone.created"
2095
+ | "org.phone.connected"
2096
+ | "org.phone.disconnected"
2097
+ | "org.subscription.trial_will_end"
2098
+ | "chat.created"
2099
+ | "chat.updated"
2100
+ | "chat.notification.created"
2101
+ | "message.created"
2102
+ | "message.updated"
2103
+ | "message.deleted"
2104
+ | "message.ack.updated"
2105
+ | "reaction.created"
2106
+ | "reaction.updated"
2107
+ | "ticket.created"
2108
+ | "ticket.updated"
2109
+ | "ticket.deleted"
2110
+ | "org.integrations.updated"
2155
2111
  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
- };
2112
+ | "zapier"
2113
+ | "pabbly"
2114
+ | "api"
2115
+ | "webhook"
2116
+ | "hubspot"
2117
+ | "freshdesk"
2118
+ | "slack"
2119
+ | "jira"
2120
+ | "salesforce"
2121
+ | "zohodesk"
2122
+ | "gsheets"
2123
+ enum_member_role: "admin" | "member"
2124
+ }
2169
2125
  CompositeTypes: {
2170
- [_ in never]: never;
2171
- };
2172
- };
2126
+ [_ in never]: never
2127
+ }
2128
+ }
2173
2129
  storage: {
2174
2130
  Tables: {
2175
2131
  buckets: {
2176
2132
  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
- };
2133
+ allowed_mime_types: string[] | null
2134
+ avif_autodetection: boolean | null
2135
+ created_at: string | null
2136
+ file_size_limit: number | null
2137
+ id: string
2138
+ name: string
2139
+ owner: string | null
2140
+ owner_id: string | null
2141
+ public: boolean | null
2142
+ updated_at: string | null
2143
+ }
2188
2144
  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
- };
2145
+ allowed_mime_types?: string[] | null
2146
+ avif_autodetection?: boolean | null
2147
+ created_at?: string | null
2148
+ file_size_limit?: number | null
2149
+ id: string
2150
+ name: string
2151
+ owner?: string | null
2152
+ owner_id?: string | null
2153
+ public?: boolean | null
2154
+ updated_at?: string | null
2155
+ }
2200
2156
  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
- };
2157
+ allowed_mime_types?: string[] | null
2158
+ avif_autodetection?: boolean | null
2159
+ created_at?: string | null
2160
+ file_size_limit?: number | null
2161
+ id?: string
2162
+ name?: string
2163
+ owner?: string | null
2164
+ owner_id?: string | null
2165
+ public?: boolean | null
2166
+ updated_at?: string | null
2167
+ }
2168
+ Relationships: []
2169
+ }
2214
2170
  migrations: {
2215
2171
  Row: {
2216
- executed_at: string | null;
2217
- hash: string;
2218
- id: number;
2219
- name: string;
2220
- };
2172
+ executed_at: string | null
2173
+ hash: string
2174
+ id: number
2175
+ name: string
2176
+ }
2221
2177
  Insert: {
2222
- executed_at?: string | null;
2223
- hash: string;
2224
- id: number;
2225
- name: string;
2226
- };
2178
+ executed_at?: string | null
2179
+ hash: string
2180
+ id: number
2181
+ name: string
2182
+ }
2227
2183
  Update: {
2228
- executed_at?: string | null;
2229
- hash?: string;
2230
- id?: number;
2231
- name?: string;
2232
- };
2233
- Relationships: [];
2234
- };
2184
+ executed_at?: string | null
2185
+ hash?: string
2186
+ id?: number
2187
+ name?: string
2188
+ }
2189
+ Relationships: []
2190
+ }
2235
2191
  objects: {
2236
2192
  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
- version: string | null;
2248
- };
2193
+ bucket_id: string | null
2194
+ created_at: string | null
2195
+ id: string
2196
+ last_accessed_at: string | null
2197
+ metadata: Json | null
2198
+ name: string | null
2199
+ owner: string | null
2200
+ owner_id: string | null
2201
+ path_tokens: string[] | null
2202
+ updated_at: string | null
2203
+ user_metadata: Json | null
2204
+ version: string | null
2205
+ }
2249
2206
  Insert: {
2250
- bucket_id?: string | null;
2251
- created_at?: string | null;
2252
- id?: string;
2253
- last_accessed_at?: string | null;
2254
- metadata?: Json | null;
2255
- name?: string | null;
2256
- owner?: string | null;
2257
- owner_id?: string | null;
2258
- path_tokens?: string[] | null;
2259
- updated_at?: string | null;
2260
- version?: string | null;
2261
- };
2207
+ bucket_id?: string | null
2208
+ created_at?: string | null
2209
+ id?: string
2210
+ last_accessed_at?: string | null
2211
+ metadata?: Json | null
2212
+ name?: string | null
2213
+ owner?: string | null
2214
+ owner_id?: string | null
2215
+ path_tokens?: string[] | null
2216
+ updated_at?: string | null
2217
+ user_metadata?: Json | null
2218
+ version?: string | null
2219
+ }
2262
2220
  Update: {
2263
- bucket_id?: string | null;
2264
- created_at?: string | null;
2265
- id?: string;
2266
- last_accessed_at?: string | null;
2267
- metadata?: Json | null;
2268
- name?: string | null;
2269
- owner?: string | null;
2270
- owner_id?: string | null;
2271
- path_tokens?: string[] | null;
2272
- updated_at?: string | null;
2273
- version?: string | null;
2274
- };
2221
+ bucket_id?: string | null
2222
+ created_at?: string | null
2223
+ id?: string
2224
+ last_accessed_at?: string | null
2225
+ metadata?: Json | null
2226
+ name?: string | null
2227
+ owner?: string | null
2228
+ owner_id?: string | null
2229
+ path_tokens?: string[] | null
2230
+ updated_at?: string | null
2231
+ user_metadata?: Json | null
2232
+ version?: string | null
2233
+ }
2275
2234
  Relationships: [
2276
2235
  {
2277
- foreignKeyName: 'objects_bucketId_fkey';
2278
- columns: ['bucket_id'];
2279
- isOneToOne: false;
2280
- referencedRelation: 'buckets';
2281
- referencedColumns: ['id'];
2236
+ foreignKeyName: "objects_bucketId_fkey"
2237
+ columns: ["bucket_id"]
2238
+ isOneToOne: false
2239
+ referencedRelation: "buckets"
2240
+ referencedColumns: ["id"]
2282
2241
  },
2283
- ];
2284
- };
2242
+ ]
2243
+ }
2285
2244
  s3_multipart_uploads: {
2286
2245
  Row: {
2287
- bucket_id: string;
2288
- created_at: string;
2289
- id: string;
2290
- in_progress_size: number;
2291
- key: string;
2292
- owner_id: string | null;
2293
- upload_signature: string;
2294
- version: string;
2295
- };
2246
+ bucket_id: string
2247
+ created_at: string
2248
+ id: string
2249
+ in_progress_size: number
2250
+ key: string
2251
+ owner_id: string | null
2252
+ upload_signature: string
2253
+ user_metadata: Json | null
2254
+ version: string
2255
+ }
2296
2256
  Insert: {
2297
- bucket_id: string;
2298
- created_at?: string;
2299
- id: string;
2300
- in_progress_size?: number;
2301
- key: string;
2302
- owner_id?: string | null;
2303
- upload_signature: string;
2304
- version: string;
2305
- };
2257
+ bucket_id: string
2258
+ created_at?: string
2259
+ id: string
2260
+ in_progress_size?: number
2261
+ key: string
2262
+ owner_id?: string | null
2263
+ upload_signature: string
2264
+ user_metadata?: Json | null
2265
+ version: string
2266
+ }
2306
2267
  Update: {
2307
- bucket_id?: string;
2308
- created_at?: string;
2309
- id?: string;
2310
- in_progress_size?: number;
2311
- key?: string;
2312
- owner_id?: string | null;
2313
- upload_signature?: string;
2314
- version?: string;
2315
- };
2268
+ bucket_id?: string
2269
+ created_at?: string
2270
+ id?: string
2271
+ in_progress_size?: number
2272
+ key?: string
2273
+ owner_id?: string | null
2274
+ upload_signature?: string
2275
+ user_metadata?: Json | null
2276
+ version?: string
2277
+ }
2316
2278
  Relationships: [
2317
2279
  {
2318
- foreignKeyName: 's3_multipart_uploads_bucket_id_fkey';
2319
- columns: ['bucket_id'];
2320
- isOneToOne: false;
2321
- referencedRelation: 'buckets';
2322
- referencedColumns: ['id'];
2280
+ foreignKeyName: "s3_multipart_uploads_bucket_id_fkey"
2281
+ columns: ["bucket_id"]
2282
+ isOneToOne: false
2283
+ referencedRelation: "buckets"
2284
+ referencedColumns: ["id"]
2323
2285
  },
2324
- ];
2325
- };
2286
+ ]
2287
+ }
2326
2288
  s3_multipart_uploads_parts: {
2327
2289
  Row: {
2328
- bucket_id: string;
2329
- created_at: string;
2330
- etag: string;
2331
- id: string;
2332
- key: string;
2333
- owner_id: string | null;
2334
- part_number: number;
2335
- size: number;
2336
- upload_id: string;
2337
- version: string;
2338
- };
2290
+ bucket_id: string
2291
+ created_at: string
2292
+ etag: string
2293
+ id: string
2294
+ key: string
2295
+ owner_id: string | null
2296
+ part_number: number
2297
+ size: number
2298
+ upload_id: string
2299
+ version: string
2300
+ }
2339
2301
  Insert: {
2340
- bucket_id: string;
2341
- created_at?: string;
2342
- etag: string;
2343
- id?: string;
2344
- key: string;
2345
- owner_id?: string | null;
2346
- part_number: number;
2347
- size?: number;
2348
- upload_id: string;
2349
- version: string;
2350
- };
2302
+ bucket_id: string
2303
+ created_at?: string
2304
+ etag: string
2305
+ id?: string
2306
+ key: string
2307
+ owner_id?: string | null
2308
+ part_number: number
2309
+ size?: number
2310
+ upload_id: string
2311
+ version: string
2312
+ }
2351
2313
  Update: {
2352
- bucket_id?: string;
2353
- created_at?: string;
2354
- etag?: string;
2355
- id?: string;
2356
- key?: string;
2357
- owner_id?: string | null;
2358
- part_number?: number;
2359
- size?: number;
2360
- upload_id?: string;
2361
- version?: string;
2362
- };
2314
+ bucket_id?: string
2315
+ created_at?: string
2316
+ etag?: string
2317
+ id?: string
2318
+ key?: string
2319
+ owner_id?: string | null
2320
+ part_number?: number
2321
+ size?: number
2322
+ upload_id?: string
2323
+ version?: string
2324
+ }
2363
2325
  Relationships: [
2364
2326
  {
2365
- foreignKeyName: 's3_multipart_uploads_parts_bucket_id_fkey';
2366
- columns: ['bucket_id'];
2367
- isOneToOne: false;
2368
- referencedRelation: 'buckets';
2369
- referencedColumns: ['id'];
2327
+ foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey"
2328
+ columns: ["bucket_id"]
2329
+ isOneToOne: false
2330
+ referencedRelation: "buckets"
2331
+ referencedColumns: ["id"]
2370
2332
  },
2371
2333
  {
2372
- foreignKeyName: 's3_multipart_uploads_parts_upload_id_fkey';
2373
- columns: ['upload_id'];
2374
- isOneToOne: false;
2375
- referencedRelation: 's3_multipart_uploads';
2376
- referencedColumns: ['id'];
2334
+ foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey"
2335
+ columns: ["upload_id"]
2336
+ isOneToOne: false
2337
+ referencedRelation: "s3_multipart_uploads"
2338
+ referencedColumns: ["id"]
2377
2339
  },
2378
- ];
2379
- };
2380
- };
2340
+ ]
2341
+ }
2342
+ }
2381
2343
  Views: {
2382
- [_ in never]: never;
2383
- };
2344
+ [_ in never]: never
2345
+ }
2384
2346
  Functions: {
2385
2347
  can_insert_object: {
2386
2348
  Args: {
2387
- bucketid: string;
2388
- name: string;
2389
- owner: string;
2390
- metadata: Json;
2391
- };
2392
- Returns: undefined;
2393
- };
2349
+ bucketid: string
2350
+ name: string
2351
+ owner: string
2352
+ metadata: Json
2353
+ }
2354
+ Returns: undefined
2355
+ }
2394
2356
  extension: {
2395
2357
  Args: {
2396
- name: string;
2397
- };
2398
- Returns: string;
2399
- };
2358
+ name: string
2359
+ }
2360
+ Returns: string
2361
+ }
2400
2362
  filename: {
2401
2363
  Args: {
2402
- name: string;
2403
- };
2404
- Returns: string;
2405
- };
2364
+ name: string
2365
+ }
2366
+ Returns: string
2367
+ }
2406
2368
  foldername: {
2407
2369
  Args: {
2408
- name: string;
2409
- };
2410
- Returns: string[];
2411
- };
2370
+ name: string
2371
+ }
2372
+ Returns: string[]
2373
+ }
2412
2374
  get_size_by_bucket: {
2413
- Args: Record<PropertyKey, never>;
2375
+ Args: Record<PropertyKey, never>
2414
2376
  Returns: {
2415
- size: number;
2416
- bucket_id: string;
2417
- }[];
2418
- };
2377
+ size: number
2378
+ bucket_id: string
2379
+ }[]
2380
+ }
2419
2381
  list_multipart_uploads_with_delimiter: {
2420
2382
  Args: {
2421
- bucket_id: string;
2422
- prefix_param: string;
2423
- delimiter_param: string;
2424
- max_keys?: number;
2425
- next_key_token?: string;
2426
- next_upload_token?: string;
2427
- };
2383
+ bucket_id: string
2384
+ prefix_param: string
2385
+ delimiter_param: string
2386
+ max_keys?: number
2387
+ next_key_token?: string
2388
+ next_upload_token?: string
2389
+ }
2428
2390
  Returns: {
2429
- key: string;
2430
- id: string;
2431
- created_at: string;
2432
- }[];
2433
- };
2391
+ key: string
2392
+ id: string
2393
+ created_at: string
2394
+ }[]
2395
+ }
2434
2396
  list_objects_with_delimiter: {
2435
2397
  Args: {
2436
- bucket_id: string;
2437
- prefix_param: string;
2438
- delimiter_param: string;
2439
- max_keys?: number;
2440
- start_after?: string;
2441
- next_token?: string;
2442
- };
2398
+ bucket_id: string
2399
+ prefix_param: string
2400
+ delimiter_param: string
2401
+ max_keys?: number
2402
+ start_after?: string
2403
+ next_token?: string
2404
+ }
2443
2405
  Returns: {
2444
- name: string;
2445
- id: string;
2446
- metadata: Json;
2447
- updated_at: string;
2448
- }[];
2449
- };
2406
+ name: string
2407
+ id: string
2408
+ metadata: Json
2409
+ updated_at: string
2410
+ }[]
2411
+ }
2412
+ operation: {
2413
+ Args: Record<PropertyKey, never>
2414
+ Returns: string
2415
+ }
2450
2416
  search: {
2451
2417
  Args: {
2452
- prefix: string;
2453
- bucketname: string;
2454
- limits?: number;
2455
- levels?: number;
2456
- offsets?: number;
2457
- search?: string;
2458
- sortcolumn?: string;
2459
- sortorder?: string;
2460
- };
2418
+ prefix: string
2419
+ bucketname: string
2420
+ limits?: number
2421
+ levels?: number
2422
+ offsets?: number
2423
+ search?: string
2424
+ sortcolumn?: string
2425
+ sortorder?: string
2426
+ }
2461
2427
  Returns: {
2462
- name: string;
2463
- id: string;
2464
- updated_at: string;
2465
- created_at: string;
2466
- last_accessed_at: string;
2467
- metadata: Json;
2468
- }[];
2469
- };
2470
- };
2428
+ name: string
2429
+ id: string
2430
+ updated_at: string
2431
+ created_at: string
2432
+ last_accessed_at: string
2433
+ metadata: Json
2434
+ }[]
2435
+ }
2436
+ }
2471
2437
  Enums: {
2472
- [_ in never]: never;
2473
- };
2438
+ [_ in never]: never
2439
+ }
2474
2440
  CompositeTypes: {
2475
- [_ in never]: never;
2476
- };
2477
- };
2478
- };
2441
+ [_ in never]: never
2442
+ }
2443
+ }
2444
+ }
2479
2445
 
2480
- type PublicSchema = Database[Extract<keyof Database, 'public'>];
2446
+ type PublicSchema = Database[Extract<keyof Database, "public">]
2481
2447
 
2482
2448
  export type Tables<
2483
2449
  PublicTableNameOrOptions extends
2484
- | keyof (PublicSchema['Tables'] & PublicSchema['Views'])
2450
+ | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
2485
2451
  | { schema: keyof Database },
2486
2452
  TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
2487
- ? keyof (Database[PublicTableNameOrOptions['schema']]['Tables'] &
2488
- Database[PublicTableNameOrOptions['schema']]['Views'])
2453
+ ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
2454
+ Database[PublicTableNameOrOptions["schema"]]["Views"])
2489
2455
  : never = never,
2490
2456
  > = PublicTableNameOrOptions extends { schema: keyof Database }
2491
- ? (Database[PublicTableNameOrOptions['schema']]['Tables'] &
2492
- Database[PublicTableNameOrOptions['schema']]['Views'])[TableName] extends {
2493
- Row: infer R;
2457
+ ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
2458
+ Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
2459
+ Row: infer R
2494
2460
  }
2495
2461
  ? R
2496
2462
  : never
2497
- : PublicTableNameOrOptions extends keyof (PublicSchema['Tables'] &
2498
- PublicSchema['Views'])
2499
- ? (PublicSchema['Tables'] &
2500
- PublicSchema['Views'])[PublicTableNameOrOptions] extends {
2501
- Row: infer R;
2463
+ : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
2464
+ PublicSchema["Views"])
2465
+ ? (PublicSchema["Tables"] &
2466
+ PublicSchema["Views"])[PublicTableNameOrOptions] extends {
2467
+ Row: infer R
2502
2468
  }
2503
2469
  ? R
2504
2470
  : never
2505
- : never;
2471
+ : never
2506
2472
 
2507
2473
  export type TablesInsert<
2508
2474
  PublicTableNameOrOptions extends
2509
- | keyof PublicSchema['Tables']
2475
+ | keyof PublicSchema["Tables"]
2510
2476
  | { schema: keyof Database },
2511
2477
  TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
2512
- ? keyof Database[PublicTableNameOrOptions['schema']]['Tables']
2478
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
2513
2479
  : never = never,
2514
2480
  > = PublicTableNameOrOptions extends { schema: keyof Database }
2515
- ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends {
2516
- Insert: infer I;
2481
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2482
+ Insert: infer I
2517
2483
  }
2518
2484
  ? I
2519
2485
  : never
2520
- : PublicTableNameOrOptions extends keyof PublicSchema['Tables']
2521
- ? PublicSchema['Tables'][PublicTableNameOrOptions] extends {
2522
- Insert: infer I;
2486
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
2487
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
2488
+ Insert: infer I
2523
2489
  }
2524
2490
  ? I
2525
2491
  : never
2526
- : never;
2492
+ : never
2527
2493
 
2528
2494
  export type TablesUpdate<
2529
2495
  PublicTableNameOrOptions extends
2530
- | keyof PublicSchema['Tables']
2496
+ | keyof PublicSchema["Tables"]
2531
2497
  | { schema: keyof Database },
2532
2498
  TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
2533
- ? keyof Database[PublicTableNameOrOptions['schema']]['Tables']
2499
+ ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
2534
2500
  : never = never,
2535
2501
  > = PublicTableNameOrOptions extends { schema: keyof Database }
2536
- ? Database[PublicTableNameOrOptions['schema']]['Tables'][TableName] extends {
2537
- Update: infer U;
2502
+ ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
2503
+ Update: infer U
2538
2504
  }
2539
2505
  ? U
2540
2506
  : never
2541
- : PublicTableNameOrOptions extends keyof PublicSchema['Tables']
2542
- ? PublicSchema['Tables'][PublicTableNameOrOptions] extends {
2543
- Update: infer U;
2507
+ : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
2508
+ ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
2509
+ Update: infer U
2544
2510
  }
2545
2511
  ? U
2546
2512
  : never
2547
- : never;
2513
+ : never
2548
2514
 
2549
2515
  export type Enums<
2550
2516
  PublicEnumNameOrOptions extends
2551
- | keyof PublicSchema['Enums']
2517
+ | keyof PublicSchema["Enums"]
2552
2518
  | { schema: keyof Database },
2553
2519
  EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
2554
- ? keyof Database[PublicEnumNameOrOptions['schema']]['Enums']
2520
+ ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
2555
2521
  : never = never,
2556
2522
  > = PublicEnumNameOrOptions extends { schema: keyof Database }
2557
- ? Database[PublicEnumNameOrOptions['schema']]['Enums'][EnumName]
2558
- : PublicEnumNameOrOptions extends keyof PublicSchema['Enums']
2559
- ? PublicSchema['Enums'][PublicEnumNameOrOptions]
2560
- : never;
2523
+ ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
2524
+ : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
2525
+ ? PublicSchema["Enums"][PublicEnumNameOrOptions]
2526
+ : never
2527
+
2528
+