@everylanguage/shared-types 1.0.5 → 1.0.6
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/package.json +1 -1
- package/types/database.d.ts +422 -0
package/package.json
CHANGED
package/types/database.d.ts
CHANGED
|
@@ -29,6 +29,63 @@ export type Database = {
|
|
|
29
29
|
};
|
|
30
30
|
public: {
|
|
31
31
|
Tables: {
|
|
32
|
+
app_downloads: {
|
|
33
|
+
Row: {
|
|
34
|
+
anon_user_id: string | null;
|
|
35
|
+
app_version: string;
|
|
36
|
+
created_at: string | null;
|
|
37
|
+
device_id: string;
|
|
38
|
+
id: string;
|
|
39
|
+
installed_at: string | null;
|
|
40
|
+
location: unknown | null;
|
|
41
|
+
os: string | null;
|
|
42
|
+
os_version: string | null;
|
|
43
|
+
platform: Database["public"]["Enums"]["platform_type"];
|
|
44
|
+
source_share_id: string | null;
|
|
45
|
+
};
|
|
46
|
+
Insert: {
|
|
47
|
+
anon_user_id?: string | null;
|
|
48
|
+
app_version: string;
|
|
49
|
+
created_at?: string | null;
|
|
50
|
+
device_id: string;
|
|
51
|
+
id?: string;
|
|
52
|
+
installed_at?: string | null;
|
|
53
|
+
location?: unknown | null;
|
|
54
|
+
os?: string | null;
|
|
55
|
+
os_version?: string | null;
|
|
56
|
+
platform: Database["public"]["Enums"]["platform_type"];
|
|
57
|
+
source_share_id?: string | null;
|
|
58
|
+
};
|
|
59
|
+
Update: {
|
|
60
|
+
anon_user_id?: string | null;
|
|
61
|
+
app_version?: string;
|
|
62
|
+
created_at?: string | null;
|
|
63
|
+
device_id?: string;
|
|
64
|
+
id?: string;
|
|
65
|
+
installed_at?: string | null;
|
|
66
|
+
location?: unknown | null;
|
|
67
|
+
os?: string | null;
|
|
68
|
+
os_version?: string | null;
|
|
69
|
+
platform?: Database["public"]["Enums"]["platform_type"];
|
|
70
|
+
source_share_id?: string | null;
|
|
71
|
+
};
|
|
72
|
+
Relationships: [
|
|
73
|
+
{
|
|
74
|
+
foreignKeyName: "app_downloads_anon_user_id_fkey";
|
|
75
|
+
columns: ["anon_user_id"];
|
|
76
|
+
isOneToOne: false;
|
|
77
|
+
referencedRelation: "users_anon";
|
|
78
|
+
referencedColumns: ["id"];
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
foreignKeyName: "app_downloads_source_share_id_fkey";
|
|
82
|
+
columns: ["source_share_id"];
|
|
83
|
+
isOneToOne: false;
|
|
84
|
+
referencedRelation: "shares";
|
|
85
|
+
referencedColumns: ["id"];
|
|
86
|
+
}
|
|
87
|
+
];
|
|
88
|
+
};
|
|
32
89
|
bases: {
|
|
33
90
|
Row: {
|
|
34
91
|
created_at: string | null;
|
|
@@ -370,6 +427,73 @@ export type Database = {
|
|
|
370
427
|
}
|
|
371
428
|
];
|
|
372
429
|
};
|
|
430
|
+
media_file_listens: {
|
|
431
|
+
Row: {
|
|
432
|
+
anon_user_id: string;
|
|
433
|
+
connectivity: Database["public"]["Enums"]["connectivity_type"] | null;
|
|
434
|
+
created_at: string | null;
|
|
435
|
+
device_id: string;
|
|
436
|
+
duration_seconds: number;
|
|
437
|
+
id: string;
|
|
438
|
+
language_entity_id: string;
|
|
439
|
+
listened_at: string | null;
|
|
440
|
+
location: unknown | null;
|
|
441
|
+
media_file_id: string;
|
|
442
|
+
position_seconds: number;
|
|
443
|
+
session_id: string;
|
|
444
|
+
};
|
|
445
|
+
Insert: {
|
|
446
|
+
anon_user_id: string;
|
|
447
|
+
connectivity?: Database["public"]["Enums"]["connectivity_type"] | null;
|
|
448
|
+
created_at?: string | null;
|
|
449
|
+
device_id: string;
|
|
450
|
+
duration_seconds: number;
|
|
451
|
+
id?: string;
|
|
452
|
+
language_entity_id: string;
|
|
453
|
+
listened_at?: string | null;
|
|
454
|
+
location?: unknown | null;
|
|
455
|
+
media_file_id: string;
|
|
456
|
+
position_seconds: number;
|
|
457
|
+
session_id: string;
|
|
458
|
+
};
|
|
459
|
+
Update: {
|
|
460
|
+
anon_user_id?: string;
|
|
461
|
+
connectivity?: Database["public"]["Enums"]["connectivity_type"] | null;
|
|
462
|
+
created_at?: string | null;
|
|
463
|
+
device_id?: string;
|
|
464
|
+
duration_seconds?: number;
|
|
465
|
+
id?: string;
|
|
466
|
+
language_entity_id?: string;
|
|
467
|
+
listened_at?: string | null;
|
|
468
|
+
location?: unknown | null;
|
|
469
|
+
media_file_id?: string;
|
|
470
|
+
position_seconds?: number;
|
|
471
|
+
session_id?: string;
|
|
472
|
+
};
|
|
473
|
+
Relationships: [
|
|
474
|
+
{
|
|
475
|
+
foreignKeyName: "media_file_listens_anon_user_id_fkey";
|
|
476
|
+
columns: ["anon_user_id"];
|
|
477
|
+
isOneToOne: false;
|
|
478
|
+
referencedRelation: "users_anon";
|
|
479
|
+
referencedColumns: ["id"];
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
foreignKeyName: "media_file_listens_language_entity_id_fkey";
|
|
483
|
+
columns: ["language_entity_id"];
|
|
484
|
+
isOneToOne: false;
|
|
485
|
+
referencedRelation: "language_entities";
|
|
486
|
+
referencedColumns: ["id"];
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
foreignKeyName: "media_file_listens_session_id_fkey";
|
|
490
|
+
columns: ["session_id"];
|
|
491
|
+
isOneToOne: false;
|
|
492
|
+
referencedRelation: "sessions";
|
|
493
|
+
referencedColumns: ["id"];
|
|
494
|
+
}
|
|
495
|
+
];
|
|
496
|
+
};
|
|
373
497
|
permissions: {
|
|
374
498
|
Row: {
|
|
375
499
|
allow_deny: boolean;
|
|
@@ -655,6 +779,205 @@ export type Database = {
|
|
|
655
779
|
};
|
|
656
780
|
Relationships: [];
|
|
657
781
|
};
|
|
782
|
+
sessions: {
|
|
783
|
+
Row: {
|
|
784
|
+
anon_user_id: string;
|
|
785
|
+
app_version: string;
|
|
786
|
+
connectivity: Database["public"]["Enums"]["connectivity_type"] | null;
|
|
787
|
+
created_at: string | null;
|
|
788
|
+
device_id: string;
|
|
789
|
+
ended_at: string | null;
|
|
790
|
+
id: string;
|
|
791
|
+
location: unknown | null;
|
|
792
|
+
os: string | null;
|
|
793
|
+
os_version: string | null;
|
|
794
|
+
platform: Database["public"]["Enums"]["platform_type"];
|
|
795
|
+
started_at: string | null;
|
|
796
|
+
};
|
|
797
|
+
Insert: {
|
|
798
|
+
anon_user_id: string;
|
|
799
|
+
app_version: string;
|
|
800
|
+
connectivity?: Database["public"]["Enums"]["connectivity_type"] | null;
|
|
801
|
+
created_at?: string | null;
|
|
802
|
+
device_id: string;
|
|
803
|
+
ended_at?: string | null;
|
|
804
|
+
id?: string;
|
|
805
|
+
location?: unknown | null;
|
|
806
|
+
os?: string | null;
|
|
807
|
+
os_version?: string | null;
|
|
808
|
+
platform: Database["public"]["Enums"]["platform_type"];
|
|
809
|
+
started_at?: string | null;
|
|
810
|
+
};
|
|
811
|
+
Update: {
|
|
812
|
+
anon_user_id?: string;
|
|
813
|
+
app_version?: string;
|
|
814
|
+
connectivity?: Database["public"]["Enums"]["connectivity_type"] | null;
|
|
815
|
+
created_at?: string | null;
|
|
816
|
+
device_id?: string;
|
|
817
|
+
ended_at?: string | null;
|
|
818
|
+
id?: string;
|
|
819
|
+
location?: unknown | null;
|
|
820
|
+
os?: string | null;
|
|
821
|
+
os_version?: string | null;
|
|
822
|
+
platform?: Database["public"]["Enums"]["platform_type"];
|
|
823
|
+
started_at?: string | null;
|
|
824
|
+
};
|
|
825
|
+
Relationships: [
|
|
826
|
+
{
|
|
827
|
+
foreignKeyName: "sessions_anon_user_id_fkey";
|
|
828
|
+
columns: ["anon_user_id"];
|
|
829
|
+
isOneToOne: false;
|
|
830
|
+
referencedRelation: "users_anon";
|
|
831
|
+
referencedColumns: ["id"];
|
|
832
|
+
}
|
|
833
|
+
];
|
|
834
|
+
};
|
|
835
|
+
share_opens: {
|
|
836
|
+
Row: {
|
|
837
|
+
created_at: string | null;
|
|
838
|
+
device_id: string | null;
|
|
839
|
+
id: string;
|
|
840
|
+
language_entity_id: string;
|
|
841
|
+
location: unknown | null;
|
|
842
|
+
opened_at: string | null;
|
|
843
|
+
opened_by_anon_user_id: string | null;
|
|
844
|
+
origin_share_id: string | null;
|
|
845
|
+
session_id: string | null;
|
|
846
|
+
share_id: string;
|
|
847
|
+
};
|
|
848
|
+
Insert: {
|
|
849
|
+
created_at?: string | null;
|
|
850
|
+
device_id?: string | null;
|
|
851
|
+
id?: string;
|
|
852
|
+
language_entity_id: string;
|
|
853
|
+
location?: unknown | null;
|
|
854
|
+
opened_at?: string | null;
|
|
855
|
+
opened_by_anon_user_id?: string | null;
|
|
856
|
+
origin_share_id?: string | null;
|
|
857
|
+
session_id?: string | null;
|
|
858
|
+
share_id: string;
|
|
859
|
+
};
|
|
860
|
+
Update: {
|
|
861
|
+
created_at?: string | null;
|
|
862
|
+
device_id?: string | null;
|
|
863
|
+
id?: string;
|
|
864
|
+
language_entity_id?: string;
|
|
865
|
+
location?: unknown | null;
|
|
866
|
+
opened_at?: string | null;
|
|
867
|
+
opened_by_anon_user_id?: string | null;
|
|
868
|
+
origin_share_id?: string | null;
|
|
869
|
+
session_id?: string | null;
|
|
870
|
+
share_id?: string;
|
|
871
|
+
};
|
|
872
|
+
Relationships: [
|
|
873
|
+
{
|
|
874
|
+
foreignKeyName: "share_opens_language_entity_id_fkey";
|
|
875
|
+
columns: ["language_entity_id"];
|
|
876
|
+
isOneToOne: false;
|
|
877
|
+
referencedRelation: "language_entities";
|
|
878
|
+
referencedColumns: ["id"];
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
foreignKeyName: "share_opens_opened_by_anon_user_id_fkey";
|
|
882
|
+
columns: ["opened_by_anon_user_id"];
|
|
883
|
+
isOneToOne: false;
|
|
884
|
+
referencedRelation: "users_anon";
|
|
885
|
+
referencedColumns: ["id"];
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
foreignKeyName: "share_opens_origin_share_id_fkey";
|
|
889
|
+
columns: ["origin_share_id"];
|
|
890
|
+
isOneToOne: false;
|
|
891
|
+
referencedRelation: "shares";
|
|
892
|
+
referencedColumns: ["id"];
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
foreignKeyName: "share_opens_session_id_fkey";
|
|
896
|
+
columns: ["session_id"];
|
|
897
|
+
isOneToOne: false;
|
|
898
|
+
referencedRelation: "sessions";
|
|
899
|
+
referencedColumns: ["id"];
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
foreignKeyName: "share_opens_share_id_fkey";
|
|
903
|
+
columns: ["share_id"];
|
|
904
|
+
isOneToOne: false;
|
|
905
|
+
referencedRelation: "shares";
|
|
906
|
+
referencedColumns: ["id"];
|
|
907
|
+
}
|
|
908
|
+
];
|
|
909
|
+
};
|
|
910
|
+
shares: {
|
|
911
|
+
Row: {
|
|
912
|
+
anon_user_id: string;
|
|
913
|
+
created_at: string | null;
|
|
914
|
+
device_id: string;
|
|
915
|
+
id: string;
|
|
916
|
+
language_entity_id: string;
|
|
917
|
+
location: unknown | null;
|
|
918
|
+
origin_share_id: string | null;
|
|
919
|
+
session_id: string;
|
|
920
|
+
share_entity_id: string;
|
|
921
|
+
share_entity_type: Database["public"]["Enums"]["share_entity_type"];
|
|
922
|
+
shared_at: string | null;
|
|
923
|
+
};
|
|
924
|
+
Insert: {
|
|
925
|
+
anon_user_id: string;
|
|
926
|
+
created_at?: string | null;
|
|
927
|
+
device_id: string;
|
|
928
|
+
id?: string;
|
|
929
|
+
language_entity_id: string;
|
|
930
|
+
location?: unknown | null;
|
|
931
|
+
origin_share_id?: string | null;
|
|
932
|
+
session_id: string;
|
|
933
|
+
share_entity_id: string;
|
|
934
|
+
share_entity_type: Database["public"]["Enums"]["share_entity_type"];
|
|
935
|
+
shared_at?: string | null;
|
|
936
|
+
};
|
|
937
|
+
Update: {
|
|
938
|
+
anon_user_id?: string;
|
|
939
|
+
created_at?: string | null;
|
|
940
|
+
device_id?: string;
|
|
941
|
+
id?: string;
|
|
942
|
+
language_entity_id?: string;
|
|
943
|
+
location?: unknown | null;
|
|
944
|
+
origin_share_id?: string | null;
|
|
945
|
+
session_id?: string;
|
|
946
|
+
share_entity_id?: string;
|
|
947
|
+
share_entity_type?: Database["public"]["Enums"]["share_entity_type"];
|
|
948
|
+
shared_at?: string | null;
|
|
949
|
+
};
|
|
950
|
+
Relationships: [
|
|
951
|
+
{
|
|
952
|
+
foreignKeyName: "shares_anon_user_id_fkey";
|
|
953
|
+
columns: ["anon_user_id"];
|
|
954
|
+
isOneToOne: false;
|
|
955
|
+
referencedRelation: "users_anon";
|
|
956
|
+
referencedColumns: ["id"];
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
foreignKeyName: "shares_language_entity_id_fkey";
|
|
960
|
+
columns: ["language_entity_id"];
|
|
961
|
+
isOneToOne: false;
|
|
962
|
+
referencedRelation: "language_entities";
|
|
963
|
+
referencedColumns: ["id"];
|
|
964
|
+
},
|
|
965
|
+
{
|
|
966
|
+
foreignKeyName: "shares_origin_share_id_fkey";
|
|
967
|
+
columns: ["origin_share_id"];
|
|
968
|
+
isOneToOne: false;
|
|
969
|
+
referencedRelation: "shares";
|
|
970
|
+
referencedColumns: ["id"];
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
foreignKeyName: "shares_session_id_fkey";
|
|
974
|
+
columns: ["session_id"];
|
|
975
|
+
isOneToOne: false;
|
|
976
|
+
referencedRelation: "sessions";
|
|
977
|
+
referencedColumns: ["id"];
|
|
978
|
+
}
|
|
979
|
+
];
|
|
980
|
+
};
|
|
658
981
|
spatial_ref_sys: {
|
|
659
982
|
Row: {
|
|
660
983
|
auth_name: string | null;
|
|
@@ -835,6 +1158,99 @@ export type Database = {
|
|
|
835
1158
|
};
|
|
836
1159
|
Relationships: [];
|
|
837
1160
|
};
|
|
1161
|
+
users_anon: {
|
|
1162
|
+
Row: {
|
|
1163
|
+
created_at: string | null;
|
|
1164
|
+
device_id: string;
|
|
1165
|
+
id: string;
|
|
1166
|
+
updated_at: string | null;
|
|
1167
|
+
user_id: string | null;
|
|
1168
|
+
};
|
|
1169
|
+
Insert: {
|
|
1170
|
+
created_at?: string | null;
|
|
1171
|
+
device_id: string;
|
|
1172
|
+
id?: string;
|
|
1173
|
+
updated_at?: string | null;
|
|
1174
|
+
user_id?: string | null;
|
|
1175
|
+
};
|
|
1176
|
+
Update: {
|
|
1177
|
+
created_at?: string | null;
|
|
1178
|
+
device_id?: string;
|
|
1179
|
+
id?: string;
|
|
1180
|
+
updated_at?: string | null;
|
|
1181
|
+
user_id?: string | null;
|
|
1182
|
+
};
|
|
1183
|
+
Relationships: [
|
|
1184
|
+
{
|
|
1185
|
+
foreignKeyName: "users_anon_user_id_fkey";
|
|
1186
|
+
columns: ["user_id"];
|
|
1187
|
+
isOneToOne: false;
|
|
1188
|
+
referencedRelation: "users";
|
|
1189
|
+
referencedColumns: ["id"];
|
|
1190
|
+
}
|
|
1191
|
+
];
|
|
1192
|
+
};
|
|
1193
|
+
verse_listens: {
|
|
1194
|
+
Row: {
|
|
1195
|
+
anon_user_id: string;
|
|
1196
|
+
connectivity: Database["public"]["Enums"]["connectivity_type"] | null;
|
|
1197
|
+
created_at: string | null;
|
|
1198
|
+
device_id: string;
|
|
1199
|
+
id: string;
|
|
1200
|
+
language_entity_id: string;
|
|
1201
|
+
listened_at: string | null;
|
|
1202
|
+
location: unknown | null;
|
|
1203
|
+
session_id: string;
|
|
1204
|
+
verse_id: string;
|
|
1205
|
+
};
|
|
1206
|
+
Insert: {
|
|
1207
|
+
anon_user_id: string;
|
|
1208
|
+
connectivity?: Database["public"]["Enums"]["connectivity_type"] | null;
|
|
1209
|
+
created_at?: string | null;
|
|
1210
|
+
device_id: string;
|
|
1211
|
+
id?: string;
|
|
1212
|
+
language_entity_id: string;
|
|
1213
|
+
listened_at?: string | null;
|
|
1214
|
+
location?: unknown | null;
|
|
1215
|
+
session_id: string;
|
|
1216
|
+
verse_id: string;
|
|
1217
|
+
};
|
|
1218
|
+
Update: {
|
|
1219
|
+
anon_user_id?: string;
|
|
1220
|
+
connectivity?: Database["public"]["Enums"]["connectivity_type"] | null;
|
|
1221
|
+
created_at?: string | null;
|
|
1222
|
+
device_id?: string;
|
|
1223
|
+
id?: string;
|
|
1224
|
+
language_entity_id?: string;
|
|
1225
|
+
listened_at?: string | null;
|
|
1226
|
+
location?: unknown | null;
|
|
1227
|
+
session_id?: string;
|
|
1228
|
+
verse_id?: string;
|
|
1229
|
+
};
|
|
1230
|
+
Relationships: [
|
|
1231
|
+
{
|
|
1232
|
+
foreignKeyName: "verse_listens_anon_user_id_fkey";
|
|
1233
|
+
columns: ["anon_user_id"];
|
|
1234
|
+
isOneToOne: false;
|
|
1235
|
+
referencedRelation: "users_anon";
|
|
1236
|
+
referencedColumns: ["id"];
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
foreignKeyName: "verse_listens_language_entity_id_fkey";
|
|
1240
|
+
columns: ["language_entity_id"];
|
|
1241
|
+
isOneToOne: false;
|
|
1242
|
+
referencedRelation: "language_entities";
|
|
1243
|
+
referencedColumns: ["id"];
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
foreignKeyName: "verse_listens_session_id_fkey";
|
|
1247
|
+
columns: ["session_id"];
|
|
1248
|
+
isOneToOne: false;
|
|
1249
|
+
referencedRelation: "sessions";
|
|
1250
|
+
referencedColumns: ["id"];
|
|
1251
|
+
}
|
|
1252
|
+
];
|
|
1253
|
+
};
|
|
838
1254
|
};
|
|
839
1255
|
Views: {
|
|
840
1256
|
geography_columns: {
|
|
@@ -3601,9 +4017,12 @@ export type Database = {
|
|
|
3601
4017
|
};
|
|
3602
4018
|
Enums: {
|
|
3603
4019
|
change_type: "create" | "update" | "delete";
|
|
4020
|
+
connectivity_type: "wifi" | "cellular" | "offline" | "unknown";
|
|
3604
4021
|
contribution_status: "approved" | "not_approved";
|
|
3605
4022
|
language_entity_level: "family" | "language" | "dialect" | "mother_tongue";
|
|
4023
|
+
platform_type: "ios" | "android" | "web" | "desktop";
|
|
3606
4024
|
region_level: "continent" | "world_region" | "country" | "state" | "province" | "district" | "town" | "village";
|
|
4025
|
+
share_entity_type: "app" | "chapter" | "playlist" | "verse" | "passage";
|
|
3607
4026
|
};
|
|
3608
4027
|
CompositeTypes: {
|
|
3609
4028
|
geometry_dump: {
|
|
@@ -3673,9 +4092,12 @@ export declare const Constants: {
|
|
|
3673
4092
|
readonly public: {
|
|
3674
4093
|
readonly Enums: {
|
|
3675
4094
|
readonly change_type: readonly ["create", "update", "delete"];
|
|
4095
|
+
readonly connectivity_type: readonly ["wifi", "cellular", "offline", "unknown"];
|
|
3676
4096
|
readonly contribution_status: readonly ["approved", "not_approved"];
|
|
3677
4097
|
readonly language_entity_level: readonly ["family", "language", "dialect", "mother_tongue"];
|
|
4098
|
+
readonly platform_type: readonly ["ios", "android", "web", "desktop"];
|
|
3678
4099
|
readonly region_level: readonly ["continent", "world_region", "country", "state", "province", "district", "town", "village"];
|
|
4100
|
+
readonly share_entity_type: readonly ["app", "chapter", "playlist", "verse", "passage"];
|
|
3679
4101
|
};
|
|
3680
4102
|
};
|
|
3681
4103
|
};
|