@freqhole/api-client 0.3.9 → 0.3.11
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/src/CharnelLocalTransport.ts +2 -2
- package/src/codegen/routes.ts +1 -1
- package/src/codegen/schema.ts +100 -2
package/package.json
CHANGED
|
@@ -99,7 +99,7 @@ export class CharnelLocalTransport implements Transport {
|
|
|
99
99
|
constructor(_baseUrl: string) {
|
|
100
100
|
// baseUrl no longer needed - all requests go through IPC.
|
|
101
101
|
// (used to also kick off an embedded http loopback server probe
|
|
102
|
-
// here; that server has been removed in favor of the
|
|
102
|
+
// here; that server has been removed in favor of the libmpv backend.)
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
/**
|
|
@@ -429,7 +429,7 @@ export class CharnelLocalTransport implements Transport {
|
|
|
429
429
|
* 1. cached object URL (db-stored blobs)
|
|
430
430
|
* 2. tauri asset:// (via `convertFileSrc`), for any blob with a local path
|
|
431
431
|
*
|
|
432
|
-
* note: when the
|
|
432
|
+
* note: when the libmpv audio backend is enabled (charnel + opt-in)
|
|
433
433
|
* playback bypasses html `<audio>` entirely and reads files via
|
|
434
434
|
* filesystem path — this method is unused for that path.
|
|
435
435
|
*/
|
package/src/codegen/routes.ts
CHANGED
|
@@ -249,7 +249,7 @@ export const routes = {
|
|
|
249
249
|
delete_video_series: { method: 'POST', path: '/api/video/series/delete', req: s.DeleteVideoSeriesRequestSchema, resp: s.EmptyResponseSchema, auth: { type: 'role', role: 'admin' } as const },
|
|
250
250
|
get_playback_progress: { method: 'POST', path: '/api/video/progress/get', req: s.GetPlaybackProgressRequestSchema, resp: s.PlaybackProgressSchema.array(), auth: { type: 'authenticated' } as const },
|
|
251
251
|
get_video: { method: 'POST', path: '/api/video/videos/get', req: s.GetVideoRequestSchema, resp: s.VideoSchema, auth: { type: 'authenticated' } as const },
|
|
252
|
-
get_video_renditions: { method: 'POST', path: '/api/video/videos/renditions', req: s.GetVideoRenditionsRequestSchema, resp: s.
|
|
252
|
+
get_video_renditions: { method: 'POST', path: '/api/video/videos/renditions', req: s.GetVideoRenditionsRequestSchema, resp: s.VideoRenditionOptionSchema.array(), auth: { type: 'authenticated' } as const },
|
|
253
253
|
get_video_season: { method: 'POST', path: '/api/video/seasons/get', req: s.GetVideoSeasonRequestSchema, resp: s.VideoSeasonSchema, auth: { type: 'authenticated' } as const },
|
|
254
254
|
get_video_series: { method: 'POST', path: '/api/video/series/get', req: s.GetVideoSeriesRequestSchema, resp: s.VideoSeriesSchema, auth: { type: 'authenticated' } as const },
|
|
255
255
|
get_video_series_detail: { method: 'POST', path: '/api/video/series/detail', req: s.GetVideoSeriesRequestSchema, resp: s.SeriesDetailSchema, auth: { type: 'authenticated' } as const },
|
package/src/codegen/schema.ts
CHANGED
|
@@ -2412,6 +2412,14 @@ export const FavoriteItemSchema = z.union([z.intersection(z.object({
|
|
|
2412
2412
|
blob_id: z.string(),
|
|
2413
2413
|
is_primary: z.number(),
|
|
2414
2414
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
2415
|
+
})).nullish(),
|
|
2416
|
+
renditions: z.array(z.object({
|
|
2417
|
+
blob_id: z.string(),
|
|
2418
|
+
label: z.string(),
|
|
2419
|
+
mime: z.string().nullish(),
|
|
2420
|
+
blake3: z.string().nullish(),
|
|
2421
|
+
width: z.number().nullish(),
|
|
2422
|
+
height: z.number().nullish()
|
|
2415
2423
|
})).nullish(),
|
|
2416
2424
|
play_count: z.number().nullish()
|
|
2417
2425
|
})
|
|
@@ -3721,6 +3729,14 @@ export const ListFavoritesResponseSchema = z.object({
|
|
|
3721
3729
|
blob_id: z.string(),
|
|
3722
3730
|
is_primary: z.number(),
|
|
3723
3731
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
3732
|
+
})).nullish(),
|
|
3733
|
+
renditions: z.array(z.object({
|
|
3734
|
+
blob_id: z.string(),
|
|
3735
|
+
label: z.string(),
|
|
3736
|
+
mime: z.string().nullish(),
|
|
3737
|
+
blake3: z.string().nullish(),
|
|
3738
|
+
width: z.number().nullish(),
|
|
3739
|
+
height: z.number().nullish()
|
|
3724
3740
|
})).nullish(),
|
|
3725
3741
|
play_count: z.number().nullish()
|
|
3726
3742
|
})
|
|
@@ -4642,7 +4658,7 @@ export const PlaybackSessionTypeSchema = z.union([z.literal("song"), z.literal("
|
|
|
4642
4658
|
export type PlaybackSessionType = z.infer<typeof PlaybackSessionTypeSchema>;
|
|
4643
4659
|
|
|
4644
4660
|
export const PlayerCommandSchema = z.union([
|
|
4645
|
-
z.object({ kind: z.literal("load"), paths: z.array(z.string()) }),
|
|
4661
|
+
z.object({ kind: z.literal("load"), paths: z.array(z.string()), start_ms: z.number().nullish(), start_paused: z.boolean() }),
|
|
4646
4662
|
z.object({ kind: z.literal("enqueue"), paths: z.array(z.string()) }),
|
|
4647
4663
|
z.object({ kind: z.literal("play") }),
|
|
4648
4664
|
z.object({ kind: z.literal("pause") }),
|
|
@@ -5766,6 +5782,14 @@ export const RecentlyAddedVideosResponseSchema = z.object({
|
|
|
5766
5782
|
blob_id: z.string(),
|
|
5767
5783
|
is_primary: z.number(),
|
|
5768
5784
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
5785
|
+
})).nullish(),
|
|
5786
|
+
renditions: z.array(z.object({
|
|
5787
|
+
blob_id: z.string(),
|
|
5788
|
+
label: z.string(),
|
|
5789
|
+
mime: z.string().nullish(),
|
|
5790
|
+
blake3: z.string().nullish(),
|
|
5791
|
+
width: z.number().nullish(),
|
|
5792
|
+
height: z.number().nullish()
|
|
5769
5793
|
})).nullish(),
|
|
5770
5794
|
play_count: z.number().nullish()
|
|
5771
5795
|
})),
|
|
@@ -6248,6 +6272,14 @@ export const SeasonWithVideosSchema = z.object({
|
|
|
6248
6272
|
blob_id: z.string(),
|
|
6249
6273
|
is_primary: z.number(),
|
|
6250
6274
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
6275
|
+
})).nullish(),
|
|
6276
|
+
renditions: z.array(z.object({
|
|
6277
|
+
blob_id: z.string(),
|
|
6278
|
+
label: z.string(),
|
|
6279
|
+
mime: z.string().nullish(),
|
|
6280
|
+
blake3: z.string().nullish(),
|
|
6281
|
+
width: z.number().nullish(),
|
|
6282
|
+
height: z.number().nullish()
|
|
6251
6283
|
})).nullish(),
|
|
6252
6284
|
play_count: z.number().nullish()
|
|
6253
6285
|
}))
|
|
@@ -6309,6 +6341,14 @@ export const SeriesDetailSchema = z.object({
|
|
|
6309
6341
|
blob_id: z.string(),
|
|
6310
6342
|
is_primary: z.number(),
|
|
6311
6343
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
6344
|
+
})).nullish(),
|
|
6345
|
+
renditions: z.array(z.object({
|
|
6346
|
+
blob_id: z.string(),
|
|
6347
|
+
label: z.string(),
|
|
6348
|
+
mime: z.string().nullish(),
|
|
6349
|
+
blake3: z.string().nullish(),
|
|
6350
|
+
width: z.number().nullish(),
|
|
6351
|
+
height: z.number().nullish()
|
|
6312
6352
|
})).nullish(),
|
|
6313
6353
|
play_count: z.number().nullish()
|
|
6314
6354
|
}))
|
|
@@ -6337,6 +6377,14 @@ export const SeriesDetailSchema = z.object({
|
|
|
6337
6377
|
blob_id: z.string(),
|
|
6338
6378
|
is_primary: z.number(),
|
|
6339
6379
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
6380
|
+
})).nullish(),
|
|
6381
|
+
renditions: z.array(z.object({
|
|
6382
|
+
blob_id: z.string(),
|
|
6383
|
+
label: z.string(),
|
|
6384
|
+
mime: z.string().nullish(),
|
|
6385
|
+
blake3: z.string().nullish(),
|
|
6386
|
+
width: z.number().nullish(),
|
|
6387
|
+
height: z.number().nullish()
|
|
6340
6388
|
})).nullish(),
|
|
6341
6389
|
play_count: z.number().nullish()
|
|
6342
6390
|
}))
|
|
@@ -7404,6 +7452,14 @@ export const UnassignedVideosResponseSchema = z.object({
|
|
|
7404
7452
|
blob_id: z.string(),
|
|
7405
7453
|
is_primary: z.number(),
|
|
7406
7454
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
7455
|
+
})).nullish(),
|
|
7456
|
+
renditions: z.array(z.object({
|
|
7457
|
+
blob_id: z.string(),
|
|
7458
|
+
label: z.string(),
|
|
7459
|
+
mime: z.string().nullish(),
|
|
7460
|
+
blake3: z.string().nullish(),
|
|
7461
|
+
width: z.number().nullish(),
|
|
7462
|
+
height: z.number().nullish()
|
|
7407
7463
|
})).nullish(),
|
|
7408
7464
|
play_count: z.number().nullish()
|
|
7409
7465
|
})),
|
|
@@ -7873,6 +7929,14 @@ export const VideoSchema = z.object({
|
|
|
7873
7929
|
blob_id: z.string(),
|
|
7874
7930
|
is_primary: z.number(),
|
|
7875
7931
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
7932
|
+
})).nullish(),
|
|
7933
|
+
renditions: z.array(z.object({
|
|
7934
|
+
blob_id: z.string(),
|
|
7935
|
+
label: z.string(),
|
|
7936
|
+
mime: z.string().nullish(),
|
|
7937
|
+
blake3: z.string().nullish(),
|
|
7938
|
+
width: z.number().nullish(),
|
|
7939
|
+
height: z.number().nullish()
|
|
7876
7940
|
})).nullish(),
|
|
7877
7941
|
play_count: z.number().nullish()
|
|
7878
7942
|
});
|
|
@@ -7919,6 +7983,16 @@ export const VideoPendingResponseSchema = z.object({
|
|
|
7919
7983
|
export type VideoPendingResponse = z.infer<typeof VideoPendingResponseSchema>;
|
|
7920
7984
|
|
|
7921
7985
|
export const VideoRenditionSchema = z.object({
|
|
7986
|
+
blob_id: z.string(),
|
|
7987
|
+
label: z.string(),
|
|
7988
|
+
mime: z.string().nullish(),
|
|
7989
|
+
blake3: z.string().nullish(),
|
|
7990
|
+
width: z.number().nullish(),
|
|
7991
|
+
height: z.number().nullish()
|
|
7992
|
+
});
|
|
7993
|
+
export type VideoRendition = z.infer<typeof VideoRenditionSchema>;
|
|
7994
|
+
|
|
7995
|
+
export const VideoRenditionOptionSchema = z.object({
|
|
7922
7996
|
blob_id: z.string(),
|
|
7923
7997
|
label: z.string(),
|
|
7924
7998
|
extension: z.string(),
|
|
@@ -7928,7 +8002,7 @@ export const VideoRenditionSchema = z.object({
|
|
|
7928
8002
|
width: z.number().nullish(),
|
|
7929
8003
|
height: z.number().nullish()
|
|
7930
8004
|
});
|
|
7931
|
-
export type
|
|
8005
|
+
export type VideoRenditionOption = z.infer<typeof VideoRenditionOptionSchema>;
|
|
7932
8006
|
|
|
7933
8007
|
export const VideoReviewPatchSchema = z.object({
|
|
7934
8008
|
video_id: z.string(),
|
|
@@ -8034,6 +8108,14 @@ export const VideoWithMetadataSchema = z.object({
|
|
|
8034
8108
|
blob_id: z.string(),
|
|
8035
8109
|
is_primary: z.number(),
|
|
8036
8110
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
8111
|
+
})).nullish(),
|
|
8112
|
+
renditions: z.array(z.object({
|
|
8113
|
+
blob_id: z.string(),
|
|
8114
|
+
label: z.string(),
|
|
8115
|
+
mime: z.string().nullish(),
|
|
8116
|
+
blake3: z.string().nullish(),
|
|
8117
|
+
width: z.number().nullish(),
|
|
8118
|
+
height: z.number().nullish()
|
|
8037
8119
|
})).nullish(),
|
|
8038
8120
|
play_count: z.number().nullish()
|
|
8039
8121
|
}),
|
|
@@ -8084,6 +8166,14 @@ export const VideosByValueResponseSchema = z.object({
|
|
|
8084
8166
|
blob_id: z.string(),
|
|
8085
8167
|
is_primary: z.number(),
|
|
8086
8168
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
8169
|
+
})).nullish(),
|
|
8170
|
+
renditions: z.array(z.object({
|
|
8171
|
+
blob_id: z.string(),
|
|
8172
|
+
label: z.string(),
|
|
8173
|
+
mime: z.string().nullish(),
|
|
8174
|
+
blake3: z.string().nullish(),
|
|
8175
|
+
width: z.number().nullish(),
|
|
8176
|
+
height: z.number().nullish()
|
|
8087
8177
|
})).nullish(),
|
|
8088
8178
|
play_count: z.number().nullish()
|
|
8089
8179
|
})),
|
|
@@ -8116,6 +8206,14 @@ export const VideosQueryResultSchema = z.object({
|
|
|
8116
8206
|
blob_id: z.string(),
|
|
8117
8207
|
is_primary: z.number(),
|
|
8118
8208
|
blob_type: z.union([z.literal("original"), z.literal("thumbnail"), z.literal("waveform"), z.literal("preview"), z.literal("rendition"), z.literal("subtitle")])
|
|
8209
|
+
})).nullish(),
|
|
8210
|
+
renditions: z.array(z.object({
|
|
8211
|
+
blob_id: z.string(),
|
|
8212
|
+
label: z.string(),
|
|
8213
|
+
mime: z.string().nullish(),
|
|
8214
|
+
blake3: z.string().nullish(),
|
|
8215
|
+
width: z.number().nullish(),
|
|
8216
|
+
height: z.number().nullish()
|
|
8119
8217
|
})).nullish(),
|
|
8120
8218
|
play_count: z.number().nullish()
|
|
8121
8219
|
})),
|