@periskope/types 0.6.68 → 0.6.70
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 +50 -25
- package/dist/types.d.ts +5 -7
- package/package.json +1 -1
- package/supabase.types.ts +50 -25
- package/types.ts +14 -13
package/dist/supabase.types.d.ts
CHANGED
|
@@ -179,6 +179,7 @@ export type Database = {
|
|
|
179
179
|
email: string;
|
|
180
180
|
has_access: boolean | null;
|
|
181
181
|
last_read_timestamp: string | null;
|
|
182
|
+
message_unread_count: number | null;
|
|
182
183
|
org_id: string;
|
|
183
184
|
};
|
|
184
185
|
Insert: {
|
|
@@ -187,6 +188,7 @@ export type Database = {
|
|
|
187
188
|
email: string;
|
|
188
189
|
has_access?: boolean | null;
|
|
189
190
|
last_read_timestamp?: string | null;
|
|
191
|
+
message_unread_count?: number | null;
|
|
190
192
|
org_id: string;
|
|
191
193
|
};
|
|
192
194
|
Update: {
|
|
@@ -195,6 +197,7 @@ export type Database = {
|
|
|
195
197
|
email?: string;
|
|
196
198
|
has_access?: boolean | null;
|
|
197
199
|
last_read_timestamp?: string | null;
|
|
200
|
+
message_unread_count?: number | null;
|
|
198
201
|
org_id?: string;
|
|
199
202
|
};
|
|
200
203
|
Relationships: [
|
|
@@ -447,16 +450,30 @@ export type Database = {
|
|
|
447
450
|
isOneToOne: false;
|
|
448
451
|
referencedRelation: "tbl_chats";
|
|
449
452
|
referencedColumns: ["org_id", "org_phone", "chat_id"];
|
|
450
|
-
},
|
|
451
|
-
{
|
|
452
|
-
foreignKeyName: "tbl_chat_participants_fkey_tbl_chats";
|
|
453
|
-
columns: ["org_id", "org_phone", "chat_id"];
|
|
454
|
-
isOneToOne: false;
|
|
455
|
-
referencedRelation: "view_chats";
|
|
456
|
-
referencedColumns: ["org_id", "org_phone", "chat_id"];
|
|
457
453
|
}
|
|
458
454
|
];
|
|
459
455
|
};
|
|
456
|
+
tbl_chat_properties: {
|
|
457
|
+
Row: {
|
|
458
|
+
chat_id: string;
|
|
459
|
+
custom_properties: Json | null;
|
|
460
|
+
label_ids: Json | null;
|
|
461
|
+
org_id: string;
|
|
462
|
+
};
|
|
463
|
+
Insert: {
|
|
464
|
+
chat_id: string;
|
|
465
|
+
custom_properties?: Json | null;
|
|
466
|
+
label_ids?: Json | null;
|
|
467
|
+
org_id: string;
|
|
468
|
+
};
|
|
469
|
+
Update: {
|
|
470
|
+
chat_id?: string;
|
|
471
|
+
custom_properties?: Json | null;
|
|
472
|
+
label_ids?: Json | null;
|
|
473
|
+
org_id?: string;
|
|
474
|
+
};
|
|
475
|
+
Relationships: [];
|
|
476
|
+
};
|
|
460
477
|
tbl_chat_reactions: {
|
|
461
478
|
Row: {
|
|
462
479
|
ack: number | null;
|
|
@@ -964,7 +981,6 @@ export type Database = {
|
|
|
964
981
|
tbl_org: {
|
|
965
982
|
Row: {
|
|
966
983
|
created_at: string;
|
|
967
|
-
is_subscription_active: boolean | null;
|
|
968
984
|
org_id: string;
|
|
969
985
|
org_image: string | null;
|
|
970
986
|
org_metadata: Json | null;
|
|
@@ -973,12 +989,10 @@ export type Database = {
|
|
|
973
989
|
stripe_customer_details: Json | null;
|
|
974
990
|
stripe_customer_id: string | null;
|
|
975
991
|
stripe_subscription_details: Json | null;
|
|
976
|
-
subscription_status: string | null;
|
|
977
992
|
support_link: string | null;
|
|
978
993
|
};
|
|
979
994
|
Insert: {
|
|
980
995
|
created_at?: string;
|
|
981
|
-
is_subscription_active?: boolean | null;
|
|
982
996
|
org_id?: string;
|
|
983
997
|
org_image?: string | null;
|
|
984
998
|
org_metadata?: Json | null;
|
|
@@ -987,12 +1001,10 @@ export type Database = {
|
|
|
987
1001
|
stripe_customer_details?: Json | null;
|
|
988
1002
|
stripe_customer_id?: string | null;
|
|
989
1003
|
stripe_subscription_details?: Json | null;
|
|
990
|
-
subscription_status?: string | null;
|
|
991
1004
|
support_link?: string | null;
|
|
992
1005
|
};
|
|
993
1006
|
Update: {
|
|
994
1007
|
created_at?: string;
|
|
995
|
-
is_subscription_active?: boolean | null;
|
|
996
1008
|
org_id?: string;
|
|
997
1009
|
org_image?: string | null;
|
|
998
1010
|
org_metadata?: Json | null;
|
|
@@ -1001,7 +1013,6 @@ export type Database = {
|
|
|
1001
1013
|
stripe_customer_details?: Json | null;
|
|
1002
1014
|
stripe_customer_id?: string | null;
|
|
1003
1015
|
stripe_subscription_details?: Json | null;
|
|
1004
|
-
subscription_status?: string | null;
|
|
1005
1016
|
support_link?: string | null;
|
|
1006
1017
|
};
|
|
1007
1018
|
Relationships: [];
|
|
@@ -1048,6 +1059,7 @@ export type Database = {
|
|
|
1048
1059
|
invited_at: string | null;
|
|
1049
1060
|
invited_by: string | null;
|
|
1050
1061
|
is_active: boolean;
|
|
1062
|
+
is_owner: boolean | null;
|
|
1051
1063
|
label_ids: string[] | null;
|
|
1052
1064
|
member_color: Database["public"]["Enums"]["enum_chat_colors"];
|
|
1053
1065
|
member_image: string | null;
|
|
@@ -1063,6 +1075,7 @@ export type Database = {
|
|
|
1063
1075
|
invited_at?: string | null;
|
|
1064
1076
|
invited_by?: string | null;
|
|
1065
1077
|
is_active?: boolean;
|
|
1078
|
+
is_owner?: boolean | null;
|
|
1066
1079
|
label_ids?: string[] | null;
|
|
1067
1080
|
member_color?: Database["public"]["Enums"]["enum_chat_colors"];
|
|
1068
1081
|
member_image?: string | null;
|
|
@@ -1078,6 +1091,7 @@ export type Database = {
|
|
|
1078
1091
|
invited_at?: string | null;
|
|
1079
1092
|
invited_by?: string | null;
|
|
1080
1093
|
is_active?: boolean;
|
|
1094
|
+
is_owner?: boolean | null;
|
|
1081
1095
|
label_ids?: string[] | null;
|
|
1082
1096
|
member_color?: Database["public"]["Enums"]["enum_chat_colors"];
|
|
1083
1097
|
member_image?: string | null;
|
|
@@ -1257,6 +1271,26 @@ export type Database = {
|
|
|
1257
1271
|
}
|
|
1258
1272
|
];
|
|
1259
1273
|
};
|
|
1274
|
+
view_chat_participants: {
|
|
1275
|
+
Row: {
|
|
1276
|
+
chat_id: string | null;
|
|
1277
|
+
contact_name: string | null;
|
|
1278
|
+
is_business: boolean | null;
|
|
1279
|
+
is_user: boolean | null;
|
|
1280
|
+
members: Json | null;
|
|
1281
|
+
org_id: string | null;
|
|
1282
|
+
org_phone: string | null;
|
|
1283
|
+
};
|
|
1284
|
+
Relationships: [
|
|
1285
|
+
{
|
|
1286
|
+
foreignKeyName: "tbl_chat_participants_fkey_tbl_chats";
|
|
1287
|
+
columns: ["org_id", "org_phone", "chat_id"];
|
|
1288
|
+
isOneToOne: false;
|
|
1289
|
+
referencedRelation: "tbl_chats";
|
|
1290
|
+
referencedColumns: ["org_id", "org_phone", "chat_id"];
|
|
1291
|
+
}
|
|
1292
|
+
];
|
|
1293
|
+
};
|
|
1260
1294
|
view_chats: {
|
|
1261
1295
|
Row: {
|
|
1262
1296
|
active_phone: string | null;
|
|
@@ -1264,12 +1298,10 @@ export type Database = {
|
|
|
1264
1298
|
chat_id: string | null;
|
|
1265
1299
|
chat_image: string | null;
|
|
1266
1300
|
chat_name: string | null;
|
|
1267
|
-
chat_org_phones: string[] | null;
|
|
1268
1301
|
chat_type: string | null;
|
|
1269
1302
|
created_at: string | null;
|
|
1270
1303
|
custom_properties: Json | null;
|
|
1271
1304
|
group_description: string | null;
|
|
1272
|
-
has_access: boolean | null;
|
|
1273
1305
|
invite_link: string | null;
|
|
1274
1306
|
is_archived: boolean | null;
|
|
1275
1307
|
is_muted: boolean | null;
|
|
@@ -1278,19 +1310,12 @@ export type Database = {
|
|
|
1278
1310
|
latest_message: Json | null;
|
|
1279
1311
|
member_count: number | null;
|
|
1280
1312
|
members: Json | null;
|
|
1313
|
+
message_unread_count: number | null;
|
|
1281
1314
|
org_id: string | null;
|
|
1282
1315
|
org_phone: string | null;
|
|
1283
1316
|
updated_at: string | null;
|
|
1284
1317
|
};
|
|
1285
|
-
Relationships: [
|
|
1286
|
-
{
|
|
1287
|
-
foreignKeyName: "tbl_chats_fkey_tbl_org_phones";
|
|
1288
|
-
columns: ["org_phone", "org_id"];
|
|
1289
|
-
isOneToOne: false;
|
|
1290
|
-
referencedRelation: "tbl_org_phones";
|
|
1291
|
-
referencedColumns: ["org_phone", "org_id"];
|
|
1292
|
-
}
|
|
1293
|
-
];
|
|
1318
|
+
Relationships: [];
|
|
1294
1319
|
};
|
|
1295
1320
|
};
|
|
1296
1321
|
Functions: {
|
|
@@ -1325,7 +1350,7 @@ export type Database = {
|
|
|
1325
1350
|
};
|
|
1326
1351
|
get_chats: {
|
|
1327
1352
|
Args: {
|
|
1328
|
-
org_id_input
|
|
1353
|
+
org_id_input?: string;
|
|
1329
1354
|
chat_id_input?: string[];
|
|
1330
1355
|
with_metadata?: boolean;
|
|
1331
1356
|
last_updated_at_input?: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -34,19 +34,17 @@ export type OrgPlanNonEnterprise = {
|
|
|
34
34
|
percent_off: number | null;
|
|
35
35
|
};
|
|
36
36
|
export type OrgPlan<T extends AllPlans | Enterprise> = T extends Enterprise ? OrgPlanEnterprise : T extends AllPlans ? OrgPlanNonEnterprise : never;
|
|
37
|
-
export type OrgType = OverrideProperties<Tables<'tbl_org'
|
|
37
|
+
export type OrgType = OverrideProperties<Merge<Tables<'tbl_org'>, {
|
|
38
38
|
user: Tables<'tbl_org_members'>;
|
|
39
39
|
members: Tables<'tbl_org_members'>[];
|
|
40
40
|
phones: Tables<'tbl_org_phones'>[];
|
|
41
41
|
labels: Tables<'tbl_org_labels'>[];
|
|
42
42
|
quick_replies: Tables<'tbl_quick_replies'>[];
|
|
43
43
|
custom_properties: Tables<'tbl_custom_properties'>[];
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
}, {
|
|
44
|
+
subscription_status: 'active' | 'inactive' | 'unpaid';
|
|
45
|
+
is_enterprise: boolean;
|
|
46
|
+
is_free_trial: boolean;
|
|
47
|
+
}>, {
|
|
50
48
|
org_plan: OrgPlan<AllPlans | Enterprise>;
|
|
51
49
|
stripe_customer_details: _Stripe.Customer | null;
|
|
52
50
|
stripe_subscription_details: Array<_Stripe.Subscription> | null;
|
package/package.json
CHANGED
package/supabase.types.ts
CHANGED
|
@@ -178,6 +178,7 @@ export type Database = {
|
|
|
178
178
|
email: string
|
|
179
179
|
has_access: boolean | null
|
|
180
180
|
last_read_timestamp: string | null
|
|
181
|
+
message_unread_count: number | null
|
|
181
182
|
org_id: string
|
|
182
183
|
}
|
|
183
184
|
Insert: {
|
|
@@ -186,6 +187,7 @@ export type Database = {
|
|
|
186
187
|
email: string
|
|
187
188
|
has_access?: boolean | null
|
|
188
189
|
last_read_timestamp?: string | null
|
|
190
|
+
message_unread_count?: number | null
|
|
189
191
|
org_id: string
|
|
190
192
|
}
|
|
191
193
|
Update: {
|
|
@@ -194,6 +196,7 @@ export type Database = {
|
|
|
194
196
|
email?: string
|
|
195
197
|
has_access?: boolean | null
|
|
196
198
|
last_read_timestamp?: string | null
|
|
199
|
+
message_unread_count?: number | null
|
|
197
200
|
org_id?: string
|
|
198
201
|
}
|
|
199
202
|
Relationships: [
|
|
@@ -447,15 +450,29 @@ export type Database = {
|
|
|
447
450
|
referencedRelation: "tbl_chats"
|
|
448
451
|
referencedColumns: ["org_id", "org_phone", "chat_id"]
|
|
449
452
|
},
|
|
450
|
-
{
|
|
451
|
-
foreignKeyName: "tbl_chat_participants_fkey_tbl_chats"
|
|
452
|
-
columns: ["org_id", "org_phone", "chat_id"]
|
|
453
|
-
isOneToOne: false
|
|
454
|
-
referencedRelation: "view_chats"
|
|
455
|
-
referencedColumns: ["org_id", "org_phone", "chat_id"]
|
|
456
|
-
},
|
|
457
453
|
]
|
|
458
454
|
}
|
|
455
|
+
tbl_chat_properties: {
|
|
456
|
+
Row: {
|
|
457
|
+
chat_id: string
|
|
458
|
+
custom_properties: Json | null
|
|
459
|
+
label_ids: Json | null
|
|
460
|
+
org_id: string
|
|
461
|
+
}
|
|
462
|
+
Insert: {
|
|
463
|
+
chat_id: string
|
|
464
|
+
custom_properties?: Json | null
|
|
465
|
+
label_ids?: Json | null
|
|
466
|
+
org_id: string
|
|
467
|
+
}
|
|
468
|
+
Update: {
|
|
469
|
+
chat_id?: string
|
|
470
|
+
custom_properties?: Json | null
|
|
471
|
+
label_ids?: Json | null
|
|
472
|
+
org_id?: string
|
|
473
|
+
}
|
|
474
|
+
Relationships: []
|
|
475
|
+
}
|
|
459
476
|
tbl_chat_reactions: {
|
|
460
477
|
Row: {
|
|
461
478
|
ack: number | null
|
|
@@ -967,7 +984,6 @@ export type Database = {
|
|
|
967
984
|
tbl_org: {
|
|
968
985
|
Row: {
|
|
969
986
|
created_at: string
|
|
970
|
-
is_subscription_active: boolean | null
|
|
971
987
|
org_id: string
|
|
972
988
|
org_image: string | null
|
|
973
989
|
org_metadata: Json | null
|
|
@@ -976,12 +992,10 @@ export type Database = {
|
|
|
976
992
|
stripe_customer_details: Json | null
|
|
977
993
|
stripe_customer_id: string | null
|
|
978
994
|
stripe_subscription_details: Json | null
|
|
979
|
-
subscription_status: string | null
|
|
980
995
|
support_link: string | null
|
|
981
996
|
}
|
|
982
997
|
Insert: {
|
|
983
998
|
created_at?: string
|
|
984
|
-
is_subscription_active?: boolean | null
|
|
985
999
|
org_id?: string
|
|
986
1000
|
org_image?: string | null
|
|
987
1001
|
org_metadata?: Json | null
|
|
@@ -990,12 +1004,10 @@ export type Database = {
|
|
|
990
1004
|
stripe_customer_details?: Json | null
|
|
991
1005
|
stripe_customer_id?: string | null
|
|
992
1006
|
stripe_subscription_details?: Json | null
|
|
993
|
-
subscription_status?: string | null
|
|
994
1007
|
support_link?: string | null
|
|
995
1008
|
}
|
|
996
1009
|
Update: {
|
|
997
1010
|
created_at?: string
|
|
998
|
-
is_subscription_active?: boolean | null
|
|
999
1011
|
org_id?: string
|
|
1000
1012
|
org_image?: string | null
|
|
1001
1013
|
org_metadata?: Json | null
|
|
@@ -1004,7 +1016,6 @@ export type Database = {
|
|
|
1004
1016
|
stripe_customer_details?: Json | null
|
|
1005
1017
|
stripe_customer_id?: string | null
|
|
1006
1018
|
stripe_subscription_details?: Json | null
|
|
1007
|
-
subscription_status?: string | null
|
|
1008
1019
|
support_link?: string | null
|
|
1009
1020
|
}
|
|
1010
1021
|
Relationships: []
|
|
@@ -1051,6 +1062,7 @@ export type Database = {
|
|
|
1051
1062
|
invited_at: string | null
|
|
1052
1063
|
invited_by: string | null
|
|
1053
1064
|
is_active: boolean
|
|
1065
|
+
is_owner: boolean | null
|
|
1054
1066
|
label_ids: string[] | null
|
|
1055
1067
|
member_color: Database["public"]["Enums"]["enum_chat_colors"]
|
|
1056
1068
|
member_image: string | null
|
|
@@ -1066,6 +1078,7 @@ export type Database = {
|
|
|
1066
1078
|
invited_at?: string | null
|
|
1067
1079
|
invited_by?: string | null
|
|
1068
1080
|
is_active?: boolean
|
|
1081
|
+
is_owner?: boolean | null
|
|
1069
1082
|
label_ids?: string[] | null
|
|
1070
1083
|
member_color?: Database["public"]["Enums"]["enum_chat_colors"]
|
|
1071
1084
|
member_image?: string | null
|
|
@@ -1081,6 +1094,7 @@ export type Database = {
|
|
|
1081
1094
|
invited_at?: string | null
|
|
1082
1095
|
invited_by?: string | null
|
|
1083
1096
|
is_active?: boolean
|
|
1097
|
+
is_owner?: boolean | null
|
|
1084
1098
|
label_ids?: string[] | null
|
|
1085
1099
|
member_color?: Database["public"]["Enums"]["enum_chat_colors"]
|
|
1086
1100
|
member_image?: string | null
|
|
@@ -1260,6 +1274,26 @@ export type Database = {
|
|
|
1260
1274
|
},
|
|
1261
1275
|
]
|
|
1262
1276
|
}
|
|
1277
|
+
view_chat_participants: {
|
|
1278
|
+
Row: {
|
|
1279
|
+
chat_id: string | null
|
|
1280
|
+
contact_name: string | null
|
|
1281
|
+
is_business: boolean | null
|
|
1282
|
+
is_user: boolean | null
|
|
1283
|
+
members: Json | null
|
|
1284
|
+
org_id: string | null
|
|
1285
|
+
org_phone: string | null
|
|
1286
|
+
}
|
|
1287
|
+
Relationships: [
|
|
1288
|
+
{
|
|
1289
|
+
foreignKeyName: "tbl_chat_participants_fkey_tbl_chats"
|
|
1290
|
+
columns: ["org_id", "org_phone", "chat_id"]
|
|
1291
|
+
isOneToOne: false
|
|
1292
|
+
referencedRelation: "tbl_chats"
|
|
1293
|
+
referencedColumns: ["org_id", "org_phone", "chat_id"]
|
|
1294
|
+
},
|
|
1295
|
+
]
|
|
1296
|
+
}
|
|
1263
1297
|
view_chats: {
|
|
1264
1298
|
Row: {
|
|
1265
1299
|
active_phone: string | null
|
|
@@ -1267,12 +1301,10 @@ export type Database = {
|
|
|
1267
1301
|
chat_id: string | null
|
|
1268
1302
|
chat_image: string | null
|
|
1269
1303
|
chat_name: string | null
|
|
1270
|
-
chat_org_phones: string[] | null
|
|
1271
1304
|
chat_type: string | null
|
|
1272
1305
|
created_at: string | null
|
|
1273
1306
|
custom_properties: Json | null
|
|
1274
1307
|
group_description: string | null
|
|
1275
|
-
has_access: boolean | null
|
|
1276
1308
|
invite_link: string | null
|
|
1277
1309
|
is_archived: boolean | null
|
|
1278
1310
|
is_muted: boolean | null
|
|
@@ -1281,19 +1313,12 @@ export type Database = {
|
|
|
1281
1313
|
latest_message: Json | null
|
|
1282
1314
|
member_count: number | null
|
|
1283
1315
|
members: Json | null
|
|
1316
|
+
message_unread_count: number | null
|
|
1284
1317
|
org_id: string | null
|
|
1285
1318
|
org_phone: string | null
|
|
1286
1319
|
updated_at: string | null
|
|
1287
1320
|
}
|
|
1288
|
-
Relationships: [
|
|
1289
|
-
{
|
|
1290
|
-
foreignKeyName: "tbl_chats_fkey_tbl_org_phones"
|
|
1291
|
-
columns: ["org_phone", "org_id"]
|
|
1292
|
-
isOneToOne: false
|
|
1293
|
-
referencedRelation: "tbl_org_phones"
|
|
1294
|
-
referencedColumns: ["org_phone", "org_id"]
|
|
1295
|
-
},
|
|
1296
|
-
]
|
|
1321
|
+
Relationships: []
|
|
1297
1322
|
}
|
|
1298
1323
|
}
|
|
1299
1324
|
Functions: {
|
|
@@ -1328,7 +1353,7 @@ export type Database = {
|
|
|
1328
1353
|
}
|
|
1329
1354
|
get_chats: {
|
|
1330
1355
|
Args: {
|
|
1331
|
-
org_id_input
|
|
1356
|
+
org_id_input?: string
|
|
1332
1357
|
chat_id_input?: string[]
|
|
1333
1358
|
with_metadata?: boolean
|
|
1334
1359
|
last_updated_at_input?: string
|
package/types.ts
CHANGED
|
@@ -53,19 +53,20 @@ export type OrgPlan<T extends AllPlans | Enterprise> = T extends Enterprise
|
|
|
53
53
|
: never;
|
|
54
54
|
|
|
55
55
|
export type OrgType = OverrideProperties<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
Merge<
|
|
57
|
+
Tables<'tbl_org'>,
|
|
58
|
+
{
|
|
59
|
+
user: Tables<'tbl_org_members'>;
|
|
60
|
+
members: Tables<'tbl_org_members'>[];
|
|
61
|
+
phones: Tables<'tbl_org_phones'>[];
|
|
62
|
+
labels: Tables<'tbl_org_labels'>[];
|
|
63
|
+
quick_replies: Tables<'tbl_quick_replies'>[];
|
|
64
|
+
custom_properties: Tables<'tbl_custom_properties'>[];
|
|
65
|
+
subscription_status: 'active' | 'inactive' | 'unpaid',
|
|
66
|
+
is_enterprise: boolean;
|
|
67
|
+
is_free_trial: boolean;
|
|
68
|
+
}
|
|
69
|
+
>,
|
|
69
70
|
{
|
|
70
71
|
org_plan: OrgPlan<AllPlans | Enterprise>;
|
|
71
72
|
stripe_customer_details: _Stripe.Customer | null;
|