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