@periskope/types 0.6.75 → 0.6.77

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