@brigadasos/nadeshiko-sdk 1.4.0-dev.2819d72 → 1.4.0-dev.28a0384

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.
@@ -1,204 +1,360 @@
1
1
  export type ClientOptions = {
2
2
  baseUrl: 'http://localhost:5000' | 'https://api.nadeshiko.co' | (string & {});
3
3
  };
4
+ /**
5
+ * A media filter entry with optional episode restriction
6
+ */
7
+ export type MediaFilterItem = {
8
+ /**
9
+ * Media ID to filter
10
+ */
11
+ mediaId: number;
12
+ /**
13
+ * Specific episodes (omit for all episodes)
14
+ */
15
+ episodes?: Array<number>;
16
+ };
4
17
  /**
5
18
  * Media category type
6
19
  */
7
20
  export type Category = 'ANIME' | 'JDRAMA';
8
21
  /**
9
- * Media information included in search results
22
+ * Content rating level for the segment
10
23
  */
11
- export type SearchResultMedia = {
24
+ export type ContentRating = 'SAFE' | 'SUGGESTIVE' | 'QUESTIONABLE' | 'EXPLICIT';
25
+ /**
26
+ * Search filters for narrowing segment results
27
+ */
28
+ export type SearchFilters = {
12
29
  /**
13
- * Unique identifier for the media
30
+ * Media inclusion/exclusion filters
14
31
  */
15
- mediaId: number;
32
+ media?: {
33
+ /**
34
+ * Include only segments from these media (with optional episode filter)
35
+ */
36
+ include?: Array<MediaFilterItem>;
37
+ /**
38
+ * Exclude segments from these media (with optional episode filter)
39
+ */
40
+ exclude?: Array<MediaFilterItem>;
41
+ };
16
42
  /**
17
- * Romaji transliteration of the media name
43
+ * Media category filter
18
44
  */
19
- nameRomaji: string;
45
+ category?: Array<Category>;
20
46
  /**
21
- * English name of the media
47
+ * Content ratings to include (omit for all ratings)
22
48
  */
23
- nameEn?: string;
49
+ contentRating?: Array<ContentRating>;
24
50
  /**
25
- * Original Japanese name of the media
51
+ * Segment status filter
26
52
  */
27
- nameJa?: string;
53
+ status?: Array<'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG'>;
28
54
  /**
29
- * URL to the cover image
55
+ * Content character count range filter
30
56
  */
31
- coverUrl?: string;
57
+ segmentLengthChars?: {
58
+ /**
59
+ * Minimum content length
60
+ */
61
+ min?: number;
62
+ /**
63
+ * Maximum content length
64
+ */
65
+ max?: number;
66
+ };
32
67
  /**
33
- * URL to the banner image
68
+ * Segment audio duration range filter (in milliseconds)
34
69
  */
35
- bannerUrl?: string;
36
- category: Category;
70
+ segmentDurationMs?: {
71
+ /**
72
+ * Minimum duration in ms
73
+ */
74
+ min?: number;
75
+ /**
76
+ * Maximum duration in ms
77
+ */
78
+ max?: number;
79
+ };
37
80
  };
38
81
  /**
39
- * Japanese content in search results with optional highlight
82
+ * Resource to expand in the response includes block
40
83
  */
41
- export type JapaneseSearchContent = {
84
+ export type IncludeExpansion = 'media';
85
+ export type SearchRequest = {
42
86
  /**
43
- * Original Japanese content of the segment
87
+ * What to search for (omit for queryless browse)
44
88
  */
45
- content: string;
89
+ query?: {
90
+ /**
91
+ * Search expression (supports boolean operators, wildcards, phrase matching)
92
+ */
93
+ search?: string;
94
+ /**
95
+ * Whether to use exact phrase matching
96
+ */
97
+ exactMatch?: boolean;
98
+ };
46
99
  /**
47
- * Japanese content with search terms highlighted
100
+ * Max amount of entries by response
48
101
  */
49
- highlight?: string;
50
- };
51
- /**
52
- * Translation content in search results with optional highlight
53
- */
54
- export type TranslationSearchContent = {
102
+ limit?: number;
55
103
  /**
56
- * Translated content
104
+ * Current page of search
57
105
  */
58
- content?: string;
106
+ cursor?: Array<number>;
59
107
  /**
60
- * Translated content with search terms highlighted
108
+ * Sort configuration
61
109
  */
62
- highlight?: string;
110
+ sort?: {
111
+ /**
112
+ * Sort mode
113
+ */
114
+ mode?: 'ASC' | 'DESC' | 'NONE' | 'TIME_ASC' | 'TIME_DESC' | 'RANDOM';
115
+ /**
116
+ * Non-negative integer seed for deterministic random sorting (only used when mode is RANDOM)
117
+ */
118
+ seed?: number;
119
+ };
120
+ filters?: SearchFilters;
63
121
  /**
64
- * Whether the translation was machine-translated
122
+ * Resources to expand in the response includes block
65
123
  */
66
- isMachineTranslated: boolean;
124
+ include?: Array<IncludeExpansion>;
67
125
  };
68
126
  /**
69
- * Morphological analysis token
127
+ * Segment with content, optional highlights, and media URLs
70
128
  */
71
- export type Morpheme = {
129
+ export type Segment = {
72
130
  /**
73
- * Surface form of the token as it appears in the text
131
+ * Unique identifier for the segment
74
132
  */
75
- surface: string;
133
+ uuid: string;
76
134
  /**
77
- * Reading in katakana
135
+ * Position of the segment within the episode
78
136
  */
79
- reading: string;
137
+ position: number;
80
138
  /**
81
- * Dictionary/base form of the word
139
+ * Segment status
82
140
  */
83
- baseform: string;
141
+ status: 'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG';
84
142
  /**
85
- * Pronunciation in katakana
143
+ * Start time of the segment in milliseconds from the beginning of the episode
86
144
  */
87
- pronunciation: string;
145
+ startTimeMs: number;
88
146
  /**
89
- * Full part-of-speech tag array
147
+ * End time of the segment in milliseconds from the beginning of the episode
90
148
  */
91
- pos: Array<string>;
149
+ endTimeMs: number;
150
+ contentRating: ContentRating;
92
151
  /**
93
- * Short part-of-speech label (first element of pos array)
152
+ * Episode number this segment belongs to
94
153
  */
95
- posShort: string;
154
+ episode: number;
96
155
  /**
97
- * Character offset where the token begins in the original text
156
+ * Media ID this segment belongs to
98
157
  */
99
- begin: number;
158
+ mediaId: number;
159
+ textJa: {
160
+ /**
161
+ * Original Japanese content
162
+ */
163
+ content: string;
164
+ /**
165
+ * Japanese content with search terms highlighted
166
+ */
167
+ highlight?: string;
168
+ };
169
+ textEn: {
170
+ /**
171
+ * English translation
172
+ */
173
+ content: string;
174
+ /**
175
+ * Whether the translation was machine-translated
176
+ */
177
+ isMachineTranslated: boolean;
178
+ /**
179
+ * English content with search terms highlighted
180
+ */
181
+ highlight?: string;
182
+ };
183
+ textEs: {
184
+ /**
185
+ * Spanish translation
186
+ */
187
+ content: string;
188
+ /**
189
+ * Whether the translation was machine-translated
190
+ */
191
+ isMachineTranslated: boolean;
192
+ /**
193
+ * Spanish content with search terms highlighted
194
+ */
195
+ highlight?: string;
196
+ };
100
197
  /**
101
- * Character offset where the token ends in the original text
198
+ * URLs to media resources for this segment
102
199
  */
103
- end: number;
200
+ urls: {
201
+ /**
202
+ * URL to the subtitle image snapshot
203
+ */
204
+ imageUrl: string;
205
+ /**
206
+ * URL to the audio clip for this segment
207
+ */
208
+ audioUrl: string;
209
+ /**
210
+ * URL to the video clip for this segment
211
+ */
212
+ videoUrl: string;
213
+ };
214
+ };
215
+ /**
216
+ * Map of external IDs keyed by source. Only sources with values are included.
217
+ */
218
+ export type ExternalId = {
104
219
  /**
105
- * Pitch accent type — mora position(s) where the pitch drops. 0 = heiban (flat), 1 = atamadaka, 2+ = nakadaka/odaka. Comma-separated in UniDic feature[24]. Null if not available.
106
- *
220
+ * AniList ID
107
221
  */
108
- pitchAccentType: Array<number>;
222
+ anilist?: string;
109
223
  /**
110
- * Compound accent connection rule from UniDic feature[25]. Values like C1-C5, F1-F6, P1-P13. Null if not available.
111
- *
224
+ * IMDB ID
112
225
  */
113
- pitchCompoundRule: string;
226
+ imdb?: string;
114
227
  /**
115
- * Accent modification rule from UniDic feature[26]. Values like M1, M2, M4. Null if not available.
116
- *
228
+ * TVDB ID
117
229
  */
118
- pitchModificationRule: string;
230
+ tvdb?: string;
119
231
  };
120
232
  /**
121
- * Segment details in search results
233
+ * Japanese voice actor (seiyuu)
122
234
  */
123
- export type SearchResultSegment = {
235
+ export type Seiyuu = {
124
236
  /**
125
- * Segment status
237
+ * AniList staff ID
126
238
  */
127
- status: 'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG';
239
+ id: number;
128
240
  /**
129
- * Unique identifier for the segment
241
+ * Japanese name of the voice actor
130
242
  */
131
- uuid: string;
243
+ nameJa: string;
132
244
  /**
133
- * Position of the segment within the episode
245
+ * English name of the voice actor
134
246
  */
135
- position: number;
247
+ nameEn: string;
248
+ /**
249
+ * Profile image URL
250
+ */
251
+ imageUrl: string;
252
+ };
253
+ /**
254
+ * Character appearing in a media with their voice actor and role
255
+ */
256
+ export type MediaCharacter = {
136
257
  /**
137
- * Timestamp in H:MM:SS.ffffff format indicating when the segment starts
258
+ * AniList character ID
138
259
  */
139
- startTime: string;
260
+ id: number;
140
261
  /**
141
- * Timestamp in H:MM:SS.ffffff format indicating when the segment ends
262
+ * Japanese name of the character
142
263
  */
143
- endTime: string;
264
+ nameJa: string;
144
265
  /**
145
- * Episode number where the segment appears
266
+ * English name of the character
146
267
  */
147
- episodeNumber: number;
148
- ja: JapaneseSearchContent;
149
- en: TranslationSearchContent;
150
- es: TranslationSearchContent;
268
+ nameEn: string;
151
269
  /**
152
- * Whether the segment contains NSFW content
270
+ * Character image URL
153
271
  */
154
- isNsfw: boolean;
272
+ imageUrl: string;
273
+ seiyuu: Seiyuu;
155
274
  /**
156
- * Morphological analysis of the Japanese content
275
+ * Character's role in the media
157
276
  */
158
- morphemes?: Array<Morpheme>;
277
+ role: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
159
278
  };
160
279
  /**
161
- * URLs to media resources for a segment
280
+ * Media entry with full metadata
162
281
  */
163
- export type SearchResultUrls = {
282
+ export type Media = {
164
283
  /**
165
- * URL to the subtitle image snapshot
284
+ * Unique identifier for the media
166
285
  */
167
- imageUrl?: string;
286
+ id: number;
287
+ externalIds: ExternalId;
168
288
  /**
169
- * URL to the audio clip for this segment
289
+ * Original Japanese name of the media
170
290
  */
171
- audioUrl?: string;
291
+ nameJa: string;
172
292
  /**
173
- * URL to the video clip for this segment
293
+ * Romaji transliteration of the media name
174
294
  */
175
- videoUrl?: string;
176
- };
177
- /**
178
- * A complete search result combining media info, segment details, and URLs
179
- */
180
- export type SearchResult = {
295
+ nameRomaji: string;
296
+ /**
297
+ * English name of the media
298
+ */
299
+ nameEn: string;
300
+ /**
301
+ * Format of the media release (e.g., TV, OVA, Movie)
302
+ */
303
+ airingFormat: string;
304
+ /**
305
+ * Current airing status (FINISHED, RELEASING, NOT_YET_RELEASED, CANCELLED)
306
+ */
307
+ airingStatus: string;
308
+ /**
309
+ * List of genres associated with the media
310
+ */
311
+ genres: Array<string>;
312
+ /**
313
+ * Full URL to the cover image
314
+ */
315
+ coverUrl: string;
316
+ /**
317
+ * Full URL to the banner image
318
+ */
319
+ bannerUrl: string;
320
+ /**
321
+ * Start date of the media (first airing/release)
322
+ */
323
+ startDate: string;
324
+ /**
325
+ * End date of the media (last airing/release)
326
+ */
327
+ endDate?: string;
328
+ category: Category;
329
+ /**
330
+ * Total number of subtitle segments available
331
+ */
332
+ segmentCount: number;
333
+ /**
334
+ * Total number of episodes available
335
+ */
336
+ episodeCount: number;
337
+ /**
338
+ * Animation studio that produced the media
339
+ */
340
+ studio: string;
181
341
  /**
182
- * Media information for this result
342
+ * Airing season label for the media
183
343
  */
184
- media: SearchResultMedia;
344
+ seasonName: string;
185
345
  /**
186
- * Segment details including translations
346
+ * Airing year for the media
187
347
  */
188
- segment: SearchResultSegment;
348
+ seasonYear: number;
189
349
  /**
190
- * URLs to media resources (images, audio, video)
350
+ * Characters appearing in the media with their voice actors
191
351
  */
192
- urls: SearchResultUrls;
352
+ characters?: Array<MediaCharacter>;
193
353
  };
194
354
  /**
195
355
  * Pagination metadata for search results
196
356
  */
197
357
  export type PaginationInfo = {
198
- /**
199
- * Number of results returned in this page
200
- */
201
- pageSize?: number;
202
358
  /**
203
359
  * Whether there are more results after this page
204
360
  */
@@ -211,14 +367,57 @@ export type PaginationInfo = {
211
367
  * Whether estimatedTotalHits is exact or a lower bound
212
368
  */
213
369
  estimatedTotalHitsRelation?: 'EXACT' | 'LOWER_BOUND';
370
+ /**
371
+ * Cursor for fetching the next page (undefined when hasMore is false)
372
+ */
373
+ cursor?: Array<number>;
214
374
  };
215
- export type SearchHealthCheckResponse = {
216
- results?: Array<SearchResult>;
375
+ export type SearchResponse = {
376
+ segments?: Array<Segment>;
377
+ includes?: {
378
+ /**
379
+ * Media objects keyed by mediaId
380
+ */
381
+ media?: {
382
+ [key: string]: Media;
383
+ };
384
+ };
217
385
  pagination?: PaginationInfo;
386
+ };
387
+ /**
388
+ * Bad Request error response
389
+ */
390
+ export type Error400 = {
218
391
  /**
219
- * Cursor for pagination
392
+ * Specific error code for programmatic handling
220
393
  */
221
- cursor?: Array<number>;
394
+ code: 'VALIDATION_FAILED' | 'INVALID_JSON' | 'INVALID_REQUEST';
395
+ /**
396
+ * A short, human-readable summary of the problem
397
+ */
398
+ title: string;
399
+ /**
400
+ * A human-readable explanation specific to this occurrence
401
+ */
402
+ detail: string;
403
+ /**
404
+ * A URI reference that identifies the problem type (e.g., GitHub issues link)
405
+ */
406
+ type?: string;
407
+ /**
408
+ * A URI reference that identifies the specific occurrence (e.g., trace ID)
409
+ */
410
+ instance?: string;
411
+ /**
412
+ * The HTTP status code
413
+ */
414
+ status: 400;
415
+ /**
416
+ * Optional map of field names to their error messages (for validation errors)
417
+ */
418
+ errors?: {
419
+ [key: string]: string;
420
+ };
222
421
  };
223
422
  /**
224
423
  * Unauthorized error response
@@ -360,180 +559,42 @@ export type Error500 = {
360
559
  [key: string]: string;
361
560
  };
362
561
  };
363
- export type SearchRequest = {
562
+ export type SearchStatsRequest = {
364
563
  /**
365
- * Text or sentence to search (null to search without query)
564
+ * What to search for (omit for queryless stats)
366
565
  */
367
- query?: string;
566
+ query?: {
567
+ /**
568
+ * Search expression (supports boolean operators, wildcards, phrase matching)
569
+ */
570
+ search?: string;
571
+ /**
572
+ * Whether to use exact phrase matching
573
+ */
574
+ exactMatch?: boolean;
575
+ };
576
+ filters?: SearchFilters;
368
577
  /**
369
- * Max amount of entries by response
370
- */
371
- limit?: number;
372
- /**
373
- * Unique ID from segment (Useful to get a specific segment)
374
- */
375
- uuid?: string;
376
- /**
377
- * Media category filter
378
- */
379
- category?: Array<Category>;
380
- /**
381
- * Unique ID from media
382
- */
383
- mediaId?: number;
384
- /**
385
- * Array of episodes to get
386
- */
387
- episode?: Array<number>;
388
- /**
389
- * Non-negative integer seed for deterministic random sorting
390
- */
391
- randomSeed?: number;
392
- /**
393
- * Order by amount of characters
394
- */
395
- contentSort?: 'ASC' | 'DESC' | 'NONE' | 'TIME_ASC' | 'TIME_DESC' | 'RANDOM';
396
- /**
397
- * Current page of search
398
- */
399
- cursor?: Array<number>;
400
- /**
401
- * Whether to use exact phrase matching
402
- */
403
- exactMatch?: boolean;
404
- /**
405
- * Minimum content length
406
- */
407
- minLength?: number;
408
- /**
409
- * Maximum content length
410
- */
411
- maxLength?: number;
412
- /**
413
- * Media IDs to exclude from results
414
- */
415
- excludedMediaIds?: Array<number>;
416
- /**
417
- * Segment status filter
418
- */
419
- status?: Array<'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG'>;
420
- /**
421
- * Media filter with episodes
422
- */
423
- media?: Array<{
424
- mediaId: number;
425
- /**
426
- * Array of episode numbers
427
- */
428
- episodes: Array<number>;
429
- }>;
430
- };
431
- export type SearchResponse = {
432
- results?: Array<SearchResult>;
433
- pagination?: PaginationInfo;
434
- /**
435
- * Cursor for pagination
436
- */
437
- cursor?: Array<number>;
438
- };
439
- /**
440
- * Bad Request error response
441
- */
442
- export type Error400 = {
443
- /**
444
- * Specific error code for programmatic handling
445
- */
446
- code: 'VALIDATION_FAILED' | 'INVALID_JSON' | 'INVALID_REQUEST';
447
- /**
448
- * A short, human-readable summary of the problem
449
- */
450
- title: string;
451
- /**
452
- * A human-readable explanation specific to this occurrence
453
- */
454
- detail: string;
455
- /**
456
- * A URI reference that identifies the problem type (e.g., GitHub issues link)
457
- */
458
- type?: string;
459
- /**
460
- * A URI reference that identifies the specific occurrence (e.g., trace ID)
461
- */
462
- instance?: string;
463
- /**
464
- * The HTTP status code
465
- */
466
- status: 400;
467
- /**
468
- * Optional map of field names to their error messages (for validation errors)
469
- */
470
- errors?: {
471
- [key: string]: string;
472
- };
473
- };
474
- export type SearchStatsRequest = {
475
- /**
476
- * Text or sentence to search
477
- */
478
- query?: string;
479
- /**
480
- * Media category filter
481
- */
482
- category?: Array<Category>;
483
- /**
484
- * Whether to use exact phrase matching
485
- */
486
- exactMatch?: boolean;
487
- /**
488
- * Minimum content length
489
- */
490
- minLength?: number;
491
- /**
492
- * Maximum content length
493
- */
494
- maxLength?: number;
495
- /**
496
- * Media IDs to exclude from results
497
- */
498
- excludedMediaIds?: Array<number>;
499
- /**
500
- * Restrict stats to these media IDs (for list-scoped stats)
501
- */
502
- mediaIds?: Array<number>;
503
- /**
504
- * Segment status filter
578
+ * Resources to expand in the response includes block
505
579
  */
506
- status?: Array<'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG'>;
580
+ include?: Array<IncludeExpansion>;
507
581
  };
508
582
  /**
509
- * Search result statistics grouped by media
583
+ * Search hit statistics for a single media
510
584
  */
511
585
  export type MediaSearchStats = {
512
586
  /**
513
- * Unique identifier for the media
514
- */
515
- mediaId?: number;
516
- category?: Category;
517
- /**
518
- * Romaji transliteration of the media name
519
- */
520
- nameRomaji?: string;
521
- /**
522
- * English name of the media
523
- */
524
- nameEn?: string;
525
- /**
526
- * Original Japanese name of the media
587
+ * Media identifier (look up full details in includes.media)
527
588
  */
528
- nameJa?: string;
589
+ mediaId: number;
529
590
  /**
530
- * Total number of segments found for this media
591
+ * Number of matching segments found in this media
531
592
  */
532
- segmentCount?: number;
593
+ matchCount: number;
533
594
  /**
534
595
  * Mapping of episode numbers to segment hit counts
535
596
  */
536
- episodeHits?: {
597
+ episodeHits: {
537
598
  [key: string]: number;
538
599
  };
539
600
  };
@@ -550,41 +611,47 @@ export type CategoryCount = {
550
611
  export type SearchStatsResponse = {
551
612
  media?: Array<MediaSearchStats>;
552
613
  categories?: Array<CategoryCount>;
614
+ includes?: {
615
+ /**
616
+ * Media objects keyed by mediaId
617
+ */
618
+ media?: {
619
+ [key: string]: Media;
620
+ };
621
+ };
553
622
  };
554
623
  export type SearchMultipleRequest = {
555
624
  /**
556
- * List of words to search for
625
+ * What to search for
557
626
  */
558
- words: Array<string>;
627
+ query: {
628
+ /**
629
+ * List of words to search for
630
+ */
631
+ words: Array<string>;
632
+ /**
633
+ * Whether to use exact matching
634
+ */
635
+ exactMatch?: boolean;
636
+ };
637
+ filters?: SearchFilters;
559
638
  /**
560
- * Whether to use exact matching
639
+ * Resources to expand in the response includes block
561
640
  */
562
- exactMatch?: boolean;
641
+ include?: Array<IncludeExpansion>;
563
642
  };
564
643
  /**
565
- * Media entry containing word matches
644
+ * Media match count entry
566
645
  */
567
646
  export type WordMatchMedia = {
568
647
  /**
569
- * Unique identifier for the media
570
- */
571
- mediaId?: number;
572
- /**
573
- * English name of the media
574
- */
575
- nameEn?: string;
576
- /**
577
- * Original Japanese name of the media
578
- */
579
- nameJa?: string;
580
- /**
581
- * Romaji transliteration of the media name
648
+ * Media identifier (look up full details in includes.media)
582
649
  */
583
- nameRomaji?: string;
650
+ mediaId: number;
584
651
  /**
585
652
  * Number of times the word appears in this media
586
653
  */
587
- matchCount?: number;
654
+ matchCount: number;
588
655
  };
589
656
  /**
590
657
  * Word matching result with occurrences across media
@@ -609,49 +676,40 @@ export type WordMatch = {
609
676
  };
610
677
  export type SearchMultipleResponse = {
611
678
  results?: Array<WordMatch>;
679
+ includes?: {
680
+ /**
681
+ * Media objects keyed by mediaId
682
+ */
683
+ media?: {
684
+ [key: string]: Media;
685
+ };
686
+ };
612
687
  };
613
688
  /**
614
- * Map of external IDs keyed by source. Only sources with values are included.
689
+ * Resource to expand in media responses
615
690
  */
616
- export type ExternalId = {
617
- /**
618
- * AniList ID
619
- */
620
- anilist?: string;
621
- /**
622
- * IMDB ID
623
- */
624
- imdb?: string;
625
- /**
626
- * TVDB ID
627
- */
628
- tvdb?: string;
629
- };
691
+ export type MediaIncludeExpansion = 'media' | 'media.characters';
630
692
  /**
631
- * Japanese voice actor (seiyuu)
693
+ * Cursor pagination metadata
632
694
  */
633
- export type Seiyuu = {
634
- /**
635
- * AniList staff ID
636
- */
637
- id: number;
638
- /**
639
- * Japanese name of the voice actor
640
- */
641
- nameJa: string;
695
+ export type CursorPagination = {
642
696
  /**
643
- * English name of the voice actor
697
+ * Whether more results are available
644
698
  */
645
- nameEn: string;
699
+ hasMore: boolean;
646
700
  /**
647
- * Profile image URL
701
+ * Cursor for the next page (`null` when `hasMore` is `false`)
648
702
  */
649
- imageUrl: string;
703
+ cursor: number;
704
+ };
705
+ export type MediaListResponse = {
706
+ media: Array<Media>;
707
+ pagination: CursorPagination;
650
708
  };
651
709
  /**
652
- * Anime character
710
+ * Character data for creating/updating media
653
711
  */
654
- export type Character = {
712
+ export type CharacterInput = {
655
713
  /**
656
714
  * AniList character ID
657
715
  */
@@ -668,51 +726,31 @@ export type Character = {
668
726
  * Character image URL
669
727
  */
670
728
  imageUrl: string;
671
- seiyuu: Seiyuu;
672
- };
673
- /**
674
- * Character appearing in a media with their role
675
- */
676
- export type MediaCharacter = {
677
- character: Character;
678
729
  /**
679
730
  * Character's role in the media
680
731
  */
681
732
  role: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
682
- };
683
- /**
684
- * Media collection list
685
- */
686
- export type List = {
687
- /**
688
- * List ID
689
- */
690
- id: number;
691
733
  /**
692
- * Name of the list
734
+ * AniList staff ID for the Japanese voice actor
693
735
  */
694
- name: string;
736
+ seiyuuId: number;
695
737
  /**
696
- * Type of list
738
+ * Japanese name of the voice actor
697
739
  */
698
- type: 'SERIES' | 'CUSTOM' | 'SEGMENT';
740
+ seiyuuNameJa: string;
699
741
  /**
700
- * User ID who owns the list (1 = admin)
742
+ * English name of the voice actor
701
743
  */
702
- userId: number;
744
+ seiyuuNameEn: string;
703
745
  /**
704
- * Visibility of the list
746
+ * Voice actor profile image URL
705
747
  */
706
- visibility: 'PUBLIC' | 'PRIVATE';
748
+ seiyuuImageUrl: string;
707
749
  };
708
750
  /**
709
- * Media entry with full metadata
751
+ * Request body for creating a new media entry
710
752
  */
711
- export type Media = {
712
- /**
713
- * Unique identifier for the media
714
- */
715
- id: number;
753
+ export type MediaCreateRequest = {
716
754
  externalIds?: ExternalId;
717
755
  /**
718
756
  * Original Japanese name of the media
@@ -739,13 +777,9 @@ export type Media = {
739
777
  */
740
778
  genres: Array<string>;
741
779
  /**
742
- * Full URL to the cover image
743
- */
744
- coverUrl: string;
745
- /**
746
- * Full URL to the banner image
780
+ * Storage backend for media assets
747
781
  */
748
- bannerUrl: string;
782
+ storage: 'LOCAL' | 'R2';
749
783
  /**
750
784
  * Start date of the media (first airing/release)
751
785
  */
@@ -754,19 +788,18 @@ export type Media = {
754
788
  * End date of the media (last airing/release)
755
789
  */
756
790
  endDate?: string;
757
- category: Category;
758
791
  /**
759
- * Total number of subtitle segments available
792
+ * Media category
760
793
  */
761
- segmentCount?: number;
794
+ category: 'ANIME' | 'JDRAMA';
762
795
  /**
763
- * Total number of episodes available
796
+ * Version of the media-sub-splitter used
764
797
  */
765
- episodeCount?: number;
798
+ version: string;
766
799
  /**
767
- * Version identifier for the media entry
800
+ * Hash salt used when generating the hash for the related media assets
768
801
  */
769
- version: string;
802
+ hashSalt: string;
770
803
  /**
771
804
  * Animation studio that produced the media
772
805
  */
@@ -780,175 +813,24 @@ export type Media = {
780
813
  */
781
814
  seasonYear: number;
782
815
  /**
783
- * Characters appearing in the media with their voice actors
784
- */
785
- characters?: Array<MediaCharacter>;
786
- /**
787
- * Lists that contain this media
788
- */
789
- lists?: Array<List>;
790
- };
791
- export type MediaListResponse = {
792
- data: Array<Media>;
793
- /**
794
- * Next cursor for pagination (undefined if no more results)
816
+ * Base path for R2/CDN storage (e.g. "media/21459")
795
817
  */
796
- cursor?: number;
818
+ storageBasePath?: string;
797
819
  /**
798
- * Whether more results are available
820
+ * List of characters appearing in the media with their voice actors
799
821
  */
800
- hasMoreResults: boolean;
822
+ characters?: Array<CharacterInput>;
801
823
  };
802
824
  /**
803
- * Character data for creating/updating media
825
+ * Conflict error response
804
826
  */
805
- export type CharacterInput = {
827
+ export type Error409 = {
806
828
  /**
807
- * AniList character ID
829
+ * Specific error code for programmatic handling
808
830
  */
809
- id: number;
831
+ code: 'ACCOUNT_CONFLICT' | 'DUPLICATE_KEY';
810
832
  /**
811
- * Japanese name of the character
812
- */
813
- nameJa: string;
814
- /**
815
- * English name of the character
816
- */
817
- nameEn: string;
818
- /**
819
- * Character image URL
820
- */
821
- imageUrl: string;
822
- /**
823
- * Character's role in the media
824
- */
825
- role: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
826
- /**
827
- * AniList staff ID for the Japanese voice actor
828
- */
829
- seiyuuId: number;
830
- /**
831
- * Japanese name of the voice actor
832
- */
833
- seiyuuNameJa: string;
834
- /**
835
- * English name of the voice actor
836
- */
837
- seiyuuNameEn: string;
838
- /**
839
- * Voice actor profile image URL
840
- */
841
- seiyuuImageUrl: string;
842
- };
843
- /**
844
- * List data for adding media to a list
845
- */
846
- export type ListInput = {
847
- /**
848
- * Existing list ID (if adding to existing list)
849
- */
850
- listId?: number;
851
- /**
852
- * Name for new list (if creating new list)
853
- */
854
- listName?: string;
855
- /**
856
- * Type of list (if creating new list)
857
- */
858
- listType?: 'SERIES' | 'CUSTOM';
859
- /**
860
- * Visibility of list (if creating new list)
861
- */
862
- listVisibility?: 'PUBLIC' | 'PRIVATE';
863
- /**
864
- * Position/order of media in the list (1-indexed)
865
- */
866
- position: number;
867
- };
868
- /**
869
- * Request body for creating a new media entry
870
- */
871
- export type MediaCreateRequest = {
872
- externalIds?: ExternalId;
873
- /**
874
- * Original Japanese name of the media
875
- */
876
- nameJa: string;
877
- /**
878
- * Romaji transliteration of the media name
879
- */
880
- nameRomaji: string;
881
- /**
882
- * English name of the media
883
- */
884
- nameEn: string;
885
- /**
886
- * Format of the media release (e.g., TV, OVA, Movie)
887
- */
888
- airingFormat: string;
889
- /**
890
- * Current airing status (FINISHED, RELEASING, NOT_YET_RELEASED, CANCELLED)
891
- */
892
- airingStatus: string;
893
- /**
894
- * List of genres associated with the media
895
- */
896
- genres: Array<string>;
897
- /**
898
- * Storage backend for media assets
899
- */
900
- storage: 'LOCAL' | 'R2';
901
- /**
902
- * Start date of the media (first airing/release)
903
- */
904
- startDate: string;
905
- /**
906
- * End date of the media (last airing/release)
907
- */
908
- endDate?: string;
909
- /**
910
- * Media category
911
- */
912
- category: 'ANIME' | 'JDRAMA';
913
- /**
914
- * Version of the media-sub-splitter used
915
- */
916
- version: string;
917
- /**
918
- * Hash salt used when generating the hash for the related media assets
919
- */
920
- hashSalt: string;
921
- /**
922
- * Animation studio that produced the media
923
- */
924
- studio: string;
925
- /**
926
- * Airing season label for the media
927
- */
928
- seasonName: string;
929
- /**
930
- * Airing year for the media
931
- */
932
- seasonYear: number;
933
- /**
934
- * List of characters appearing in the media with their voice actors
935
- */
936
- characters?: Array<CharacterInput>;
937
- /**
938
- * Lists to add this media to (e.g., series, franchise)
939
- */
940
- lists?: Array<ListInput>;
941
- };
942
- /**
943
- * Conflict error response
944
- */
945
- export type Error409 = {
946
- /**
947
- * Specific error code for programmatic handling
948
- */
949
- code: 'ACCOUNT_CONFLICT' | 'DUPLICATE_KEY';
950
- /**
951
- * A short, human-readable summary of the problem
833
+ * A short, human-readable summary of the problem
952
834
  */
953
835
  title: string;
954
836
  /**
@@ -1075,13 +957,13 @@ export type MediaUpdateRequest = {
1075
957
  */
1076
958
  seasonYear?: number;
1077
959
  /**
1078
- * List of characters appearing in the media with their voice actors
960
+ * Base path for R2/CDN storage (e.g. "media/21459")
1079
961
  */
1080
- characters?: Array<CharacterInput>;
962
+ storageBasePath?: string;
1081
963
  /**
1082
- * Lists to add this media to (e.g., series, franchise)
964
+ * List of characters appearing in the media with their voice actors
1083
965
  */
1084
- lists?: Array<ListInput>;
966
+ characters?: Array<CharacterInput>;
1085
967
  /**
1086
968
  * Total number of subtitle segments available
1087
969
  */
@@ -1133,15 +1015,8 @@ export type EpisodeListResponse = {
1133
1015
  /**
1134
1016
  * Array of episode objects
1135
1017
  */
1136
- data: Array<Episode>;
1137
- /**
1138
- * Cursor for pagination (last episode number in current page)
1139
- */
1140
- cursor?: number;
1141
- /**
1142
- * Whether more results are available
1143
- */
1144
- hasMore: boolean;
1018
+ episodes: Array<Episode>;
1019
+ pagination: CursorPagination;
1145
1020
  };
1146
1021
  export type EpisodeCreateRequest = {
1147
1022
  /**
@@ -1210,111 +1085,6 @@ export type EpisodeUpdateRequest = {
1210
1085
  */
1211
1086
  thumbnailUrl?: string;
1212
1087
  };
1213
- /**
1214
- * Japanese content with optional character count
1215
- */
1216
- export type JapaneseContent = {
1217
- /**
1218
- * Original Japanese content
1219
- */
1220
- content: string;
1221
- /**
1222
- * Number of characters in the Japanese content
1223
- */
1224
- characterCount?: number;
1225
- };
1226
- /**
1227
- * Translation content for a language
1228
- */
1229
- export type TranslationContent = {
1230
- /**
1231
- * Translated content
1232
- */
1233
- content?: string;
1234
- /**
1235
- * Whether the translation was machine-translated
1236
- */
1237
- isMachineTranslated: boolean;
1238
- };
1239
- export type Segment = {
1240
- /**
1241
- * Auto-generated segment ID
1242
- */
1243
- id: number;
1244
- /**
1245
- * Unique identifier for the segment
1246
- */
1247
- uuid: string;
1248
- /**
1249
- * Position of the segment within the episode
1250
- */
1251
- position: number;
1252
- /**
1253
- * Segment status
1254
- */
1255
- status: 'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG';
1256
- /**
1257
- * Timestamp in H:MM:SS.ffffff format indicating when the segment starts
1258
- */
1259
- startTime: string;
1260
- /**
1261
- * Timestamp in H:MM:SS.ffffff format indicating when the segment ends
1262
- */
1263
- endTime: string;
1264
- ja: JapaneseContent;
1265
- en: TranslationContent;
1266
- es: TranslationContent;
1267
- /**
1268
- * Whether the segment contains NSFW content
1269
- */
1270
- isNsfw: boolean;
1271
- /**
1272
- * URL to segment screenshot/image (generated from storage + hashedId)
1273
- */
1274
- imageUrl?: string;
1275
- /**
1276
- * URL to segment audio file (generated from storage + hashedId)
1277
- */
1278
- audioUrl?: string;
1279
- /**
1280
- * URL to segment video file (generated from storage + hashedId)
1281
- */
1282
- videoUrl?: string;
1283
- /**
1284
- * Episode number this segment belongs to
1285
- */
1286
- episode: number;
1287
- /**
1288
- * Media ID this segment belongs to
1289
- */
1290
- mediaId: number;
1291
- /**
1292
- * Storage backend for segment assets
1293
- */
1294
- storage: 'LOCAL' | 'R2';
1295
- /**
1296
- * Hash identifier for the segment
1297
- */
1298
- hashedId: string;
1299
- /**
1300
- * Morphological analysis of the Japanese content
1301
- */
1302
- morphemes?: Array<Morpheme>;
1303
- };
1304
- export type SegmentListResponse = {
1305
- /**
1306
- * Array of segment objects
1307
- */
1308
- data: Array<Segment>;
1309
- /**
1310
- * Cursor for pagination (last segment ID in current page)
1311
- */
1312
- cursor?: number;
1313
- /**
1314
- * Whether more results are available
1315
- */
1316
- hasMore: boolean;
1317
- };
1318
1088
  export type SegmentCreateRequest = {
1319
1089
  /**
1320
1090
  * Position of the segment within the episode
@@ -1325,20 +1095,20 @@ export type SegmentCreateRequest = {
1325
1095
  */
1326
1096
  status?: 'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG';
1327
1097
  /**
1328
- * Timestamp in H:MM:SS.ffffff format indicating when the segment starts
1098
+ * Start time of the segment in milliseconds from the beginning of the episode
1329
1099
  */
1330
- startTime: string;
1100
+ startTimeMs: number;
1331
1101
  /**
1332
- * Timestamp in H:MM:SS.ffffff format indicating when the segment ends
1102
+ * End time of the segment in milliseconds from the beginning of the episode
1333
1103
  */
1334
- endTime: string;
1335
- ja: {
1104
+ endTimeMs: number;
1105
+ textJa: {
1336
1106
  /**
1337
1107
  * Original Japanese content of the segment
1338
1108
  */
1339
1109
  content?: string;
1340
1110
  };
1341
- es?: {
1111
+ textEs?: {
1342
1112
  /**
1343
1113
  * Spanish translation of the segment content
1344
1114
  */
@@ -1348,7 +1118,7 @@ export type SegmentCreateRequest = {
1348
1118
  */
1349
1119
  isMachineTranslated?: boolean;
1350
1120
  };
1351
- en?: {
1121
+ textEn?: {
1352
1122
  /**
1353
1123
  * English translation of the segment content
1354
1124
  */
@@ -1358,10 +1128,19 @@ export type SegmentCreateRequest = {
1358
1128
  */
1359
1129
  isMachineTranslated?: boolean;
1360
1130
  };
1131
+ contentRating?: ContentRating;
1132
+ /**
1133
+ * Raw WD Tagger v3 classifier output used to derive content rating
1134
+ */
1135
+ ratingAnalysis?: {
1136
+ [key: string]: unknown;
1137
+ };
1361
1138
  /**
1362
- * Whether the segment contains NSFW content
1139
+ * POS tokenization results keyed by engine (sudachi, unidic)
1363
1140
  */
1364
- isNsfw?: boolean;
1141
+ posAnalysis?: {
1142
+ [key: string]: unknown;
1143
+ };
1365
1144
  /**
1366
1145
  * Storage backend for segment assets
1367
1146
  */
@@ -1371,6 +1150,35 @@ export type SegmentCreateRequest = {
1371
1150
  */
1372
1151
  hashedId: string;
1373
1152
  };
1153
+ /**
1154
+ * Segment with internal fields (for internal API responses)
1155
+ */
1156
+ export type SegmentInternal = Segment & {
1157
+ /**
1158
+ * Storage backend for segment assets
1159
+ */
1160
+ storage?: 'LOCAL' | 'R2';
1161
+ /**
1162
+ * Hash identifier for the segment
1163
+ */
1164
+ hashedId?: string;
1165
+ /**
1166
+ * Base path in the storage backend
1167
+ */
1168
+ storageBasePath?: string;
1169
+ /**
1170
+ * Raw WD Tagger v3 classifier output used to derive content rating
1171
+ */
1172
+ ratingAnalysis?: {
1173
+ [key: string]: unknown;
1174
+ };
1175
+ /**
1176
+ * POS tokenization results keyed by engine (sudachi, unidic)
1177
+ */
1178
+ posAnalysis?: {
1179
+ [key: string]: unknown;
1180
+ };
1181
+ };
1374
1182
  /**
1375
1183
  * All fields are optional for partial updates
1376
1184
  */
@@ -1384,20 +1192,20 @@ export type SegmentUpdateRequest = {
1384
1192
  */
1385
1193
  status?: 'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG';
1386
1194
  /**
1387
- * Timestamp in H:MM:SS.ffffff format indicating when the segment starts
1195
+ * Start time of the segment in milliseconds from the beginning of the episode
1388
1196
  */
1389
- startTime?: string;
1197
+ startTimeMs?: number;
1390
1198
  /**
1391
- * Timestamp in H:MM:SS.ffffff format indicating when the segment ends
1199
+ * End time of the segment in milliseconds from the beginning of the episode
1392
1200
  */
1393
- endTime?: string;
1394
- ja?: {
1201
+ endTimeMs?: number;
1202
+ textJa?: {
1395
1203
  /**
1396
1204
  * Original Japanese content of the segment
1397
1205
  */
1398
1206
  content?: string;
1399
1207
  };
1400
- es?: {
1208
+ textEs?: {
1401
1209
  /**
1402
1210
  * Spanish translation of the segment content
1403
1211
  */
@@ -1407,7 +1215,7 @@ export type SegmentUpdateRequest = {
1407
1215
  */
1408
1216
  isMachineTranslated?: boolean;
1409
1217
  };
1410
- en?: {
1218
+ textEn?: {
1411
1219
  /**
1412
1220
  * English translation of the segment content
1413
1221
  */
@@ -1417,10 +1225,19 @@ export type SegmentUpdateRequest = {
1417
1225
  */
1418
1226
  isMachineTranslated?: boolean;
1419
1227
  };
1228
+ contentRating?: ContentRating;
1229
+ /**
1230
+ * Raw WD Tagger v3 classifier output used to derive content rating
1231
+ */
1232
+ ratingAnalysis?: {
1233
+ [key: string]: unknown;
1234
+ };
1420
1235
  /**
1421
- * Whether the segment contains NSFW content
1236
+ * POS tokenization results keyed by engine (sudachi, unidic)
1422
1237
  */
1423
- isNsfw?: boolean;
1238
+ posAnalysis?: {
1239
+ [key: string]: unknown;
1240
+ };
1424
1241
  /**
1425
1242
  * Storage backend for segment assets
1426
1243
  */
@@ -1431,28 +1248,97 @@ export type SegmentUpdateRequest = {
1431
1248
  hashedId?: string;
1432
1249
  };
1433
1250
  export type SegmentContextResponse = {
1434
- segments: Array<SearchResult>;
1251
+ segments: Array<Segment>;
1252
+ includes?: {
1253
+ /**
1254
+ * Media objects keyed by mediaId
1255
+ */
1256
+ media?: {
1257
+ [key: string]: Media;
1258
+ };
1259
+ };
1435
1260
  };
1436
1261
  /**
1437
- * Character with all media appearances
1262
+ * Ordered media series grouping
1438
1263
  */
1439
- export type CharacterWithMedia = {
1264
+ export type Series = {
1440
1265
  /**
1441
- * AniList character ID
1266
+ * Series ID
1442
1267
  */
1443
1268
  id: number;
1444
1269
  /**
1445
- * Japanese name of the character
1270
+ * Japanese name of the series
1446
1271
  */
1447
1272
  nameJa: string;
1448
1273
  /**
1449
- * English name of the character
1274
+ * Romaji name of the series
1275
+ */
1276
+ nameRomaji: string;
1277
+ /**
1278
+ * English name of the series
1450
1279
  */
1451
1280
  nameEn: string;
1281
+ };
1282
+ export type SeriesListResponse = {
1283
+ series: Array<Series>;
1284
+ pagination: CursorPagination;
1285
+ };
1286
+ /**
1287
+ * Series with ordered media entries
1288
+ */
1289
+ export type SeriesWithMedia = {
1452
1290
  /**
1453
- * Character image URL
1291
+ * Series ID
1454
1292
  */
1455
- imageUrl: string;
1293
+ id: number;
1294
+ /**
1295
+ * Japanese name of the series
1296
+ */
1297
+ nameJa: string;
1298
+ /**
1299
+ * Romaji name of the series
1300
+ */
1301
+ nameRomaji: string;
1302
+ /**
1303
+ * English name of the series
1304
+ */
1305
+ nameEn: string;
1306
+ /**
1307
+ * All media in the series, sorted by position
1308
+ */
1309
+ media: Array<{
1310
+ /**
1311
+ * Position in the series (1-indexed)
1312
+ */
1313
+ position?: number;
1314
+ media?: Media;
1315
+ }>;
1316
+ };
1317
+ /**
1318
+ * Anime character
1319
+ */
1320
+ export type Character = {
1321
+ /**
1322
+ * AniList character ID
1323
+ */
1324
+ id: number;
1325
+ /**
1326
+ * Japanese name of the character
1327
+ */
1328
+ nameJa: string;
1329
+ /**
1330
+ * English name of the character
1331
+ */
1332
+ nameEn: string;
1333
+ /**
1334
+ * Character image URL
1335
+ */
1336
+ imageUrl: string;
1337
+ };
1338
+ /**
1339
+ * Character with voice actor and all media appearances
1340
+ */
1341
+ export type CharacterWithMedia = Character & {
1456
1342
  seiyuu: Seiyuu;
1457
1343
  /**
1458
1344
  * All media this character appears in
@@ -1466,7 +1352,7 @@ export type CharacterWithMedia = {
1466
1352
  }>;
1467
1353
  };
1468
1354
  /**
1469
- * Seiyuu with all voice acting roles
1355
+ * Seiyuu details with optional character appearances
1470
1356
  */
1471
1357
  export type SeiyuuWithRoles = {
1472
1358
  /**
@@ -1486,15 +1372,14 @@ export type SeiyuuWithRoles = {
1486
1372
  */
1487
1373
  imageUrl: string;
1488
1374
  /**
1489
- * All characters voiced by this seiyuu with their media appearances
1375
+ * Characters voiced by this seiyuu with their media appearances
1490
1376
  */
1491
- roles: Array<{
1492
- character?: Character;
1493
- media?: Media;
1377
+ characters: Array<Character & {
1378
+ media: Media;
1494
1379
  /**
1495
1380
  * Character role in this media
1496
1381
  */
1497
- role?: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
1382
+ role: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
1498
1383
  }>;
1499
1384
  };
1500
1385
  export type UserQuotaResponse = {
@@ -1523,31 +1408,65 @@ export type UserQuotaResponse = {
1523
1408
  */
1524
1409
  periodEnd: string;
1525
1410
  };
1526
- export type Report = {
1411
+ export type ReportTargetMedia = {
1527
1412
  /**
1528
- * Report ID
1413
+ * Report target type
1529
1414
  */
1530
- id: number;
1415
+ type: 'MEDIA';
1531
1416
  /**
1532
- * Who created this report
1417
+ * Media ID this report targets
1533
1418
  */
1534
- source: 'USER' | 'AUTO';
1419
+ mediaId: number;
1420
+ };
1421
+ export type ReportTargetEpisode = {
1422
+ /**
1423
+ * Report target type
1424
+ */
1425
+ type: 'EPISODE';
1426
+ /**
1427
+ * Media ID this report targets
1428
+ */
1429
+ mediaId: number;
1430
+ /**
1431
+ * Episode number this report targets
1432
+ */
1433
+ episodeNumber: number;
1434
+ };
1435
+ export type ReportTargetSegment = {
1535
1436
  /**
1536
- * What level the report targets
1437
+ * Report target type
1537
1438
  */
1538
- targetType: 'SEGMENT' | 'EPISODE' | 'MEDIA';
1439
+ type: 'SEGMENT';
1539
1440
  /**
1540
1441
  * Media ID this report targets
1541
1442
  */
1542
- targetMediaId: number;
1443
+ mediaId: number;
1444
+ /**
1445
+ * Episode number containing the segment
1446
+ */
1447
+ episodeNumber?: number;
1448
+ /**
1449
+ * Segment UUID this report targets
1450
+ */
1451
+ segmentUuid: string;
1452
+ };
1453
+ export type ReportTarget = ({
1454
+ type: 'MEDIA';
1455
+ } & ReportTargetMedia) | ({
1456
+ type: 'EPISODE';
1457
+ } & ReportTargetEpisode) | ({
1458
+ type: 'SEGMENT';
1459
+ } & ReportTargetSegment);
1460
+ export type Report = {
1543
1461
  /**
1544
- * Episode number (for EPISODE/SEGMENT targets)
1462
+ * Report ID
1545
1463
  */
1546
- targetEpisodeNumber?: number;
1464
+ id: number;
1547
1465
  /**
1548
- * Segment UUID (for SEGMENT targets)
1466
+ * Who created this report
1549
1467
  */
1550
- targetSegmentUuid?: string;
1468
+ source: 'USER' | 'AUTO';
1469
+ target: ReportTarget;
1551
1470
  /**
1552
1471
  * ID of the auto-check run that created this report (AUTO only)
1553
1472
  */
@@ -1588,29 +1507,16 @@ export type Report = {
1588
1507
  updatedAt?: string;
1589
1508
  };
1590
1509
  export type ReportListResponse = {
1591
- data: Array<Report>;
1592
- /**
1593
- * Whether more results are available
1594
- */
1595
- hasMore: boolean;
1596
- /**
1597
- * Cursor for next page
1598
- */
1599
- cursor?: number;
1600
- };
1510
+ reports: Array<Report>;
1511
+ pagination: CursorPagination;
1512
+ };
1513
+ export type UserReportTarget = ({
1514
+ type: 'MEDIA';
1515
+ } & ReportTargetMedia) | ({
1516
+ type: 'SEGMENT';
1517
+ } & ReportTargetSegment);
1601
1518
  export type CreateReportRequest = {
1602
- /**
1603
- * Type of the entity being reported
1604
- */
1605
- targetType: 'SEGMENT' | 'MEDIA';
1606
- /**
1607
- * Media ID of the reported entity
1608
- */
1609
- targetMediaId: number;
1610
- /**
1611
- * Segment UUID (required when targetType is SEGMENT)
1612
- */
1613
- targetSegmentUuid?: string;
1519
+ target: UserReportTarget;
1614
1520
  /**
1615
1521
  * Reason for the report
1616
1522
  */
@@ -1631,12 +1537,44 @@ export type UserPreferences = {
1631
1537
  * Preferred language for media names display
1632
1538
  */
1633
1539
  mediaNameLanguage?: 'english' | 'japanese' | 'romaji';
1540
+ /**
1541
+ * Per-category content rating display preferences
1542
+ */
1543
+ contentRatingPreferences?: {
1544
+ suggestive?: 'show' | 'blur' | 'hide';
1545
+ explicit?: 'show' | 'blur' | 'hide';
1546
+ };
1634
1547
  searchHistory?: {
1635
1548
  /**
1636
1549
  * Whether activity tracking is enabled (default true)
1637
1550
  */
1638
1551
  enabled?: boolean;
1639
1552
  };
1553
+ /**
1554
+ * ISO timestamp of when the user last visited the blog page
1555
+ */
1556
+ blogLastVisited?: string;
1557
+ ankiProfiles?: Array<{
1558
+ id: string;
1559
+ name: string;
1560
+ deck?: string;
1561
+ model?: string;
1562
+ fields?: Array<{
1563
+ key: string;
1564
+ value: string;
1565
+ }>;
1566
+ key?: string;
1567
+ serverAddress: string;
1568
+ }>;
1569
+ /**
1570
+ * Media hidden from search results by the user
1571
+ */
1572
+ hiddenMedia?: Array<{
1573
+ mediaId: number;
1574
+ nameEn?: string;
1575
+ nameJa?: string;
1576
+ nameRomaji?: string;
1577
+ }>;
1640
1578
  };
1641
1579
  /**
1642
1580
  * Type of user activity
@@ -1650,102 +1588,108 @@ export type UserActivity = {
1650
1588
  searchQuery?: string;
1651
1589
  createdAt: string;
1652
1590
  };
1653
- export type LabFeature = {
1591
+ /**
1592
+ * User segment collection
1593
+ */
1594
+ export type Collection = {
1654
1595
  /**
1655
- * Unique identifier for the lab feature
1596
+ * Collection ID
1656
1597
  */
1657
- key: string;
1598
+ id: number;
1658
1599
  /**
1659
- * Human-readable feature name
1600
+ * Name of the collection
1660
1601
  */
1661
1602
  name: string;
1662
1603
  /**
1663
- * Description of what the feature does
1604
+ * User ID who owns the collection
1664
1605
  */
1665
- description: string;
1606
+ userId: number;
1666
1607
  /**
1667
- * Whether the feature is globally available
1608
+ * Visibility of the collection
1668
1609
  */
1669
- enabled: boolean;
1610
+ visibility: 'PUBLIC' | 'PRIVATE';
1611
+ };
1612
+ export type UserExportCollection = Collection & {
1613
+ /**
1614
+ * Segment UUIDs in saved order
1615
+ */
1616
+ segmentUuids: Array<string>;
1670
1617
  };
1671
1618
  /**
1672
- * Request body for creating a new standalone list
1619
+ * User data export payload (identifier-oriented references)
1673
1620
  */
1674
- export type ListCreateRequest = {
1621
+ export type UserExportResponse = {
1622
+ profile: {
1623
+ id: number;
1624
+ username: string;
1625
+ email: string;
1626
+ createdAt: string;
1627
+ };
1628
+ preferences: UserPreferences;
1629
+ activity: Array<UserActivity>;
1630
+ collections: Array<UserExportCollection>;
1631
+ reports: Array<Report>;
1632
+ };
1633
+ export type UserLabFeature = {
1634
+ /**
1635
+ * Unique identifier for the lab feature
1636
+ */
1637
+ key: string;
1675
1638
  /**
1676
- * Name of the list
1639
+ * Human-readable feature name
1677
1640
  */
1678
1641
  name: string;
1679
1642
  /**
1680
- * Type of list
1643
+ * Description of what the feature does
1681
1644
  */
1682
- type?: 'SERIES' | 'CUSTOM' | 'SEGMENT';
1645
+ description: string;
1683
1646
  /**
1684
- * User ID who owns the list (1 = admin)
1647
+ * Whether the feature is globally available
1685
1648
  */
1686
- userId?: number;
1649
+ enabled: boolean;
1687
1650
  /**
1688
- * Visibility of the list
1651
+ * Whether the user has opted in to this feature
1689
1652
  */
1690
- visibility?: 'PUBLIC' | 'PRIVATE';
1653
+ userEnabled: boolean;
1691
1654
  };
1692
1655
  /**
1693
- * List with all media in order
1656
+ * Paginated collection list response
1694
1657
  */
1695
- export type ListWithMedia = {
1696
- /**
1697
- * List ID
1698
- */
1699
- id: number;
1658
+ export type CollectionListResponse = {
1659
+ collections: Array<Collection>;
1660
+ pagination: CursorPagination;
1661
+ };
1662
+ /**
1663
+ * Request body for creating a new collection
1664
+ */
1665
+ export type CollectionRequests = {
1700
1666
  /**
1701
- * Name of the list
1667
+ * Name of the collection
1702
1668
  */
1703
1669
  name: string;
1704
1670
  /**
1705
- * Type of list
1706
- */
1707
- type: 'SERIES' | 'CUSTOM' | 'SEGMENT';
1708
- /**
1709
- * User ID who owns the list (1 = admin)
1710
- */
1711
- userId: number;
1712
- /**
1713
- * Visibility of the list
1671
+ * Visibility of the collection
1714
1672
  */
1715
- visibility: 'PUBLIC' | 'PRIVATE';
1716
- /**
1717
- * All media in the list, sorted by position
1718
- */
1719
- media: Array<{
1720
- /**
1721
- * Position in the list (1-indexed)
1722
- */
1723
- position?: number;
1724
- media?: Media;
1725
- }>;
1673
+ visibility?: 'PUBLIC' | 'PRIVATE';
1726
1674
  };
1727
1675
  /**
1728
- * List with saved segments (search result format)
1676
+ * Collection with saved segments (search result format)
1729
1677
  */
1730
- export type ListWithSegments = {
1678
+ export type CollectionWithSegments = {
1731
1679
  /**
1732
- * List ID
1680
+ * Collection ID
1733
1681
  */
1734
1682
  id: number;
1735
1683
  /**
1736
- * Name of the list
1684
+ * Name of the collection
1737
1685
  */
1738
1686
  name: string;
1739
1687
  /**
1740
- * Type of list
1741
- */
1742
- type: 'SERIES' | 'CUSTOM' | 'SEGMENT';
1743
- /**
1744
- * User ID who owns the list
1688
+ * User ID who owns the collection
1745
1689
  */
1746
1690
  userId: number;
1747
1691
  /**
1748
- * Visibility of the list
1692
+ * Visibility of the collection
1749
1693
  */
1750
1694
  visibility: 'PUBLIC' | 'PRIVATE';
1751
1695
  /**
@@ -1753,19 +1697,28 @@ export type ListWithSegments = {
1753
1697
  */
1754
1698
  segments: Array<{
1755
1699
  /**
1756
- * Position in the list
1700
+ * Position in the collection
1757
1701
  */
1758
1702
  position?: number;
1759
1703
  /**
1760
1704
  * User annotation
1761
1705
  */
1762
1706
  note?: string;
1763
- result?: SearchResult;
1707
+ result?: Segment;
1764
1708
  }>;
1709
+ includes?: {
1710
+ /**
1711
+ * Media objects keyed by mediaId
1712
+ */
1713
+ media?: {
1714
+ [key: string]: Media;
1715
+ };
1716
+ };
1765
1717
  /**
1766
- * Total number of segments in the list
1718
+ * Total number of segments in the collection
1767
1719
  */
1768
1720
  totalCount: number;
1721
+ pagination: CursorPagination;
1769
1722
  };
1770
1723
  /**
1771
1724
  * Request to reindex segments from the database into Elasticsearch
@@ -1846,15 +1799,8 @@ export type AdminReport = Report & {
1846
1799
  reporterName: string;
1847
1800
  };
1848
1801
  export type AdminReportListResponse = {
1849
- data: Array<AdminReport>;
1850
- /**
1851
- * Whether more results are available
1852
- */
1853
- hasMore: boolean;
1854
- /**
1855
- * Cursor for next page
1856
- */
1857
- cursor?: number;
1802
+ reports: Array<AdminReport>;
1803
+ pagination: CursorPagination;
1858
1804
  };
1859
1805
  export type UpdateReportRequest = {
1860
1806
  /**
@@ -2001,38 +1947,6 @@ export type ReviewAllowlist = {
2001
1947
  */
2002
1948
  createdAt: string;
2003
1949
  };
2004
- export type HealthCheckData = {
2005
- body?: never;
2006
- path?: never;
2007
- query?: never;
2008
- url: '/v1/health';
2009
- };
2010
- export type HealthCheckErrors = {
2011
- /**
2012
- * Unauthorized
2013
- */
2014
- 401: Error401;
2015
- /**
2016
- * Forbidden
2017
- */
2018
- 403: Error403;
2019
- /**
2020
- * Too Many Requests
2021
- */
2022
- 429: Error429;
2023
- /**
2024
- * Internal Server Error
2025
- */
2026
- 500: Error500;
2027
- };
2028
- export type HealthCheckError = HealthCheckErrors[keyof HealthCheckErrors];
2029
- export type HealthCheckResponses = {
2030
- /**
2031
- * OK
2032
- */
2033
- 200: SearchHealthCheckResponse;
2034
- };
2035
- export type HealthCheckResponse = HealthCheckResponses[keyof HealthCheckResponses];
2036
1950
  export type SearchIndexData = {
2037
1951
  body?: SearchRequest;
2038
1952
  path?: never;
@@ -2154,17 +2068,398 @@ export type MediaIndexData = {
2154
2068
  */
2155
2069
  cursor?: number;
2156
2070
  /**
2157
- * Filter by media category
2071
+ * Filter by media category
2072
+ */
2073
+ category?: 'ANIME' | 'JDRAMA';
2074
+ /**
2075
+ * Search query for filtering media by name
2076
+ */
2077
+ query?: string;
2078
+ /**
2079
+ * Resources to expand in the media response (`media.characters` implies `media`)
2080
+ */
2081
+ include?: Array<MediaIncludeExpansion>;
2082
+ };
2083
+ url: '/v1/media';
2084
+ };
2085
+ export type MediaIndexErrors = {
2086
+ /**
2087
+ * Bad Request
2088
+ */
2089
+ 400: Error400;
2090
+ /**
2091
+ * Unauthorized
2092
+ */
2093
+ 401: Error401;
2094
+ /**
2095
+ * Forbidden
2096
+ */
2097
+ 403: Error403;
2098
+ /**
2099
+ * Too Many Requests
2100
+ */
2101
+ 429: Error429;
2102
+ /**
2103
+ * Internal Server Error
2104
+ */
2105
+ 500: Error500;
2106
+ };
2107
+ export type MediaIndexError = MediaIndexErrors[keyof MediaIndexErrors];
2108
+ export type MediaIndexResponses = {
2109
+ /**
2110
+ * OK
2111
+ */
2112
+ 200: MediaListResponse;
2113
+ };
2114
+ export type MediaIndexResponse = MediaIndexResponses[keyof MediaIndexResponses];
2115
+ export type MediaCreateData = {
2116
+ body: MediaCreateRequest;
2117
+ path?: never;
2118
+ query?: never;
2119
+ url: '/v1/media';
2120
+ };
2121
+ export type MediaCreateErrors = {
2122
+ /**
2123
+ * Bad Request
2124
+ */
2125
+ 400: Error400;
2126
+ /**
2127
+ * Unauthorized
2128
+ */
2129
+ 401: Error401;
2130
+ /**
2131
+ * Forbidden
2132
+ */
2133
+ 403: Error403;
2134
+ /**
2135
+ * Conflict
2136
+ */
2137
+ 409: Error409;
2138
+ /**
2139
+ * Too Many Requests
2140
+ */
2141
+ 429: Error429;
2142
+ /**
2143
+ * Internal Server Error
2144
+ */
2145
+ 500: Error500;
2146
+ };
2147
+ export type MediaCreateError = MediaCreateErrors[keyof MediaCreateErrors];
2148
+ export type MediaCreateResponses = {
2149
+ /**
2150
+ * Created
2151
+ */
2152
+ 201: Media;
2153
+ };
2154
+ export type MediaCreateResponse = MediaCreateResponses[keyof MediaCreateResponses];
2155
+ export type MediaDestroyData = {
2156
+ body?: never;
2157
+ path: {
2158
+ /**
2159
+ * Media ID
2160
+ */
2161
+ id: number;
2162
+ };
2163
+ query?: never;
2164
+ url: '/v1/media/{id}';
2165
+ };
2166
+ export type MediaDestroyErrors = {
2167
+ /**
2168
+ * Bad Request
2169
+ */
2170
+ 400: Error400;
2171
+ /**
2172
+ * Unauthorized
2173
+ */
2174
+ 401: Error401;
2175
+ /**
2176
+ * Forbidden
2177
+ */
2178
+ 403: Error403;
2179
+ /**
2180
+ * Not Found
2181
+ */
2182
+ 404: Error404;
2183
+ /**
2184
+ * Too Many Requests
2185
+ */
2186
+ 429: Error429;
2187
+ /**
2188
+ * Internal Server Error
2189
+ */
2190
+ 500: Error500;
2191
+ };
2192
+ export type MediaDestroyError = MediaDestroyErrors[keyof MediaDestroyErrors];
2193
+ export type MediaDestroyResponses = {
2194
+ /**
2195
+ * No Content
2196
+ */
2197
+ 204: void;
2198
+ };
2199
+ export type MediaDestroyResponse = MediaDestroyResponses[keyof MediaDestroyResponses];
2200
+ export type MediaShowData = {
2201
+ body?: never;
2202
+ path: {
2203
+ /**
2204
+ * Media ID
2205
+ */
2206
+ id: number;
2207
+ };
2208
+ query?: {
2209
+ /**
2210
+ * Resources to expand in the media response (`media.characters` implies `media`)
2211
+ */
2212
+ include?: Array<MediaIncludeExpansion>;
2213
+ };
2214
+ url: '/v1/media/{id}';
2215
+ };
2216
+ export type MediaShowErrors = {
2217
+ /**
2218
+ * Bad Request
2219
+ */
2220
+ 400: Error400;
2221
+ /**
2222
+ * Unauthorized
2223
+ */
2224
+ 401: Error401;
2225
+ /**
2226
+ * Forbidden
2227
+ */
2228
+ 403: Error403;
2229
+ /**
2230
+ * Not Found
2231
+ */
2232
+ 404: Error404;
2233
+ /**
2234
+ * Too Many Requests
2235
+ */
2236
+ 429: Error429;
2237
+ /**
2238
+ * Internal Server Error
2239
+ */
2240
+ 500: Error500;
2241
+ };
2242
+ export type MediaShowError = MediaShowErrors[keyof MediaShowErrors];
2243
+ export type MediaShowResponses = {
2244
+ /**
2245
+ * OK
2246
+ */
2247
+ 200: Media;
2248
+ };
2249
+ export type MediaShowResponse = MediaShowResponses[keyof MediaShowResponses];
2250
+ export type MediaUpdateData = {
2251
+ body: MediaUpdateRequest;
2252
+ path: {
2253
+ /**
2254
+ * Media ID
2255
+ */
2256
+ id: number;
2257
+ };
2258
+ query?: never;
2259
+ url: '/v1/media/{id}';
2260
+ };
2261
+ export type MediaUpdateErrors = {
2262
+ /**
2263
+ * Bad Request
2264
+ */
2265
+ 400: Error400;
2266
+ /**
2267
+ * Unauthorized
2268
+ */
2269
+ 401: Error401;
2270
+ /**
2271
+ * Forbidden
2272
+ */
2273
+ 403: Error403;
2274
+ /**
2275
+ * Not Found
2276
+ */
2277
+ 404: Error404;
2278
+ /**
2279
+ * Too Many Requests
2280
+ */
2281
+ 429: Error429;
2282
+ /**
2283
+ * Internal Server Error
2284
+ */
2285
+ 500: Error500;
2286
+ };
2287
+ export type MediaUpdateError = MediaUpdateErrors[keyof MediaUpdateErrors];
2288
+ export type MediaUpdateResponses = {
2289
+ /**
2290
+ * OK
2291
+ */
2292
+ 200: Media;
2293
+ };
2294
+ export type MediaUpdateResponse = MediaUpdateResponses[keyof MediaUpdateResponses];
2295
+ export type EpisodeIndexData = {
2296
+ body?: never;
2297
+ path: {
2298
+ /**
2299
+ * ID of the media
2300
+ */
2301
+ mediaId: number;
2302
+ };
2303
+ query?: {
2304
+ /**
2305
+ * Maximum number of episodes to return
2306
+ */
2307
+ limit?: number;
2308
+ /**
2309
+ * Episode number to start from (for pagination)
2310
+ */
2311
+ cursor?: number;
2312
+ };
2313
+ url: '/v1/media/{mediaId}/episodes';
2314
+ };
2315
+ export type EpisodeIndexErrors = {
2316
+ /**
2317
+ * Bad Request
2318
+ */
2319
+ 400: Error400;
2320
+ /**
2321
+ * Unauthorized
2322
+ */
2323
+ 401: Error401;
2324
+ /**
2325
+ * Forbidden
2326
+ */
2327
+ 403: Error403;
2328
+ /**
2329
+ * Not Found
2330
+ */
2331
+ 404: Error404;
2332
+ /**
2333
+ * Too Many Requests
2334
+ */
2335
+ 429: Error429;
2336
+ /**
2337
+ * Internal Server Error
2338
+ */
2339
+ 500: Error500;
2340
+ };
2341
+ export type EpisodeIndexError = EpisodeIndexErrors[keyof EpisodeIndexErrors];
2342
+ export type EpisodeIndexResponses = {
2343
+ /**
2344
+ * Paginated list of episodes
2345
+ */
2346
+ 200: EpisodeListResponse;
2347
+ };
2348
+ export type EpisodeIndexResponse = EpisodeIndexResponses[keyof EpisodeIndexResponses];
2349
+ export type EpisodeCreateData = {
2350
+ body: EpisodeCreateRequest;
2351
+ path: {
2352
+ /**
2353
+ * ID of the media
2354
+ */
2355
+ mediaId: number;
2356
+ };
2357
+ query?: never;
2358
+ url: '/v1/media/{mediaId}/episodes';
2359
+ };
2360
+ export type EpisodeCreateErrors = {
2361
+ /**
2362
+ * Bad Request
2363
+ */
2364
+ 400: Error400;
2365
+ /**
2366
+ * Unauthorized
2367
+ */
2368
+ 401: Error401;
2369
+ /**
2370
+ * Forbidden
2371
+ */
2372
+ 403: Error403;
2373
+ /**
2374
+ * Not Found
2375
+ */
2376
+ 404: Error404;
2377
+ /**
2378
+ * Conflict
2379
+ */
2380
+ 409: Error409;
2381
+ /**
2382
+ * Too Many Requests
2383
+ */
2384
+ 429: Error429;
2385
+ /**
2386
+ * Internal Server Error
2387
+ */
2388
+ 500: Error500;
2389
+ };
2390
+ export type EpisodeCreateError = EpisodeCreateErrors[keyof EpisodeCreateErrors];
2391
+ export type EpisodeCreateResponses = {
2392
+ /**
2393
+ * Single episode response
2394
+ */
2395
+ 201: Episode;
2396
+ };
2397
+ export type EpisodeCreateResponse = EpisodeCreateResponses[keyof EpisodeCreateResponses];
2398
+ export type EpisodeDestroyData = {
2399
+ body?: never;
2400
+ path: {
2401
+ /**
2402
+ * ID of the media
2403
+ */
2404
+ mediaId: number;
2405
+ /**
2406
+ * Episode number
2407
+ */
2408
+ episodeNumber: number;
2409
+ };
2410
+ query?: never;
2411
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
2412
+ };
2413
+ export type EpisodeDestroyErrors = {
2414
+ /**
2415
+ * Bad Request
2416
+ */
2417
+ 400: Error400;
2418
+ /**
2419
+ * Unauthorized
2420
+ */
2421
+ 401: Error401;
2422
+ /**
2423
+ * Forbidden
2424
+ */
2425
+ 403: Error403;
2426
+ /**
2427
+ * Not Found
2428
+ */
2429
+ 404: Error404;
2430
+ /**
2431
+ * Too Many Requests
2432
+ */
2433
+ 429: Error429;
2434
+ /**
2435
+ * Internal Server Error
2436
+ */
2437
+ 500: Error500;
2438
+ };
2439
+ export type EpisodeDestroyError = EpisodeDestroyErrors[keyof EpisodeDestroyErrors];
2440
+ export type EpisodeDestroyResponses = {
2441
+ /**
2442
+ * Episode successfully deleted
2443
+ */
2444
+ 204: void;
2445
+ };
2446
+ export type EpisodeDestroyResponse = EpisodeDestroyResponses[keyof EpisodeDestroyResponses];
2447
+ export type EpisodeShowData = {
2448
+ body?: never;
2449
+ path: {
2450
+ /**
2451
+ * ID of the media
2158
2452
  */
2159
- category?: 'ANIME' | 'JDRAMA';
2453
+ mediaId: number;
2160
2454
  /**
2161
- * Search query for filtering media by name
2455
+ * Episode number
2162
2456
  */
2163
- query?: string;
2457
+ episodeNumber: number;
2164
2458
  };
2165
- url: '/v1/media';
2459
+ query?: never;
2460
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
2166
2461
  };
2167
- export type MediaIndexErrors = {
2462
+ export type EpisodeShowErrors = {
2168
2463
  /**
2169
2464
  * Bad Request
2170
2465
  */
@@ -2177,6 +2472,10 @@ export type MediaIndexErrors = {
2177
2472
  * Forbidden
2178
2473
  */
2179
2474
  403: Error403;
2475
+ /**
2476
+ * Not Found
2477
+ */
2478
+ 404: Error404;
2180
2479
  /**
2181
2480
  * Too Many Requests
2182
2481
  */
@@ -2186,21 +2485,30 @@ export type MediaIndexErrors = {
2186
2485
  */
2187
2486
  500: Error500;
2188
2487
  };
2189
- export type MediaIndexError = MediaIndexErrors[keyof MediaIndexErrors];
2190
- export type MediaIndexResponses = {
2488
+ export type EpisodeShowError = EpisodeShowErrors[keyof EpisodeShowErrors];
2489
+ export type EpisodeShowResponses = {
2191
2490
  /**
2192
- * OK
2491
+ * Single episode response
2193
2492
  */
2194
- 200: MediaListResponse;
2493
+ 200: Episode;
2195
2494
  };
2196
- export type MediaIndexResponse = MediaIndexResponses[keyof MediaIndexResponses];
2197
- export type MediaCreateData = {
2198
- body: MediaCreateRequest;
2199
- path?: never;
2495
+ export type EpisodeShowResponse = EpisodeShowResponses[keyof EpisodeShowResponses];
2496
+ export type EpisodeUpdateData = {
2497
+ body: EpisodeUpdateRequest;
2498
+ path: {
2499
+ /**
2500
+ * ID of the media
2501
+ */
2502
+ mediaId: number;
2503
+ /**
2504
+ * Episode number
2505
+ */
2506
+ episodeNumber: number;
2507
+ };
2200
2508
  query?: never;
2201
- url: '/v1/media';
2509
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
2202
2510
  };
2203
- export type MediaCreateErrors = {
2511
+ export type EpisodeUpdateErrors = {
2204
2512
  /**
2205
2513
  * Bad Request
2206
2514
  */
@@ -2214,9 +2522,9 @@ export type MediaCreateErrors = {
2214
2522
  */
2215
2523
  403: Error403;
2216
2524
  /**
2217
- * Conflict
2525
+ * Not Found
2218
2526
  */
2219
- 409: Error409;
2527
+ 404: Error404;
2220
2528
  /**
2221
2529
  * Too Many Requests
2222
2530
  */
@@ -2226,26 +2534,39 @@ export type MediaCreateErrors = {
2226
2534
  */
2227
2535
  500: Error500;
2228
2536
  };
2229
- export type MediaCreateError = MediaCreateErrors[keyof MediaCreateErrors];
2230
- export type MediaCreateResponses = {
2537
+ export type EpisodeUpdateError = EpisodeUpdateErrors[keyof EpisodeUpdateErrors];
2538
+ export type EpisodeUpdateResponses = {
2231
2539
  /**
2232
- * Created
2540
+ * Single episode response
2233
2541
  */
2234
- 201: Media;
2542
+ 200: Episode;
2235
2543
  };
2236
- export type MediaCreateResponse = MediaCreateResponses[keyof MediaCreateResponses];
2237
- export type MediaDestroyData = {
2544
+ export type EpisodeUpdateResponse = EpisodeUpdateResponses[keyof EpisodeUpdateResponses];
2545
+ export type SegmentIndexData = {
2238
2546
  body?: never;
2239
2547
  path: {
2240
2548
  /**
2241
- * Media ID
2549
+ * ID of the media
2242
2550
  */
2243
- id: number;
2551
+ mediaId: number;
2552
+ /**
2553
+ * Episode number
2554
+ */
2555
+ episodeNumber: number;
2244
2556
  };
2245
- query?: never;
2246
- url: '/v1/media/{id}';
2557
+ query?: {
2558
+ /**
2559
+ * Maximum number of segments to return
2560
+ */
2561
+ limit?: number;
2562
+ /**
2563
+ * Segment ID to start from (for pagination)
2564
+ */
2565
+ cursor?: number;
2566
+ };
2567
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments';
2247
2568
  };
2248
- export type MediaDestroyErrors = {
2569
+ export type SegmentIndexErrors = {
2249
2570
  /**
2250
2571
  * Bad Request
2251
2572
  */
@@ -2271,29 +2592,36 @@ export type MediaDestroyErrors = {
2271
2592
  */
2272
2593
  500: Error500;
2273
2594
  };
2274
- export type MediaDestroyError = MediaDestroyErrors[keyof MediaDestroyErrors];
2275
- export type MediaDestroyResponses = {
2595
+ export type SegmentIndexError = SegmentIndexErrors[keyof SegmentIndexErrors];
2596
+ export type SegmentIndexResponses = {
2276
2597
  /**
2277
- * OK
2598
+ * Paginated segment list response
2278
2599
  */
2279
2600
  200: {
2280
- message?: string;
2281
- id?: number;
2601
+ /**
2602
+ * Array of segment objects
2603
+ */
2604
+ segments: Array<Segment>;
2605
+ pagination: CursorPagination;
2282
2606
  };
2283
2607
  };
2284
- export type MediaDestroyResponse = MediaDestroyResponses[keyof MediaDestroyResponses];
2285
- export type MediaShowData = {
2286
- body?: never;
2608
+ export type SegmentIndexResponse = SegmentIndexResponses[keyof SegmentIndexResponses];
2609
+ export type SegmentCreateData = {
2610
+ body: SegmentCreateRequest;
2287
2611
  path: {
2288
2612
  /**
2289
- * Media ID
2613
+ * ID of the media
2290
2614
  */
2291
- id: number;
2615
+ mediaId: number;
2616
+ /**
2617
+ * Episode number
2618
+ */
2619
+ episodeNumber: number;
2292
2620
  };
2293
2621
  query?: never;
2294
- url: '/v1/media/{id}';
2622
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments';
2295
2623
  };
2296
- export type MediaShowErrors = {
2624
+ export type SegmentCreateErrors = {
2297
2625
  /**
2298
2626
  * Bad Request
2299
2627
  */
@@ -2310,6 +2638,10 @@ export type MediaShowErrors = {
2310
2638
  * Not Found
2311
2639
  */
2312
2640
  404: Error404;
2641
+ /**
2642
+ * Conflict
2643
+ */
2644
+ 409: Error409;
2313
2645
  /**
2314
2646
  * Too Many Requests
2315
2647
  */
@@ -2319,26 +2651,34 @@ export type MediaShowErrors = {
2319
2651
  */
2320
2652
  500: Error500;
2321
2653
  };
2322
- export type MediaShowError = MediaShowErrors[keyof MediaShowErrors];
2323
- export type MediaShowResponses = {
2654
+ export type SegmentCreateError = SegmentCreateErrors[keyof SegmentCreateErrors];
2655
+ export type SegmentCreateResponses = {
2324
2656
  /**
2325
- * OK
2657
+ * Single segment response with internal fields
2326
2658
  */
2327
- 200: Media;
2659
+ 201: SegmentInternal;
2328
2660
  };
2329
- export type MediaShowResponse = MediaShowResponses[keyof MediaShowResponses];
2330
- export type MediaUpdateData = {
2331
- body: MediaUpdateRequest;
2661
+ export type SegmentCreateResponse = SegmentCreateResponses[keyof SegmentCreateResponses];
2662
+ export type SegmentDestroyData = {
2663
+ body?: never;
2332
2664
  path: {
2333
2665
  /**
2334
- * Media ID
2666
+ * ID of the media
2667
+ */
2668
+ mediaId: number;
2669
+ /**
2670
+ * Episode number
2671
+ */
2672
+ episodeNumber: number;
2673
+ /**
2674
+ * Segment ID
2335
2675
  */
2336
2676
  id: number;
2337
2677
  };
2338
2678
  query?: never;
2339
- url: '/v1/media/{id}';
2679
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
2340
2680
  };
2341
- export type MediaUpdateErrors = {
2681
+ export type SegmentDestroyErrors = {
2342
2682
  /**
2343
2683
  * Bad Request
2344
2684
  */
@@ -2364,35 +2704,34 @@ export type MediaUpdateErrors = {
2364
2704
  */
2365
2705
  500: Error500;
2366
2706
  };
2367
- export type MediaUpdateError = MediaUpdateErrors[keyof MediaUpdateErrors];
2368
- export type MediaUpdateResponses = {
2707
+ export type SegmentDestroyError = SegmentDestroyErrors[keyof SegmentDestroyErrors];
2708
+ export type SegmentDestroyResponses = {
2369
2709
  /**
2370
- * OK
2710
+ * Segment successfully deleted
2371
2711
  */
2372
- 200: Media;
2712
+ 204: void;
2373
2713
  };
2374
- export type MediaUpdateResponse = MediaUpdateResponses[keyof MediaUpdateResponses];
2375
- export type EpisodeIndexData = {
2714
+ export type SegmentDestroyResponse = SegmentDestroyResponses[keyof SegmentDestroyResponses];
2715
+ export type SegmentShowData = {
2376
2716
  body?: never;
2377
2717
  path: {
2378
2718
  /**
2379
2719
  * ID of the media
2380
2720
  */
2381
2721
  mediaId: number;
2382
- };
2383
- query?: {
2384
2722
  /**
2385
- * Maximum number of episodes to return
2723
+ * Episode number
2386
2724
  */
2387
- size?: number;
2725
+ episodeNumber: number;
2388
2726
  /**
2389
- * Episode number to start from (for pagination)
2727
+ * Segment ID
2390
2728
  */
2391
- cursor?: number;
2729
+ id: number;
2392
2730
  };
2393
- url: '/v1/media/{mediaId}/episodes';
2731
+ query?: never;
2732
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
2394
2733
  };
2395
- export type EpisodeIndexErrors = {
2734
+ export type SegmentShowErrors = {
2396
2735
  /**
2397
2736
  * Bad Request
2398
2737
  */
@@ -2418,26 +2757,34 @@ export type EpisodeIndexErrors = {
2418
2757
  */
2419
2758
  500: Error500;
2420
2759
  };
2421
- export type EpisodeIndexError = EpisodeIndexErrors[keyof EpisodeIndexErrors];
2422
- export type EpisodeIndexResponses = {
2760
+ export type SegmentShowError = SegmentShowErrors[keyof SegmentShowErrors];
2761
+ export type SegmentShowResponses = {
2423
2762
  /**
2424
- * Paginated list of episodes
2763
+ * Single segment response
2425
2764
  */
2426
- 200: EpisodeListResponse;
2765
+ 200: Segment;
2427
2766
  };
2428
- export type EpisodeIndexResponse = EpisodeIndexResponses[keyof EpisodeIndexResponses];
2429
- export type EpisodeCreateData = {
2430
- body: EpisodeCreateRequest;
2767
+ export type SegmentShowResponse = SegmentShowResponses[keyof SegmentShowResponses];
2768
+ export type SegmentUpdateData = {
2769
+ body: SegmentUpdateRequest;
2431
2770
  path: {
2432
2771
  /**
2433
2772
  * ID of the media
2434
2773
  */
2435
2774
  mediaId: number;
2775
+ /**
2776
+ * Episode number
2777
+ */
2778
+ episodeNumber: number;
2779
+ /**
2780
+ * Segment ID
2781
+ */
2782
+ id: number;
2436
2783
  };
2437
2784
  query?: never;
2438
- url: '/v1/media/{mediaId}/episodes';
2785
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
2439
2786
  };
2440
- export type EpisodeCreateErrors = {
2787
+ export type SegmentUpdateErrors = {
2441
2788
  /**
2442
2789
  * Bad Request
2443
2790
  */
@@ -2454,10 +2801,6 @@ export type EpisodeCreateErrors = {
2454
2801
  * Not Found
2455
2802
  */
2456
2803
  404: Error404;
2457
- /**
2458
- * Conflict
2459
- */
2460
- 409: Error409;
2461
2804
  /**
2462
2805
  * Too Many Requests
2463
2806
  */
@@ -2467,30 +2810,26 @@ export type EpisodeCreateErrors = {
2467
2810
  */
2468
2811
  500: Error500;
2469
2812
  };
2470
- export type EpisodeCreateError = EpisodeCreateErrors[keyof EpisodeCreateErrors];
2471
- export type EpisodeCreateResponses = {
2813
+ export type SegmentUpdateError = SegmentUpdateErrors[keyof SegmentUpdateErrors];
2814
+ export type SegmentUpdateResponses = {
2472
2815
  /**
2473
- * Single episode response
2816
+ * Single segment response with internal fields
2474
2817
  */
2475
- 201: Episode;
2818
+ 200: SegmentInternal;
2476
2819
  };
2477
- export type EpisodeCreateResponse = EpisodeCreateResponses[keyof EpisodeCreateResponses];
2478
- export type EpisodeDestroyData = {
2820
+ export type SegmentUpdateResponse = SegmentUpdateResponses[keyof SegmentUpdateResponses];
2821
+ export type SegmentShowByUuidData = {
2479
2822
  body?: never;
2480
2823
  path: {
2481
2824
  /**
2482
- * ID of the media
2483
- */
2484
- mediaId: number;
2485
- /**
2486
- * Episode number
2825
+ * Segment UUID
2487
2826
  */
2488
- episodeNumber: number;
2827
+ uuid: string;
2489
2828
  };
2490
2829
  query?: never;
2491
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
2830
+ url: '/v1/media/segments/{uuid}';
2492
2831
  };
2493
- export type EpisodeDestroyErrors = {
2832
+ export type SegmentShowByUuidErrors = {
2494
2833
  /**
2495
2834
  * Bad Request
2496
2835
  */
@@ -2516,30 +2855,36 @@ export type EpisodeDestroyErrors = {
2516
2855
  */
2517
2856
  500: Error500;
2518
2857
  };
2519
- export type EpisodeDestroyError = EpisodeDestroyErrors[keyof EpisodeDestroyErrors];
2520
- export type EpisodeDestroyResponses = {
2521
- /**
2522
- * Episode successfully deleted
2523
- */
2524
- 204: void;
2858
+ export type SegmentShowByUuidError = SegmentShowByUuidErrors[keyof SegmentShowByUuidErrors];
2859
+ export type SegmentShowByUuidResponses = {
2860
+ 200: Segment;
2525
2861
  };
2526
- export type EpisodeDestroyResponse = EpisodeDestroyResponses[keyof EpisodeDestroyResponses];
2527
- export type EpisodeShowData = {
2862
+ export type SegmentShowByUuidResponse = SegmentShowByUuidResponses[keyof SegmentShowByUuidResponses];
2863
+ export type SegmentContextShowData = {
2528
2864
  body?: never;
2529
2865
  path: {
2530
2866
  /**
2531
- * ID of the media
2867
+ * Segment UUID
2532
2868
  */
2533
- mediaId: number;
2869
+ uuid: string;
2870
+ };
2871
+ query?: {
2534
2872
  /**
2535
- * Episode number
2873
+ * Number of segments to return before and after the target
2874
+ */
2875
+ limit?: number;
2876
+ /**
2877
+ * Content ratings to include (omit for all ratings)
2878
+ */
2879
+ contentRating?: Array<ContentRating>;
2880
+ /**
2881
+ * Resources to expand in the response includes block
2536
2882
  */
2537
- episodeNumber: number;
2883
+ include?: Array<IncludeExpansion>;
2538
2884
  };
2539
- query?: never;
2540
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
2885
+ url: '/v1/media/segments/{uuid}/context';
2541
2886
  };
2542
- export type EpisodeShowErrors = {
2887
+ export type SegmentContextShowErrors = {
2543
2888
  /**
2544
2889
  * Bad Request
2545
2890
  */
@@ -2565,30 +2910,34 @@ export type EpisodeShowErrors = {
2565
2910
  */
2566
2911
  500: Error500;
2567
2912
  };
2568
- export type EpisodeShowError = EpisodeShowErrors[keyof EpisodeShowErrors];
2569
- export type EpisodeShowResponses = {
2913
+ export type SegmentContextShowError = SegmentContextShowErrors[keyof SegmentContextShowErrors];
2914
+ export type SegmentContextShowResponses = {
2570
2915
  /**
2571
- * Single episode response
2916
+ * OK
2572
2917
  */
2573
- 200: Episode;
2918
+ 200: SegmentContextResponse;
2574
2919
  };
2575
- export type EpisodeShowResponse = EpisodeShowResponses[keyof EpisodeShowResponses];
2576
- export type EpisodeUpdateData = {
2577
- body: EpisodeUpdateRequest;
2578
- path: {
2920
+ export type SegmentContextShowResponse = SegmentContextShowResponses[keyof SegmentContextShowResponses];
2921
+ export type SeriesIndexData = {
2922
+ body?: never;
2923
+ path?: never;
2924
+ query?: {
2579
2925
  /**
2580
- * ID of the media
2926
+ * Number of results per page
2581
2927
  */
2582
- mediaId: number;
2928
+ limit?: number;
2583
2929
  /**
2584
- * Episode number
2930
+ * Pagination cursor offset
2585
2931
  */
2586
- episodeNumber: number;
2932
+ cursor?: number;
2933
+ /**
2934
+ * Case-insensitive search across English, Japanese, and Romaji names
2935
+ */
2936
+ query?: string;
2587
2937
  };
2588
- query?: never;
2589
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
2938
+ url: '/v1/media/series';
2590
2939
  };
2591
- export type EpisodeUpdateErrors = {
2940
+ export type SeriesIndexErrors = {
2592
2941
  /**
2593
2942
  * Bad Request
2594
2943
  */
@@ -2601,10 +2950,6 @@ export type EpisodeUpdateErrors = {
2601
2950
  * Forbidden
2602
2951
  */
2603
2952
  403: Error403;
2604
- /**
2605
- * Not Found
2606
- */
2607
- 404: Error404;
2608
2953
  /**
2609
2954
  * Too Many Requests
2610
2955
  */
@@ -2614,39 +2959,34 @@ export type EpisodeUpdateErrors = {
2614
2959
  */
2615
2960
  500: Error500;
2616
2961
  };
2617
- export type EpisodeUpdateError = EpisodeUpdateErrors[keyof EpisodeUpdateErrors];
2618
- export type EpisodeUpdateResponses = {
2962
+ export type SeriesIndexError = SeriesIndexErrors[keyof SeriesIndexErrors];
2963
+ export type SeriesIndexResponses = {
2619
2964
  /**
2620
- * Single episode response
2965
+ * OK
2621
2966
  */
2622
- 200: Episode;
2967
+ 200: SeriesListResponse;
2623
2968
  };
2624
- export type EpisodeUpdateResponse = EpisodeUpdateResponses[keyof EpisodeUpdateResponses];
2625
- export type SegmentIndexData = {
2626
- body?: never;
2627
- path: {
2628
- /**
2629
- * ID of the media
2630
- */
2631
- mediaId: number;
2969
+ export type SeriesIndexResponse = SeriesIndexResponses[keyof SeriesIndexResponses];
2970
+ export type SeriesCreateData = {
2971
+ body: {
2632
2972
  /**
2633
- * Episode number
2973
+ * Japanese name of the series
2634
2974
  */
2635
- episodeNumber: number;
2636
- };
2637
- query?: {
2975
+ nameJa: string;
2638
2976
  /**
2639
- * Maximum number of segments to return
2977
+ * Romaji name of the series
2640
2978
  */
2641
- size?: number;
2979
+ nameRomaji: string;
2642
2980
  /**
2643
- * Segment ID to start from (for pagination)
2981
+ * English name of the series
2644
2982
  */
2645
- cursor?: number;
2983
+ nameEn: string;
2646
2984
  };
2647
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments';
2985
+ path?: never;
2986
+ query?: never;
2987
+ url: '/v1/media/series';
2648
2988
  };
2649
- export type SegmentIndexErrors = {
2989
+ export type SeriesCreateErrors = {
2650
2990
  /**
2651
2991
  * Bad Request
2652
2992
  */
@@ -2659,10 +2999,6 @@ export type SegmentIndexErrors = {
2659
2999
  * Forbidden
2660
3000
  */
2661
3001
  403: Error403;
2662
- /**
2663
- * Not Found
2664
- */
2665
- 404: Error404;
2666
3002
  /**
2667
3003
  * Too Many Requests
2668
3004
  */
@@ -2672,30 +3008,26 @@ export type SegmentIndexErrors = {
2672
3008
  */
2673
3009
  500: Error500;
2674
3010
  };
2675
- export type SegmentIndexError = SegmentIndexErrors[keyof SegmentIndexErrors];
2676
- export type SegmentIndexResponses = {
3011
+ export type SeriesCreateError = SeriesCreateErrors[keyof SeriesCreateErrors];
3012
+ export type SeriesCreateResponses = {
2677
3013
  /**
2678
- * Paginated list of segments
3014
+ * Created
2679
3015
  */
2680
- 200: SegmentListResponse;
3016
+ 201: Series;
2681
3017
  };
2682
- export type SegmentIndexResponse = SegmentIndexResponses[keyof SegmentIndexResponses];
2683
- export type SegmentCreateData = {
2684
- body: SegmentCreateRequest;
3018
+ export type SeriesCreateResponse = SeriesCreateResponses[keyof SeriesCreateResponses];
3019
+ export type SeriesDestroyData = {
3020
+ body?: never;
2685
3021
  path: {
2686
3022
  /**
2687
- * ID of the media
2688
- */
2689
- mediaId: number;
2690
- /**
2691
- * Episode number
3023
+ * Series ID
2692
3024
  */
2693
- episodeNumber: number;
3025
+ id: number;
2694
3026
  };
2695
3027
  query?: never;
2696
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments';
3028
+ url: '/v1/media/series/{id}';
2697
3029
  };
2698
- export type SegmentCreateErrors = {
3030
+ export type SeriesDestroyErrors = {
2699
3031
  /**
2700
3032
  * Bad Request
2701
3033
  */
@@ -2712,10 +3044,6 @@ export type SegmentCreateErrors = {
2712
3044
  * Not Found
2713
3045
  */
2714
3046
  404: Error404;
2715
- /**
2716
- * Conflict
2717
- */
2718
- 409: Error409;
2719
3047
  /**
2720
3048
  * Too Many Requests
2721
3049
  */
@@ -2725,34 +3053,31 @@ export type SegmentCreateErrors = {
2725
3053
  */
2726
3054
  500: Error500;
2727
3055
  };
2728
- export type SegmentCreateError = SegmentCreateErrors[keyof SegmentCreateErrors];
2729
- export type SegmentCreateResponses = {
3056
+ export type SeriesDestroyError = SeriesDestroyErrors[keyof SeriesDestroyErrors];
3057
+ export type SeriesDestroyResponses = {
2730
3058
  /**
2731
- * Single segment response
3059
+ * No Content
2732
3060
  */
2733
- 201: Segment;
3061
+ 204: void;
2734
3062
  };
2735
- export type SegmentCreateResponse = SegmentCreateResponses[keyof SegmentCreateResponses];
2736
- export type SegmentDestroyData = {
3063
+ export type SeriesDestroyResponse = SeriesDestroyResponses[keyof SeriesDestroyResponses];
3064
+ export type SeriesShowData = {
2737
3065
  body?: never;
2738
3066
  path: {
2739
3067
  /**
2740
- * ID of the media
2741
- */
2742
- mediaId: number;
2743
- /**
2744
- * Episode number
3068
+ * Series ID
2745
3069
  */
2746
- episodeNumber: number;
3070
+ id: number;
3071
+ };
3072
+ query?: {
2747
3073
  /**
2748
- * Segment ID
3074
+ * Resources to expand in the series response (`media.characters` implies `media`)
2749
3075
  */
2750
- id: number;
3076
+ include?: Array<MediaIncludeExpansion>;
2751
3077
  };
2752
- query?: never;
2753
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
3078
+ url: '/v1/media/series/{id}';
2754
3079
  };
2755
- export type SegmentDestroyErrors = {
3080
+ export type SeriesShowErrors = {
2756
3081
  /**
2757
3082
  * Bad Request
2758
3083
  */
@@ -2778,34 +3103,39 @@ export type SegmentDestroyErrors = {
2778
3103
  */
2779
3104
  500: Error500;
2780
3105
  };
2781
- export type SegmentDestroyError = SegmentDestroyErrors[keyof SegmentDestroyErrors];
2782
- export type SegmentDestroyResponses = {
3106
+ export type SeriesShowError = SeriesShowErrors[keyof SeriesShowErrors];
3107
+ export type SeriesShowResponses = {
2783
3108
  /**
2784
- * Segment successfully deleted
3109
+ * OK
2785
3110
  */
2786
- 204: void;
3111
+ 200: SeriesWithMedia;
2787
3112
  };
2788
- export type SegmentDestroyResponse = SegmentDestroyResponses[keyof SegmentDestroyResponses];
2789
- export type SegmentShowData = {
2790
- body?: never;
2791
- path: {
3113
+ export type SeriesShowResponse = SeriesShowResponses[keyof SeriesShowResponses];
3114
+ export type SeriesUpdateData = {
3115
+ body: {
2792
3116
  /**
2793
- * ID of the media
3117
+ * Updated Japanese name
2794
3118
  */
2795
- mediaId: number;
3119
+ nameJa?: string;
2796
3120
  /**
2797
- * Episode number
3121
+ * Updated Romaji name
2798
3122
  */
2799
- episodeNumber: number;
3123
+ nameRomaji?: string;
2800
3124
  /**
2801
- * Segment ID
3125
+ * Updated English name
3126
+ */
3127
+ nameEn?: string;
3128
+ };
3129
+ path: {
3130
+ /**
3131
+ * Series ID
2802
3132
  */
2803
3133
  id: number;
2804
3134
  };
2805
3135
  query?: never;
2806
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
3136
+ url: '/v1/media/series/{id}';
2807
3137
  };
2808
- export type SegmentShowErrors = {
3138
+ export type SeriesUpdateErrors = {
2809
3139
  /**
2810
3140
  * Bad Request
2811
3141
  */
@@ -2831,34 +3161,35 @@ export type SegmentShowErrors = {
2831
3161
  */
2832
3162
  500: Error500;
2833
3163
  };
2834
- export type SegmentShowError = SegmentShowErrors[keyof SegmentShowErrors];
2835
- export type SegmentShowResponses = {
3164
+ export type SeriesUpdateError = SeriesUpdateErrors[keyof SeriesUpdateErrors];
3165
+ export type SeriesUpdateResponses = {
2836
3166
  /**
2837
- * Single segment response
3167
+ * OK
2838
3168
  */
2839
- 200: Segment;
3169
+ 200: Series;
2840
3170
  };
2841
- export type SegmentShowResponse = SegmentShowResponses[keyof SegmentShowResponses];
2842
- export type SegmentUpdateData = {
2843
- body: SegmentUpdateRequest;
2844
- path: {
3171
+ export type SeriesUpdateResponse = SeriesUpdateResponses[keyof SeriesUpdateResponses];
3172
+ export type SeriesAddMediaData = {
3173
+ body: {
2845
3174
  /**
2846
- * ID of the media
3175
+ * Media ID to add
2847
3176
  */
2848
3177
  mediaId: number;
2849
3178
  /**
2850
- * Episode number
3179
+ * Position in the series (1-indexed)
2851
3180
  */
2852
- episodeNumber: number;
3181
+ position: number;
3182
+ };
3183
+ path: {
2853
3184
  /**
2854
- * Segment ID
3185
+ * Series ID
2855
3186
  */
2856
3187
  id: number;
2857
3188
  };
2858
3189
  query?: never;
2859
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
3190
+ url: '/v1/media/series/{id}/media';
2860
3191
  };
2861
- export type SegmentUpdateErrors = {
3192
+ export type SeriesAddMediaErrors = {
2862
3193
  /**
2863
3194
  * Bad Request
2864
3195
  */
@@ -2884,26 +3215,30 @@ export type SegmentUpdateErrors = {
2884
3215
  */
2885
3216
  500: Error500;
2886
3217
  };
2887
- export type SegmentUpdateError = SegmentUpdateErrors[keyof SegmentUpdateErrors];
2888
- export type SegmentUpdateResponses = {
3218
+ export type SeriesAddMediaError = SeriesAddMediaErrors[keyof SeriesAddMediaErrors];
3219
+ export type SeriesAddMediaResponses = {
2889
3220
  /**
2890
- * Single segment response
3221
+ * No Content
2891
3222
  */
2892
- 200: Segment;
3223
+ 204: void;
2893
3224
  };
2894
- export type SegmentUpdateResponse = SegmentUpdateResponses[keyof SegmentUpdateResponses];
2895
- export type SegmentShowByUuidData = {
3225
+ export type SeriesAddMediaResponse = SeriesAddMediaResponses[keyof SeriesAddMediaResponses];
3226
+ export type SeriesRemoveMediaData = {
2896
3227
  body?: never;
2897
3228
  path: {
2898
3229
  /**
2899
- * Segment UUID
3230
+ * Series ID
2900
3231
  */
2901
- uuid: string;
3232
+ id: number;
3233
+ /**
3234
+ * Media ID
3235
+ */
3236
+ mediaId: number;
2902
3237
  };
2903
3238
  query?: never;
2904
- url: '/v1/media/segments/{uuid}';
3239
+ url: '/v1/media/series/{id}/media/{mediaId}';
2905
3240
  };
2906
- export type SegmentShowByUuidErrors = {
3241
+ export type SeriesRemoveMediaErrors = {
2907
3242
  /**
2908
3243
  * Bad Request
2909
3244
  */
@@ -2929,28 +3264,35 @@ export type SegmentShowByUuidErrors = {
2929
3264
  */
2930
3265
  500: Error500;
2931
3266
  };
2932
- export type SegmentShowByUuidError = SegmentShowByUuidErrors[keyof SegmentShowByUuidErrors];
2933
- export type SegmentShowByUuidResponses = {
2934
- 200: Segment;
3267
+ export type SeriesRemoveMediaError = SeriesRemoveMediaErrors[keyof SeriesRemoveMediaErrors];
3268
+ export type SeriesRemoveMediaResponses = {
3269
+ /**
3270
+ * No Content
3271
+ */
3272
+ 204: void;
2935
3273
  };
2936
- export type SegmentShowByUuidResponse = SegmentShowByUuidResponses[keyof SegmentShowByUuidResponses];
2937
- export type SegmentContextShowData = {
2938
- body?: never;
2939
- path: {
3274
+ export type SeriesRemoveMediaResponse = SeriesRemoveMediaResponses[keyof SeriesRemoveMediaResponses];
3275
+ export type SeriesUpdateMediaData = {
3276
+ body: {
2940
3277
  /**
2941
- * Segment UUID
3278
+ * New position in the series (1-indexed)
2942
3279
  */
2943
- uuid: string;
3280
+ position: number;
2944
3281
  };
2945
- query?: {
3282
+ path: {
2946
3283
  /**
2947
- * Number of segments to return before and after the target
3284
+ * Series ID
2948
3285
  */
2949
- limit?: number;
3286
+ id: number;
3287
+ /**
3288
+ * Media ID
3289
+ */
3290
+ mediaId: number;
2950
3291
  };
2951
- url: '/v1/media/segments/{uuid}/context';
3292
+ query?: never;
3293
+ url: '/v1/media/series/{id}/media/{mediaId}';
2952
3294
  };
2953
- export type SegmentContextShowErrors = {
3295
+ export type SeriesUpdateMediaErrors = {
2954
3296
  /**
2955
3297
  * Bad Request
2956
3298
  */
@@ -2976,14 +3318,14 @@ export type SegmentContextShowErrors = {
2976
3318
  */
2977
3319
  500: Error500;
2978
3320
  };
2979
- export type SegmentContextShowError = SegmentContextShowErrors[keyof SegmentContextShowErrors];
2980
- export type SegmentContextShowResponses = {
3321
+ export type SeriesUpdateMediaError = SeriesUpdateMediaErrors[keyof SeriesUpdateMediaErrors];
3322
+ export type SeriesUpdateMediaResponses = {
2981
3323
  /**
2982
- * OK
3324
+ * No Content
2983
3325
  */
2984
- 200: SegmentContextResponse;
3326
+ 204: void;
2985
3327
  };
2986
- export type SegmentContextShowResponse = SegmentContextShowResponses[keyof SegmentContextShowResponses];
3328
+ export type SeriesUpdateMediaResponse = SeriesUpdateMediaResponses[keyof SeriesUpdateMediaResponses];
2987
3329
  export type CharacterShowData = {
2988
3330
  body?: never;
2989
3331
  path: {
@@ -3037,7 +3379,12 @@ export type SeiyuuShowData = {
3037
3379
  */
3038
3380
  id: number;
3039
3381
  };
3040
- query?: never;
3382
+ query?: {
3383
+ /**
3384
+ * Resources to expand in the response (`character` is included by default)
3385
+ */
3386
+ include?: Array<'character'>;
3387
+ };
3041
3388
  url: '/v1/media/seiyuu/{id}';
3042
3389
  };
3043
3390
  export type SeiyuuShowErrors = {
@@ -3085,6 +3432,10 @@ export type UserQuotaShowErrors = {
3085
3432
  * Unauthorized
3086
3433
  */
3087
3434
  401: Error401;
3435
+ /**
3436
+ * Too Many Requests
3437
+ */
3438
+ 429: Error429;
3088
3439
  /**
3089
3440
  * Internal Server Error
3090
3441
  */
@@ -3109,7 +3460,7 @@ export type UserReportIndexData = {
3109
3460
  /**
3110
3461
  * Number of results per page
3111
3462
  */
3112
- size?: number;
3463
+ limit?: number;
3113
3464
  /**
3114
3465
  * Filter by report status
3115
3466
  */
@@ -3258,11 +3609,15 @@ export type UserActivityIndexData = {
3258
3609
  /**
3259
3610
  * Number of results per page
3260
3611
  */
3261
- size?: number;
3612
+ limit?: number;
3262
3613
  /**
3263
3614
  * Filter by activity type
3264
3615
  */
3265
3616
  activityType?: ActivityType;
3617
+ /**
3618
+ * Filter activities to a specific date (YYYY-MM-DD)
3619
+ */
3620
+ date?: string;
3266
3621
  };
3267
3622
  url: '/v1/user/activity';
3268
3623
  };
@@ -3282,16 +3637,60 @@ export type UserActivityIndexResponses = {
3282
3637
  * OK
3283
3638
  */
3284
3639
  200: {
3285
- data: Array<UserActivity>;
3286
- hasMore: boolean;
3287
- cursor?: number;
3640
+ activities: Array<UserActivity>;
3641
+ pagination: CursorPagination;
3288
3642
  };
3289
3643
  };
3290
3644
  export type UserActivityIndexResponse = UserActivityIndexResponses[keyof UserActivityIndexResponses];
3645
+ export type UserActivityHeatmapShowData = {
3646
+ body?: never;
3647
+ path?: never;
3648
+ query?: {
3649
+ /**
3650
+ * Number of days to include in the heatmap
3651
+ */
3652
+ days?: number;
3653
+ /**
3654
+ * Filter by activity type
3655
+ */
3656
+ activityType?: ActivityType;
3657
+ };
3658
+ url: '/v1/user/activity/heatmap';
3659
+ };
3660
+ export type UserActivityHeatmapShowErrors = {
3661
+ /**
3662
+ * Unauthorized
3663
+ */
3664
+ 401: Error401;
3665
+ /**
3666
+ * Internal Server Error
3667
+ */
3668
+ 500: Error500;
3669
+ };
3670
+ export type UserActivityHeatmapShowError = UserActivityHeatmapShowErrors[keyof UserActivityHeatmapShowErrors];
3671
+ export type UserActivityHeatmapShowResponses = {
3672
+ /**
3673
+ * OK
3674
+ */
3675
+ 200: {
3676
+ /**
3677
+ * Map of YYYY-MM-DD date strings to activity counts
3678
+ */
3679
+ counts: {
3680
+ [key: string]: number;
3681
+ };
3682
+ };
3683
+ };
3684
+ export type UserActivityHeatmapShowResponse = UserActivityHeatmapShowResponses[keyof UserActivityHeatmapShowResponses];
3291
3685
  export type UserActivityStatsShowData = {
3292
3686
  body?: never;
3293
3687
  path?: never;
3294
- query?: never;
3688
+ query?: {
3689
+ /**
3690
+ * Only count activities from this date onward (YYYY-MM-DD)
3691
+ */
3692
+ since?: string;
3693
+ };
3295
3694
  url: '/v1/user/activity/stats';
3296
3695
  };
3297
3696
  export type UserActivityStatsShowErrors = {
@@ -3346,45 +3745,34 @@ export type UserExportShowResponses = {
3346
3745
  /**
3347
3746
  * OK
3348
3747
  */
3349
- 200: {
3350
- profile: {
3351
- id?: number;
3352
- username?: string;
3353
- email?: string;
3354
- createdAt?: string;
3355
- };
3356
- preferences: UserPreferences;
3357
- activity: Array<UserActivity>;
3358
- lists: Array<{
3359
- [key: string]: unknown;
3360
- }>;
3361
- reports: Array<{
3362
- [key: string]: unknown;
3363
- }>;
3364
- };
3748
+ 200: UserExportResponse;
3365
3749
  };
3366
3750
  export type UserExportShowResponse = UserExportShowResponses[keyof UserExportShowResponses];
3367
- export type LabIndexData = {
3751
+ export type UserLabsIndexData = {
3368
3752
  body?: never;
3369
3753
  path?: never;
3370
3754
  query?: never;
3371
- url: '/v1/labs';
3755
+ url: '/v1/user/labs';
3372
3756
  };
3373
- export type LabIndexErrors = {
3757
+ export type UserLabsIndexErrors = {
3758
+ /**
3759
+ * Unauthorized
3760
+ */
3761
+ 401: Error401;
3374
3762
  /**
3375
3763
  * Internal Server Error
3376
3764
  */
3377
3765
  500: Error500;
3378
3766
  };
3379
- export type LabIndexError = LabIndexErrors[keyof LabIndexErrors];
3380
- export type LabIndexResponses = {
3767
+ export type UserLabsIndexError = UserLabsIndexErrors[keyof UserLabsIndexErrors];
3768
+ export type UserLabsIndexResponses = {
3381
3769
  /**
3382
3770
  * OK
3383
3771
  */
3384
- 200: Array<LabFeature>;
3772
+ 200: Array<UserLabFeature>;
3385
3773
  };
3386
- export type LabIndexResponse = LabIndexResponses[keyof LabIndexResponses];
3387
- export type ListIndexData = {
3774
+ export type UserLabsIndexResponse = UserLabsIndexResponses[keyof UserLabsIndexResponses];
3775
+ export type CollectionIndexData = {
3388
3776
  body?: never;
3389
3777
  path?: never;
3390
3778
  query?: {
@@ -3393,21 +3781,23 @@ export type ListIndexData = {
3393
3781
  */
3394
3782
  visibility?: 'public' | 'private';
3395
3783
  /**
3396
- * Filter by list type
3784
+ * Cursor offset for pagination
3397
3785
  */
3398
- type?: 'SERIES' | 'CUSTOM' | 'SEGMENT';
3786
+ cursor?: number;
3399
3787
  /**
3400
- * Filter by list owner user ID
3788
+ * Page number (1-indexed)
3789
+ *
3790
+ * @deprecated
3401
3791
  */
3402
- userId?: number;
3792
+ page?: number;
3403
3793
  /**
3404
- * Filter lists containing this media ID
3794
+ * Items per page
3405
3795
  */
3406
- mediaId?: number;
3796
+ limit?: number;
3407
3797
  };
3408
- url: '/v1/lists';
3798
+ url: '/v1/collections';
3409
3799
  };
3410
- export type ListIndexErrors = {
3800
+ export type CollectionIndexErrors = {
3411
3801
  /**
3412
3802
  * Bad Request
3413
3803
  */
@@ -3429,21 +3819,21 @@ export type ListIndexErrors = {
3429
3819
  */
3430
3820
  500: Error500;
3431
3821
  };
3432
- export type ListIndexError = ListIndexErrors[keyof ListIndexErrors];
3433
- export type ListIndexResponses = {
3822
+ export type CollectionIndexError = CollectionIndexErrors[keyof CollectionIndexErrors];
3823
+ export type CollectionIndexResponses = {
3434
3824
  /**
3435
3825
  * OK
3436
3826
  */
3437
- 200: Array<List>;
3827
+ 200: CollectionListResponse;
3438
3828
  };
3439
- export type ListIndexResponse = ListIndexResponses[keyof ListIndexResponses];
3440
- export type ListCreateData = {
3441
- body: ListCreateRequest;
3829
+ export type CollectionIndexResponse = CollectionIndexResponses[keyof CollectionIndexResponses];
3830
+ export type CollectionCreateData = {
3831
+ body: CollectionRequests;
3442
3832
  path?: never;
3443
3833
  query?: never;
3444
- url: '/v1/lists';
3834
+ url: '/v1/collections';
3445
3835
  };
3446
- export type ListCreateErrors = {
3836
+ export type CollectionCreateErrors = {
3447
3837
  /**
3448
3838
  * Bad Request
3449
3839
  */
@@ -3465,26 +3855,26 @@ export type ListCreateErrors = {
3465
3855
  */
3466
3856
  500: Error500;
3467
3857
  };
3468
- export type ListCreateError = ListCreateErrors[keyof ListCreateErrors];
3469
- export type ListCreateResponses = {
3858
+ export type CollectionCreateError = CollectionCreateErrors[keyof CollectionCreateErrors];
3859
+ export type CollectionCreateResponses = {
3470
3860
  /**
3471
3861
  * Created
3472
3862
  */
3473
- 201: List;
3863
+ 201: Collection;
3474
3864
  };
3475
- export type ListCreateResponse = ListCreateResponses[keyof ListCreateResponses];
3476
- export type ListDestroyData = {
3865
+ export type CollectionCreateResponse = CollectionCreateResponses[keyof CollectionCreateResponses];
3866
+ export type CollectionDestroyData = {
3477
3867
  body?: never;
3478
3868
  path: {
3479
3869
  /**
3480
- * List ID
3870
+ * Collection ID
3481
3871
  */
3482
3872
  id: number;
3483
3873
  };
3484
3874
  query?: never;
3485
- url: '/v1/lists/{id}';
3875
+ url: '/v1/collections/{id}';
3486
3876
  };
3487
- export type ListDestroyErrors = {
3877
+ export type CollectionDestroyErrors = {
3488
3878
  /**
3489
3879
  * Bad Request
3490
3880
  */
@@ -3510,128 +3900,41 @@ export type ListDestroyErrors = {
3510
3900
  */
3511
3901
  500: Error500;
3512
3902
  };
3513
- export type ListDestroyError = ListDestroyErrors[keyof ListDestroyErrors];
3514
- export type ListDestroyResponses = {
3903
+ export type CollectionDestroyError = CollectionDestroyErrors[keyof CollectionDestroyErrors];
3904
+ export type CollectionDestroyResponses = {
3515
3905
  /**
3516
- * OK
3906
+ * No Content
3517
3907
  */
3518
- 200: {
3519
- message?: string;
3520
- id?: number;
3521
- };
3908
+ 204: void;
3522
3909
  };
3523
- export type ListDestroyResponse = ListDestroyResponses[keyof ListDestroyResponses];
3524
- export type ListShowData = {
3910
+ export type CollectionDestroyResponse = CollectionDestroyResponses[keyof CollectionDestroyResponses];
3911
+ export type CollectionShowData = {
3525
3912
  body?: never;
3526
3913
  path: {
3527
3914
  /**
3528
- * List ID
3915
+ * Collection ID
3529
3916
  */
3530
3917
  id: number;
3531
3918
  };
3532
- query?: never;
3533
- url: '/v1/lists/{id}';
3534
- };
3535
- export type ListShowErrors = {
3536
- /**
3537
- * Bad Request
3538
- */
3539
- 400: Error400;
3540
- /**
3541
- * Unauthorized
3542
- */
3543
- 401: Error401;
3544
- /**
3545
- * Forbidden
3546
- */
3547
- 403: Error403;
3548
- /**
3549
- * Not Found
3550
- */
3551
- 404: Error404;
3552
- /**
3553
- * Too Many Requests
3554
- */
3555
- 429: Error429;
3556
- /**
3557
- * Internal Server Error
3558
- */
3559
- 500: Error500;
3560
- };
3561
- export type ListShowError = ListShowErrors[keyof ListShowErrors];
3562
- export type ListShowResponses = {
3563
- /**
3564
- * OK
3565
- */
3566
- 200: ListWithMedia;
3567
- };
3568
- export type ListShowResponse = ListShowResponses[keyof ListShowResponses];
3569
- export type ListUpdateData = {
3570
- body: {
3571
- name?: string;
3572
- visibility?: 'PUBLIC' | 'PRIVATE';
3573
- };
3574
- path: {
3919
+ query?: {
3575
3920
  /**
3576
- * List ID
3921
+ * Cursor offset for paginated segments
3577
3922
  */
3578
- id: number;
3579
- };
3580
- query?: never;
3581
- url: '/v1/lists/{id}';
3582
- };
3583
- export type ListUpdateErrors = {
3584
- /**
3585
- * Bad Request
3586
- */
3587
- 400: Error400;
3588
- /**
3589
- * Unauthorized
3590
- */
3591
- 401: Error401;
3592
- /**
3593
- * Forbidden
3594
- */
3595
- 403: Error403;
3596
- /**
3597
- * Not Found
3598
- */
3599
- 404: Error404;
3600
- /**
3601
- * Too Many Requests
3602
- */
3603
- 429: Error429;
3604
- /**
3605
- * Internal Server Error
3606
- */
3607
- 500: Error500;
3608
- };
3609
- export type ListUpdateError = ListUpdateErrors[keyof ListUpdateErrors];
3610
- export type ListUpdateResponses = {
3611
- /**
3612
- * OK
3613
- */
3614
- 200: List;
3615
- };
3616
- export type ListUpdateResponse = ListUpdateResponses[keyof ListUpdateResponses];
3617
- export type ListAddItemData = {
3618
- body: {
3619
- mediaId: number;
3923
+ cursor?: number;
3620
3924
  /**
3621
- * Position in the list (1-indexed)
3925
+ * Page number (1-indexed)
3926
+ *
3927
+ * @deprecated
3622
3928
  */
3623
- position: number;
3624
- };
3625
- path: {
3929
+ page?: number;
3626
3930
  /**
3627
- * List ID
3931
+ * Items per page
3628
3932
  */
3629
- id: number;
3933
+ limit?: number;
3630
3934
  };
3631
- query?: never;
3632
- url: '/v1/lists/{id}/items';
3935
+ url: '/v1/collections/{id}';
3633
3936
  };
3634
- export type ListAddItemErrors = {
3937
+ export type CollectionShowErrors = {
3635
3938
  /**
3636
3939
  * Bad Request
3637
3940
  */
@@ -3648,10 +3951,6 @@ export type ListAddItemErrors = {
3648
3951
  * Not Found
3649
3952
  */
3650
3953
  404: Error404;
3651
- /**
3652
- * Conflict
3653
- */
3654
- 409: Error409;
3655
3954
  /**
3656
3955
  * Too Many Requests
3657
3956
  */
@@ -3661,32 +3960,29 @@ export type ListAddItemErrors = {
3661
3960
  */
3662
3961
  500: Error500;
3663
3962
  };
3664
- export type ListAddItemError = ListAddItemErrors[keyof ListAddItemErrors];
3665
- export type ListAddItemResponses = {
3963
+ export type CollectionShowError = CollectionShowErrors[keyof CollectionShowErrors];
3964
+ export type CollectionShowResponses = {
3666
3965
  /**
3667
- * Created
3966
+ * OK
3668
3967
  */
3669
- 201: {
3670
- message?: string;
3671
- };
3968
+ 200: CollectionWithSegments;
3672
3969
  };
3673
- export type ListAddItemResponse = ListAddItemResponses[keyof ListAddItemResponses];
3674
- export type ListRemoveItemData = {
3675
- body?: never;
3970
+ export type CollectionShowResponse = CollectionShowResponses[keyof CollectionShowResponses];
3971
+ export type CollectionUpdateData = {
3972
+ body: {
3973
+ name?: string;
3974
+ visibility?: 'PUBLIC' | 'PRIVATE';
3975
+ };
3676
3976
  path: {
3677
3977
  /**
3678
- * List ID
3978
+ * Collection ID
3679
3979
  */
3680
3980
  id: number;
3681
- /**
3682
- * Media ID
3683
- */
3684
- mediaId: number;
3685
3981
  };
3686
3982
  query?: never;
3687
- url: '/v1/lists/{id}/items/{mediaId}';
3983
+ url: '/v1/collections/{id}';
3688
3984
  };
3689
- export type ListRemoveItemErrors = {
3985
+ export type CollectionUpdateErrors = {
3690
3986
  /**
3691
3987
  * Bad Request
3692
3988
  */
@@ -3712,37 +4008,35 @@ export type ListRemoveItemErrors = {
3712
4008
  */
3713
4009
  500: Error500;
3714
4010
  };
3715
- export type ListRemoveItemError = ListRemoveItemErrors[keyof ListRemoveItemErrors];
3716
- export type ListRemoveItemResponses = {
4011
+ export type CollectionUpdateError = CollectionUpdateErrors[keyof CollectionUpdateErrors];
4012
+ export type CollectionUpdateResponses = {
3717
4013
  /**
3718
4014
  * OK
3719
4015
  */
3720
- 200: {
3721
- message?: string;
3722
- };
4016
+ 200: Collection;
3723
4017
  };
3724
- export type ListRemoveItemResponse = ListRemoveItemResponses[keyof ListRemoveItemResponses];
3725
- export type ListUpdateItemData = {
4018
+ export type CollectionUpdateResponse = CollectionUpdateResponses[keyof CollectionUpdateResponses];
4019
+ export type CollectionAddSegmentData = {
3726
4020
  body: {
3727
4021
  /**
3728
- * New position in the list (1-indexed)
4022
+ * UUID of the segment to add
3729
4023
  */
3730
- position: number;
4024
+ segmentUuid: string;
4025
+ /**
4026
+ * Optional annotation
4027
+ */
4028
+ note?: string;
3731
4029
  };
3732
4030
  path: {
3733
4031
  /**
3734
- * List ID
4032
+ * Collection ID
3735
4033
  */
3736
4034
  id: number;
3737
- /**
3738
- * Media ID
3739
- */
3740
- mediaId: number;
3741
4035
  };
3742
4036
  query?: never;
3743
- url: '/v1/lists/{id}/items/{mediaId}';
4037
+ url: '/v1/collections/{id}/segments';
3744
4038
  };
3745
- export type ListUpdateItemErrors = {
4039
+ export type CollectionAddSegmentErrors = {
3746
4040
  /**
3747
4041
  * Bad Request
3748
4042
  */
@@ -3768,37 +4062,30 @@ export type ListUpdateItemErrors = {
3768
4062
  */
3769
4063
  500: Error500;
3770
4064
  };
3771
- export type ListUpdateItemError = ListUpdateItemErrors[keyof ListUpdateItemErrors];
3772
- export type ListUpdateItemResponses = {
4065
+ export type CollectionAddSegmentError = CollectionAddSegmentErrors[keyof CollectionAddSegmentErrors];
4066
+ export type CollectionAddSegmentResponses = {
3773
4067
  /**
3774
- * OK
4068
+ * No Content
3775
4069
  */
3776
- 200: {
3777
- message?: string;
3778
- };
4070
+ 204: void;
3779
4071
  };
3780
- export type ListUpdateItemResponse = ListUpdateItemResponses[keyof ListUpdateItemResponses];
3781
- export type ListGetSegmentsData = {
4072
+ export type CollectionAddSegmentResponse = CollectionAddSegmentResponses[keyof CollectionAddSegmentResponses];
4073
+ export type CollectionRemoveSegmentData = {
3782
4074
  body?: never;
3783
4075
  path: {
3784
4076
  /**
3785
- * List ID
4077
+ * Collection ID
3786
4078
  */
3787
4079
  id: number;
3788
- };
3789
- query?: {
3790
- /**
3791
- * Page number (1-indexed)
3792
- */
3793
- page?: number;
3794
4080
  /**
3795
- * Items per page
4081
+ * Segment UUID
3796
4082
  */
3797
- limit?: number;
4083
+ uuid: string;
3798
4084
  };
3799
- url: '/v1/lists/{id}/segments';
4085
+ query?: never;
4086
+ url: '/v1/collections/{id}/segments/{uuid}';
3800
4087
  };
3801
- export type ListGetSegmentsErrors = {
4088
+ export type CollectionRemoveSegmentErrors = {
3802
4089
  /**
3803
4090
  * Bad Request
3804
4091
  */
@@ -3824,35 +4111,39 @@ export type ListGetSegmentsErrors = {
3824
4111
  */
3825
4112
  500: Error500;
3826
4113
  };
3827
- export type ListGetSegmentsError = ListGetSegmentsErrors[keyof ListGetSegmentsErrors];
3828
- export type ListGetSegmentsResponses = {
4114
+ export type CollectionRemoveSegmentError = CollectionRemoveSegmentErrors[keyof CollectionRemoveSegmentErrors];
4115
+ export type CollectionRemoveSegmentResponses = {
3829
4116
  /**
3830
- * OK
4117
+ * No Content
3831
4118
  */
3832
- 200: ListWithSegments;
4119
+ 204: void;
3833
4120
  };
3834
- export type ListGetSegmentsResponse = ListGetSegmentsResponses[keyof ListGetSegmentsResponses];
3835
- export type ListAddSegmentData = {
4121
+ export type CollectionRemoveSegmentResponse = CollectionRemoveSegmentResponses[keyof CollectionRemoveSegmentResponses];
4122
+ export type CollectionUpdateSegmentData = {
3836
4123
  body: {
3837
4124
  /**
3838
- * UUID of the segment to add
4125
+ * New position in the collection
3839
4126
  */
3840
- segmentUuid: string;
4127
+ position?: number;
3841
4128
  /**
3842
- * Optional annotation
4129
+ * Updated annotation
3843
4130
  */
3844
4131
  note?: string;
3845
4132
  };
3846
4133
  path: {
3847
4134
  /**
3848
- * List ID
4135
+ * Collection ID
3849
4136
  */
3850
4137
  id: number;
4138
+ /**
4139
+ * Segment UUID
4140
+ */
4141
+ uuid: string;
3851
4142
  };
3852
4143
  query?: never;
3853
- url: '/v1/lists/{id}/segments';
4144
+ url: '/v1/collections/{id}/segments/{uuid}';
3854
4145
  };
3855
- export type ListAddSegmentErrors = {
4146
+ export type CollectionUpdateSegmentErrors = {
3856
4147
  /**
3857
4148
  * Bad Request
3858
4149
  */
@@ -3869,10 +4160,6 @@ export type ListAddSegmentErrors = {
3869
4160
  * Not Found
3870
4161
  */
3871
4162
  404: Error404;
3872
- /**
3873
- * Conflict
3874
- */
3875
- 409: Error409;
3876
4163
  /**
3877
4164
  * Too Many Requests
3878
4165
  */
@@ -3882,36 +4169,21 @@ export type ListAddSegmentErrors = {
3882
4169
  */
3883
4170
  500: Error500;
3884
4171
  };
3885
- export type ListAddSegmentError = ListAddSegmentErrors[keyof ListAddSegmentErrors];
3886
- export type ListAddSegmentResponses = {
4172
+ export type CollectionUpdateSegmentError = CollectionUpdateSegmentErrors[keyof CollectionUpdateSegmentErrors];
4173
+ export type CollectionUpdateSegmentResponses = {
3887
4174
  /**
3888
- * Created
4175
+ * No Content
3889
4176
  */
3890
- 201: {
3891
- message?: string;
3892
- };
4177
+ 204: void;
3893
4178
  };
3894
- export type ListAddSegmentResponse = ListAddSegmentResponses[keyof ListAddSegmentResponses];
3895
- export type ListRemoveSegmentData = {
4179
+ export type CollectionUpdateSegmentResponse = CollectionUpdateSegmentResponses[keyof CollectionUpdateSegmentResponses];
4180
+ export type AdminDashboardShowData = {
3896
4181
  body?: never;
3897
- path: {
3898
- /**
3899
- * List ID
3900
- */
3901
- id: number;
3902
- /**
3903
- * Segment UUID
3904
- */
3905
- uuid: string;
3906
- };
4182
+ path?: never;
3907
4183
  query?: never;
3908
- url: '/v1/lists/{id}/segments/{uuid}';
4184
+ url: '/v1/admin/dashboard';
3909
4185
  };
3910
- export type ListRemoveSegmentErrors = {
3911
- /**
3912
- * Bad Request
3913
- */
3914
- 400: Error400;
4186
+ export type AdminDashboardShowErrors = {
3915
4187
  /**
3916
4188
  * Unauthorized
3917
4189
  */
@@ -3920,10 +4192,6 @@ export type ListRemoveSegmentErrors = {
3920
4192
  * Forbidden
3921
4193
  */
3922
4194
  403: Error403;
3923
- /**
3924
- * Not Found
3925
- */
3926
- 404: Error404;
3927
4195
  /**
3928
4196
  * Too Many Requests
3929
4197
  */
@@ -3933,45 +4201,81 @@ export type ListRemoveSegmentErrors = {
3933
4201
  */
3934
4202
  500: Error500;
3935
4203
  };
3936
- export type ListRemoveSegmentError = ListRemoveSegmentErrors[keyof ListRemoveSegmentErrors];
3937
- export type ListRemoveSegmentResponses = {
4204
+ export type AdminDashboardShowError = AdminDashboardShowErrors[keyof AdminDashboardShowErrors];
4205
+ export type AdminDashboardShowResponses = {
3938
4206
  /**
3939
4207
  * OK
3940
4208
  */
3941
4209
  200: {
3942
- message?: string;
4210
+ media: {
4211
+ totalMedia: number;
4212
+ totalEpisodes: number;
4213
+ totalSegments: number;
4214
+ totalCharacters: number;
4215
+ totalSeiyuu: number;
4216
+ };
4217
+ users: {
4218
+ totalUsers: number;
4219
+ /**
4220
+ * Users registered in the last 30 days
4221
+ */
4222
+ recentlyRegisteredCount: number;
4223
+ /**
4224
+ * Users active in the last 30 days
4225
+ */
4226
+ recentlyActiveCount: number;
4227
+ };
4228
+ activity: {
4229
+ totalSearches: number;
4230
+ totalExports: number;
4231
+ totalPlays: number;
4232
+ totalCollectionAdds: number;
4233
+ /**
4234
+ * Unique users who searched in the last 7 days
4235
+ */
4236
+ activeSearchers7d: number;
4237
+ topQueries7d: Array<{
4238
+ query: string;
4239
+ count: number;
4240
+ }>;
4241
+ dailyActivity30d: Array<{
4242
+ date: string;
4243
+ count: number;
4244
+ }>;
4245
+ };
4246
+ system: {
4247
+ status: 'healthy' | 'degraded';
4248
+ app: {
4249
+ version: string;
4250
+ };
4251
+ elasticsearch: {
4252
+ status: 'connected' | 'disconnected';
4253
+ version?: string;
4254
+ clusterName?: string;
4255
+ clusterStatus?: string;
4256
+ indexName?: string;
4257
+ documentCount?: number;
4258
+ };
4259
+ database: {
4260
+ status: 'connected' | 'disconnected';
4261
+ version?: string;
4262
+ };
4263
+ queues: Array<{
4264
+ queue: string;
4265
+ stuckCount: number;
4266
+ failedCount: number;
4267
+ }>;
4268
+ };
3943
4269
  };
3944
4270
  };
3945
- export type ListRemoveSegmentResponse = ListRemoveSegmentResponses[keyof ListRemoveSegmentResponses];
3946
- export type ListUpdateSegmentData = {
3947
- body: {
3948
- /**
3949
- * New position in the list
3950
- */
3951
- position?: number;
3952
- /**
3953
- * Updated annotation
3954
- */
3955
- note?: string;
3956
- };
3957
- path: {
3958
- /**
3959
- * List ID
3960
- */
3961
- id: number;
3962
- /**
3963
- * Segment UUID
3964
- */
3965
- uuid: string;
3966
- };
4271
+ export type AdminDashboardShowResponse = AdminDashboardShowResponses[keyof AdminDashboardShowResponses];
4272
+ export type AdminHealthShowData = {
4273
+ body?: never;
4274
+ path?: never;
3967
4275
  query?: never;
3968
- url: '/v1/lists/{id}/segments/{uuid}';
4276
+ url: '/v1/admin/health';
3969
4277
  };
3970
- export type ListUpdateSegmentErrors = {
3971
- /**
3972
- * Bad Request
3973
- */
3974
- 400: Error400;
4278
+ export type AdminHealthShowErrors = {
3975
4279
  /**
3976
4280
  * Unauthorized
3977
4281
  */
@@ -3980,10 +4284,6 @@ export type ListUpdateSegmentErrors = {
3980
4284
  * Forbidden
3981
4285
  */
3982
4286
  403: Error403;
3983
- /**
3984
- * Not Found
3985
- */
3986
- 404: Error404;
3987
4287
  /**
3988
4288
  * Too Many Requests
3989
4289
  */
@@ -3993,16 +4293,40 @@ export type ListUpdateSegmentErrors = {
3993
4293
  */
3994
4294
  500: Error500;
3995
4295
  };
3996
- export type ListUpdateSegmentError = ListUpdateSegmentErrors[keyof ListUpdateSegmentErrors];
3997
- export type ListUpdateSegmentResponses = {
4296
+ export type AdminHealthShowError = AdminHealthShowErrors[keyof AdminHealthShowErrors];
4297
+ export type AdminHealthShowResponses = {
3998
4298
  /**
3999
4299
  * OK
4000
4300
  */
4001
4301
  200: {
4002
- message?: string;
4302
+ /**
4303
+ * Overall system status
4304
+ */
4305
+ status: 'healthy' | 'degraded';
4306
+ app: {
4307
+ /**
4308
+ * API version from OpenAPI spec
4309
+ */
4310
+ version: string;
4311
+ };
4312
+ elasticsearch: {
4313
+ status: 'connected' | 'disconnected';
4314
+ version?: string;
4315
+ clusterName?: string;
4316
+ /**
4317
+ * ES cluster health (green, yellow, red)
4318
+ */
4319
+ clusterStatus?: string;
4320
+ indexName?: string;
4321
+ documentCount?: number;
4322
+ };
4323
+ database: {
4324
+ status: 'connected' | 'disconnected';
4325
+ version?: string;
4326
+ };
4003
4327
  };
4004
4328
  };
4005
- export type ListUpdateSegmentResponse = ListUpdateSegmentResponses[keyof ListUpdateSegmentResponses];
4329
+ export type AdminHealthShowResponse = AdminHealthShowResponses[keyof AdminHealthShowResponses];
4006
4330
  export type AdminReindexCreateData = {
4007
4331
  body?: ReindexRequest;
4008
4332
  path?: never;
@@ -4128,31 +4452,45 @@ export type AdminQueueShowResponses = {
4128
4452
  * Queue details retrieved successfully
4129
4453
  */
4130
4454
  200: {
4131
- queue?: string;
4132
- /**
4133
- * Current queue size (pending jobs)
4134
- */
4135
- size?: number;
4136
- /**
4137
- * Total jobs created
4138
- */
4139
- created?: number;
4140
- /**
4141
- * Total failed jobs
4142
- */
4143
- failed?: number;
4144
- /**
4145
- * Total completed jobs
4146
- */
4147
- complete?: number;
4148
- /**
4149
- * Total expired jobs
4150
- */
4151
- expired?: number;
4152
- /**
4153
- * Total cancelled jobs
4154
- */
4155
- cancelled?: number;
4455
+ queue: string;
4456
+ stats: {
4457
+ /**
4458
+ * Jobs scheduled for future execution (`start_after > now()`)
4459
+ */
4460
+ deferred: number;
4461
+ /**
4462
+ * Jobs currently queued and waiting to be processed
4463
+ */
4464
+ queued: number;
4465
+ /**
4466
+ * Jobs currently being processed
4467
+ */
4468
+ active: number;
4469
+ /**
4470
+ * Total jobs currently stored in the queue table
4471
+ */
4472
+ total: number;
4473
+ };
4474
+ metadata: {
4475
+ policy: string;
4476
+ partition: boolean;
4477
+ deadLetter?: string;
4478
+ warningQueueSize?: number;
4479
+ retryLimit?: number;
4480
+ /**
4481
+ * Initial retry delay in seconds
4482
+ */
4483
+ retryDelay?: number;
4484
+ retryBackoff?: boolean;
4485
+ retryDelayMax?: number;
4486
+ expireInSeconds?: number;
4487
+ retentionSeconds?: number;
4488
+ deleteAfterSeconds?: number;
4489
+ createdOn: string;
4490
+ updatedOn: string;
4491
+ singletonsActive: Array<string>;
4492
+ table: string;
4493
+ };
4156
4494
  };
4157
4495
  };
4158
4496
  export type AdminQueueShowResponse = AdminQueueShowResponses[keyof AdminQueueShowResponses];
@@ -4310,27 +4648,6 @@ export type AdminQueueFailedDestroyResponses = {
4310
4648
  };
4311
4649
  };
4312
4650
  export type AdminQueueFailedDestroyResponse = AdminQueueFailedDestroyResponses[keyof AdminQueueFailedDestroyResponses];
4313
- export type AdminMorphemeBackfillCreateData = {
4314
- body?: never;
4315
- path?: never;
4316
- query?: never;
4317
- url: '/v1/admin/morpheme-backfill';
4318
- };
4319
- export type AdminMorphemeBackfillCreateResponses = {
4320
- /**
4321
- * Backfill completed
4322
- */
4323
- 200: {
4324
- success: boolean;
4325
- message: string;
4326
- stats: {
4327
- totalSegments: number;
4328
- successfulAnalyses: number;
4329
- failedAnalyses: number;
4330
- };
4331
- };
4332
- };
4333
- export type AdminMorphemeBackfillCreateResponse = AdminMorphemeBackfillCreateResponses[keyof AdminMorphemeBackfillCreateResponses];
4334
4651
  export type AdminReportIndexData = {
4335
4652
  body?: never;
4336
4653
  path?: never;
@@ -4342,7 +4659,7 @@ export type AdminReportIndexData = {
4342
4659
  /**
4343
4660
  * Number of results per page
4344
4661
  */
4345
- size?: number;
4662
+ limit?: number;
4346
4663
  /**
4347
4664
  * Filter by report status
4348
4665
  */
@@ -4354,11 +4671,19 @@ export type AdminReportIndexData = {
4354
4671
  /**
4355
4672
  * Filter by target type
4356
4673
  */
4357
- targetType?: 'SEGMENT' | 'EPISODE' | 'MEDIA';
4674
+ 'target.type'?: 'SEGMENT' | 'EPISODE' | 'MEDIA';
4358
4675
  /**
4359
4676
  * Filter by target media ID
4360
4677
  */
4361
- targetMediaId?: number;
4678
+ 'target.mediaId'?: number;
4679
+ /**
4680
+ * Filter by target episode number
4681
+ */
4682
+ 'target.episodeNumber'?: number;
4683
+ /**
4684
+ * Filter by target segment UUID
4685
+ */
4686
+ 'target.segmentUuid'?: string;
4362
4687
  /**
4363
4688
  * Filter by review check run ID
4364
4689
  */
@@ -4445,6 +4770,10 @@ export type AdminReviewRunCreateData = {
4445
4770
  * Optional category filter
4446
4771
  */
4447
4772
  category?: 'ANIME' | 'JDRAMA';
4773
+ /**
4774
+ * Optional check name to run a single check instead of all
4775
+ */
4776
+ checkName?: string;
4448
4777
  };
4449
4778
  url: '/v1/admin/review/run';
4450
4779
  };
@@ -4577,7 +4906,7 @@ export type AdminReviewRunIndexData = {
4577
4906
  /**
4578
4907
  * Number of results per page
4579
4908
  */
4580
- size?: number;
4909
+ limit?: number;
4581
4910
  };
4582
4911
  url: '/v1/admin/review/runs';
4583
4912
  };
@@ -4605,9 +4934,8 @@ export type AdminReviewRunIndexResponses = {
4605
4934
  * OK
4606
4935
  */
4607
4936
  200: {
4608
- data: Array<ReviewCheckRun>;
4609
- hasMore: boolean;
4610
- cursor?: number;
4937
+ runs: Array<ReviewCheckRun>;
4938
+ pagination: CursorPagination;
4611
4939
  };
4612
4940
  };
4613
4941
  export type AdminReviewRunIndexResponse = AdminReviewRunIndexResponses[keyof AdminReviewRunIndexResponses];