@periskope/types 0.6.141 → 0.6.142

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