@brigadasos/nadeshiko-sdk 1.4.3-dev.e5c01f0 → 1.5.0-dev.0c1011b

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,5 +1,5 @@
1
1
  export type ClientOptions = {
2
- baseUrl: 'http://localhost:5000' | 'https://api.nadeshiko.co' | (string & {});
2
+ baseUrl: 'https://api.nadeshiko.co' | (string & {});
3
3
  };
4
4
  /**
5
5
  * A media filter entry with optional episode restriction
@@ -108,11 +108,11 @@ export type SearchRequest = {
108
108
  /**
109
109
  * Max amount of entries by response
110
110
  */
111
- limit?: number;
111
+ take?: number;
112
112
  /**
113
- * Current page of search
113
+ * Opaque cursor token returned from the previous search page
114
114
  */
115
- cursor?: Array<number>;
115
+ cursor?: string;
116
116
  /**
117
117
  * Sort configuration
118
118
  */
@@ -247,9 +247,10 @@ export type ExternalId = {
247
247
  */
248
248
  export type Seiyuu = {
249
249
  /**
250
- * AniList staff ID
250
+ * Internal seiyuu ID
251
251
  */
252
252
  id: number;
253
+ externalIds: ExternalId;
253
254
  /**
254
255
  * Japanese name of the voice actor
255
256
  */
@@ -371,31 +372,31 @@ export type PaginationInfo = {
371
372
  /**
372
373
  * Whether there are more results after this page
373
374
  */
374
- hasMore?: boolean;
375
+ hasMore: boolean;
375
376
  /**
376
377
  * Estimated total number of matching segments
377
378
  */
378
- estimatedTotalHits?: number;
379
+ estimatedTotalHits: number;
379
380
  /**
380
381
  * Whether estimatedTotalHits is exact or a lower bound
381
382
  */
382
- estimatedTotalHitsRelation?: 'EXACT' | 'LOWER_BOUND';
383
+ estimatedTotalHitsRelation: 'EXACT' | 'LOWER_BOUND';
383
384
  /**
384
- * Cursor for fetching the next page (undefined when hasMore is false)
385
+ * Opaque cursor token for fetching the next page (`null` when hasMore is false)
385
386
  */
386
- cursor?: Array<number>;
387
+ cursor: string;
387
388
  };
388
389
  export type SearchResponse = {
389
- segments?: Array<Segment>;
390
- includes?: {
390
+ segments: Array<Segment>;
391
+ includes: {
391
392
  /**
392
393
  * Media objects keyed by mediaId
393
394
  */
394
- media?: {
395
+ media: {
395
396
  [key: string]: Media;
396
397
  };
397
398
  };
398
- pagination?: PaginationInfo;
399
+ pagination: PaginationInfo;
399
400
  };
400
401
  /**
401
402
  * Bad Request error response
@@ -615,20 +616,20 @@ export type MediaSearchStats = {
615
616
  * Count of entries grouped by media category
616
617
  */
617
618
  export type CategoryCount = {
618
- category?: Category;
619
+ category: Category;
619
620
  /**
620
621
  * Number of entries in this category
621
622
  */
622
- count?: number;
623
+ count: number;
623
624
  };
624
625
  export type SearchStatsResponse = {
625
- media?: Array<MediaSearchStats>;
626
- categories?: Array<CategoryCount>;
627
- includes?: {
626
+ media: Array<MediaSearchStats>;
627
+ categories: Array<CategoryCount>;
628
+ includes: {
628
629
  /**
629
630
  * Media objects keyed by mediaId
630
631
  */
631
- media?: {
632
+ media: {
632
633
  [key: string]: Media;
633
634
  };
634
635
  };
@@ -673,27 +674,27 @@ export type WordMatch = {
673
674
  /**
674
675
  * The word that was searched for
675
676
  */
676
- word?: string;
677
+ word: string;
677
678
  /**
678
679
  * Indicates whether the word was found in any segment
679
680
  */
680
- isMatch?: boolean;
681
+ isMatch: boolean;
681
682
  /**
682
683
  * Total number of times this word appears across all media
683
684
  */
684
- matchCount?: number;
685
+ matchCount: number;
685
686
  /**
686
687
  * List of media containing this word
687
688
  */
688
- media?: Array<WordMatchMedia>;
689
+ media: Array<WordMatchMedia>;
689
690
  };
690
691
  export type SearchMultipleResponse = {
691
- results?: Array<WordMatch>;
692
- includes?: {
692
+ results: Array<WordMatch>;
693
+ includes: {
693
694
  /**
694
695
  * Media objects keyed by mediaId
695
696
  */
696
- media?: {
697
+ media: {
697
698
  [key: string]: Media;
698
699
  };
699
700
  };
@@ -701,32 +702,29 @@ export type SearchMultipleResponse = {
701
702
  /**
702
703
  * Resource to expand in media responses
703
704
  */
704
- export type MediaIncludeExpansion = 'media' | 'media.characters';
705
+ export type MediaIncludeExpansion = 'media.characters';
705
706
  /**
706
- * Cursor pagination metadata
707
+ * Opaque cursor pagination metadata
707
708
  */
708
- export type CursorPagination = {
709
+ export type OpaqueCursorPagination = {
709
710
  /**
710
711
  * Whether more results are available
711
712
  */
712
713
  hasMore: boolean;
713
714
  /**
714
- * Cursor for the next page (`null` when `hasMore` is `false`)
715
+ * Opaque token for the next page (`null` when `hasMore` is `false`)
715
716
  */
716
- cursor: number;
717
+ cursor: string;
717
718
  };
718
719
  export type MediaListResponse = {
719
720
  media: Array<Media>;
720
- pagination: CursorPagination;
721
+ pagination: OpaqueCursorPagination;
721
722
  };
722
723
  /**
723
724
  * Character data for creating/updating media
724
725
  */
725
726
  export type CharacterInput = {
726
- /**
727
- * AniList character ID
728
- */
729
- id: number;
727
+ externalIds: ExternalId;
730
728
  /**
731
729
  * Japanese name of the character
732
730
  */
@@ -743,22 +741,21 @@ export type CharacterInput = {
743
741
  * Character's role in the media
744
742
  */
745
743
  role: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
746
- /**
747
- * AniList staff ID for the Japanese voice actor
748
- */
749
- seiyuuId: number;
750
- /**
751
- * Japanese name of the voice actor
752
- */
753
- seiyuuNameJa: string;
754
- /**
755
- * English name of the voice actor
756
- */
757
- seiyuuNameEn: string;
758
- /**
759
- * Voice actor profile image URL
760
- */
761
- seiyuuImageUrl: string;
744
+ seiyuu: {
745
+ externalIds: ExternalId;
746
+ /**
747
+ * Japanese name of the voice actor
748
+ */
749
+ nameJa: string;
750
+ /**
751
+ * English name of the voice actor
752
+ */
753
+ nameEn: string;
754
+ /**
755
+ * Voice actor profile image URL
756
+ */
757
+ imageUrl: string;
758
+ };
762
759
  };
763
760
  /**
764
761
  * Request body for creating a new media entry
@@ -872,6 +869,37 @@ export type Error409 = {
872
869
  export type MediaAutocompleteResponse = {
873
870
  media: Array<Media>;
874
871
  };
872
+ /**
873
+ * Segment with internal fields. For write operations (create, update) all fields are always populated.
874
+ * For GET, optional fields are only populated when requested via include[].
875
+ *
876
+ */
877
+ export type SegmentInternal = Segment & {
878
+ /**
879
+ * Storage backend for segment assets
880
+ */
881
+ storage?: 'LOCAL' | 'R2';
882
+ /**
883
+ * Hash identifier for the segment
884
+ */
885
+ hashedId?: string;
886
+ /**
887
+ * Base path in the storage backend
888
+ */
889
+ storageBasePath?: string;
890
+ /**
891
+ * Raw WD Tagger v3 classifier output used to derive content rating
892
+ */
893
+ ratingAnalysis?: {
894
+ [key: string]: unknown;
895
+ };
896
+ /**
897
+ * POS tokenization results keyed by engine (sudachi, unidic)
898
+ */
899
+ posAnalysis?: {
900
+ [key: string]: unknown;
901
+ };
902
+ };
875
903
  /**
876
904
  * Not Found error response
877
905
  */
@@ -908,118 +936,323 @@ export type Error404 = {
908
936
  };
909
937
  };
910
938
  /**
911
- * Request body for updating an existing media entry (all fields optional)
939
+ * All fields are optional for partial updates
912
940
  */
913
- export type MediaUpdateRequest = {
914
- externalIds?: ExternalId;
941
+ export type SegmentUpdateRequest = {
915
942
  /**
916
- * Original Japanese name of the media
943
+ * Position of the segment within the episode
917
944
  */
918
- nameJa?: string;
945
+ position?: number;
919
946
  /**
920
- * Romaji transliteration of the media name
947
+ * Segment status
921
948
  */
922
- nameRomaji?: string;
949
+ status?: 'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG';
923
950
  /**
924
- * English name of the media
951
+ * Start time of the segment in milliseconds from the beginning of the episode
925
952
  */
926
- nameEn?: string;
953
+ startTimeMs?: number;
927
954
  /**
928
- * Format of the media release (e.g., TV, OVA, Movie)
955
+ * End time of the segment in milliseconds from the beginning of the episode
929
956
  */
930
- airingFormat?: string;
957
+ endTimeMs?: number;
958
+ textJa?: {
959
+ /**
960
+ * Original Japanese content of the segment
961
+ */
962
+ content?: string;
963
+ };
964
+ textEs?: {
965
+ /**
966
+ * Spanish translation of the segment content
967
+ */
968
+ content?: string;
969
+ /**
970
+ * Whether the Spanish translation was machine-translated
971
+ */
972
+ isMachineTranslated?: boolean;
973
+ };
974
+ textEn?: {
975
+ /**
976
+ * English translation of the segment content
977
+ */
978
+ content?: string;
979
+ /**
980
+ * Whether the English translation was machine-translated
981
+ */
982
+ isMachineTranslated?: boolean;
983
+ };
984
+ contentRating?: ContentRating;
931
985
  /**
932
- * Current airing status (FINISHED, RELEASING, NOT_YET_RELEASED, CANCELLED)
986
+ * Raw WD Tagger v3 classifier output used to derive content rating
933
987
  */
934
- airingStatus?: string;
988
+ ratingAnalysis?: {
989
+ [key: string]: unknown;
990
+ };
935
991
  /**
936
- * List of genres associated with the media
992
+ * POS tokenization results keyed by engine (sudachi, unidic)
937
993
  */
938
- genres?: Array<string>;
994
+ posAnalysis?: {
995
+ [key: string]: unknown;
996
+ };
939
997
  /**
940
- * Storage backend for media assets
998
+ * Storage backend for segment assets
941
999
  */
942
1000
  storage?: 'LOCAL' | 'R2';
943
1001
  /**
944
- * Start date of the media (first airing/release)
945
- */
946
- startDate?: string;
947
- /**
948
- * End date of the media (last airing/release)
1002
+ * Hash identifier for the segment (from segment JSON)
949
1003
  */
950
- endDate?: string;
1004
+ hashedId?: string;
1005
+ };
1006
+ export type SegmentContextResponse = {
1007
+ segments: Array<Segment>;
1008
+ includes: {
1009
+ /**
1010
+ * Media objects keyed by mediaId
1011
+ */
1012
+ media?: {
1013
+ [key: string]: Media;
1014
+ };
1015
+ };
1016
+ };
1017
+ /**
1018
+ * Ordered media series grouping
1019
+ */
1020
+ export type Series = {
951
1021
  /**
952
- * Media category
1022
+ * Series ID
953
1023
  */
954
- category?: 'ANIME' | 'JDRAMA';
1024
+ id: number;
955
1025
  /**
956
- * Version of the media-sub-splitter used
1026
+ * Japanese name of the series
957
1027
  */
958
- version?: string;
1028
+ nameJa: string;
959
1029
  /**
960
- * Hash salt used when generating the hash for the related media assets
1030
+ * Romaji name of the series
961
1031
  */
962
- hashSalt?: string;
1032
+ nameRomaji: string;
963
1033
  /**
964
- * Animation studio that produced the media
1034
+ * English name of the series
965
1035
  */
966
- studio?: string;
1036
+ nameEn: string;
1037
+ };
1038
+ export type SeriesListResponse = {
1039
+ series: Array<Series>;
1040
+ pagination: OpaqueCursorPagination;
1041
+ };
1042
+ /**
1043
+ * Series with ordered media entries
1044
+ */
1045
+ export type SeriesWithMedia = {
967
1046
  /**
968
- * Airing season label for the media
1047
+ * Series ID
969
1048
  */
970
- seasonName?: string;
1049
+ id: number;
971
1050
  /**
972
- * Airing year for the media
1051
+ * Japanese name of the series
973
1052
  */
974
- seasonYear?: number;
1053
+ nameJa: string;
975
1054
  /**
976
- * Base path for R2/CDN storage (e.g. "media/21459")
1055
+ * Romaji name of the series
977
1056
  */
978
- storageBasePath?: string;
1057
+ nameRomaji: string;
979
1058
  /**
980
- * List of characters appearing in the media with their voice actors
1059
+ * English name of the series
981
1060
  */
982
- characters?: Array<CharacterInput>;
1061
+ nameEn: string;
983
1062
  /**
984
- * Total number of subtitle segments available
1063
+ * All media in the series, sorted by position
985
1064
  */
986
- segmentCount?: number;
1065
+ media: Array<{
1066
+ /**
1067
+ * Position in the series (1-indexed)
1068
+ */
1069
+ position: number;
1070
+ media: Media;
1071
+ }>;
987
1072
  };
988
- export type Episode = {
1073
+ /**
1074
+ * Anime character
1075
+ */
1076
+ export type Character = {
989
1077
  /**
990
- * ID of the media this episode belongs to
1078
+ * Internal character ID
991
1079
  */
992
- mediaId: number;
1080
+ id: number;
1081
+ externalIds: ExternalId;
993
1082
  /**
994
- * Episode number within the media
1083
+ * Japanese name of the character
995
1084
  */
996
- episodeNumber: number;
1085
+ nameJa: string;
997
1086
  /**
998
- * English title of the episode
1087
+ * English name of the character
999
1088
  */
1000
- titleEn?: string;
1089
+ nameEn: string;
1001
1090
  /**
1002
- * Romanized title of the episode
1091
+ * Character image URL
1003
1092
  */
1004
- titleRomaji?: string;
1093
+ imageUrl: string;
1094
+ };
1095
+ /**
1096
+ * Character with voice actor and all media appearances
1097
+ */
1098
+ export type CharacterWithMedia = Character & {
1099
+ seiyuu: Seiyuu;
1005
1100
  /**
1006
- * Japanese title of the episode
1101
+ * All media this character appears in
1007
1102
  */
1008
- titleJa?: string;
1103
+ mediaAppearances: Array<{
1104
+ media: Media;
1105
+ /**
1106
+ * Character role in this media
1107
+ */
1108
+ role: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
1109
+ }>;
1110
+ };
1111
+ /**
1112
+ * Seiyuu details with optional character appearances
1113
+ */
1114
+ export type SeiyuuWithRoles = {
1009
1115
  /**
1010
- * Episode description or synopsis
1116
+ * AniList staff ID
1011
1117
  */
1012
- description?: string;
1118
+ id: number;
1119
+ externalIds: ExternalId;
1013
1120
  /**
1014
- * When the episode originally aired
1121
+ * Japanese name of the voice actor
1015
1122
  */
1016
- airedAt?: string;
1123
+ nameJa: string;
1017
1124
  /**
1018
- * Episode duration in seconds
1125
+ * English name of the voice actor
1019
1126
  */
1020
- lengthSeconds?: number;
1127
+ nameEn: string;
1021
1128
  /**
1022
- * URL to episode thumbnail image
1129
+ * Profile image URL
1130
+ */
1131
+ imageUrl: string;
1132
+ /**
1133
+ * Characters voiced by this seiyuu with their media appearances
1134
+ */
1135
+ characters: Array<Character & {
1136
+ media: Media;
1137
+ /**
1138
+ * Character role in this media
1139
+ */
1140
+ role: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
1141
+ }>;
1142
+ };
1143
+ /**
1144
+ * Request body for updating an existing media entry (all fields optional)
1145
+ */
1146
+ export type MediaUpdateRequest = {
1147
+ externalIds?: ExternalId;
1148
+ /**
1149
+ * Original Japanese name of the media
1150
+ */
1151
+ nameJa?: string;
1152
+ /**
1153
+ * Romaji transliteration of the media name
1154
+ */
1155
+ nameRomaji?: string;
1156
+ /**
1157
+ * English name of the media
1158
+ */
1159
+ nameEn?: string;
1160
+ /**
1161
+ * Format of the media release (e.g., TV, OVA, Movie)
1162
+ */
1163
+ airingFormat?: string;
1164
+ /**
1165
+ * Current airing status (FINISHED, RELEASING, NOT_YET_RELEASED, CANCELLED)
1166
+ */
1167
+ airingStatus?: string;
1168
+ /**
1169
+ * List of genres associated with the media
1170
+ */
1171
+ genres?: Array<string>;
1172
+ /**
1173
+ * Storage backend for media assets
1174
+ */
1175
+ storage?: 'LOCAL' | 'R2';
1176
+ /**
1177
+ * Start date of the media (first airing/release)
1178
+ */
1179
+ startDate?: string;
1180
+ /**
1181
+ * End date of the media (last airing/release)
1182
+ */
1183
+ endDate?: string;
1184
+ /**
1185
+ * Media category
1186
+ */
1187
+ category?: 'ANIME' | 'JDRAMA';
1188
+ /**
1189
+ * Version of the media-sub-splitter used
1190
+ */
1191
+ version?: string;
1192
+ /**
1193
+ * Hash salt used when generating the hash for the related media assets
1194
+ */
1195
+ hashSalt?: string;
1196
+ /**
1197
+ * Animation studio that produced the media
1198
+ */
1199
+ studio?: string;
1200
+ /**
1201
+ * Airing season label for the media
1202
+ */
1203
+ seasonName?: string;
1204
+ /**
1205
+ * Airing year for the media
1206
+ */
1207
+ seasonYear?: number;
1208
+ /**
1209
+ * Base path for R2/CDN storage (e.g. "media/21459")
1210
+ */
1211
+ storageBasePath?: string;
1212
+ /**
1213
+ * List of characters appearing in the media with their voice actors
1214
+ */
1215
+ characters?: Array<CharacterInput>;
1216
+ /**
1217
+ * Total number of subtitle segments available
1218
+ */
1219
+ segmentCount?: number;
1220
+ };
1221
+ export type Episode = {
1222
+ /**
1223
+ * ID of the media this episode belongs to
1224
+ */
1225
+ mediaId: number;
1226
+ /**
1227
+ * Episode number within the media
1228
+ */
1229
+ episodeNumber: number;
1230
+ /**
1231
+ * English title of the episode
1232
+ */
1233
+ titleEn?: string;
1234
+ /**
1235
+ * Romanized title of the episode
1236
+ */
1237
+ titleRomaji?: string;
1238
+ /**
1239
+ * Japanese title of the episode
1240
+ */
1241
+ titleJa?: string;
1242
+ /**
1243
+ * Episode description or synopsis
1244
+ */
1245
+ description?: string;
1246
+ /**
1247
+ * When the episode originally aired
1248
+ */
1249
+ airedAt?: string;
1250
+ /**
1251
+ * Episode duration in seconds
1252
+ */
1253
+ lengthSeconds?: number;
1254
+ /**
1255
+ * URL to episode thumbnail image
1023
1256
  */
1024
1257
  thumbnailUrl?: string;
1025
1258
  /**
@@ -1032,7 +1265,7 @@ export type EpisodeListResponse = {
1032
1265
  * Array of episode objects
1033
1266
  */
1034
1267
  episodes: Array<Episode>;
1035
- pagination: CursorPagination;
1268
+ pagination: OpaqueCursorPagination;
1036
1269
  };
1037
1270
  export type EpisodeCreateRequest = {
1038
1271
  /**
@@ -1138,265 +1371,33 @@ export type SegmentCreateRequest = {
1138
1371
  /**
1139
1372
  * English translation of the segment content
1140
1373
  */
1141
- content?: string;
1142
- /**
1143
- * Whether the English translation was machine-translated
1144
- */
1145
- isMachineTranslated?: boolean;
1146
- };
1147
- contentRating?: ContentRating;
1148
- /**
1149
- * Raw WD Tagger v3 classifier output used to derive content rating
1150
- */
1151
- ratingAnalysis?: {
1152
- [key: string]: unknown;
1153
- };
1154
- /**
1155
- * POS tokenization results keyed by engine (sudachi, unidic)
1156
- */
1157
- posAnalysis?: {
1158
- [key: string]: unknown;
1159
- };
1160
- /**
1161
- * Storage backend for segment assets
1162
- */
1163
- storage: 'LOCAL' | 'R2';
1164
- /**
1165
- * Hash identifier for the segment (from segment JSON)
1166
- */
1167
- hashedId: string;
1168
- };
1169
- /**
1170
- * Segment with internal fields (for internal API responses)
1171
- */
1172
- export type SegmentInternal = Segment & {
1173
- /**
1174
- * Storage backend for segment assets
1175
- */
1176
- storage?: 'LOCAL' | 'R2';
1177
- /**
1178
- * Hash identifier for the segment
1179
- */
1180
- hashedId?: string;
1181
- /**
1182
- * Base path in the storage backend
1183
- */
1184
- storageBasePath?: string;
1185
- /**
1186
- * Raw WD Tagger v3 classifier output used to derive content rating
1187
- */
1188
- ratingAnalysis?: {
1189
- [key: string]: unknown;
1190
- };
1191
- /**
1192
- * POS tokenization results keyed by engine (sudachi, unidic)
1193
- */
1194
- posAnalysis?: {
1195
- [key: string]: unknown;
1196
- };
1197
- };
1198
- /**
1199
- * All fields are optional for partial updates
1200
- */
1201
- export type SegmentUpdateRequest = {
1202
- /**
1203
- * Position of the segment within the episode
1204
- */
1205
- position?: number;
1206
- /**
1207
- * Segment status
1208
- */
1209
- status?: 'DELETED' | 'ACTIVE' | 'SUSPENDED' | 'VERIFIED' | 'INVALID' | 'TOO_LONG';
1210
- /**
1211
- * Start time of the segment in milliseconds from the beginning of the episode
1212
- */
1213
- startTimeMs?: number;
1214
- /**
1215
- * End time of the segment in milliseconds from the beginning of the episode
1216
- */
1217
- endTimeMs?: number;
1218
- textJa?: {
1219
- /**
1220
- * Original Japanese content of the segment
1221
- */
1222
- content?: string;
1223
- };
1224
- textEs?: {
1225
- /**
1226
- * Spanish translation of the segment content
1227
- */
1228
- content?: string;
1229
- /**
1230
- * Whether the Spanish translation was machine-translated
1231
- */
1232
- isMachineTranslated?: boolean;
1233
- };
1234
- textEn?: {
1235
- /**
1236
- * English translation of the segment content
1237
- */
1238
- content?: string;
1239
- /**
1240
- * Whether the English translation was machine-translated
1241
- */
1242
- isMachineTranslated?: boolean;
1243
- };
1244
- contentRating?: ContentRating;
1245
- /**
1246
- * Raw WD Tagger v3 classifier output used to derive content rating
1247
- */
1248
- ratingAnalysis?: {
1249
- [key: string]: unknown;
1250
- };
1251
- /**
1252
- * POS tokenization results keyed by engine (sudachi, unidic)
1253
- */
1254
- posAnalysis?: {
1255
- [key: string]: unknown;
1256
- };
1257
- /**
1258
- * Storage backend for segment assets
1259
- */
1260
- storage?: 'LOCAL' | 'R2';
1261
- /**
1262
- * Hash identifier for the segment (from segment JSON)
1263
- */
1264
- hashedId?: string;
1265
- };
1266
- export type SegmentContextResponse = {
1267
- segments: Array<Segment>;
1268
- includes?: {
1269
- /**
1270
- * Media objects keyed by mediaId
1271
- */
1272
- media?: {
1273
- [key: string]: Media;
1274
- };
1275
- };
1276
- };
1277
- /**
1278
- * Ordered media series grouping
1279
- */
1280
- export type Series = {
1281
- /**
1282
- * Series ID
1283
- */
1284
- id: number;
1285
- /**
1286
- * Japanese name of the series
1287
- */
1288
- nameJa: string;
1289
- /**
1290
- * Romaji name of the series
1291
- */
1292
- nameRomaji: string;
1293
- /**
1294
- * English name of the series
1295
- */
1296
- nameEn: string;
1297
- };
1298
- export type SeriesListResponse = {
1299
- series: Array<Series>;
1300
- pagination: CursorPagination;
1301
- };
1302
- /**
1303
- * Series with ordered media entries
1304
- */
1305
- export type SeriesWithMedia = {
1306
- /**
1307
- * Series ID
1308
- */
1309
- id: number;
1310
- /**
1311
- * Japanese name of the series
1312
- */
1313
- nameJa: string;
1314
- /**
1315
- * Romaji name of the series
1316
- */
1317
- nameRomaji: string;
1318
- /**
1319
- * English name of the series
1320
- */
1321
- nameEn: string;
1322
- /**
1323
- * All media in the series, sorted by position
1324
- */
1325
- media: Array<{
1326
- /**
1327
- * Position in the series (1-indexed)
1328
- */
1329
- position?: number;
1330
- media?: Media;
1331
- }>;
1332
- };
1333
- /**
1334
- * Anime character
1335
- */
1336
- export type Character = {
1337
- /**
1338
- * AniList character ID
1339
- */
1340
- id: number;
1341
- /**
1342
- * Japanese name of the character
1343
- */
1344
- nameJa: string;
1345
- /**
1346
- * English name of the character
1347
- */
1348
- nameEn: string;
1349
- /**
1350
- * Character image URL
1351
- */
1352
- imageUrl: string;
1353
- };
1354
- /**
1355
- * Character with voice actor and all media appearances
1356
- */
1357
- export type CharacterWithMedia = Character & {
1358
- seiyuu: Seiyuu;
1359
- /**
1360
- * All media this character appears in
1361
- */
1362
- mediaAppearances: Array<{
1363
- media?: Media;
1374
+ content?: string;
1364
1375
  /**
1365
- * Character role in this media
1376
+ * Whether the English translation was machine-translated
1366
1377
  */
1367
- role?: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
1368
- }>;
1369
- };
1370
- /**
1371
- * Seiyuu details with optional character appearances
1372
- */
1373
- export type SeiyuuWithRoles = {
1374
- /**
1375
- * AniList staff ID
1376
- */
1377
- id: number;
1378
+ isMachineTranslated?: boolean;
1379
+ };
1380
+ contentRating?: ContentRating;
1378
1381
  /**
1379
- * Japanese name of the voice actor
1382
+ * Raw WD Tagger v3 classifier output used to derive content rating
1380
1383
  */
1381
- nameJa: string;
1384
+ ratingAnalysis?: {
1385
+ [key: string]: unknown;
1386
+ };
1382
1387
  /**
1383
- * English name of the voice actor
1388
+ * POS tokenization results keyed by engine (sudachi, unidic)
1384
1389
  */
1385
- nameEn: string;
1390
+ posAnalysis?: {
1391
+ [key: string]: unknown;
1392
+ };
1386
1393
  /**
1387
- * Profile image URL
1394
+ * Storage backend for segment assets
1388
1395
  */
1389
- imageUrl: string;
1396
+ storage: 'LOCAL' | 'R2';
1390
1397
  /**
1391
- * Characters voiced by this seiyuu with their media appearances
1398
+ * Hash identifier for the segment (from segment JSON)
1392
1399
  */
1393
- characters: Array<Character & {
1394
- media: Media;
1395
- /**
1396
- * Character role in this media
1397
- */
1398
- role: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
1399
- }>;
1400
+ hashedId: string;
1400
1401
  };
1401
1402
  export type UserQuotaResponse = {
1402
1403
  /**
@@ -1434,37 +1435,53 @@ export type ReportTargetMedia = {
1434
1435
  */
1435
1436
  mediaId: number;
1436
1437
  };
1437
- export type ReportTargetEpisode = {
1438
+ export type ReportTargetSegment = {
1438
1439
  /**
1439
1440
  * Report target type
1440
1441
  */
1441
- type: 'EPISODE';
1442
+ type: 'SEGMENT';
1442
1443
  /**
1443
1444
  * Media ID this report targets
1444
1445
  */
1445
1446
  mediaId: number;
1446
1447
  /**
1447
- * Episode number this report targets
1448
+ * Episode number containing the segment
1448
1449
  */
1449
- episodeNumber: number;
1450
+ episodeNumber?: number;
1451
+ /**
1452
+ * Segment UUID this report targets
1453
+ */
1454
+ segmentUuid: string;
1450
1455
  };
1451
- export type ReportTargetSegment = {
1456
+ export type UserReportTarget = ({
1457
+ type: 'MEDIA';
1458
+ } & ReportTargetMedia) | ({
1459
+ type: 'SEGMENT';
1460
+ } & ReportTargetSegment);
1461
+ export type CreateReportRequest = {
1462
+ target: UserReportTarget;
1463
+ /**
1464
+ * Reason for the report
1465
+ */
1466
+ reason: 'WRONG_TRANSLATION' | 'WRONG_TIMING' | 'WRONG_AUDIO' | 'NSFW_NOT_TAGGED' | 'DUPLICATE_SEGMENT' | 'WRONG_METADATA' | 'MISSING_EPISODES' | 'WRONG_COVER_IMAGE' | 'INAPPROPRIATE_CONTENT' | 'OTHER';
1467
+ /**
1468
+ * Optional description with additional details
1469
+ */
1470
+ description?: string;
1471
+ };
1472
+ export type ReportTargetEpisode = {
1452
1473
  /**
1453
1474
  * Report target type
1454
1475
  */
1455
- type: 'SEGMENT';
1476
+ type: 'EPISODE';
1456
1477
  /**
1457
1478
  * Media ID this report targets
1458
1479
  */
1459
1480
  mediaId: number;
1460
1481
  /**
1461
- * Episode number containing the segment
1462
- */
1463
- episodeNumber?: number;
1464
- /**
1465
- * Segment UUID this report targets
1482
+ * Episode number this report targets
1466
1483
  */
1467
- segmentUuid: string;
1484
+ episodeNumber: number;
1468
1485
  };
1469
1486
  export type ReportTarget = ({
1470
1487
  type: 'MEDIA';
@@ -1484,9 +1501,9 @@ export type Report = {
1484
1501
  source: 'USER' | 'AUTO';
1485
1502
  target: ReportTarget;
1486
1503
  /**
1487
- * ID of the auto-check run that created this report (AUTO only)
1504
+ * ID of the audit run that created this report (AUTO only)
1488
1505
  */
1489
- reviewCheckRunId?: number;
1506
+ auditRunId: number;
1490
1507
  /**
1491
1508
  * Reason for the report
1492
1509
  */
@@ -1494,11 +1511,11 @@ export type Report = {
1494
1511
  /**
1495
1512
  * Optional description with additional details
1496
1513
  */
1497
- description?: string;
1514
+ description: string;
1498
1515
  /**
1499
1516
  * Check-specific metrics (AUTO reports) or null (USER reports)
1500
1517
  */
1501
- data?: {
1518
+ data: {
1502
1519
  [key: string]: unknown;
1503
1520
  };
1504
1521
  /**
@@ -1508,11 +1525,11 @@ export type Report = {
1508
1525
  /**
1509
1526
  * Notes from the admin who reviewed the report
1510
1527
  */
1511
- adminNotes?: string;
1528
+ adminNotes: string;
1512
1529
  /**
1513
1530
  * ID of the user who submitted the report (USER reports only)
1514
1531
  */
1515
- userId?: number;
1532
+ userId: number;
1516
1533
  /**
1517
1534
  * When the report was created
1518
1535
  */
@@ -1520,35 +1537,9 @@ export type Report = {
1520
1537
  /**
1521
1538
  * When the report was last updated
1522
1539
  */
1523
- updatedAt?: string;
1524
- };
1525
- export type ReportListResponse = {
1526
- reports: Array<Report>;
1527
- pagination: CursorPagination;
1528
- };
1529
- export type UserReportTarget = ({
1530
- type: 'MEDIA';
1531
- } & ReportTargetMedia) | ({
1532
- type: 'SEGMENT';
1533
- } & ReportTargetSegment);
1534
- export type CreateReportRequest = {
1535
- target: UserReportTarget;
1536
- /**
1537
- * Reason for the report
1538
- */
1539
- reason: 'WRONG_TRANSLATION' | 'WRONG_TIMING' | 'WRONG_AUDIO' | 'NSFW_NOT_TAGGED' | 'DUPLICATE_SEGMENT' | 'WRONG_METADATA' | 'MISSING_EPISODES' | 'WRONG_COVER_IMAGE' | 'INAPPROPRIATE_CONTENT' | 'OTHER';
1540
- /**
1541
- * Optional description with additional details
1542
- */
1543
- description?: string;
1540
+ updatedAt: string;
1544
1541
  };
1545
1542
  export type UserPreferences = {
1546
- /**
1547
- * Lab feature opt-in flags keyed by feature key
1548
- */
1549
- labs?: {
1550
- [key: string]: boolean;
1551
- };
1552
1543
  /**
1553
1544
  * Preferred language for media names display
1554
1545
  */
@@ -1595,17 +1586,27 @@ export type UserPreferences = {
1595
1586
  /**
1596
1587
  * Type of user activity
1597
1588
  */
1598
- export type ActivityType = 'SEARCH' | 'ANKI_EXPORT' | 'SEGMENT_PLAY' | 'LIST_ADD_SEGMENT';
1589
+ export type ActivityType = 'SEARCH' | 'ANKI_EXPORT' | 'SEGMENT_PLAY' | 'LIST_ADD_SEGMENT' | 'SHARE';
1599
1590
  export type UserActivity = {
1600
1591
  id: number;
1601
1592
  activityType: ActivityType;
1602
- segmentUuid?: string;
1603
- mediaId?: number;
1604
- searchQuery?: string;
1605
- animeName?: string;
1606
- japaneseText?: string;
1593
+ segmentUuid: string;
1594
+ mediaId: number;
1595
+ searchQuery: string;
1596
+ mediaName: string;
1597
+ japaneseText: string;
1607
1598
  createdAt: string;
1608
1599
  };
1600
+ /**
1601
+ * Activity counts for a single day, broken down by type. Only types with at least 1 event are present.
1602
+ */
1603
+ export type HeatmapDayCounts = {
1604
+ SEARCH?: number;
1605
+ SEGMENT_PLAY?: number;
1606
+ ANKI_EXPORT?: number;
1607
+ LIST_ADD_SEGMENT?: number;
1608
+ SHARE?: number;
1609
+ };
1609
1610
  /**
1610
1611
  * User segment collection
1611
1612
  */
@@ -1618,10 +1619,6 @@ export type Collection = {
1618
1619
  * Name of the collection
1619
1620
  */
1620
1621
  name: string;
1621
- /**
1622
- * User ID who owns the collection
1623
- */
1624
- userId: number;
1625
1622
  /**
1626
1623
  * Visibility of the collection
1627
1624
  */
@@ -1629,15 +1626,15 @@ export type Collection = {
1629
1626
  /**
1630
1627
  * Number of segments in the collection
1631
1628
  */
1632
- segmentCount?: number;
1629
+ segmentCount: number;
1633
1630
  /**
1634
1631
  * When the collection was created
1635
1632
  */
1636
- createdAt?: string;
1633
+ createdAt: string;
1637
1634
  /**
1638
1635
  * When the collection was last updated
1639
1636
  */
1640
- updatedAt?: string;
1637
+ updatedAt: string;
1641
1638
  };
1642
1639
  export type UserExportCollection = Collection & {
1643
1640
  /**
@@ -1662,32 +1659,32 @@ export type UserExportResponse = {
1662
1659
  };
1663
1660
  export type UserLabFeature = {
1664
1661
  /**
1665
- * Unique identifier for the lab feature
1662
+ * Unique identifier for the feature
1666
1663
  */
1667
1664
  key: string;
1668
1665
  /**
1669
- * Human-readable feature name
1666
+ * Human-readable feature name (only present for labs)
1670
1667
  */
1671
- name: string;
1668
+ name?: string;
1672
1669
  /**
1673
- * Description of what the feature does
1670
+ * Description of what the feature does (only present for labs)
1674
1671
  */
1675
- description: string;
1672
+ description?: string;
1676
1673
  /**
1677
- * Whether the feature is globally available
1674
+ * Whether this feature is currently active for the user
1678
1675
  */
1679
- enabled: boolean;
1676
+ active: boolean;
1680
1677
  /**
1681
- * Whether the user has opted in to this feature
1678
+ * Whether the user can toggle this feature (lab=true, flag=false)
1682
1679
  */
1683
- userEnabled: boolean;
1680
+ userControllable: boolean;
1684
1681
  };
1685
1682
  /**
1686
1683
  * Paginated collection list response
1687
1684
  */
1688
1685
  export type CollectionListResponse = {
1689
1686
  collections: Array<Collection>;
1690
- pagination: CursorPagination;
1687
+ pagination: OpaqueCursorPagination;
1691
1688
  };
1692
1689
  /**
1693
1690
  * Request body for creating a new collection
@@ -1714,14 +1711,22 @@ export type CollectionWithSegments = {
1714
1711
  * Name of the collection
1715
1712
  */
1716
1713
  name: string;
1717
- /**
1718
- * User ID who owns the collection
1719
- */
1720
- userId: number;
1721
1714
  /**
1722
1715
  * Visibility of the collection
1723
1716
  */
1724
1717
  visibility: 'PUBLIC' | 'PRIVATE';
1718
+ /**
1719
+ * Number of segments in the collection
1720
+ */
1721
+ segmentCount: number;
1722
+ /**
1723
+ * When the collection was created
1724
+ */
1725
+ createdAt: string;
1726
+ /**
1727
+ * When the collection was last updated
1728
+ */
1729
+ updatedAt: string;
1725
1730
  /**
1726
1731
  * Saved segments with their search result data
1727
1732
  */
@@ -1729,18 +1734,18 @@ export type CollectionWithSegments = {
1729
1734
  /**
1730
1735
  * Position in the collection
1731
1736
  */
1732
- position?: number;
1737
+ position: number;
1733
1738
  /**
1734
1739
  * User annotation
1735
1740
  */
1736
- note?: string;
1737
- result?: Segment;
1741
+ note: string;
1742
+ result: Segment;
1738
1743
  }>;
1739
- includes?: {
1744
+ includes: {
1740
1745
  /**
1741
1746
  * Media objects keyed by mediaId
1742
1747
  */
1743
- media?: {
1748
+ media: {
1744
1749
  [key: string]: Media;
1745
1750
  };
1746
1751
  };
@@ -1748,7 +1753,7 @@ export type CollectionWithSegments = {
1748
1753
  * Total number of segments in the collection
1749
1754
  */
1750
1755
  totalCount: number;
1751
- pagination: CursorPagination;
1756
+ pagination: OpaqueCursorPagination;
1752
1757
  };
1753
1758
  /**
1754
1759
  * Request to reindex segments from the database into Elasticsearch
@@ -1778,44 +1783,44 @@ export type ReindexResponse = {
1778
1783
  /**
1779
1784
  * Whether the reindex operation completed successfully
1780
1785
  */
1781
- success?: boolean;
1786
+ success: boolean;
1782
1787
  /**
1783
1788
  * Human-readable message about the reindex operation
1784
1789
  */
1785
- message?: string;
1790
+ message: string;
1786
1791
  /**
1787
1792
  * Statistics about the reindex operation
1788
1793
  */
1789
- stats?: {
1794
+ stats: {
1790
1795
  /**
1791
1796
  * Total number of segments processed
1792
1797
  */
1793
- totalSegments?: number;
1798
+ totalSegments: number;
1794
1799
  /**
1795
1800
  * Number of segments successfully indexed
1796
1801
  */
1797
- successfulIndexes?: number;
1802
+ successfulIndexes: number;
1798
1803
  /**
1799
1804
  * Number of segments that failed to index
1800
1805
  */
1801
- failedIndexes?: number;
1806
+ failedIndexes: number;
1802
1807
  /**
1803
1808
  * Number of media items processed
1804
1809
  */
1805
- mediaProcessed?: number;
1810
+ mediaProcessed: number;
1806
1811
  };
1807
1812
  /**
1808
1813
  * Array of errors that occurred during reindexing (if any)
1809
1814
  */
1810
- errors?: Array<{
1815
+ errors: Array<{
1811
1816
  /**
1812
1817
  * ID of the segment that failed
1813
1818
  */
1814
- segmentId?: number;
1819
+ segmentId: number;
1815
1820
  /**
1816
1821
  * Error message
1817
1822
  */
1818
- error?: string;
1823
+ error: string;
1819
1824
  }>;
1820
1825
  };
1821
1826
  export type AdminReport = Report & {
@@ -1830,7 +1835,7 @@ export type AdminReport = Report & {
1830
1835
  };
1831
1836
  export type AdminReportListResponse = {
1832
1837
  reports: Array<AdminReport>;
1833
- pagination: CursorPagination;
1838
+ pagination: OpaqueCursorPagination;
1834
1839
  };
1835
1840
  export type UpdateReportRequest = {
1836
1841
  /**
@@ -1842,41 +1847,13 @@ export type UpdateReportRequest = {
1842
1847
  */
1843
1848
  adminNotes?: string;
1844
1849
  };
1845
- export type RunReviewResponse = {
1846
- /**
1847
- * Category filter used
1848
- */
1849
- category: string;
1850
- checksRun: Array<{
1851
- /**
1852
- * Check identifier
1853
- */
1854
- checkName: string;
1855
- /**
1856
- * Human-readable check name
1857
- */
1858
- label: string;
1859
- /**
1860
- * Number of reports created
1861
- */
1862
- resultCount: number;
1863
- /**
1864
- * ID of the created run record
1865
- */
1866
- runId: number;
1867
- }>;
1868
- /**
1869
- * Total reports created across all checks
1870
- */
1871
- totalReports: number;
1872
- };
1873
- export type ReviewCheck = {
1850
+ export type MediaAudit = {
1874
1851
  /**
1875
- * Check ID
1852
+ * Audit ID
1876
1853
  */
1877
1854
  id: number;
1878
1855
  /**
1879
- * Unique check identifier
1856
+ * Unique audit identifier
1880
1857
  */
1881
1858
  name: string;
1882
1859
  /**
@@ -1884,11 +1861,11 @@ export type ReviewCheck = {
1884
1861
  */
1885
1862
  label: string;
1886
1863
  /**
1887
- * What this check does
1864
+ * What this audit does
1888
1865
  */
1889
1866
  description: string;
1890
1867
  /**
1891
- * What level this check operates on
1868
+ * What level this audit operates on
1892
1869
  */
1893
1870
  targetType: 'MEDIA' | 'EPISODE';
1894
1871
  /**
@@ -1898,40 +1875,68 @@ export type ReviewCheck = {
1898
1875
  [key: string]: unknown;
1899
1876
  };
1900
1877
  /**
1901
- * Whether this check is active
1878
+ * Whether this audit is active
1902
1879
  */
1903
1880
  enabled: boolean;
1904
1881
  /**
1905
1882
  * Schema for threshold fields (from registry)
1906
1883
  */
1907
- thresholdSchema?: Array<{
1908
- key?: string;
1909
- label?: string;
1910
- type?: 'number' | 'boolean';
1911
- default?: number | boolean;
1884
+ thresholdSchema: Array<{
1885
+ key: string;
1886
+ label: string;
1887
+ type: 'number' | 'boolean';
1888
+ default: number | boolean;
1912
1889
  min?: number;
1913
1890
  max?: number;
1914
1891
  }>;
1915
1892
  /**
1916
- * Latest run info for this check
1893
+ * Latest run info for this audit
1917
1894
  */
1918
- latestRun?: {
1919
- id?: number;
1920
- resultCount?: number;
1921
- createdAt?: string;
1895
+ latestRun: {
1896
+ id: number;
1897
+ resultCount: number;
1898
+ createdAt: string;
1922
1899
  };
1923
- createdAt?: string;
1924
- updatedAt?: string;
1900
+ createdAt: string;
1901
+ updatedAt: string;
1902
+ };
1903
+ export type RunAuditResponse = {
1904
+ /**
1905
+ * Category filter used
1906
+ */
1907
+ category: string;
1908
+ checksRun: Array<{
1909
+ /**
1910
+ * Audit identifier
1911
+ */
1912
+ auditName: string;
1913
+ /**
1914
+ * Human-readable audit name
1915
+ */
1916
+ label: string;
1917
+ /**
1918
+ * Number of reports created
1919
+ */
1920
+ resultCount: number;
1921
+ /**
1922
+ * ID of the created run record
1923
+ */
1924
+ runId: number;
1925
+ }>;
1926
+ /**
1927
+ * Total reports created across all audits
1928
+ */
1929
+ totalReports: number;
1925
1930
  };
1926
- export type ReviewCheckRun = {
1931
+ export type MediaAuditRun = {
1927
1932
  /**
1928
1933
  * Run ID
1929
1934
  */
1930
1935
  id: number;
1931
1936
  /**
1932
- * Name of the check that was run
1937
+ * Name of the audit that was run
1933
1938
  */
1934
- checkName: string;
1939
+ auditName: string;
1935
1940
  /**
1936
1941
  * Category filter used (ANIME/JDRAMA) or null for all
1937
1942
  */
@@ -1951,32 +1956,6 @@ export type ReviewCheckRun = {
1951
1956
  */
1952
1957
  createdAt: string;
1953
1958
  };
1954
- export type ReviewAllowlist = {
1955
- /**
1956
- * Allowlist entry ID
1957
- */
1958
- id: number;
1959
- /**
1960
- * Name of the check this entry applies to
1961
- */
1962
- checkName: string;
1963
- /**
1964
- * Media ID to exclude
1965
- */
1966
- mediaId: number;
1967
- /**
1968
- * Episode number to exclude (null for media-level checks)
1969
- */
1970
- episodeNumber?: number;
1971
- /**
1972
- * Why this was allowlisted
1973
- */
1974
- reason?: string;
1975
- /**
1976
- * When this entry was created
1977
- */
1978
- createdAt: string;
1979
- };
1980
1959
  export type SearchData = {
1981
1960
  body?: SearchRequest;
1982
1961
  path?: never;
@@ -1989,7 +1968,7 @@ export type SearchErrors = {
1989
1968
  */
1990
1969
  400: Error400;
1991
1970
  /**
1992
- * Unauthorized
1971
+ * Unauthorized (API key)
1993
1972
  */
1994
1973
  401: Error401;
1995
1974
  /**
@@ -2025,7 +2004,7 @@ export type GetSearchStatsErrors = {
2025
2004
  */
2026
2005
  400: Error400;
2027
2006
  /**
2028
- * Unauthorized
2007
+ * Unauthorized (API key)
2029
2008
  */
2030
2009
  401: Error401;
2031
2010
  /**
@@ -2061,7 +2040,7 @@ export type SearchWordsErrors = {
2061
2040
  */
2062
2041
  400: Error400;
2063
2042
  /**
2064
- * Unauthorized
2043
+ * Unauthorized (API key)
2065
2044
  */
2066
2045
  401: Error401;
2067
2046
  /**
@@ -2092,11 +2071,11 @@ export type ListMediaData = {
2092
2071
  /**
2093
2072
  * Number of results per page
2094
2073
  */
2095
- limit?: number;
2074
+ take?: number;
2096
2075
  /**
2097
- * Pagination cursor offset
2076
+ * Opaque pagination cursor token
2098
2077
  */
2099
- cursor?: number;
2078
+ cursor?: string;
2100
2079
  /**
2101
2080
  * Filter by media category
2102
2081
  */
@@ -2106,7 +2085,7 @@ export type ListMediaData = {
2106
2085
  */
2107
2086
  query?: string;
2108
2087
  /**
2109
- * Resources to expand in the media response (`media.characters` implies `media`)
2088
+ * Resources to expand in the media response
2110
2089
  */
2111
2090
  include?: Array<MediaIncludeExpansion>;
2112
2091
  };
@@ -2118,7 +2097,7 @@ export type ListMediaErrors = {
2118
2097
  */
2119
2098
  400: Error400;
2120
2099
  /**
2121
- * Unauthorized
2100
+ * Unauthorized (API key)
2122
2101
  */
2123
2102
  401: Error401;
2124
2103
  /**
@@ -2154,7 +2133,7 @@ export type CreateMediaErrors = {
2154
2133
  */
2155
2134
  400: Error400;
2156
2135
  /**
2157
- * Unauthorized
2136
+ * Unauthorized (API key)
2158
2137
  */
2159
2138
  401: Error401;
2160
2139
  /**
@@ -2193,7 +2172,7 @@ export type AutocompleteMediaData = {
2193
2172
  /**
2194
2173
  * Maximum number of results to return
2195
2174
  */
2196
- limit?: number;
2175
+ take?: number;
2197
2176
  /**
2198
2177
  * Filter by media category
2199
2178
  */
@@ -2207,13 +2186,63 @@ export type AutocompleteMediaErrors = {
2207
2186
  */
2208
2187
  400: Error400;
2209
2188
  /**
2210
- * Unauthorized
2189
+ * Unauthorized (API key)
2190
+ */
2191
+ 401: Error401;
2192
+ /**
2193
+ * Forbidden
2194
+ */
2195
+ 403: Error403;
2196
+ /**
2197
+ * Too Many Requests
2198
+ */
2199
+ 429: Error429;
2200
+ /**
2201
+ * Internal Server Error
2202
+ */
2203
+ 500: Error500;
2204
+ };
2205
+ export type AutocompleteMediaError = AutocompleteMediaErrors[keyof AutocompleteMediaErrors];
2206
+ export type AutocompleteMediaResponses = {
2207
+ /**
2208
+ * OK
2209
+ */
2210
+ 200: MediaAutocompleteResponse;
2211
+ };
2212
+ export type AutocompleteMediaResponse = AutocompleteMediaResponses[keyof AutocompleteMediaResponses];
2213
+ export type GetSegmentByUuidData = {
2214
+ body?: never;
2215
+ path: {
2216
+ /**
2217
+ * Segment UUID
2218
+ */
2219
+ uuid: string;
2220
+ };
2221
+ query?: {
2222
+ /**
2223
+ * Additional internal fields to include in the response
2224
+ */
2225
+ include?: Array<'ratingAnalysis' | 'posAnalysis' | 'hashedId' | 'storageBasePath' | 'storage'>;
2226
+ };
2227
+ url: '/v1/media/segments/{uuid}';
2228
+ };
2229
+ export type GetSegmentByUuidErrors = {
2230
+ /**
2231
+ * Bad Request
2232
+ */
2233
+ 400: Error400;
2234
+ /**
2235
+ * Unauthorized (API key or session)
2211
2236
  */
2212
2237
  401: Error401;
2213
2238
  /**
2214
2239
  * Forbidden
2215
2240
  */
2216
- 403: Error403;
2241
+ 403: Error403;
2242
+ /**
2243
+ * Not Found
2244
+ */
2245
+ 404: Error404;
2217
2246
  /**
2218
2247
  * Too Many Requests
2219
2248
  */
@@ -2223,32 +2252,32 @@ export type AutocompleteMediaErrors = {
2223
2252
  */
2224
2253
  500: Error500;
2225
2254
  };
2226
- export type AutocompleteMediaError = AutocompleteMediaErrors[keyof AutocompleteMediaErrors];
2227
- export type AutocompleteMediaResponses = {
2255
+ export type GetSegmentByUuidError = GetSegmentByUuidErrors[keyof GetSegmentByUuidErrors];
2256
+ export type GetSegmentByUuidResponses = {
2228
2257
  /**
2229
- * OK
2258
+ * Single segment response with internal fields
2230
2259
  */
2231
- 200: MediaAutocompleteResponse;
2260
+ 200: SegmentInternal;
2232
2261
  };
2233
- export type AutocompleteMediaResponse = AutocompleteMediaResponses[keyof AutocompleteMediaResponses];
2234
- export type DeleteMediaData = {
2235
- body?: never;
2262
+ export type GetSegmentByUuidResponse = GetSegmentByUuidResponses[keyof GetSegmentByUuidResponses];
2263
+ export type UpdateSegmentByUuidData = {
2264
+ body: SegmentUpdateRequest;
2236
2265
  path: {
2237
2266
  /**
2238
- * Media ID
2267
+ * Segment UUID
2239
2268
  */
2240
- id: number;
2269
+ uuid: string;
2241
2270
  };
2242
2271
  query?: never;
2243
- url: '/v1/media/{id}';
2272
+ url: '/v1/media/segments/{uuid}';
2244
2273
  };
2245
- export type DeleteMediaErrors = {
2274
+ export type UpdateSegmentByUuidErrors = {
2246
2275
  /**
2247
2276
  * Bad Request
2248
2277
  */
2249
2278
  400: Error400;
2250
2279
  /**
2251
- * Unauthorized
2280
+ * Unauthorized (API key or session)
2252
2281
  */
2253
2282
  401: Error401;
2254
2283
  /**
@@ -2268,37 +2297,41 @@ export type DeleteMediaErrors = {
2268
2297
  */
2269
2298
  500: Error500;
2270
2299
  };
2271
- export type DeleteMediaError = DeleteMediaErrors[keyof DeleteMediaErrors];
2272
- export type DeleteMediaResponses = {
2300
+ export type UpdateSegmentByUuidError = UpdateSegmentByUuidErrors[keyof UpdateSegmentByUuidErrors];
2301
+ export type UpdateSegmentByUuidResponses = {
2273
2302
  /**
2274
- * No Content
2303
+ * Single segment response with internal fields
2275
2304
  */
2276
- 204: void;
2305
+ 200: SegmentInternal;
2277
2306
  };
2278
- export type DeleteMediaResponse = DeleteMediaResponses[keyof DeleteMediaResponses];
2279
- export type GetMediaData = {
2307
+ export type UpdateSegmentByUuidResponse = UpdateSegmentByUuidResponses[keyof UpdateSegmentByUuidResponses];
2308
+ export type GetSegmentContextData = {
2280
2309
  body?: never;
2281
2310
  path: {
2282
2311
  /**
2283
- * Media ID
2312
+ * Segment UUID
2284
2313
  */
2285
- id: number;
2314
+ uuid: string;
2286
2315
  };
2287
2316
  query?: {
2288
2317
  /**
2289
- * Resources to expand in the media response (`media.characters` implies `media`)
2318
+ * Number of segments to return before and after the target
2290
2319
  */
2291
- include?: Array<MediaIncludeExpansion>;
2320
+ take?: number;
2321
+ /**
2322
+ * Content ratings to include (omit for all ratings)
2323
+ */
2324
+ contentRating?: Array<ContentRating>;
2292
2325
  };
2293
- url: '/v1/media/{id}';
2326
+ url: '/v1/media/segments/{uuid}/context';
2294
2327
  };
2295
- export type GetMediaErrors = {
2328
+ export type GetSegmentContextErrors = {
2296
2329
  /**
2297
2330
  * Bad Request
2298
2331
  */
2299
2332
  400: Error400;
2300
2333
  /**
2301
- * Unauthorized
2334
+ * Unauthorized (API key or session)
2302
2335
  */
2303
2336
  401: Error401;
2304
2337
  /**
@@ -2318,42 +2351,46 @@ export type GetMediaErrors = {
2318
2351
  */
2319
2352
  500: Error500;
2320
2353
  };
2321
- export type GetMediaError = GetMediaErrors[keyof GetMediaErrors];
2322
- export type GetMediaResponses = {
2354
+ export type GetSegmentContextError = GetSegmentContextErrors[keyof GetSegmentContextErrors];
2355
+ export type GetSegmentContextResponses = {
2323
2356
  /**
2324
2357
  * OK
2325
2358
  */
2326
- 200: Media;
2359
+ 200: SegmentContextResponse;
2327
2360
  };
2328
- export type GetMediaResponse = GetMediaResponses[keyof GetMediaResponses];
2329
- export type UpdateMediaData = {
2330
- body: MediaUpdateRequest;
2331
- path: {
2361
+ export type GetSegmentContextResponse = GetSegmentContextResponses[keyof GetSegmentContextResponses];
2362
+ export type ListSeriesData = {
2363
+ body?: never;
2364
+ path?: never;
2365
+ query?: {
2332
2366
  /**
2333
- * Media ID
2367
+ * Number of results per page
2334
2368
  */
2335
- id: number;
2369
+ take?: number;
2370
+ /**
2371
+ * Opaque pagination cursor token
2372
+ */
2373
+ cursor?: string;
2374
+ /**
2375
+ * Case-insensitive search across English, Japanese, and Romaji names
2376
+ */
2377
+ query?: string;
2336
2378
  };
2337
- query?: never;
2338
- url: '/v1/media/{id}';
2379
+ url: '/v1/media/series';
2339
2380
  };
2340
- export type UpdateMediaErrors = {
2381
+ export type ListSeriesErrors = {
2341
2382
  /**
2342
2383
  * Bad Request
2343
2384
  */
2344
2385
  400: Error400;
2345
2386
  /**
2346
- * Unauthorized
2387
+ * Unauthorized (API key)
2347
2388
  */
2348
2389
  401: Error401;
2349
2390
  /**
2350
2391
  * Forbidden
2351
2392
  */
2352
2393
  403: Error403;
2353
- /**
2354
- * Not Found
2355
- */
2356
- 404: Error404;
2357
2394
  /**
2358
2395
  * Too Many Requests
2359
2396
  */
@@ -2363,51 +2400,46 @@ export type UpdateMediaErrors = {
2363
2400
  */
2364
2401
  500: Error500;
2365
2402
  };
2366
- export type UpdateMediaError = UpdateMediaErrors[keyof UpdateMediaErrors];
2367
- export type UpdateMediaResponses = {
2403
+ export type ListSeriesError = ListSeriesErrors[keyof ListSeriesErrors];
2404
+ export type ListSeriesResponses = {
2368
2405
  /**
2369
2406
  * OK
2370
2407
  */
2371
- 200: Media;
2408
+ 200: SeriesListResponse;
2372
2409
  };
2373
- export type UpdateMediaResponse = UpdateMediaResponses[keyof UpdateMediaResponses];
2374
- export type ListEpisodesData = {
2375
- body?: never;
2376
- path: {
2410
+ export type ListSeriesResponse = ListSeriesResponses[keyof ListSeriesResponses];
2411
+ export type CreateSeriesData = {
2412
+ body: {
2377
2413
  /**
2378
- * ID of the media
2414
+ * Japanese name of the series
2379
2415
  */
2380
- mediaId: number;
2381
- };
2382
- query?: {
2416
+ nameJa: string;
2383
2417
  /**
2384
- * Maximum number of episodes to return
2418
+ * Romaji name of the series
2385
2419
  */
2386
- limit?: number;
2420
+ nameRomaji: string;
2387
2421
  /**
2388
- * Episode number to start from (for pagination)
2422
+ * English name of the series
2389
2423
  */
2390
- cursor?: number;
2424
+ nameEn: string;
2391
2425
  };
2392
- url: '/v1/media/{mediaId}/episodes';
2426
+ path?: never;
2427
+ query?: never;
2428
+ url: '/v1/media/series';
2393
2429
  };
2394
- export type ListEpisodesErrors = {
2430
+ export type CreateSeriesErrors = {
2395
2431
  /**
2396
2432
  * Bad Request
2397
2433
  */
2398
2434
  400: Error400;
2399
2435
  /**
2400
- * Unauthorized
2436
+ * Unauthorized (API key)
2401
2437
  */
2402
2438
  401: Error401;
2403
2439
  /**
2404
2440
  * Forbidden
2405
2441
  */
2406
2442
  403: Error403;
2407
- /**
2408
- * Not Found
2409
- */
2410
- 404: Error404;
2411
2443
  /**
2412
2444
  * Too Many Requests
2413
2445
  */
@@ -2417,32 +2449,32 @@ export type ListEpisodesErrors = {
2417
2449
  */
2418
2450
  500: Error500;
2419
2451
  };
2420
- export type ListEpisodesError = ListEpisodesErrors[keyof ListEpisodesErrors];
2421
- export type ListEpisodesResponses = {
2452
+ export type CreateSeriesError = CreateSeriesErrors[keyof CreateSeriesErrors];
2453
+ export type CreateSeriesResponses = {
2422
2454
  /**
2423
- * Paginated list of episodes
2455
+ * Created
2424
2456
  */
2425
- 200: EpisodeListResponse;
2457
+ 201: Series;
2426
2458
  };
2427
- export type ListEpisodesResponse = ListEpisodesResponses[keyof ListEpisodesResponses];
2428
- export type CreateEpisodeData = {
2429
- body: EpisodeCreateRequest;
2459
+ export type CreateSeriesResponse = CreateSeriesResponses[keyof CreateSeriesResponses];
2460
+ export type DeleteSeriesData = {
2461
+ body?: never;
2430
2462
  path: {
2431
2463
  /**
2432
- * ID of the media
2464
+ * Series ID
2433
2465
  */
2434
- mediaId: number;
2466
+ id: number;
2435
2467
  };
2436
2468
  query?: never;
2437
- url: '/v1/media/{mediaId}/episodes';
2469
+ url: '/v1/media/series/{id}';
2438
2470
  };
2439
- export type CreateEpisodeErrors = {
2471
+ export type DeleteSeriesErrors = {
2440
2472
  /**
2441
2473
  * Bad Request
2442
2474
  */
2443
2475
  400: Error400;
2444
2476
  /**
2445
- * Unauthorized
2477
+ * Unauthorized (API key)
2446
2478
  */
2447
2479
  401: Error401;
2448
2480
  /**
@@ -2453,10 +2485,6 @@ export type CreateEpisodeErrors = {
2453
2485
  * Not Found
2454
2486
  */
2455
2487
  404: Error404;
2456
- /**
2457
- * Conflict
2458
- */
2459
- 409: Error409;
2460
2488
  /**
2461
2489
  * Too Many Requests
2462
2490
  */
@@ -2466,36 +2494,37 @@ export type CreateEpisodeErrors = {
2466
2494
  */
2467
2495
  500: Error500;
2468
2496
  };
2469
- export type CreateEpisodeError = CreateEpisodeErrors[keyof CreateEpisodeErrors];
2470
- export type CreateEpisodeResponses = {
2497
+ export type DeleteSeriesError = DeleteSeriesErrors[keyof DeleteSeriesErrors];
2498
+ export type DeleteSeriesResponses = {
2471
2499
  /**
2472
- * Single episode response
2500
+ * No Content
2473
2501
  */
2474
- 201: Episode;
2502
+ 204: void;
2475
2503
  };
2476
- export type CreateEpisodeResponse = CreateEpisodeResponses[keyof CreateEpisodeResponses];
2477
- export type DeleteEpisodeData = {
2504
+ export type DeleteSeriesResponse = DeleteSeriesResponses[keyof DeleteSeriesResponses];
2505
+ export type GetSeriesData = {
2478
2506
  body?: never;
2479
2507
  path: {
2480
2508
  /**
2481
- * ID of the media
2509
+ * Series ID
2482
2510
  */
2483
- mediaId: number;
2511
+ id: number;
2512
+ };
2513
+ query?: {
2484
2514
  /**
2485
- * Episode number
2515
+ * Resources to expand in the series response
2486
2516
  */
2487
- episodeNumber: number;
2517
+ include?: Array<MediaIncludeExpansion>;
2488
2518
  };
2489
- query?: never;
2490
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
2519
+ url: '/v1/media/series/{id}';
2491
2520
  };
2492
- export type DeleteEpisodeErrors = {
2521
+ export type GetSeriesErrors = {
2493
2522
  /**
2494
2523
  * Bad Request
2495
2524
  */
2496
2525
  400: Error400;
2497
2526
  /**
2498
- * Unauthorized
2527
+ * Unauthorized (API key)
2499
2528
  */
2500
2529
  401: Error401;
2501
2530
  /**
@@ -2515,36 +2544,45 @@ export type DeleteEpisodeErrors = {
2515
2544
  */
2516
2545
  500: Error500;
2517
2546
  };
2518
- export type DeleteEpisodeError = DeleteEpisodeErrors[keyof DeleteEpisodeErrors];
2519
- export type DeleteEpisodeResponses = {
2547
+ export type GetSeriesError = GetSeriesErrors[keyof GetSeriesErrors];
2548
+ export type GetSeriesResponses = {
2520
2549
  /**
2521
- * Episode successfully deleted
2550
+ * OK
2522
2551
  */
2523
- 204: void;
2552
+ 200: SeriesWithMedia;
2524
2553
  };
2525
- export type DeleteEpisodeResponse = DeleteEpisodeResponses[keyof DeleteEpisodeResponses];
2526
- export type GetEpisodeData = {
2527
- body?: never;
2528
- path: {
2554
+ export type GetSeriesResponse = GetSeriesResponses[keyof GetSeriesResponses];
2555
+ export type UpdateSeriesData = {
2556
+ body: {
2529
2557
  /**
2530
- * ID of the media
2558
+ * Updated Japanese name
2531
2559
  */
2532
- mediaId: number;
2560
+ nameJa?: string;
2533
2561
  /**
2534
- * Episode number
2562
+ * Updated Romaji name
2535
2563
  */
2536
- episodeNumber: number;
2564
+ nameRomaji?: string;
2565
+ /**
2566
+ * Updated English name
2567
+ */
2568
+ nameEn?: string;
2569
+ };
2570
+ path: {
2571
+ /**
2572
+ * Series ID
2573
+ */
2574
+ id: number;
2537
2575
  };
2538
2576
  query?: never;
2539
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
2577
+ url: '/v1/media/series/{id}';
2540
2578
  };
2541
- export type GetEpisodeErrors = {
2579
+ export type UpdateSeriesErrors = {
2542
2580
  /**
2543
2581
  * Bad Request
2544
2582
  */
2545
2583
  400: Error400;
2546
2584
  /**
2547
- * Unauthorized
2585
+ * Unauthorized (API key)
2548
2586
  */
2549
2587
  401: Error401;
2550
2588
  /**
@@ -2564,36 +2602,41 @@ export type GetEpisodeErrors = {
2564
2602
  */
2565
2603
  500: Error500;
2566
2604
  };
2567
- export type GetEpisodeError = GetEpisodeErrors[keyof GetEpisodeErrors];
2568
- export type GetEpisodeResponses = {
2605
+ export type UpdateSeriesError = UpdateSeriesErrors[keyof UpdateSeriesErrors];
2606
+ export type UpdateSeriesResponses = {
2569
2607
  /**
2570
- * Single episode response
2608
+ * OK
2571
2609
  */
2572
- 200: Episode;
2610
+ 200: Series;
2573
2611
  };
2574
- export type GetEpisodeResponse = GetEpisodeResponses[keyof GetEpisodeResponses];
2575
- export type UpdateEpisodeData = {
2576
- body: EpisodeUpdateRequest;
2577
- path: {
2612
+ export type UpdateSeriesResponse = UpdateSeriesResponses[keyof UpdateSeriesResponses];
2613
+ export type AddMediaToSeriesData = {
2614
+ body: {
2578
2615
  /**
2579
- * ID of the media
2616
+ * Media ID to add
2580
2617
  */
2581
2618
  mediaId: number;
2582
2619
  /**
2583
- * Episode number
2620
+ * Position in the series (1-indexed)
2584
2621
  */
2585
- episodeNumber: number;
2622
+ position: number;
2623
+ };
2624
+ path: {
2625
+ /**
2626
+ * Series ID
2627
+ */
2628
+ id: number;
2586
2629
  };
2587
2630
  query?: never;
2588
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
2631
+ url: '/v1/media/series/{id}/media';
2589
2632
  };
2590
- export type UpdateEpisodeErrors = {
2633
+ export type AddMediaToSeriesErrors = {
2591
2634
  /**
2592
2635
  * Bad Request
2593
2636
  */
2594
2637
  400: Error400;
2595
2638
  /**
2596
- * Unauthorized
2639
+ * Unauthorized (API key)
2597
2640
  */
2598
2641
  401: Error401;
2599
2642
  /**
@@ -2613,45 +2656,36 @@ export type UpdateEpisodeErrors = {
2613
2656
  */
2614
2657
  500: Error500;
2615
2658
  };
2616
- export type UpdateEpisodeError = UpdateEpisodeErrors[keyof UpdateEpisodeErrors];
2617
- export type UpdateEpisodeResponses = {
2659
+ export type AddMediaToSeriesError = AddMediaToSeriesErrors[keyof AddMediaToSeriesErrors];
2660
+ export type AddMediaToSeriesResponses = {
2618
2661
  /**
2619
- * Single episode response
2662
+ * No Content
2620
2663
  */
2621
- 200: Episode;
2664
+ 204: void;
2622
2665
  };
2623
- export type UpdateEpisodeResponse = UpdateEpisodeResponses[keyof UpdateEpisodeResponses];
2624
- export type ListSegmentsData = {
2625
- body?: never;
2626
- path: {
2627
- /**
2628
- * ID of the media
2629
- */
2630
- mediaId: number;
2631
- /**
2632
- * Episode number
2633
- */
2634
- episodeNumber: number;
2635
- };
2636
- query?: {
2666
+ export type AddMediaToSeriesResponse = AddMediaToSeriesResponses[keyof AddMediaToSeriesResponses];
2667
+ export type RemoveMediaFromSeriesData = {
2668
+ body?: never;
2669
+ path: {
2637
2670
  /**
2638
- * Maximum number of segments to return
2671
+ * Series ID
2639
2672
  */
2640
- limit?: number;
2673
+ id: number;
2641
2674
  /**
2642
- * Segment ID to start from (for pagination)
2675
+ * Media ID
2643
2676
  */
2644
- cursor?: number;
2677
+ mediaId: number;
2645
2678
  };
2646
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments';
2679
+ query?: never;
2680
+ url: '/v1/media/series/{id}/media/{mediaId}';
2647
2681
  };
2648
- export type ListSegmentsErrors = {
2682
+ export type RemoveMediaFromSeriesErrors = {
2649
2683
  /**
2650
2684
  * Bad Request
2651
2685
  */
2652
2686
  400: Error400;
2653
2687
  /**
2654
- * Unauthorized
2688
+ * Unauthorized (API key)
2655
2689
  */
2656
2690
  401: Error401;
2657
2691
  /**
@@ -2671,42 +2705,41 @@ export type ListSegmentsErrors = {
2671
2705
  */
2672
2706
  500: Error500;
2673
2707
  };
2674
- export type ListSegmentsError = ListSegmentsErrors[keyof ListSegmentsErrors];
2675
- export type ListSegmentsResponses = {
2708
+ export type RemoveMediaFromSeriesError = RemoveMediaFromSeriesErrors[keyof RemoveMediaFromSeriesErrors];
2709
+ export type RemoveMediaFromSeriesResponses = {
2676
2710
  /**
2677
- * Paginated segment list response
2711
+ * No Content
2678
2712
  */
2679
- 200: {
2713
+ 204: void;
2714
+ };
2715
+ export type RemoveMediaFromSeriesResponse = RemoveMediaFromSeriesResponses[keyof RemoveMediaFromSeriesResponses];
2716
+ export type UpdateSeriesMediaData = {
2717
+ body: {
2680
2718
  /**
2681
- * Array of segment objects
2719
+ * New position in the series (1-indexed)
2682
2720
  */
2683
- segments: Array<Segment>;
2684
- pagination: CursorPagination;
2721
+ position: number;
2685
2722
  };
2686
- };
2687
- export type ListSegmentsResponse = ListSegmentsResponses[keyof ListSegmentsResponses];
2688
- export type CreateSegmentData = {
2689
- body: SegmentCreateRequest;
2690
2723
  path: {
2691
2724
  /**
2692
- * ID of the media
2725
+ * Series ID
2693
2726
  */
2694
- mediaId: number;
2727
+ id: number;
2695
2728
  /**
2696
- * Episode number
2729
+ * Media ID
2697
2730
  */
2698
- episodeNumber: number;
2731
+ mediaId: number;
2699
2732
  };
2700
2733
  query?: never;
2701
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments';
2734
+ url: '/v1/media/series/{id}/media/{mediaId}';
2702
2735
  };
2703
- export type CreateSegmentErrors = {
2736
+ export type UpdateSeriesMediaErrors = {
2704
2737
  /**
2705
2738
  * Bad Request
2706
2739
  */
2707
2740
  400: Error400;
2708
2741
  /**
2709
- * Unauthorized
2742
+ * Unauthorized (API key)
2710
2743
  */
2711
2744
  401: Error401;
2712
2745
  /**
@@ -2717,10 +2750,6 @@ export type CreateSegmentErrors = {
2717
2750
  * Not Found
2718
2751
  */
2719
2752
  404: Error404;
2720
- /**
2721
- * Conflict
2722
- */
2723
- 409: Error409;
2724
2753
  /**
2725
2754
  * Too Many Requests
2726
2755
  */
@@ -2730,40 +2759,32 @@ export type CreateSegmentErrors = {
2730
2759
  */
2731
2760
  500: Error500;
2732
2761
  };
2733
- export type CreateSegmentError = CreateSegmentErrors[keyof CreateSegmentErrors];
2734
- export type CreateSegmentResponses = {
2762
+ export type UpdateSeriesMediaError = UpdateSeriesMediaErrors[keyof UpdateSeriesMediaErrors];
2763
+ export type UpdateSeriesMediaResponses = {
2735
2764
  /**
2736
- * Single segment response with internal fields
2765
+ * No Content
2737
2766
  */
2738
- 201: SegmentInternal;
2767
+ 204: void;
2739
2768
  };
2740
- export type CreateSegmentResponse = CreateSegmentResponses[keyof CreateSegmentResponses];
2741
- export type DeleteSegmentData = {
2769
+ export type UpdateSeriesMediaResponse = UpdateSeriesMediaResponses[keyof UpdateSeriesMediaResponses];
2770
+ export type GetCharacterData = {
2742
2771
  body?: never;
2743
2772
  path: {
2744
2773
  /**
2745
- * ID of the media
2746
- */
2747
- mediaId: number;
2748
- /**
2749
- * Episode number
2750
- */
2751
- episodeNumber: number;
2752
- /**
2753
- * Segment ID
2774
+ * Internal character ID
2754
2775
  */
2755
2776
  id: number;
2756
2777
  };
2757
2778
  query?: never;
2758
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
2779
+ url: '/v1/media/characters/{id}';
2759
2780
  };
2760
- export type DeleteSegmentErrors = {
2781
+ export type GetCharacterErrors = {
2761
2782
  /**
2762
2783
  * Bad Request
2763
2784
  */
2764
2785
  400: Error400;
2765
2786
  /**
2766
- * Unauthorized
2787
+ * Unauthorized (API key)
2767
2788
  */
2768
2789
  401: Error401;
2769
2790
  /**
@@ -2783,40 +2804,32 @@ export type DeleteSegmentErrors = {
2783
2804
  */
2784
2805
  500: Error500;
2785
2806
  };
2786
- export type DeleteSegmentError = DeleteSegmentErrors[keyof DeleteSegmentErrors];
2787
- export type DeleteSegmentResponses = {
2807
+ export type GetCharacterError = GetCharacterErrors[keyof GetCharacterErrors];
2808
+ export type GetCharacterResponses = {
2788
2809
  /**
2789
- * Segment successfully deleted
2810
+ * OK
2790
2811
  */
2791
- 204: void;
2812
+ 200: CharacterWithMedia;
2792
2813
  };
2793
- export type DeleteSegmentResponse = DeleteSegmentResponses[keyof DeleteSegmentResponses];
2794
- export type GetSegmentData = {
2814
+ export type GetCharacterResponse = GetCharacterResponses[keyof GetCharacterResponses];
2815
+ export type GetSeiyuuData = {
2795
2816
  body?: never;
2796
2817
  path: {
2797
2818
  /**
2798
- * ID of the media
2799
- */
2800
- mediaId: number;
2801
- /**
2802
- * Episode number
2803
- */
2804
- episodeNumber: number;
2805
- /**
2806
- * Segment ID
2819
+ * Internal seiyuu ID
2807
2820
  */
2808
2821
  id: number;
2809
2822
  };
2810
2823
  query?: never;
2811
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
2824
+ url: '/v1/media/seiyuu/{id}';
2812
2825
  };
2813
- export type GetSegmentErrors = {
2826
+ export type GetSeiyuuErrors = {
2814
2827
  /**
2815
2828
  * Bad Request
2816
2829
  */
2817
2830
  400: Error400;
2818
2831
  /**
2819
- * Unauthorized
2832
+ * Unauthorized (API key)
2820
2833
  */
2821
2834
  401: Error401;
2822
2835
  /**
@@ -2836,40 +2849,32 @@ export type GetSegmentErrors = {
2836
2849
  */
2837
2850
  500: Error500;
2838
2851
  };
2839
- export type GetSegmentError = GetSegmentErrors[keyof GetSegmentErrors];
2840
- export type GetSegmentResponses = {
2852
+ export type GetSeiyuuError = GetSeiyuuErrors[keyof GetSeiyuuErrors];
2853
+ export type GetSeiyuuResponses = {
2841
2854
  /**
2842
- * Single segment response
2855
+ * OK
2843
2856
  */
2844
- 200: Segment;
2857
+ 200: SeiyuuWithRoles;
2845
2858
  };
2846
- export type GetSegmentResponse = GetSegmentResponses[keyof GetSegmentResponses];
2847
- export type UpdateSegmentData = {
2848
- body: SegmentUpdateRequest;
2859
+ export type GetSeiyuuResponse = GetSeiyuuResponses[keyof GetSeiyuuResponses];
2860
+ export type DeleteMediaData = {
2861
+ body?: never;
2849
2862
  path: {
2850
2863
  /**
2851
- * ID of the media
2852
- */
2853
- mediaId: number;
2854
- /**
2855
- * Episode number
2856
- */
2857
- episodeNumber: number;
2858
- /**
2859
- * Segment ID
2864
+ * Media ID
2860
2865
  */
2861
2866
  id: number;
2862
2867
  };
2863
2868
  query?: never;
2864
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
2869
+ url: '/v1/media/{id}';
2865
2870
  };
2866
- export type UpdateSegmentErrors = {
2871
+ export type DeleteMediaErrors = {
2867
2872
  /**
2868
2873
  * Bad Request
2869
2874
  */
2870
2875
  400: Error400;
2871
2876
  /**
2872
- * Unauthorized
2877
+ * Unauthorized (API key)
2873
2878
  */
2874
2879
  401: Error401;
2875
2880
  /**
@@ -2889,32 +2894,37 @@ export type UpdateSegmentErrors = {
2889
2894
  */
2890
2895
  500: Error500;
2891
2896
  };
2892
- export type UpdateSegmentError = UpdateSegmentErrors[keyof UpdateSegmentErrors];
2893
- export type UpdateSegmentResponses = {
2897
+ export type DeleteMediaError = DeleteMediaErrors[keyof DeleteMediaErrors];
2898
+ export type DeleteMediaResponses = {
2894
2899
  /**
2895
- * Single segment response with internal fields
2900
+ * No Content
2896
2901
  */
2897
- 200: SegmentInternal;
2902
+ 204: void;
2898
2903
  };
2899
- export type UpdateSegmentResponse = UpdateSegmentResponses[keyof UpdateSegmentResponses];
2900
- export type GetSegmentByUuidData = {
2904
+ export type DeleteMediaResponse = DeleteMediaResponses[keyof DeleteMediaResponses];
2905
+ export type GetMediaData = {
2901
2906
  body?: never;
2902
2907
  path: {
2903
2908
  /**
2904
- * Segment UUID
2909
+ * Media ID
2905
2910
  */
2906
- uuid: string;
2911
+ id: number;
2907
2912
  };
2908
- query?: never;
2909
- url: '/v1/media/segments/{uuid}';
2913
+ query?: {
2914
+ /**
2915
+ * Resources to expand in the media response
2916
+ */
2917
+ include?: Array<MediaIncludeExpansion>;
2918
+ };
2919
+ url: '/v1/media/{id}';
2910
2920
  };
2911
- export type GetSegmentByUuidErrors = {
2921
+ export type GetMediaErrors = {
2912
2922
  /**
2913
2923
  * Bad Request
2914
2924
  */
2915
2925
  400: Error400;
2916
2926
  /**
2917
- * Unauthorized
2927
+ * Unauthorized (API key)
2918
2928
  */
2919
2929
  401: Error401;
2920
2930
  /**
@@ -2934,42 +2944,32 @@ export type GetSegmentByUuidErrors = {
2934
2944
  */
2935
2945
  500: Error500;
2936
2946
  };
2937
- export type GetSegmentByUuidError = GetSegmentByUuidErrors[keyof GetSegmentByUuidErrors];
2938
- export type GetSegmentByUuidResponses = {
2939
- 200: Segment;
2947
+ export type GetMediaError = GetMediaErrors[keyof GetMediaErrors];
2948
+ export type GetMediaResponses = {
2949
+ /**
2950
+ * OK
2951
+ */
2952
+ 200: Media;
2940
2953
  };
2941
- export type GetSegmentByUuidResponse = GetSegmentByUuidResponses[keyof GetSegmentByUuidResponses];
2942
- export type GetSegmentContextData = {
2943
- body?: never;
2954
+ export type GetMediaResponse = GetMediaResponses[keyof GetMediaResponses];
2955
+ export type UpdateMediaData = {
2956
+ body: MediaUpdateRequest;
2944
2957
  path: {
2945
2958
  /**
2946
- * Segment UUID
2947
- */
2948
- uuid: string;
2949
- };
2950
- query?: {
2951
- /**
2952
- * Number of segments to return before and after the target
2953
- */
2954
- limit?: number;
2955
- /**
2956
- * Content ratings to include (omit for all ratings)
2957
- */
2958
- contentRating?: Array<ContentRating>;
2959
- /**
2960
- * Resources to expand in the response includes block
2959
+ * Media ID
2961
2960
  */
2962
- include?: Array<IncludeExpansion>;
2961
+ id: number;
2963
2962
  };
2964
- url: '/v1/media/segments/{uuid}/context';
2963
+ query?: never;
2964
+ url: '/v1/media/{id}';
2965
2965
  };
2966
- export type GetSegmentContextErrors = {
2966
+ export type UpdateMediaErrors = {
2967
2967
  /**
2968
2968
  * Bad Request
2969
2969
  */
2970
2970
  400: Error400;
2971
2971
  /**
2972
- * Unauthorized
2972
+ * Unauthorized (API key)
2973
2973
  */
2974
2974
  401: Error401;
2975
2975
  /**
@@ -2989,46 +2989,51 @@ export type GetSegmentContextErrors = {
2989
2989
  */
2990
2990
  500: Error500;
2991
2991
  };
2992
- export type GetSegmentContextError = GetSegmentContextErrors[keyof GetSegmentContextErrors];
2993
- export type GetSegmentContextResponses = {
2992
+ export type UpdateMediaError = UpdateMediaErrors[keyof UpdateMediaErrors];
2993
+ export type UpdateMediaResponses = {
2994
2994
  /**
2995
2995
  * OK
2996
2996
  */
2997
- 200: SegmentContextResponse;
2997
+ 200: Media;
2998
2998
  };
2999
- export type GetSegmentContextResponse = GetSegmentContextResponses[keyof GetSegmentContextResponses];
3000
- export type ListSeriesData = {
2999
+ export type UpdateMediaResponse = UpdateMediaResponses[keyof UpdateMediaResponses];
3000
+ export type ListEpisodesData = {
3001
3001
  body?: never;
3002
- path?: never;
3003
- query?: {
3002
+ path: {
3004
3003
  /**
3005
- * Number of results per page
3004
+ * ID of the media
3006
3005
  */
3007
- limit?: number;
3006
+ mediaId: number;
3007
+ };
3008
+ query?: {
3008
3009
  /**
3009
- * Pagination cursor offset
3010
+ * Maximum number of episodes to return
3010
3011
  */
3011
- cursor?: number;
3012
+ take?: number;
3012
3013
  /**
3013
- * Case-insensitive search across English, Japanese, and Romaji names
3014
+ * Opaque pagination cursor token
3014
3015
  */
3015
- query?: string;
3016
+ cursor?: string;
3016
3017
  };
3017
- url: '/v1/media/series';
3018
+ url: '/v1/media/{mediaId}/episodes';
3018
3019
  };
3019
- export type ListSeriesErrors = {
3020
+ export type ListEpisodesErrors = {
3020
3021
  /**
3021
3022
  * Bad Request
3022
3023
  */
3023
3024
  400: Error400;
3024
3025
  /**
3025
- * Unauthorized
3026
+ * Unauthorized (API key)
3026
3027
  */
3027
3028
  401: Error401;
3028
3029
  /**
3029
3030
  * Forbidden
3030
3031
  */
3031
3032
  403: Error403;
3033
+ /**
3034
+ * Not Found
3035
+ */
3036
+ 404: Error404;
3032
3037
  /**
3033
3038
  * Too Many Requests
3034
3039
  */
@@ -3038,46 +3043,46 @@ export type ListSeriesErrors = {
3038
3043
  */
3039
3044
  500: Error500;
3040
3045
  };
3041
- export type ListSeriesError = ListSeriesErrors[keyof ListSeriesErrors];
3042
- export type ListSeriesResponses = {
3046
+ export type ListEpisodesError = ListEpisodesErrors[keyof ListEpisodesErrors];
3047
+ export type ListEpisodesResponses = {
3043
3048
  /**
3044
- * OK
3049
+ * Paginated list of episodes
3045
3050
  */
3046
- 200: SeriesListResponse;
3051
+ 200: EpisodeListResponse;
3047
3052
  };
3048
- export type ListSeriesResponse = ListSeriesResponses[keyof ListSeriesResponses];
3049
- export type CreateSeriesData = {
3050
- body: {
3051
- /**
3052
- * Japanese name of the series
3053
- */
3054
- nameJa: string;
3055
- /**
3056
- * Romaji name of the series
3057
- */
3058
- nameRomaji: string;
3053
+ export type ListEpisodesResponse = ListEpisodesResponses[keyof ListEpisodesResponses];
3054
+ export type CreateEpisodeData = {
3055
+ body: EpisodeCreateRequest;
3056
+ path: {
3059
3057
  /**
3060
- * English name of the series
3058
+ * ID of the media
3061
3059
  */
3062
- nameEn: string;
3060
+ mediaId: number;
3063
3061
  };
3064
- path?: never;
3065
3062
  query?: never;
3066
- url: '/v1/media/series';
3063
+ url: '/v1/media/{mediaId}/episodes';
3067
3064
  };
3068
- export type CreateSeriesErrors = {
3065
+ export type CreateEpisodeErrors = {
3069
3066
  /**
3070
3067
  * Bad Request
3071
3068
  */
3072
3069
  400: Error400;
3073
3070
  /**
3074
- * Unauthorized
3071
+ * Unauthorized (API key)
3072
+ */
3073
+ 401: Error401;
3074
+ /**
3075
+ * Forbidden
3076
+ */
3077
+ 403: Error403;
3078
+ /**
3079
+ * Not Found
3075
3080
  */
3076
- 401: Error401;
3081
+ 404: Error404;
3077
3082
  /**
3078
- * Forbidden
3083
+ * Conflict
3079
3084
  */
3080
- 403: Error403;
3085
+ 409: Error409;
3081
3086
  /**
3082
3087
  * Too Many Requests
3083
3088
  */
@@ -3087,32 +3092,36 @@ export type CreateSeriesErrors = {
3087
3092
  */
3088
3093
  500: Error500;
3089
3094
  };
3090
- export type CreateSeriesError = CreateSeriesErrors[keyof CreateSeriesErrors];
3091
- export type CreateSeriesResponses = {
3095
+ export type CreateEpisodeError = CreateEpisodeErrors[keyof CreateEpisodeErrors];
3096
+ export type CreateEpisodeResponses = {
3092
3097
  /**
3093
- * Created
3098
+ * Single episode response
3094
3099
  */
3095
- 201: Series;
3100
+ 201: Episode;
3096
3101
  };
3097
- export type CreateSeriesResponse = CreateSeriesResponses[keyof CreateSeriesResponses];
3098
- export type DeleteSeriesData = {
3102
+ export type CreateEpisodeResponse = CreateEpisodeResponses[keyof CreateEpisodeResponses];
3103
+ export type DeleteEpisodeData = {
3099
3104
  body?: never;
3100
3105
  path: {
3101
3106
  /**
3102
- * Series ID
3107
+ * ID of the media
3103
3108
  */
3104
- id: number;
3109
+ mediaId: number;
3110
+ /**
3111
+ * Episode number
3112
+ */
3113
+ episodeNumber: number;
3105
3114
  };
3106
3115
  query?: never;
3107
- url: '/v1/media/series/{id}';
3116
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
3108
3117
  };
3109
- export type DeleteSeriesErrors = {
3118
+ export type DeleteEpisodeErrors = {
3110
3119
  /**
3111
3120
  * Bad Request
3112
3121
  */
3113
3122
  400: Error400;
3114
3123
  /**
3115
- * Unauthorized
3124
+ * Unauthorized (API key)
3116
3125
  */
3117
3126
  401: Error401;
3118
3127
  /**
@@ -3132,37 +3141,36 @@ export type DeleteSeriesErrors = {
3132
3141
  */
3133
3142
  500: Error500;
3134
3143
  };
3135
- export type DeleteSeriesError = DeleteSeriesErrors[keyof DeleteSeriesErrors];
3136
- export type DeleteSeriesResponses = {
3144
+ export type DeleteEpisodeError = DeleteEpisodeErrors[keyof DeleteEpisodeErrors];
3145
+ export type DeleteEpisodeResponses = {
3137
3146
  /**
3138
- * No Content
3147
+ * Episode successfully deleted
3139
3148
  */
3140
3149
  204: void;
3141
3150
  };
3142
- export type DeleteSeriesResponse = DeleteSeriesResponses[keyof DeleteSeriesResponses];
3143
- export type GetSeriesData = {
3151
+ export type DeleteEpisodeResponse = DeleteEpisodeResponses[keyof DeleteEpisodeResponses];
3152
+ export type GetEpisodeData = {
3144
3153
  body?: never;
3145
3154
  path: {
3146
3155
  /**
3147
- * Series ID
3156
+ * ID of the media
3148
3157
  */
3149
- id: number;
3150
- };
3151
- query?: {
3158
+ mediaId: number;
3152
3159
  /**
3153
- * Resources to expand in the series response (`media.characters` implies `media`)
3160
+ * Episode number
3154
3161
  */
3155
- include?: Array<MediaIncludeExpansion>;
3162
+ episodeNumber: number;
3156
3163
  };
3157
- url: '/v1/media/series/{id}';
3164
+ query?: never;
3165
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
3158
3166
  };
3159
- export type GetSeriesErrors = {
3167
+ export type GetEpisodeErrors = {
3160
3168
  /**
3161
3169
  * Bad Request
3162
3170
  */
3163
3171
  400: Error400;
3164
3172
  /**
3165
- * Unauthorized
3173
+ * Unauthorized (API key)
3166
3174
  */
3167
3175
  401: Error401;
3168
3176
  /**
@@ -3182,45 +3190,36 @@ export type GetSeriesErrors = {
3182
3190
  */
3183
3191
  500: Error500;
3184
3192
  };
3185
- export type GetSeriesError = GetSeriesErrors[keyof GetSeriesErrors];
3186
- export type GetSeriesResponses = {
3193
+ export type GetEpisodeError = GetEpisodeErrors[keyof GetEpisodeErrors];
3194
+ export type GetEpisodeResponses = {
3187
3195
  /**
3188
- * OK
3196
+ * Single episode response
3189
3197
  */
3190
- 200: SeriesWithMedia;
3198
+ 200: Episode;
3191
3199
  };
3192
- export type GetSeriesResponse = GetSeriesResponses[keyof GetSeriesResponses];
3193
- export type UpdateSeriesData = {
3194
- body: {
3195
- /**
3196
- * Updated Japanese name
3197
- */
3198
- nameJa?: string;
3199
- /**
3200
- * Updated Romaji name
3201
- */
3202
- nameRomaji?: string;
3200
+ export type GetEpisodeResponse = GetEpisodeResponses[keyof GetEpisodeResponses];
3201
+ export type UpdateEpisodeData = {
3202
+ body: EpisodeUpdateRequest;
3203
+ path: {
3203
3204
  /**
3204
- * Updated English name
3205
+ * ID of the media
3205
3206
  */
3206
- nameEn?: string;
3207
- };
3208
- path: {
3207
+ mediaId: number;
3209
3208
  /**
3210
- * Series ID
3209
+ * Episode number
3211
3210
  */
3212
- id: number;
3211
+ episodeNumber: number;
3213
3212
  };
3214
3213
  query?: never;
3215
- url: '/v1/media/series/{id}';
3214
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
3216
3215
  };
3217
- export type UpdateSeriesErrors = {
3216
+ export type UpdateEpisodeErrors = {
3218
3217
  /**
3219
3218
  * Bad Request
3220
3219
  */
3221
3220
  400: Error400;
3222
3221
  /**
3223
- * Unauthorized
3222
+ * Unauthorized (API key)
3224
3223
  */
3225
3224
  401: Error401;
3226
3225
  /**
@@ -3240,41 +3239,45 @@ export type UpdateSeriesErrors = {
3240
3239
  */
3241
3240
  500: Error500;
3242
3241
  };
3243
- export type UpdateSeriesError = UpdateSeriesErrors[keyof UpdateSeriesErrors];
3244
- export type UpdateSeriesResponses = {
3242
+ export type UpdateEpisodeError = UpdateEpisodeErrors[keyof UpdateEpisodeErrors];
3243
+ export type UpdateEpisodeResponses = {
3245
3244
  /**
3246
- * OK
3245
+ * Single episode response
3247
3246
  */
3248
- 200: Series;
3247
+ 200: Episode;
3249
3248
  };
3250
- export type UpdateSeriesResponse = UpdateSeriesResponses[keyof UpdateSeriesResponses];
3251
- export type AddMediaToSeriesData = {
3252
- body: {
3249
+ export type UpdateEpisodeResponse = UpdateEpisodeResponses[keyof UpdateEpisodeResponses];
3250
+ export type ListSegmentsData = {
3251
+ body?: never;
3252
+ path: {
3253
3253
  /**
3254
- * Media ID to add
3254
+ * ID of the media
3255
3255
  */
3256
3256
  mediaId: number;
3257
3257
  /**
3258
- * Position in the series (1-indexed)
3258
+ * Episode number
3259
3259
  */
3260
- position: number;
3260
+ episodeNumber: number;
3261
3261
  };
3262
- path: {
3262
+ query?: {
3263
3263
  /**
3264
- * Series ID
3264
+ * Maximum number of segments to return
3265
3265
  */
3266
- id: number;
3266
+ take?: number;
3267
+ /**
3268
+ * Opaque pagination cursor token
3269
+ */
3270
+ cursor?: string;
3267
3271
  };
3268
- query?: never;
3269
- url: '/v1/media/series/{id}/media';
3272
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments';
3270
3273
  };
3271
- export type AddMediaToSeriesErrors = {
3274
+ export type ListSegmentsErrors = {
3272
3275
  /**
3273
3276
  * Bad Request
3274
3277
  */
3275
3278
  400: Error400;
3276
3279
  /**
3277
- * Unauthorized
3280
+ * Unauthorized (API key)
3278
3281
  */
3279
3282
  401: Error401;
3280
3283
  /**
@@ -3294,36 +3297,42 @@ export type AddMediaToSeriesErrors = {
3294
3297
  */
3295
3298
  500: Error500;
3296
3299
  };
3297
- export type AddMediaToSeriesError = AddMediaToSeriesErrors[keyof AddMediaToSeriesErrors];
3298
- export type AddMediaToSeriesResponses = {
3300
+ export type ListSegmentsError = ListSegmentsErrors[keyof ListSegmentsErrors];
3301
+ export type ListSegmentsResponses = {
3299
3302
  /**
3300
- * No Content
3303
+ * Paginated segment list response
3301
3304
  */
3302
- 204: void;
3305
+ 200: {
3306
+ /**
3307
+ * Array of segment objects
3308
+ */
3309
+ segments: Array<Segment>;
3310
+ pagination: OpaqueCursorPagination;
3311
+ };
3303
3312
  };
3304
- export type AddMediaToSeriesResponse = AddMediaToSeriesResponses[keyof AddMediaToSeriesResponses];
3305
- export type RemoveMediaFromSeriesData = {
3306
- body?: never;
3313
+ export type ListSegmentsResponse = ListSegmentsResponses[keyof ListSegmentsResponses];
3314
+ export type CreateSegmentData = {
3315
+ body: SegmentCreateRequest;
3307
3316
  path: {
3308
3317
  /**
3309
- * Series ID
3318
+ * ID of the media
3310
3319
  */
3311
- id: number;
3320
+ mediaId: number;
3312
3321
  /**
3313
- * Media ID
3322
+ * Episode number
3314
3323
  */
3315
- mediaId: number;
3324
+ episodeNumber: number;
3316
3325
  };
3317
3326
  query?: never;
3318
- url: '/v1/media/series/{id}/media/{mediaId}';
3327
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments';
3319
3328
  };
3320
- export type RemoveMediaFromSeriesErrors = {
3329
+ export type CreateSegmentErrors = {
3321
3330
  /**
3322
3331
  * Bad Request
3323
3332
  */
3324
3333
  400: Error400;
3325
3334
  /**
3326
- * Unauthorized
3335
+ * Unauthorized (API key)
3327
3336
  */
3328
3337
  401: Error401;
3329
3338
  /**
@@ -3334,6 +3343,10 @@ export type RemoveMediaFromSeriesErrors = {
3334
3343
  * Not Found
3335
3344
  */
3336
3345
  404: Error404;
3346
+ /**
3347
+ * Conflict
3348
+ */
3349
+ 409: Error409;
3337
3350
  /**
3338
3351
  * Too Many Requests
3339
3352
  */
@@ -3343,41 +3356,40 @@ export type RemoveMediaFromSeriesErrors = {
3343
3356
  */
3344
3357
  500: Error500;
3345
3358
  };
3346
- export type RemoveMediaFromSeriesError = RemoveMediaFromSeriesErrors[keyof RemoveMediaFromSeriesErrors];
3347
- export type RemoveMediaFromSeriesResponses = {
3359
+ export type CreateSegmentError = CreateSegmentErrors[keyof CreateSegmentErrors];
3360
+ export type CreateSegmentResponses = {
3348
3361
  /**
3349
- * No Content
3362
+ * Single segment response with internal fields
3350
3363
  */
3351
- 204: void;
3364
+ 201: SegmentInternal;
3352
3365
  };
3353
- export type RemoveMediaFromSeriesResponse = RemoveMediaFromSeriesResponses[keyof RemoveMediaFromSeriesResponses];
3354
- export type UpdateSeriesMediaData = {
3355
- body: {
3366
+ export type CreateSegmentResponse = CreateSegmentResponses[keyof CreateSegmentResponses];
3367
+ export type DeleteSegmentData = {
3368
+ body?: never;
3369
+ path: {
3356
3370
  /**
3357
- * New position in the series (1-indexed)
3371
+ * ID of the media
3358
3372
  */
3359
- position: number;
3360
- };
3361
- path: {
3373
+ mediaId: number;
3362
3374
  /**
3363
- * Series ID
3375
+ * Episode number
3364
3376
  */
3365
- id: number;
3377
+ episodeNumber: number;
3366
3378
  /**
3367
- * Media ID
3379
+ * Segment ID
3368
3380
  */
3369
- mediaId: number;
3381
+ id: number;
3370
3382
  };
3371
3383
  query?: never;
3372
- url: '/v1/media/series/{id}/media/{mediaId}';
3384
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
3373
3385
  };
3374
- export type UpdateSeriesMediaErrors = {
3386
+ export type DeleteSegmentErrors = {
3375
3387
  /**
3376
3388
  * Bad Request
3377
3389
  */
3378
3390
  400: Error400;
3379
3391
  /**
3380
- * Unauthorized
3392
+ * Unauthorized (API key)
3381
3393
  */
3382
3394
  401: Error401;
3383
3395
  /**
@@ -3397,32 +3409,40 @@ export type UpdateSeriesMediaErrors = {
3397
3409
  */
3398
3410
  500: Error500;
3399
3411
  };
3400
- export type UpdateSeriesMediaError = UpdateSeriesMediaErrors[keyof UpdateSeriesMediaErrors];
3401
- export type UpdateSeriesMediaResponses = {
3412
+ export type DeleteSegmentError = DeleteSegmentErrors[keyof DeleteSegmentErrors];
3413
+ export type DeleteSegmentResponses = {
3402
3414
  /**
3403
- * No Content
3415
+ * Segment successfully deleted
3404
3416
  */
3405
3417
  204: void;
3406
3418
  };
3407
- export type UpdateSeriesMediaResponse = UpdateSeriesMediaResponses[keyof UpdateSeriesMediaResponses];
3408
- export type GetCharacterData = {
3419
+ export type DeleteSegmentResponse = DeleteSegmentResponses[keyof DeleteSegmentResponses];
3420
+ export type GetSegmentData = {
3409
3421
  body?: never;
3410
3422
  path: {
3411
3423
  /**
3412
- * AniList character ID
3424
+ * ID of the media
3425
+ */
3426
+ mediaId: number;
3427
+ /**
3428
+ * Episode number
3429
+ */
3430
+ episodeNumber: number;
3431
+ /**
3432
+ * Segment ID
3413
3433
  */
3414
3434
  id: number;
3415
3435
  };
3416
3436
  query?: never;
3417
- url: '/v1/media/characters/{id}';
3437
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
3418
3438
  };
3419
- export type GetCharacterErrors = {
3439
+ export type GetSegmentErrors = {
3420
3440
  /**
3421
3441
  * Bad Request
3422
3442
  */
3423
3443
  400: Error400;
3424
3444
  /**
3425
- * Unauthorized
3445
+ * Unauthorized (API key)
3426
3446
  */
3427
3447
  401: Error401;
3428
3448
  /**
@@ -3442,37 +3462,40 @@ export type GetCharacterErrors = {
3442
3462
  */
3443
3463
  500: Error500;
3444
3464
  };
3445
- export type GetCharacterError = GetCharacterErrors[keyof GetCharacterErrors];
3446
- export type GetCharacterResponses = {
3465
+ export type GetSegmentError = GetSegmentErrors[keyof GetSegmentErrors];
3466
+ export type GetSegmentResponses = {
3447
3467
  /**
3448
- * OK
3468
+ * Single segment response
3449
3469
  */
3450
- 200: CharacterWithMedia;
3470
+ 200: Segment;
3451
3471
  };
3452
- export type GetCharacterResponse = GetCharacterResponses[keyof GetCharacterResponses];
3453
- export type GetSeiyuuData = {
3454
- body?: never;
3472
+ export type GetSegmentResponse = GetSegmentResponses[keyof GetSegmentResponses];
3473
+ export type UpdateSegmentData = {
3474
+ body: SegmentUpdateRequest;
3455
3475
  path: {
3456
3476
  /**
3457
- * AniList staff ID
3477
+ * ID of the media
3458
3478
  */
3459
- id: number;
3460
- };
3461
- query?: {
3479
+ mediaId: number;
3480
+ /**
3481
+ * Episode number
3482
+ */
3483
+ episodeNumber: number;
3462
3484
  /**
3463
- * Resources to expand in the response (`character` is included by default)
3485
+ * Segment ID
3464
3486
  */
3465
- include?: Array<'character'>;
3487
+ id: number;
3466
3488
  };
3467
- url: '/v1/media/seiyuu/{id}';
3489
+ query?: never;
3490
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
3468
3491
  };
3469
- export type GetSeiyuuErrors = {
3492
+ export type UpdateSegmentErrors = {
3470
3493
  /**
3471
3494
  * Bad Request
3472
3495
  */
3473
3496
  400: Error400;
3474
3497
  /**
3475
- * Unauthorized
3498
+ * Unauthorized (API key)
3476
3499
  */
3477
3500
  401: Error401;
3478
3501
  /**
@@ -3492,14 +3515,14 @@ export type GetSeiyuuErrors = {
3492
3515
  */
3493
3516
  500: Error500;
3494
3517
  };
3495
- export type GetSeiyuuError = GetSeiyuuErrors[keyof GetSeiyuuErrors];
3496
- export type GetSeiyuuResponses = {
3518
+ export type UpdateSegmentError = UpdateSegmentErrors[keyof UpdateSegmentErrors];
3519
+ export type UpdateSegmentResponses = {
3497
3520
  /**
3498
- * OK
3521
+ * Single segment response with internal fields
3499
3522
  */
3500
- 200: SeiyuuWithRoles;
3523
+ 200: SegmentInternal;
3501
3524
  };
3502
- export type GetSeiyuuResponse = GetSeiyuuResponses[keyof GetSeiyuuResponses];
3525
+ export type UpdateSegmentResponse = UpdateSegmentResponses[keyof UpdateSegmentResponses];
3503
3526
  export type GetUserQuotaData = {
3504
3527
  body?: never;
3505
3528
  path?: never;
@@ -3508,9 +3531,13 @@ export type GetUserQuotaData = {
3508
3531
  };
3509
3532
  export type GetUserQuotaErrors = {
3510
3533
  /**
3511
- * Unauthorized
3534
+ * Unauthorized (session)
3512
3535
  */
3513
3536
  401: Error401;
3537
+ /**
3538
+ * Forbidden
3539
+ */
3540
+ 403: Error403;
3514
3541
  /**
3515
3542
  * Too Many Requests
3516
3543
  */
@@ -3528,43 +3555,6 @@ export type GetUserQuotaResponses = {
3528
3555
  200: UserQuotaResponse;
3529
3556
  };
3530
3557
  export type GetUserQuotaResponse = GetUserQuotaResponses[keyof GetUserQuotaResponses];
3531
- export type ListUserReportsData = {
3532
- body?: never;
3533
- path?: never;
3534
- query?: {
3535
- /**
3536
- * Cursor for pagination (report ID to start after)
3537
- */
3538
- cursor?: number;
3539
- /**
3540
- * Number of results per page
3541
- */
3542
- limit?: number;
3543
- /**
3544
- * Filter by report status
3545
- */
3546
- status?: 'PENDING' | 'CONCERN' | 'ACCEPTED' | 'REJECTED' | 'RESOLVED' | 'IGNORED';
3547
- };
3548
- url: '/v1/user/reports';
3549
- };
3550
- export type ListUserReportsErrors = {
3551
- /**
3552
- * Unauthorized
3553
- */
3554
- 401: Error401;
3555
- /**
3556
- * Internal Server Error
3557
- */
3558
- 500: Error500;
3559
- };
3560
- export type ListUserReportsError = ListUserReportsErrors[keyof ListUserReportsErrors];
3561
- export type ListUserReportsResponses = {
3562
- /**
3563
- * OK
3564
- */
3565
- 200: ReportListResponse;
3566
- };
3567
- export type ListUserReportsResponse = ListUserReportsResponses[keyof ListUserReportsResponses];
3568
3558
  export type CreateUserReportData = {
3569
3559
  body: CreateReportRequest;
3570
3560
  path?: never;
@@ -3577,7 +3567,7 @@ export type CreateUserReportErrors = {
3577
3567
  */
3578
3568
  400: Error400;
3579
3569
  /**
3580
- * Unauthorized
3570
+ * Unauthorized (session)
3581
3571
  */
3582
3572
  401: Error401;
3583
3573
  /**
@@ -3605,7 +3595,7 @@ export type GetUserPreferencesData = {
3605
3595
  };
3606
3596
  export type GetUserPreferencesErrors = {
3607
3597
  /**
3608
- * Unauthorized
3598
+ * Unauthorized (session)
3609
3599
  */
3610
3600
  401: Error401;
3611
3601
  /**
@@ -3629,7 +3619,7 @@ export type UpdateUserPreferencesData = {
3629
3619
  };
3630
3620
  export type UpdateUserPreferencesErrors = {
3631
3621
  /**
3632
- * Unauthorized
3622
+ * Unauthorized (session)
3633
3623
  */
3634
3624
  401: Error401;
3635
3625
  /**
@@ -3658,7 +3648,7 @@ export type DeleteUserActivityData = {
3658
3648
  };
3659
3649
  export type DeleteUserActivityErrors = {
3660
3650
  /**
3661
- * Unauthorized
3651
+ * Unauthorized (session)
3662
3652
  */
3663
3653
  401: Error401;
3664
3654
  /**
@@ -3672,7 +3662,6 @@ export type DeleteUserActivityResponses = {
3672
3662
  * OK
3673
3663
  */
3674
3664
  200: {
3675
- message: string;
3676
3665
  deletedCount: number;
3677
3666
  };
3678
3667
  };
@@ -3682,13 +3671,13 @@ export type ListUserActivityData = {
3682
3671
  path?: never;
3683
3672
  query?: {
3684
3673
  /**
3685
- * Cursor for pagination (activity ID to start after)
3674
+ * Opaque cursor token for keyset pagination
3686
3675
  */
3687
- cursor?: number;
3676
+ cursor?: string;
3688
3677
  /**
3689
3678
  * Number of results per page
3690
3679
  */
3691
- limit?: number;
3680
+ take?: number;
3692
3681
  /**
3693
3682
  * Filter by activity type
3694
3683
  */
@@ -3702,7 +3691,7 @@ export type ListUserActivityData = {
3702
3691
  };
3703
3692
  export type ListUserActivityErrors = {
3704
3693
  /**
3705
- * Unauthorized
3694
+ * Unauthorized (session)
3706
3695
  */
3707
3696
  401: Error401;
3708
3697
  /**
@@ -3717,10 +3706,44 @@ export type ListUserActivityResponses = {
3717
3706
  */
3718
3707
  200: {
3719
3708
  activities: Array<UserActivity>;
3720
- pagination: CursorPagination;
3709
+ pagination: OpaqueCursorPagination;
3721
3710
  };
3722
3711
  };
3723
3712
  export type ListUserActivityResponse = ListUserActivityResponses[keyof ListUserActivityResponses];
3713
+ export type TrackUserActivityData = {
3714
+ body: {
3715
+ activityType: 'SEGMENT_PLAY' | 'SHARE';
3716
+ segmentUuid?: string;
3717
+ mediaId?: number;
3718
+ mediaName?: string;
3719
+ japaneseText?: string;
3720
+ };
3721
+ path?: never;
3722
+ query?: never;
3723
+ url: '/v1/user/activity';
3724
+ };
3725
+ export type TrackUserActivityErrors = {
3726
+ /**
3727
+ * Bad Request
3728
+ */
3729
+ 400: Error400;
3730
+ /**
3731
+ * Unauthorized (session)
3732
+ */
3733
+ 401: Error401;
3734
+ /**
3735
+ * Internal Server Error
3736
+ */
3737
+ 500: Error500;
3738
+ };
3739
+ export type TrackUserActivityError = TrackUserActivityErrors[keyof TrackUserActivityErrors];
3740
+ export type TrackUserActivityResponses = {
3741
+ /**
3742
+ * Activity tracked
3743
+ */
3744
+ 204: void;
3745
+ };
3746
+ export type TrackUserActivityResponse = TrackUserActivityResponses[keyof TrackUserActivityResponses];
3724
3747
  export type GetUserActivityHeatmapData = {
3725
3748
  body?: never;
3726
3749
  path?: never;
@@ -3729,16 +3752,12 @@ export type GetUserActivityHeatmapData = {
3729
3752
  * Number of days to include in the heatmap
3730
3753
  */
3731
3754
  days?: number;
3732
- /**
3733
- * Filter by activity type
3734
- */
3735
- activityType?: ActivityType;
3736
3755
  };
3737
3756
  url: '/v1/user/activity/heatmap';
3738
3757
  };
3739
3758
  export type GetUserActivityHeatmapErrors = {
3740
3759
  /**
3741
- * Unauthorized
3760
+ * Unauthorized (session)
3742
3761
  */
3743
3762
  401: Error401;
3744
3763
  /**
@@ -3753,10 +3772,10 @@ export type GetUserActivityHeatmapResponses = {
3753
3772
  */
3754
3773
  200: {
3755
3774
  /**
3756
- * Map of YYYY-MM-DD date strings to activity counts
3775
+ * Map of YYYY-MM-DD date strings to per-type activity counts
3757
3776
  */
3758
- counts: {
3759
- [key: string]: number;
3777
+ activityByDay: {
3778
+ [key: string]: HeatmapDayCounts;
3760
3779
  };
3761
3780
  };
3762
3781
  };
@@ -3774,7 +3793,7 @@ export type GetUserActivityStatsData = {
3774
3793
  };
3775
3794
  export type GetUserActivityStatsErrors = {
3776
3795
  /**
3777
- * Unauthorized
3796
+ * Unauthorized (session)
3778
3797
  */
3779
3798
  401: Error401;
3780
3799
  /**
@@ -3792,10 +3811,7 @@ export type GetUserActivityStatsResponses = {
3792
3811
  totalExports: number;
3793
3812
  totalPlays: number;
3794
3813
  totalListAdds: number;
3795
- /**
3796
- * Consecutive days with at least one activity
3797
- */
3798
- streakDays: number;
3814
+ totalShares: number;
3799
3815
  topMedia: Array<{
3800
3816
  mediaId: number;
3801
3817
  count: number;
@@ -3803,6 +3819,70 @@ export type GetUserActivityStatsResponses = {
3803
3819
  };
3804
3820
  };
3805
3821
  export type GetUserActivityStatsResponse = GetUserActivityStatsResponses[keyof GetUserActivityStatsResponses];
3822
+ export type DeleteUserActivityByDateData = {
3823
+ body?: never;
3824
+ path: {
3825
+ /**
3826
+ * Date in YYYY-MM-DD format
3827
+ */
3828
+ date: string;
3829
+ };
3830
+ query?: never;
3831
+ url: '/v1/user/activity/date/{date}';
3832
+ };
3833
+ export type DeleteUserActivityByDateErrors = {
3834
+ /**
3835
+ * Unauthorized (session)
3836
+ */
3837
+ 401: Error401;
3838
+ /**
3839
+ * Internal Server Error
3840
+ */
3841
+ 500: Error500;
3842
+ };
3843
+ export type DeleteUserActivityByDateError = DeleteUserActivityByDateErrors[keyof DeleteUserActivityByDateErrors];
3844
+ export type DeleteUserActivityByDateResponses = {
3845
+ /**
3846
+ * OK
3847
+ */
3848
+ 200: {
3849
+ deletedCount: number;
3850
+ };
3851
+ };
3852
+ export type DeleteUserActivityByDateResponse = DeleteUserActivityByDateResponses[keyof DeleteUserActivityByDateResponses];
3853
+ export type DeleteUserActivityByIdData = {
3854
+ body?: never;
3855
+ path: {
3856
+ /**
3857
+ * Activity record ID
3858
+ */
3859
+ id: number;
3860
+ };
3861
+ query?: never;
3862
+ url: '/v1/user/activity/{id}';
3863
+ };
3864
+ export type DeleteUserActivityByIdErrors = {
3865
+ /**
3866
+ * Unauthorized (session)
3867
+ */
3868
+ 401: Error401;
3869
+ /**
3870
+ * Not Found
3871
+ */
3872
+ 404: Error404;
3873
+ /**
3874
+ * Internal Server Error
3875
+ */
3876
+ 500: Error500;
3877
+ };
3878
+ export type DeleteUserActivityByIdError = DeleteUserActivityByIdErrors[keyof DeleteUserActivityByIdErrors];
3879
+ export type DeleteUserActivityByIdResponses = {
3880
+ /**
3881
+ * Activity deleted
3882
+ */
3883
+ 204: void;
3884
+ };
3885
+ export type DeleteUserActivityByIdResponse = DeleteUserActivityByIdResponses[keyof DeleteUserActivityByIdResponses];
3806
3886
  export type ExportUserDataData = {
3807
3887
  body?: never;
3808
3888
  path?: never;
@@ -3811,7 +3891,7 @@ export type ExportUserDataData = {
3811
3891
  };
3812
3892
  export type ExportUserDataErrors = {
3813
3893
  /**
3814
- * Unauthorized
3894
+ * Unauthorized (session)
3815
3895
  */
3816
3896
  401: Error401;
3817
3897
  /**
@@ -3835,7 +3915,7 @@ export type ListUserLabsData = {
3835
3915
  };
3836
3916
  export type ListUserLabsErrors = {
3837
3917
  /**
3838
- * Unauthorized
3918
+ * Unauthorized (session)
3839
3919
  */
3840
3920
  401: Error401;
3841
3921
  /**
@@ -3851,6 +3931,72 @@ export type ListUserLabsResponses = {
3851
3931
  200: Array<UserLabFeature>;
3852
3932
  };
3853
3933
  export type ListUserLabsResponse = ListUserLabsResponses[keyof ListUserLabsResponses];
3934
+ export type UnenrollUserLabData = {
3935
+ body?: never;
3936
+ path: {
3937
+ /**
3938
+ * Lab feature key
3939
+ */
3940
+ key: string;
3941
+ };
3942
+ query?: never;
3943
+ url: '/v1/user/labs/{key}';
3944
+ };
3945
+ export type UnenrollUserLabErrors = {
3946
+ /**
3947
+ * Unauthorized (session)
3948
+ */
3949
+ 401: Error401;
3950
+ /**
3951
+ * Not Found
3952
+ */
3953
+ 404: Error404;
3954
+ /**
3955
+ * Internal Server Error
3956
+ */
3957
+ 500: Error500;
3958
+ };
3959
+ export type UnenrollUserLabError = UnenrollUserLabErrors[keyof UnenrollUserLabErrors];
3960
+ export type UnenrollUserLabResponses = {
3961
+ /**
3962
+ * Unenrolled successfully
3963
+ */
3964
+ 204: void;
3965
+ };
3966
+ export type UnenrollUserLabResponse = UnenrollUserLabResponses[keyof UnenrollUserLabResponses];
3967
+ export type EnrollUserLabData = {
3968
+ body?: never;
3969
+ path: {
3970
+ /**
3971
+ * Lab feature key
3972
+ */
3973
+ key: string;
3974
+ };
3975
+ query?: never;
3976
+ url: '/v1/user/labs/{key}';
3977
+ };
3978
+ export type EnrollUserLabErrors = {
3979
+ /**
3980
+ * Unauthorized (session)
3981
+ */
3982
+ 401: Error401;
3983
+ /**
3984
+ * Not Found
3985
+ */
3986
+ 404: Error404;
3987
+ /**
3988
+ * Internal Server Error
3989
+ */
3990
+ 500: Error500;
3991
+ };
3992
+ export type EnrollUserLabError = EnrollUserLabErrors[keyof EnrollUserLabErrors];
3993
+ export type EnrollUserLabResponses = {
3994
+ /**
3995
+ * Enrolled successfully
3996
+ */
3997
+ 204: void;
3998
+ };
3999
+ export type EnrollUserLabResponse = EnrollUserLabResponses[keyof EnrollUserLabResponses];
3854
4000
  export type ListCollectionsData = {
3855
4001
  body?: never;
3856
4002
  path?: never;
@@ -3860,19 +4006,13 @@ export type ListCollectionsData = {
3860
4006
  */
3861
4007
  visibility?: 'public' | 'private';
3862
4008
  /**
3863
- * Cursor offset for pagination
4009
+ * Opaque pagination cursor token
3864
4010
  */
3865
- cursor?: number;
3866
- /**
3867
- * Page number (1-indexed)
3868
- *
3869
- * @deprecated
3870
- */
3871
- page?: number;
4011
+ cursor?: string;
3872
4012
  /**
3873
4013
  * Items per page
3874
4014
  */
3875
- limit?: number;
4015
+ take?: number;
3876
4016
  };
3877
4017
  url: '/v1/collections';
3878
4018
  };
@@ -3882,7 +4022,7 @@ export type ListCollectionsErrors = {
3882
4022
  */
3883
4023
  400: Error400;
3884
4024
  /**
3885
- * Unauthorized
4025
+ * Unauthorized (session)
3886
4026
  */
3887
4027
  401: Error401;
3888
4028
  /**
@@ -3918,7 +4058,7 @@ export type CreateCollectionErrors = {
3918
4058
  */
3919
4059
  400: Error400;
3920
4060
  /**
3921
- * Unauthorized
4061
+ * Unauthorized (session)
3922
4062
  */
3923
4063
  401: Error401;
3924
4064
  /**
@@ -3959,7 +4099,7 @@ export type DeleteCollectionErrors = {
3959
4099
  */
3960
4100
  400: Error400;
3961
4101
  /**
3962
- * Unauthorized
4102
+ * Unauthorized (session)
3963
4103
  */
3964
4104
  401: Error401;
3965
4105
  /**
@@ -3997,19 +4137,13 @@ export type GetCollectionData = {
3997
4137
  };
3998
4138
  query?: {
3999
4139
  /**
4000
- * Cursor offset for paginated segments
4001
- */
4002
- cursor?: number;
4003
- /**
4004
- * Page number (1-indexed)
4005
- *
4006
- * @deprecated
4140
+ * Opaque pagination cursor token for paginated segments
4007
4141
  */
4008
- page?: number;
4142
+ cursor?: string;
4009
4143
  /**
4010
4144
  * Items per page
4011
4145
  */
4012
- limit?: number;
4146
+ take?: number;
4013
4147
  };
4014
4148
  url: '/v1/collections/{id}';
4015
4149
  };
@@ -4019,7 +4153,7 @@ export type GetCollectionErrors = {
4019
4153
  */
4020
4154
  400: Error400;
4021
4155
  /**
4022
- * Unauthorized
4156
+ * Unauthorized (session)
4023
4157
  */
4024
4158
  401: Error401;
4025
4159
  /**
@@ -4067,7 +4201,7 @@ export type UpdateCollectionErrors = {
4067
4201
  */
4068
4202
  400: Error400;
4069
4203
  /**
4070
- * Unauthorized
4204
+ * Unauthorized (session)
4071
4205
  */
4072
4206
  401: Error401;
4073
4207
  /**
@@ -4090,19 +4224,122 @@ export type UpdateCollectionErrors = {
4090
4224
  export type UpdateCollectionError = UpdateCollectionErrors[keyof UpdateCollectionErrors];
4091
4225
  export type UpdateCollectionResponses = {
4092
4226
  /**
4093
- * OK
4227
+ * OK
4228
+ */
4229
+ 200: Collection;
4230
+ };
4231
+ export type UpdateCollectionResponse = UpdateCollectionResponses[keyof UpdateCollectionResponses];
4232
+ export type AddSegmentToCollectionData = {
4233
+ body: {
4234
+ /**
4235
+ * UUID of the segment to add
4236
+ */
4237
+ segmentUuid: string;
4238
+ /**
4239
+ * Optional annotation
4240
+ */
4241
+ note?: string;
4242
+ };
4243
+ path: {
4244
+ /**
4245
+ * Collection ID
4246
+ */
4247
+ id: number;
4248
+ };
4249
+ query?: never;
4250
+ url: '/v1/collections/{id}/segments';
4251
+ };
4252
+ export type AddSegmentToCollectionErrors = {
4253
+ /**
4254
+ * Bad Request
4255
+ */
4256
+ 400: Error400;
4257
+ /**
4258
+ * Unauthorized (session)
4259
+ */
4260
+ 401: Error401;
4261
+ /**
4262
+ * Forbidden
4263
+ */
4264
+ 403: Error403;
4265
+ /**
4266
+ * Not Found
4267
+ */
4268
+ 404: Error404;
4269
+ /**
4270
+ * Too Many Requests
4271
+ */
4272
+ 429: Error429;
4273
+ /**
4274
+ * Internal Server Error
4275
+ */
4276
+ 500: Error500;
4277
+ };
4278
+ export type AddSegmentToCollectionError = AddSegmentToCollectionErrors[keyof AddSegmentToCollectionErrors];
4279
+ export type AddSegmentToCollectionResponses = {
4280
+ /**
4281
+ * No Content
4282
+ */
4283
+ 204: void;
4284
+ };
4285
+ export type AddSegmentToCollectionResponse = AddSegmentToCollectionResponses[keyof AddSegmentToCollectionResponses];
4286
+ export type RemoveSegmentFromCollectionData = {
4287
+ body?: never;
4288
+ path: {
4289
+ /**
4290
+ * Collection ID
4291
+ */
4292
+ id: number;
4293
+ /**
4294
+ * Segment UUID
4295
+ */
4296
+ uuid: string;
4297
+ };
4298
+ query?: never;
4299
+ url: '/v1/collections/{id}/segments/{uuid}';
4300
+ };
4301
+ export type RemoveSegmentFromCollectionErrors = {
4302
+ /**
4303
+ * Bad Request
4304
+ */
4305
+ 400: Error400;
4306
+ /**
4307
+ * Unauthorized (session)
4308
+ */
4309
+ 401: Error401;
4310
+ /**
4311
+ * Forbidden
4312
+ */
4313
+ 403: Error403;
4314
+ /**
4315
+ * Not Found
4316
+ */
4317
+ 404: Error404;
4318
+ /**
4319
+ * Too Many Requests
4320
+ */
4321
+ 429: Error429;
4322
+ /**
4323
+ * Internal Server Error
4324
+ */
4325
+ 500: Error500;
4326
+ };
4327
+ export type RemoveSegmentFromCollectionError = RemoveSegmentFromCollectionErrors[keyof RemoveSegmentFromCollectionErrors];
4328
+ export type RemoveSegmentFromCollectionResponses = {
4329
+ /**
4330
+ * No Content
4094
4331
  */
4095
- 200: Collection;
4332
+ 204: void;
4096
4333
  };
4097
- export type UpdateCollectionResponse = UpdateCollectionResponses[keyof UpdateCollectionResponses];
4098
- export type AddSegmentToCollectionData = {
4334
+ export type RemoveSegmentFromCollectionResponse = RemoveSegmentFromCollectionResponses[keyof RemoveSegmentFromCollectionResponses];
4335
+ export type UpdateCollectionSegmentData = {
4099
4336
  body: {
4100
4337
  /**
4101
- * UUID of the segment to add
4338
+ * New position in the collection
4102
4339
  */
4103
- segmentUuid: string;
4340
+ position?: number;
4104
4341
  /**
4105
- * Optional annotation
4342
+ * Updated annotation
4106
4343
  */
4107
4344
  note?: string;
4108
4345
  };
@@ -4111,17 +4348,21 @@ export type AddSegmentToCollectionData = {
4111
4348
  * Collection ID
4112
4349
  */
4113
4350
  id: number;
4351
+ /**
4352
+ * Segment UUID
4353
+ */
4354
+ uuid: string;
4114
4355
  };
4115
4356
  query?: never;
4116
- url: '/v1/collections/{id}/segments';
4357
+ url: '/v1/collections/{id}/segments/{uuid}';
4117
4358
  };
4118
- export type AddSegmentToCollectionErrors = {
4359
+ export type UpdateCollectionSegmentErrors = {
4119
4360
  /**
4120
4361
  * Bad Request
4121
4362
  */
4122
4363
  400: Error400;
4123
4364
  /**
4124
- * Unauthorized
4365
+ * Unauthorized (session)
4125
4366
  */
4126
4367
  401: Error401;
4127
4368
  /**
@@ -4141,36 +4382,41 @@ export type AddSegmentToCollectionErrors = {
4141
4382
  */
4142
4383
  500: Error500;
4143
4384
  };
4144
- export type AddSegmentToCollectionError = AddSegmentToCollectionErrors[keyof AddSegmentToCollectionErrors];
4145
- export type AddSegmentToCollectionResponses = {
4385
+ export type UpdateCollectionSegmentError = UpdateCollectionSegmentErrors[keyof UpdateCollectionSegmentErrors];
4386
+ export type UpdateCollectionSegmentResponses = {
4146
4387
  /**
4147
4388
  * No Content
4148
4389
  */
4149
4390
  204: void;
4150
4391
  };
4151
- export type AddSegmentToCollectionResponse = AddSegmentToCollectionResponses[keyof AddSegmentToCollectionResponses];
4152
- export type RemoveSegmentFromCollectionData = {
4392
+ export type UpdateCollectionSegmentResponse = UpdateCollectionSegmentResponses[keyof UpdateCollectionSegmentResponses];
4393
+ export type SearchCollectionSegmentsData = {
4153
4394
  body?: never;
4154
4395
  path: {
4155
4396
  /**
4156
4397
  * Collection ID
4157
4398
  */
4158
4399
  id: number;
4400
+ };
4401
+ query?: {
4159
4402
  /**
4160
- * Segment UUID
4403
+ * Opaque cursor token for pagination
4161
4404
  */
4162
- uuid: string;
4405
+ cursor?: string;
4406
+ /**
4407
+ * Items per page
4408
+ */
4409
+ take?: number;
4163
4410
  };
4164
- query?: never;
4165
- url: '/v1/collections/{id}/segments/{uuid}';
4411
+ url: '/v1/collections/{id}/search';
4166
4412
  };
4167
- export type RemoveSegmentFromCollectionErrors = {
4413
+ export type SearchCollectionSegmentsErrors = {
4168
4414
  /**
4169
4415
  * Bad Request
4170
4416
  */
4171
4417
  400: Error400;
4172
4418
  /**
4173
- * Unauthorized
4419
+ * Unauthorized (session)
4174
4420
  */
4175
4421
  401: Error401;
4176
4422
  /**
@@ -4190,45 +4436,32 @@ export type RemoveSegmentFromCollectionErrors = {
4190
4436
  */
4191
4437
  500: Error500;
4192
4438
  };
4193
- export type RemoveSegmentFromCollectionError = RemoveSegmentFromCollectionErrors[keyof RemoveSegmentFromCollectionErrors];
4194
- export type RemoveSegmentFromCollectionResponses = {
4439
+ export type SearchCollectionSegmentsError = SearchCollectionSegmentsErrors[keyof SearchCollectionSegmentsErrors];
4440
+ export type SearchCollectionSegmentsResponses = {
4195
4441
  /**
4196
- * No Content
4442
+ * OK
4197
4443
  */
4198
- 204: void;
4444
+ 200: SearchResponse;
4199
4445
  };
4200
- export type RemoveSegmentFromCollectionResponse = RemoveSegmentFromCollectionResponses[keyof RemoveSegmentFromCollectionResponses];
4201
- export type UpdateCollectionSegmentData = {
4202
- body: {
4203
- /**
4204
- * New position in the collection
4205
- */
4206
- position?: number;
4207
- /**
4208
- * Updated annotation
4209
- */
4210
- note?: string;
4211
- };
4446
+ export type SearchCollectionSegmentsResponse = SearchCollectionSegmentsResponses[keyof SearchCollectionSegmentsResponses];
4447
+ export type GetCollectionStatsData = {
4448
+ body?: never;
4212
4449
  path: {
4213
4450
  /**
4214
4451
  * Collection ID
4215
4452
  */
4216
4453
  id: number;
4217
- /**
4218
- * Segment UUID
4219
- */
4220
- uuid: string;
4221
4454
  };
4222
4455
  query?: never;
4223
- url: '/v1/collections/{id}/segments/{uuid}';
4456
+ url: '/v1/collections/{id}/stats';
4224
4457
  };
4225
- export type UpdateCollectionSegmentErrors = {
4458
+ export type GetCollectionStatsErrors = {
4226
4459
  /**
4227
4460
  * Bad Request
4228
4461
  */
4229
4462
  400: Error400;
4230
4463
  /**
4231
- * Unauthorized
4464
+ * Unauthorized (session)
4232
4465
  */
4233
4466
  401: Error401;
4234
4467
  /**
@@ -4248,14 +4481,14 @@ export type UpdateCollectionSegmentErrors = {
4248
4481
  */
4249
4482
  500: Error500;
4250
4483
  };
4251
- export type UpdateCollectionSegmentError = UpdateCollectionSegmentErrors[keyof UpdateCollectionSegmentErrors];
4252
- export type UpdateCollectionSegmentResponses = {
4484
+ export type GetCollectionStatsError = GetCollectionStatsErrors[keyof GetCollectionStatsErrors];
4485
+ export type GetCollectionStatsResponses = {
4253
4486
  /**
4254
- * No Content
4487
+ * OK
4255
4488
  */
4256
- 204: void;
4489
+ 200: SearchStatsResponse;
4257
4490
  };
4258
- export type UpdateCollectionSegmentResponse = UpdateCollectionSegmentResponses[keyof UpdateCollectionSegmentResponses];
4491
+ export type GetCollectionStatsResponse = GetCollectionStatsResponses[keyof GetCollectionStatsResponses];
4259
4492
  export type GetAdminDashboardData = {
4260
4493
  body?: never;
4261
4494
  path?: never;
@@ -4264,7 +4497,7 @@ export type GetAdminDashboardData = {
4264
4497
  };
4265
4498
  export type GetAdminDashboardErrors = {
4266
4499
  /**
4267
- * Unauthorized
4500
+ * Unauthorized (session)
4268
4501
  */
4269
4502
  401: Error401;
4270
4503
  /**
@@ -4356,7 +4589,7 @@ export type GetAdminHealthData = {
4356
4589
  };
4357
4590
  export type GetAdminHealthErrors = {
4358
4591
  /**
4359
- * Unauthorized
4592
+ * Unauthorized (session)
4360
4593
  */
4361
4594
  401: Error401;
4362
4595
  /**
@@ -4418,7 +4651,7 @@ export type TriggerReindexErrors = {
4418
4651
  */
4419
4652
  400: Error400;
4420
4653
  /**
4421
- * Unauthorized
4654
+ * Unauthorized (session)
4422
4655
  */
4423
4656
  401: Error401;
4424
4657
  /**
@@ -4454,7 +4687,7 @@ export type ListAdminQueueStatsErrors = {
4454
4687
  */
4455
4688
  400: Error400;
4456
4689
  /**
4457
- * Unauthorized
4690
+ * Unauthorized (session)
4458
4691
  */
4459
4692
  401: Error401;
4460
4693
  /**
@@ -4476,15 +4709,15 @@ export type ListAdminQueueStatsResponses = {
4476
4709
  * Queue statistics retrieved successfully
4477
4710
  */
4478
4711
  200: Array<{
4479
- queue?: string;
4712
+ queue: string;
4480
4713
  /**
4481
4714
  * Number of jobs currently pending/active
4482
4715
  */
4483
- stuckCount?: number;
4716
+ stuckCount: number;
4484
4717
  /**
4485
4718
  * Number of failed jobs
4486
4719
  */
4487
- failedCount?: number;
4720
+ failedCount: number;
4488
4721
  }>;
4489
4722
  };
4490
4723
  export type ListAdminQueueStatsResponse = ListAdminQueueStatsResponses[keyof ListAdminQueueStatsResponses];
@@ -4505,7 +4738,7 @@ export type GetAdminQueueErrors = {
4505
4738
  */
4506
4739
  400: Error400;
4507
4740
  /**
4508
- * Unauthorized
4741
+ * Unauthorized (session)
4509
4742
  */
4510
4743
  401: Error401;
4511
4744
  /**
@@ -4590,7 +4823,7 @@ export type ListAdminQueueFailedErrors = {
4590
4823
  */
4591
4824
  400: Error400;
4592
4825
  /**
4593
- * Unauthorized
4826
+ * Unauthorized (session)
4594
4827
  */
4595
4828
  401: Error401;
4596
4829
  /**
@@ -4615,19 +4848,19 @@ export type ListAdminQueueFailedResponses = {
4615
4848
  /**
4616
4849
  * Job ID
4617
4850
  */
4618
- id?: string;
4851
+ id: string;
4619
4852
  /**
4620
4853
  * The segment ID that failed to sync
4621
4854
  */
4622
- segmentId?: number;
4855
+ segmentId: number;
4623
4856
  /**
4624
4857
  * Error message from the last attempt
4625
4858
  */
4626
- error?: string;
4859
+ error: string;
4627
4860
  /**
4628
4861
  * When the job was created
4629
4862
  */
4630
- createdOn?: string;
4863
+ createdOn: string;
4631
4864
  }>;
4632
4865
  };
4633
4866
  export type ListAdminQueueFailedResponse = ListAdminQueueFailedResponses[keyof ListAdminQueueFailedResponses];
@@ -4648,7 +4881,7 @@ export type RetryAdminQueueFailedErrors = {
4648
4881
  */
4649
4882
  400: Error400;
4650
4883
  /**
4651
- * Unauthorized
4884
+ * Unauthorized (session)
4652
4885
  */
4653
4886
  401: Error401;
4654
4887
  /**
@@ -4670,12 +4903,12 @@ export type RetryAdminQueueFailedResponses = {
4670
4903
  * Jobs queued for retry
4671
4904
  */
4672
4905
  200: {
4673
- success?: boolean;
4906
+ success: boolean;
4674
4907
  /**
4675
4908
  * Number of jobs queued for retry
4676
4909
  */
4677
- retriedCount?: number;
4678
- message?: string;
4910
+ retriedCount: number;
4911
+ message: string;
4679
4912
  };
4680
4913
  };
4681
4914
  export type RetryAdminQueueFailedResponse = RetryAdminQueueFailedResponses[keyof RetryAdminQueueFailedResponses];
@@ -4696,7 +4929,7 @@ export type PurgeAdminQueueFailedErrors = {
4696
4929
  */
4697
4930
  400: Error400;
4698
4931
  /**
4699
- * Unauthorized
4932
+ * Unauthorized (session)
4700
4933
  */
4701
4934
  401: Error401;
4702
4935
  /**
@@ -4718,27 +4951,105 @@ export type PurgeAdminQueueFailedResponses = {
4718
4951
  * Failed jobs purged successfully
4719
4952
  */
4720
4953
  200: {
4721
- success?: boolean;
4954
+ success: boolean;
4722
4955
  /**
4723
4956
  * Number of failed jobs deleted
4724
4957
  */
4725
- purgedCount?: number;
4726
- message?: string;
4958
+ purgedCount: number;
4959
+ message: string;
4727
4960
  };
4728
4961
  };
4729
4962
  export type PurgeAdminQueueFailedResponse = PurgeAdminQueueFailedResponses[keyof PurgeAdminQueueFailedResponses];
4963
+ export type ClearAdminImpersonationData = {
4964
+ body?: never;
4965
+ path?: never;
4966
+ query?: never;
4967
+ url: '/v1/admin/impersonation';
4968
+ };
4969
+ export type ClearAdminImpersonationErrors = {
4970
+ /**
4971
+ * Forbidden
4972
+ */
4973
+ 403: Error403;
4974
+ /**
4975
+ * Too Many Requests
4976
+ */
4977
+ 429: Error429;
4978
+ /**
4979
+ * Internal Server Error
4980
+ */
4981
+ 500: Error500;
4982
+ };
4983
+ export type ClearAdminImpersonationError = ClearAdminImpersonationErrors[keyof ClearAdminImpersonationErrors];
4984
+ export type ClearAdminImpersonationResponses = {
4985
+ /**
4986
+ * Impersonation session cleared
4987
+ */
4988
+ 200: {
4989
+ message: string;
4990
+ };
4991
+ };
4992
+ export type ClearAdminImpersonationResponse = ClearAdminImpersonationResponses[keyof ClearAdminImpersonationResponses];
4993
+ export type ImpersonateAdminUserData = {
4994
+ body: {
4995
+ /**
4996
+ * User ID to impersonate
4997
+ */
4998
+ userId: number;
4999
+ };
5000
+ path?: never;
5001
+ query?: never;
5002
+ url: '/v1/admin/impersonation';
5003
+ };
5004
+ export type ImpersonateAdminUserErrors = {
5005
+ /**
5006
+ * Bad Request
5007
+ */
5008
+ 400: Error400;
5009
+ /**
5010
+ * Forbidden
5011
+ */
5012
+ 403: Error403;
5013
+ /**
5014
+ * Not Found
5015
+ */
5016
+ 404: Error404;
5017
+ /**
5018
+ * Too Many Requests
5019
+ */
5020
+ 429: Error429;
5021
+ /**
5022
+ * Internal Server Error
5023
+ */
5024
+ 500: Error500;
5025
+ };
5026
+ export type ImpersonateAdminUserError = ImpersonateAdminUserErrors[keyof ImpersonateAdminUserErrors];
5027
+ export type ImpersonateAdminUserResponses = {
5028
+ /**
5029
+ * Impersonation session created
5030
+ */
5031
+ 200: {
5032
+ message: string;
5033
+ user: {
5034
+ id: number;
5035
+ username: string;
5036
+ email: string;
5037
+ };
5038
+ };
5039
+ };
5040
+ export type ImpersonateAdminUserResponse = ImpersonateAdminUserResponses[keyof ImpersonateAdminUserResponses];
4730
5041
  export type ListAdminReportsData = {
4731
5042
  body?: never;
4732
5043
  path?: never;
4733
5044
  query?: {
4734
5045
  /**
4735
- * Cursor for pagination (report ID to start after)
5046
+ * Opaque pagination cursor token
4736
5047
  */
4737
- cursor?: number;
5048
+ cursor?: string;
4738
5049
  /**
4739
5050
  * Number of results per page
4740
5051
  */
4741
- limit?: number;
5052
+ take?: number;
4742
5053
  /**
4743
5054
  * Filter by report status
4744
5055
  */
@@ -4764,15 +5075,15 @@ export type ListAdminReportsData = {
4764
5075
  */
4765
5076
  'target.segmentUuid'?: string;
4766
5077
  /**
4767
- * Filter by review check run ID
5078
+ * Filter by audit run ID
4768
5079
  */
4769
- reviewCheckRunId?: number;
5080
+ auditRunId?: number;
4770
5081
  };
4771
5082
  url: '/v1/admin/reports';
4772
5083
  };
4773
5084
  export type ListAdminReportsErrors = {
4774
5085
  /**
4775
- * Unauthorized
5086
+ * Unauthorized (session)
4776
5087
  */
4777
5088
  401: Error401;
4778
5089
  /**
@@ -4813,7 +5124,7 @@ export type UpdateAdminReportErrors = {
4813
5124
  */
4814
5125
  400: Error400;
4815
5126
  /**
4816
- * Unauthorized
5127
+ * Unauthorized (session)
4817
5128
  */
4818
5129
  401: Error401;
4819
5130
  /**
@@ -4841,56 +5152,15 @@ export type UpdateAdminReportResponses = {
4841
5152
  200: Report;
4842
5153
  };
4843
5154
  export type UpdateAdminReportResponse = UpdateAdminReportResponses[keyof UpdateAdminReportResponses];
4844
- export type RunAdminReviewData = {
4845
- body?: never;
4846
- path?: never;
4847
- query?: {
4848
- /**
4849
- * Optional category filter
4850
- */
4851
- category?: 'ANIME' | 'JDRAMA';
4852
- /**
4853
- * Optional check name to run a single check instead of all
4854
- */
4855
- checkName?: string;
4856
- };
4857
- url: '/v1/admin/review/run';
4858
- };
4859
- export type RunAdminReviewErrors = {
4860
- /**
4861
- * Unauthorized
4862
- */
4863
- 401: Error401;
4864
- /**
4865
- * Forbidden
4866
- */
4867
- 403: Error403;
4868
- /**
4869
- * Too Many Requests
4870
- */
4871
- 429: Error429;
4872
- /**
4873
- * Internal Server Error
4874
- */
4875
- 500: Error500;
4876
- };
4877
- export type RunAdminReviewError = RunAdminReviewErrors[keyof RunAdminReviewErrors];
4878
- export type RunAdminReviewResponses = {
4879
- /**
4880
- * Check run completed
4881
- */
4882
- 200: RunReviewResponse;
4883
- };
4884
- export type RunAdminReviewResponse = RunAdminReviewResponses[keyof RunAdminReviewResponses];
4885
- export type ListAdminReviewChecksData = {
5155
+ export type ListAdminMediaAuditsData = {
4886
5156
  body?: never;
4887
5157
  path?: never;
4888
5158
  query?: never;
4889
- url: '/v1/admin/review/checks';
5159
+ url: '/v1/admin/media/audits';
4890
5160
  };
4891
- export type ListAdminReviewChecksErrors = {
5161
+ export type ListAdminMediaAuditsErrors = {
4892
5162
  /**
4893
- * Unauthorized
5163
+ * Unauthorized (session)
4894
5164
  */
4895
5165
  401: Error401;
4896
5166
  /**
@@ -4906,15 +5176,15 @@ export type ListAdminReviewChecksErrors = {
4906
5176
  */
4907
5177
  500: Error500;
4908
5178
  };
4909
- export type ListAdminReviewChecksError = ListAdminReviewChecksErrors[keyof ListAdminReviewChecksErrors];
4910
- export type ListAdminReviewChecksResponses = {
5179
+ export type ListAdminMediaAuditsError = ListAdminMediaAuditsErrors[keyof ListAdminMediaAuditsErrors];
5180
+ export type ListAdminMediaAuditsResponses = {
4911
5181
  /**
4912
5182
  * OK
4913
5183
  */
4914
- 200: Array<ReviewCheck>;
5184
+ 200: Array<MediaAudit>;
4915
5185
  };
4916
- export type ListAdminReviewChecksResponse = ListAdminReviewChecksResponses[keyof ListAdminReviewChecksResponses];
4917
- export type UpdateAdminReviewCheckData = {
5186
+ export type ListAdminMediaAuditsResponse = ListAdminMediaAuditsResponses[keyof ListAdminMediaAuditsResponses];
5187
+ export type UpdateAdminMediaAuditData = {
4918
5188
  body: {
4919
5189
  /**
4920
5190
  * New threshold values
@@ -4923,26 +5193,26 @@ export type UpdateAdminReviewCheckData = {
4923
5193
  [key: string]: unknown;
4924
5194
  };
4925
5195
  /**
4926
- * Enable or disable this check
5196
+ * Enable or disable this audit
4927
5197
  */
4928
5198
  enabled?: boolean;
4929
5199
  };
4930
5200
  path: {
4931
5201
  /**
4932
- * Check name identifier
5202
+ * Audit name identifier
4933
5203
  */
4934
5204
  name: string;
4935
5205
  };
4936
5206
  query?: never;
4937
- url: '/v1/admin/review/checks/{name}';
5207
+ url: '/v1/admin/media/audits/{name}';
4938
5208
  };
4939
- export type UpdateAdminReviewCheckErrors = {
5209
+ export type UpdateAdminMediaAuditErrors = {
4940
5210
  /**
4941
5211
  * Bad Request
4942
5212
  */
4943
5213
  400: Error400;
4944
5214
  /**
4945
- * Unauthorized
5215
+ * Unauthorized (session)
4946
5216
  */
4947
5217
  401: Error401;
4948
5218
  /**
@@ -4962,76 +5232,33 @@ export type UpdateAdminReviewCheckErrors = {
4962
5232
  */
4963
5233
  500: Error500;
4964
5234
  };
4965
- export type UpdateAdminReviewCheckError = UpdateAdminReviewCheckErrors[keyof UpdateAdminReviewCheckErrors];
4966
- export type UpdateAdminReviewCheckResponses = {
5235
+ export type UpdateAdminMediaAuditError = UpdateAdminMediaAuditErrors[keyof UpdateAdminMediaAuditErrors];
5236
+ export type UpdateAdminMediaAuditResponses = {
4967
5237
  /**
4968
- * Check updated successfully
5238
+ * Audit updated successfully
4969
5239
  */
4970
- 200: ReviewCheck;
5240
+ 200: MediaAudit;
4971
5241
  };
4972
- export type UpdateAdminReviewCheckResponse = UpdateAdminReviewCheckResponses[keyof UpdateAdminReviewCheckResponses];
4973
- export type ListAdminReviewRunsData = {
5242
+ export type UpdateAdminMediaAuditResponse = UpdateAdminMediaAuditResponses[keyof UpdateAdminMediaAuditResponses];
5243
+ export type RunAdminMediaAuditData = {
4974
5244
  body?: never;
4975
- path?: never;
4976
- query?: {
4977
- /**
4978
- * Filter by check name
4979
- */
4980
- checkName?: string;
4981
- /**
4982
- * Cursor for pagination
4983
- */
4984
- cursor?: number;
5245
+ path: {
4985
5246
  /**
4986
- * Number of results per page
5247
+ * Audit name to run, or "all" to run all enabled audits
4987
5248
  */
4988
- limit?: number;
4989
- };
4990
- url: '/v1/admin/review/runs';
4991
- };
4992
- export type ListAdminReviewRunsErrors = {
4993
- /**
4994
- * Unauthorized
4995
- */
4996
- 401: Error401;
4997
- /**
4998
- * Forbidden
4999
- */
5000
- 403: Error403;
5001
- /**
5002
- * Too Many Requests
5003
- */
5004
- 429: Error429;
5005
- /**
5006
- * Internal Server Error
5007
- */
5008
- 500: Error500;
5009
- };
5010
- export type ListAdminReviewRunsError = ListAdminReviewRunsErrors[keyof ListAdminReviewRunsErrors];
5011
- export type ListAdminReviewRunsResponses = {
5012
- /**
5013
- * OK
5014
- */
5015
- 200: {
5016
- runs: Array<ReviewCheckRun>;
5017
- pagination: CursorPagination;
5249
+ name: string;
5018
5250
  };
5019
- };
5020
- export type ListAdminReviewRunsResponse = ListAdminReviewRunsResponses[keyof ListAdminReviewRunsResponses];
5021
- export type GetAdminReviewRunData = {
5022
- body?: never;
5023
- path: {
5251
+ query?: {
5024
5252
  /**
5025
- * Run ID
5253
+ * Optional category filter
5026
5254
  */
5027
- id: number;
5255
+ category?: 'ANIME' | 'JDRAMA';
5028
5256
  };
5029
- query?: never;
5030
- url: '/v1/admin/review/runs/{id}';
5257
+ url: '/v1/admin/media/audits/{name}/run';
5031
5258
  };
5032
- export type GetAdminReviewRunErrors = {
5259
+ export type RunAdminMediaAuditErrors = {
5033
5260
  /**
5034
- * Unauthorized
5261
+ * Unauthorized (session)
5035
5262
  */
5036
5263
  401: Error401;
5037
5264
  /**
@@ -5051,94 +5278,42 @@ export type GetAdminReviewRunErrors = {
5051
5278
  */
5052
5279
  500: Error500;
5053
5280
  };
5054
- export type GetAdminReviewRunError = GetAdminReviewRunErrors[keyof GetAdminReviewRunErrors];
5055
- export type GetAdminReviewRunResponses = {
5281
+ export type RunAdminMediaAuditError = RunAdminMediaAuditErrors[keyof RunAdminMediaAuditErrors];
5282
+ export type RunAdminMediaAuditResponses = {
5056
5283
  /**
5057
- * OK
5284
+ * Audit run completed
5058
5285
  */
5059
- 200: {
5060
- run: ReviewCheckRun;
5061
- reports: Array<Report>;
5062
- };
5286
+ 200: RunAuditResponse;
5063
5287
  };
5064
- export type GetAdminReviewRunResponse = GetAdminReviewRunResponses[keyof GetAdminReviewRunResponses];
5065
- export type ListAdminReviewAllowlistData = {
5288
+ export type RunAdminMediaAuditResponse = RunAdminMediaAuditResponses[keyof RunAdminMediaAuditResponses];
5289
+ export type ListAdminMediaAuditRunsData = {
5066
5290
  body?: never;
5067
5291
  path?: never;
5068
5292
  query?: {
5069
5293
  /**
5070
- * Filter by check name
5071
- */
5072
- checkName?: string;
5073
- };
5074
- url: '/v1/admin/review/allowlist';
5075
- };
5076
- export type ListAdminReviewAllowlistErrors = {
5077
- /**
5078
- * Unauthorized
5079
- */
5080
- 401: Error401;
5081
- /**
5082
- * Forbidden
5083
- */
5084
- 403: Error403;
5085
- /**
5086
- * Too Many Requests
5087
- */
5088
- 429: Error429;
5089
- /**
5090
- * Internal Server Error
5091
- */
5092
- 500: Error500;
5093
- };
5094
- export type ListAdminReviewAllowlistError = ListAdminReviewAllowlistErrors[keyof ListAdminReviewAllowlistErrors];
5095
- export type ListAdminReviewAllowlistResponses = {
5096
- /**
5097
- * OK
5098
- */
5099
- 200: Array<ReviewAllowlist>;
5100
- };
5101
- export type ListAdminReviewAllowlistResponse = ListAdminReviewAllowlistResponses[keyof ListAdminReviewAllowlistResponses];
5102
- export type CreateAdminReviewAllowlistEntryData = {
5103
- body: {
5104
- /**
5105
- * Check name to allowlist for
5106
- */
5107
- checkName: string;
5108
- /**
5109
- * Media ID to allowlist
5294
+ * Filter by audit name
5110
5295
  */
5111
- mediaId: number;
5296
+ auditName?: string;
5112
5297
  /**
5113
- * Episode number (for episode-level checks)
5298
+ * Opaque pagination cursor token
5114
5299
  */
5115
- episodeNumber?: number;
5300
+ cursor?: string;
5116
5301
  /**
5117
- * Reason for allowlisting
5302
+ * Number of results per page
5118
5303
  */
5119
- reason?: string;
5304
+ take?: number;
5120
5305
  };
5121
- path?: never;
5122
- query?: never;
5123
- url: '/v1/admin/review/allowlist';
5306
+ url: '/v1/admin/media/audits/runs';
5124
5307
  };
5125
- export type CreateAdminReviewAllowlistEntryErrors = {
5126
- /**
5127
- * Bad Request
5128
- */
5129
- 400: Error400;
5308
+ export type ListAdminMediaAuditRunsErrors = {
5130
5309
  /**
5131
- * Unauthorized
5310
+ * Unauthorized (session)
5132
5311
  */
5133
5312
  401: Error401;
5134
5313
  /**
5135
5314
  * Forbidden
5136
5315
  */
5137
5316
  403: Error403;
5138
- /**
5139
- * Conflict
5140
- */
5141
- 409: Error409;
5142
5317
  /**
5143
5318
  * Too Many Requests
5144
5319
  */
@@ -5148,28 +5323,31 @@ export type CreateAdminReviewAllowlistEntryErrors = {
5148
5323
  */
5149
5324
  500: Error500;
5150
5325
  };
5151
- export type CreateAdminReviewAllowlistEntryError = CreateAdminReviewAllowlistEntryErrors[keyof CreateAdminReviewAllowlistEntryErrors];
5152
- export type CreateAdminReviewAllowlistEntryResponses = {
5326
+ export type ListAdminMediaAuditRunsError = ListAdminMediaAuditRunsErrors[keyof ListAdminMediaAuditRunsErrors];
5327
+ export type ListAdminMediaAuditRunsResponses = {
5153
5328
  /**
5154
- * Added to allowlist
5329
+ * OK
5155
5330
  */
5156
- 201: ReviewAllowlist;
5331
+ 200: {
5332
+ runs: Array<MediaAuditRun>;
5333
+ pagination: OpaqueCursorPagination;
5334
+ };
5157
5335
  };
5158
- export type CreateAdminReviewAllowlistEntryResponse = CreateAdminReviewAllowlistEntryResponses[keyof CreateAdminReviewAllowlistEntryResponses];
5159
- export type DeleteAdminReviewAllowlistEntryData = {
5336
+ export type ListAdminMediaAuditRunsResponse = ListAdminMediaAuditRunsResponses[keyof ListAdminMediaAuditRunsResponses];
5337
+ export type GetAdminMediaAuditRunData = {
5160
5338
  body?: never;
5161
5339
  path: {
5162
5340
  /**
5163
- * Allowlist entry ID
5341
+ * Run ID
5164
5342
  */
5165
5343
  id: number;
5166
5344
  };
5167
5345
  query?: never;
5168
- url: '/v1/admin/review/allowlist/{id}';
5346
+ url: '/v1/admin/media/audits/runs/{id}';
5169
5347
  };
5170
- export type DeleteAdminReviewAllowlistEntryErrors = {
5348
+ export type GetAdminMediaAuditRunErrors = {
5171
5349
  /**
5172
- * Unauthorized
5350
+ * Unauthorized (session)
5173
5351
  */
5174
5352
  401: Error401;
5175
5353
  /**
@@ -5189,12 +5367,15 @@ export type DeleteAdminReviewAllowlistEntryErrors = {
5189
5367
  */
5190
5368
  500: Error500;
5191
5369
  };
5192
- export type DeleteAdminReviewAllowlistEntryError = DeleteAdminReviewAllowlistEntryErrors[keyof DeleteAdminReviewAllowlistEntryErrors];
5193
- export type DeleteAdminReviewAllowlistEntryResponses = {
5370
+ export type GetAdminMediaAuditRunError = GetAdminMediaAuditRunErrors[keyof GetAdminMediaAuditRunErrors];
5371
+ export type GetAdminMediaAuditRunResponses = {
5194
5372
  /**
5195
- * Removed from allowlist
5373
+ * OK
5196
5374
  */
5197
- 204: void;
5375
+ 200: {
5376
+ run: MediaAuditRun;
5377
+ reports: Array<Report>;
5378
+ };
5198
5379
  };
5199
- export type DeleteAdminReviewAllowlistEntryResponse = DeleteAdminReviewAllowlistEntryResponses[keyof DeleteAdminReviewAllowlistEntryResponses];
5380
+ export type GetAdminMediaAuditRunResponse = GetAdminMediaAuditRunResponses[keyof GetAdminMediaAuditRunResponses];
5200
5381
  //# sourceMappingURL=types.gen.d.ts.map