@brigadasos/nadeshiko-sdk 1.5.0-dev.996fd6f → 1.5.0-dev.9bfc5f7

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.
@@ -6,9 +6,9 @@ export type ClientOptions = {
6
6
  */
7
7
  export type MediaFilterItem = {
8
8
  /**
9
- * Media ID to filter
9
+ * Media identifier (publicId or AniList external ID)
10
10
  */
11
- mediaId: number;
11
+ mediaId: string;
12
12
  /**
13
13
  * Specific episodes (omit for all episodes)
14
14
  */
@@ -144,6 +144,10 @@ export type Segment = {
144
144
  * Unique identifier for the segment
145
145
  */
146
146
  uuid: string;
147
+ /**
148
+ * Public identifier for the segment (use this instead of uuid in public URLs)
149
+ */
150
+ publicId: string;
147
151
  /**
148
152
  * Position of the segment within the episode
149
153
  */
@@ -169,6 +173,10 @@ export type Segment = {
169
173
  * Media ID this segment belongs to
170
174
  */
171
175
  mediaId: number;
176
+ /**
177
+ * Public ID of the media this segment belongs to
178
+ */
179
+ mediaPublicId: string;
172
180
  textJa: {
173
181
  /**
174
182
  * Original Japanese content
@@ -250,6 +258,10 @@ export type Seiyuu = {
250
258
  * Internal seiyuu ID
251
259
  */
252
260
  id: number;
261
+ /**
262
+ * Public identifier for the seiyuu (use this in public URLs)
263
+ */
264
+ publicId: string;
253
265
  externalIds: ExternalId;
254
266
  /**
255
267
  * Japanese name of the voice actor
@@ -295,9 +307,13 @@ export type MediaCharacter = {
295
307
  */
296
308
  export type Media = {
297
309
  /**
298
- * Unique identifier for the media
310
+ * Internal unique identifier for the media
299
311
  */
300
312
  id: number;
313
+ /**
314
+ * Public identifier for the media (use this in public URLs)
315
+ */
316
+ publicId: string;
301
317
  externalIds: ExternalId;
302
318
  /**
303
319
  * Original Japanese name of the media
@@ -390,7 +406,7 @@ export type SearchResponse = {
390
406
  segments: Array<Segment>;
391
407
  includes: {
392
408
  /**
393
- * Media objects keyed by mediaId
409
+ * Media objects keyed by media publicId
394
410
  */
395
411
  media: {
396
412
  [key: string]: Media;
@@ -601,6 +617,10 @@ export type MediaSearchStats = {
601
617
  * Media identifier (look up full details in includes.media)
602
618
  */
603
619
  mediaId: number;
620
+ /**
621
+ * Public identifier for use in URLs and filters
622
+ */
623
+ publicId: string;
604
624
  /**
605
625
  * Number of matching segments found in this media
606
626
  */
@@ -627,7 +647,7 @@ export type SearchStatsResponse = {
627
647
  categories: Array<CategoryCount>;
628
648
  includes: {
629
649
  /**
630
- * Media objects keyed by mediaId
650
+ * Media objects keyed by media publicId
631
651
  */
632
652
  media: {
633
653
  [key: string]: Media;
@@ -719,6 +739,20 @@ export type OpaqueCursorPagination = {
719
739
  export type MediaListResponse = {
720
740
  media: Array<Media>;
721
741
  pagination: OpaqueCursorPagination;
742
+ stats: {
743
+ /**
744
+ * Total number of media across all pages
745
+ */
746
+ totalMedia: number;
747
+ /**
748
+ * Total number of non-deleted segments
749
+ */
750
+ totalSegments: number;
751
+ /**
752
+ * Total number of episodes
753
+ */
754
+ totalEpisodes: number;
755
+ };
722
756
  };
723
757
  /**
724
758
  * Character data for creating/updating media
@@ -866,8 +900,65 @@ export type Error409 = {
866
900
  [key: string]: string;
867
901
  };
868
902
  };
903
+ /**
904
+ * Slim media item returned by autocomplete (names + cover only)
905
+ */
906
+ export type MediaAutocompleteItem = {
907
+ /**
908
+ * Unique identifier for the media
909
+ */
910
+ id: number;
911
+ /**
912
+ * Original Japanese name of the media
913
+ */
914
+ nameJa: string;
915
+ /**
916
+ * Romaji transliteration of the media name
917
+ */
918
+ nameRomaji: string;
919
+ /**
920
+ * English name of the media
921
+ */
922
+ nameEn: string;
923
+ /**
924
+ * Full URL to the cover image
925
+ */
926
+ coverUrl: string;
927
+ category: Category;
928
+ };
869
929
  export type MediaAutocompleteResponse = {
870
- media: Array<Media>;
930
+ media: Array<MediaAutocompleteItem>;
931
+ };
932
+ /**
933
+ * Segment with internal fields. For write operations (create, update) all fields are always populated.
934
+ * For GET, optional fields are only populated when requested via include[].
935
+ *
936
+ */
937
+ export type SegmentInternal = Segment & {
938
+ /**
939
+ * Storage backend for segment assets
940
+ */
941
+ storage?: 'LOCAL' | 'R2';
942
+ /**
943
+ * Hash identifier for the segment
944
+ */
945
+ hashedId?: string;
946
+ /**
947
+ * Base path in the storage backend
948
+ */
949
+ storageBasePath?: string;
950
+ /**
951
+ * Raw WD Tagger v3 classifier output used to derive content rating
952
+ */
953
+ ratingAnalysis?: {
954
+ [key: string]: unknown;
955
+ };
956
+ /**
957
+ * POS tokenization results keyed by engine (sudachi, unidic)
958
+ */
959
+ posAnalysis?: {
960
+ [key: string]: unknown;
961
+ };
871
962
  };
872
963
  /**
873
964
  * Not Found error response
@@ -972,35 +1063,6 @@ export type SegmentUpdateRequest = {
972
1063
  */
973
1064
  hashedId?: string;
974
1065
  };
975
- /**
976
- * Segment with internal fields (for internal API responses)
977
- */
978
- export type SegmentInternal = Segment & {
979
- /**
980
- * Storage backend for segment assets
981
- */
982
- storage: 'LOCAL' | 'R2';
983
- /**
984
- * Hash identifier for the segment
985
- */
986
- hashedId: string;
987
- /**
988
- * Base path in the storage backend
989
- */
990
- storageBasePath: string;
991
- /**
992
- * Raw WD Tagger v3 classifier output used to derive content rating
993
- */
994
- ratingAnalysis: {
995
- [key: string]: unknown;
996
- };
997
- /**
998
- * POS tokenization results keyed by engine (sudachi, unidic)
999
- */
1000
- posAnalysis: {
1001
- [key: string]: unknown;
1002
- };
1003
- };
1004
1066
  export type SegmentContextResponse = {
1005
1067
  segments: Array<Segment>;
1006
1068
  includes: {
@@ -1012,6 +1074,30 @@ export type SegmentContextResponse = {
1012
1074
  };
1013
1075
  };
1014
1076
  };
1077
+ export type SegmentRevision = {
1078
+ /**
1079
+ * Revision ID
1080
+ */
1081
+ id: number;
1082
+ /**
1083
+ * Sequential revision number per segment
1084
+ */
1085
+ revisionNumber: number;
1086
+ /**
1087
+ * Snapshot of editable fields at the time of the revision
1088
+ */
1089
+ snapshot: {
1090
+ [key: string]: unknown;
1091
+ };
1092
+ /**
1093
+ * Name of the user who made the change
1094
+ */
1095
+ userName?: string;
1096
+ /**
1097
+ * When the revision was created
1098
+ */
1099
+ createdAt: string;
1100
+ };
1015
1101
  /**
1016
1102
  * Ordered media series grouping
1017
1103
  */
@@ -1020,6 +1106,10 @@ export type Series = {
1020
1106
  * Series ID
1021
1107
  */
1022
1108
  id: number;
1109
+ /**
1110
+ * Public identifier for the series
1111
+ */
1112
+ publicId: string;
1023
1113
  /**
1024
1114
  * Japanese name of the series
1025
1115
  */
@@ -1076,6 +1166,10 @@ export type Character = {
1076
1166
  * Internal character ID
1077
1167
  */
1078
1168
  id: number;
1169
+ /**
1170
+ * Public identifier for the character (use this in public URLs)
1171
+ */
1172
+ publicId: string;
1079
1173
  externalIds: ExternalId;
1080
1174
  /**
1081
1175
  * Japanese name of the character
@@ -1397,6 +1491,9 @@ export type SegmentCreateRequest = {
1397
1491
  */
1398
1492
  hashedId: string;
1399
1493
  };
1494
+ export type SegmentBatchCreateRequest = {
1495
+ segments: Array<SegmentCreateRequest>;
1496
+ };
1400
1497
  export type UserQuotaResponse = {
1401
1498
  /**
1402
1499
  * Number of API requests used in the current billing period.
@@ -1429,39 +1526,39 @@ export type ReportTargetMedia = {
1429
1526
  */
1430
1527
  type: 'MEDIA';
1431
1528
  /**
1432
- * Media ID this report targets
1529
+ * Public ID of the media this report targets
1433
1530
  */
1434
- mediaId: number;
1531
+ mediaId: string;
1435
1532
  };
1436
- export type ReportTargetSegment = {
1533
+ export type ReportTargetSegmentInput = {
1437
1534
  /**
1438
1535
  * Report target type
1439
1536
  */
1440
1537
  type: 'SEGMENT';
1441
1538
  /**
1442
- * Media ID this report targets
1539
+ * Public ID of the media this report targets
1443
1540
  */
1444
- mediaId: number;
1541
+ mediaId: string;
1445
1542
  /**
1446
1543
  * Episode number containing the segment
1447
1544
  */
1448
1545
  episodeNumber?: number;
1449
1546
  /**
1450
- * Segment UUID this report targets
1547
+ * Segment public ID or UUID
1451
1548
  */
1452
- segmentUuid: string;
1549
+ segmentId: string;
1453
1550
  };
1454
1551
  export type UserReportTarget = ({
1455
1552
  type: 'MEDIA';
1456
1553
  } & ReportTargetMedia) | ({
1457
1554
  type: 'SEGMENT';
1458
- } & ReportTargetSegment);
1555
+ } & ReportTargetSegmentInput);
1459
1556
  export type CreateReportRequest = {
1460
1557
  target: UserReportTarget;
1461
1558
  /**
1462
1559
  * Reason for the report
1463
1560
  */
1464
- reason: 'WRONG_TRANSLATION' | 'WRONG_TIMING' | 'WRONG_AUDIO' | 'NSFW_NOT_TAGGED' | 'DUPLICATE_SEGMENT' | 'WRONG_METADATA' | 'MISSING_EPISODES' | 'WRONG_COVER_IMAGE' | 'INAPPROPRIATE_CONTENT' | 'OTHER';
1561
+ reason: 'WRONG_TRANSLATION' | 'WRONG_TIMING' | 'WRONG_AUDIO' | 'WRONG_JAPANESE_TEXT' | 'LOW_QUALITY_AUDIO' | 'NSFW_NOT_TAGGED' | 'DUPLICATE_SEGMENT' | 'WRONG_TITLE' | 'DUPLICATE_MEDIA' | 'WRONG_EPISODE_NUMBER' | 'IMAGE_ISSUE' | 'MISSING_EPISODES' | 'INAPPROPRIATE_CONTENT' | 'OTHER';
1465
1562
  /**
1466
1563
  * Optional description with additional details
1467
1564
  */
@@ -1473,14 +1570,32 @@ export type ReportTargetEpisode = {
1473
1570
  */
1474
1571
  type: 'EPISODE';
1475
1572
  /**
1476
- * Media ID this report targets
1573
+ * Public ID of the media this report targets
1477
1574
  */
1478
- mediaId: number;
1575
+ mediaId: string;
1479
1576
  /**
1480
1577
  * Episode number this report targets
1481
1578
  */
1482
1579
  episodeNumber: number;
1483
1580
  };
1581
+ export type ReportTargetSegment = {
1582
+ /**
1583
+ * Report target type
1584
+ */
1585
+ type: 'SEGMENT';
1586
+ /**
1587
+ * Public ID of the media this report targets
1588
+ */
1589
+ mediaId: string;
1590
+ /**
1591
+ * Episode number containing the segment
1592
+ */
1593
+ episodeNumber?: number;
1594
+ /**
1595
+ * Segment public ID or UUID
1596
+ */
1597
+ segmentId: string;
1598
+ };
1484
1599
  export type ReportTarget = ({
1485
1600
  type: 'MEDIA';
1486
1601
  } & ReportTargetMedia) | ({
@@ -1505,7 +1620,7 @@ export type Report = {
1505
1620
  /**
1506
1621
  * Reason for the report
1507
1622
  */
1508
- reason: 'WRONG_TRANSLATION' | 'WRONG_TIMING' | 'WRONG_AUDIO' | 'NSFW_NOT_TAGGED' | 'DUPLICATE_SEGMENT' | 'WRONG_METADATA' | 'MISSING_EPISODES' | 'WRONG_COVER_IMAGE' | 'INAPPROPRIATE_CONTENT' | 'OTHER' | 'LOW_SEGMENT_MEDIA' | 'EMPTY_EPISODES' | 'MISSING_EPISODES_AUTO' | 'BAD_SEGMENT_RATIO' | 'MEDIA_WITH_NO_EPISODES' | 'MISSING_TRANSLATIONS' | 'DB_ES_SYNC_ISSUES' | 'HIGH_REPORT_DENSITY';
1623
+ reason: 'WRONG_TRANSLATION' | 'WRONG_TIMING' | 'WRONG_AUDIO' | 'WRONG_JAPANESE_TEXT' | 'LOW_QUALITY_AUDIO' | 'NSFW_NOT_TAGGED' | 'DUPLICATE_SEGMENT' | 'WRONG_METADATA' | 'MISSING_EPISODES' | 'WRONG_COVER_IMAGE' | 'WRONG_TITLE' | 'DUPLICATE_MEDIA' | 'WRONG_EPISODE_NUMBER' | 'IMAGE_ISSUE' | 'INAPPROPRIATE_CONTENT' | 'OTHER' | 'LOW_SEGMENT_MEDIA' | 'EMPTY_EPISODES' | 'MISSING_EPISODES_AUTO' | 'BAD_SEGMENT_RATIO' | 'MEDIA_WITH_NO_EPISODES' | 'MISSING_TRANSLATIONS' | 'DB_ES_SYNC_ISSUES' | 'HIGH_REPORT_DENSITY';
1509
1624
  /**
1510
1625
  * Optional description with additional details
1511
1626
  */
@@ -1584,17 +1699,26 @@ export type UserPreferences = {
1584
1699
  /**
1585
1700
  * Type of user activity
1586
1701
  */
1587
- export type ActivityType = 'SEARCH' | 'ANKI_EXPORT' | 'SEGMENT_PLAY' | 'LIST_ADD_SEGMENT';
1702
+ export type ActivityType = 'SEARCH' | 'ANKI_EXPORT' | 'SEGMENT_PLAY' | 'SHARE';
1588
1703
  export type UserActivity = {
1589
1704
  id: number;
1590
1705
  activityType: ActivityType;
1591
- segmentUuid: string;
1706
+ segmentId: number;
1592
1707
  mediaId: number;
1593
1708
  searchQuery: string;
1594
1709
  mediaName: string;
1595
1710
  japaneseText: string;
1596
1711
  createdAt: string;
1597
1712
  };
1713
+ /**
1714
+ * Activity counts for a single day, broken down by type. Only types with at least 1 event are present.
1715
+ */
1716
+ export type HeatmapDayCounts = {
1717
+ SEARCH?: number;
1718
+ SEGMENT_PLAY?: number;
1719
+ ANKI_EXPORT?: number;
1720
+ SHARE?: number;
1721
+ };
1598
1722
  /**
1599
1723
  * User segment collection
1600
1724
  */
@@ -1603,10 +1727,18 @@ export type Collection = {
1603
1727
  * Collection ID
1604
1728
  */
1605
1729
  id: number;
1730
+ /**
1731
+ * Public identifier for the collection
1732
+ */
1733
+ publicId: string;
1606
1734
  /**
1607
1735
  * Name of the collection
1608
1736
  */
1609
1737
  name: string;
1738
+ /**
1739
+ * Type of the collection
1740
+ */
1741
+ type: 'USER' | 'ANKI_EXPORT';
1610
1742
  /**
1611
1743
  * Visibility of the collection
1612
1744
  */
@@ -1626,9 +1758,9 @@ export type Collection = {
1626
1758
  };
1627
1759
  export type UserExportCollection = Collection & {
1628
1760
  /**
1629
- * Segment UUIDs in saved order
1761
+ * Segment IDs in saved order
1630
1762
  */
1631
- segmentUuids: Array<string>;
1763
+ segmentIds: Array<number>;
1632
1764
  };
1633
1765
  /**
1634
1766
  * User data export payload (identifier-oriented references)
@@ -2202,11 +2334,16 @@ export type GetSegmentByUuidData = {
2202
2334
  body?: never;
2203
2335
  path: {
2204
2336
  /**
2205
- * Segment UUID
2337
+ * Segment UUID or publicId
2206
2338
  */
2207
2339
  uuid: string;
2208
2340
  };
2209
- query?: never;
2341
+ query?: {
2342
+ /**
2343
+ * Additional internal fields to include in the response
2344
+ */
2345
+ include?: Array<'ratingAnalysis' | 'posAnalysis' | 'hashedId' | 'storageBasePath' | 'storage'>;
2346
+ };
2210
2347
  url: '/v1/media/segments/{uuid}';
2211
2348
  };
2212
2349
  export type GetSegmentByUuidErrors = {
@@ -2215,7 +2352,7 @@ export type GetSegmentByUuidErrors = {
2215
2352
  */
2216
2353
  400: Error400;
2217
2354
  /**
2218
- * Unauthorized (API key)
2355
+ * Unauthorized (API key or session)
2219
2356
  */
2220
2357
  401: Error401;
2221
2358
  /**
@@ -2238,16 +2375,16 @@ export type GetSegmentByUuidErrors = {
2238
2375
  export type GetSegmentByUuidError = GetSegmentByUuidErrors[keyof GetSegmentByUuidErrors];
2239
2376
  export type GetSegmentByUuidResponses = {
2240
2377
  /**
2241
- * OK
2378
+ * Single segment response with internal fields
2242
2379
  */
2243
- 200: Segment;
2380
+ 200: SegmentInternal;
2244
2381
  };
2245
2382
  export type GetSegmentByUuidResponse = GetSegmentByUuidResponses[keyof GetSegmentByUuidResponses];
2246
2383
  export type UpdateSegmentByUuidData = {
2247
2384
  body: SegmentUpdateRequest;
2248
2385
  path: {
2249
2386
  /**
2250
- * Segment UUID
2387
+ * Segment UUID or publicId
2251
2388
  */
2252
2389
  uuid: string;
2253
2390
  };
@@ -2292,7 +2429,7 @@ export type GetSegmentContextData = {
2292
2429
  body?: never;
2293
2430
  path: {
2294
2431
  /**
2295
- * Segment UUID
2432
+ * Segment UUID or publicId
2296
2433
  */
2297
2434
  uuid: string;
2298
2435
  };
@@ -2314,7 +2451,7 @@ export type GetSegmentContextErrors = {
2314
2451
  */
2315
2452
  400: Error400;
2316
2453
  /**
2317
- * Unauthorized (API key)
2454
+ * Unauthorized (API key or session)
2318
2455
  */
2319
2456
  401: Error401;
2320
2457
  /**
@@ -2342,6 +2479,53 @@ export type GetSegmentContextResponses = {
2342
2479
  200: SegmentContextResponse;
2343
2480
  };
2344
2481
  export type GetSegmentContextResponse = GetSegmentContextResponses[keyof GetSegmentContextResponses];
2482
+ export type ListSegmentRevisionsData = {
2483
+ body?: never;
2484
+ path: {
2485
+ /**
2486
+ * Segment UUID or publicId
2487
+ */
2488
+ uuid: string;
2489
+ };
2490
+ query?: never;
2491
+ url: '/v1/media/segments/{uuid}/revisions';
2492
+ };
2493
+ export type ListSegmentRevisionsErrors = {
2494
+ /**
2495
+ * Bad Request
2496
+ */
2497
+ 400: Error400;
2498
+ /**
2499
+ * Unauthorized (API key or session)
2500
+ */
2501
+ 401: Error401;
2502
+ /**
2503
+ * Forbidden
2504
+ */
2505
+ 403: Error403;
2506
+ /**
2507
+ * Not Found
2508
+ */
2509
+ 404: Error404;
2510
+ /**
2511
+ * Too Many Requests
2512
+ */
2513
+ 429: Error429;
2514
+ /**
2515
+ * Internal Server Error
2516
+ */
2517
+ 500: Error500;
2518
+ };
2519
+ export type ListSegmentRevisionsError = ListSegmentRevisionsErrors[keyof ListSegmentRevisionsErrors];
2520
+ export type ListSegmentRevisionsResponses = {
2521
+ /**
2522
+ * List of segment revisions
2523
+ */
2524
+ 200: {
2525
+ revisions: Array<SegmentRevision>;
2526
+ };
2527
+ };
2528
+ export type ListSegmentRevisionsResponse = ListSegmentRevisionsResponses[keyof ListSegmentRevisionsResponses];
2345
2529
  export type ListSeriesData = {
2346
2530
  body?: never;
2347
2531
  path?: never;
@@ -2444,9 +2628,9 @@ export type DeleteSeriesData = {
2444
2628
  body?: never;
2445
2629
  path: {
2446
2630
  /**
2447
- * Series ID
2631
+ * Series public ID
2448
2632
  */
2449
- id: number;
2633
+ id: string;
2450
2634
  };
2451
2635
  query?: never;
2452
2636
  url: '/v1/media/series/{id}';
@@ -2489,9 +2673,9 @@ export type GetSeriesData = {
2489
2673
  body?: never;
2490
2674
  path: {
2491
2675
  /**
2492
- * Series ID
2676
+ * Series public ID
2493
2677
  */
2494
- id: number;
2678
+ id: string;
2495
2679
  };
2496
2680
  query?: {
2497
2681
  /**
@@ -2552,9 +2736,9 @@ export type UpdateSeriesData = {
2552
2736
  };
2553
2737
  path: {
2554
2738
  /**
2555
- * Series ID
2739
+ * Series public ID
2556
2740
  */
2557
- id: number;
2741
+ id: string;
2558
2742
  };
2559
2743
  query?: never;
2560
2744
  url: '/v1/media/series/{id}';
@@ -2596,9 +2780,9 @@ export type UpdateSeriesResponse = UpdateSeriesResponses[keyof UpdateSeriesRespo
2596
2780
  export type AddMediaToSeriesData = {
2597
2781
  body: {
2598
2782
  /**
2599
- * Media ID to add
2783
+ * Media public ID to add
2600
2784
  */
2601
- mediaId: number;
2785
+ mediaId: string;
2602
2786
  /**
2603
2787
  * Position in the series (1-indexed)
2604
2788
  */
@@ -2606,9 +2790,9 @@ export type AddMediaToSeriesData = {
2606
2790
  };
2607
2791
  path: {
2608
2792
  /**
2609
- * Series ID
2793
+ * Series public ID
2610
2794
  */
2611
- id: number;
2795
+ id: string;
2612
2796
  };
2613
2797
  query?: never;
2614
2798
  url: '/v1/media/series/{id}/media';
@@ -2651,13 +2835,13 @@ export type RemoveMediaFromSeriesData = {
2651
2835
  body?: never;
2652
2836
  path: {
2653
2837
  /**
2654
- * Series ID
2838
+ * Series public ID
2655
2839
  */
2656
- id: number;
2840
+ id: string;
2657
2841
  /**
2658
- * Media ID
2842
+ * Media public ID
2659
2843
  */
2660
- mediaId: number;
2844
+ mediaId: string;
2661
2845
  };
2662
2846
  query?: never;
2663
2847
  url: '/v1/media/series/{id}/media/{mediaId}';
@@ -2705,13 +2889,13 @@ export type UpdateSeriesMediaData = {
2705
2889
  };
2706
2890
  path: {
2707
2891
  /**
2708
- * Series ID
2892
+ * Series public ID
2709
2893
  */
2710
- id: number;
2894
+ id: string;
2711
2895
  /**
2712
- * Media ID
2896
+ * Media public ID
2713
2897
  */
2714
- mediaId: number;
2898
+ mediaId: string;
2715
2899
  };
2716
2900
  query?: never;
2717
2901
  url: '/v1/media/series/{id}/media/{mediaId}';
@@ -2754,7 +2938,7 @@ export type GetCharacterData = {
2754
2938
  body?: never;
2755
2939
  path: {
2756
2940
  /**
2757
- * Internal character ID
2941
+ * Character ID
2758
2942
  */
2759
2943
  id: number;
2760
2944
  };
@@ -2844,9 +3028,9 @@ export type DeleteMediaData = {
2844
3028
  body?: never;
2845
3029
  path: {
2846
3030
  /**
2847
- * Media ID
3031
+ * Media public ID
2848
3032
  */
2849
- id: number;
3033
+ id: string;
2850
3034
  };
2851
3035
  query?: never;
2852
3036
  url: '/v1/media/{id}';
@@ -2889,9 +3073,9 @@ export type GetMediaData = {
2889
3073
  body?: never;
2890
3074
  path: {
2891
3075
  /**
2892
- * Media ID
3076
+ * Media public ID
2893
3077
  */
2894
- id: number;
3078
+ id: string;
2895
3079
  };
2896
3080
  query?: {
2897
3081
  /**
@@ -2939,9 +3123,9 @@ export type UpdateMediaData = {
2939
3123
  body: MediaUpdateRequest;
2940
3124
  path: {
2941
3125
  /**
2942
- * Media ID
3126
+ * Media public ID
2943
3127
  */
2944
- id: number;
3128
+ id: string;
2945
3129
  };
2946
3130
  query?: never;
2947
3131
  url: '/v1/media/{id}';
@@ -2984,9 +3168,9 @@ export type ListEpisodesData = {
2984
3168
  body?: never;
2985
3169
  path: {
2986
3170
  /**
2987
- * ID of the media
3171
+ * Public ID of the media
2988
3172
  */
2989
- mediaId: number;
3173
+ mediaId: string;
2990
3174
  };
2991
3175
  query?: {
2992
3176
  /**
@@ -3038,9 +3222,9 @@ export type CreateEpisodeData = {
3038
3222
  body: EpisodeCreateRequest;
3039
3223
  path: {
3040
3224
  /**
3041
- * ID of the media
3225
+ * Public ID of the media
3042
3226
  */
3043
- mediaId: number;
3227
+ mediaId: string;
3044
3228
  };
3045
3229
  query?: never;
3046
3230
  url: '/v1/media/{mediaId}/episodes';
@@ -3087,9 +3271,9 @@ export type DeleteEpisodeData = {
3087
3271
  body?: never;
3088
3272
  path: {
3089
3273
  /**
3090
- * ID of the media
3274
+ * Public ID of the media
3091
3275
  */
3092
- mediaId: number;
3276
+ mediaId: string;
3093
3277
  /**
3094
3278
  * Episode number
3095
3279
  */
@@ -3136,9 +3320,9 @@ export type GetEpisodeData = {
3136
3320
  body?: never;
3137
3321
  path: {
3138
3322
  /**
3139
- * ID of the media
3323
+ * Public ID of the media
3140
3324
  */
3141
- mediaId: number;
3325
+ mediaId: string;
3142
3326
  /**
3143
3327
  * Episode number
3144
3328
  */
@@ -3185,9 +3369,9 @@ export type UpdateEpisodeData = {
3185
3369
  body: EpisodeUpdateRequest;
3186
3370
  path: {
3187
3371
  /**
3188
- * ID of the media
3372
+ * Public ID of the media
3189
3373
  */
3190
- mediaId: number;
3374
+ mediaId: string;
3191
3375
  /**
3192
3376
  * Episode number
3193
3377
  */
@@ -3234,9 +3418,9 @@ export type ListSegmentsData = {
3234
3418
  body?: never;
3235
3419
  path: {
3236
3420
  /**
3237
- * ID of the media
3421
+ * Public ID of the media
3238
3422
  */
3239
- mediaId: number;
3423
+ mediaId: string;
3240
3424
  /**
3241
3425
  * Episode number
3242
3426
  */
@@ -3298,9 +3482,9 @@ export type CreateSegmentData = {
3298
3482
  body: SegmentCreateRequest;
3299
3483
  path: {
3300
3484
  /**
3301
- * ID of the media
3485
+ * Public ID of the media
3302
3486
  */
3303
- mediaId: number;
3487
+ mediaId: string;
3304
3488
  /**
3305
3489
  * Episode number
3306
3490
  */
@@ -3347,13 +3531,71 @@ export type CreateSegmentResponses = {
3347
3531
  201: SegmentInternal;
3348
3532
  };
3349
3533
  export type CreateSegmentResponse = CreateSegmentResponses[keyof CreateSegmentResponses];
3534
+ export type CreateSegmentsBatchData = {
3535
+ body: SegmentBatchCreateRequest;
3536
+ path: {
3537
+ /**
3538
+ * Public ID of the media
3539
+ */
3540
+ mediaId: string;
3541
+ /**
3542
+ * Episode number
3543
+ */
3544
+ episodeNumber: number;
3545
+ };
3546
+ query?: never;
3547
+ url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/batch';
3548
+ };
3549
+ export type CreateSegmentsBatchErrors = {
3550
+ /**
3551
+ * Bad Request
3552
+ */
3553
+ 400: Error400;
3554
+ /**
3555
+ * Unauthorized (API key)
3556
+ */
3557
+ 401: Error401;
3558
+ /**
3559
+ * Forbidden
3560
+ */
3561
+ 403: Error403;
3562
+ /**
3563
+ * Not Found
3564
+ */
3565
+ 404: Error404;
3566
+ /**
3567
+ * Too Many Requests
3568
+ */
3569
+ 429: Error429;
3570
+ /**
3571
+ * Internal Server Error
3572
+ */
3573
+ 500: Error500;
3574
+ };
3575
+ export type CreateSegmentsBatchError = CreateSegmentsBatchErrors[keyof CreateSegmentsBatchErrors];
3576
+ export type CreateSegmentsBatchResponses = {
3577
+ /**
3578
+ * Batch segment creation result
3579
+ */
3580
+ 201: {
3581
+ /**
3582
+ * Number of segments successfully created
3583
+ */
3584
+ created: number;
3585
+ /**
3586
+ * Number of segments skipped due to duplicate UUIDs
3587
+ */
3588
+ skipped: number;
3589
+ };
3590
+ };
3591
+ export type CreateSegmentsBatchResponse = CreateSegmentsBatchResponses[keyof CreateSegmentsBatchResponses];
3350
3592
  export type DeleteSegmentData = {
3351
3593
  body?: never;
3352
3594
  path: {
3353
3595
  /**
3354
- * ID of the media
3596
+ * Public ID of the media
3355
3597
  */
3356
- mediaId: number;
3598
+ mediaId: string;
3357
3599
  /**
3358
3600
  * Episode number
3359
3601
  */
@@ -3404,9 +3646,9 @@ export type GetSegmentData = {
3404
3646
  body?: never;
3405
3647
  path: {
3406
3648
  /**
3407
- * ID of the media
3649
+ * Public ID of the media
3408
3650
  */
3409
- mediaId: number;
3651
+ mediaId: string;
3410
3652
  /**
3411
3653
  * Episode number
3412
3654
  */
@@ -3457,9 +3699,9 @@ export type UpdateSegmentData = {
3457
3699
  body: SegmentUpdateRequest;
3458
3700
  path: {
3459
3701
  /**
3460
- * ID of the media
3702
+ * Public ID of the media
3461
3703
  */
3462
- mediaId: number;
3704
+ mediaId: string;
3463
3705
  /**
3464
3706
  * Episode number
3465
3707
  */
@@ -3695,8 +3937,8 @@ export type ListUserActivityResponses = {
3695
3937
  export type ListUserActivityResponse = ListUserActivityResponses[keyof ListUserActivityResponses];
3696
3938
  export type TrackUserActivityData = {
3697
3939
  body: {
3698
- activityType: 'SEGMENT_PLAY';
3699
- segmentUuid?: string;
3940
+ activityType: 'SEGMENT_PLAY' | 'SHARE';
3941
+ segmentId?: number;
3700
3942
  mediaId?: number;
3701
3943
  mediaName?: string;
3702
3944
  japaneseText?: string;
@@ -3735,10 +3977,6 @@ export type GetUserActivityHeatmapData = {
3735
3977
  * Number of days to include in the heatmap
3736
3978
  */
3737
3979
  days?: number;
3738
- /**
3739
- * Filter by activity type
3740
- */
3741
- activityType?: ActivityType;
3742
3980
  };
3743
3981
  url: '/v1/user/activity/heatmap';
3744
3982
  };
@@ -3759,10 +3997,10 @@ export type GetUserActivityHeatmapResponses = {
3759
3997
  */
3760
3998
  200: {
3761
3999
  /**
3762
- * Map of YYYY-MM-DD date strings to activity activityByDay
4000
+ * Map of YYYY-MM-DD date strings to per-type activity counts
3763
4001
  */
3764
4002
  activityByDay: {
3765
- [key: string]: number;
4003
+ [key: string]: HeatmapDayCounts;
3766
4004
  };
3767
4005
  };
3768
4006
  };
@@ -3798,6 +4036,7 @@ export type GetUserActivityStatsResponses = {
3798
4036
  totalExports: number;
3799
4037
  totalPlays: number;
3800
4038
  totalListAdds: number;
4039
+ totalShares: number;
3801
4040
  topMedia: Array<{
3802
4041
  mediaId: number;
3803
4042
  count: number;
@@ -4072,9 +4311,9 @@ export type DeleteCollectionData = {
4072
4311
  body?: never;
4073
4312
  path: {
4074
4313
  /**
4075
- * Collection ID
4314
+ * Collection public ID
4076
4315
  */
4077
- id: number;
4316
+ id: string;
4078
4317
  };
4079
4318
  query?: never;
4080
4319
  url: '/v1/collections/{id}';
@@ -4117,9 +4356,9 @@ export type GetCollectionData = {
4117
4356
  body?: never;
4118
4357
  path: {
4119
4358
  /**
4120
- * Collection ID
4359
+ * Collection public ID
4121
4360
  */
4122
- id: number;
4361
+ id: string;
4123
4362
  };
4124
4363
  query?: {
4125
4364
  /**
@@ -4174,9 +4413,9 @@ export type UpdateCollectionData = {
4174
4413
  };
4175
4414
  path: {
4176
4415
  /**
4177
- * Collection ID
4416
+ * Collection public ID
4178
4417
  */
4179
- id: number;
4418
+ id: string;
4180
4419
  };
4181
4420
  query?: never;
4182
4421
  url: '/v1/collections/{id}';
@@ -4218,9 +4457,9 @@ export type UpdateCollectionResponse = UpdateCollectionResponses[keyof UpdateCol
4218
4457
  export type AddSegmentToCollectionData = {
4219
4458
  body: {
4220
4459
  /**
4221
- * UUID of the segment to add
4460
+ * Public ID or UUID of the segment to add
4222
4461
  */
4223
- segmentUuid: string;
4462
+ segmentId: string;
4224
4463
  /**
4225
4464
  * Optional annotation
4226
4465
  */
@@ -4228,9 +4467,9 @@ export type AddSegmentToCollectionData = {
4228
4467
  };
4229
4468
  path: {
4230
4469
  /**
4231
- * Collection ID
4470
+ * Collection public ID
4232
4471
  */
4233
- id: number;
4472
+ id: string;
4234
4473
  };
4235
4474
  query?: never;
4236
4475
  url: '/v1/collections/{id}/segments';
@@ -4273,16 +4512,16 @@ export type RemoveSegmentFromCollectionData = {
4273
4512
  body?: never;
4274
4513
  path: {
4275
4514
  /**
4276
- * Collection ID
4515
+ * Collection public ID
4277
4516
  */
4278
- id: number;
4517
+ id: string;
4279
4518
  /**
4280
- * Segment UUID
4519
+ * Segment ID
4281
4520
  */
4282
- uuid: string;
4521
+ segmentId: number;
4283
4522
  };
4284
4523
  query?: never;
4285
- url: '/v1/collections/{id}/segments/{uuid}';
4524
+ url: '/v1/collections/{id}/segments/{segmentId}';
4286
4525
  };
4287
4526
  export type RemoveSegmentFromCollectionErrors = {
4288
4527
  /**
@@ -4331,16 +4570,16 @@ export type UpdateCollectionSegmentData = {
4331
4570
  };
4332
4571
  path: {
4333
4572
  /**
4334
- * Collection ID
4573
+ * Collection public ID
4335
4574
  */
4336
- id: number;
4575
+ id: string;
4337
4576
  /**
4338
- * Segment UUID
4577
+ * Segment ID
4339
4578
  */
4340
- uuid: string;
4579
+ segmentId: number;
4341
4580
  };
4342
4581
  query?: never;
4343
- url: '/v1/collections/{id}/segments/{uuid}';
4582
+ url: '/v1/collections/{id}/segments/{segmentId}';
4344
4583
  };
4345
4584
  export type UpdateCollectionSegmentErrors = {
4346
4585
  /**
@@ -4380,9 +4619,9 @@ export type SearchCollectionSegmentsData = {
4380
4619
  body?: never;
4381
4620
  path: {
4382
4621
  /**
4383
- * Collection ID
4622
+ * Collection public ID
4384
4623
  */
4385
- id: number;
4624
+ id: string;
4386
4625
  };
4387
4626
  query?: {
4388
4627
  /**
@@ -4434,9 +4673,9 @@ export type GetCollectionStatsData = {
4434
4673
  body?: never;
4435
4674
  path: {
4436
4675
  /**
4437
- * Collection ID
4676
+ * Collection public ID
4438
4677
  */
4439
- id: number;
4678
+ id: string;
4440
4679
  };
4441
4680
  query?: never;
4442
4681
  url: '/v1/collections/{id}/stats';
@@ -4483,7 +4722,7 @@ export type GetAdminDashboardData = {
4483
4722
  };
4484
4723
  export type GetAdminDashboardErrors = {
4485
4724
  /**
4486
- * Unauthorized (API key)
4725
+ * Unauthorized (session)
4487
4726
  */
4488
4727
  401: Error401;
4489
4728
  /**
@@ -4575,7 +4814,7 @@ export type GetAdminHealthData = {
4575
4814
  };
4576
4815
  export type GetAdminHealthErrors = {
4577
4816
  /**
4578
- * Unauthorized (API key)
4817
+ * Unauthorized (session)
4579
4818
  */
4580
4819
  401: Error401;
4581
4820
  /**
@@ -4637,7 +4876,7 @@ export type TriggerReindexErrors = {
4637
4876
  */
4638
4877
  400: Error400;
4639
4878
  /**
4640
- * Unauthorized (API key)
4879
+ * Unauthorized (session)
4641
4880
  */
4642
4881
  401: Error401;
4643
4882
  /**
@@ -4673,7 +4912,7 @@ export type ListAdminQueueStatsErrors = {
4673
4912
  */
4674
4913
  400: Error400;
4675
4914
  /**
4676
- * Unauthorized (API key)
4915
+ * Unauthorized (session)
4677
4916
  */
4678
4917
  401: Error401;
4679
4918
  /**
@@ -4724,7 +4963,7 @@ export type GetAdminQueueErrors = {
4724
4963
  */
4725
4964
  400: Error400;
4726
4965
  /**
4727
- * Unauthorized (API key)
4966
+ * Unauthorized (session)
4728
4967
  */
4729
4968
  401: Error401;
4730
4969
  /**
@@ -4809,7 +5048,7 @@ export type ListAdminQueueFailedErrors = {
4809
5048
  */
4810
5049
  400: Error400;
4811
5050
  /**
4812
- * Unauthorized (API key)
5051
+ * Unauthorized (session)
4813
5052
  */
4814
5053
  401: Error401;
4815
5054
  /**
@@ -4867,7 +5106,7 @@ export type RetryAdminQueueFailedErrors = {
4867
5106
  */
4868
5107
  400: Error400;
4869
5108
  /**
4870
- * Unauthorized (API key)
5109
+ * Unauthorized (session)
4871
5110
  */
4872
5111
  401: Error401;
4873
5112
  /**
@@ -4915,7 +5154,7 @@ export type PurgeAdminQueueFailedErrors = {
4915
5154
  */
4916
5155
  400: Error400;
4917
5156
  /**
4918
- * Unauthorized (API key)
5157
+ * Unauthorized (session)
4919
5158
  */
4920
5159
  401: Error401;
4921
5160
  /**
@@ -4953,10 +5192,6 @@ export type ClearAdminImpersonationData = {
4953
5192
  url: '/v1/admin/impersonation';
4954
5193
  };
4955
5194
  export type ClearAdminImpersonationErrors = {
4956
- /**
4957
- * Unauthorized (session)
4958
- */
4959
- 401: Error401;
4960
5195
  /**
4961
5196
  * Forbidden
4962
5197
  */
@@ -4996,10 +5231,6 @@ export type ImpersonateAdminUserErrors = {
4996
5231
  * Bad Request
4997
5232
  */
4998
5233
  400: Error400;
4999
- /**
5000
- * Unauthorized (session)
5001
- */
5002
- 401: Error401;
5003
5234
  /**
5004
5235
  * Forbidden
5005
5236
  */
@@ -5065,9 +5296,9 @@ export type ListAdminReportsData = {
5065
5296
  */
5066
5297
  'target.episodeNumber'?: number;
5067
5298
  /**
5068
- * Filter by target segment UUID
5299
+ * Filter by target segment ID
5069
5300
  */
5070
- 'target.segmentUuid'?: string;
5301
+ 'target.segmentId'?: number;
5071
5302
  /**
5072
5303
  * Filter by audit run ID
5073
5304
  */
@@ -5077,7 +5308,7 @@ export type ListAdminReportsData = {
5077
5308
  };
5078
5309
  export type ListAdminReportsErrors = {
5079
5310
  /**
5080
- * Unauthorized (API key)
5311
+ * Unauthorized (session)
5081
5312
  */
5082
5313
  401: Error401;
5083
5314
  /**
@@ -5118,7 +5349,7 @@ export type UpdateAdminReportErrors = {
5118
5349
  */
5119
5350
  400: Error400;
5120
5351
  /**
5121
- * Unauthorized (API key)
5352
+ * Unauthorized (session)
5122
5353
  */
5123
5354
  401: Error401;
5124
5355
  /**
@@ -5154,7 +5385,7 @@ export type ListAdminMediaAuditsData = {
5154
5385
  };
5155
5386
  export type ListAdminMediaAuditsErrors = {
5156
5387
  /**
5157
- * Unauthorized (API key)
5388
+ * Unauthorized (session)
5158
5389
  */
5159
5390
  401: Error401;
5160
5391
  /**
@@ -5206,7 +5437,7 @@ export type UpdateAdminMediaAuditErrors = {
5206
5437
  */
5207
5438
  400: Error400;
5208
5439
  /**
5209
- * Unauthorized (API key)
5440
+ * Unauthorized (session)
5210
5441
  */
5211
5442
  401: Error401;
5212
5443
  /**
@@ -5252,7 +5483,7 @@ export type RunAdminMediaAuditData = {
5252
5483
  };
5253
5484
  export type RunAdminMediaAuditErrors = {
5254
5485
  /**
5255
- * Unauthorized (API key)
5486
+ * Unauthorized (session)
5256
5487
  */
5257
5488
  401: Error401;
5258
5489
  /**
@@ -5301,7 +5532,7 @@ export type ListAdminMediaAuditRunsData = {
5301
5532
  };
5302
5533
  export type ListAdminMediaAuditRunsErrors = {
5303
5534
  /**
5304
- * Unauthorized (API key)
5535
+ * Unauthorized (session)
5305
5536
  */
5306
5537
  401: Error401;
5307
5538
  /**
@@ -5341,7 +5572,7 @@ export type GetAdminMediaAuditRunData = {
5341
5572
  };
5342
5573
  export type GetAdminMediaAuditRunErrors = {
5343
5574
  /**
5344
- * Unauthorized (API key)
5575
+ * Unauthorized (session)
5345
5576
  */
5346
5577
  401: Error401;
5347
5578
  /**
@@ -5372,4 +5603,80 @@ export type GetAdminMediaAuditRunResponses = {
5372
5603
  };
5373
5604
  };
5374
5605
  export type GetAdminMediaAuditRunResponse = GetAdminMediaAuditRunResponses[keyof GetAdminMediaAuditRunResponses];
5606
+ export type GetAnnouncementData = {
5607
+ body?: never;
5608
+ path?: never;
5609
+ query?: never;
5610
+ url: '/v1/admin/announcement';
5611
+ };
5612
+ export type GetAnnouncementErrors = {
5613
+ /**
5614
+ * Too Many Requests
5615
+ */
5616
+ 429: Error429;
5617
+ /**
5618
+ * Internal Server Error
5619
+ */
5620
+ 500: Error500;
5621
+ };
5622
+ export type GetAnnouncementError = GetAnnouncementErrors[keyof GetAnnouncementErrors];
5623
+ export type GetAnnouncementResponses = {
5624
+ /**
5625
+ * OK
5626
+ */
5627
+ 200: {
5628
+ message: string;
5629
+ type: 'info' | 'warning' | 'maintenance';
5630
+ active: boolean;
5631
+ };
5632
+ /**
5633
+ * No announcement set
5634
+ */
5635
+ 204: void;
5636
+ };
5637
+ export type GetAnnouncementResponse = GetAnnouncementResponses[keyof GetAnnouncementResponses];
5638
+ export type UpdateAnnouncementData = {
5639
+ body: {
5640
+ message: string;
5641
+ type: 'info' | 'warning' | 'maintenance';
5642
+ active: boolean;
5643
+ };
5644
+ path?: never;
5645
+ query?: never;
5646
+ url: '/v1/admin/announcement';
5647
+ };
5648
+ export type UpdateAnnouncementErrors = {
5649
+ /**
5650
+ * Bad Request
5651
+ */
5652
+ 400: Error400;
5653
+ /**
5654
+ * Unauthorized (session)
5655
+ */
5656
+ 401: Error401;
5657
+ /**
5658
+ * Forbidden
5659
+ */
5660
+ 403: Error403;
5661
+ /**
5662
+ * Too Many Requests
5663
+ */
5664
+ 429: Error429;
5665
+ /**
5666
+ * Internal Server Error
5667
+ */
5668
+ 500: Error500;
5669
+ };
5670
+ export type UpdateAnnouncementError = UpdateAnnouncementErrors[keyof UpdateAnnouncementErrors];
5671
+ export type UpdateAnnouncementResponses = {
5672
+ /**
5673
+ * Announcement updated
5674
+ */
5675
+ 200: {
5676
+ message: string;
5677
+ type: 'info' | 'warning' | 'maintenance';
5678
+ active: boolean;
5679
+ };
5680
+ };
5681
+ export type UpdateAnnouncementResponse = UpdateAnnouncementResponses[keyof UpdateAnnouncementResponses];
5375
5682
  //# sourceMappingURL=types.gen.d.ts.map