@periskope/types 0.6.79 → 0.6.81
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 +76 -2
- package/dist/types.d.ts +24 -9
- package/package.json +2 -2
- package/supabase.types.ts +97 -24
- package/types.ts +25 -9
package/dist/supabase.types.d.ts
CHANGED
|
@@ -76,24 +76,28 @@ export type Database = {
|
|
|
76
76
|
{
|
|
77
77
|
foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey";
|
|
78
78
|
columns: ["broadcast_id"];
|
|
79
|
+
isOneToOne: false;
|
|
79
80
|
referencedRelation: "tbl_broadcast_messages";
|
|
80
81
|
referencedColumns: ["broadcast_id"];
|
|
81
82
|
},
|
|
82
83
|
{
|
|
83
84
|
foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey";
|
|
84
85
|
columns: ["broadcast_id"];
|
|
86
|
+
isOneToOne: false;
|
|
85
87
|
referencedRelation: "view_broadcast_logs";
|
|
86
88
|
referencedColumns: ["broadcast_id"];
|
|
87
89
|
},
|
|
88
90
|
{
|
|
89
91
|
foreignKeyName: "tbl_broadcast_logs_org_id_fkey";
|
|
90
92
|
columns: ["org_id"];
|
|
93
|
+
isOneToOne: false;
|
|
91
94
|
referencedRelation: "tbl_org";
|
|
92
95
|
referencedColumns: ["org_id"];
|
|
93
96
|
},
|
|
94
97
|
{
|
|
95
98
|
foreignKeyName: "tbl_broadcast_logs_org_id_fkey";
|
|
96
99
|
columns: ["org_id"];
|
|
100
|
+
isOneToOne: false;
|
|
97
101
|
referencedRelation: "view_org";
|
|
98
102
|
referencedColumns: ["org_id"];
|
|
99
103
|
}
|
|
@@ -134,12 +138,14 @@ export type Database = {
|
|
|
134
138
|
{
|
|
135
139
|
foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
|
|
136
140
|
columns: ["org_id"];
|
|
141
|
+
isOneToOne: false;
|
|
137
142
|
referencedRelation: "tbl_org";
|
|
138
143
|
referencedColumns: ["org_id"];
|
|
139
144
|
},
|
|
140
145
|
{
|
|
141
146
|
foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
|
|
142
147
|
columns: ["org_id"];
|
|
148
|
+
isOneToOne: false;
|
|
143
149
|
referencedRelation: "view_org";
|
|
144
150
|
referencedColumns: ["org_id"];
|
|
145
151
|
}
|
|
@@ -174,12 +180,14 @@ export type Database = {
|
|
|
174
180
|
{
|
|
175
181
|
foreignKeyName: "tbl_broadcast_templates_org_id_fkey";
|
|
176
182
|
columns: ["org_id"];
|
|
183
|
+
isOneToOne: false;
|
|
177
184
|
referencedRelation: "tbl_org";
|
|
178
185
|
referencedColumns: ["org_id"];
|
|
179
186
|
},
|
|
180
187
|
{
|
|
181
188
|
foreignKeyName: "tbl_broadcast_templates_org_id_fkey";
|
|
182
189
|
columns: ["org_id"];
|
|
190
|
+
isOneToOne: false;
|
|
183
191
|
referencedRelation: "view_org";
|
|
184
192
|
referencedColumns: ["org_id"];
|
|
185
193
|
}
|
|
@@ -217,6 +225,7 @@ export type Database = {
|
|
|
217
225
|
{
|
|
218
226
|
foreignKeyName: "tbl_chat_access_org_id_email_fkey";
|
|
219
227
|
columns: ["org_id", "email"];
|
|
228
|
+
isOneToOne: false;
|
|
220
229
|
referencedRelation: "tbl_org_members";
|
|
221
230
|
referencedColumns: ["org_id", "email"];
|
|
222
231
|
}
|
|
@@ -371,6 +380,7 @@ export type Database = {
|
|
|
371
380
|
{
|
|
372
381
|
foreignKeyName: "tbl_chat_messages_fkey_tbl_org_phones";
|
|
373
382
|
columns: ["org_phone", "org_id"];
|
|
383
|
+
isOneToOne: false;
|
|
374
384
|
referencedRelation: "tbl_org_phones";
|
|
375
385
|
referencedColumns: ["org_phone", "org_id"];
|
|
376
386
|
}
|
|
@@ -420,6 +430,7 @@ export type Database = {
|
|
|
420
430
|
{
|
|
421
431
|
foreignKeyName: "tbl_chat_notifications_fkey_tbl_org_phones";
|
|
422
432
|
columns: ["org_id", "org_phone"];
|
|
433
|
+
isOneToOne: false;
|
|
423
434
|
referencedRelation: "tbl_org_phones";
|
|
424
435
|
referencedColumns: ["org_id", "org_phone"];
|
|
425
436
|
}
|
|
@@ -457,6 +468,7 @@ export type Database = {
|
|
|
457
468
|
{
|
|
458
469
|
foreignKeyName: "tbl_chat_participants_fkey_tbl_chats";
|
|
459
470
|
columns: ["org_id", "org_phone", "chat_id"];
|
|
471
|
+
isOneToOne: false;
|
|
460
472
|
referencedRelation: "tbl_chats";
|
|
461
473
|
referencedColumns: ["org_id", "org_phone", "chat_id"];
|
|
462
474
|
}
|
|
@@ -539,6 +551,7 @@ export type Database = {
|
|
|
539
551
|
{
|
|
540
552
|
foreignKeyName: "tbl_chat_reactions_fkey_tbl_org_phones";
|
|
541
553
|
columns: ["org_id", "org_phone"];
|
|
554
|
+
isOneToOne: false;
|
|
542
555
|
referencedRelation: "tbl_org_phones";
|
|
543
556
|
referencedColumns: ["org_id", "org_phone"];
|
|
544
557
|
}
|
|
@@ -600,12 +613,14 @@ export type Database = {
|
|
|
600
613
|
{
|
|
601
614
|
foreignKeyName: "tbl_chat_tickets_org_id_fkey";
|
|
602
615
|
columns: ["org_id"];
|
|
616
|
+
isOneToOne: false;
|
|
603
617
|
referencedRelation: "tbl_org";
|
|
604
618
|
referencedColumns: ["org_id"];
|
|
605
619
|
},
|
|
606
620
|
{
|
|
607
621
|
foreignKeyName: "tbl_chat_tickets_org_id_fkey";
|
|
608
622
|
columns: ["org_id"];
|
|
623
|
+
isOneToOne: false;
|
|
609
624
|
referencedRelation: "view_org";
|
|
610
625
|
referencedColumns: ["org_id"];
|
|
611
626
|
}
|
|
@@ -688,6 +703,7 @@ export type Database = {
|
|
|
688
703
|
{
|
|
689
704
|
foreignKeyName: "tbl_chats_fkey_tbl_org_phones";
|
|
690
705
|
columns: ["org_phone", "org_id"];
|
|
706
|
+
isOneToOne: false;
|
|
691
707
|
referencedRelation: "tbl_org_phones";
|
|
692
708
|
referencedColumns: ["org_phone", "org_id"];
|
|
693
709
|
}
|
|
@@ -779,12 +795,14 @@ export type Database = {
|
|
|
779
795
|
{
|
|
780
796
|
foreignKeyName: "tbl_contacts_org_id_fkey";
|
|
781
797
|
columns: ["org_id"];
|
|
798
|
+
isOneToOne: false;
|
|
782
799
|
referencedRelation: "tbl_org";
|
|
783
800
|
referencedColumns: ["org_id"];
|
|
784
801
|
},
|
|
785
802
|
{
|
|
786
803
|
foreignKeyName: "tbl_contacts_org_id_fkey";
|
|
787
804
|
columns: ["org_id"];
|
|
805
|
+
isOneToOne: false;
|
|
788
806
|
referencedRelation: "view_org";
|
|
789
807
|
referencedColumns: ["org_id"];
|
|
790
808
|
}
|
|
@@ -825,12 +843,14 @@ export type Database = {
|
|
|
825
843
|
{
|
|
826
844
|
foreignKeyName: "tbl_custom_properties_org_id_fkey";
|
|
827
845
|
columns: ["org_id"];
|
|
846
|
+
isOneToOne: false;
|
|
828
847
|
referencedRelation: "tbl_org";
|
|
829
848
|
referencedColumns: ["org_id"];
|
|
830
849
|
},
|
|
831
850
|
{
|
|
832
851
|
foreignKeyName: "tbl_custom_properties_org_id_fkey";
|
|
833
852
|
columns: ["org_id"];
|
|
853
|
+
isOneToOne: false;
|
|
834
854
|
referencedRelation: "view_org";
|
|
835
855
|
referencedColumns: ["org_id"];
|
|
836
856
|
}
|
|
@@ -839,7 +859,9 @@ export type Database = {
|
|
|
839
859
|
tbl_flagged_messages: {
|
|
840
860
|
Row: {
|
|
841
861
|
chat_id: string | null;
|
|
862
|
+
message_timestamp: string | null;
|
|
842
863
|
org_id: string;
|
|
864
|
+
responder_email: string | null;
|
|
843
865
|
response_id: string | null;
|
|
844
866
|
response_timestamp: string | null;
|
|
845
867
|
response_type: string | null;
|
|
@@ -847,7 +869,9 @@ export type Database = {
|
|
|
847
869
|
};
|
|
848
870
|
Insert: {
|
|
849
871
|
chat_id?: string | null;
|
|
872
|
+
message_timestamp?: string | null;
|
|
850
873
|
org_id: string;
|
|
874
|
+
responder_email?: string | null;
|
|
851
875
|
response_id?: string | null;
|
|
852
876
|
response_timestamp?: string | null;
|
|
853
877
|
response_type?: string | null;
|
|
@@ -855,7 +879,9 @@ export type Database = {
|
|
|
855
879
|
};
|
|
856
880
|
Update: {
|
|
857
881
|
chat_id?: string | null;
|
|
882
|
+
message_timestamp?: string | null;
|
|
858
883
|
org_id?: string;
|
|
884
|
+
responder_email?: string | null;
|
|
859
885
|
response_id?: string | null;
|
|
860
886
|
response_timestamp?: string | null;
|
|
861
887
|
response_type?: string | null;
|
|
@@ -865,12 +891,14 @@ export type Database = {
|
|
|
865
891
|
{
|
|
866
892
|
foreignKeyName: "tbl_flagged_messages_org_id_fkey";
|
|
867
893
|
columns: ["org_id"];
|
|
894
|
+
isOneToOne: false;
|
|
868
895
|
referencedRelation: "tbl_org";
|
|
869
896
|
referencedColumns: ["org_id"];
|
|
870
897
|
},
|
|
871
898
|
{
|
|
872
899
|
foreignKeyName: "tbl_flagged_messages_org_id_fkey";
|
|
873
900
|
columns: ["org_id"];
|
|
901
|
+
isOneToOne: false;
|
|
874
902
|
referencedRelation: "view_org";
|
|
875
903
|
referencedColumns: ["org_id"];
|
|
876
904
|
}
|
|
@@ -917,12 +945,14 @@ export type Database = {
|
|
|
917
945
|
{
|
|
918
946
|
foreignKeyName: "tbl_integration_hooks_org_id_fkey";
|
|
919
947
|
columns: ["org_id"];
|
|
948
|
+
isOneToOne: false;
|
|
920
949
|
referencedRelation: "tbl_org";
|
|
921
950
|
referencedColumns: ["org_id"];
|
|
922
951
|
},
|
|
923
952
|
{
|
|
924
953
|
foreignKeyName: "tbl_integration_hooks_org_id_fkey";
|
|
925
954
|
columns: ["org_id"];
|
|
955
|
+
isOneToOne: false;
|
|
926
956
|
referencedRelation: "view_org";
|
|
927
957
|
referencedColumns: ["org_id"];
|
|
928
958
|
}
|
|
@@ -966,12 +996,14 @@ export type Database = {
|
|
|
966
996
|
{
|
|
967
997
|
foreignKeyName: "tbl_integration_logs_org_id_fkey";
|
|
968
998
|
columns: ["org_id"];
|
|
999
|
+
isOneToOne: false;
|
|
969
1000
|
referencedRelation: "tbl_org";
|
|
970
1001
|
referencedColumns: ["org_id"];
|
|
971
1002
|
},
|
|
972
1003
|
{
|
|
973
1004
|
foreignKeyName: "tbl_integration_logs_org_id_fkey";
|
|
974
1005
|
columns: ["org_id"];
|
|
1006
|
+
isOneToOne: false;
|
|
975
1007
|
referencedRelation: "view_org";
|
|
976
1008
|
referencedColumns: ["org_id"];
|
|
977
1009
|
}
|
|
@@ -1015,12 +1047,14 @@ export type Database = {
|
|
|
1015
1047
|
{
|
|
1016
1048
|
foreignKeyName: "public_tbl_integration_tokens_org_id_fkey";
|
|
1017
1049
|
columns: ["org_id"];
|
|
1050
|
+
isOneToOne: false;
|
|
1018
1051
|
referencedRelation: "tbl_org";
|
|
1019
1052
|
referencedColumns: ["org_id"];
|
|
1020
1053
|
},
|
|
1021
1054
|
{
|
|
1022
1055
|
foreignKeyName: "public_tbl_integration_tokens_org_id_fkey";
|
|
1023
1056
|
columns: ["org_id"];
|
|
1057
|
+
isOneToOne: false;
|
|
1024
1058
|
referencedRelation: "view_org";
|
|
1025
1059
|
referencedColumns: ["org_id"];
|
|
1026
1060
|
}
|
|
@@ -1094,12 +1128,14 @@ export type Database = {
|
|
|
1094
1128
|
{
|
|
1095
1129
|
foreignKeyName: "tbl_org_labels_org_id_fkey";
|
|
1096
1130
|
columns: ["org_id"];
|
|
1131
|
+
isOneToOne: false;
|
|
1097
1132
|
referencedRelation: "tbl_org";
|
|
1098
1133
|
referencedColumns: ["org_id"];
|
|
1099
1134
|
},
|
|
1100
1135
|
{
|
|
1101
1136
|
foreignKeyName: "tbl_org_labels_org_id_fkey";
|
|
1102
1137
|
columns: ["org_id"];
|
|
1138
|
+
isOneToOne: false;
|
|
1103
1139
|
referencedRelation: "view_org";
|
|
1104
1140
|
referencedColumns: ["org_id"];
|
|
1105
1141
|
}
|
|
@@ -1161,18 +1197,21 @@ export type Database = {
|
|
|
1161
1197
|
{
|
|
1162
1198
|
foreignKeyName: "tbl_org_members_fkey_auth_users";
|
|
1163
1199
|
columns: ["user_id"];
|
|
1200
|
+
isOneToOne: false;
|
|
1164
1201
|
referencedRelation: "users";
|
|
1165
1202
|
referencedColumns: ["id"];
|
|
1166
1203
|
},
|
|
1167
1204
|
{
|
|
1168
1205
|
foreignKeyName: "tbl_org_members_fkey_tbl_org";
|
|
1169
1206
|
columns: ["org_id"];
|
|
1207
|
+
isOneToOne: false;
|
|
1170
1208
|
referencedRelation: "tbl_org";
|
|
1171
1209
|
referencedColumns: ["org_id"];
|
|
1172
1210
|
},
|
|
1173
1211
|
{
|
|
1174
1212
|
foreignKeyName: "tbl_org_members_fkey_tbl_org";
|
|
1175
1213
|
columns: ["org_id"];
|
|
1214
|
+
isOneToOne: false;
|
|
1176
1215
|
referencedRelation: "view_org";
|
|
1177
1216
|
referencedColumns: ["org_id"];
|
|
1178
1217
|
}
|
|
@@ -1182,6 +1221,7 @@ export type Database = {
|
|
|
1182
1221
|
Row: {
|
|
1183
1222
|
created_at: string;
|
|
1184
1223
|
first_connected_at: string | null;
|
|
1224
|
+
is_browser_open: boolean;
|
|
1185
1225
|
is_ready: boolean | null;
|
|
1186
1226
|
legacy_version: boolean | null;
|
|
1187
1227
|
org_id: string;
|
|
@@ -1199,6 +1239,7 @@ export type Database = {
|
|
|
1199
1239
|
Insert: {
|
|
1200
1240
|
created_at?: string;
|
|
1201
1241
|
first_connected_at?: string | null;
|
|
1242
|
+
is_browser_open?: boolean;
|
|
1202
1243
|
is_ready?: boolean | null;
|
|
1203
1244
|
legacy_version?: boolean | null;
|
|
1204
1245
|
org_id: string;
|
|
@@ -1216,6 +1257,7 @@ export type Database = {
|
|
|
1216
1257
|
Update: {
|
|
1217
1258
|
created_at?: string;
|
|
1218
1259
|
first_connected_at?: string | null;
|
|
1260
|
+
is_browser_open?: boolean;
|
|
1219
1261
|
is_ready?: boolean | null;
|
|
1220
1262
|
legacy_version?: boolean | null;
|
|
1221
1263
|
org_id?: string;
|
|
@@ -1234,24 +1276,28 @@ export type Database = {
|
|
|
1234
1276
|
{
|
|
1235
1277
|
foreignKeyName: "tbl_org_phones_fkey_tbl_org";
|
|
1236
1278
|
columns: ["org_id"];
|
|
1279
|
+
isOneToOne: false;
|
|
1237
1280
|
referencedRelation: "tbl_org";
|
|
1238
1281
|
referencedColumns: ["org_id"];
|
|
1239
1282
|
},
|
|
1240
1283
|
{
|
|
1241
1284
|
foreignKeyName: "tbl_org_phones_fkey_tbl_org";
|
|
1242
1285
|
columns: ["org_id"];
|
|
1286
|
+
isOneToOne: false;
|
|
1243
1287
|
referencedRelation: "view_org";
|
|
1244
1288
|
referencedColumns: ["org_id"];
|
|
1245
1289
|
},
|
|
1246
1290
|
{
|
|
1247
1291
|
foreignKeyName: "tbl_org_phones_org_id_fkey";
|
|
1248
1292
|
columns: ["org_id"];
|
|
1293
|
+
isOneToOne: false;
|
|
1249
1294
|
referencedRelation: "tbl_org";
|
|
1250
1295
|
referencedColumns: ["org_id"];
|
|
1251
1296
|
},
|
|
1252
1297
|
{
|
|
1253
1298
|
foreignKeyName: "tbl_org_phones_org_id_fkey";
|
|
1254
1299
|
columns: ["org_id"];
|
|
1300
|
+
isOneToOne: false;
|
|
1255
1301
|
referencedRelation: "view_org";
|
|
1256
1302
|
referencedColumns: ["org_id"];
|
|
1257
1303
|
}
|
|
@@ -1283,12 +1329,14 @@ export type Database = {
|
|
|
1283
1329
|
{
|
|
1284
1330
|
foreignKeyName: "tbl_quick_replies_org_id_fkey";
|
|
1285
1331
|
columns: ["org_id"];
|
|
1332
|
+
isOneToOne: false;
|
|
1286
1333
|
referencedRelation: "tbl_org";
|
|
1287
1334
|
referencedColumns: ["org_id"];
|
|
1288
1335
|
},
|
|
1289
1336
|
{
|
|
1290
1337
|
foreignKeyName: "tbl_quick_replies_org_id_fkey";
|
|
1291
1338
|
columns: ["org_id"];
|
|
1339
|
+
isOneToOne: false;
|
|
1292
1340
|
referencedRelation: "view_org";
|
|
1293
1341
|
referencedColumns: ["org_id"];
|
|
1294
1342
|
}
|
|
@@ -1343,12 +1391,14 @@ export type Database = {
|
|
|
1343
1391
|
{
|
|
1344
1392
|
foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
|
|
1345
1393
|
columns: ["org_id"];
|
|
1394
|
+
isOneToOne: false;
|
|
1346
1395
|
referencedRelation: "tbl_org";
|
|
1347
1396
|
referencedColumns: ["org_id"];
|
|
1348
1397
|
},
|
|
1349
1398
|
{
|
|
1350
1399
|
foreignKeyName: "tbl_broadcast_messages_org_id_fkey";
|
|
1351
1400
|
columns: ["org_id"];
|
|
1401
|
+
isOneToOne: false;
|
|
1352
1402
|
referencedRelation: "view_org";
|
|
1353
1403
|
referencedColumns: ["org_id"];
|
|
1354
1404
|
}
|
|
@@ -1477,7 +1527,14 @@ export type Database = {
|
|
|
1477
1527
|
org_id_input: string;
|
|
1478
1528
|
chat_ids_input?: string[];
|
|
1479
1529
|
};
|
|
1480
|
-
Returns:
|
|
1530
|
+
Returns: Json[];
|
|
1531
|
+
};
|
|
1532
|
+
get_chat_members: {
|
|
1533
|
+
Args: {
|
|
1534
|
+
org_id_input?: string;
|
|
1535
|
+
chat_id_input?: string[];
|
|
1536
|
+
};
|
|
1537
|
+
Returns: Json;
|
|
1481
1538
|
};
|
|
1482
1539
|
get_chats: {
|
|
1483
1540
|
Args: {
|
|
@@ -1486,6 +1543,14 @@ export type Database = {
|
|
|
1486
1543
|
};
|
|
1487
1544
|
Returns: Json;
|
|
1488
1545
|
};
|
|
1546
|
+
get_chats_info: {
|
|
1547
|
+
Args: {
|
|
1548
|
+
chat_id_input: string;
|
|
1549
|
+
org_id_input: string;
|
|
1550
|
+
org_phone_input: string;
|
|
1551
|
+
};
|
|
1552
|
+
Returns: Json;
|
|
1553
|
+
};
|
|
1489
1554
|
get_contacts: {
|
|
1490
1555
|
Args: {
|
|
1491
1556
|
org_id_input: string;
|
|
@@ -1538,9 +1603,17 @@ export type Database = {
|
|
|
1538
1603
|
org_id_input?: string;
|
|
1539
1604
|
chat_id_input?: string;
|
|
1540
1605
|
unique_message_id_input?: string;
|
|
1606
|
+
org_phone_input?: string;
|
|
1541
1607
|
};
|
|
1542
1608
|
Returns: Json;
|
|
1543
1609
|
};
|
|
1610
|
+
image_path: {
|
|
1611
|
+
Args: {
|
|
1612
|
+
path_input?: string;
|
|
1613
|
+
bucket_name?: string;
|
|
1614
|
+
};
|
|
1615
|
+
Returns: string;
|
|
1616
|
+
};
|
|
1544
1617
|
list_org_from_user: {
|
|
1545
1618
|
Args: Record<PropertyKey, never>;
|
|
1546
1619
|
Returns: string[];
|
|
@@ -1582,6 +1655,7 @@ export type Database = {
|
|
|
1582
1655
|
id: string;
|
|
1583
1656
|
name: string;
|
|
1584
1657
|
owner: string | null;
|
|
1658
|
+
owner_id: string | null;
|
|
1585
1659
|
public: boolean | null;
|
|
1586
1660
|
updated_at: string | null;
|
|
1587
1661
|
};
|
|
@@ -1713,7 +1787,7 @@ export type Database = {
|
|
|
1713
1787
|
Args: {
|
|
1714
1788
|
name: string;
|
|
1715
1789
|
};
|
|
1716
|
-
Returns:
|
|
1790
|
+
Returns: string[];
|
|
1717
1791
|
};
|
|
1718
1792
|
get_size_by_bucket: {
|
|
1719
1793
|
Args: Record<PropertyKey, never>;
|
package/dist/types.d.ts
CHANGED
|
@@ -156,6 +156,8 @@ export type AttachmentTypeProps = {
|
|
|
156
156
|
};
|
|
157
157
|
export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
|
|
158
158
|
logs: (Tables<'tbl_broadcast_logs'> & Partial<ChatType>)[];
|
|
159
|
+
} & {
|
|
160
|
+
chats: ChatType[];
|
|
159
161
|
};
|
|
160
162
|
export type ChatParticipantOperation = {
|
|
161
163
|
participant_ids: string[];
|
|
@@ -176,22 +178,32 @@ export type PhoneStateType = {
|
|
|
176
178
|
message?: string;
|
|
177
179
|
error?: string;
|
|
178
180
|
};
|
|
179
|
-
export type
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
export type ChatInfoType = Merge<ChatType, {
|
|
182
|
+
members: {
|
|
183
|
+
[key: string]: Merge<ChatMemberType, {
|
|
184
|
+
contact_labels: string;
|
|
185
|
+
}>;
|
|
186
|
+
} | null;
|
|
187
|
+
chat_labels: string | null;
|
|
188
|
+
custom_properties: {
|
|
185
189
|
[key: string]: string;
|
|
186
|
-
};
|
|
190
|
+
} | null;
|
|
191
|
+
}>;
|
|
192
|
+
export type TicketInfoType = {
|
|
193
|
+
chat: ChatInfoType;
|
|
187
194
|
message: {
|
|
188
|
-
|
|
195
|
+
body: string;
|
|
196
|
+
chat_id: string;
|
|
197
|
+
org_phone: string;
|
|
189
198
|
timestamp: string;
|
|
199
|
+
media_path: string;
|
|
190
200
|
message_id: string;
|
|
201
|
+
sender_name: string;
|
|
202
|
+
performed_by: string;
|
|
191
203
|
sender_phone: string;
|
|
192
204
|
};
|
|
193
205
|
ticket: {
|
|
194
|
-
|
|
206
|
+
org_id: string;
|
|
195
207
|
status: string;
|
|
196
208
|
subject: string;
|
|
197
209
|
assignee: string;
|
|
@@ -200,6 +212,9 @@ export type TicketInfoType = {
|
|
|
200
212
|
raised_by: string;
|
|
201
213
|
ticket_id: string;
|
|
202
214
|
created_at: string;
|
|
215
|
+
assigned_by: string;
|
|
216
|
+
ticket_labels: string;
|
|
217
|
+
quoted_message_id: string;
|
|
203
218
|
};
|
|
204
219
|
};
|
|
205
220
|
export declare enum IntegrationLogType {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@periskope/types",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.81",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@periskope/whatsapp-web.js": "
|
|
8
|
+
"@periskope/whatsapp-web.js": "1.23.1-alpha.exodus.8",
|
|
9
9
|
"@types/pg": "8.11.2",
|
|
10
10
|
"pg": "^8.11.3",
|
|
11
11
|
"stripe": "^14.19.0",
|
package/supabase.types.ts
CHANGED
|
@@ -75,27 +75,31 @@ export type Database = {
|
|
|
75
75
|
{
|
|
76
76
|
foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey"
|
|
77
77
|
columns: ["broadcast_id"]
|
|
78
|
+
isOneToOne: false
|
|
78
79
|
referencedRelation: "tbl_broadcast_messages"
|
|
79
80
|
referencedColumns: ["broadcast_id"]
|
|
80
81
|
},
|
|
81
82
|
{
|
|
82
83
|
foreignKeyName: "tbl_broadcast_logs_broadcast_id_fkey"
|
|
83
84
|
columns: ["broadcast_id"]
|
|
85
|
+
isOneToOne: false
|
|
84
86
|
referencedRelation: "view_broadcast_logs"
|
|
85
87
|
referencedColumns: ["broadcast_id"]
|
|
86
88
|
},
|
|
87
89
|
{
|
|
88
90
|
foreignKeyName: "tbl_broadcast_logs_org_id_fkey"
|
|
89
91
|
columns: ["org_id"]
|
|
92
|
+
isOneToOne: false
|
|
90
93
|
referencedRelation: "tbl_org"
|
|
91
94
|
referencedColumns: ["org_id"]
|
|
92
95
|
},
|
|
93
96
|
{
|
|
94
97
|
foreignKeyName: "tbl_broadcast_logs_org_id_fkey"
|
|
95
98
|
columns: ["org_id"]
|
|
99
|
+
isOneToOne: false
|
|
96
100
|
referencedRelation: "view_org"
|
|
97
101
|
referencedColumns: ["org_id"]
|
|
98
|
-
}
|
|
102
|
+
},
|
|
99
103
|
]
|
|
100
104
|
}
|
|
101
105
|
tbl_broadcast_messages: {
|
|
@@ -133,15 +137,17 @@ export type Database = {
|
|
|
133
137
|
{
|
|
134
138
|
foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
|
|
135
139
|
columns: ["org_id"]
|
|
140
|
+
isOneToOne: false
|
|
136
141
|
referencedRelation: "tbl_org"
|
|
137
142
|
referencedColumns: ["org_id"]
|
|
138
143
|
},
|
|
139
144
|
{
|
|
140
145
|
foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
|
|
141
146
|
columns: ["org_id"]
|
|
147
|
+
isOneToOne: false
|
|
142
148
|
referencedRelation: "view_org"
|
|
143
149
|
referencedColumns: ["org_id"]
|
|
144
|
-
}
|
|
150
|
+
},
|
|
145
151
|
]
|
|
146
152
|
}
|
|
147
153
|
tbl_broadcast_templates: {
|
|
@@ -173,15 +179,17 @@ export type Database = {
|
|
|
173
179
|
{
|
|
174
180
|
foreignKeyName: "tbl_broadcast_templates_org_id_fkey"
|
|
175
181
|
columns: ["org_id"]
|
|
182
|
+
isOneToOne: false
|
|
176
183
|
referencedRelation: "tbl_org"
|
|
177
184
|
referencedColumns: ["org_id"]
|
|
178
185
|
},
|
|
179
186
|
{
|
|
180
187
|
foreignKeyName: "tbl_broadcast_templates_org_id_fkey"
|
|
181
188
|
columns: ["org_id"]
|
|
189
|
+
isOneToOne: false
|
|
182
190
|
referencedRelation: "view_org"
|
|
183
191
|
referencedColumns: ["org_id"]
|
|
184
|
-
}
|
|
192
|
+
},
|
|
185
193
|
]
|
|
186
194
|
}
|
|
187
195
|
tbl_chat_access: {
|
|
@@ -216,9 +224,10 @@ export type Database = {
|
|
|
216
224
|
{
|
|
217
225
|
foreignKeyName: "tbl_chat_access_org_id_email_fkey"
|
|
218
226
|
columns: ["org_id", "email"]
|
|
227
|
+
isOneToOne: false
|
|
219
228
|
referencedRelation: "tbl_org_members"
|
|
220
229
|
referencedColumns: ["org_id", "email"]
|
|
221
|
-
}
|
|
230
|
+
},
|
|
222
231
|
]
|
|
223
232
|
}
|
|
224
233
|
tbl_chat_messages: {
|
|
@@ -370,9 +379,10 @@ export type Database = {
|
|
|
370
379
|
{
|
|
371
380
|
foreignKeyName: "tbl_chat_messages_fkey_tbl_org_phones"
|
|
372
381
|
columns: ["org_phone", "org_id"]
|
|
382
|
+
isOneToOne: false
|
|
373
383
|
referencedRelation: "tbl_org_phones"
|
|
374
384
|
referencedColumns: ["org_phone", "org_id"]
|
|
375
|
-
}
|
|
385
|
+
},
|
|
376
386
|
]
|
|
377
387
|
}
|
|
378
388
|
tbl_chat_notifications: {
|
|
@@ -419,9 +429,10 @@ export type Database = {
|
|
|
419
429
|
{
|
|
420
430
|
foreignKeyName: "tbl_chat_notifications_fkey_tbl_org_phones"
|
|
421
431
|
columns: ["org_id", "org_phone"]
|
|
432
|
+
isOneToOne: false
|
|
422
433
|
referencedRelation: "tbl_org_phones"
|
|
423
434
|
referencedColumns: ["org_id", "org_phone"]
|
|
424
|
-
}
|
|
435
|
+
},
|
|
425
436
|
]
|
|
426
437
|
}
|
|
427
438
|
tbl_chat_participants: {
|
|
@@ -456,9 +467,10 @@ export type Database = {
|
|
|
456
467
|
{
|
|
457
468
|
foreignKeyName: "tbl_chat_participants_fkey_tbl_chats"
|
|
458
469
|
columns: ["org_id", "org_phone", "chat_id"]
|
|
470
|
+
isOneToOne: false
|
|
459
471
|
referencedRelation: "tbl_chats"
|
|
460
472
|
referencedColumns: ["org_id", "org_phone", "chat_id"]
|
|
461
|
-
}
|
|
473
|
+
},
|
|
462
474
|
]
|
|
463
475
|
}
|
|
464
476
|
tbl_chat_properties: {
|
|
@@ -538,9 +550,10 @@ export type Database = {
|
|
|
538
550
|
{
|
|
539
551
|
foreignKeyName: "tbl_chat_reactions_fkey_tbl_org_phones"
|
|
540
552
|
columns: ["org_id", "org_phone"]
|
|
553
|
+
isOneToOne: false
|
|
541
554
|
referencedRelation: "tbl_org_phones"
|
|
542
555
|
referencedColumns: ["org_id", "org_phone"]
|
|
543
|
-
}
|
|
556
|
+
},
|
|
544
557
|
]
|
|
545
558
|
}
|
|
546
559
|
tbl_chat_tickets: {
|
|
@@ -603,15 +616,17 @@ export type Database = {
|
|
|
603
616
|
{
|
|
604
617
|
foreignKeyName: "tbl_chat_tickets_org_id_fkey"
|
|
605
618
|
columns: ["org_id"]
|
|
619
|
+
isOneToOne: false
|
|
606
620
|
referencedRelation: "tbl_org"
|
|
607
621
|
referencedColumns: ["org_id"]
|
|
608
622
|
},
|
|
609
623
|
{
|
|
610
624
|
foreignKeyName: "tbl_chat_tickets_org_id_fkey"
|
|
611
625
|
columns: ["org_id"]
|
|
626
|
+
isOneToOne: false
|
|
612
627
|
referencedRelation: "view_org"
|
|
613
628
|
referencedColumns: ["org_id"]
|
|
614
|
-
}
|
|
629
|
+
},
|
|
615
630
|
]
|
|
616
631
|
}
|
|
617
632
|
tbl_chats: {
|
|
@@ -691,9 +706,10 @@ export type Database = {
|
|
|
691
706
|
{
|
|
692
707
|
foreignKeyName: "tbl_chats_fkey_tbl_org_phones"
|
|
693
708
|
columns: ["org_phone", "org_id"]
|
|
709
|
+
isOneToOne: false
|
|
694
710
|
referencedRelation: "tbl_org_phones"
|
|
695
711
|
referencedColumns: ["org_phone", "org_id"]
|
|
696
|
-
}
|
|
712
|
+
},
|
|
697
713
|
]
|
|
698
714
|
}
|
|
699
715
|
tbl_contacts: {
|
|
@@ -782,15 +798,17 @@ export type Database = {
|
|
|
782
798
|
{
|
|
783
799
|
foreignKeyName: "tbl_contacts_org_id_fkey"
|
|
784
800
|
columns: ["org_id"]
|
|
801
|
+
isOneToOne: false
|
|
785
802
|
referencedRelation: "tbl_org"
|
|
786
803
|
referencedColumns: ["org_id"]
|
|
787
804
|
},
|
|
788
805
|
{
|
|
789
806
|
foreignKeyName: "tbl_contacts_org_id_fkey"
|
|
790
807
|
columns: ["org_id"]
|
|
808
|
+
isOneToOne: false
|
|
791
809
|
referencedRelation: "view_org"
|
|
792
810
|
referencedColumns: ["org_id"]
|
|
793
|
-
}
|
|
811
|
+
},
|
|
794
812
|
]
|
|
795
813
|
}
|
|
796
814
|
tbl_custom_properties: {
|
|
@@ -828,21 +846,25 @@ export type Database = {
|
|
|
828
846
|
{
|
|
829
847
|
foreignKeyName: "tbl_custom_properties_org_id_fkey"
|
|
830
848
|
columns: ["org_id"]
|
|
849
|
+
isOneToOne: false
|
|
831
850
|
referencedRelation: "tbl_org"
|
|
832
851
|
referencedColumns: ["org_id"]
|
|
833
852
|
},
|
|
834
853
|
{
|
|
835
854
|
foreignKeyName: "tbl_custom_properties_org_id_fkey"
|
|
836
855
|
columns: ["org_id"]
|
|
856
|
+
isOneToOne: false
|
|
837
857
|
referencedRelation: "view_org"
|
|
838
858
|
referencedColumns: ["org_id"]
|
|
839
|
-
}
|
|
859
|
+
},
|
|
840
860
|
]
|
|
841
861
|
}
|
|
842
862
|
tbl_flagged_messages: {
|
|
843
863
|
Row: {
|
|
844
864
|
chat_id: string | null
|
|
865
|
+
message_timestamp: string | null
|
|
845
866
|
org_id: string
|
|
867
|
+
responder_email: string | null
|
|
846
868
|
response_id: string | null
|
|
847
869
|
response_timestamp: string | null
|
|
848
870
|
response_type: string | null
|
|
@@ -850,7 +872,9 @@ export type Database = {
|
|
|
850
872
|
}
|
|
851
873
|
Insert: {
|
|
852
874
|
chat_id?: string | null
|
|
875
|
+
message_timestamp?: string | null
|
|
853
876
|
org_id: string
|
|
877
|
+
responder_email?: string | null
|
|
854
878
|
response_id?: string | null
|
|
855
879
|
response_timestamp?: string | null
|
|
856
880
|
response_type?: string | null
|
|
@@ -858,7 +882,9 @@ export type Database = {
|
|
|
858
882
|
}
|
|
859
883
|
Update: {
|
|
860
884
|
chat_id?: string | null
|
|
885
|
+
message_timestamp?: string | null
|
|
861
886
|
org_id?: string
|
|
887
|
+
responder_email?: string | null
|
|
862
888
|
response_id?: string | null
|
|
863
889
|
response_timestamp?: string | null
|
|
864
890
|
response_type?: string | null
|
|
@@ -868,15 +894,17 @@ export type Database = {
|
|
|
868
894
|
{
|
|
869
895
|
foreignKeyName: "tbl_flagged_messages_org_id_fkey"
|
|
870
896
|
columns: ["org_id"]
|
|
897
|
+
isOneToOne: false
|
|
871
898
|
referencedRelation: "tbl_org"
|
|
872
899
|
referencedColumns: ["org_id"]
|
|
873
900
|
},
|
|
874
901
|
{
|
|
875
902
|
foreignKeyName: "tbl_flagged_messages_org_id_fkey"
|
|
876
903
|
columns: ["org_id"]
|
|
904
|
+
isOneToOne: false
|
|
877
905
|
referencedRelation: "view_org"
|
|
878
906
|
referencedColumns: ["org_id"]
|
|
879
|
-
}
|
|
907
|
+
},
|
|
880
908
|
]
|
|
881
909
|
}
|
|
882
910
|
tbl_integration_hooks: {
|
|
@@ -920,15 +948,17 @@ export type Database = {
|
|
|
920
948
|
{
|
|
921
949
|
foreignKeyName: "tbl_integration_hooks_org_id_fkey"
|
|
922
950
|
columns: ["org_id"]
|
|
951
|
+
isOneToOne: false
|
|
923
952
|
referencedRelation: "tbl_org"
|
|
924
953
|
referencedColumns: ["org_id"]
|
|
925
954
|
},
|
|
926
955
|
{
|
|
927
956
|
foreignKeyName: "tbl_integration_hooks_org_id_fkey"
|
|
928
957
|
columns: ["org_id"]
|
|
958
|
+
isOneToOne: false
|
|
929
959
|
referencedRelation: "view_org"
|
|
930
960
|
referencedColumns: ["org_id"]
|
|
931
|
-
}
|
|
961
|
+
},
|
|
932
962
|
]
|
|
933
963
|
}
|
|
934
964
|
tbl_integration_logs: {
|
|
@@ -969,15 +999,17 @@ export type Database = {
|
|
|
969
999
|
{
|
|
970
1000
|
foreignKeyName: "tbl_integration_logs_org_id_fkey"
|
|
971
1001
|
columns: ["org_id"]
|
|
1002
|
+
isOneToOne: false
|
|
972
1003
|
referencedRelation: "tbl_org"
|
|
973
1004
|
referencedColumns: ["org_id"]
|
|
974
1005
|
},
|
|
975
1006
|
{
|
|
976
1007
|
foreignKeyName: "tbl_integration_logs_org_id_fkey"
|
|
977
1008
|
columns: ["org_id"]
|
|
1009
|
+
isOneToOne: false
|
|
978
1010
|
referencedRelation: "view_org"
|
|
979
1011
|
referencedColumns: ["org_id"]
|
|
980
|
-
}
|
|
1012
|
+
},
|
|
981
1013
|
]
|
|
982
1014
|
}
|
|
983
1015
|
tbl_integration_tokens: {
|
|
@@ -1018,15 +1050,17 @@ export type Database = {
|
|
|
1018
1050
|
{
|
|
1019
1051
|
foreignKeyName: "public_tbl_integration_tokens_org_id_fkey"
|
|
1020
1052
|
columns: ["org_id"]
|
|
1053
|
+
isOneToOne: false
|
|
1021
1054
|
referencedRelation: "tbl_org"
|
|
1022
1055
|
referencedColumns: ["org_id"]
|
|
1023
1056
|
},
|
|
1024
1057
|
{
|
|
1025
1058
|
foreignKeyName: "public_tbl_integration_tokens_org_id_fkey"
|
|
1026
1059
|
columns: ["org_id"]
|
|
1060
|
+
isOneToOne: false
|
|
1027
1061
|
referencedRelation: "view_org"
|
|
1028
1062
|
referencedColumns: ["org_id"]
|
|
1029
|
-
}
|
|
1063
|
+
},
|
|
1030
1064
|
]
|
|
1031
1065
|
}
|
|
1032
1066
|
tbl_org: {
|
|
@@ -1097,15 +1131,17 @@ export type Database = {
|
|
|
1097
1131
|
{
|
|
1098
1132
|
foreignKeyName: "tbl_org_labels_org_id_fkey"
|
|
1099
1133
|
columns: ["org_id"]
|
|
1134
|
+
isOneToOne: false
|
|
1100
1135
|
referencedRelation: "tbl_org"
|
|
1101
1136
|
referencedColumns: ["org_id"]
|
|
1102
1137
|
},
|
|
1103
1138
|
{
|
|
1104
1139
|
foreignKeyName: "tbl_org_labels_org_id_fkey"
|
|
1105
1140
|
columns: ["org_id"]
|
|
1141
|
+
isOneToOne: false
|
|
1106
1142
|
referencedRelation: "view_org"
|
|
1107
1143
|
referencedColumns: ["org_id"]
|
|
1108
|
-
}
|
|
1144
|
+
},
|
|
1109
1145
|
]
|
|
1110
1146
|
}
|
|
1111
1147
|
tbl_org_members: {
|
|
@@ -1164,27 +1200,31 @@ export type Database = {
|
|
|
1164
1200
|
{
|
|
1165
1201
|
foreignKeyName: "tbl_org_members_fkey_auth_users"
|
|
1166
1202
|
columns: ["user_id"]
|
|
1203
|
+
isOneToOne: false
|
|
1167
1204
|
referencedRelation: "users"
|
|
1168
1205
|
referencedColumns: ["id"]
|
|
1169
1206
|
},
|
|
1170
1207
|
{
|
|
1171
1208
|
foreignKeyName: "tbl_org_members_fkey_tbl_org"
|
|
1172
1209
|
columns: ["org_id"]
|
|
1210
|
+
isOneToOne: false
|
|
1173
1211
|
referencedRelation: "tbl_org"
|
|
1174
1212
|
referencedColumns: ["org_id"]
|
|
1175
1213
|
},
|
|
1176
1214
|
{
|
|
1177
1215
|
foreignKeyName: "tbl_org_members_fkey_tbl_org"
|
|
1178
1216
|
columns: ["org_id"]
|
|
1217
|
+
isOneToOne: false
|
|
1179
1218
|
referencedRelation: "view_org"
|
|
1180
1219
|
referencedColumns: ["org_id"]
|
|
1181
|
-
}
|
|
1220
|
+
},
|
|
1182
1221
|
]
|
|
1183
1222
|
}
|
|
1184
1223
|
tbl_org_phones: {
|
|
1185
1224
|
Row: {
|
|
1186
1225
|
created_at: string
|
|
1187
1226
|
first_connected_at: string | null
|
|
1227
|
+
is_browser_open: boolean
|
|
1188
1228
|
is_ready: boolean | null
|
|
1189
1229
|
legacy_version: boolean | null
|
|
1190
1230
|
org_id: string
|
|
@@ -1202,6 +1242,7 @@ export type Database = {
|
|
|
1202
1242
|
Insert: {
|
|
1203
1243
|
created_at?: string
|
|
1204
1244
|
first_connected_at?: string | null
|
|
1245
|
+
is_browser_open?: boolean
|
|
1205
1246
|
is_ready?: boolean | null
|
|
1206
1247
|
legacy_version?: boolean | null
|
|
1207
1248
|
org_id: string
|
|
@@ -1219,6 +1260,7 @@ export type Database = {
|
|
|
1219
1260
|
Update: {
|
|
1220
1261
|
created_at?: string
|
|
1221
1262
|
first_connected_at?: string | null
|
|
1263
|
+
is_browser_open?: boolean
|
|
1222
1264
|
is_ready?: boolean | null
|
|
1223
1265
|
legacy_version?: boolean | null
|
|
1224
1266
|
org_id?: string
|
|
@@ -1237,27 +1279,31 @@ export type Database = {
|
|
|
1237
1279
|
{
|
|
1238
1280
|
foreignKeyName: "tbl_org_phones_fkey_tbl_org"
|
|
1239
1281
|
columns: ["org_id"]
|
|
1282
|
+
isOneToOne: false
|
|
1240
1283
|
referencedRelation: "tbl_org"
|
|
1241
1284
|
referencedColumns: ["org_id"]
|
|
1242
1285
|
},
|
|
1243
1286
|
{
|
|
1244
1287
|
foreignKeyName: "tbl_org_phones_fkey_tbl_org"
|
|
1245
1288
|
columns: ["org_id"]
|
|
1289
|
+
isOneToOne: false
|
|
1246
1290
|
referencedRelation: "view_org"
|
|
1247
1291
|
referencedColumns: ["org_id"]
|
|
1248
1292
|
},
|
|
1249
1293
|
{
|
|
1250
1294
|
foreignKeyName: "tbl_org_phones_org_id_fkey"
|
|
1251
1295
|
columns: ["org_id"]
|
|
1296
|
+
isOneToOne: false
|
|
1252
1297
|
referencedRelation: "tbl_org"
|
|
1253
1298
|
referencedColumns: ["org_id"]
|
|
1254
1299
|
},
|
|
1255
1300
|
{
|
|
1256
1301
|
foreignKeyName: "tbl_org_phones_org_id_fkey"
|
|
1257
1302
|
columns: ["org_id"]
|
|
1303
|
+
isOneToOne: false
|
|
1258
1304
|
referencedRelation: "view_org"
|
|
1259
1305
|
referencedColumns: ["org_id"]
|
|
1260
|
-
}
|
|
1306
|
+
},
|
|
1261
1307
|
]
|
|
1262
1308
|
}
|
|
1263
1309
|
tbl_quick_replies: {
|
|
@@ -1286,15 +1332,17 @@ export type Database = {
|
|
|
1286
1332
|
{
|
|
1287
1333
|
foreignKeyName: "tbl_quick_replies_org_id_fkey"
|
|
1288
1334
|
columns: ["org_id"]
|
|
1335
|
+
isOneToOne: false
|
|
1289
1336
|
referencedRelation: "tbl_org"
|
|
1290
1337
|
referencedColumns: ["org_id"]
|
|
1291
1338
|
},
|
|
1292
1339
|
{
|
|
1293
1340
|
foreignKeyName: "tbl_quick_replies_org_id_fkey"
|
|
1294
1341
|
columns: ["org_id"]
|
|
1342
|
+
isOneToOne: false
|
|
1295
1343
|
referencedRelation: "view_org"
|
|
1296
1344
|
referencedColumns: ["org_id"]
|
|
1297
|
-
}
|
|
1345
|
+
},
|
|
1298
1346
|
]
|
|
1299
1347
|
}
|
|
1300
1348
|
tbl_tools_whatsapp_links: {
|
|
@@ -1346,15 +1394,17 @@ export type Database = {
|
|
|
1346
1394
|
{
|
|
1347
1395
|
foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
|
|
1348
1396
|
columns: ["org_id"]
|
|
1397
|
+
isOneToOne: false
|
|
1349
1398
|
referencedRelation: "tbl_org"
|
|
1350
1399
|
referencedColumns: ["org_id"]
|
|
1351
1400
|
},
|
|
1352
1401
|
{
|
|
1353
1402
|
foreignKeyName: "tbl_broadcast_messages_org_id_fkey"
|
|
1354
1403
|
columns: ["org_id"]
|
|
1404
|
+
isOneToOne: false
|
|
1355
1405
|
referencedRelation: "view_org"
|
|
1356
1406
|
referencedColumns: ["org_id"]
|
|
1357
|
-
}
|
|
1407
|
+
},
|
|
1358
1408
|
]
|
|
1359
1409
|
}
|
|
1360
1410
|
view_chats: {
|
|
@@ -1480,7 +1530,14 @@ export type Database = {
|
|
|
1480
1530
|
org_id_input: string
|
|
1481
1531
|
chat_ids_input?: string[]
|
|
1482
1532
|
}
|
|
1483
|
-
Returns:
|
|
1533
|
+
Returns: Json[]
|
|
1534
|
+
}
|
|
1535
|
+
get_chat_members: {
|
|
1536
|
+
Args: {
|
|
1537
|
+
org_id_input?: string
|
|
1538
|
+
chat_id_input?: string[]
|
|
1539
|
+
}
|
|
1540
|
+
Returns: Json
|
|
1484
1541
|
}
|
|
1485
1542
|
get_chats: {
|
|
1486
1543
|
Args: {
|
|
@@ -1489,6 +1546,14 @@ export type Database = {
|
|
|
1489
1546
|
}
|
|
1490
1547
|
Returns: Json
|
|
1491
1548
|
}
|
|
1549
|
+
get_chats_info: {
|
|
1550
|
+
Args: {
|
|
1551
|
+
chat_id_input: string
|
|
1552
|
+
org_id_input: string
|
|
1553
|
+
org_phone_input: string
|
|
1554
|
+
}
|
|
1555
|
+
Returns: Json
|
|
1556
|
+
}
|
|
1492
1557
|
get_contacts: {
|
|
1493
1558
|
Args: {
|
|
1494
1559
|
org_id_input: string
|
|
@@ -1541,9 +1606,17 @@ export type Database = {
|
|
|
1541
1606
|
org_id_input?: string
|
|
1542
1607
|
chat_id_input?: string
|
|
1543
1608
|
unique_message_id_input?: string
|
|
1609
|
+
org_phone_input?: string
|
|
1544
1610
|
}
|
|
1545
1611
|
Returns: Json
|
|
1546
1612
|
}
|
|
1613
|
+
image_path: {
|
|
1614
|
+
Args: {
|
|
1615
|
+
path_input?: string
|
|
1616
|
+
bucket_name?: string
|
|
1617
|
+
}
|
|
1618
|
+
Returns: string
|
|
1619
|
+
}
|
|
1547
1620
|
list_org_from_user: {
|
|
1548
1621
|
Args: Record<PropertyKey, never>
|
|
1549
1622
|
Returns: string[]
|
|
@@ -1628,6 +1701,7 @@ export type Database = {
|
|
|
1628
1701
|
id: string
|
|
1629
1702
|
name: string
|
|
1630
1703
|
owner: string | null
|
|
1704
|
+
owner_id: string | null
|
|
1631
1705
|
public: boolean | null
|
|
1632
1706
|
updated_at: string | null
|
|
1633
1707
|
}
|
|
@@ -1759,7 +1833,7 @@ export type Database = {
|
|
|
1759
1833
|
Args: {
|
|
1760
1834
|
name: string
|
|
1761
1835
|
}
|
|
1762
|
-
Returns:
|
|
1836
|
+
Returns: string[]
|
|
1763
1837
|
}
|
|
1764
1838
|
get_size_by_bucket: {
|
|
1765
1839
|
Args: Record<PropertyKey, never>
|
|
@@ -1881,4 +1955,3 @@ export type Enums<
|
|
|
1881
1955
|
: never
|
|
1882
1956
|
|
|
1883
1957
|
|
|
1884
|
-
|
package/types.ts
CHANGED
|
@@ -251,6 +251,8 @@ export type AttachmentTypeProps =
|
|
|
251
251
|
|
|
252
252
|
export type BroadcastLogType = Tables<'view_broadcast_logs'> & {
|
|
253
253
|
logs: (Tables<'tbl_broadcast_logs'> & Partial<ChatType>)[];
|
|
254
|
+
} & {
|
|
255
|
+
chats: ChatType[];
|
|
254
256
|
};
|
|
255
257
|
|
|
256
258
|
/* ----------------------- CHAT PARTICIPANT OPERATION ----------------------- */
|
|
@@ -283,22 +285,33 @@ export type PhoneStateType = {
|
|
|
283
285
|
};
|
|
284
286
|
|
|
285
287
|
/* ------------------------------- INTEGRATIONS ----------------------------- */
|
|
288
|
+
|
|
289
|
+
export type ChatInfoType = Merge<
|
|
290
|
+
ChatType,
|
|
291
|
+
{
|
|
292
|
+
members: {
|
|
293
|
+
[key: string]: Merge<ChatMemberType, { contact_labels: string }>;
|
|
294
|
+
} | null;
|
|
295
|
+
chat_labels: string | null;
|
|
296
|
+
custom_properties: { [key: string]: string } | null;
|
|
297
|
+
}
|
|
298
|
+
>;
|
|
299
|
+
|
|
286
300
|
export type TicketInfoType = {
|
|
287
|
-
chat:
|
|
288
|
-
chat_id: string;
|
|
289
|
-
chat_name: string;
|
|
290
|
-
chat_image: string;
|
|
291
|
-
chat_labels: string;
|
|
292
|
-
[key: string]: string;
|
|
293
|
-
};
|
|
301
|
+
chat: ChatInfoType;
|
|
294
302
|
message: {
|
|
295
|
-
|
|
303
|
+
body: string;
|
|
304
|
+
chat_id: string;
|
|
305
|
+
org_phone: string;
|
|
296
306
|
timestamp: string;
|
|
307
|
+
media_path: string;
|
|
297
308
|
message_id: string;
|
|
309
|
+
sender_name: string;
|
|
310
|
+
performed_by: string;
|
|
298
311
|
sender_phone: string;
|
|
299
312
|
};
|
|
300
313
|
ticket: {
|
|
301
|
-
|
|
314
|
+
org_id: string;
|
|
302
315
|
status: string;
|
|
303
316
|
subject: string;
|
|
304
317
|
assignee: string;
|
|
@@ -307,6 +320,9 @@ export type TicketInfoType = {
|
|
|
307
320
|
raised_by: string;
|
|
308
321
|
ticket_id: string;
|
|
309
322
|
created_at: string;
|
|
323
|
+
assigned_by: string;
|
|
324
|
+
ticket_labels: string;
|
|
325
|
+
quoted_message_id: string;
|
|
310
326
|
};
|
|
311
327
|
};
|
|
312
328
|
|