@everylanguage/shared-types 1.0.12 → 1.0.14
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/README.md +50 -0
- package/package.json +4 -2
- package/types/database.d.ts +329 -129
package/README.md
CHANGED
|
@@ -298,3 +298,53 @@ npm run type-check
|
|
|
298
298
|
# Run CI checks locally
|
|
299
299
|
npm run lint && npm run format:check && npm run type-check && npm test
|
|
300
300
|
```
|
|
301
|
+
|
|
302
|
+
## Language Data Seeding
|
|
303
|
+
|
|
304
|
+
This project includes comprehensive language data from ISO 639-3 and ROLV (Registry of Language Varieties) sources.
|
|
305
|
+
|
|
306
|
+
### Quick Start
|
|
307
|
+
|
|
308
|
+
1. **Generate seed files**:
|
|
309
|
+
|
|
310
|
+
```bash
|
|
311
|
+
npm run generate:language-seeds
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
2. **Apply to database**:
|
|
315
|
+
```bash
|
|
316
|
+
supabase db reset # This will run all migrations including language seeds
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### What Gets Seeded
|
|
320
|
+
|
|
321
|
+
- **~7,900 ISO 639-3 languages** (family and individual language levels)
|
|
322
|
+
- **~30,000+ ROLV varieties** (dialect level)
|
|
323
|
+
- **~50,000+ language aliases** from both sources
|
|
324
|
+
- **Complete source tracking** for data provenance
|
|
325
|
+
- **Hierarchical relationships** between macrolanguages and individual languages
|
|
326
|
+
|
|
327
|
+
### Data Sources
|
|
328
|
+
|
|
329
|
+
- **ISO 639-3**: SIL International language codes and names
|
|
330
|
+
- **ROLV**: Global Registry of Language Varieties dialect data
|
|
331
|
+
- **Mapping Plans**: See `assets/data/languages/*/mapping_plan_*.md`
|
|
332
|
+
|
|
333
|
+
### Manual Process
|
|
334
|
+
|
|
335
|
+
If you need to regenerate or customize the language data:
|
|
336
|
+
|
|
337
|
+
1. **Modify source data** in `assets/data/languages/`
|
|
338
|
+
2. **Update mapping plans** in the respective directories
|
|
339
|
+
3. **Regenerate seeds**: `npm run generate:language-seeds`
|
|
340
|
+
4. **Test with fresh database**: `supabase db reset`
|
|
341
|
+
|
|
342
|
+
### Database Schema
|
|
343
|
+
|
|
344
|
+
The language data is stored across these tables:
|
|
345
|
+
|
|
346
|
+
- `language_entities` - Core language/dialect entities
|
|
347
|
+
- `language_entity_sources` - External source tracking
|
|
348
|
+
- `language_aliases` - Alternative names for search
|
|
349
|
+
- `language_properties` - Metadata key-value pairs
|
|
350
|
+
- `language_entities_regions` - Geographic relationships
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everylanguage/shared-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "types/database.js",
|
|
6
6
|
"types": "types/database.d.ts",
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
"version:patch": "npm version patch",
|
|
54
54
|
"version:minor": "npm version minor",
|
|
55
55
|
"version:major": "npm version major",
|
|
56
|
-
"release": "npm run prepare-package && npm publish"
|
|
56
|
+
"release": "npm run prepare-package && npm publish",
|
|
57
|
+
"generate:language-seeds": "node scripts/generate-language-seeds.js"
|
|
57
58
|
},
|
|
58
59
|
"keywords": [
|
|
59
60
|
"supabase",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"jest": "^30.0.2",
|
|
78
79
|
"lint-staged": "^16.1.2",
|
|
79
80
|
"prettier": "^3.5.3",
|
|
81
|
+
"shapefile": "^0.6.6",
|
|
80
82
|
"sql-formatter": "^15.6.5",
|
|
81
83
|
"typescript": "^5.8.3"
|
|
82
84
|
},
|
package/types/database.d.ts
CHANGED
|
@@ -611,6 +611,7 @@ export type Database = {
|
|
|
611
611
|
created_by: string | null;
|
|
612
612
|
deleted_at: string | null;
|
|
613
613
|
external_id: string | null;
|
|
614
|
+
external_id_type: string | null;
|
|
614
615
|
id: string;
|
|
615
616
|
is_external: boolean;
|
|
616
617
|
language_entity_id: string;
|
|
@@ -622,6 +623,7 @@ export type Database = {
|
|
|
622
623
|
created_by?: string | null;
|
|
623
624
|
deleted_at?: string | null;
|
|
624
625
|
external_id?: string | null;
|
|
626
|
+
external_id_type?: string | null;
|
|
625
627
|
id?: string;
|
|
626
628
|
is_external?: boolean;
|
|
627
629
|
language_entity_id: string;
|
|
@@ -633,6 +635,7 @@ export type Database = {
|
|
|
633
635
|
created_by?: string | null;
|
|
634
636
|
deleted_at?: string | null;
|
|
635
637
|
external_id?: string | null;
|
|
638
|
+
external_id_type?: string | null;
|
|
636
639
|
id?: string;
|
|
637
640
|
is_external?: boolean;
|
|
638
641
|
language_entity_id?: string;
|
|
@@ -1193,51 +1196,6 @@ export type Database = {
|
|
|
1193
1196
|
}
|
|
1194
1197
|
];
|
|
1195
1198
|
};
|
|
1196
|
-
playlist_groups: {
|
|
1197
|
-
Row: {
|
|
1198
|
-
created_at: string | null;
|
|
1199
|
-
created_by: string | null;
|
|
1200
|
-
description: string | null;
|
|
1201
|
-
id: string;
|
|
1202
|
-
title: string;
|
|
1203
|
-
updated_at: string | null;
|
|
1204
|
-
user_id: string;
|
|
1205
|
-
};
|
|
1206
|
-
Insert: {
|
|
1207
|
-
created_at?: string | null;
|
|
1208
|
-
created_by?: string | null;
|
|
1209
|
-
description?: string | null;
|
|
1210
|
-
id?: string;
|
|
1211
|
-
title: string;
|
|
1212
|
-
updated_at?: string | null;
|
|
1213
|
-
user_id: string;
|
|
1214
|
-
};
|
|
1215
|
-
Update: {
|
|
1216
|
-
created_at?: string | null;
|
|
1217
|
-
created_by?: string | null;
|
|
1218
|
-
description?: string | null;
|
|
1219
|
-
id?: string;
|
|
1220
|
-
title?: string;
|
|
1221
|
-
updated_at?: string | null;
|
|
1222
|
-
user_id?: string;
|
|
1223
|
-
};
|
|
1224
|
-
Relationships: [
|
|
1225
|
-
{
|
|
1226
|
-
foreignKeyName: "playlist_groups_created_by_fkey";
|
|
1227
|
-
columns: ["created_by"];
|
|
1228
|
-
isOneToOne: false;
|
|
1229
|
-
referencedRelation: "users";
|
|
1230
|
-
referencedColumns: ["id"];
|
|
1231
|
-
},
|
|
1232
|
-
{
|
|
1233
|
-
foreignKeyName: "playlist_groups_user_id_fkey";
|
|
1234
|
-
columns: ["user_id"];
|
|
1235
|
-
isOneToOne: false;
|
|
1236
|
-
referencedRelation: "users";
|
|
1237
|
-
referencedColumns: ["id"];
|
|
1238
|
-
}
|
|
1239
|
-
];
|
|
1240
|
-
};
|
|
1241
1199
|
playlist_items: {
|
|
1242
1200
|
Row: {
|
|
1243
1201
|
created_at: string | null;
|
|
@@ -1292,27 +1250,27 @@ export type Database = {
|
|
|
1292
1250
|
created_by: string | null;
|
|
1293
1251
|
description: string | null;
|
|
1294
1252
|
id: string;
|
|
1253
|
+
image_id: string | null;
|
|
1295
1254
|
title: string;
|
|
1296
1255
|
updated_at: string | null;
|
|
1297
|
-
user_id: string;
|
|
1298
1256
|
};
|
|
1299
1257
|
Insert: {
|
|
1300
1258
|
created_at?: string | null;
|
|
1301
1259
|
created_by?: string | null;
|
|
1302
1260
|
description?: string | null;
|
|
1303
1261
|
id?: string;
|
|
1262
|
+
image_id?: string | null;
|
|
1304
1263
|
title: string;
|
|
1305
1264
|
updated_at?: string | null;
|
|
1306
|
-
user_id: string;
|
|
1307
1265
|
};
|
|
1308
1266
|
Update: {
|
|
1309
1267
|
created_at?: string | null;
|
|
1310
1268
|
created_by?: string | null;
|
|
1311
1269
|
description?: string | null;
|
|
1312
1270
|
id?: string;
|
|
1271
|
+
image_id?: string | null;
|
|
1313
1272
|
title?: string;
|
|
1314
1273
|
updated_at?: string | null;
|
|
1315
|
-
user_id?: string;
|
|
1316
1274
|
};
|
|
1317
1275
|
Relationships: [
|
|
1318
1276
|
{
|
|
@@ -1323,62 +1281,10 @@ export type Database = {
|
|
|
1323
1281
|
referencedColumns: ["id"];
|
|
1324
1282
|
},
|
|
1325
1283
|
{
|
|
1326
|
-
foreignKeyName: "
|
|
1327
|
-
columns: ["
|
|
1284
|
+
foreignKeyName: "playlists_image_id_fkey";
|
|
1285
|
+
columns: ["image_id"];
|
|
1328
1286
|
isOneToOne: false;
|
|
1329
|
-
referencedRelation: "
|
|
1330
|
-
referencedColumns: ["id"];
|
|
1331
|
-
}
|
|
1332
|
-
];
|
|
1333
|
-
};
|
|
1334
|
-
playlists_playlist_groups: {
|
|
1335
|
-
Row: {
|
|
1336
|
-
created_at: string | null;
|
|
1337
|
-
created_by: string | null;
|
|
1338
|
-
id: string;
|
|
1339
|
-
index: number;
|
|
1340
|
-
playlist_group_id: string;
|
|
1341
|
-
playlist_id: string;
|
|
1342
|
-
updated_at: string | null;
|
|
1343
|
-
};
|
|
1344
|
-
Insert: {
|
|
1345
|
-
created_at?: string | null;
|
|
1346
|
-
created_by?: string | null;
|
|
1347
|
-
id?: string;
|
|
1348
|
-
index: number;
|
|
1349
|
-
playlist_group_id: string;
|
|
1350
|
-
playlist_id: string;
|
|
1351
|
-
updated_at?: string | null;
|
|
1352
|
-
};
|
|
1353
|
-
Update: {
|
|
1354
|
-
created_at?: string | null;
|
|
1355
|
-
created_by?: string | null;
|
|
1356
|
-
id?: string;
|
|
1357
|
-
index?: number;
|
|
1358
|
-
playlist_group_id?: string;
|
|
1359
|
-
playlist_id?: string;
|
|
1360
|
-
updated_at?: string | null;
|
|
1361
|
-
};
|
|
1362
|
-
Relationships: [
|
|
1363
|
-
{
|
|
1364
|
-
foreignKeyName: "playlists_playlist_groups_created_by_fkey";
|
|
1365
|
-
columns: ["created_by"];
|
|
1366
|
-
isOneToOne: false;
|
|
1367
|
-
referencedRelation: "users";
|
|
1368
|
-
referencedColumns: ["id"];
|
|
1369
|
-
},
|
|
1370
|
-
{
|
|
1371
|
-
foreignKeyName: "playlists_playlist_groups_playlist_group_id_fkey";
|
|
1372
|
-
columns: ["playlist_group_id"];
|
|
1373
|
-
isOneToOne: false;
|
|
1374
|
-
referencedRelation: "playlist_groups";
|
|
1375
|
-
referencedColumns: ["id"];
|
|
1376
|
-
},
|
|
1377
|
-
{
|
|
1378
|
-
foreignKeyName: "playlists_playlist_groups_playlist_id_fkey";
|
|
1379
|
-
columns: ["playlist_id"];
|
|
1380
|
-
isOneToOne: false;
|
|
1381
|
-
referencedRelation: "playlists";
|
|
1287
|
+
referencedRelation: "images";
|
|
1382
1288
|
referencedColumns: ["id"];
|
|
1383
1289
|
}
|
|
1384
1290
|
];
|
|
@@ -1527,6 +1433,7 @@ export type Database = {
|
|
|
1527
1433
|
created_by: string | null;
|
|
1528
1434
|
deleted_at: string | null;
|
|
1529
1435
|
external_id: string | null;
|
|
1436
|
+
external_id_type: string | null;
|
|
1530
1437
|
id: string;
|
|
1531
1438
|
is_external: boolean;
|
|
1532
1439
|
region_id: string;
|
|
@@ -1538,6 +1445,7 @@ export type Database = {
|
|
|
1538
1445
|
created_by?: string | null;
|
|
1539
1446
|
deleted_at?: string | null;
|
|
1540
1447
|
external_id?: string | null;
|
|
1448
|
+
external_id_type?: string | null;
|
|
1541
1449
|
id?: string;
|
|
1542
1450
|
is_external?: boolean;
|
|
1543
1451
|
region_id: string;
|
|
@@ -1549,6 +1457,7 @@ export type Database = {
|
|
|
1549
1457
|
created_by?: string | null;
|
|
1550
1458
|
deleted_at?: string | null;
|
|
1551
1459
|
external_id?: string | null;
|
|
1460
|
+
external_id_type?: string | null;
|
|
1552
1461
|
id?: string;
|
|
1553
1462
|
is_external?: boolean;
|
|
1554
1463
|
region_id?: string;
|
|
@@ -2378,33 +2287,43 @@ export type Database = {
|
|
|
2378
2287
|
};
|
|
2379
2288
|
user_bookmark_folders: {
|
|
2380
2289
|
Row: {
|
|
2290
|
+
anon_user_id: string | null;
|
|
2381
2291
|
color: string | null;
|
|
2382
2292
|
created_at: string | null;
|
|
2383
2293
|
id: string;
|
|
2384
2294
|
name: string;
|
|
2385
2295
|
parent_folder_id: string | null;
|
|
2386
2296
|
updated_at: string | null;
|
|
2387
|
-
user_id: string;
|
|
2297
|
+
user_id: string | null;
|
|
2388
2298
|
};
|
|
2389
2299
|
Insert: {
|
|
2300
|
+
anon_user_id?: string | null;
|
|
2390
2301
|
color?: string | null;
|
|
2391
2302
|
created_at?: string | null;
|
|
2392
2303
|
id?: string;
|
|
2393
2304
|
name: string;
|
|
2394
2305
|
parent_folder_id?: string | null;
|
|
2395
2306
|
updated_at?: string | null;
|
|
2396
|
-
user_id
|
|
2307
|
+
user_id?: string | null;
|
|
2397
2308
|
};
|
|
2398
2309
|
Update: {
|
|
2310
|
+
anon_user_id?: string | null;
|
|
2399
2311
|
color?: string | null;
|
|
2400
2312
|
created_at?: string | null;
|
|
2401
2313
|
id?: string;
|
|
2402
2314
|
name?: string;
|
|
2403
2315
|
parent_folder_id?: string | null;
|
|
2404
2316
|
updated_at?: string | null;
|
|
2405
|
-
user_id?: string;
|
|
2317
|
+
user_id?: string | null;
|
|
2406
2318
|
};
|
|
2407
2319
|
Relationships: [
|
|
2320
|
+
{
|
|
2321
|
+
foreignKeyName: "user_bookmark_folders_anon_user_id_fkey";
|
|
2322
|
+
columns: ["anon_user_id"];
|
|
2323
|
+
isOneToOne: false;
|
|
2324
|
+
referencedRelation: "users_anon";
|
|
2325
|
+
referencedColumns: ["id"];
|
|
2326
|
+
},
|
|
2408
2327
|
{
|
|
2409
2328
|
foreignKeyName: "user_bookmark_folders_parent_folder_id_fkey";
|
|
2410
2329
|
columns: ["parent_folder_id"];
|
|
@@ -2423,6 +2342,7 @@ export type Database = {
|
|
|
2423
2342
|
};
|
|
2424
2343
|
user_bookmarks: {
|
|
2425
2344
|
Row: {
|
|
2345
|
+
anon_user_id: string | null;
|
|
2426
2346
|
bookmark_folder_id: string | null;
|
|
2427
2347
|
color: string | null;
|
|
2428
2348
|
created_at: string | null;
|
|
@@ -2431,9 +2351,10 @@ export type Database = {
|
|
|
2431
2351
|
target_id: string;
|
|
2432
2352
|
target_type: Database["public"]["Enums"]["target_type"];
|
|
2433
2353
|
updated_at: string | null;
|
|
2434
|
-
user_id: string;
|
|
2354
|
+
user_id: string | null;
|
|
2435
2355
|
};
|
|
2436
2356
|
Insert: {
|
|
2357
|
+
anon_user_id?: string | null;
|
|
2437
2358
|
bookmark_folder_id?: string | null;
|
|
2438
2359
|
color?: string | null;
|
|
2439
2360
|
created_at?: string | null;
|
|
@@ -2442,9 +2363,10 @@ export type Database = {
|
|
|
2442
2363
|
target_id: string;
|
|
2443
2364
|
target_type: Database["public"]["Enums"]["target_type"];
|
|
2444
2365
|
updated_at?: string | null;
|
|
2445
|
-
user_id
|
|
2366
|
+
user_id?: string | null;
|
|
2446
2367
|
};
|
|
2447
2368
|
Update: {
|
|
2369
|
+
anon_user_id?: string | null;
|
|
2448
2370
|
bookmark_folder_id?: string | null;
|
|
2449
2371
|
color?: string | null;
|
|
2450
2372
|
created_at?: string | null;
|
|
@@ -2453,9 +2375,16 @@ export type Database = {
|
|
|
2453
2375
|
target_id?: string;
|
|
2454
2376
|
target_type?: Database["public"]["Enums"]["target_type"];
|
|
2455
2377
|
updated_at?: string | null;
|
|
2456
|
-
user_id?: string;
|
|
2378
|
+
user_id?: string | null;
|
|
2457
2379
|
};
|
|
2458
2380
|
Relationships: [
|
|
2381
|
+
{
|
|
2382
|
+
foreignKeyName: "user_bookmarks_anon_user_id_fkey";
|
|
2383
|
+
columns: ["anon_user_id"];
|
|
2384
|
+
isOneToOne: false;
|
|
2385
|
+
referencedRelation: "users_anon";
|
|
2386
|
+
referencedColumns: ["id"];
|
|
2387
|
+
},
|
|
2459
2388
|
{
|
|
2460
2389
|
foreignKeyName: "user_bookmarks_bookmark_folder_id_fkey";
|
|
2461
2390
|
columns: ["bookmark_folder_id"];
|
|
@@ -2561,48 +2490,120 @@ export type Database = {
|
|
|
2561
2490
|
}
|
|
2562
2491
|
];
|
|
2563
2492
|
};
|
|
2564
|
-
|
|
2493
|
+
user_playlist_groups: {
|
|
2565
2494
|
Row: {
|
|
2566
|
-
|
|
2495
|
+
anon_user_id: string | null;
|
|
2567
2496
|
created_at: string | null;
|
|
2497
|
+
description: string | null;
|
|
2568
2498
|
id: string;
|
|
2569
|
-
|
|
2570
|
-
target_type: Database["public"]["Enums"]["target_type"];
|
|
2499
|
+
name: string;
|
|
2571
2500
|
updated_at: string | null;
|
|
2572
|
-
user_id: string;
|
|
2501
|
+
user_id: string | null;
|
|
2573
2502
|
};
|
|
2574
2503
|
Insert: {
|
|
2575
|
-
|
|
2504
|
+
anon_user_id?: string | null;
|
|
2576
2505
|
created_at?: string | null;
|
|
2506
|
+
description?: string | null;
|
|
2577
2507
|
id?: string;
|
|
2578
|
-
|
|
2579
|
-
target_type: Database["public"]["Enums"]["target_type"];
|
|
2508
|
+
name: string;
|
|
2580
2509
|
updated_at?: string | null;
|
|
2581
|
-
user_id
|
|
2510
|
+
user_id?: string | null;
|
|
2582
2511
|
};
|
|
2583
2512
|
Update: {
|
|
2584
|
-
|
|
2513
|
+
anon_user_id?: string | null;
|
|
2585
2514
|
created_at?: string | null;
|
|
2515
|
+
description?: string | null;
|
|
2586
2516
|
id?: string;
|
|
2587
|
-
|
|
2588
|
-
target_type?: Database["public"]["Enums"]["target_type"];
|
|
2517
|
+
name?: string;
|
|
2589
2518
|
updated_at?: string | null;
|
|
2590
|
-
user_id?: string;
|
|
2519
|
+
user_id?: string | null;
|
|
2591
2520
|
};
|
|
2592
2521
|
Relationships: [
|
|
2593
2522
|
{
|
|
2594
|
-
foreignKeyName: "
|
|
2595
|
-
columns: ["
|
|
2523
|
+
foreignKeyName: "user_playlist_groups_anon_user_id_fkey";
|
|
2524
|
+
columns: ["anon_user_id"];
|
|
2596
2525
|
isOneToOne: false;
|
|
2597
|
-
referencedRelation: "
|
|
2526
|
+
referencedRelation: "users_anon";
|
|
2527
|
+
referencedColumns: ["id"];
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
foreignKeyName: "user_playlist_groups_user_id_fkey";
|
|
2531
|
+
columns: ["user_id"];
|
|
2532
|
+
isOneToOne: false;
|
|
2533
|
+
referencedRelation: "users";
|
|
2534
|
+
referencedColumns: ["id"];
|
|
2535
|
+
}
|
|
2536
|
+
];
|
|
2537
|
+
};
|
|
2538
|
+
user_playlists: {
|
|
2539
|
+
Row: {
|
|
2540
|
+
anon_user_id: string | null;
|
|
2541
|
+
created_at: string | null;
|
|
2542
|
+
id: string;
|
|
2543
|
+
image_id: string | null;
|
|
2544
|
+
name: string;
|
|
2545
|
+
playlist_id: string;
|
|
2546
|
+
updated_at: string | null;
|
|
2547
|
+
user_id: string | null;
|
|
2548
|
+
user_playlist_group_id: string | null;
|
|
2549
|
+
};
|
|
2550
|
+
Insert: {
|
|
2551
|
+
anon_user_id?: string | null;
|
|
2552
|
+
created_at?: string | null;
|
|
2553
|
+
id?: string;
|
|
2554
|
+
image_id?: string | null;
|
|
2555
|
+
name: string;
|
|
2556
|
+
playlist_id: string;
|
|
2557
|
+
updated_at?: string | null;
|
|
2558
|
+
user_id?: string | null;
|
|
2559
|
+
user_playlist_group_id?: string | null;
|
|
2560
|
+
};
|
|
2561
|
+
Update: {
|
|
2562
|
+
anon_user_id?: string | null;
|
|
2563
|
+
created_at?: string | null;
|
|
2564
|
+
id?: string;
|
|
2565
|
+
image_id?: string | null;
|
|
2566
|
+
name?: string;
|
|
2567
|
+
playlist_id?: string;
|
|
2568
|
+
updated_at?: string | null;
|
|
2569
|
+
user_id?: string | null;
|
|
2570
|
+
user_playlist_group_id?: string | null;
|
|
2571
|
+
};
|
|
2572
|
+
Relationships: [
|
|
2573
|
+
{
|
|
2574
|
+
foreignKeyName: "user_playlists_anon_user_id_fkey";
|
|
2575
|
+
columns: ["anon_user_id"];
|
|
2576
|
+
isOneToOne: false;
|
|
2577
|
+
referencedRelation: "users_anon";
|
|
2578
|
+
referencedColumns: ["id"];
|
|
2579
|
+
},
|
|
2580
|
+
{
|
|
2581
|
+
foreignKeyName: "user_playlists_image_id_fkey";
|
|
2582
|
+
columns: ["image_id"];
|
|
2583
|
+
isOneToOne: false;
|
|
2584
|
+
referencedRelation: "images";
|
|
2585
|
+
referencedColumns: ["id"];
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
foreignKeyName: "user_playlists_playlist_id_fkey";
|
|
2589
|
+
columns: ["playlist_id"];
|
|
2590
|
+
isOneToOne: false;
|
|
2591
|
+
referencedRelation: "playlists";
|
|
2598
2592
|
referencedColumns: ["id"];
|
|
2599
2593
|
},
|
|
2600
2594
|
{
|
|
2601
|
-
foreignKeyName: "
|
|
2595
|
+
foreignKeyName: "user_playlists_user_id_fkey";
|
|
2602
2596
|
columns: ["user_id"];
|
|
2603
2597
|
isOneToOne: false;
|
|
2604
2598
|
referencedRelation: "users";
|
|
2605
2599
|
referencedColumns: ["id"];
|
|
2600
|
+
},
|
|
2601
|
+
{
|
|
2602
|
+
foreignKeyName: "user_playlists_user_playlist_group_id_fkey";
|
|
2603
|
+
columns: ["user_playlist_group_id"];
|
|
2604
|
+
isOneToOne: false;
|
|
2605
|
+
referencedRelation: "user_playlist_groups";
|
|
2606
|
+
referencedColumns: ["id"];
|
|
2606
2607
|
}
|
|
2607
2608
|
];
|
|
2608
2609
|
};
|
|
@@ -2651,32 +2652,91 @@ export type Database = {
|
|
|
2651
2652
|
}
|
|
2652
2653
|
];
|
|
2653
2654
|
};
|
|
2655
|
+
user_saved_image_sets: {
|
|
2656
|
+
Row: {
|
|
2657
|
+
anon_user_id: string | null;
|
|
2658
|
+
created_at: string | null;
|
|
2659
|
+
id: string;
|
|
2660
|
+
set_id: string;
|
|
2661
|
+
updated_at: string | null;
|
|
2662
|
+
user_id: string | null;
|
|
2663
|
+
};
|
|
2664
|
+
Insert: {
|
|
2665
|
+
anon_user_id?: string | null;
|
|
2666
|
+
created_at?: string | null;
|
|
2667
|
+
id?: string;
|
|
2668
|
+
set_id: string;
|
|
2669
|
+
updated_at?: string | null;
|
|
2670
|
+
user_id?: string | null;
|
|
2671
|
+
};
|
|
2672
|
+
Update: {
|
|
2673
|
+
anon_user_id?: string | null;
|
|
2674
|
+
created_at?: string | null;
|
|
2675
|
+
id?: string;
|
|
2676
|
+
set_id?: string;
|
|
2677
|
+
updated_at?: string | null;
|
|
2678
|
+
user_id?: string | null;
|
|
2679
|
+
};
|
|
2680
|
+
Relationships: [
|
|
2681
|
+
{
|
|
2682
|
+
foreignKeyName: "user_saved_image_sets_anon_user_id_fkey";
|
|
2683
|
+
columns: ["anon_user_id"];
|
|
2684
|
+
isOneToOne: false;
|
|
2685
|
+
referencedRelation: "users_anon";
|
|
2686
|
+
referencedColumns: ["id"];
|
|
2687
|
+
},
|
|
2688
|
+
{
|
|
2689
|
+
foreignKeyName: "user_saved_image_sets_set_id_fkey";
|
|
2690
|
+
columns: ["set_id"];
|
|
2691
|
+
isOneToOne: false;
|
|
2692
|
+
referencedRelation: "image_sets";
|
|
2693
|
+
referencedColumns: ["id"];
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
foreignKeyName: "user_saved_image_sets_user_id_fkey";
|
|
2697
|
+
columns: ["user_id"];
|
|
2698
|
+
isOneToOne: false;
|
|
2699
|
+
referencedRelation: "users";
|
|
2700
|
+
referencedColumns: ["id"];
|
|
2701
|
+
}
|
|
2702
|
+
];
|
|
2703
|
+
};
|
|
2654
2704
|
user_saved_versions: {
|
|
2655
2705
|
Row: {
|
|
2706
|
+
anon_user_id: string | null;
|
|
2656
2707
|
audio_version_id: string | null;
|
|
2657
2708
|
created_at: string | null;
|
|
2658
2709
|
id: string;
|
|
2659
2710
|
text_version_id: string | null;
|
|
2660
2711
|
updated_at: string | null;
|
|
2661
|
-
user_id: string;
|
|
2712
|
+
user_id: string | null;
|
|
2662
2713
|
};
|
|
2663
2714
|
Insert: {
|
|
2715
|
+
anon_user_id?: string | null;
|
|
2664
2716
|
audio_version_id?: string | null;
|
|
2665
2717
|
created_at?: string | null;
|
|
2666
2718
|
id?: string;
|
|
2667
2719
|
text_version_id?: string | null;
|
|
2668
2720
|
updated_at?: string | null;
|
|
2669
|
-
user_id
|
|
2721
|
+
user_id?: string | null;
|
|
2670
2722
|
};
|
|
2671
2723
|
Update: {
|
|
2724
|
+
anon_user_id?: string | null;
|
|
2672
2725
|
audio_version_id?: string | null;
|
|
2673
2726
|
created_at?: string | null;
|
|
2674
2727
|
id?: string;
|
|
2675
2728
|
text_version_id?: string | null;
|
|
2676
2729
|
updated_at?: string | null;
|
|
2677
|
-
user_id?: string;
|
|
2730
|
+
user_id?: string | null;
|
|
2678
2731
|
};
|
|
2679
2732
|
Relationships: [
|
|
2733
|
+
{
|
|
2734
|
+
foreignKeyName: "user_saved_versions_anon_user_id_fkey";
|
|
2735
|
+
columns: ["anon_user_id"];
|
|
2736
|
+
isOneToOne: false;
|
|
2737
|
+
referencedRelation: "users_anon";
|
|
2738
|
+
referencedColumns: ["id"];
|
|
2739
|
+
},
|
|
2680
2740
|
{
|
|
2681
2741
|
foreignKeyName: "user_saved_versions_audio_version_id_fkey";
|
|
2682
2742
|
columns: ["audio_version_id"];
|
|
@@ -3751,6 +3811,21 @@ export type Database = {
|
|
|
3751
3811
|
};
|
|
3752
3812
|
Returns: number;
|
|
3753
3813
|
};
|
|
3814
|
+
get_language_entity_hierarchy: {
|
|
3815
|
+
Args: {
|
|
3816
|
+
entity_id: string;
|
|
3817
|
+
generations_up?: number;
|
|
3818
|
+
generations_down?: number;
|
|
3819
|
+
};
|
|
3820
|
+
Returns: {
|
|
3821
|
+
hierarchy_entity_id: string;
|
|
3822
|
+
hierarchy_entity_name: string;
|
|
3823
|
+
hierarchy_entity_level: string;
|
|
3824
|
+
hierarchy_parent_id: string;
|
|
3825
|
+
relationship_type: string;
|
|
3826
|
+
generation_distance: number;
|
|
3827
|
+
}[];
|
|
3828
|
+
};
|
|
3754
3829
|
get_language_entity_path: {
|
|
3755
3830
|
Args: {
|
|
3756
3831
|
entity_id: string;
|
|
@@ -3763,6 +3838,21 @@ export type Database = {
|
|
|
3763
3838
|
};
|
|
3764
3839
|
Returns: string;
|
|
3765
3840
|
};
|
|
3841
|
+
get_region_hierarchy: {
|
|
3842
|
+
Args: {
|
|
3843
|
+
region_id: string;
|
|
3844
|
+
generations_up?: number;
|
|
3845
|
+
generations_down?: number;
|
|
3846
|
+
};
|
|
3847
|
+
Returns: {
|
|
3848
|
+
hierarchy_region_id: string;
|
|
3849
|
+
hierarchy_region_name: string;
|
|
3850
|
+
hierarchy_region_level: string;
|
|
3851
|
+
hierarchy_parent_id: string;
|
|
3852
|
+
relationship_type: string;
|
|
3853
|
+
generation_distance: number;
|
|
3854
|
+
}[];
|
|
3855
|
+
};
|
|
3766
3856
|
get_region_path: {
|
|
3767
3857
|
Args: {
|
|
3768
3858
|
region_id: string;
|
|
@@ -3793,6 +3883,36 @@ export type Database = {
|
|
|
3793
3883
|
};
|
|
3794
3884
|
Returns: unknown;
|
|
3795
3885
|
};
|
|
3886
|
+
gtrgm_compress: {
|
|
3887
|
+
Args: {
|
|
3888
|
+
"": unknown;
|
|
3889
|
+
};
|
|
3890
|
+
Returns: unknown;
|
|
3891
|
+
};
|
|
3892
|
+
gtrgm_decompress: {
|
|
3893
|
+
Args: {
|
|
3894
|
+
"": unknown;
|
|
3895
|
+
};
|
|
3896
|
+
Returns: unknown;
|
|
3897
|
+
};
|
|
3898
|
+
gtrgm_in: {
|
|
3899
|
+
Args: {
|
|
3900
|
+
"": unknown;
|
|
3901
|
+
};
|
|
3902
|
+
Returns: unknown;
|
|
3903
|
+
};
|
|
3904
|
+
gtrgm_options: {
|
|
3905
|
+
Args: {
|
|
3906
|
+
"": unknown;
|
|
3907
|
+
};
|
|
3908
|
+
Returns: undefined;
|
|
3909
|
+
};
|
|
3910
|
+
gtrgm_out: {
|
|
3911
|
+
Args: {
|
|
3912
|
+
"": unknown;
|
|
3913
|
+
};
|
|
3914
|
+
Returns: unknown;
|
|
3915
|
+
};
|
|
3796
3916
|
json: {
|
|
3797
3917
|
Args: {
|
|
3798
3918
|
"": unknown;
|
|
@@ -4066,6 +4186,84 @@ export type Database = {
|
|
|
4066
4186
|
Args: Record<PropertyKey, never>;
|
|
4067
4187
|
Returns: undefined;
|
|
4068
4188
|
};
|
|
4189
|
+
search_language_aliases: {
|
|
4190
|
+
Args: {
|
|
4191
|
+
search_query: string;
|
|
4192
|
+
max_results?: number;
|
|
4193
|
+
min_similarity?: number;
|
|
4194
|
+
include_regions?: boolean;
|
|
4195
|
+
};
|
|
4196
|
+
Returns: {
|
|
4197
|
+
similarity_threshold_used: number;
|
|
4198
|
+
alias_id: string;
|
|
4199
|
+
alias_name: string;
|
|
4200
|
+
alias_similarity_score: number;
|
|
4201
|
+
entity_id: string;
|
|
4202
|
+
entity_name: string;
|
|
4203
|
+
entity_level: string;
|
|
4204
|
+
entity_parent_id: string;
|
|
4205
|
+
regions: Json;
|
|
4206
|
+
}[];
|
|
4207
|
+
};
|
|
4208
|
+
search_language_aliases_with_versions: {
|
|
4209
|
+
Args: {
|
|
4210
|
+
search_query: string;
|
|
4211
|
+
filter_type?: Database["public"]["Enums"]["version_filter_type"];
|
|
4212
|
+
max_results?: number;
|
|
4213
|
+
min_similarity?: number;
|
|
4214
|
+
include_regions?: boolean;
|
|
4215
|
+
};
|
|
4216
|
+
Returns: {
|
|
4217
|
+
similarity_threshold_used: number;
|
|
4218
|
+
alias_id: string;
|
|
4219
|
+
alias_name: string;
|
|
4220
|
+
alias_similarity_score: number;
|
|
4221
|
+
entity_id: string;
|
|
4222
|
+
entity_name: string;
|
|
4223
|
+
entity_level: string;
|
|
4224
|
+
entity_parent_id: string;
|
|
4225
|
+
regions: Json;
|
|
4226
|
+
audio_version_count: number;
|
|
4227
|
+
text_version_count: number;
|
|
4228
|
+
audio_versions: Json;
|
|
4229
|
+
text_versions: Json;
|
|
4230
|
+
}[];
|
|
4231
|
+
};
|
|
4232
|
+
search_region_aliases: {
|
|
4233
|
+
Args: {
|
|
4234
|
+
search_query: string;
|
|
4235
|
+
max_results?: number;
|
|
4236
|
+
min_similarity?: number;
|
|
4237
|
+
include_languages?: boolean;
|
|
4238
|
+
};
|
|
4239
|
+
Returns: {
|
|
4240
|
+
similarity_threshold_used: number;
|
|
4241
|
+
alias_id: string;
|
|
4242
|
+
alias_name: string;
|
|
4243
|
+
alias_similarity_score: number;
|
|
4244
|
+
region_id: string;
|
|
4245
|
+
region_name: string;
|
|
4246
|
+
region_level: string;
|
|
4247
|
+
region_parent_id: string;
|
|
4248
|
+
languages: Json;
|
|
4249
|
+
}[];
|
|
4250
|
+
};
|
|
4251
|
+
set_limit: {
|
|
4252
|
+
Args: {
|
|
4253
|
+
"": number;
|
|
4254
|
+
};
|
|
4255
|
+
Returns: number;
|
|
4256
|
+
};
|
|
4257
|
+
show_limit: {
|
|
4258
|
+
Args: Record<PropertyKey, never>;
|
|
4259
|
+
Returns: number;
|
|
4260
|
+
};
|
|
4261
|
+
show_trgm: {
|
|
4262
|
+
Args: {
|
|
4263
|
+
"": string;
|
|
4264
|
+
};
|
|
4265
|
+
Returns: string[];
|
|
4266
|
+
};
|
|
4069
4267
|
spheroid_in: {
|
|
4070
4268
|
Args: {
|
|
4071
4269
|
"": unknown;
|
|
@@ -5812,6 +6010,7 @@ export type Database = {
|
|
|
5812
6010
|
testament: "old" | "new";
|
|
5813
6011
|
text_version_source: "official_translation" | "ai_transcription" | "user_submitted";
|
|
5814
6012
|
upload_status: "pending" | "uploading" | "completed" | "failed";
|
|
6013
|
+
version_filter_type: "audio_only" | "text_only" | "both_required" | "either";
|
|
5815
6014
|
};
|
|
5816
6015
|
CompositeTypes: {
|
|
5817
6016
|
geometry_dump: {
|
|
@@ -5898,6 +6097,7 @@ export declare const Constants: {
|
|
|
5898
6097
|
readonly testament: readonly ["old", "new"];
|
|
5899
6098
|
readonly text_version_source: readonly ["official_translation", "ai_transcription", "user_submitted"];
|
|
5900
6099
|
readonly upload_status: readonly ["pending", "uploading", "completed", "failed"];
|
|
6100
|
+
readonly version_filter_type: readonly ["audio_only", "text_only", "both_required", "either"];
|
|
5901
6101
|
};
|
|
5902
6102
|
};
|
|
5903
6103
|
};
|