@periskope/types 0.6.8 → 0.6.9-2.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 +959 -85
- package/dist/types.d.ts +297 -18
- package/dist/types.js +42 -1
- package/mod_json_type.ps1 +95 -1
- package/package.json +16 -12
- package/supabase.types.ts +1910 -1006
- package/tsconfig.json +15 -18
- package/types.ts +416 -29
- 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,35 +29,202 @@ export interface Database {
|
|
|
29
29
|
};
|
|
30
30
|
public: {
|
|
31
31
|
Tables: {
|
|
32
|
+
tbl_broadcast_logs: {
|
|
33
|
+
Row: {
|
|
34
|
+
broadcast_id: string;
|
|
35
|
+
chat_id: string;
|
|
36
|
+
completed_at: string | null;
|
|
37
|
+
created_at: string;
|
|
38
|
+
delivered_count: number | null;
|
|
39
|
+
delivery_info: Json | null;
|
|
40
|
+
is_success: boolean | null;
|
|
41
|
+
member_count: number | null;
|
|
42
|
+
message_id: string | null;
|
|
43
|
+
org_id: string;
|
|
44
|
+
org_phone: string | null;
|
|
45
|
+
read_count: number | null;
|
|
46
|
+
};
|
|
47
|
+
Insert: {
|
|
48
|
+
broadcast_id: string;
|
|
49
|
+
chat_id: string;
|
|
50
|
+
completed_at?: string | null;
|
|
51
|
+
created_at?: string;
|
|
52
|
+
delivered_count?: number | null;
|
|
53
|
+
delivery_info?: Json | null;
|
|
54
|
+
is_success?: boolean | null;
|
|
55
|
+
member_count?: number | null;
|
|
56
|
+
message_id?: string | null;
|
|
57
|
+
org_id: string;
|
|
58
|
+
org_phone?: string | null;
|
|
59
|
+
read_count?: number | null;
|
|
60
|
+
};
|
|
61
|
+
Update: {
|
|
62
|
+
broadcast_id?: string;
|
|
63
|
+
chat_id?: string;
|
|
64
|
+
completed_at?: string | null;
|
|
65
|
+
created_at?: string;
|
|
66
|
+
delivered_count?: number | null;
|
|
67
|
+
delivery_info?: Json | null;
|
|
68
|
+
is_success?: boolean | null;
|
|
69
|
+
member_count?: number | null;
|
|
70
|
+
message_id?: string | null;
|
|
71
|
+
org_id?: string;
|
|
72
|
+
org_phone?: string | null;
|
|
73
|
+
read_count?: number | null;
|
|
74
|
+
};
|
|
75
|
+
Relationships: [
|
|
76
|
+
{
|
|
77
|
+
foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey";
|
|
78
|
+
columns: ["broadcast_id"];
|
|
79
|
+
referencedRelation: "tbl_broadcast_messages";
|
|
80
|
+
referencedColumns: ["broadcast_id"];
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey";
|
|
84
|
+
columns: ["broadcast_id"];
|
|
85
|
+
referencedRelation: "view_broadcast_logs";
|
|
86
|
+
referencedColumns: ["broadcast_id"];
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
foreignKeyName: "tbl_broadcast_logs_org_id_fkey";
|
|
90
|
+
columns: ["org_id"];
|
|
91
|
+
referencedRelation: "tbl_org";
|
|
92
|
+
referencedColumns: ["org_id"];
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
foreignKeyName: "tbl_broadcast_logs_org_id_fkey";
|
|
96
|
+
columns: ["org_id"];
|
|
97
|
+
referencedRelation: "view_org";
|
|
98
|
+
referencedColumns: ["org_id"];
|
|
99
|
+
}
|
|
100
|
+
];
|
|
101
|
+
};
|
|
102
|
+
tbl_broadcast_messages: {
|
|
103
|
+
Row: {
|
|
104
|
+
broadcast_id: string;
|
|
105
|
+
broadcast_status: string | null;
|
|
106
|
+
chat_ids: string[] | null;
|
|
107
|
+
created_at: string;
|
|
108
|
+
message_payload: Json | null;
|
|
109
|
+
org_id: string;
|
|
110
|
+
org_phone: string | null;
|
|
111
|
+
performed_at: string | null;
|
|
112
|
+
performed_by: string | null;
|
|
113
|
+
scheduled_at: string | null;
|
|
114
|
+
};
|
|
115
|
+
Insert: {
|
|
116
|
+
broadcast_id?: string;
|
|
117
|
+
broadcast_status?: string | null;
|
|
118
|
+
chat_ids?: string[] | null;
|
|
119
|
+
created_at?: string;
|
|
120
|
+
message_payload?: Json | null;
|
|
121
|
+
org_id: string;
|
|
122
|
+
org_phone?: string | null;
|
|
123
|
+
performed_at?: string | null;
|
|
124
|
+
performed_by?: string | null;
|
|
125
|
+
scheduled_at?: string | null;
|
|
126
|
+
};
|
|
127
|
+
Update: {
|
|
128
|
+
broadcast_id?: string;
|
|
129
|
+
broadcast_status?: string | null;
|
|
130
|
+
chat_ids?: string[] | null;
|
|
131
|
+
created_at?: string;
|
|
132
|
+
message_payload?: Json | null;
|
|
133
|
+
org_id?: string;
|
|
134
|
+
org_phone?: string | null;
|
|
135
|
+
performed_at?: string | null;
|
|
136
|
+
performed_by?: string | null;
|
|
137
|
+
scheduled_at?: string | null;
|
|
138
|
+
};
|
|
139
|
+
Relationships: [
|
|
140
|
+
{
|
|
141
|
+
foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
|
|
142
|
+
columns: ["org_id"];
|
|
143
|
+
referencedRelation: "tbl_org";
|
|
144
|
+
referencedColumns: ["org_id"];
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
|
|
148
|
+
columns: ["org_id"];
|
|
149
|
+
referencedRelation: "view_org";
|
|
150
|
+
referencedColumns: ["org_id"];
|
|
151
|
+
}
|
|
152
|
+
];
|
|
153
|
+
};
|
|
154
|
+
tbl_broadcast_templates: {
|
|
155
|
+
Row: {
|
|
156
|
+
created_at: string;
|
|
157
|
+
message_payload: Json | null;
|
|
158
|
+
org_id: string;
|
|
159
|
+
template_id: string;
|
|
160
|
+
template_name: string | null;
|
|
161
|
+
updated_at: string | null;
|
|
162
|
+
};
|
|
163
|
+
Insert: {
|
|
164
|
+
created_at?: string;
|
|
165
|
+
message_payload?: Json | null;
|
|
166
|
+
org_id: string;
|
|
167
|
+
template_id?: string;
|
|
168
|
+
template_name?: string | null;
|
|
169
|
+
updated_at?: string | null;
|
|
170
|
+
};
|
|
171
|
+
Update: {
|
|
172
|
+
created_at?: string;
|
|
173
|
+
message_payload?: Json | null;
|
|
174
|
+
org_id?: string;
|
|
175
|
+
template_id?: string;
|
|
176
|
+
template_name?: string | null;
|
|
177
|
+
updated_at?: string | null;
|
|
178
|
+
};
|
|
179
|
+
Relationships: [
|
|
180
|
+
{
|
|
181
|
+
foreignKeyName: "tbl_broadcast_templates_org_id_fkey";
|
|
182
|
+
columns: ["org_id"];
|
|
183
|
+
referencedRelation: "tbl_org";
|
|
184
|
+
referencedColumns: ["org_id"];
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
foreignKeyName: "tbl_broadcast_templates_org_id_fkey";
|
|
188
|
+
columns: ["org_id"];
|
|
189
|
+
referencedRelation: "view_org";
|
|
190
|
+
referencedColumns: ["org_id"];
|
|
191
|
+
}
|
|
192
|
+
];
|
|
193
|
+
};
|
|
32
194
|
tbl_chat_access: {
|
|
33
195
|
Row: {
|
|
196
|
+
active_phone: string | null;
|
|
34
197
|
chat_id: string;
|
|
35
198
|
email: string;
|
|
36
199
|
has_access: boolean | null;
|
|
37
200
|
last_read_timestamp: string | null;
|
|
201
|
+
message_unread_count: number | null;
|
|
38
202
|
org_id: string;
|
|
39
203
|
};
|
|
40
204
|
Insert: {
|
|
205
|
+
active_phone?: string | null;
|
|
41
206
|
chat_id: string;
|
|
42
207
|
email: string;
|
|
43
208
|
has_access?: boolean | null;
|
|
44
209
|
last_read_timestamp?: string | null;
|
|
45
|
-
|
|
210
|
+
message_unread_count?: number | null;
|
|
211
|
+
org_id: string;
|
|
46
212
|
};
|
|
47
213
|
Update: {
|
|
214
|
+
active_phone?: string | null;
|
|
48
215
|
chat_id?: string;
|
|
49
216
|
email?: string;
|
|
50
217
|
has_access?: boolean | null;
|
|
51
218
|
last_read_timestamp?: string | null;
|
|
219
|
+
message_unread_count?: number | null;
|
|
52
220
|
org_id?: string;
|
|
53
221
|
};
|
|
54
222
|
Relationships: [
|
|
55
223
|
{
|
|
56
|
-
foreignKeyName: "
|
|
57
|
-
columns: ["org_id"];
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
referencedColumns: ["org_id"];
|
|
224
|
+
foreignKeyName: "tbl_chat_access_org_id_email_fkey";
|
|
225
|
+
columns: ["org_id", "email"];
|
|
226
|
+
referencedRelation: "tbl_org_members";
|
|
227
|
+
referencedColumns: ["org_id", "email"];
|
|
61
228
|
}
|
|
62
229
|
];
|
|
63
230
|
};
|
|
@@ -67,9 +234,13 @@ export interface Database {
|
|
|
67
234
|
author: string | null;
|
|
68
235
|
body: string | null;
|
|
69
236
|
broadcast: boolean | null;
|
|
237
|
+
broadcast_id: string | null;
|
|
70
238
|
chat_id: string | null;
|
|
239
|
+
delivery_info: Json | null;
|
|
71
240
|
device_type: string | null;
|
|
72
241
|
duration: string | null;
|
|
242
|
+
flag_metadata: Json | null;
|
|
243
|
+
flag_response_time: number | null;
|
|
73
244
|
forwarding_score: number | null;
|
|
74
245
|
from: string | null;
|
|
75
246
|
from_me: boolean | null;
|
|
@@ -78,6 +249,7 @@ export interface Database {
|
|
|
78
249
|
has_reaction: boolean | null;
|
|
79
250
|
id: Json | null;
|
|
80
251
|
invite_v4: Json | null;
|
|
252
|
+
is_deleted: boolean | null;
|
|
81
253
|
is_ephemeral: boolean | null;
|
|
82
254
|
is_forwarded: boolean | null;
|
|
83
255
|
is_gif: boolean | null;
|
|
@@ -89,17 +261,22 @@ export interface Database {
|
|
|
89
261
|
media_key: string | null;
|
|
90
262
|
mentioned_ids: string[] | null;
|
|
91
263
|
message_id: string;
|
|
264
|
+
message_ticket_id: string | null;
|
|
92
265
|
message_type: string | null;
|
|
93
266
|
order_id: string | null;
|
|
94
267
|
org_id: string;
|
|
95
268
|
org_phone: string;
|
|
96
269
|
performed_by: string | null;
|
|
270
|
+
prev_body: string | null;
|
|
97
271
|
quoted_message_id: string | null;
|
|
98
272
|
raw_data: Json | null;
|
|
99
273
|
sender_phone: string | null;
|
|
274
|
+
sent_message_id: string | null;
|
|
100
275
|
timestamp: string | null;
|
|
101
276
|
to: string | null;
|
|
102
277
|
token: string | null;
|
|
278
|
+
unique_id: string | null;
|
|
279
|
+
updated_at: string | null;
|
|
103
280
|
vcards: string[] | null;
|
|
104
281
|
};
|
|
105
282
|
Insert: {
|
|
@@ -107,9 +284,13 @@ export interface Database {
|
|
|
107
284
|
author?: string | null;
|
|
108
285
|
body?: string | null;
|
|
109
286
|
broadcast?: boolean | null;
|
|
287
|
+
broadcast_id?: string | null;
|
|
110
288
|
chat_id?: string | null;
|
|
289
|
+
delivery_info?: Json | null;
|
|
111
290
|
device_type?: string | null;
|
|
112
291
|
duration?: string | null;
|
|
292
|
+
flag_metadata?: Json | null;
|
|
293
|
+
flag_response_time?: number | null;
|
|
113
294
|
forwarding_score?: number | null;
|
|
114
295
|
from?: string | null;
|
|
115
296
|
from_me?: boolean | null;
|
|
@@ -118,6 +299,7 @@ export interface Database {
|
|
|
118
299
|
has_reaction?: boolean | null;
|
|
119
300
|
id?: Json | null;
|
|
120
301
|
invite_v4?: Json | null;
|
|
302
|
+
is_deleted?: boolean | null;
|
|
121
303
|
is_ephemeral?: boolean | null;
|
|
122
304
|
is_forwarded?: boolean | null;
|
|
123
305
|
is_gif?: boolean | null;
|
|
@@ -129,17 +311,22 @@ export interface Database {
|
|
|
129
311
|
media_key?: string | null;
|
|
130
312
|
mentioned_ids?: string[] | null;
|
|
131
313
|
message_id: string;
|
|
314
|
+
message_ticket_id?: string | null;
|
|
132
315
|
message_type?: string | null;
|
|
133
316
|
order_id?: string | null;
|
|
134
317
|
org_id: string;
|
|
135
318
|
org_phone: string;
|
|
136
319
|
performed_by?: string | null;
|
|
320
|
+
prev_body?: string | null;
|
|
137
321
|
quoted_message_id?: string | null;
|
|
138
322
|
raw_data?: Json | null;
|
|
139
323
|
sender_phone?: string | null;
|
|
324
|
+
sent_message_id?: string | null;
|
|
140
325
|
timestamp?: string | null;
|
|
141
326
|
to?: string | null;
|
|
142
327
|
token?: string | null;
|
|
328
|
+
unique_id?: string | null;
|
|
329
|
+
updated_at?: string | null;
|
|
143
330
|
vcards?: string[] | null;
|
|
144
331
|
};
|
|
145
332
|
Update: {
|
|
@@ -147,9 +334,13 @@ export interface Database {
|
|
|
147
334
|
author?: string | null;
|
|
148
335
|
body?: string | null;
|
|
149
336
|
broadcast?: boolean | null;
|
|
337
|
+
broadcast_id?: string | null;
|
|
150
338
|
chat_id?: string | null;
|
|
339
|
+
delivery_info?: Json | null;
|
|
151
340
|
device_type?: string | null;
|
|
152
341
|
duration?: string | null;
|
|
342
|
+
flag_metadata?: Json | null;
|
|
343
|
+
flag_response_time?: number | null;
|
|
153
344
|
forwarding_score?: number | null;
|
|
154
345
|
from?: string | null;
|
|
155
346
|
from_me?: boolean | null;
|
|
@@ -158,6 +349,7 @@ export interface Database {
|
|
|
158
349
|
has_reaction?: boolean | null;
|
|
159
350
|
id?: Json | null;
|
|
160
351
|
invite_v4?: Json | null;
|
|
352
|
+
is_deleted?: boolean | null;
|
|
161
353
|
is_ephemeral?: boolean | null;
|
|
162
354
|
is_forwarded?: boolean | null;
|
|
163
355
|
is_gif?: boolean | null;
|
|
@@ -169,26 +361,30 @@ export interface Database {
|
|
|
169
361
|
media_key?: string | null;
|
|
170
362
|
mentioned_ids?: string[] | null;
|
|
171
363
|
message_id?: string;
|
|
364
|
+
message_ticket_id?: string | null;
|
|
172
365
|
message_type?: string | null;
|
|
173
366
|
order_id?: string | null;
|
|
174
367
|
org_id?: string;
|
|
175
368
|
org_phone?: string;
|
|
176
369
|
performed_by?: string | null;
|
|
370
|
+
prev_body?: string | null;
|
|
177
371
|
quoted_message_id?: string | null;
|
|
178
372
|
raw_data?: Json | null;
|
|
179
373
|
sender_phone?: string | null;
|
|
374
|
+
sent_message_id?: string | null;
|
|
180
375
|
timestamp?: string | null;
|
|
181
376
|
to?: string | null;
|
|
182
377
|
token?: string | null;
|
|
378
|
+
unique_id?: string | null;
|
|
379
|
+
updated_at?: string | null;
|
|
183
380
|
vcards?: string[] | null;
|
|
184
381
|
};
|
|
185
382
|
Relationships: [
|
|
186
383
|
{
|
|
187
384
|
foreignKeyName: "tbl_chat_messages_fkey_tbl_org_phones";
|
|
188
|
-
columns: ["
|
|
189
|
-
isOneToOne: false;
|
|
385
|
+
columns: ["org_phone", "org_id"];
|
|
190
386
|
referencedRelation: "tbl_org_phones";
|
|
191
|
-
referencedColumns: ["
|
|
387
|
+
referencedColumns: ["org_phone", "org_id"];
|
|
192
388
|
}
|
|
193
389
|
];
|
|
194
390
|
};
|
|
@@ -197,43 +393,45 @@ export interface Database {
|
|
|
197
393
|
author: string | null;
|
|
198
394
|
body: string | null;
|
|
199
395
|
chat_id: string | null;
|
|
200
|
-
group_notification_id: string;
|
|
201
396
|
id: Json | null;
|
|
397
|
+
notification_id: string;
|
|
202
398
|
org_id: string;
|
|
203
399
|
org_phone: string;
|
|
204
400
|
recipientids: string[] | null;
|
|
205
401
|
timestamp: string | null;
|
|
206
402
|
type: string | null;
|
|
403
|
+
unique_id: string | null;
|
|
207
404
|
};
|
|
208
405
|
Insert: {
|
|
209
406
|
author?: string | null;
|
|
210
407
|
body?: string | null;
|
|
211
408
|
chat_id?: string | null;
|
|
212
|
-
group_notification_id: string;
|
|
213
409
|
id?: Json | null;
|
|
410
|
+
notification_id: string;
|
|
214
411
|
org_id: string;
|
|
215
412
|
org_phone: string;
|
|
216
413
|
recipientids?: string[] | null;
|
|
217
414
|
timestamp?: string | null;
|
|
218
415
|
type?: string | null;
|
|
416
|
+
unique_id?: string | null;
|
|
219
417
|
};
|
|
220
418
|
Update: {
|
|
221
419
|
author?: string | null;
|
|
222
420
|
body?: string | null;
|
|
223
421
|
chat_id?: string | null;
|
|
224
|
-
group_notification_id?: string;
|
|
225
422
|
id?: Json | null;
|
|
423
|
+
notification_id?: string;
|
|
226
424
|
org_id?: string;
|
|
227
425
|
org_phone?: string;
|
|
228
426
|
recipientids?: string[] | null;
|
|
229
427
|
timestamp?: string | null;
|
|
230
428
|
type?: string | null;
|
|
429
|
+
unique_id?: string | null;
|
|
231
430
|
};
|
|
232
431
|
Relationships: [
|
|
233
432
|
{
|
|
234
433
|
foreignKeyName: "tbl_chat_notifications_fkey_tbl_org_phones";
|
|
235
434
|
columns: ["org_id", "org_phone"];
|
|
236
|
-
isOneToOne: false;
|
|
237
435
|
referencedRelation: "tbl_org_phones";
|
|
238
436
|
referencedColumns: ["org_id", "org_phone"];
|
|
239
437
|
}
|
|
@@ -247,6 +445,7 @@ export interface Database {
|
|
|
247
445
|
is_admin: boolean | null;
|
|
248
446
|
is_super_admin: boolean | null;
|
|
249
447
|
org_id: string;
|
|
448
|
+
org_phone: string;
|
|
250
449
|
};
|
|
251
450
|
Insert: {
|
|
252
451
|
chat_id: string;
|
|
@@ -255,6 +454,7 @@ export interface Database {
|
|
|
255
454
|
is_admin?: boolean | null;
|
|
256
455
|
is_super_admin?: boolean | null;
|
|
257
456
|
org_id: string;
|
|
457
|
+
org_phone: string;
|
|
258
458
|
};
|
|
259
459
|
Update: {
|
|
260
460
|
chat_id?: string;
|
|
@@ -263,14 +463,50 @@ export interface Database {
|
|
|
263
463
|
is_admin?: boolean | null;
|
|
264
464
|
is_super_admin?: boolean | null;
|
|
265
465
|
org_id?: string;
|
|
466
|
+
org_phone?: string;
|
|
467
|
+
};
|
|
468
|
+
Relationships: [
|
|
469
|
+
{
|
|
470
|
+
foreignKeyName: "tbl_chat_participants_fkey_tbl_chats";
|
|
471
|
+
columns: ["org_id", "org_phone", "chat_id"];
|
|
472
|
+
referencedRelation: "tbl_chats";
|
|
473
|
+
referencedColumns: ["org_id", "org_phone", "chat_id"];
|
|
474
|
+
}
|
|
475
|
+
];
|
|
476
|
+
};
|
|
477
|
+
tbl_chat_properties: {
|
|
478
|
+
Row: {
|
|
479
|
+
chat_id: string;
|
|
480
|
+
custom_properties: Json | null;
|
|
481
|
+
flag_count: number;
|
|
482
|
+
hubspot_metadata: Json | null;
|
|
483
|
+
label_ids: Json | null;
|
|
484
|
+
org_id: string;
|
|
485
|
+
};
|
|
486
|
+
Insert: {
|
|
487
|
+
chat_id: string;
|
|
488
|
+
custom_properties?: Json | null;
|
|
489
|
+
flag_count?: number;
|
|
490
|
+
hubspot_metadata?: Json | null;
|
|
491
|
+
label_ids?: Json | null;
|
|
492
|
+
org_id: string;
|
|
493
|
+
};
|
|
494
|
+
Update: {
|
|
495
|
+
chat_id?: string;
|
|
496
|
+
custom_properties?: Json | null;
|
|
497
|
+
flag_count?: number;
|
|
498
|
+
hubspot_metadata?: Json | null;
|
|
499
|
+
label_ids?: Json | null;
|
|
500
|
+
org_id?: string;
|
|
266
501
|
};
|
|
267
502
|
Relationships: [];
|
|
268
503
|
};
|
|
269
504
|
tbl_chat_reactions: {
|
|
270
505
|
Row: {
|
|
271
506
|
ack: number | null;
|
|
507
|
+
chat_id: string | null;
|
|
272
508
|
id: Json | null;
|
|
273
|
-
message_id: string
|
|
509
|
+
message_id: string;
|
|
274
510
|
msg_id: Json | null;
|
|
275
511
|
org_id: string;
|
|
276
512
|
org_phone: string;
|
|
@@ -279,13 +515,15 @@ export interface Database {
|
|
|
279
515
|
reaction: string | null;
|
|
280
516
|
reaction_id: string;
|
|
281
517
|
read: boolean | null;
|
|
282
|
-
sender_id: string
|
|
518
|
+
sender_id: string;
|
|
283
519
|
timestamp: string | null;
|
|
520
|
+
unique_id: string | null;
|
|
284
521
|
};
|
|
285
522
|
Insert: {
|
|
286
523
|
ack?: number | null;
|
|
524
|
+
chat_id?: string | null;
|
|
287
525
|
id?: Json | null;
|
|
288
|
-
message_id
|
|
526
|
+
message_id: string;
|
|
289
527
|
msg_id?: Json | null;
|
|
290
528
|
org_id: string;
|
|
291
529
|
org_phone: string;
|
|
@@ -294,13 +532,15 @@ export interface Database {
|
|
|
294
532
|
reaction?: string | null;
|
|
295
533
|
reaction_id: string;
|
|
296
534
|
read?: boolean | null;
|
|
297
|
-
sender_id
|
|
535
|
+
sender_id: string;
|
|
298
536
|
timestamp?: string | null;
|
|
537
|
+
unique_id?: string | null;
|
|
299
538
|
};
|
|
300
539
|
Update: {
|
|
301
540
|
ack?: number | null;
|
|
541
|
+
chat_id?: string | null;
|
|
302
542
|
id?: Json | null;
|
|
303
|
-
message_id?: string
|
|
543
|
+
message_id?: string;
|
|
304
544
|
msg_id?: Json | null;
|
|
305
545
|
org_id?: string;
|
|
306
546
|
org_phone?: string;
|
|
@@ -309,31 +549,105 @@ export interface Database {
|
|
|
309
549
|
reaction?: string | null;
|
|
310
550
|
reaction_id?: string;
|
|
311
551
|
read?: boolean | null;
|
|
312
|
-
sender_id?: string
|
|
552
|
+
sender_id?: string;
|
|
313
553
|
timestamp?: string | null;
|
|
554
|
+
unique_id?: string | null;
|
|
314
555
|
};
|
|
315
556
|
Relationships: [
|
|
316
557
|
{
|
|
317
558
|
foreignKeyName: "tbl_chat_reactions_fkey_tbl_org_phones";
|
|
318
559
|
columns: ["org_id", "org_phone"];
|
|
319
|
-
isOneToOne: false;
|
|
320
560
|
referencedRelation: "tbl_org_phones";
|
|
321
561
|
referencedColumns: ["org_id", "org_phone"];
|
|
322
562
|
}
|
|
323
563
|
];
|
|
324
564
|
};
|
|
565
|
+
tbl_chat_tickets: {
|
|
566
|
+
Row: {
|
|
567
|
+
assigned_by: string | null;
|
|
568
|
+
assignee: string | null;
|
|
569
|
+
chat_id: string;
|
|
570
|
+
created_at: string;
|
|
571
|
+
due_date: string | null;
|
|
572
|
+
hubspot_metadata: Json | null;
|
|
573
|
+
is_deleted: boolean;
|
|
574
|
+
label_ids: Json | null;
|
|
575
|
+
last_updated_at: string;
|
|
576
|
+
org_id: string;
|
|
577
|
+
priority: number | null;
|
|
578
|
+
quoted_message_id: string | null;
|
|
579
|
+
raised_by: string | null;
|
|
580
|
+
status: Database["public"]["Enums"]["enum_chat_tickets_status"] | null;
|
|
581
|
+
subject: string;
|
|
582
|
+
ticket_id: string;
|
|
583
|
+
};
|
|
584
|
+
Insert: {
|
|
585
|
+
assigned_by?: string | null;
|
|
586
|
+
assignee?: string | null;
|
|
587
|
+
chat_id: string;
|
|
588
|
+
created_at?: string;
|
|
589
|
+
due_date?: string | null;
|
|
590
|
+
hubspot_metadata?: Json | null;
|
|
591
|
+
is_deleted?: boolean;
|
|
592
|
+
label_ids?: Json | null;
|
|
593
|
+
last_updated_at?: string;
|
|
594
|
+
org_id: string;
|
|
595
|
+
priority?: number | null;
|
|
596
|
+
quoted_message_id?: string | null;
|
|
597
|
+
raised_by?: string | null;
|
|
598
|
+
status?: Database["public"]["Enums"]["enum_chat_tickets_status"] | null;
|
|
599
|
+
subject: string;
|
|
600
|
+
ticket_id?: string;
|
|
601
|
+
};
|
|
602
|
+
Update: {
|
|
603
|
+
assigned_by?: string | null;
|
|
604
|
+
assignee?: string | null;
|
|
605
|
+
chat_id?: string;
|
|
606
|
+
created_at?: string;
|
|
607
|
+
due_date?: string | null;
|
|
608
|
+
hubspot_metadata?: Json | null;
|
|
609
|
+
is_deleted?: boolean;
|
|
610
|
+
label_ids?: Json | null;
|
|
611
|
+
last_updated_at?: string;
|
|
612
|
+
org_id?: string;
|
|
613
|
+
priority?: number | null;
|
|
614
|
+
quoted_message_id?: string | null;
|
|
615
|
+
raised_by?: string | null;
|
|
616
|
+
status?: Database["public"]["Enums"]["enum_chat_tickets_status"] | null;
|
|
617
|
+
subject?: string;
|
|
618
|
+
ticket_id?: string;
|
|
619
|
+
};
|
|
620
|
+
Relationships: [
|
|
621
|
+
{
|
|
622
|
+
foreignKeyName: "tbl_chat_tickets_org_id_fkey";
|
|
623
|
+
columns: ["org_id"];
|
|
624
|
+
referencedRelation: "tbl_org";
|
|
625
|
+
referencedColumns: ["org_id"];
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
foreignKeyName: "tbl_chat_tickets_org_id_fkey";
|
|
629
|
+
columns: ["org_id"];
|
|
630
|
+
referencedRelation: "view_org";
|
|
631
|
+
referencedColumns: ["org_id"];
|
|
632
|
+
}
|
|
633
|
+
];
|
|
634
|
+
};
|
|
325
635
|
tbl_chats: {
|
|
326
636
|
Row: {
|
|
327
637
|
archived: boolean | null;
|
|
328
638
|
chat_id: string;
|
|
329
639
|
chat_image: string | null;
|
|
640
|
+
chat_name: string | null;
|
|
641
|
+
chat_type: string | null;
|
|
642
|
+
created_at: string;
|
|
330
643
|
group_metadata: Json | null;
|
|
331
644
|
id: Json | null;
|
|
332
645
|
invite_link: string | null;
|
|
333
646
|
is_group: boolean | null;
|
|
334
647
|
is_muted: boolean | null;
|
|
335
648
|
is_read_only: boolean | null;
|
|
336
|
-
|
|
649
|
+
latest_message: Json | null;
|
|
650
|
+
member_count: number | null;
|
|
337
651
|
mute_expiration: number | null;
|
|
338
652
|
name: string | null;
|
|
339
653
|
org_id: string;
|
|
@@ -341,18 +655,23 @@ export interface Database {
|
|
|
341
655
|
pinned: boolean | null;
|
|
342
656
|
timestamp: string | null;
|
|
343
657
|
unread_count: number | null;
|
|
658
|
+
updated_at: string;
|
|
344
659
|
};
|
|
345
660
|
Insert: {
|
|
346
661
|
archived?: boolean | null;
|
|
347
662
|
chat_id: string;
|
|
348
663
|
chat_image?: string | null;
|
|
664
|
+
chat_name?: string | null;
|
|
665
|
+
chat_type?: string | null;
|
|
666
|
+
created_at?: string;
|
|
349
667
|
group_metadata?: Json | null;
|
|
350
668
|
id?: Json | null;
|
|
351
669
|
invite_link?: string | null;
|
|
352
670
|
is_group?: boolean | null;
|
|
353
671
|
is_muted?: boolean | null;
|
|
354
672
|
is_read_only?: boolean | null;
|
|
355
|
-
|
|
673
|
+
latest_message?: Json | null;
|
|
674
|
+
member_count?: number | null;
|
|
356
675
|
mute_expiration?: number | null;
|
|
357
676
|
name?: string | null;
|
|
358
677
|
org_id: string;
|
|
@@ -360,18 +679,23 @@ export interface Database {
|
|
|
360
679
|
pinned?: boolean | null;
|
|
361
680
|
timestamp?: string | null;
|
|
362
681
|
unread_count?: number | null;
|
|
682
|
+
updated_at?: string;
|
|
363
683
|
};
|
|
364
684
|
Update: {
|
|
365
685
|
archived?: boolean | null;
|
|
366
686
|
chat_id?: string;
|
|
367
687
|
chat_image?: string | null;
|
|
688
|
+
chat_name?: string | null;
|
|
689
|
+
chat_type?: string | null;
|
|
690
|
+
created_at?: string;
|
|
368
691
|
group_metadata?: Json | null;
|
|
369
692
|
id?: Json | null;
|
|
370
693
|
invite_link?: string | null;
|
|
371
694
|
is_group?: boolean | null;
|
|
372
695
|
is_muted?: boolean | null;
|
|
373
696
|
is_read_only?: boolean | null;
|
|
374
|
-
|
|
697
|
+
latest_message?: Json | null;
|
|
698
|
+
member_count?: number | null;
|
|
375
699
|
mute_expiration?: number | null;
|
|
376
700
|
name?: string | null;
|
|
377
701
|
org_id?: string;
|
|
@@ -379,22 +703,24 @@ export interface Database {
|
|
|
379
703
|
pinned?: boolean | null;
|
|
380
704
|
timestamp?: string | null;
|
|
381
705
|
unread_count?: number | null;
|
|
706
|
+
updated_at?: string;
|
|
382
707
|
};
|
|
383
708
|
Relationships: [
|
|
384
709
|
{
|
|
385
|
-
foreignKeyName: "
|
|
386
|
-
columns: ["org_id"];
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
referencedColumns: ["org_id"];
|
|
710
|
+
foreignKeyName: "tbl_chats_fkey_tbl_org_phones";
|
|
711
|
+
columns: ["org_phone", "org_id"];
|
|
712
|
+
referencedRelation: "tbl_org_phones";
|
|
713
|
+
referencedColumns: ["org_phone", "org_id"];
|
|
390
714
|
}
|
|
391
715
|
];
|
|
392
716
|
};
|
|
393
717
|
tbl_contacts: {
|
|
394
718
|
Row: {
|
|
719
|
+
business_profile: Json | null;
|
|
395
720
|
contact_color: Database["public"]["Enums"]["enum_chat_colors"] | null;
|
|
396
721
|
contact_id: string;
|
|
397
722
|
contact_image: string | null;
|
|
723
|
+
contact_name: string | null;
|
|
398
724
|
contact_type: string | null;
|
|
399
725
|
id: Json | null;
|
|
400
726
|
is_blocked: boolean | null;
|
|
@@ -412,11 +738,16 @@ export interface Database {
|
|
|
412
738
|
org_id: string;
|
|
413
739
|
pushname: string | null;
|
|
414
740
|
short_name: string | null;
|
|
741
|
+
updated_at: string | null;
|
|
742
|
+
verified_level: number | null;
|
|
743
|
+
verified_name: string | null;
|
|
415
744
|
};
|
|
416
745
|
Insert: {
|
|
746
|
+
business_profile?: Json | null;
|
|
417
747
|
contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null;
|
|
418
748
|
contact_id: string;
|
|
419
749
|
contact_image?: string | null;
|
|
750
|
+
contact_name?: string | null;
|
|
420
751
|
contact_type?: string | null;
|
|
421
752
|
id?: Json | null;
|
|
422
753
|
is_blocked?: boolean | null;
|
|
@@ -434,11 +765,16 @@ export interface Database {
|
|
|
434
765
|
org_id: string;
|
|
435
766
|
pushname?: string | null;
|
|
436
767
|
short_name?: string | null;
|
|
768
|
+
updated_at?: string | null;
|
|
769
|
+
verified_level?: number | null;
|
|
770
|
+
verified_name?: string | null;
|
|
437
771
|
};
|
|
438
772
|
Update: {
|
|
773
|
+
business_profile?: Json | null;
|
|
439
774
|
contact_color?: Database["public"]["Enums"]["enum_chat_colors"] | null;
|
|
440
775
|
contact_id?: string;
|
|
441
776
|
contact_image?: string | null;
|
|
777
|
+
contact_name?: string | null;
|
|
442
778
|
contact_type?: string | null;
|
|
443
779
|
id?: Json | null;
|
|
444
780
|
is_blocked?: boolean | null;
|
|
@@ -456,14 +792,221 @@ export interface Database {
|
|
|
456
792
|
org_id?: string;
|
|
457
793
|
pushname?: string | null;
|
|
458
794
|
short_name?: string | null;
|
|
795
|
+
updated_at?: string | null;
|
|
796
|
+
verified_level?: number | null;
|
|
797
|
+
verified_name?: string | null;
|
|
459
798
|
};
|
|
460
799
|
Relationships: [
|
|
461
800
|
{
|
|
462
801
|
foreignKeyName: "tbl_contacts_org_id_fkey";
|
|
463
802
|
columns: ["org_id"];
|
|
464
|
-
isOneToOne: false;
|
|
465
803
|
referencedRelation: "tbl_org";
|
|
466
804
|
referencedColumns: ["org_id"];
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
foreignKeyName: "tbl_contacts_org_id_fkey";
|
|
808
|
+
columns: ["org_id"];
|
|
809
|
+
referencedRelation: "view_org";
|
|
810
|
+
referencedColumns: ["org_id"];
|
|
811
|
+
}
|
|
812
|
+
];
|
|
813
|
+
};
|
|
814
|
+
tbl_custom_properties: {
|
|
815
|
+
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
|
+
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
|
+
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
|
+
Relationships: [
|
|
846
|
+
{
|
|
847
|
+
foreignKeyName: "tbl_custom_properties_org_id_fkey";
|
|
848
|
+
columns: ["org_id"];
|
|
849
|
+
referencedRelation: "tbl_org";
|
|
850
|
+
referencedColumns: ["org_id"];
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
foreignKeyName: "tbl_custom_properties_org_id_fkey";
|
|
854
|
+
columns: ["org_id"];
|
|
855
|
+
referencedRelation: "view_org";
|
|
856
|
+
referencedColumns: ["org_id"];
|
|
857
|
+
}
|
|
858
|
+
];
|
|
859
|
+
};
|
|
860
|
+
tbl_integration_hooks: {
|
|
861
|
+
Row: {
|
|
862
|
+
hook_url: string;
|
|
863
|
+
id: string;
|
|
864
|
+
integration_id: string | null;
|
|
865
|
+
integration_metadata: Json;
|
|
866
|
+
integration_name: Database["public"]["Enums"]["enum_integration_name"];
|
|
867
|
+
integration_type: string;
|
|
868
|
+
is_subscribed: boolean;
|
|
869
|
+
org_id: string;
|
|
870
|
+
subscribed_at: string;
|
|
871
|
+
type: Database["public"]["Enums"]["enum_integration_type"];
|
|
872
|
+
};
|
|
873
|
+
Insert: {
|
|
874
|
+
hook_url: string;
|
|
875
|
+
id?: string;
|
|
876
|
+
integration_id?: string | null;
|
|
877
|
+
integration_metadata: Json;
|
|
878
|
+
integration_name: Database["public"]["Enums"]["enum_integration_name"];
|
|
879
|
+
integration_type: string;
|
|
880
|
+
is_subscribed: boolean;
|
|
881
|
+
org_id: string;
|
|
882
|
+
subscribed_at?: string;
|
|
883
|
+
type: Database["public"]["Enums"]["enum_integration_type"];
|
|
884
|
+
};
|
|
885
|
+
Update: {
|
|
886
|
+
hook_url?: string;
|
|
887
|
+
id?: string;
|
|
888
|
+
integration_id?: string | null;
|
|
889
|
+
integration_metadata?: Json;
|
|
890
|
+
integration_name?: Database["public"]["Enums"]["enum_integration_name"];
|
|
891
|
+
integration_type?: string;
|
|
892
|
+
is_subscribed?: boolean;
|
|
893
|
+
org_id?: string;
|
|
894
|
+
subscribed_at?: string;
|
|
895
|
+
type?: Database["public"]["Enums"]["enum_integration_type"];
|
|
896
|
+
};
|
|
897
|
+
Relationships: [
|
|
898
|
+
{
|
|
899
|
+
foreignKeyName: "tbl_integration_hooks_org_id_fkey";
|
|
900
|
+
columns: ["org_id"];
|
|
901
|
+
referencedRelation: "tbl_org";
|
|
902
|
+
referencedColumns: ["org_id"];
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
foreignKeyName: "tbl_integration_hooks_org_id_fkey";
|
|
906
|
+
columns: ["org_id"];
|
|
907
|
+
referencedRelation: "view_org";
|
|
908
|
+
referencedColumns: ["org_id"];
|
|
909
|
+
}
|
|
910
|
+
];
|
|
911
|
+
};
|
|
912
|
+
tbl_integration_logs: {
|
|
913
|
+
Row: {
|
|
914
|
+
created_at: string;
|
|
915
|
+
id: string;
|
|
916
|
+
integration_name: Database["public"]["Enums"]["enum_integration_name"];
|
|
917
|
+
integration_type: string;
|
|
918
|
+
metadata: Json;
|
|
919
|
+
org_id: string;
|
|
920
|
+
response: Json | null;
|
|
921
|
+
success: boolean;
|
|
922
|
+
type: Database["public"]["Enums"]["enum_integration_type"];
|
|
923
|
+
};
|
|
924
|
+
Insert: {
|
|
925
|
+
created_at?: string;
|
|
926
|
+
id?: string;
|
|
927
|
+
integration_name: Database["public"]["Enums"]["enum_integration_name"];
|
|
928
|
+
integration_type: string;
|
|
929
|
+
metadata?: Json;
|
|
930
|
+
org_id: string;
|
|
931
|
+
response?: Json | null;
|
|
932
|
+
success?: boolean;
|
|
933
|
+
type: Database["public"]["Enums"]["enum_integration_type"];
|
|
934
|
+
};
|
|
935
|
+
Update: {
|
|
936
|
+
created_at?: string;
|
|
937
|
+
id?: string;
|
|
938
|
+
integration_name?: Database["public"]["Enums"]["enum_integration_name"];
|
|
939
|
+
integration_type?: string;
|
|
940
|
+
metadata?: Json;
|
|
941
|
+
org_id?: string;
|
|
942
|
+
response?: Json | null;
|
|
943
|
+
success?: boolean;
|
|
944
|
+
type?: Database["public"]["Enums"]["enum_integration_type"];
|
|
945
|
+
};
|
|
946
|
+
Relationships: [
|
|
947
|
+
{
|
|
948
|
+
foreignKeyName: "tbl_integration_logs_org_id_fkey";
|
|
949
|
+
columns: ["org_id"];
|
|
950
|
+
referencedRelation: "tbl_org";
|
|
951
|
+
referencedColumns: ["org_id"];
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
foreignKeyName: "tbl_integration_logs_org_id_fkey";
|
|
955
|
+
columns: ["org_id"];
|
|
956
|
+
referencedRelation: "view_org";
|
|
957
|
+
referencedColumns: ["org_id"];
|
|
958
|
+
}
|
|
959
|
+
];
|
|
960
|
+
};
|
|
961
|
+
tbl_integration_tokens: {
|
|
962
|
+
Row: {
|
|
963
|
+
exp: string;
|
|
964
|
+
iat: string;
|
|
965
|
+
id: string;
|
|
966
|
+
is_revealed: boolean;
|
|
967
|
+
name: string;
|
|
968
|
+
org_id: string;
|
|
969
|
+
role: string;
|
|
970
|
+
token: string;
|
|
971
|
+
token_metadata: Json | null;
|
|
972
|
+
type: Database["public"]["Enums"]["enum_integration_type"];
|
|
973
|
+
};
|
|
974
|
+
Insert: {
|
|
975
|
+
exp: string;
|
|
976
|
+
iat: string;
|
|
977
|
+
id?: string;
|
|
978
|
+
is_revealed?: boolean;
|
|
979
|
+
name: string;
|
|
980
|
+
org_id: string;
|
|
981
|
+
role: string;
|
|
982
|
+
token: string;
|
|
983
|
+
token_metadata?: Json | null;
|
|
984
|
+
type: Database["public"]["Enums"]["enum_integration_type"];
|
|
985
|
+
};
|
|
986
|
+
Update: {
|
|
987
|
+
exp?: string;
|
|
988
|
+
iat?: string;
|
|
989
|
+
id?: string;
|
|
990
|
+
is_revealed?: boolean;
|
|
991
|
+
name?: string;
|
|
992
|
+
org_id?: string;
|
|
993
|
+
role?: string;
|
|
994
|
+
token?: string;
|
|
995
|
+
token_metadata?: Json | null;
|
|
996
|
+
type?: Database["public"]["Enums"]["enum_integration_type"];
|
|
997
|
+
};
|
|
998
|
+
Relationships: [
|
|
999
|
+
{
|
|
1000
|
+
foreignKeyName: "public_tbl_integration_tokens_org_id_fkey";
|
|
1001
|
+
columns: ["org_id"];
|
|
1002
|
+
referencedRelation: "tbl_org";
|
|
1003
|
+
referencedColumns: ["org_id"];
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
foreignKeyName: "public_tbl_integration_tokens_org_id_fkey";
|
|
1007
|
+
columns: ["org_id"];
|
|
1008
|
+
referencedRelation: "view_org";
|
|
1009
|
+
referencedColumns: ["org_id"];
|
|
467
1010
|
}
|
|
468
1011
|
];
|
|
469
1012
|
};
|
|
@@ -472,21 +1015,36 @@ export interface Database {
|
|
|
472
1015
|
created_at: string;
|
|
473
1016
|
org_id: string;
|
|
474
1017
|
org_image: string | null;
|
|
1018
|
+
org_metadata: Json | null;
|
|
475
1019
|
org_name: string | null;
|
|
1020
|
+
org_plan: Json | null;
|
|
1021
|
+
stripe_customer_details: Json | null;
|
|
1022
|
+
stripe_customer_id: string | null;
|
|
1023
|
+
stripe_subscription_details: Json | null;
|
|
476
1024
|
support_link: string | null;
|
|
477
1025
|
};
|
|
478
1026
|
Insert: {
|
|
479
1027
|
created_at?: string;
|
|
480
1028
|
org_id?: string;
|
|
481
1029
|
org_image?: string | null;
|
|
1030
|
+
org_metadata?: Json | null;
|
|
482
1031
|
org_name?: string | null;
|
|
1032
|
+
org_plan?: Json | null;
|
|
1033
|
+
stripe_customer_details?: Json | null;
|
|
1034
|
+
stripe_customer_id?: string | null;
|
|
1035
|
+
stripe_subscription_details?: Json | null;
|
|
483
1036
|
support_link?: string | null;
|
|
484
1037
|
};
|
|
485
1038
|
Update: {
|
|
486
1039
|
created_at?: string;
|
|
487
1040
|
org_id?: string;
|
|
488
1041
|
org_image?: string | null;
|
|
1042
|
+
org_metadata?: Json | null;
|
|
489
1043
|
org_name?: string | null;
|
|
1044
|
+
org_plan?: Json | null;
|
|
1045
|
+
stripe_customer_details?: Json | null;
|
|
1046
|
+
stripe_customer_id?: string | null;
|
|
1047
|
+
stripe_subscription_details?: Json | null;
|
|
490
1048
|
support_link?: string | null;
|
|
491
1049
|
};
|
|
492
1050
|
Relationships: [];
|
|
@@ -505,7 +1063,7 @@ export interface Database {
|
|
|
505
1063
|
created_at?: string;
|
|
506
1064
|
label_id?: string;
|
|
507
1065
|
name: string;
|
|
508
|
-
org_id
|
|
1066
|
+
org_id: string;
|
|
509
1067
|
type?: string;
|
|
510
1068
|
};
|
|
511
1069
|
Update: {
|
|
@@ -520,9 +1078,14 @@ export interface Database {
|
|
|
520
1078
|
{
|
|
521
1079
|
foreignKeyName: "tbl_org_labels_org_id_fkey";
|
|
522
1080
|
columns: ["org_id"];
|
|
523
|
-
isOneToOne: false;
|
|
524
1081
|
referencedRelation: "tbl_org";
|
|
525
1082
|
referencedColumns: ["org_id"];
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
foreignKeyName: "tbl_org_labels_org_id_fkey";
|
|
1086
|
+
columns: ["org_id"];
|
|
1087
|
+
referencedRelation: "view_org";
|
|
1088
|
+
referencedColumns: ["org_id"];
|
|
526
1089
|
}
|
|
527
1090
|
];
|
|
528
1091
|
};
|
|
@@ -533,9 +1096,14 @@ export interface Database {
|
|
|
533
1096
|
invited_at: string | null;
|
|
534
1097
|
invited_by: string | null;
|
|
535
1098
|
is_active: boolean;
|
|
1099
|
+
is_owner: boolean | null;
|
|
1100
|
+
label_ids: string[] | null;
|
|
1101
|
+
member_color: Database["public"]["Enums"]["enum_chat_colors"];
|
|
536
1102
|
member_image: string | null;
|
|
537
1103
|
member_name: string | null;
|
|
538
1104
|
org_id: string;
|
|
1105
|
+
org_phones: string[] | null;
|
|
1106
|
+
preferences: Json;
|
|
539
1107
|
role: Database["public"]["Enums"]["enum_member_role"];
|
|
540
1108
|
user_id: string | null;
|
|
541
1109
|
};
|
|
@@ -545,9 +1113,14 @@ export interface Database {
|
|
|
545
1113
|
invited_at?: string | null;
|
|
546
1114
|
invited_by?: string | null;
|
|
547
1115
|
is_active?: boolean;
|
|
1116
|
+
is_owner?: boolean | null;
|
|
1117
|
+
label_ids?: string[] | null;
|
|
1118
|
+
member_color?: Database["public"]["Enums"]["enum_chat_colors"];
|
|
548
1119
|
member_image?: string | null;
|
|
549
1120
|
member_name?: string | null;
|
|
550
1121
|
org_id: string;
|
|
1122
|
+
org_phones?: string[] | null;
|
|
1123
|
+
preferences?: Json;
|
|
551
1124
|
role?: Database["public"]["Enums"]["enum_member_role"];
|
|
552
1125
|
user_id?: string | null;
|
|
553
1126
|
};
|
|
@@ -557,9 +1130,14 @@ export interface Database {
|
|
|
557
1130
|
invited_at?: string | null;
|
|
558
1131
|
invited_by?: string | null;
|
|
559
1132
|
is_active?: boolean;
|
|
1133
|
+
is_owner?: boolean | null;
|
|
1134
|
+
label_ids?: string[] | null;
|
|
1135
|
+
member_color?: Database["public"]["Enums"]["enum_chat_colors"];
|
|
560
1136
|
member_image?: string | null;
|
|
561
1137
|
member_name?: string | null;
|
|
562
1138
|
org_id?: string;
|
|
1139
|
+
org_phones?: string[] | null;
|
|
1140
|
+
preferences?: Json;
|
|
563
1141
|
role?: Database["public"]["Enums"]["enum_member_role"];
|
|
564
1142
|
user_id?: string | null;
|
|
565
1143
|
};
|
|
@@ -567,106 +1145,291 @@ export interface Database {
|
|
|
567
1145
|
{
|
|
568
1146
|
foreignKeyName: "tbl_org_members_fkey_auth_users";
|
|
569
1147
|
columns: ["user_id"];
|
|
570
|
-
isOneToOne: false;
|
|
571
1148
|
referencedRelation: "users";
|
|
572
1149
|
referencedColumns: ["id"];
|
|
573
1150
|
},
|
|
574
1151
|
{
|
|
575
1152
|
foreignKeyName: "tbl_org_members_fkey_tbl_org";
|
|
576
1153
|
columns: ["org_id"];
|
|
577
|
-
isOneToOne: false;
|
|
578
1154
|
referencedRelation: "tbl_org";
|
|
579
1155
|
referencedColumns: ["org_id"];
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
foreignKeyName: "tbl_org_members_fkey_tbl_org";
|
|
1159
|
+
columns: ["org_id"];
|
|
1160
|
+
referencedRelation: "view_org";
|
|
1161
|
+
referencedColumns: ["org_id"];
|
|
580
1162
|
}
|
|
581
1163
|
];
|
|
582
1164
|
};
|
|
583
1165
|
tbl_org_phones: {
|
|
584
1166
|
Row: {
|
|
585
1167
|
created_at: string;
|
|
586
|
-
|
|
1168
|
+
first_connected_at: string | null;
|
|
1169
|
+
is_browser_open: boolean;
|
|
1170
|
+
is_ready: boolean | null;
|
|
1171
|
+
legacy_version: boolean | null;
|
|
587
1172
|
org_id: string;
|
|
588
1173
|
org_phone: string | null;
|
|
589
1174
|
phone_id: string;
|
|
590
1175
|
phone_image: string | null;
|
|
591
1176
|
phone_name: string | null;
|
|
1177
|
+
phone_state: Json | null;
|
|
592
1178
|
qr_code: string | null;
|
|
593
|
-
|
|
1179
|
+
server_ip: string | null;
|
|
1180
|
+
updated_at: string | null;
|
|
594
1181
|
wa_state: string | null;
|
|
1182
|
+
wa_version: string | null;
|
|
595
1183
|
};
|
|
596
1184
|
Insert: {
|
|
597
1185
|
created_at?: string;
|
|
598
|
-
|
|
1186
|
+
first_connected_at?: string | null;
|
|
1187
|
+
is_browser_open?: boolean;
|
|
1188
|
+
is_ready?: boolean | null;
|
|
1189
|
+
legacy_version?: boolean | null;
|
|
599
1190
|
org_id: string;
|
|
600
1191
|
org_phone?: string | null;
|
|
601
1192
|
phone_id?: string;
|
|
602
1193
|
phone_image?: string | null;
|
|
603
1194
|
phone_name?: string | null;
|
|
1195
|
+
phone_state?: Json | null;
|
|
604
1196
|
qr_code?: string | null;
|
|
605
|
-
|
|
1197
|
+
server_ip?: string | null;
|
|
1198
|
+
updated_at?: string | null;
|
|
606
1199
|
wa_state?: string | null;
|
|
1200
|
+
wa_version?: string | null;
|
|
607
1201
|
};
|
|
608
1202
|
Update: {
|
|
609
1203
|
created_at?: string;
|
|
610
|
-
|
|
1204
|
+
first_connected_at?: string | null;
|
|
1205
|
+
is_browser_open?: boolean;
|
|
1206
|
+
is_ready?: boolean | null;
|
|
1207
|
+
legacy_version?: boolean | null;
|
|
611
1208
|
org_id?: string;
|
|
612
1209
|
org_phone?: string | null;
|
|
613
1210
|
phone_id?: string;
|
|
614
1211
|
phone_image?: string | null;
|
|
615
1212
|
phone_name?: string | null;
|
|
1213
|
+
phone_state?: Json | null;
|
|
616
1214
|
qr_code?: string | null;
|
|
617
|
-
|
|
1215
|
+
server_ip?: string | null;
|
|
1216
|
+
updated_at?: string | null;
|
|
618
1217
|
wa_state?: string | null;
|
|
1218
|
+
wa_version?: string | null;
|
|
619
1219
|
};
|
|
620
1220
|
Relationships: [
|
|
621
1221
|
{
|
|
622
1222
|
foreignKeyName: "tbl_org_phones_fkey_tbl_org";
|
|
623
1223
|
columns: ["org_id"];
|
|
624
|
-
isOneToOne: false;
|
|
625
1224
|
referencedRelation: "tbl_org";
|
|
626
1225
|
referencedColumns: ["org_id"];
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
foreignKeyName: "tbl_org_phones_fkey_tbl_org";
|
|
1229
|
+
columns: ["org_id"];
|
|
1230
|
+
referencedRelation: "view_org";
|
|
1231
|
+
referencedColumns: ["org_id"];
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
foreignKeyName: "tbl_org_phones_org_id_fkey";
|
|
1235
|
+
columns: ["org_id"];
|
|
1236
|
+
referencedRelation: "tbl_org";
|
|
1237
|
+
referencedColumns: ["org_id"];
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
foreignKeyName: "tbl_org_phones_org_id_fkey";
|
|
1241
|
+
columns: ["org_id"];
|
|
1242
|
+
referencedRelation: "view_org";
|
|
1243
|
+
referencedColumns: ["org_id"];
|
|
627
1244
|
}
|
|
628
1245
|
];
|
|
629
1246
|
};
|
|
1247
|
+
tbl_quick_replies: {
|
|
1248
|
+
Row: {
|
|
1249
|
+
command: string | null;
|
|
1250
|
+
created_at: string;
|
|
1251
|
+
message_payload: Json | null;
|
|
1252
|
+
org_id: string | null;
|
|
1253
|
+
reply_id: string;
|
|
1254
|
+
};
|
|
1255
|
+
Insert: {
|
|
1256
|
+
command?: string | null;
|
|
1257
|
+
created_at?: string;
|
|
1258
|
+
message_payload?: Json | null;
|
|
1259
|
+
org_id?: string | null;
|
|
1260
|
+
reply_id?: string;
|
|
1261
|
+
};
|
|
1262
|
+
Update: {
|
|
1263
|
+
command?: string | null;
|
|
1264
|
+
created_at?: string;
|
|
1265
|
+
message_payload?: Json | null;
|
|
1266
|
+
org_id?: string | null;
|
|
1267
|
+
reply_id?: string;
|
|
1268
|
+
};
|
|
1269
|
+
Relationships: [
|
|
1270
|
+
{
|
|
1271
|
+
foreignKeyName: "tbl_quick_replies_org_id_fkey";
|
|
1272
|
+
columns: ["org_id"];
|
|
1273
|
+
referencedRelation: "tbl_org";
|
|
1274
|
+
referencedColumns: ["org_id"];
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
foreignKeyName: "tbl_quick_replies_org_id_fkey";
|
|
1278
|
+
columns: ["org_id"];
|
|
1279
|
+
referencedRelation: "view_org";
|
|
1280
|
+
referencedColumns: ["org_id"];
|
|
1281
|
+
}
|
|
1282
|
+
];
|
|
1283
|
+
};
|
|
1284
|
+
tbl_tools_whatsapp_links: {
|
|
1285
|
+
Row: {
|
|
1286
|
+
created_at: string;
|
|
1287
|
+
link_id: string;
|
|
1288
|
+
link_name: string;
|
|
1289
|
+
message: string | null;
|
|
1290
|
+
phone: string;
|
|
1291
|
+
};
|
|
1292
|
+
Insert: {
|
|
1293
|
+
created_at?: string;
|
|
1294
|
+
link_id?: string;
|
|
1295
|
+
link_name: string;
|
|
1296
|
+
message?: string | null;
|
|
1297
|
+
phone: string;
|
|
1298
|
+
};
|
|
1299
|
+
Update: {
|
|
1300
|
+
created_at?: string;
|
|
1301
|
+
link_id?: string;
|
|
1302
|
+
link_name?: string;
|
|
1303
|
+
message?: string | null;
|
|
1304
|
+
phone?: string;
|
|
1305
|
+
};
|
|
1306
|
+
Relationships: [];
|
|
1307
|
+
};
|
|
630
1308
|
};
|
|
631
1309
|
Views: {
|
|
1310
|
+
view_broadcast_logs: {
|
|
1311
|
+
Row: {
|
|
1312
|
+
broadcast_id: string | null;
|
|
1313
|
+
created_at: string | null;
|
|
1314
|
+
delivery_percentage: number | null;
|
|
1315
|
+
failed_chats: number | null;
|
|
1316
|
+
message_payload: Json | null;
|
|
1317
|
+
org_id: string | null;
|
|
1318
|
+
pending_chats: number | null;
|
|
1319
|
+
performed_at: string | null;
|
|
1320
|
+
performed_by: string | null;
|
|
1321
|
+
read_percentage: number | null;
|
|
1322
|
+
scheduled_at: string | null;
|
|
1323
|
+
sent_chats: number | null;
|
|
1324
|
+
total_chats: number | null;
|
|
1325
|
+
total_delivered_count: number | null;
|
|
1326
|
+
total_member_count: number | null;
|
|
1327
|
+
total_read_count: number | null;
|
|
1328
|
+
};
|
|
1329
|
+
Relationships: [
|
|
1330
|
+
{
|
|
1331
|
+
foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
|
|
1332
|
+
columns: ["org_id"];
|
|
1333
|
+
referencedRelation: "tbl_org";
|
|
1334
|
+
referencedColumns: ["org_id"];
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
|
|
1338
|
+
columns: ["org_id"];
|
|
1339
|
+
referencedRelation: "view_org";
|
|
1340
|
+
referencedColumns: ["org_id"];
|
|
1341
|
+
}
|
|
1342
|
+
];
|
|
1343
|
+
};
|
|
632
1344
|
view_chats: {
|
|
633
1345
|
Row: {
|
|
634
|
-
|
|
1346
|
+
active_phone: string | null;
|
|
635
1347
|
chat_access: Json | null;
|
|
636
1348
|
chat_id: string | null;
|
|
637
1349
|
chat_image: string | null;
|
|
1350
|
+
chat_name: string | null;
|
|
638
1351
|
chat_type: string | null;
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
1352
|
+
created_at: string | null;
|
|
1353
|
+
custom_properties: Json | null;
|
|
1354
|
+
flag_count: number | null;
|
|
1355
|
+
group_description: string | null;
|
|
1356
|
+
hubspot_metadata: Json | null;
|
|
642
1357
|
invite_link: string | null;
|
|
643
|
-
|
|
1358
|
+
is_archived: boolean | null;
|
|
644
1359
|
is_muted: boolean | null;
|
|
645
|
-
is_read_only: boolean | null;
|
|
646
1360
|
label_ids: Json | null;
|
|
647
1361
|
last_read_timestamp: string | null;
|
|
648
1362
|
latest_message: Json | null;
|
|
649
|
-
latest_message_timestamp: string | null;
|
|
650
1363
|
member_count: number | null;
|
|
651
1364
|
message_unread_count: number | null;
|
|
652
|
-
mute_expiration: number | null;
|
|
653
|
-
name: string | null;
|
|
654
1365
|
org_id: string | null;
|
|
655
|
-
org_participants: Json | null;
|
|
656
1366
|
org_phone: string | null;
|
|
657
|
-
|
|
658
|
-
timestamp: string | null;
|
|
659
|
-
unread_count: number | null;
|
|
1367
|
+
updated_at: string | null;
|
|
660
1368
|
};
|
|
661
|
-
Relationships: [
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
1369
|
+
Relationships: [];
|
|
1370
|
+
};
|
|
1371
|
+
view_org: {
|
|
1372
|
+
Row: {
|
|
1373
|
+
created_at: string | null;
|
|
1374
|
+
is_enterprise: boolean | null;
|
|
1375
|
+
is_free_trial: boolean | null;
|
|
1376
|
+
is_hubspot_connected: boolean | null;
|
|
1377
|
+
org_id: string | null;
|
|
1378
|
+
org_image: string | null;
|
|
1379
|
+
org_metadata: Json | null;
|
|
1380
|
+
org_name: string | null;
|
|
1381
|
+
org_plan: Json | null;
|
|
1382
|
+
pending_days: number | null;
|
|
1383
|
+
phone_limit: string | null;
|
|
1384
|
+
plan_id: string | null;
|
|
1385
|
+
stripe_customer_details: Json | null;
|
|
1386
|
+
stripe_customer_id: string | null;
|
|
1387
|
+
stripe_subscription_details: Json | null;
|
|
1388
|
+
subscription_status: string | null;
|
|
1389
|
+
support_link: string | null;
|
|
1390
|
+
user_limit: string | null;
|
|
1391
|
+
};
|
|
1392
|
+
Insert: {
|
|
1393
|
+
created_at?: string | null;
|
|
1394
|
+
is_enterprise?: never;
|
|
1395
|
+
is_free_trial?: never;
|
|
1396
|
+
is_hubspot_connected?: never;
|
|
1397
|
+
org_id?: string | null;
|
|
1398
|
+
org_image?: string | null;
|
|
1399
|
+
org_metadata?: Json | null;
|
|
1400
|
+
org_name?: string | null;
|
|
1401
|
+
org_plan?: Json | null;
|
|
1402
|
+
pending_days?: never;
|
|
1403
|
+
phone_limit?: never;
|
|
1404
|
+
plan_id?: never;
|
|
1405
|
+
stripe_customer_details?: Json | null;
|
|
1406
|
+
stripe_customer_id?: string | null;
|
|
1407
|
+
stripe_subscription_details?: Json | null;
|
|
1408
|
+
subscription_status?: never;
|
|
1409
|
+
support_link?: string | null;
|
|
1410
|
+
user_limit?: never;
|
|
1411
|
+
};
|
|
1412
|
+
Update: {
|
|
1413
|
+
created_at?: string | null;
|
|
1414
|
+
is_enterprise?: never;
|
|
1415
|
+
is_free_trial?: never;
|
|
1416
|
+
is_hubspot_connected?: never;
|
|
1417
|
+
org_id?: string | null;
|
|
1418
|
+
org_image?: string | null;
|
|
1419
|
+
org_metadata?: Json | null;
|
|
1420
|
+
org_name?: string | null;
|
|
1421
|
+
org_plan?: Json | null;
|
|
1422
|
+
pending_days?: never;
|
|
1423
|
+
phone_limit?: never;
|
|
1424
|
+
plan_id?: never;
|
|
1425
|
+
stripe_customer_details?: Json | null;
|
|
1426
|
+
stripe_customer_id?: string | null;
|
|
1427
|
+
stripe_subscription_details?: Json | null;
|
|
1428
|
+
subscription_status?: never;
|
|
1429
|
+
support_link?: string | null;
|
|
1430
|
+
user_limit?: never;
|
|
1431
|
+
};
|
|
1432
|
+
Relationships: [];
|
|
670
1433
|
};
|
|
671
1434
|
};
|
|
672
1435
|
Functions: {
|
|
@@ -678,23 +1441,95 @@ export interface Database {
|
|
|
678
1441
|
};
|
|
679
1442
|
Returns: string;
|
|
680
1443
|
};
|
|
1444
|
+
gen_ticket_id: {
|
|
1445
|
+
Args: {
|
|
1446
|
+
org_id_input: string;
|
|
1447
|
+
};
|
|
1448
|
+
Returns: string;
|
|
1449
|
+
};
|
|
1450
|
+
generate_access_token: {
|
|
1451
|
+
Args: {
|
|
1452
|
+
name_input?: string;
|
|
1453
|
+
type_input?: Database["public"]["Enums"]["enum_integration_type"];
|
|
1454
|
+
org_id_input?: string;
|
|
1455
|
+
};
|
|
1456
|
+
Returns: Json;
|
|
1457
|
+
};
|
|
1458
|
+
get_api_auth_details: {
|
|
1459
|
+
Args: {
|
|
1460
|
+
org_id_input?: string;
|
|
1461
|
+
org_phone_input?: string;
|
|
1462
|
+
token_id_input?: string;
|
|
1463
|
+
token_type_input?: Database["public"]["Enums"]["enum_integration_type"];
|
|
1464
|
+
};
|
|
1465
|
+
Returns: Json;
|
|
1466
|
+
};
|
|
1467
|
+
get_chat_labels_data: {
|
|
1468
|
+
Args: {
|
|
1469
|
+
org_id_input: string;
|
|
1470
|
+
chat_ids_input?: string[];
|
|
1471
|
+
};
|
|
1472
|
+
Returns: unknown;
|
|
1473
|
+
};
|
|
1474
|
+
get_chat_members: {
|
|
1475
|
+
Args: {
|
|
1476
|
+
org_id_input?: string;
|
|
1477
|
+
chat_id_input?: string[];
|
|
1478
|
+
};
|
|
1479
|
+
Returns: Json;
|
|
1480
|
+
};
|
|
681
1481
|
get_chats: {
|
|
682
1482
|
Args: {
|
|
1483
|
+
org_id_input?: string;
|
|
683
1484
|
chat_id_input?: string[];
|
|
684
|
-
|
|
1485
|
+
};
|
|
1486
|
+
Returns: Json;
|
|
1487
|
+
};
|
|
1488
|
+
get_chats_info: {
|
|
1489
|
+
Args: {
|
|
1490
|
+
chat_id_input: string;
|
|
1491
|
+
org_id_input: string;
|
|
1492
|
+
org_phone_input?: string;
|
|
685
1493
|
};
|
|
686
1494
|
Returns: Json;
|
|
687
1495
|
};
|
|
688
1496
|
get_contacts: {
|
|
689
1497
|
Args: {
|
|
1498
|
+
org_id_input: string;
|
|
690
1499
|
contact_ids_input?: string[];
|
|
1500
|
+
with_chats?: boolean;
|
|
1501
|
+
with_name?: boolean;
|
|
1502
|
+
};
|
|
1503
|
+
Returns: Json;
|
|
1504
|
+
};
|
|
1505
|
+
get_dashboard_statistics: {
|
|
1506
|
+
Args: {
|
|
1507
|
+
org_id_input: string;
|
|
1508
|
+
interval_input?: unknown;
|
|
1509
|
+
chat_id_input?: string[];
|
|
691
1510
|
};
|
|
692
1511
|
Returns: Json;
|
|
693
1512
|
};
|
|
694
|
-
|
|
1513
|
+
get_export_chats_data: {
|
|
695
1514
|
Args: {
|
|
696
|
-
|
|
697
|
-
|
|
1515
|
+
org_id_input: string;
|
|
1516
|
+
chat_ids?: string[];
|
|
1517
|
+
};
|
|
1518
|
+
Returns: Json;
|
|
1519
|
+
};
|
|
1520
|
+
get_integration_data: {
|
|
1521
|
+
Args: {
|
|
1522
|
+
org_id_input?: string;
|
|
1523
|
+
};
|
|
1524
|
+
Returns: Json;
|
|
1525
|
+
};
|
|
1526
|
+
get_messages_notifications_reactions: {
|
|
1527
|
+
Args: {
|
|
1528
|
+
org_id_input: string;
|
|
1529
|
+
chat_id_input?: string[];
|
|
1530
|
+
message_limit_input?: number;
|
|
1531
|
+
reaction_notification_limit_input?: number;
|
|
1532
|
+
last_updated_at_input?: string;
|
|
698
1533
|
};
|
|
699
1534
|
Returns: Json;
|
|
700
1535
|
};
|
|
@@ -704,9 +1539,41 @@ export interface Database {
|
|
|
704
1539
|
};
|
|
705
1540
|
Returns: Json;
|
|
706
1541
|
};
|
|
1542
|
+
get_org_phones: {
|
|
1543
|
+
Args: {
|
|
1544
|
+
org_id_input?: string;
|
|
1545
|
+
phone_id_input?: string;
|
|
1546
|
+
};
|
|
1547
|
+
Returns: Json;
|
|
1548
|
+
};
|
|
1549
|
+
get_team_metrics: {
|
|
1550
|
+
Args: {
|
|
1551
|
+
org_id_input: string;
|
|
1552
|
+
chat_id_input?: string[];
|
|
1553
|
+
interval_input?: unknown;
|
|
1554
|
+
};
|
|
1555
|
+
Returns: Json;
|
|
1556
|
+
};
|
|
1557
|
+
get_ticket_info: {
|
|
1558
|
+
Args: {
|
|
1559
|
+
ticket_id_input?: string;
|
|
1560
|
+
org_id_input?: string;
|
|
1561
|
+
chat_id_input?: string;
|
|
1562
|
+
unique_message_id_input?: string;
|
|
1563
|
+
};
|
|
1564
|
+
Returns: Json;
|
|
1565
|
+
};
|
|
1566
|
+
image_path: {
|
|
1567
|
+
Args: {
|
|
1568
|
+
path_input?: string;
|
|
1569
|
+
bucket_name?: string;
|
|
1570
|
+
req_base?: boolean;
|
|
1571
|
+
};
|
|
1572
|
+
Returns: string;
|
|
1573
|
+
};
|
|
707
1574
|
list_org_from_user: {
|
|
708
1575
|
Args: Record<PropertyKey, never>;
|
|
709
|
-
Returns:
|
|
1576
|
+
Returns: unknown;
|
|
710
1577
|
};
|
|
711
1578
|
list_role_from_user: {
|
|
712
1579
|
Args: Record<PropertyKey, never>;
|
|
@@ -714,15 +1581,20 @@ export interface Database {
|
|
|
714
1581
|
};
|
|
715
1582
|
update_labels: {
|
|
716
1583
|
Args: {
|
|
1584
|
+
org_id_input: string;
|
|
717
1585
|
tbl_type: string;
|
|
718
1586
|
label_ids_input: Json;
|
|
719
1587
|
row_id_input: string[];
|
|
1588
|
+
replace_labels?: boolean;
|
|
720
1589
|
};
|
|
721
1590
|
Returns: undefined;
|
|
722
1591
|
};
|
|
723
1592
|
};
|
|
724
1593
|
Enums: {
|
|
725
1594
|
enum_chat_colors: "#B4876E" | "#A5B337" | "#06CF9C" | "#25D366" | "#02A698" | "#7D9EF1" | "#007BFC" | "#5E47DE" | "#7F66FF" | "#9333EA" | "#FA6533" | "#C4532D" | "#DC2626" | "#FF2E74" | "#DB2777";
|
|
1595
|
+
enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived";
|
|
1596
|
+
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" | "message.created" | "message.updated" | "message.deleted" | "message.ack.updated" | "reaction.created" | "reaction.updated" | "ticket.created" | "ticket.updated" | "ticket.deleted";
|
|
1597
|
+
enum_integration_type: "zapier" | "pabbly" | "api" | "webhook" | "hubspot" | "freshdesk" | "slack" | "jira" | "salesforce";
|
|
726
1598
|
enum_member_role: "admin" | "member";
|
|
727
1599
|
};
|
|
728
1600
|
CompositeTypes: {
|
|
@@ -740,7 +1612,6 @@ export interface Database {
|
|
|
740
1612
|
id: string;
|
|
741
1613
|
name: string;
|
|
742
1614
|
owner: string | null;
|
|
743
|
-
owner_id: string | null;
|
|
744
1615
|
public: boolean | null;
|
|
745
1616
|
updated_at: string | null;
|
|
746
1617
|
};
|
|
@@ -752,7 +1623,6 @@ export interface Database {
|
|
|
752
1623
|
id: string;
|
|
753
1624
|
name: string;
|
|
754
1625
|
owner?: string | null;
|
|
755
|
-
owner_id?: string | null;
|
|
756
1626
|
public?: boolean | null;
|
|
757
1627
|
updated_at?: string | null;
|
|
758
1628
|
};
|
|
@@ -764,11 +1634,17 @@ export interface Database {
|
|
|
764
1634
|
id?: string;
|
|
765
1635
|
name?: string;
|
|
766
1636
|
owner?: string | null;
|
|
767
|
-
owner_id?: string | null;
|
|
768
1637
|
public?: boolean | null;
|
|
769
1638
|
updated_at?: string | null;
|
|
770
1639
|
};
|
|
771
|
-
Relationships: [
|
|
1640
|
+
Relationships: [
|
|
1641
|
+
{
|
|
1642
|
+
foreignKeyName: "buckets_owner_fkey";
|
|
1643
|
+
columns: ["owner"];
|
|
1644
|
+
referencedRelation: "users";
|
|
1645
|
+
referencedColumns: ["id"];
|
|
1646
|
+
}
|
|
1647
|
+
];
|
|
772
1648
|
};
|
|
773
1649
|
migrations: {
|
|
774
1650
|
Row: {
|
|
@@ -800,7 +1676,6 @@ export interface Database {
|
|
|
800
1676
|
metadata: Json | null;
|
|
801
1677
|
name: string | null;
|
|
802
1678
|
owner: string | null;
|
|
803
|
-
owner_id: string | null;
|
|
804
1679
|
path_tokens: string[] | null;
|
|
805
1680
|
updated_at: string | null;
|
|
806
1681
|
version: string | null;
|
|
@@ -813,7 +1688,6 @@ export interface Database {
|
|
|
813
1688
|
metadata?: Json | null;
|
|
814
1689
|
name?: string | null;
|
|
815
1690
|
owner?: string | null;
|
|
816
|
-
owner_id?: string | null;
|
|
817
1691
|
path_tokens?: string[] | null;
|
|
818
1692
|
updated_at?: string | null;
|
|
819
1693
|
version?: string | null;
|
|
@@ -826,7 +1700,6 @@ export interface Database {
|
|
|
826
1700
|
metadata?: Json | null;
|
|
827
1701
|
name?: string | null;
|
|
828
1702
|
owner?: string | null;
|
|
829
|
-
owner_id?: string | null;
|
|
830
1703
|
path_tokens?: string[] | null;
|
|
831
1704
|
updated_at?: string | null;
|
|
832
1705
|
version?: string | null;
|
|
@@ -835,7 +1708,6 @@ export interface Database {
|
|
|
835
1708
|
{
|
|
836
1709
|
foreignKeyName: "objects_bucketId_fkey";
|
|
837
1710
|
columns: ["bucket_id"];
|
|
838
|
-
isOneToOne: false;
|
|
839
1711
|
referencedRelation: "buckets";
|
|
840
1712
|
referencedColumns: ["id"];
|
|
841
1713
|
}
|
|
@@ -908,8 +1780,9 @@ export interface Database {
|
|
|
908
1780
|
[_ in never]: never;
|
|
909
1781
|
};
|
|
910
1782
|
};
|
|
911
|
-
}
|
|
912
|
-
|
|
1783
|
+
};
|
|
1784
|
+
type PublicSchema = Database[Extract<keyof Database, "public">];
|
|
1785
|
+
export type Tables<PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) | {
|
|
913
1786
|
schema: keyof Database;
|
|
914
1787
|
}, TableName extends PublicTableNameOrOptions extends {
|
|
915
1788
|
schema: keyof Database;
|
|
@@ -917,10 +1790,10 @@ export type Tables<PublicTableNameOrOptions extends keyof (Database["public"]["T
|
|
|
917
1790
|
schema: keyof Database;
|
|
918
1791
|
} ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] & Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
919
1792
|
Row: infer R;
|
|
920
|
-
} ? R : never : PublicTableNameOrOptions extends keyof (
|
|
1793
|
+
} ? R : never : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) ? (PublicSchema["Tables"] & PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
|
921
1794
|
Row: infer R;
|
|
922
1795
|
} ? R : never : never;
|
|
923
|
-
export type TablesInsert<PublicTableNameOrOptions extends keyof
|
|
1796
|
+
export type TablesInsert<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
|
|
924
1797
|
schema: keyof Database;
|
|
925
1798
|
}, TableName extends PublicTableNameOrOptions extends {
|
|
926
1799
|
schema: keyof Database;
|
|
@@ -928,10 +1801,10 @@ export type TablesInsert<PublicTableNameOrOptions extends keyof Database["public
|
|
|
928
1801
|
schema: keyof Database;
|
|
929
1802
|
} ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
930
1803
|
Insert: infer I;
|
|
931
|
-
} ? I : never : PublicTableNameOrOptions extends keyof
|
|
1804
|
+
} ? I : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
932
1805
|
Insert: infer I;
|
|
933
1806
|
} ? I : never : never;
|
|
934
|
-
export type TablesUpdate<PublicTableNameOrOptions extends keyof
|
|
1807
|
+
export type TablesUpdate<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
|
|
935
1808
|
schema: keyof Database;
|
|
936
1809
|
}, TableName extends PublicTableNameOrOptions extends {
|
|
937
1810
|
schema: keyof Database;
|
|
@@ -939,13 +1812,14 @@ export type TablesUpdate<PublicTableNameOrOptions extends keyof Database["public
|
|
|
939
1812
|
schema: keyof Database;
|
|
940
1813
|
} ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
941
1814
|
Update: infer U;
|
|
942
|
-
} ? U : never : PublicTableNameOrOptions extends keyof
|
|
1815
|
+
} ? U : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
943
1816
|
Update: infer U;
|
|
944
1817
|
} ? U : never : never;
|
|
945
|
-
export type Enums<PublicEnumNameOrOptions extends keyof
|
|
1818
|
+
export type Enums<PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] | {
|
|
946
1819
|
schema: keyof Database;
|
|
947
1820
|
}, EnumName extends PublicEnumNameOrOptions extends {
|
|
948
1821
|
schema: keyof Database;
|
|
949
1822
|
} ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"] : never = never> = PublicEnumNameOrOptions extends {
|
|
950
1823
|
schema: keyof Database;
|
|
951
|
-
} ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] : PublicEnumNameOrOptions extends keyof
|
|
1824
|
+
} ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never;
|
|
1825
|
+
export {};
|