@everylanguage/shared-types 1.0.7 → 1.0.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everylanguage/shared-types",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
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",
@@ -66,10 +67,12 @@
66
67
  "dependencies": {
67
68
  "@typescript-eslint/eslint-plugin": "^8.34.1",
68
69
  "@typescript-eslint/parser": "^8.34.1",
70
+ "backblaze-b2": "^1.7.1",
69
71
  "eslint": "^9.29.0",
70
72
  "eslint-config-prettier": "^10.1.5",
71
73
  "eslint-plugin-prettier": "^5.5.0",
72
74
  "eslint-plugin-sql": "^3.2.2",
75
+ "form-data": "^4.0.3",
73
76
  "husky": "^9.1.7",
74
77
  "jest": "^30.0.2",
75
78
  "lint-staged": "^16.1.2",
@@ -83,8 +86,10 @@
83
86
  "@supabase/supabase-js": "^2.50.2",
84
87
  "@types/jest": "^30.0.0",
85
88
  "@types/node": "^24.0.7",
89
+ "@types/node-fetch": "^2.6.12",
86
90
  "commitizen": "^4.3.1",
87
91
  "cz-conventional-changelog": "^3.3.0",
92
+ "node-fetch": "^3.3.2",
88
93
  "ts-jest": "^29.4.0"
89
94
  }
90
95
  }
package/types/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @everylanguage/shared-types
2
2
 
3
- 🎯 **Shared TypeScript types for the EverlyLanguage audio translation platform**
3
+ 🎯 **Shared TypeScript types**
4
4
 
5
5
  This package contains automatically generated TypeScript types from our Supabase database schema, ensuring type safety across all applications in the EverlyLanguage ecosystem.
6
6
 
@@ -59,6 +59,6 @@ This package follows [Semantic Versioning](https://semver.org/):
59
59
 
60
60
  ## 🐛 Issues & Support
61
61
 
62
- - **Backend Issues**: [Backend Repository](https://github.com/your-org/el-backend/issues)
63
- - **Type Issues**: [Type-specific issues](https://github.com/your-org/el-backend/issues?q=label%3Atypes)
62
+ - **Backend Issues**: [Backend Repository](https://github.com/every-language/el-backend/issues)
63
+ - **Type Issues**: [Type-specific issues](https://github.com/every-language/el-backend/issues?q=label%3Atypes)
64
64
  - **Application Integration**: Contact your respective app team
@@ -2,6 +2,9 @@ export type Json = string | number | boolean | null | {
2
2
  [key: string]: Json | undefined;
3
3
  } | Json[];
4
4
  export type Database = {
5
+ __InternalSupabase: {
6
+ PostgrestVersion: "12.2.3 (519615d)";
7
+ };
5
8
  graphql_public: {
6
9
  Tables: {
7
10
  [_ in never]: never;
@@ -172,7 +175,7 @@ export type Database = {
172
175
  };
173
176
  Insert: {
174
177
  created_at?: string | null;
175
- id?: string;
178
+ id: string;
176
179
  name: string;
177
180
  structure_notes?: string | null;
178
181
  updated_at?: string | null;
@@ -194,6 +197,7 @@ export type Database = {
194
197
  global_order: number | null;
195
198
  id: string;
196
199
  name: string;
200
+ testament: Database["public"]["Enums"]["testament"] | null;
197
201
  updated_at: string | null;
198
202
  };
199
203
  Insert: {
@@ -201,8 +205,9 @@ export type Database = {
201
205
  book_number: number;
202
206
  created_at?: string | null;
203
207
  global_order?: number | null;
204
- id?: string;
208
+ id: string;
205
209
  name: string;
210
+ testament?: Database["public"]["Enums"]["testament"] | null;
206
211
  updated_at?: string | null;
207
212
  };
208
213
  Update: {
@@ -212,6 +217,7 @@ export type Database = {
212
217
  global_order?: number | null;
213
218
  id?: string;
214
219
  name?: string;
220
+ testament?: Database["public"]["Enums"]["testament"] | null;
215
221
  updated_at?: string | null;
216
222
  };
217
223
  Relationships: [
@@ -224,6 +230,74 @@ export type Database = {
224
230
  }
225
231
  ];
226
232
  };
233
+ chapter_listens: {
234
+ Row: {
235
+ anon_user_id: string;
236
+ chapter_id: string;
237
+ connectivity: Database["public"]["Enums"]["connectivity_type"] | null;
238
+ created_at: string | null;
239
+ device_id: string;
240
+ id: string;
241
+ language_entity_id: string;
242
+ listened_at: string | null;
243
+ location: unknown | null;
244
+ session_id: string;
245
+ };
246
+ Insert: {
247
+ anon_user_id: string;
248
+ chapter_id: string;
249
+ connectivity?: Database["public"]["Enums"]["connectivity_type"] | null;
250
+ created_at?: string | null;
251
+ device_id: string;
252
+ id?: string;
253
+ language_entity_id: string;
254
+ listened_at?: string | null;
255
+ location?: unknown | null;
256
+ session_id: string;
257
+ };
258
+ Update: {
259
+ anon_user_id?: string;
260
+ chapter_id?: string;
261
+ connectivity?: Database["public"]["Enums"]["connectivity_type"] | null;
262
+ created_at?: string | null;
263
+ device_id?: string;
264
+ id?: string;
265
+ language_entity_id?: string;
266
+ listened_at?: string | null;
267
+ location?: unknown | null;
268
+ session_id?: string;
269
+ };
270
+ Relationships: [
271
+ {
272
+ foreignKeyName: "chapter_listens_anon_user_id_fkey";
273
+ columns: ["anon_user_id"];
274
+ isOneToOne: false;
275
+ referencedRelation: "users_anon";
276
+ referencedColumns: ["id"];
277
+ },
278
+ {
279
+ foreignKeyName: "chapter_listens_chapter_id_fkey";
280
+ columns: ["chapter_id"];
281
+ isOneToOne: false;
282
+ referencedRelation: "chapters";
283
+ referencedColumns: ["id"];
284
+ },
285
+ {
286
+ foreignKeyName: "chapter_listens_language_entity_id_fkey";
287
+ columns: ["language_entity_id"];
288
+ isOneToOne: false;
289
+ referencedRelation: "language_entities";
290
+ referencedColumns: ["id"];
291
+ },
292
+ {
293
+ foreignKeyName: "chapter_listens_session_id_fkey";
294
+ columns: ["session_id"];
295
+ isOneToOne: false;
296
+ referencedRelation: "sessions";
297
+ referencedColumns: ["id"];
298
+ }
299
+ ];
300
+ };
227
301
  chapters: {
228
302
  Row: {
229
303
  book_id: string;
@@ -239,7 +313,7 @@ export type Database = {
239
313
  chapter_number: number;
240
314
  created_at?: string | null;
241
315
  global_order?: number | null;
242
- id?: string;
316
+ id: string;
243
317
  total_verses: number;
244
318
  updated_at?: string | null;
245
319
  };
@@ -262,6 +336,98 @@ export type Database = {
262
336
  }
263
337
  ];
264
338
  };
339
+ image_sets: {
340
+ Row: {
341
+ created_at: string | null;
342
+ created_by: string | null;
343
+ id: string;
344
+ name: string;
345
+ remote_path: string;
346
+ updated_at: string | null;
347
+ };
348
+ Insert: {
349
+ created_at?: string | null;
350
+ created_by?: string | null;
351
+ id?: string;
352
+ name: string;
353
+ remote_path: string;
354
+ updated_at?: string | null;
355
+ };
356
+ Update: {
357
+ created_at?: string | null;
358
+ created_by?: string | null;
359
+ id?: string;
360
+ name?: string;
361
+ remote_path?: string;
362
+ updated_at?: string | null;
363
+ };
364
+ Relationships: [
365
+ {
366
+ foreignKeyName: "image_sets_created_by_fkey";
367
+ columns: ["created_by"];
368
+ isOneToOne: false;
369
+ referencedRelation: "users";
370
+ referencedColumns: ["id"];
371
+ }
372
+ ];
373
+ };
374
+ images: {
375
+ Row: {
376
+ created_at: string | null;
377
+ created_by: string | null;
378
+ deleted_at: string | null;
379
+ id: string;
380
+ publish_status: Database["public"]["Enums"]["publish_status"];
381
+ remote_path: string;
382
+ set_id: string | null;
383
+ target_id: string;
384
+ target_type: Database["public"]["Enums"]["target_type"];
385
+ updated_at: string | null;
386
+ version: number;
387
+ };
388
+ Insert: {
389
+ created_at?: string | null;
390
+ created_by?: string | null;
391
+ deleted_at?: string | null;
392
+ id?: string;
393
+ publish_status?: Database["public"]["Enums"]["publish_status"];
394
+ remote_path: string;
395
+ set_id?: string | null;
396
+ target_id: string;
397
+ target_type: Database["public"]["Enums"]["target_type"];
398
+ updated_at?: string | null;
399
+ version?: number;
400
+ };
401
+ Update: {
402
+ created_at?: string | null;
403
+ created_by?: string | null;
404
+ deleted_at?: string | null;
405
+ id?: string;
406
+ publish_status?: Database["public"]["Enums"]["publish_status"];
407
+ remote_path?: string;
408
+ set_id?: string | null;
409
+ target_id?: string;
410
+ target_type?: Database["public"]["Enums"]["target_type"];
411
+ updated_at?: string | null;
412
+ version?: number;
413
+ };
414
+ Relationships: [
415
+ {
416
+ foreignKeyName: "images_created_by_fkey";
417
+ columns: ["created_by"];
418
+ isOneToOne: false;
419
+ referencedRelation: "users";
420
+ referencedColumns: ["id"];
421
+ },
422
+ {
423
+ foreignKeyName: "images_set_id_fkey";
424
+ columns: ["set_id"];
425
+ isOneToOne: false;
426
+ referencedRelation: "image_sets";
427
+ referencedColumns: ["id"];
428
+ }
429
+ ];
430
+ };
265
431
  language_aliases: {
266
432
  Row: {
267
433
  alias_name: string;
@@ -608,14 +774,17 @@ export type Database = {
608
774
  created_by: string | null;
609
775
  deleted_at: string | null;
610
776
  duration_seconds: number | null;
777
+ end_verse_id: string | null;
611
778
  file_size: number | null;
612
779
  id: string;
780
+ is_bible_audio: boolean | null;
613
781
  language_entity_id: string;
614
782
  local_path: string | null;
615
783
  media_type: Database["public"]["Enums"]["media_type"];
616
784
  project_id: string | null;
617
785
  publish_status: Database["public"]["Enums"]["publish_status"] | null;
618
786
  remote_path: string | null;
787
+ start_verse_id: string | null;
619
788
  updated_at: string | null;
620
789
  upload_status: Database["public"]["Enums"]["upload_status"] | null;
621
790
  version: number | null;
@@ -626,14 +795,17 @@ export type Database = {
626
795
  created_by?: string | null;
627
796
  deleted_at?: string | null;
628
797
  duration_seconds?: number | null;
798
+ end_verse_id?: string | null;
629
799
  file_size?: number | null;
630
800
  id?: string;
801
+ is_bible_audio?: boolean | null;
631
802
  language_entity_id: string;
632
803
  local_path?: string | null;
633
804
  media_type: Database["public"]["Enums"]["media_type"];
634
805
  project_id?: string | null;
635
806
  publish_status?: Database["public"]["Enums"]["publish_status"] | null;
636
807
  remote_path?: string | null;
808
+ start_verse_id?: string | null;
637
809
  updated_at?: string | null;
638
810
  upload_status?: Database["public"]["Enums"]["upload_status"] | null;
639
811
  version?: number | null;
@@ -644,14 +816,17 @@ export type Database = {
644
816
  created_by?: string | null;
645
817
  deleted_at?: string | null;
646
818
  duration_seconds?: number | null;
819
+ end_verse_id?: string | null;
647
820
  file_size?: number | null;
648
821
  id?: string;
822
+ is_bible_audio?: boolean | null;
649
823
  language_entity_id?: string;
650
824
  local_path?: string | null;
651
825
  media_type?: Database["public"]["Enums"]["media_type"];
652
826
  project_id?: string | null;
653
827
  publish_status?: Database["public"]["Enums"]["publish_status"] | null;
654
828
  remote_path?: string | null;
829
+ start_verse_id?: string | null;
655
830
  updated_at?: string | null;
656
831
  upload_status?: Database["public"]["Enums"]["upload_status"] | null;
657
832
  version?: number | null;
@@ -664,6 +839,13 @@ export type Database = {
664
839
  referencedRelation: "users";
665
840
  referencedColumns: ["id"];
666
841
  },
842
+ {
843
+ foreignKeyName: "media_files_end_verse_id_fkey";
844
+ columns: ["end_verse_id"];
845
+ isOneToOne: false;
846
+ referencedRelation: "verses";
847
+ referencedColumns: ["id"];
848
+ },
667
849
  {
668
850
  foreignKeyName: "media_files_language_entity_id_fkey";
669
851
  columns: ["language_entity_id"];
@@ -677,6 +859,13 @@ export type Database = {
677
859
  isOneToOne: false;
678
860
  referencedRelation: "projects";
679
861
  referencedColumns: ["id"];
862
+ },
863
+ {
864
+ foreignKeyName: "media_files_start_verse_id_fkey";
865
+ columns: ["start_verse_id"];
866
+ isOneToOne: false;
867
+ referencedRelation: "verses";
868
+ referencedColumns: ["id"];
680
869
  }
681
870
  ];
682
871
  };
@@ -735,7 +924,6 @@ export type Database = {
735
924
  created_by: string | null;
736
925
  deleted_at: string | null;
737
926
  id: string;
738
- is_bible_audio: boolean | null;
739
927
  media_file_id: string;
740
928
  target_id: string;
741
929
  target_type: Database["public"]["Enums"]["target_type"];
@@ -746,7 +934,6 @@ export type Database = {
746
934
  created_by?: string | null;
747
935
  deleted_at?: string | null;
748
936
  id?: string;
749
- is_bible_audio?: boolean | null;
750
937
  media_file_id: string;
751
938
  target_id: string;
752
939
  target_type: Database["public"]["Enums"]["target_type"];
@@ -757,7 +944,6 @@ export type Database = {
757
944
  created_by?: string | null;
758
945
  deleted_at?: string | null;
759
946
  id?: string;
760
- is_bible_audio?: boolean | null;
761
947
  media_file_id?: string;
762
948
  target_id?: string;
763
949
  target_type?: Database["public"]["Enums"]["target_type"];
@@ -951,6 +1137,7 @@ export type Database = {
951
1137
  playlist_groups: {
952
1138
  Row: {
953
1139
  created_at: string | null;
1140
+ created_by: string | null;
954
1141
  description: string | null;
955
1142
  id: string;
956
1143
  title: string;
@@ -959,6 +1146,7 @@ export type Database = {
959
1146
  };
960
1147
  Insert: {
961
1148
  created_at?: string | null;
1149
+ created_by?: string | null;
962
1150
  description?: string | null;
963
1151
  id?: string;
964
1152
  title: string;
@@ -967,6 +1155,7 @@ export type Database = {
967
1155
  };
968
1156
  Update: {
969
1157
  created_at?: string | null;
1158
+ created_by?: string | null;
970
1159
  description?: string | null;
971
1160
  id?: string;
972
1161
  title?: string;
@@ -974,6 +1163,13 @@ export type Database = {
974
1163
  user_id?: string;
975
1164
  };
976
1165
  Relationships: [
1166
+ {
1167
+ foreignKeyName: "playlist_groups_created_by_fkey";
1168
+ columns: ["created_by"];
1169
+ isOneToOne: false;
1170
+ referencedRelation: "users";
1171
+ referencedColumns: ["id"];
1172
+ },
977
1173
  {
978
1174
  foreignKeyName: "playlist_groups_user_id_fkey";
979
1175
  columns: ["user_id"];
@@ -1131,6 +1327,7 @@ export type Database = {
1131
1327
  projects: {
1132
1328
  Row: {
1133
1329
  created_at: string | null;
1330
+ created_by: string | null;
1134
1331
  deleted_at: string | null;
1135
1332
  description: string | null;
1136
1333
  id: string;
@@ -1143,6 +1340,7 @@ export type Database = {
1143
1340
  };
1144
1341
  Insert: {
1145
1342
  created_at?: string | null;
1343
+ created_by?: string | null;
1146
1344
  deleted_at?: string | null;
1147
1345
  description?: string | null;
1148
1346
  id?: string;
@@ -1155,6 +1353,7 @@ export type Database = {
1155
1353
  };
1156
1354
  Update: {
1157
1355
  created_at?: string | null;
1356
+ created_by?: string | null;
1158
1357
  deleted_at?: string | null;
1159
1358
  description?: string | null;
1160
1359
  id?: string;
@@ -1166,6 +1365,13 @@ export type Database = {
1166
1365
  updated_at?: string | null;
1167
1366
  };
1168
1367
  Relationships: [
1368
+ {
1369
+ foreignKeyName: "projects_created_by_fkey";
1370
+ columns: ["created_by"];
1371
+ isOneToOne: false;
1372
+ referencedRelation: "users";
1373
+ referencedColumns: ["id"];
1374
+ },
1169
1375
  {
1170
1376
  foreignKeyName: "projects_region_id_fkey";
1171
1377
  columns: ["region_id"];
@@ -1480,7 +1686,6 @@ export type Database = {
1480
1686
  created_by: string | null;
1481
1687
  deleted_at: string | null;
1482
1688
  id: string;
1483
- is_bible_audio: boolean | null;
1484
1689
  segment_id: string;
1485
1690
  target_id: string;
1486
1691
  target_type: Database["public"]["Enums"]["target_type"];
@@ -1491,7 +1696,6 @@ export type Database = {
1491
1696
  created_by?: string | null;
1492
1697
  deleted_at?: string | null;
1493
1698
  id?: string;
1494
- is_bible_audio?: boolean | null;
1495
1699
  segment_id: string;
1496
1700
  target_id: string;
1497
1701
  target_type: Database["public"]["Enums"]["target_type"];
@@ -1502,7 +1706,6 @@ export type Database = {
1502
1706
  created_by?: string | null;
1503
1707
  deleted_at?: string | null;
1504
1708
  id?: string;
1505
- is_bible_audio?: boolean | null;
1506
1709
  segment_id?: string;
1507
1710
  target_id?: string;
1508
1711
  target_type?: Database["public"]["Enums"]["target_type"];
@@ -1529,6 +1732,7 @@ export type Database = {
1529
1732
  Row: {
1530
1733
  book_id: string;
1531
1734
  created_at: string | null;
1735
+ created_by: string | null;
1532
1736
  deleted_at: string | null;
1533
1737
  description: string | null;
1534
1738
  end_verse_id: string | null;
@@ -1542,6 +1746,7 @@ export type Database = {
1542
1746
  Insert: {
1543
1747
  book_id: string;
1544
1748
  created_at?: string | null;
1749
+ created_by?: string | null;
1545
1750
  deleted_at?: string | null;
1546
1751
  description?: string | null;
1547
1752
  end_verse_id?: string | null;
@@ -1555,6 +1760,7 @@ export type Database = {
1555
1760
  Update: {
1556
1761
  book_id?: string;
1557
1762
  created_at?: string | null;
1763
+ created_by?: string | null;
1558
1764
  deleted_at?: string | null;
1559
1765
  description?: string | null;
1560
1766
  end_verse_id?: string | null;
@@ -1573,6 +1779,13 @@ export type Database = {
1573
1779
  referencedRelation: "books";
1574
1780
  referencedColumns: ["id"];
1575
1781
  },
1782
+ {
1783
+ foreignKeyName: "sequences_created_by_fkey";
1784
+ columns: ["created_by"];
1785
+ isOneToOne: false;
1786
+ referencedRelation: "users";
1787
+ referencedColumns: ["id"];
1788
+ },
1576
1789
  {
1577
1790
  foreignKeyName: "sequences_end_verse_id_fkey";
1578
1791
  columns: ["end_verse_id"];
@@ -1599,6 +1812,7 @@ export type Database = {
1599
1812
  sequences_segments: {
1600
1813
  Row: {
1601
1814
  created_at: string | null;
1815
+ created_by: string | null;
1602
1816
  id: string;
1603
1817
  is_deleted: boolean | null;
1604
1818
  is_numbered: boolean | null;
@@ -1610,6 +1824,7 @@ export type Database = {
1610
1824
  };
1611
1825
  Insert: {
1612
1826
  created_at?: string | null;
1827
+ created_by?: string | null;
1613
1828
  id?: string;
1614
1829
  is_deleted?: boolean | null;
1615
1830
  is_numbered?: boolean | null;
@@ -1621,6 +1836,7 @@ export type Database = {
1621
1836
  };
1622
1837
  Update: {
1623
1838
  created_at?: string | null;
1839
+ created_by?: string | null;
1624
1840
  id?: string;
1625
1841
  is_deleted?: boolean | null;
1626
1842
  is_numbered?: boolean | null;
@@ -1631,6 +1847,13 @@ export type Database = {
1631
1847
  updated_at?: string | null;
1632
1848
  };
1633
1849
  Relationships: [
1850
+ {
1851
+ foreignKeyName: "sequences_segments_created_by_fkey";
1852
+ columns: ["created_by"];
1853
+ isOneToOne: false;
1854
+ referencedRelation: "users";
1855
+ referencedColumns: ["id"];
1856
+ },
1634
1857
  {
1635
1858
  foreignKeyName: "sequences_segments_segment_id_fkey";
1636
1859
  columns: ["segment_id"];
@@ -1650,6 +1873,7 @@ export type Database = {
1650
1873
  sequences_tags: {
1651
1874
  Row: {
1652
1875
  created_at: string | null;
1876
+ created_by: string | null;
1653
1877
  id: string;
1654
1878
  sequence_id: string;
1655
1879
  tag_id: string;
@@ -1657,6 +1881,7 @@ export type Database = {
1657
1881
  };
1658
1882
  Insert: {
1659
1883
  created_at?: string | null;
1884
+ created_by?: string | null;
1660
1885
  id?: string;
1661
1886
  sequence_id: string;
1662
1887
  tag_id: string;
@@ -1664,12 +1889,20 @@ export type Database = {
1664
1889
  };
1665
1890
  Update: {
1666
1891
  created_at?: string | null;
1892
+ created_by?: string | null;
1667
1893
  id?: string;
1668
1894
  sequence_id?: string;
1669
1895
  tag_id?: string;
1670
1896
  updated_at?: string | null;
1671
1897
  };
1672
1898
  Relationships: [
1899
+ {
1900
+ foreignKeyName: "sequences_tags_created_by_fkey";
1901
+ columns: ["created_by"];
1902
+ isOneToOne: false;
1903
+ referencedRelation: "users";
1904
+ referencedColumns: ["id"];
1905
+ },
1673
1906
  {
1674
1907
  foreignKeyName: "sequences_tags_sequence_id_fkey";
1675
1908
  columns: ["sequence_id"];
@@ -1692,7 +1925,6 @@ export type Database = {
1692
1925
  created_by: string | null;
1693
1926
  deleted_at: string | null;
1694
1927
  id: string;
1695
- is_bible_audio: boolean | null;
1696
1928
  sequence_id: string;
1697
1929
  target_id: string;
1698
1930
  target_type: Database["public"]["Enums"]["target_type"];
@@ -1703,7 +1935,6 @@ export type Database = {
1703
1935
  created_by?: string | null;
1704
1936
  deleted_at?: string | null;
1705
1937
  id?: string;
1706
- is_bible_audio?: boolean | null;
1707
1938
  sequence_id: string;
1708
1939
  target_id: string;
1709
1940
  target_type: Database["public"]["Enums"]["target_type"];
@@ -1714,7 +1945,6 @@ export type Database = {
1714
1945
  created_by?: string | null;
1715
1946
  deleted_at?: string | null;
1716
1947
  id?: string;
1717
- is_bible_audio?: boolean | null;
1718
1948
  sequence_id?: string;
1719
1949
  target_id?: string;
1720
1950
  target_type?: Database["public"]["Enums"]["target_type"];
@@ -2026,7 +2256,7 @@ export type Database = {
2026
2256
  created_by: string | null;
2027
2257
  deleted_at: string | null;
2028
2258
  id: string;
2029
- language_id: string;
2259
+ language_entity_id: string;
2030
2260
  name: string;
2031
2261
  text_version_source: Database["public"]["Enums"]["text_version_source"] | null;
2032
2262
  updated_at: string | null;
@@ -2037,7 +2267,7 @@ export type Database = {
2037
2267
  created_by?: string | null;
2038
2268
  deleted_at?: string | null;
2039
2269
  id?: string;
2040
- language_id: string;
2270
+ language_entity_id: string;
2041
2271
  name: string;
2042
2272
  text_version_source?: Database["public"]["Enums"]["text_version_source"] | null;
2043
2273
  updated_at?: string | null;
@@ -2048,7 +2278,7 @@ export type Database = {
2048
2278
  created_by?: string | null;
2049
2279
  deleted_at?: string | null;
2050
2280
  id?: string;
2051
- language_id?: string;
2281
+ language_entity_id?: string;
2052
2282
  name?: string;
2053
2283
  text_version_source?: Database["public"]["Enums"]["text_version_source"] | null;
2054
2284
  updated_at?: string | null;
@@ -2069,8 +2299,8 @@ export type Database = {
2069
2299
  referencedColumns: ["id"];
2070
2300
  },
2071
2301
  {
2072
- foreignKeyName: "text_versions_language_id_fkey";
2073
- columns: ["language_id"];
2302
+ foreignKeyName: "text_versions_language_entity_id_fkey";
2303
+ columns: ["language_entity_id"];
2074
2304
  isOneToOne: false;
2075
2305
  referencedRelation: "language_entities";
2076
2306
  referencedColumns: ["id"];
@@ -2491,30 +2721,39 @@ export type Database = {
2491
2721
  created_by: string | null;
2492
2722
  deleted_at: string | null;
2493
2723
  id: string;
2494
- text_version_id: string;
2724
+ project_id: string | null;
2725
+ publish_status: Database["public"]["Enums"]["publish_status"];
2726
+ text_version_id: string | null;
2495
2727
  updated_at: string | null;
2496
2728
  verse_id: string;
2497
2729
  verse_text: string;
2730
+ version: number;
2498
2731
  };
2499
2732
  Insert: {
2500
2733
  created_at?: string | null;
2501
2734
  created_by?: string | null;
2502
2735
  deleted_at?: string | null;
2503
2736
  id?: string;
2504
- text_version_id: string;
2737
+ project_id?: string | null;
2738
+ publish_status?: Database["public"]["Enums"]["publish_status"];
2739
+ text_version_id?: string | null;
2505
2740
  updated_at?: string | null;
2506
2741
  verse_id: string;
2507
2742
  verse_text: string;
2743
+ version?: number;
2508
2744
  };
2509
2745
  Update: {
2510
2746
  created_at?: string | null;
2511
2747
  created_by?: string | null;
2512
2748
  deleted_at?: string | null;
2513
2749
  id?: string;
2514
- text_version_id?: string;
2750
+ project_id?: string | null;
2751
+ publish_status?: Database["public"]["Enums"]["publish_status"];
2752
+ text_version_id?: string | null;
2515
2753
  updated_at?: string | null;
2516
2754
  verse_id?: string;
2517
2755
  verse_text?: string;
2756
+ version?: number;
2518
2757
  };
2519
2758
  Relationships: [
2520
2759
  {
@@ -2524,6 +2763,13 @@ export type Database = {
2524
2763
  referencedRelation: "users";
2525
2764
  referencedColumns: ["id"];
2526
2765
  },
2766
+ {
2767
+ foreignKeyName: "verse_texts_project_id_fkey";
2768
+ columns: ["project_id"];
2769
+ isOneToOne: false;
2770
+ referencedRelation: "projects";
2771
+ referencedColumns: ["id"];
2772
+ },
2527
2773
  {
2528
2774
  foreignKeyName: "verse_texts_text_version_id_fkey";
2529
2775
  columns: ["text_version_id"];
@@ -2553,7 +2799,7 @@ export type Database = {
2553
2799
  chapter_id: string;
2554
2800
  created_at?: string | null;
2555
2801
  global_order?: number | null;
2556
- id?: string;
2802
+ id: string;
2557
2803
  updated_at?: string | null;
2558
2804
  verse_number: number;
2559
2805
  };
@@ -3320,6 +3566,8 @@ export type Database = {
3320
3566
  };
3321
3567
  get_chapter_global_order: {
3322
3568
  Args: {
3569
+ chapter_text_id: string;
3570
+ } | {
3323
3571
  chapter_uuid: string;
3324
3572
  };
3325
3573
  Returns: number;
@@ -3344,6 +3592,8 @@ export type Database = {
3344
3592
  };
3345
3593
  get_verse_global_order: {
3346
3594
  Args: {
3595
+ verse_text_id: string;
3596
+ } | {
3347
3597
  verse_uuid: string;
3348
3598
  };
3349
3599
  Returns: number;
@@ -5356,6 +5606,9 @@ export type Database = {
5356
5606
  };
5357
5607
  validate_verse_range: {
5358
5608
  Args: {
5609
+ start_verse_text_id: string;
5610
+ end_verse_text_id: string;
5611
+ } | {
5359
5612
  start_verse_uuid: string;
5360
5613
  end_verse_uuid: string;
5361
5614
  };
@@ -5375,6 +5628,7 @@ export type Database = {
5375
5628
  segment_type: "source" | "target";
5376
5629
  share_entity_type: "app" | "chapter" | "playlist" | "verse" | "passage";
5377
5630
  target_type: "chapter" | "book" | "sermon" | "passage" | "verse" | "podcast" | "film_segment" | "audio_segment";
5631
+ testament: "old" | "new";
5378
5632
  text_version_source: "official_translation" | "ai_transcription" | "user_submitted";
5379
5633
  upload_status: "pending" | "uploading" | "completed" | "failed";
5380
5634
  };
@@ -5391,54 +5645,55 @@ export type Database = {
5391
5645
  };
5392
5646
  };
5393
5647
  };
5394
- type DefaultSchema = Database[Extract<keyof Database, "public">];
5648
+ type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
5649
+ type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
5395
5650
  export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
5396
- schema: keyof Database;
5651
+ schema: keyof DatabaseWithoutInternals;
5397
5652
  }, TableName extends DefaultSchemaTableNameOrOptions extends {
5398
- schema: keyof Database;
5399
- } ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
5400
- schema: keyof Database;
5401
- } ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
5653
+ schema: keyof DatabaseWithoutInternals;
5654
+ } ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
5655
+ schema: keyof DatabaseWithoutInternals;
5656
+ } ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
5402
5657
  Row: infer R;
5403
5658
  } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
5404
5659
  Row: infer R;
5405
5660
  } ? R : never : never;
5406
5661
  export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
5407
- schema: keyof Database;
5662
+ schema: keyof DatabaseWithoutInternals;
5408
5663
  }, TableName extends DefaultSchemaTableNameOrOptions extends {
5409
- schema: keyof Database;
5410
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
5411
- schema: keyof Database;
5412
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
5664
+ schema: keyof DatabaseWithoutInternals;
5665
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
5666
+ schema: keyof DatabaseWithoutInternals;
5667
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
5413
5668
  Insert: infer I;
5414
5669
  } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
5415
5670
  Insert: infer I;
5416
5671
  } ? I : never : never;
5417
5672
  export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
5418
- schema: keyof Database;
5673
+ schema: keyof DatabaseWithoutInternals;
5419
5674
  }, TableName extends DefaultSchemaTableNameOrOptions extends {
5420
- schema: keyof Database;
5421
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
5422
- schema: keyof Database;
5423
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
5675
+ schema: keyof DatabaseWithoutInternals;
5676
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
5677
+ schema: keyof DatabaseWithoutInternals;
5678
+ } ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
5424
5679
  Update: infer U;
5425
5680
  } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
5426
5681
  Update: infer U;
5427
5682
  } ? U : never : never;
5428
5683
  export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
5429
- schema: keyof Database;
5684
+ schema: keyof DatabaseWithoutInternals;
5430
5685
  }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
5431
- schema: keyof Database;
5432
- } ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
5433
- schema: keyof Database;
5434
- } ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
5686
+ schema: keyof DatabaseWithoutInternals;
5687
+ } ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
5688
+ schema: keyof DatabaseWithoutInternals;
5689
+ } ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
5435
5690
  export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
5436
- schema: keyof Database;
5691
+ schema: keyof DatabaseWithoutInternals;
5437
5692
  }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
5438
- schema: keyof Database;
5439
- } ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
5440
- schema: keyof Database;
5441
- } ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
5693
+ schema: keyof DatabaseWithoutInternals;
5694
+ } ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
5695
+ schema: keyof DatabaseWithoutInternals;
5696
+ } ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
5442
5697
  export declare const Constants: {
5443
5698
  readonly graphql_public: {
5444
5699
  readonly Enums: {};
@@ -5457,6 +5712,7 @@ export declare const Constants: {
5457
5712
  readonly segment_type: readonly ["source", "target"];
5458
5713
  readonly share_entity_type: readonly ["app", "chapter", "playlist", "verse", "passage"];
5459
5714
  readonly target_type: readonly ["chapter", "book", "sermon", "passage", "verse", "podcast", "film_segment", "audio_segment"];
5715
+ readonly testament: readonly ["old", "new"];
5460
5716
  readonly text_version_source: readonly ["official_translation", "ai_transcription", "user_submitted"];
5461
5717
  readonly upload_status: readonly ["pending", "uploading", "completed", "failed"];
5462
5718
  };