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

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.
Files changed (69) hide show
  1. package/README.md +6 -0
  2. package/dist/client/client.gen.d.ts.map +1 -0
  3. package/dist/client/index.d.ts.map +1 -0
  4. package/dist/client/types.gen.d.ts.map +1 -0
  5. package/dist/client/utils.gen.d.ts.map +1 -0
  6. package/dist/client.gen.d.ts.map +1 -0
  7. package/dist/core/auth.gen.d.ts.map +1 -0
  8. package/dist/core/bodySerializer.gen.d.ts.map +1 -0
  9. package/dist/core/params.gen.d.ts.map +1 -0
  10. package/dist/core/pathSerializer.gen.d.ts.map +1 -0
  11. package/dist/core/queryKeySerializer.gen.d.ts.map +1 -0
  12. package/dist/core/serverSentEvents.gen.d.ts.map +1 -0
  13. package/dist/core/types.gen.d.ts.map +1 -0
  14. package/dist/core/utils.gen.d.ts.map +1 -0
  15. package/dist/index.cjs +534 -45
  16. package/dist/index.cjs.map +5 -5
  17. package/dist/index.d.ts +6 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +541 -41
  20. package/dist/index.js.map +5 -5
  21. package/dist/internal/lists.gen.d.ts +2 -0
  22. package/dist/internal/lists.gen.d.ts.map +1 -0
  23. package/dist/internal/media.gen.d.ts +2 -0
  24. package/dist/internal/media.gen.d.ts.map +1 -0
  25. package/dist/internal/search.gen.d.ts +2 -0
  26. package/dist/internal/search.gen.d.ts.map +1 -0
  27. package/dist/internal.gen.d.ts +4 -0
  28. package/dist/internal.gen.d.ts.map +1 -0
  29. package/dist/nadeshiko.gen.d.ts +74 -0
  30. package/dist/nadeshiko.gen.d.ts.map +1 -0
  31. package/dist/sdk.gen.d.ts +641 -0
  32. package/dist/sdk.gen.d.ts.map +1 -0
  33. package/dist/types.gen.d.ts +4793 -0
  34. package/dist/types.gen.d.ts.map +1 -0
  35. package/package.json +4 -8
  36. package/dist/generated/client/client.gen.d.ts.map +0 -1
  37. package/dist/generated/client/index.d.ts.map +0 -1
  38. package/dist/generated/client/types.gen.d.ts.map +0 -1
  39. package/dist/generated/client/utils.gen.d.ts.map +0 -1
  40. package/dist/generated/client.gen.d.ts.map +0 -1
  41. package/dist/generated/core/auth.gen.d.ts.map +0 -1
  42. package/dist/generated/core/bodySerializer.gen.d.ts.map +0 -1
  43. package/dist/generated/core/params.gen.d.ts.map +0 -1
  44. package/dist/generated/core/pathSerializer.gen.d.ts.map +0 -1
  45. package/dist/generated/core/queryKeySerializer.gen.d.ts.map +0 -1
  46. package/dist/generated/core/serverSentEvents.gen.d.ts.map +0 -1
  47. package/dist/generated/core/types.gen.d.ts.map +0 -1
  48. package/dist/generated/core/utils.gen.d.ts.map +0 -1
  49. package/dist/generated/index.d.ts +0 -6
  50. package/dist/generated/index.d.ts.map +0 -1
  51. package/dist/generated/nadeshiko.gen.d.ts +0 -27
  52. package/dist/generated/nadeshiko.gen.d.ts.map +0 -1
  53. package/dist/generated/sdk.gen.d.ts +0 -257
  54. package/dist/generated/sdk.gen.d.ts.map +0 -1
  55. package/dist/generated/types.gen.d.ts +0 -2001
  56. package/dist/generated/types.gen.d.ts.map +0 -1
  57. /package/dist/{generated/client → client}/client.gen.d.ts +0 -0
  58. /package/dist/{generated/client → client}/index.d.ts +0 -0
  59. /package/dist/{generated/client → client}/types.gen.d.ts +0 -0
  60. /package/dist/{generated/client → client}/utils.gen.d.ts +0 -0
  61. /package/dist/{generated/client.gen.d.ts → client.gen.d.ts} +0 -0
  62. /package/dist/{generated/core → core}/auth.gen.d.ts +0 -0
  63. /package/dist/{generated/core → core}/bodySerializer.gen.d.ts +0 -0
  64. /package/dist/{generated/core → core}/params.gen.d.ts +0 -0
  65. /package/dist/{generated/core → core}/pathSerializer.gen.d.ts +0 -0
  66. /package/dist/{generated/core → core}/queryKeySerializer.gen.d.ts +0 -0
  67. /package/dist/{generated/core → core}/serverSentEvents.gen.d.ts +0 -0
  68. /package/dist/{generated/core → core}/types.gen.d.ts +0 -0
  69. /package/dist/{generated/core → core}/utils.gen.d.ts +0 -0
@@ -1,2001 +0,0 @@
1
- export type ClientOptions = {
2
- baseUrl: 'http://localhost:5000' | 'https://api.nadeshiko.co' | (string & {});
3
- };
4
- /**
5
- * Media category type
6
- */
7
- export type Category = 'ANIME' | 'JDRAMA';
8
- /**
9
- * Search result statistics grouped by anime/media
10
- */
11
- export type Statistic = {
12
- /**
13
- * Unique identifier for the anime/media
14
- */
15
- animeId?: number;
16
- category?: Category;
17
- /**
18
- * Romaji transliteration of the anime name
19
- */
20
- nameAnimeRomaji?: string;
21
- /**
22
- * English translation of the anime name
23
- */
24
- nameAnimeEn?: string;
25
- /**
26
- * Original Japanese name of the anime
27
- */
28
- nameAnimeJp?: string;
29
- /**
30
- * Total number of sentences found for this anime
31
- */
32
- amountSentencesFound?: number;
33
- /**
34
- * Nested object mapping seasons to episodes with hit counts
35
- */
36
- seasonWithEpisodeHits?: {
37
- [key: string]: {
38
- [key: string]: number;
39
- };
40
- };
41
- };
42
- /**
43
- * Statistics grouped by media category
44
- */
45
- export type CategoryStatistic = {
46
- category?: Category;
47
- /**
48
- * Number of entries in this category
49
- */
50
- count?: number;
51
- };
52
- /**
53
- * Basic anime/media information included in search results
54
- */
55
- export type BasicInfo = {
56
- /**
57
- * Unique identifier for the anime/media
58
- */
59
- animeId: number;
60
- /**
61
- * Romaji transliteration of the anime name
62
- */
63
- nameAnimeRomaji: string;
64
- /**
65
- * English translation of the anime name
66
- */
67
- nameAnimeEn?: string;
68
- /**
69
- * Original Japanese name of the anime
70
- */
71
- nameAnimeJp?: string;
72
- /**
73
- * URL to the cover image
74
- */
75
- cover?: string;
76
- /**
77
- * URL to the banner image
78
- */
79
- banner?: string;
80
- /**
81
- * Episode number where the segment appears
82
- */
83
- episode: number;
84
- /**
85
- * Season number where the segment appears
86
- */
87
- season: number;
88
- category: Category;
89
- };
90
- /**
91
- * Detailed information about a subtitle segment
92
- */
93
- export type SegmentInfo = {
94
- /**
95
- * Segment status (0=Deleted, 1=Active, 2=Suspended, 3=Verified, 100=Invalid Sentence, 101=Sentence Too Long)
96
- */
97
- status: number;
98
- /**
99
- * Unique identifier for the segment
100
- */
101
- uuid: string;
102
- /**
103
- * Position of the segment within the episode
104
- */
105
- position: number;
106
- /**
107
- * Timestamp in H:MM:SS.ffffff format (variable-length hours, microseconds) indicating when the segment starts
108
- */
109
- startTime: string;
110
- /**
111
- * Timestamp in H:MM:SS.ffffff format (variable-length hours, microseconds) indicating when the segment ends
112
- */
113
- endTime: string;
114
- /**
115
- * Original Japanese content of the segment
116
- */
117
- contentJp: string;
118
- /**
119
- * Japanese content with search terms highlighted
120
- */
121
- contentJpHighlight?: string;
122
- /**
123
- * English translation of the segment content
124
- */
125
- contentEn?: string;
126
- /**
127
- * English content with search terms highlighted
128
- */
129
- contentEnHighlight?: string;
130
- /**
131
- * Indicates whether the English translation was machine-translated
132
- */
133
- contentEnMt: boolean;
134
- /**
135
- * Spanish translation of the segment content
136
- */
137
- contentEs?: string;
138
- /**
139
- * Spanish content with search terms highlighted
140
- */
141
- contentEsHighlight?: string;
142
- /**
143
- * Indicates whether the Spanish translation was machine-translated
144
- */
145
- contentEsMt: boolean;
146
- /**
147
- * Indicates whether the segment contains NSFW (Not Safe For Work) content
148
- */
149
- isNsfw: boolean;
150
- /**
151
- * Name of the Japanese voice actor for this segment
152
- */
153
- actorJa?: string;
154
- /**
155
- * Name of the English voice actor for this segment
156
- */
157
- actorEn?: string;
158
- /**
159
- * Name of the Spanish voice actor for this segment
160
- */
161
- actorEs?: string;
162
- };
163
- /**
164
- * URLs to media resources for a segment
165
- */
166
- export type MediaInfoPath = {
167
- /**
168
- * URL to the subtitle image snapshot
169
- */
170
- path_image?: string;
171
- /**
172
- * URL to the audio clip for this segment
173
- */
174
- path_audio?: string;
175
- /**
176
- * URL to the video clip for this segment
177
- */
178
- path_video?: string;
179
- };
180
- /**
181
- * A complete sentence result combining basic info, segment details, and media paths
182
- */
183
- export type Sentence = {
184
- /**
185
- * Basic anime/media information
186
- */
187
- basicInfo: BasicInfo;
188
- /**
189
- * Detailed segment information including translations
190
- */
191
- segmentInfo: SegmentInfo;
192
- /**
193
- * URLs to media resources (images, audio, video)
194
- */
195
- mediaInfo: MediaInfoPath;
196
- };
197
- export type SearchHealthCheckResponse = {
198
- statistics?: Array<Statistic>;
199
- categoryStatistics?: Array<CategoryStatistic>;
200
- sentences?: Array<Sentence>;
201
- /**
202
- * Cursor for pagination
203
- */
204
- cursor?: Array<number>;
205
- };
206
- /**
207
- * Error Response schema for all cases
208
- */
209
- export type Error = {
210
- /**
211
- * Specific error code for programmatic handling
212
- */
213
- code: string;
214
- /**
215
- * A short, human-readable summary of the problem
216
- */
217
- title: string;
218
- /**
219
- * A human-readable explanation specific to this occurrence
220
- */
221
- detail: string;
222
- /**
223
- * A URI reference that identifies the problem type (e.g., GitHub issues link)
224
- */
225
- type?: string;
226
- /**
227
- * A URI reference that identifies the specific occurrence (e.g., trace ID)
228
- */
229
- instance?: string;
230
- /**
231
- * The HTTP status code
232
- */
233
- status: number;
234
- /**
235
- * Optional map of field names to their error messages (for validation errors)
236
- */
237
- errors?: {
238
- [key: string]: string;
239
- };
240
- };
241
- export type SearchRequest = {
242
- /**
243
- * Text or sentence to search (null to search without query)
244
- */
245
- query?: string;
246
- /**
247
- * Max amount of entries by response
248
- */
249
- limit?: number;
250
- /**
251
- * Unique ID from sentence (Useful to get a specific sentence)
252
- */
253
- uuid?: string;
254
- /**
255
- * Media category filter
256
- */
257
- category?: Array<Category>;
258
- /**
259
- * Unique ID from media
260
- */
261
- anime_id?: number;
262
- /**
263
- * Array of seasons to get
264
- */
265
- season?: Array<number>;
266
- /**
267
- * Array of episodes to get
268
- */
269
- episode?: Array<number>;
270
- /**
271
- * A value from 0 to 1 for random sorting
272
- */
273
- random_seed?: number;
274
- /**
275
- * Order by amount of characters
276
- */
277
- content_sort?: 'asc' | 'desc' | 'none' | 'time_asc' | 'time_desc' | 'random';
278
- /**
279
- * Current page of search
280
- */
281
- cursor?: Array<number>;
282
- /**
283
- * Whether to use exact phrase matching
284
- */
285
- exact_match?: boolean;
286
- /**
287
- * Include extra content
288
- */
289
- extra?: boolean;
290
- /**
291
- * Minimum content length
292
- */
293
- min_length?: number;
294
- /**
295
- * Maximum content length
296
- */
297
- max_length?: number;
298
- /**
299
- * Anime IDs to exclude from results
300
- */
301
- excluded_anime_ids?: Array<number>;
302
- /**
303
- * Segment status filter
304
- */
305
- status?: Array<number>;
306
- /**
307
- * Media filter with seasons and episodes
308
- */
309
- media?: Array<{
310
- media_id: string;
311
- seasons: Array<{
312
- season: number;
313
- episodes: Array<number>;
314
- }>;
315
- }>;
316
- };
317
- export type SearchResponse = {
318
- statistics?: Array<Statistic>;
319
- categoryStatistics?: Array<CategoryStatistic>;
320
- sentences?: Array<Sentence>;
321
- /**
322
- * Cursor for pagination
323
- */
324
- cursor?: Array<number>;
325
- };
326
- export type SearchMultipleRequest = {
327
- /**
328
- * List of words to search for
329
- */
330
- words: Array<string>;
331
- /**
332
- * Whether to use exact matching
333
- */
334
- exact_match?: boolean;
335
- };
336
- /**
337
- * Media entry containing word matches
338
- */
339
- export type WordMatchMedia = {
340
- /**
341
- * Unique identifier for the media
342
- */
343
- media_id?: number;
344
- /**
345
- * English translation of the media name
346
- */
347
- english_name?: string;
348
- /**
349
- * Original Japanese name of the media
350
- */
351
- japanese_name?: string;
352
- /**
353
- * Romaji transliteration of the media name
354
- */
355
- romaji_name?: string;
356
- /**
357
- * Number of times the word appears in this media
358
- */
359
- matches?: number;
360
- };
361
- /**
362
- * Word matching result with occurrences across media
363
- */
364
- export type WordMatch = {
365
- /**
366
- * The word that was searched for
367
- */
368
- word?: string;
369
- /**
370
- * Indicates whether the word was found in any segment
371
- */
372
- is_match?: boolean;
373
- /**
374
- * Total number of times this word appears across all media
375
- */
376
- total_matches?: number;
377
- /**
378
- * List of media containing this word
379
- */
380
- media?: Array<WordMatchMedia>;
381
- };
382
- export type SearchMultipleResponse = {
383
- results?: Array<WordMatch>;
384
- };
385
- export type FetchSentenceContextRequest = {
386
- /**
387
- * Media ID
388
- */
389
- media_id: number;
390
- /**
391
- * Season number
392
- */
393
- season: number;
394
- /**
395
- * Episode number
396
- */
397
- episode: number;
398
- /**
399
- * Segment position in the episode
400
- */
401
- segment_position: number;
402
- /**
403
- * Number of surrounding segments to retrieve
404
- */
405
- limit?: number;
406
- };
407
- export type FetchSentenceContextResponse = {
408
- sentences: Array<Sentence>;
409
- };
410
- /**
411
- * Statistics about media and segments in the database
412
- */
413
- export type MediaInfoStats = {
414
- /**
415
- * Number of anime/media entries in the current result set
416
- */
417
- totalAnimes?: number;
418
- /**
419
- * Number of subtitle segments in the current result set
420
- */
421
- totalSegments?: number;
422
- /**
423
- * Total number of anime/media entries in the entire database
424
- */
425
- fullTotalAnimes?: number;
426
- /**
427
- * Total number of subtitle segments in the entire database
428
- */
429
- fullTotalSegments?: number;
430
- };
431
- /**
432
- * Complete information about a media/anime entry
433
- */
434
- export type MediaInfoData = {
435
- /**
436
- * Unique identifier for the media
437
- */
438
- id: number;
439
- /**
440
- * AniList database ID for the media
441
- */
442
- anilistId?: number;
443
- /**
444
- * TMDB (The Movie Database) ID for the media
445
- */
446
- tmdbId?: number;
447
- category?: Category;
448
- /**
449
- * Timestamp when the media entry was created in the database
450
- */
451
- createdAt?: string;
452
- /**
453
- * Timestamp when the media entry was last updated
454
- */
455
- updatedAt?: number;
456
- /**
457
- * Romaji transliteration of the media name
458
- */
459
- romajiName?: string;
460
- /**
461
- * English translation of the media name
462
- */
463
- englishName?: string;
464
- /**
465
- * Original Japanese name of the media
466
- */
467
- japaneseName?: string;
468
- /**
469
- * Format of the media release (e.g., TV, OVA, Movie)
470
- */
471
- airingFormat?: string;
472
- /**
473
- * Current airing status (FINISHED, RELEASING)
474
- */
475
- airingStatus?: string;
476
- /**
477
- * Start date of the media (YYYY-MM-DD)
478
- */
479
- startDate?: string;
480
- /**
481
- * End date of the media (null if unknown) (YYYY-MM-DD)
482
- */
483
- endDate?: string;
484
- /**
485
- * Folder name used for storing media files
486
- */
487
- folderMediaName?: string;
488
- /**
489
- * List of genres associated with the media
490
- */
491
- genres?: Array<string>;
492
- /**
493
- * URL to the cover image
494
- */
495
- cover?: string;
496
- /**
497
- * URL to the banner image
498
- */
499
- banner?: string;
500
- /**
501
- * Version identifier for the media entry
502
- */
503
- version?: string;
504
- /**
505
- * Total number of subtitle segments available
506
- */
507
- numSegments?: number;
508
- /**
509
- * Total number of seasons available
510
- */
511
- numSeasons?: number;
512
- /**
513
- * Total number of episodes available
514
- */
515
- numEpisodes?: number;
516
- };
517
- export type FetchMediaInfoResponse = {
518
- stats?: MediaInfoStats;
519
- results?: Array<MediaInfoData>;
520
- /**
521
- * Next cursor for pagination
522
- */
523
- cursor?: number;
524
- /**
525
- * Whether more results are available
526
- */
527
- hasMoreResults?: boolean;
528
- };
529
- /**
530
- * Japanese voice actor (seiyuu)
531
- */
532
- export type Seiyuu = {
533
- /**
534
- * AniList staff ID
535
- */
536
- id: number;
537
- /**
538
- * Japanese name of the voice actor
539
- */
540
- nameJapanese: string;
541
- /**
542
- * English name of the voice actor
543
- */
544
- nameEnglish: string;
545
- /**
546
- * Profile image URL
547
- */
548
- imageUrl: string;
549
- };
550
- /**
551
- * Anime character
552
- */
553
- export type Character = {
554
- /**
555
- * AniList character ID
556
- */
557
- id: number;
558
- /**
559
- * Japanese name of the character
560
- */
561
- nameJapanese: string;
562
- /**
563
- * English name of the character
564
- */
565
- nameEnglish: string;
566
- /**
567
- * Character image URL
568
- */
569
- imageUrl: string;
570
- seiyuu: Seiyuu;
571
- };
572
- /**
573
- * Character appearing in a media with their role
574
- */
575
- export type MediaCharacter = {
576
- character: Character;
577
- /**
578
- * Character's role in the media
579
- */
580
- role: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
581
- };
582
- /**
583
- * Media collection list
584
- */
585
- export type List = {
586
- /**
587
- * List ID
588
- */
589
- id: number;
590
- /**
591
- * Name of the list
592
- */
593
- name: string;
594
- /**
595
- * Type of list
596
- */
597
- type: 'SERIES' | 'CUSTOM';
598
- /**
599
- * User ID who owns the list (1 = admin)
600
- */
601
- userId: number;
602
- /**
603
- * Visibility of the list
604
- */
605
- visibility: 'PUBLIC' | 'PRIVATE';
606
- };
607
- /**
608
- * Media entry with full metadata
609
- */
610
- export type Media = {
611
- /**
612
- * Unique identifier for the media
613
- */
614
- id: number;
615
- /**
616
- * AniList database ID for the media
617
- */
618
- anilistId: number;
619
- /**
620
- * Original Japanese name of the media
621
- */
622
- japaneseName: string;
623
- /**
624
- * Romaji transliteration of the media name
625
- */
626
- romajiName: string;
627
- /**
628
- * English translation of the media name
629
- */
630
- englishName: string;
631
- /**
632
- * Format of the media release (e.g., TV, OVA, Movie)
633
- */
634
- airingFormat: string;
635
- /**
636
- * Current airing status (FINISHED, RELEASING, NOT_YET_RELEASED, CANCELLED)
637
- */
638
- airingStatus: string;
639
- /**
640
- * List of genres associated with the media
641
- */
642
- genres: Array<string>;
643
- /**
644
- * Full URL to the cover image
645
- */
646
- coverUrl: string;
647
- /**
648
- * Full URL to the banner image
649
- */
650
- bannerUrl: string;
651
- /**
652
- * Start date of the media (first airing/release)
653
- */
654
- startDate: string;
655
- /**
656
- * End date of the media (last airing/release)
657
- */
658
- endDate?: string;
659
- category: Category;
660
- /**
661
- * Total number of subtitle segments available
662
- */
663
- numSegments?: number;
664
- /**
665
- * Total number of episodes available
666
- */
667
- numEpisodes?: number;
668
- /**
669
- * Version identifier for the media entry
670
- */
671
- version: string;
672
- /**
673
- * Animation studio that produced the media
674
- */
675
- studio: string;
676
- /**
677
- * Season when the media aired (WINTER, SPRING, SUMMER, FALL)
678
- */
679
- seasonName: string;
680
- /**
681
- * Year when the media aired
682
- */
683
- seasonYear: number;
684
- /**
685
- * Characters appearing in the media with their voice actors
686
- */
687
- characters?: Array<MediaCharacter>;
688
- /**
689
- * Lists that contain this media
690
- */
691
- lists?: Array<List>;
692
- };
693
- export type MediaListResponse = {
694
- data: Array<Media>;
695
- /**
696
- * Next cursor for pagination (undefined if no more results)
697
- */
698
- cursor?: number;
699
- /**
700
- * Whether more results are available
701
- */
702
- hasMoreResults: boolean;
703
- };
704
- export type Episode = {
705
- /**
706
- * ID of the media this episode belongs to
707
- */
708
- mediaId: number;
709
- /**
710
- * Episode number within the media
711
- */
712
- episodeNumber: number;
713
- /**
714
- * AniList episode ID for external reference
715
- */
716
- anilistEpisodeId?: number;
717
- /**
718
- * English title of the episode
719
- */
720
- titleEnglish?: string;
721
- /**
722
- * Romanized title of the episode
723
- */
724
- titleRomaji?: string;
725
- /**
726
- * Japanese title of the episode
727
- */
728
- titleJapanese?: string;
729
- /**
730
- * Episode description or synopsis
731
- */
732
- description?: string;
733
- /**
734
- * When the episode originally aired
735
- */
736
- airedAt?: string;
737
- /**
738
- * Episode duration in seconds
739
- */
740
- lengthSeconds?: number;
741
- /**
742
- * URL to episode thumbnail image
743
- */
744
- thumbnailUrl?: string;
745
- /**
746
- * Number of segments in this episode
747
- */
748
- numSegments: number;
749
- };
750
- export type EpisodeListResponse = {
751
- /**
752
- * Array of episode objects
753
- */
754
- data: Array<Episode>;
755
- /**
756
- * Cursor for pagination (last episode number in current page)
757
- */
758
- cursor?: number;
759
- /**
760
- * Whether more results are available
761
- */
762
- hasMoreResults: boolean;
763
- };
764
- export type Segment = {
765
- /**
766
- * Auto-generated segment ID
767
- */
768
- id: number;
769
- /**
770
- * Unique identifier for the segment
771
- */
772
- uuid: string;
773
- /**
774
- * Position of the segment within the episode
775
- */
776
- position: number;
777
- /**
778
- * Segment status (0=Deleted, 1=Active, 2=Suspended, 3=Verified, 100=Invalid Sentence, 101=Sentence Too Long)
779
- */
780
- status: 0 | 1 | 2 | 3 | 100 | 101;
781
- /**
782
- * Timestamp in H:MM:SS.ffffff format indicating when the segment starts
783
- */
784
- startTime: string;
785
- /**
786
- * Timestamp in H:MM:SS.ffffff format indicating when the segment ends
787
- */
788
- endTime: string;
789
- /**
790
- * Original Japanese content of the segment
791
- */
792
- content: string;
793
- /**
794
- * Length of the content
795
- */
796
- contentLength: number;
797
- /**
798
- * Spanish translation of the segment content
799
- */
800
- contentSpanish?: string;
801
- /**
802
- * Whether the Spanish translation was machine-translated
803
- */
804
- contentSpanishMt: boolean;
805
- /**
806
- * English translation of the segment content
807
- */
808
- contentEnglish?: string;
809
- /**
810
- * Whether the English translation was machine-translated
811
- */
812
- contentEnglishMt: boolean;
813
- /**
814
- * Whether the segment contains NSFW content
815
- */
816
- isNsfw: boolean;
817
- /**
818
- * URL to segment screenshot/image (generated from storage + hashedId)
819
- */
820
- imageUrl?: string;
821
- /**
822
- * URL to segment audio file (generated from storage + hashedId)
823
- */
824
- audioUrl?: string;
825
- /**
826
- * Japanese voice actor name
827
- */
828
- actorJa?: string;
829
- /**
830
- * Spanish voice actor name
831
- */
832
- actorEs?: string;
833
- /**
834
- * English voice actor name
835
- */
836
- actorEn?: string;
837
- /**
838
- * Episode number this segment belongs to
839
- */
840
- episode: number;
841
- /**
842
- * Media ID this segment belongs to
843
- */
844
- mediaId: number;
845
- /**
846
- * Storage backend for segment assets
847
- */
848
- storage: 'local' | 'r2';
849
- /**
850
- * Hash identifier for the segment
851
- */
852
- hashedId: string;
853
- };
854
- /**
855
- * Character with all media appearances
856
- */
857
- export type CharacterWithMedia = {
858
- /**
859
- * AniList character ID
860
- */
861
- id: number;
862
- /**
863
- * Japanese name of the character
864
- */
865
- nameJapanese: string;
866
- /**
867
- * English name of the character
868
- */
869
- nameEnglish: string;
870
- /**
871
- * Character image URL
872
- */
873
- imageUrl: string;
874
- seiyuu: Seiyuu;
875
- /**
876
- * All media this character appears in
877
- */
878
- mediaAppearances: Array<{
879
- media?: Media;
880
- /**
881
- * Character role in this media
882
- */
883
- role?: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
884
- }>;
885
- };
886
- /**
887
- * Seiyuu with all voice acting roles
888
- */
889
- export type SeiyuuWithRoles = {
890
- /**
891
- * AniList staff ID
892
- */
893
- id: number;
894
- /**
895
- * Japanese name of the voice actor
896
- */
897
- nameJapanese: string;
898
- /**
899
- * English name of the voice actor
900
- */
901
- nameEnglish: string;
902
- /**
903
- * Profile image URL
904
- */
905
- imageUrl: string;
906
- /**
907
- * All characters voiced by this seiyuu with their media appearances
908
- */
909
- roles: Array<{
910
- character?: Character;
911
- media?: Media;
912
- /**
913
- * Character role in this media
914
- */
915
- role?: 'MAIN' | 'SUPPORTING' | 'BACKGROUND';
916
- }>;
917
- };
918
- /**
919
- * List with all media in order
920
- */
921
- export type ListWithMedia = {
922
- /**
923
- * List ID
924
- */
925
- id: number;
926
- /**
927
- * Name of the list
928
- */
929
- name: string;
930
- /**
931
- * Type of list
932
- */
933
- type: 'SERIES' | 'CUSTOM';
934
- /**
935
- * User ID who owns the list (1 = admin)
936
- */
937
- userId: number;
938
- /**
939
- * Visibility of the list
940
- */
941
- visibility: 'PUBLIC' | 'PRIVATE';
942
- /**
943
- * All media in the list, sorted by position
944
- */
945
- media: Array<{
946
- /**
947
- * Position in the list (1-indexed)
948
- */
949
- position?: number;
950
- media?: Media;
951
- }>;
952
- };
953
- /**
954
- * Request to reindex segments from the database into Elasticsearch
955
- */
956
- export type ReindexRequest = {
957
- /**
958
- * Array of media to reindex. If not provided, all media will be reindexed.
959
- * Each media can optionally specify which episodes to reindex.
960
- * If episodes are not specified for a media, all episodes will be reindexed.
961
- */
962
- media?: Array<{
963
- /**
964
- * The ID of the media
965
- */
966
- mediaId: number;
967
- /**
968
- * Optional array of episode numbers to reindex.
969
- * If not provided, all episodes for this media will be reindexed.
970
- */
971
- episodes?: Array<number>;
972
- }>;
973
- };
974
- /**
975
- * Response from the reindex operation
976
- */
977
- export type ReindexResponse = {
978
- /**
979
- * Whether the reindex operation completed successfully
980
- */
981
- success?: boolean;
982
- /**
983
- * Human-readable message about the reindex operation
984
- */
985
- message?: string;
986
- /**
987
- * Statistics about the reindex operation
988
- */
989
- stats?: {
990
- /**
991
- * Total number of segments processed
992
- */
993
- totalSegments?: number;
994
- /**
995
- * Number of segments successfully indexed
996
- */
997
- successfulIndexes?: number;
998
- /**
999
- * Number of segments that failed to index
1000
- */
1001
- failedIndexes?: number;
1002
- /**
1003
- * Number of media items processed
1004
- */
1005
- mediaProcessed?: number;
1006
- };
1007
- /**
1008
- * Array of errors that occurred during reindexing (if any)
1009
- */
1010
- errors?: Array<{
1011
- /**
1012
- * ID of the segment that failed
1013
- */
1014
- segmentId?: number;
1015
- /**
1016
- * Error message
1017
- */
1018
- error?: string;
1019
- }>;
1020
- };
1021
- export type SearchHealthCheckData = {
1022
- body?: never;
1023
- path?: never;
1024
- query?: never;
1025
- url: '/v1/search/health';
1026
- };
1027
- export type SearchHealthCheckErrors = {
1028
- /**
1029
- * Unauthorized
1030
- */
1031
- 401: Error;
1032
- /**
1033
- * Forbidden
1034
- */
1035
- 403: Error;
1036
- /**
1037
- * Too Many Requests
1038
- */
1039
- 429: Error;
1040
- /**
1041
- * Internal Server Error
1042
- */
1043
- 500: Error;
1044
- };
1045
- export type SearchHealthCheckError = SearchHealthCheckErrors[keyof SearchHealthCheckErrors];
1046
- export type SearchHealthCheckResponses = {
1047
- /**
1048
- * OK
1049
- */
1050
- 200: SearchHealthCheckResponse;
1051
- };
1052
- export type SearchHealthCheckResponse2 = SearchHealthCheckResponses[keyof SearchHealthCheckResponses];
1053
- export type SearchData = {
1054
- body?: SearchRequest;
1055
- path?: never;
1056
- query?: never;
1057
- url: '/v1/search/media/sentence';
1058
- };
1059
- export type SearchErrors = {
1060
- /**
1061
- * Bad Request
1062
- */
1063
- 400: Error;
1064
- /**
1065
- * Unauthorized
1066
- */
1067
- 401: Error;
1068
- /**
1069
- * Forbidden
1070
- */
1071
- 403: Error;
1072
- /**
1073
- * Too Many Requests
1074
- */
1075
- 429: Error;
1076
- /**
1077
- * Internal Server Error
1078
- */
1079
- 500: Error;
1080
- };
1081
- export type SearchError = SearchErrors[keyof SearchErrors];
1082
- export type SearchResponses = {
1083
- /**
1084
- * OK
1085
- */
1086
- 200: SearchResponse;
1087
- };
1088
- export type SearchResponse2 = SearchResponses[keyof SearchResponses];
1089
- export type SearchMultipleData = {
1090
- body: SearchMultipleRequest;
1091
- path?: never;
1092
- query?: never;
1093
- url: '/v1/search/media/match/words';
1094
- };
1095
- export type SearchMultipleErrors = {
1096
- /**
1097
- * Bad Request
1098
- */
1099
- 400: Error;
1100
- /**
1101
- * Unauthorized
1102
- */
1103
- 401: Error;
1104
- /**
1105
- * Forbidden
1106
- */
1107
- 403: Error;
1108
- /**
1109
- * Too Many Requests
1110
- */
1111
- 429: Error;
1112
- /**
1113
- * Internal Server Error
1114
- */
1115
- 500: Error;
1116
- };
1117
- export type SearchMultipleError = SearchMultipleErrors[keyof SearchMultipleErrors];
1118
- export type SearchMultipleResponses = {
1119
- /**
1120
- * OK
1121
- */
1122
- 200: SearchMultipleResponse;
1123
- };
1124
- export type SearchMultipleResponse2 = SearchMultipleResponses[keyof SearchMultipleResponses];
1125
- export type FetchSentenceContextData = {
1126
- body: FetchSentenceContextRequest;
1127
- path?: never;
1128
- query?: never;
1129
- url: '/v1/search/media/context';
1130
- };
1131
- export type FetchSentenceContextErrors = {
1132
- /**
1133
- * Bad Request
1134
- */
1135
- 400: Error;
1136
- /**
1137
- * Unauthorized
1138
- */
1139
- 401: Error;
1140
- /**
1141
- * Forbidden
1142
- */
1143
- 403: Error;
1144
- /**
1145
- * Not Found
1146
- */
1147
- 404: Error;
1148
- /**
1149
- * Too Many Requests
1150
- */
1151
- 429: Error;
1152
- /**
1153
- * Internal Server Error
1154
- */
1155
- 500: Error;
1156
- };
1157
- export type FetchSentenceContextError = FetchSentenceContextErrors[keyof FetchSentenceContextErrors];
1158
- export type FetchSentenceContextResponses = {
1159
- /**
1160
- * OK
1161
- */
1162
- 200: FetchSentenceContextResponse;
1163
- };
1164
- export type FetchSentenceContextResponse2 = FetchSentenceContextResponses[keyof FetchSentenceContextResponses];
1165
- export type FetchMediaInfoData = {
1166
- body?: never;
1167
- path?: never;
1168
- query?: {
1169
- /**
1170
- * Number of results per page
1171
- */
1172
- size?: number;
1173
- /**
1174
- * Pagination cursor offset
1175
- */
1176
- cursor?: number;
1177
- /**
1178
- * Search query for filtering media
1179
- */
1180
- query?: string;
1181
- /**
1182
- * Filter by media category
1183
- */
1184
- type?: 'anime' | 'liveaction' | 'audiobook';
1185
- };
1186
- url: '/v1/search/media/info';
1187
- };
1188
- export type FetchMediaInfoErrors = {
1189
- /**
1190
- * Unauthorized
1191
- */
1192
- 401: Error;
1193
- /**
1194
- * Forbidden
1195
- */
1196
- 403: Error;
1197
- /**
1198
- * Too Many Requests
1199
- */
1200
- 429: Error;
1201
- /**
1202
- * Internal Server Error
1203
- */
1204
- 500: Error;
1205
- };
1206
- export type FetchMediaInfoError = FetchMediaInfoErrors[keyof FetchMediaInfoErrors];
1207
- export type FetchMediaInfoResponses = {
1208
- /**
1209
- * OK
1210
- */
1211
- 200: FetchMediaInfoResponse;
1212
- };
1213
- export type FetchMediaInfoResponse2 = FetchMediaInfoResponses[keyof FetchMediaInfoResponses];
1214
- export type MediaIndexData = {
1215
- body?: never;
1216
- path?: never;
1217
- query?: {
1218
- /**
1219
- * Number of results per page
1220
- */
1221
- limit?: number;
1222
- /**
1223
- * Pagination cursor offset
1224
- */
1225
- cursor?: number;
1226
- /**
1227
- * Filter by media category
1228
- */
1229
- category?: 'ANIME' | 'JDRAMA';
1230
- };
1231
- url: '/v1/media';
1232
- };
1233
- export type MediaIndexErrors = {
1234
- /**
1235
- * Bad Request
1236
- */
1237
- 400: Error;
1238
- /**
1239
- * Unauthorized
1240
- */
1241
- 401: Error;
1242
- /**
1243
- * Forbidden
1244
- */
1245
- 403: Error;
1246
- /**
1247
- * Too Many Requests
1248
- */
1249
- 429: Error;
1250
- /**
1251
- * Internal Server Error
1252
- */
1253
- 500: Error;
1254
- };
1255
- export type MediaIndexError = MediaIndexErrors[keyof MediaIndexErrors];
1256
- export type MediaIndexResponses = {
1257
- /**
1258
- * OK
1259
- */
1260
- 200: MediaListResponse;
1261
- };
1262
- export type MediaIndexResponse = MediaIndexResponses[keyof MediaIndexResponses];
1263
- export type MediaShowData = {
1264
- body?: never;
1265
- path: {
1266
- /**
1267
- * Media ID
1268
- */
1269
- id: number;
1270
- };
1271
- query?: never;
1272
- url: '/v1/media/{id}';
1273
- };
1274
- export type MediaShowErrors = {
1275
- /**
1276
- * Bad Request
1277
- */
1278
- 400: Error;
1279
- /**
1280
- * Unauthorized
1281
- */
1282
- 401: Error;
1283
- /**
1284
- * Forbidden
1285
- */
1286
- 403: Error;
1287
- /**
1288
- * Not Found
1289
- */
1290
- 404: Error;
1291
- /**
1292
- * Too Many Requests
1293
- */
1294
- 429: Error;
1295
- /**
1296
- * Internal Server Error
1297
- */
1298
- 500: Error;
1299
- };
1300
- export type MediaShowError = MediaShowErrors[keyof MediaShowErrors];
1301
- export type MediaShowResponses = {
1302
- /**
1303
- * OK
1304
- */
1305
- 200: Media;
1306
- };
1307
- export type MediaShowResponse = MediaShowResponses[keyof MediaShowResponses];
1308
- export type EpisodeIndexData = {
1309
- body?: never;
1310
- path: {
1311
- /**
1312
- * ID of the media
1313
- */
1314
- mediaId: number;
1315
- };
1316
- query?: {
1317
- /**
1318
- * Maximum number of episodes to return
1319
- */
1320
- size?: number;
1321
- /**
1322
- * Episode number to start from (for pagination)
1323
- */
1324
- cursor?: number;
1325
- };
1326
- url: '/v1/media/{mediaId}/episodes';
1327
- };
1328
- export type EpisodeIndexErrors = {
1329
- /**
1330
- * Bad Request
1331
- */
1332
- 400: Error;
1333
- /**
1334
- * Unauthorized
1335
- */
1336
- 401: Error;
1337
- /**
1338
- * Forbidden
1339
- */
1340
- 403: Error;
1341
- /**
1342
- * Not Found
1343
- */
1344
- 404: Error;
1345
- /**
1346
- * Too Many Requests
1347
- */
1348
- 429: Error;
1349
- /**
1350
- * Internal Server Error
1351
- */
1352
- 500: Error;
1353
- };
1354
- export type EpisodeIndexError = EpisodeIndexErrors[keyof EpisodeIndexErrors];
1355
- export type EpisodeIndexResponses = {
1356
- /**
1357
- * Paginated list of episodes
1358
- */
1359
- 200: EpisodeListResponse;
1360
- };
1361
- export type EpisodeIndexResponse = EpisodeIndexResponses[keyof EpisodeIndexResponses];
1362
- export type EpisodeShowData = {
1363
- body?: never;
1364
- path: {
1365
- /**
1366
- * ID of the media
1367
- */
1368
- mediaId: number;
1369
- /**
1370
- * Episode number
1371
- */
1372
- episodeNumber: number;
1373
- };
1374
- query?: never;
1375
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}';
1376
- };
1377
- export type EpisodeShowErrors = {
1378
- /**
1379
- * Bad Request
1380
- */
1381
- 400: Error;
1382
- /**
1383
- * Unauthorized
1384
- */
1385
- 401: Error;
1386
- /**
1387
- * Forbidden
1388
- */
1389
- 403: Error;
1390
- /**
1391
- * Not Found
1392
- */
1393
- 404: Error;
1394
- /**
1395
- * Too Many Requests
1396
- */
1397
- 429: Error;
1398
- /**
1399
- * Internal Server Error
1400
- */
1401
- 500: Error;
1402
- };
1403
- export type EpisodeShowError = EpisodeShowErrors[keyof EpisodeShowErrors];
1404
- export type EpisodeShowResponses = {
1405
- /**
1406
- * Single episode response
1407
- */
1408
- 200: Episode;
1409
- };
1410
- export type EpisodeShowResponse = EpisodeShowResponses[keyof EpisodeShowResponses];
1411
- export type SegmentShowData = {
1412
- body?: never;
1413
- path: {
1414
- /**
1415
- * ID of the media
1416
- */
1417
- mediaId: number;
1418
- /**
1419
- * Episode number
1420
- */
1421
- episodeNumber: number;
1422
- /**
1423
- * Segment ID
1424
- */
1425
- id: number;
1426
- };
1427
- query?: never;
1428
- url: '/v1/media/{mediaId}/episodes/{episodeNumber}/segments/{id}';
1429
- };
1430
- export type SegmentShowErrors = {
1431
- /**
1432
- * Bad Request
1433
- */
1434
- 400: Error;
1435
- /**
1436
- * Unauthorized
1437
- */
1438
- 401: Error;
1439
- /**
1440
- * Forbidden
1441
- */
1442
- 403: Error;
1443
- /**
1444
- * Not Found
1445
- */
1446
- 404: Error;
1447
- /**
1448
- * Too Many Requests
1449
- */
1450
- 429: Error;
1451
- /**
1452
- * Internal Server Error
1453
- */
1454
- 500: Error;
1455
- };
1456
- export type SegmentShowError = SegmentShowErrors[keyof SegmentShowErrors];
1457
- export type SegmentShowResponses = {
1458
- /**
1459
- * Single segment response
1460
- */
1461
- 200: Segment;
1462
- };
1463
- export type SegmentShowResponse = SegmentShowResponses[keyof SegmentShowResponses];
1464
- export type SegmentShowByUuidData = {
1465
- body?: never;
1466
- path: {
1467
- /**
1468
- * Segment UUID
1469
- */
1470
- uuid: string;
1471
- };
1472
- query?: never;
1473
- url: '/v1/media/segments/{uuid}';
1474
- };
1475
- export type SegmentShowByUuidErrors = {
1476
- /**
1477
- * Bad Request
1478
- */
1479
- 400: Error;
1480
- /**
1481
- * Unauthorized
1482
- */
1483
- 401: Error;
1484
- /**
1485
- * Forbidden
1486
- */
1487
- 403: Error;
1488
- /**
1489
- * Not Found
1490
- */
1491
- 404: Error;
1492
- /**
1493
- * Too Many Requests
1494
- */
1495
- 429: Error;
1496
- /**
1497
- * Internal Server Error
1498
- */
1499
- 500: Error;
1500
- };
1501
- export type SegmentShowByUuidError = SegmentShowByUuidErrors[keyof SegmentShowByUuidErrors];
1502
- export type SegmentShowByUuidResponses = {
1503
- 200: Segment;
1504
- };
1505
- export type SegmentShowByUuidResponse = SegmentShowByUuidResponses[keyof SegmentShowByUuidResponses];
1506
- export type CharacterShowData = {
1507
- body?: never;
1508
- path: {
1509
- /**
1510
- * AniList character ID
1511
- */
1512
- id: number;
1513
- };
1514
- query?: never;
1515
- url: '/v1/media/characters/{id}';
1516
- };
1517
- export type CharacterShowErrors = {
1518
- /**
1519
- * Bad Request
1520
- */
1521
- 400: Error;
1522
- /**
1523
- * Unauthorized
1524
- */
1525
- 401: Error;
1526
- /**
1527
- * Forbidden
1528
- */
1529
- 403: Error;
1530
- /**
1531
- * Not Found
1532
- */
1533
- 404: Error;
1534
- /**
1535
- * Too Many Requests
1536
- */
1537
- 429: Error;
1538
- /**
1539
- * Internal Server Error
1540
- */
1541
- 500: Error;
1542
- };
1543
- export type CharacterShowError = CharacterShowErrors[keyof CharacterShowErrors];
1544
- export type CharacterShowResponses = {
1545
- /**
1546
- * OK
1547
- */
1548
- 200: CharacterWithMedia;
1549
- };
1550
- export type CharacterShowResponse = CharacterShowResponses[keyof CharacterShowResponses];
1551
- export type SeiyuuShowData = {
1552
- body?: never;
1553
- path: {
1554
- /**
1555
- * AniList staff ID
1556
- */
1557
- id: number;
1558
- };
1559
- query?: never;
1560
- url: '/v1/media/seiyuu/{id}';
1561
- };
1562
- export type SeiyuuShowErrors = {
1563
- /**
1564
- * Bad Request
1565
- */
1566
- 400: Error;
1567
- /**
1568
- * Unauthorized
1569
- */
1570
- 401: Error;
1571
- /**
1572
- * Forbidden
1573
- */
1574
- 403: Error;
1575
- /**
1576
- * Not Found
1577
- */
1578
- 404: Error;
1579
- /**
1580
- * Too Many Requests
1581
- */
1582
- 429: Error;
1583
- /**
1584
- * Internal Server Error
1585
- */
1586
- 500: Error;
1587
- };
1588
- export type SeiyuuShowError = SeiyuuShowErrors[keyof SeiyuuShowErrors];
1589
- export type SeiyuuShowResponses = {
1590
- /**
1591
- * OK
1592
- */
1593
- 200: SeiyuuWithRoles;
1594
- };
1595
- export type SeiyuuShowResponse = SeiyuuShowResponses[keyof SeiyuuShowResponses];
1596
- export type ListIndexData = {
1597
- body?: never;
1598
- path?: never;
1599
- query?: {
1600
- /**
1601
- * Filter by visibility
1602
- */
1603
- visibility?: 'public' | 'private';
1604
- /**
1605
- * Filter by list type
1606
- */
1607
- type?: 'SERIES' | 'CUSTOM';
1608
- /**
1609
- * Filter by list owner user ID
1610
- */
1611
- userId?: number;
1612
- /**
1613
- * Filter lists containing this media ID
1614
- */
1615
- mediaId?: number;
1616
- };
1617
- url: '/v1/lists';
1618
- };
1619
- export type ListIndexErrors = {
1620
- /**
1621
- * Bad Request
1622
- */
1623
- 400: Error;
1624
- /**
1625
- * Unauthorized
1626
- */
1627
- 401: Error;
1628
- /**
1629
- * Forbidden
1630
- */
1631
- 403: Error;
1632
- /**
1633
- * Too Many Requests
1634
- */
1635
- 429: Error;
1636
- /**
1637
- * Internal Server Error
1638
- */
1639
- 500: Error;
1640
- };
1641
- export type ListIndexError = ListIndexErrors[keyof ListIndexErrors];
1642
- export type ListIndexResponses = {
1643
- /**
1644
- * OK
1645
- */
1646
- 200: Array<List>;
1647
- };
1648
- export type ListIndexResponse = ListIndexResponses[keyof ListIndexResponses];
1649
- export type ListShowData = {
1650
- body?: never;
1651
- path: {
1652
- /**
1653
- * List ID
1654
- */
1655
- id: number;
1656
- };
1657
- query?: never;
1658
- url: '/v1/lists/{id}';
1659
- };
1660
- export type ListShowErrors = {
1661
- /**
1662
- * Bad Request
1663
- */
1664
- 400: Error;
1665
- /**
1666
- * Unauthorized
1667
- */
1668
- 401: Error;
1669
- /**
1670
- * Forbidden
1671
- */
1672
- 403: Error;
1673
- /**
1674
- * Not Found
1675
- */
1676
- 404: Error;
1677
- /**
1678
- * Too Many Requests
1679
- */
1680
- 429: Error;
1681
- /**
1682
- * Internal Server Error
1683
- */
1684
- 500: Error;
1685
- };
1686
- export type ListShowError = ListShowErrors[keyof ListShowErrors];
1687
- export type ListShowResponses = {
1688
- /**
1689
- * OK
1690
- */
1691
- 200: ListWithMedia;
1692
- };
1693
- export type ListShowResponse = ListShowResponses[keyof ListShowResponses];
1694
- export type ReindexElasticsearchData = {
1695
- body?: ReindexRequest;
1696
- path?: never;
1697
- query?: never;
1698
- url: '/v1/admin/reindex';
1699
- };
1700
- export type ReindexElasticsearchErrors = {
1701
- /**
1702
- * Bad Request
1703
- */
1704
- 400: Error;
1705
- /**
1706
- * Unauthorized
1707
- */
1708
- 401: Error;
1709
- /**
1710
- * Forbidden
1711
- */
1712
- 403: Error;
1713
- /**
1714
- * Too Many Requests
1715
- */
1716
- 429: Error;
1717
- /**
1718
- * Internal Server Error
1719
- */
1720
- 500: Error;
1721
- };
1722
- export type ReindexElasticsearchError = ReindexElasticsearchErrors[keyof ReindexElasticsearchErrors];
1723
- export type ReindexElasticsearchResponses = {
1724
- /**
1725
- * Reindex operation completed
1726
- */
1727
- 200: ReindexResponse;
1728
- };
1729
- export type ReindexElasticsearchResponse = ReindexElasticsearchResponses[keyof ReindexElasticsearchResponses];
1730
- export type GetQueueStatsData = {
1731
- body?: never;
1732
- path?: never;
1733
- query?: never;
1734
- url: '/v1/admin/queues/stats';
1735
- };
1736
- export type GetQueueStatsErrors = {
1737
- /**
1738
- * Bad Request
1739
- */
1740
- 400: Error;
1741
- /**
1742
- * Unauthorized
1743
- */
1744
- 401: Error;
1745
- /**
1746
- * Forbidden
1747
- */
1748
- 403: Error;
1749
- /**
1750
- * Too Many Requests
1751
- */
1752
- 429: Error;
1753
- /**
1754
- * Internal Server Error
1755
- */
1756
- 500: Error;
1757
- };
1758
- export type GetQueueStatsError = GetQueueStatsErrors[keyof GetQueueStatsErrors];
1759
- export type GetQueueStatsResponses = {
1760
- /**
1761
- * Queue statistics retrieved successfully
1762
- */
1763
- 200: Array<{
1764
- queue?: string;
1765
- /**
1766
- * Number of jobs currently pending/active
1767
- */
1768
- stuckCount?: number;
1769
- /**
1770
- * Number of failed jobs
1771
- */
1772
- failedCount?: number;
1773
- }>;
1774
- };
1775
- export type GetQueueStatsResponse = GetQueueStatsResponses[keyof GetQueueStatsResponses];
1776
- export type GetQueueDetailsData = {
1777
- body?: never;
1778
- path: {
1779
- /**
1780
- * The name of the queue
1781
- */
1782
- queueName: 'es-sync-create' | 'es-sync-update' | 'es-sync-delete';
1783
- };
1784
- query?: never;
1785
- url: '/v1/admin/queues/{queueName}';
1786
- };
1787
- export type GetQueueDetailsErrors = {
1788
- /**
1789
- * Bad Request
1790
- */
1791
- 400: Error;
1792
- /**
1793
- * Unauthorized
1794
- */
1795
- 401: Error;
1796
- /**
1797
- * Forbidden
1798
- */
1799
- 403: Error;
1800
- /**
1801
- * Not Found
1802
- */
1803
- 404: Error;
1804
- /**
1805
- * Too Many Requests
1806
- */
1807
- 429: Error;
1808
- /**
1809
- * Internal Server Error
1810
- */
1811
- 500: Error;
1812
- };
1813
- export type GetQueueDetailsError = GetQueueDetailsErrors[keyof GetQueueDetailsErrors];
1814
- export type GetQueueDetailsResponses = {
1815
- /**
1816
- * Queue details retrieved successfully
1817
- */
1818
- 200: {
1819
- queue?: string;
1820
- /**
1821
- * Current queue size (pending jobs)
1822
- */
1823
- size?: number;
1824
- /**
1825
- * Total jobs created
1826
- */
1827
- created?: number;
1828
- /**
1829
- * Total failed jobs
1830
- */
1831
- failed?: number;
1832
- /**
1833
- * Total completed jobs
1834
- */
1835
- complete?: number;
1836
- /**
1837
- * Total expired jobs
1838
- */
1839
- expired?: number;
1840
- /**
1841
- * Total cancelled jobs
1842
- */
1843
- cancelled?: number;
1844
- };
1845
- };
1846
- export type GetQueueDetailsResponse = GetQueueDetailsResponses[keyof GetQueueDetailsResponses];
1847
- export type GetFailedJobsData = {
1848
- body?: never;
1849
- path: {
1850
- /**
1851
- * The name of the queue
1852
- */
1853
- queueName: 'es-sync-create' | 'es-sync-update' | 'es-sync-delete';
1854
- };
1855
- query?: never;
1856
- url: '/v1/admin/queues/{queueName}/failed';
1857
- };
1858
- export type GetFailedJobsErrors = {
1859
- /**
1860
- * Bad Request
1861
- */
1862
- 400: Error;
1863
- /**
1864
- * Unauthorized
1865
- */
1866
- 401: Error;
1867
- /**
1868
- * Forbidden
1869
- */
1870
- 403: Error;
1871
- /**
1872
- * Too Many Requests
1873
- */
1874
- 429: Error;
1875
- /**
1876
- * Internal Server Error
1877
- */
1878
- 500: Error;
1879
- };
1880
- export type GetFailedJobsError = GetFailedJobsErrors[keyof GetFailedJobsErrors];
1881
- export type GetFailedJobsResponses = {
1882
- /**
1883
- * Failed jobs retrieved successfully
1884
- */
1885
- 200: Array<{
1886
- /**
1887
- * Job ID
1888
- */
1889
- id?: string;
1890
- /**
1891
- * The segment ID that failed to sync
1892
- */
1893
- segmentId?: number;
1894
- /**
1895
- * Error message from the last attempt
1896
- */
1897
- error?: string;
1898
- /**
1899
- * When the job was created
1900
- */
1901
- createdOn?: string;
1902
- }>;
1903
- };
1904
- export type GetFailedJobsResponse = GetFailedJobsResponses[keyof GetFailedJobsResponses];
1905
- export type RetryQueueJobsData = {
1906
- body?: never;
1907
- path: {
1908
- /**
1909
- * The name of the queue
1910
- */
1911
- queueName: 'es-sync-create' | 'es-sync-update' | 'es-sync-delete';
1912
- };
1913
- query?: never;
1914
- url: '/v1/admin/queues/{queueName}/retry';
1915
- };
1916
- export type RetryQueueJobsErrors = {
1917
- /**
1918
- * Bad Request
1919
- */
1920
- 400: Error;
1921
- /**
1922
- * Unauthorized
1923
- */
1924
- 401: Error;
1925
- /**
1926
- * Forbidden
1927
- */
1928
- 403: Error;
1929
- /**
1930
- * Too Many Requests
1931
- */
1932
- 429: Error;
1933
- /**
1934
- * Internal Server Error
1935
- */
1936
- 500: Error;
1937
- };
1938
- export type RetryQueueJobsError = RetryQueueJobsErrors[keyof RetryQueueJobsErrors];
1939
- export type RetryQueueJobsResponses = {
1940
- /**
1941
- * Jobs queued for retry
1942
- */
1943
- 200: {
1944
- success?: boolean;
1945
- /**
1946
- * Number of jobs queued for retry
1947
- */
1948
- retriedCount?: number;
1949
- message?: string;
1950
- };
1951
- };
1952
- export type RetryQueueJobsResponse = RetryQueueJobsResponses[keyof RetryQueueJobsResponses];
1953
- export type PurgeFailedJobsData = {
1954
- body?: never;
1955
- path: {
1956
- /**
1957
- * The name of the queue
1958
- */
1959
- queueName: 'es-sync-create' | 'es-sync-update' | 'es-sync-delete';
1960
- };
1961
- query?: never;
1962
- url: '/v1/admin/queues/{queueName}/purge';
1963
- };
1964
- export type PurgeFailedJobsErrors = {
1965
- /**
1966
- * Bad Request
1967
- */
1968
- 400: Error;
1969
- /**
1970
- * Unauthorized
1971
- */
1972
- 401: Error;
1973
- /**
1974
- * Forbidden
1975
- */
1976
- 403: Error;
1977
- /**
1978
- * Too Many Requests
1979
- */
1980
- 429: Error;
1981
- /**
1982
- * Internal Server Error
1983
- */
1984
- 500: Error;
1985
- };
1986
- export type PurgeFailedJobsError = PurgeFailedJobsErrors[keyof PurgeFailedJobsErrors];
1987
- export type PurgeFailedJobsResponses = {
1988
- /**
1989
- * Failed jobs purged successfully
1990
- */
1991
- 200: {
1992
- success?: boolean;
1993
- /**
1994
- * Number of failed jobs deleted
1995
- */
1996
- purgedCount?: number;
1997
- message?: string;
1998
- };
1999
- };
2000
- export type PurgeFailedJobsResponse = PurgeFailedJobsResponses[keyof PurgeFailedJobsResponses];
2001
- //# sourceMappingURL=types.gen.d.ts.map