@everylanguage/shared-types 1.0.8 → 1.0.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/package.json +2 -1
- package/types/database.d.ts +250 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everylanguage/shared-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "types/database.js",
|
|
6
6
|
"types": "types/database.d.ts",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"format:check": "prettier --check .",
|
|
48
48
|
"sql:format": "sql-formatter --config .sqlformatterrc.json supabase/migrations/*.sql",
|
|
49
49
|
"type-check": "tsc --noEmit",
|
|
50
|
+
"type-check:functions": "cd supabase/functions && deno check **/*.ts",
|
|
50
51
|
"prepare": "husky",
|
|
51
52
|
"commit": "cz",
|
|
52
53
|
"version:patch": "npm version patch",
|
package/types/database.d.ts
CHANGED
|
@@ -89,6 +89,71 @@ export type Database = {
|
|
|
89
89
|
}
|
|
90
90
|
];
|
|
91
91
|
};
|
|
92
|
+
audio_versions: {
|
|
93
|
+
Row: {
|
|
94
|
+
bible_version_id: string;
|
|
95
|
+
created_at: string | null;
|
|
96
|
+
created_by: string | null;
|
|
97
|
+
deleted_at: string | null;
|
|
98
|
+
id: string;
|
|
99
|
+
language_entity_id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
project_id: string | null;
|
|
102
|
+
updated_at: string | null;
|
|
103
|
+
};
|
|
104
|
+
Insert: {
|
|
105
|
+
bible_version_id: string;
|
|
106
|
+
created_at?: string | null;
|
|
107
|
+
created_by?: string | null;
|
|
108
|
+
deleted_at?: string | null;
|
|
109
|
+
id?: string;
|
|
110
|
+
language_entity_id: string;
|
|
111
|
+
name: string;
|
|
112
|
+
project_id?: string | null;
|
|
113
|
+
updated_at?: string | null;
|
|
114
|
+
};
|
|
115
|
+
Update: {
|
|
116
|
+
bible_version_id?: string;
|
|
117
|
+
created_at?: string | null;
|
|
118
|
+
created_by?: string | null;
|
|
119
|
+
deleted_at?: string | null;
|
|
120
|
+
id?: string;
|
|
121
|
+
language_entity_id?: string;
|
|
122
|
+
name?: string;
|
|
123
|
+
project_id?: string | null;
|
|
124
|
+
updated_at?: string | null;
|
|
125
|
+
};
|
|
126
|
+
Relationships: [
|
|
127
|
+
{
|
|
128
|
+
foreignKeyName: "audio_versions_bible_version_id_fkey";
|
|
129
|
+
columns: ["bible_version_id"];
|
|
130
|
+
isOneToOne: false;
|
|
131
|
+
referencedRelation: "bible_versions";
|
|
132
|
+
referencedColumns: ["id"];
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
foreignKeyName: "audio_versions_created_by_fkey";
|
|
136
|
+
columns: ["created_by"];
|
|
137
|
+
isOneToOne: false;
|
|
138
|
+
referencedRelation: "users";
|
|
139
|
+
referencedColumns: ["id"];
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
foreignKeyName: "audio_versions_language_entity_id_fkey";
|
|
143
|
+
columns: ["language_entity_id"];
|
|
144
|
+
isOneToOne: false;
|
|
145
|
+
referencedRelation: "language_entities";
|
|
146
|
+
referencedColumns: ["id"];
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
foreignKeyName: "audio_versions_project_id_fkey";
|
|
150
|
+
columns: ["project_id"];
|
|
151
|
+
isOneToOne: false;
|
|
152
|
+
referencedRelation: "projects";
|
|
153
|
+
referencedColumns: ["id"];
|
|
154
|
+
}
|
|
155
|
+
];
|
|
156
|
+
};
|
|
92
157
|
bases: {
|
|
93
158
|
Row: {
|
|
94
159
|
created_at: string | null;
|
|
@@ -197,6 +262,7 @@ export type Database = {
|
|
|
197
262
|
global_order: number | null;
|
|
198
263
|
id: string;
|
|
199
264
|
name: string;
|
|
265
|
+
testament: Database["public"]["Enums"]["testament"] | null;
|
|
200
266
|
updated_at: string | null;
|
|
201
267
|
};
|
|
202
268
|
Insert: {
|
|
@@ -206,6 +272,7 @@ export type Database = {
|
|
|
206
272
|
global_order?: number | null;
|
|
207
273
|
id: string;
|
|
208
274
|
name: string;
|
|
275
|
+
testament?: Database["public"]["Enums"]["testament"] | null;
|
|
209
276
|
updated_at?: string | null;
|
|
210
277
|
};
|
|
211
278
|
Update: {
|
|
@@ -215,6 +282,7 @@ export type Database = {
|
|
|
215
282
|
global_order?: number | null;
|
|
216
283
|
id?: string;
|
|
217
284
|
name?: string;
|
|
285
|
+
testament?: Database["public"]["Enums"]["testament"] | null;
|
|
218
286
|
updated_at?: string | null;
|
|
219
287
|
};
|
|
220
288
|
Relationships: [
|
|
@@ -333,6 +401,98 @@ export type Database = {
|
|
|
333
401
|
}
|
|
334
402
|
];
|
|
335
403
|
};
|
|
404
|
+
image_sets: {
|
|
405
|
+
Row: {
|
|
406
|
+
created_at: string | null;
|
|
407
|
+
created_by: string | null;
|
|
408
|
+
id: string;
|
|
409
|
+
name: string;
|
|
410
|
+
remote_path: string;
|
|
411
|
+
updated_at: string | null;
|
|
412
|
+
};
|
|
413
|
+
Insert: {
|
|
414
|
+
created_at?: string | null;
|
|
415
|
+
created_by?: string | null;
|
|
416
|
+
id?: string;
|
|
417
|
+
name: string;
|
|
418
|
+
remote_path: string;
|
|
419
|
+
updated_at?: string | null;
|
|
420
|
+
};
|
|
421
|
+
Update: {
|
|
422
|
+
created_at?: string | null;
|
|
423
|
+
created_by?: string | null;
|
|
424
|
+
id?: string;
|
|
425
|
+
name?: string;
|
|
426
|
+
remote_path?: string;
|
|
427
|
+
updated_at?: string | null;
|
|
428
|
+
};
|
|
429
|
+
Relationships: [
|
|
430
|
+
{
|
|
431
|
+
foreignKeyName: "image_sets_created_by_fkey";
|
|
432
|
+
columns: ["created_by"];
|
|
433
|
+
isOneToOne: false;
|
|
434
|
+
referencedRelation: "users";
|
|
435
|
+
referencedColumns: ["id"];
|
|
436
|
+
}
|
|
437
|
+
];
|
|
438
|
+
};
|
|
439
|
+
images: {
|
|
440
|
+
Row: {
|
|
441
|
+
created_at: string | null;
|
|
442
|
+
created_by: string | null;
|
|
443
|
+
deleted_at: string | null;
|
|
444
|
+
id: string;
|
|
445
|
+
publish_status: Database["public"]["Enums"]["publish_status"];
|
|
446
|
+
remote_path: string;
|
|
447
|
+
set_id: string | null;
|
|
448
|
+
target_id: string;
|
|
449
|
+
target_type: Database["public"]["Enums"]["target_type"];
|
|
450
|
+
updated_at: string | null;
|
|
451
|
+
version: number;
|
|
452
|
+
};
|
|
453
|
+
Insert: {
|
|
454
|
+
created_at?: string | null;
|
|
455
|
+
created_by?: string | null;
|
|
456
|
+
deleted_at?: string | null;
|
|
457
|
+
id?: string;
|
|
458
|
+
publish_status?: Database["public"]["Enums"]["publish_status"];
|
|
459
|
+
remote_path: string;
|
|
460
|
+
set_id?: string | null;
|
|
461
|
+
target_id: string;
|
|
462
|
+
target_type: Database["public"]["Enums"]["target_type"];
|
|
463
|
+
updated_at?: string | null;
|
|
464
|
+
version?: number;
|
|
465
|
+
};
|
|
466
|
+
Update: {
|
|
467
|
+
created_at?: string | null;
|
|
468
|
+
created_by?: string | null;
|
|
469
|
+
deleted_at?: string | null;
|
|
470
|
+
id?: string;
|
|
471
|
+
publish_status?: Database["public"]["Enums"]["publish_status"];
|
|
472
|
+
remote_path?: string;
|
|
473
|
+
set_id?: string | null;
|
|
474
|
+
target_id?: string;
|
|
475
|
+
target_type?: Database["public"]["Enums"]["target_type"];
|
|
476
|
+
updated_at?: string | null;
|
|
477
|
+
version?: number;
|
|
478
|
+
};
|
|
479
|
+
Relationships: [
|
|
480
|
+
{
|
|
481
|
+
foreignKeyName: "images_created_by_fkey";
|
|
482
|
+
columns: ["created_by"];
|
|
483
|
+
isOneToOne: false;
|
|
484
|
+
referencedRelation: "users";
|
|
485
|
+
referencedColumns: ["id"];
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
foreignKeyName: "images_set_id_fkey";
|
|
489
|
+
columns: ["set_id"];
|
|
490
|
+
isOneToOne: false;
|
|
491
|
+
referencedRelation: "image_sets";
|
|
492
|
+
referencedColumns: ["id"];
|
|
493
|
+
}
|
|
494
|
+
];
|
|
495
|
+
};
|
|
336
496
|
language_aliases: {
|
|
337
497
|
Row: {
|
|
338
498
|
alias_name: string;
|
|
@@ -674,6 +834,7 @@ export type Database = {
|
|
|
674
834
|
};
|
|
675
835
|
media_files: {
|
|
676
836
|
Row: {
|
|
837
|
+
audio_version_id: string | null;
|
|
677
838
|
check_status: Database["public"]["Enums"]["check_status"] | null;
|
|
678
839
|
created_at: string | null;
|
|
679
840
|
created_by: string | null;
|
|
@@ -695,6 +856,7 @@ export type Database = {
|
|
|
695
856
|
version: number | null;
|
|
696
857
|
};
|
|
697
858
|
Insert: {
|
|
859
|
+
audio_version_id?: string | null;
|
|
698
860
|
check_status?: Database["public"]["Enums"]["check_status"] | null;
|
|
699
861
|
created_at?: string | null;
|
|
700
862
|
created_by?: string | null;
|
|
@@ -716,6 +878,7 @@ export type Database = {
|
|
|
716
878
|
version?: number | null;
|
|
717
879
|
};
|
|
718
880
|
Update: {
|
|
881
|
+
audio_version_id?: string | null;
|
|
719
882
|
check_status?: Database["public"]["Enums"]["check_status"] | null;
|
|
720
883
|
created_at?: string | null;
|
|
721
884
|
created_by?: string | null;
|
|
@@ -737,6 +900,13 @@ export type Database = {
|
|
|
737
900
|
version?: number | null;
|
|
738
901
|
};
|
|
739
902
|
Relationships: [
|
|
903
|
+
{
|
|
904
|
+
foreignKeyName: "media_files_audio_version_id_fkey";
|
|
905
|
+
columns: ["audio_version_id"];
|
|
906
|
+
isOneToOne: false;
|
|
907
|
+
referencedRelation: "audio_versions";
|
|
908
|
+
referencedColumns: ["id"];
|
|
909
|
+
},
|
|
740
910
|
{
|
|
741
911
|
foreignKeyName: "media_files_created_by_fkey";
|
|
742
912
|
columns: ["created_by"];
|
|
@@ -2163,6 +2333,7 @@ export type Database = {
|
|
|
2163
2333
|
id: string;
|
|
2164
2334
|
language_entity_id: string;
|
|
2165
2335
|
name: string;
|
|
2336
|
+
project_id: string | null;
|
|
2166
2337
|
text_version_source: Database["public"]["Enums"]["text_version_source"] | null;
|
|
2167
2338
|
updated_at: string | null;
|
|
2168
2339
|
};
|
|
@@ -2174,6 +2345,7 @@ export type Database = {
|
|
|
2174
2345
|
id?: string;
|
|
2175
2346
|
language_entity_id: string;
|
|
2176
2347
|
name: string;
|
|
2348
|
+
project_id?: string | null;
|
|
2177
2349
|
text_version_source?: Database["public"]["Enums"]["text_version_source"] | null;
|
|
2178
2350
|
updated_at?: string | null;
|
|
2179
2351
|
};
|
|
@@ -2185,6 +2357,7 @@ export type Database = {
|
|
|
2185
2357
|
id?: string;
|
|
2186
2358
|
language_entity_id?: string;
|
|
2187
2359
|
name?: string;
|
|
2360
|
+
project_id?: string | null;
|
|
2188
2361
|
text_version_source?: Database["public"]["Enums"]["text_version_source"] | null;
|
|
2189
2362
|
updated_at?: string | null;
|
|
2190
2363
|
};
|
|
@@ -2209,6 +2382,13 @@ export type Database = {
|
|
|
2209
2382
|
isOneToOne: false;
|
|
2210
2383
|
referencedRelation: "language_entities";
|
|
2211
2384
|
referencedColumns: ["id"];
|
|
2385
|
+
},
|
|
2386
|
+
{
|
|
2387
|
+
foreignKeyName: "text_versions_project_id_fkey";
|
|
2388
|
+
columns: ["project_id"];
|
|
2389
|
+
isOneToOne: false;
|
|
2390
|
+
referencedRelation: "projects";
|
|
2391
|
+
referencedColumns: ["id"];
|
|
2212
2392
|
}
|
|
2213
2393
|
];
|
|
2214
2394
|
};
|
|
@@ -2487,6 +2667,55 @@ export type Database = {
|
|
|
2487
2667
|
}
|
|
2488
2668
|
];
|
|
2489
2669
|
};
|
|
2670
|
+
user_saved_versions: {
|
|
2671
|
+
Row: {
|
|
2672
|
+
audio_project_id: string | null;
|
|
2673
|
+
created_at: string | null;
|
|
2674
|
+
id: string;
|
|
2675
|
+
text_version_id: string | null;
|
|
2676
|
+
updated_at: string | null;
|
|
2677
|
+
user_id: string;
|
|
2678
|
+
};
|
|
2679
|
+
Insert: {
|
|
2680
|
+
audio_project_id?: string | null;
|
|
2681
|
+
created_at?: string | null;
|
|
2682
|
+
id?: string;
|
|
2683
|
+
text_version_id?: string | null;
|
|
2684
|
+
updated_at?: string | null;
|
|
2685
|
+
user_id: string;
|
|
2686
|
+
};
|
|
2687
|
+
Update: {
|
|
2688
|
+
audio_project_id?: string | null;
|
|
2689
|
+
created_at?: string | null;
|
|
2690
|
+
id?: string;
|
|
2691
|
+
text_version_id?: string | null;
|
|
2692
|
+
updated_at?: string | null;
|
|
2693
|
+
user_id?: string;
|
|
2694
|
+
};
|
|
2695
|
+
Relationships: [
|
|
2696
|
+
{
|
|
2697
|
+
foreignKeyName: "user_saved_versions_audio_project_id_fkey";
|
|
2698
|
+
columns: ["audio_project_id"];
|
|
2699
|
+
isOneToOne: false;
|
|
2700
|
+
referencedRelation: "projects";
|
|
2701
|
+
referencedColumns: ["id"];
|
|
2702
|
+
},
|
|
2703
|
+
{
|
|
2704
|
+
foreignKeyName: "user_saved_versions_text_version_id_fkey";
|
|
2705
|
+
columns: ["text_version_id"];
|
|
2706
|
+
isOneToOne: false;
|
|
2707
|
+
referencedRelation: "text_versions";
|
|
2708
|
+
referencedColumns: ["id"];
|
|
2709
|
+
},
|
|
2710
|
+
{
|
|
2711
|
+
foreignKeyName: "user_saved_versions_user_id_fkey";
|
|
2712
|
+
columns: ["user_id"];
|
|
2713
|
+
isOneToOne: false;
|
|
2714
|
+
referencedRelation: "users";
|
|
2715
|
+
referencedColumns: ["id"];
|
|
2716
|
+
}
|
|
2717
|
+
];
|
|
2718
|
+
};
|
|
2490
2719
|
users: {
|
|
2491
2720
|
Row: {
|
|
2492
2721
|
auth_uid: string;
|
|
@@ -2626,30 +2855,39 @@ export type Database = {
|
|
|
2626
2855
|
created_by: string | null;
|
|
2627
2856
|
deleted_at: string | null;
|
|
2628
2857
|
id: string;
|
|
2629
|
-
|
|
2858
|
+
project_id: string | null;
|
|
2859
|
+
publish_status: Database["public"]["Enums"]["publish_status"];
|
|
2860
|
+
text_version_id: string | null;
|
|
2630
2861
|
updated_at: string | null;
|
|
2631
2862
|
verse_id: string;
|
|
2632
2863
|
verse_text: string;
|
|
2864
|
+
version: number;
|
|
2633
2865
|
};
|
|
2634
2866
|
Insert: {
|
|
2635
2867
|
created_at?: string | null;
|
|
2636
2868
|
created_by?: string | null;
|
|
2637
2869
|
deleted_at?: string | null;
|
|
2638
2870
|
id?: string;
|
|
2639
|
-
|
|
2871
|
+
project_id?: string | null;
|
|
2872
|
+
publish_status?: Database["public"]["Enums"]["publish_status"];
|
|
2873
|
+
text_version_id?: string | null;
|
|
2640
2874
|
updated_at?: string | null;
|
|
2641
2875
|
verse_id: string;
|
|
2642
2876
|
verse_text: string;
|
|
2877
|
+
version?: number;
|
|
2643
2878
|
};
|
|
2644
2879
|
Update: {
|
|
2645
2880
|
created_at?: string | null;
|
|
2646
2881
|
created_by?: string | null;
|
|
2647
2882
|
deleted_at?: string | null;
|
|
2648
2883
|
id?: string;
|
|
2649
|
-
|
|
2884
|
+
project_id?: string | null;
|
|
2885
|
+
publish_status?: Database["public"]["Enums"]["publish_status"];
|
|
2886
|
+
text_version_id?: string | null;
|
|
2650
2887
|
updated_at?: string | null;
|
|
2651
2888
|
verse_id?: string;
|
|
2652
2889
|
verse_text?: string;
|
|
2890
|
+
version?: number;
|
|
2653
2891
|
};
|
|
2654
2892
|
Relationships: [
|
|
2655
2893
|
{
|
|
@@ -2659,6 +2897,13 @@ export type Database = {
|
|
|
2659
2897
|
referencedRelation: "users";
|
|
2660
2898
|
referencedColumns: ["id"];
|
|
2661
2899
|
},
|
|
2900
|
+
{
|
|
2901
|
+
foreignKeyName: "verse_texts_project_id_fkey";
|
|
2902
|
+
columns: ["project_id"];
|
|
2903
|
+
isOneToOne: false;
|
|
2904
|
+
referencedRelation: "projects";
|
|
2905
|
+
referencedColumns: ["id"];
|
|
2906
|
+
},
|
|
2662
2907
|
{
|
|
2663
2908
|
foreignKeyName: "verse_texts_text_version_id_fkey";
|
|
2664
2909
|
columns: ["text_version_id"];
|
|
@@ -5517,6 +5762,7 @@ export type Database = {
|
|
|
5517
5762
|
segment_type: "source" | "target";
|
|
5518
5763
|
share_entity_type: "app" | "chapter" | "playlist" | "verse" | "passage";
|
|
5519
5764
|
target_type: "chapter" | "book" | "sermon" | "passage" | "verse" | "podcast" | "film_segment" | "audio_segment";
|
|
5765
|
+
testament: "old" | "new";
|
|
5520
5766
|
text_version_source: "official_translation" | "ai_transcription" | "user_submitted";
|
|
5521
5767
|
upload_status: "pending" | "uploading" | "completed" | "failed";
|
|
5522
5768
|
};
|
|
@@ -5600,6 +5846,7 @@ export declare const Constants: {
|
|
|
5600
5846
|
readonly segment_type: readonly ["source", "target"];
|
|
5601
5847
|
readonly share_entity_type: readonly ["app", "chapter", "playlist", "verse", "passage"];
|
|
5602
5848
|
readonly target_type: readonly ["chapter", "book", "sermon", "passage", "verse", "podcast", "film_segment", "audio_segment"];
|
|
5849
|
+
readonly testament: readonly ["old", "new"];
|
|
5603
5850
|
readonly text_version_source: readonly ["official_translation", "ai_transcription", "user_submitted"];
|
|
5604
5851
|
readonly upload_status: readonly ["pending", "uploading", "completed", "failed"];
|
|
5605
5852
|
};
|