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