@periskope/types 0.6.88 → 0.6.89

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