lxns-rhythm-api 0.1.3 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,5 +1,176 @@
1
1
  import { KyInstance } from 'ky';
2
2
 
3
+ interface Notes$1 {
4
+ total: number;
5
+ tap: number;
6
+ hold: number;
7
+ slide: number;
8
+ air: number;
9
+ flick: number;
10
+ }
11
+ declare enum LevelIndex$1 {
12
+ BASIC = 0,
13
+ ADVANCED = 1,
14
+ EXPERT = 2,
15
+ MASTER = 3,
16
+ ULTIMA = 4,
17
+ WORLDS_END = 5
18
+ }
19
+ interface ClassEmblem {
20
+ base: number;
21
+ medal: number;
22
+ }
23
+ type ClearType = "catastrophy" | "absolute" | "brave" | "hard" | "clear" | "failed";
24
+ type RankType = "sssp" | "sss" | "ssp" | "ss" | "sp" | "s" | "aaa" | "aa" | "a" | "bbb" | "bb" | "b" | "c" | "d";
25
+ type FullComboType = "alljusticecritical" | "alljustice" | "fullcombo";
26
+ type FullChainType = "fullchain" | "fullchain2";
27
+ type TrophyColor = "normal" | "copper" | "silver" | "gold" | "platinum" | "rainbow" | "image";
28
+ type SongType$1 = string;
29
+ interface SongDifficulty$1 {
30
+ difficulty: LevelIndex$1;
31
+ level: string;
32
+ level_value: number;
33
+ note_designer: string;
34
+ version: number;
35
+ notes?: Notes$1;
36
+ origin_id?: number;
37
+ kanji?: string;
38
+ star?: number;
39
+ }
40
+ interface Song$2 {
41
+ id: number;
42
+ title: string;
43
+ artist: string;
44
+ genre: string;
45
+ bpm: number;
46
+ map?: string;
47
+ version: number;
48
+ rights?: string;
49
+ disabled?: boolean;
50
+ locked?: boolean;
51
+ difficulties: SongDifficulty$1[];
52
+ aliases?: string[];
53
+ }
54
+ interface Genre$1 {
55
+ id: number;
56
+ genre: string;
57
+ }
58
+ interface Version$1 {
59
+ id: number;
60
+ title: string;
61
+ version: number;
62
+ }
63
+ interface Alias$1 {
64
+ song_id: number;
65
+ aliases: string[];
66
+ }
67
+ interface Player$1 {
68
+ name: string;
69
+ level: number;
70
+ rating: number;
71
+ rating_possession: string;
72
+ friend_code: number;
73
+ class_emblem: ClassEmblem;
74
+ reborn_count: number;
75
+ over_power: number;
76
+ over_power_progress: number;
77
+ currency: number;
78
+ total_currency: number;
79
+ total_play_count: number;
80
+ team?: Team;
81
+ trophy?: Trophy$1;
82
+ character?: Character;
83
+ name_plate?: NamePlate$1;
84
+ map_icon?: MapIcon;
85
+ upload_time?: string;
86
+ }
87
+ interface Team {
88
+ id: number;
89
+ name: string;
90
+ }
91
+ interface Collection$1 {
92
+ id: number;
93
+ name: string;
94
+ color?: TrophyColor;
95
+ level?: number;
96
+ required?: CollectionRequired$1[];
97
+ }
98
+ interface CollectionRequired$1 {
99
+ difficulties?: LevelIndex$1[];
100
+ rank?: RankType;
101
+ clear?: ClearType;
102
+ full_combo?: FullComboType;
103
+ full_chain?: FullChainType;
104
+ songs?: CollectionRequiredSong$1[];
105
+ completed?: boolean;
106
+ }
107
+ interface CollectionRequiredSong$1 {
108
+ id: number;
109
+ title: string;
110
+ type: SongType$1;
111
+ completed?: boolean;
112
+ completed_difficulties?: LevelIndex$1[];
113
+ }
114
+ interface Score$1 {
115
+ id: number;
116
+ song_name?: string;
117
+ level?: string;
118
+ level_index: LevelIndex$1;
119
+ score: number;
120
+ over_power?: number;
121
+ clear?: ClearType;
122
+ rank?: RankType;
123
+ full_combo?: FullComboType;
124
+ full_chain?: FullChainType;
125
+ chain?: number;
126
+ rating?: number;
127
+ type: SongType$1;
128
+ play_time?: string;
129
+ upload_time?: string;
130
+ last_played_time?: string;
131
+ }
132
+ interface SimpleScore$1 {
133
+ id: number;
134
+ song_name: string;
135
+ level: string;
136
+ level_index: LevelIndex$1;
137
+ clear: ClearType;
138
+ rank: RankType;
139
+ full_combo?: FullComboType;
140
+ full_chain?: FullChainType;
141
+ type: SongType$1;
142
+ }
143
+ interface RatingTrend$1 {
144
+ rating: number;
145
+ bests_rating: number;
146
+ selections_rating: number;
147
+ recents_rating?: number;
148
+ new_bests_rating?: number;
149
+ date: string;
150
+ }
151
+ interface Trophy$1 extends Collection$1 {
152
+ }
153
+ interface Character extends Collection$1 {
154
+ }
155
+ interface NamePlate$1 extends Collection$1 {
156
+ }
157
+ interface MapIcon extends Collection$1 {
158
+ }
159
+ type AssetType$1 = "character" | "trophy" | "plate" | "icon" | "jacket" | "music";
160
+
161
+ type models$1_Character = Character;
162
+ type models$1_ClassEmblem = ClassEmblem;
163
+ type models$1_ClearType = ClearType;
164
+ type models$1_FullChainType = FullChainType;
165
+ type models$1_FullComboType = FullComboType;
166
+ type models$1_MapIcon = MapIcon;
167
+ type models$1_RankType = RankType;
168
+ type models$1_Team = Team;
169
+ type models$1_TrophyColor = TrophyColor;
170
+ declare namespace models$1 {
171
+ export { type Alias$1 as Alias, type AssetType$1 as AssetType, type models$1_Character as Character, type models$1_ClassEmblem as ClassEmblem, type models$1_ClearType as ClearType, type Collection$1 as Collection, type CollectionRequired$1 as CollectionRequired, type CollectionRequiredSong$1 as CollectionRequiredSong, type models$1_FullChainType as FullChainType, type models$1_FullComboType as FullComboType, type Genre$1 as Genre, LevelIndex$1 as LevelIndex, type models$1_MapIcon as MapIcon, type NamePlate$1 as NamePlate, type Notes$1 as Notes, type Player$1 as Player, type models$1_RankType as RankType, type RatingTrend$1 as RatingTrend, type Score$1 as Score, type SimpleScore$1 as SimpleScore, type Song$2 as Song, type SongDifficulty$1 as SongDifficulty, type SongType$1 as SongType, type models$1_Team as Team, type Trophy$1 as Trophy, type models$1_TrophyColor as TrophyColor, type Version$1 as Version };
172
+ }
173
+
3
174
  interface Notes {
4
175
  total: number;
5
176
  tap: number;
@@ -184,6 +355,7 @@ interface CollectionGenre {
184
355
  type FCType = "app" | "ap" | "fcp" | "fc";
185
356
  type FSType = "fsdp" | "fsd" | "fsp" | "fs" | "sync";
186
357
  type RateType = "sssp" | "sss" | "ssp" | "ss" | "sp" | "s" | "aaa" | "aa" | "a" | "bbb" | "bb" | "b" | "c" | "d";
358
+ type AssetType = "icon" | "plate" | "frame" | "jacket" | "music";
187
359
  interface Score {
188
360
  /** 曲目 ID */
189
361
  id: number;
@@ -254,6 +426,7 @@ interface Frame extends Collection {
254
426
  }
255
427
 
256
428
  type models_Alias = Alias;
429
+ type models_AssetType = AssetType;
257
430
  type models_BuddyNotes = BuddyNotes;
258
431
  type models_Collection = Collection;
259
432
  type models_CollectionGenre = CollectionGenre;
@@ -280,100 +453,147 @@ type models_SongType = SongType;
280
453
  type models_Trophy = Trophy;
281
454
  type models_Version = Version;
282
455
  declare namespace models {
283
- export { type models_Alias as Alias, type models_BuddyNotes as BuddyNotes, type models_Collection as Collection, type models_CollectionGenre as CollectionGenre, type models_CollectionRequired as CollectionRequired, type models_CollectionRequiredSong as CollectionRequiredSong, type models_FCType as FCType, type models_FSType as FSType, type models_Frame as Frame, type models_Genre as Genre, type models_Icon as Icon, models_LevelIndex as LevelIndex, type models_NamePlate as NamePlate, type models_Notes as Notes, type models_Player as Player, type models_RateType as RateType, type models_RatingTrend as RatingTrend, type models_Score as Score, type models_SimpleScore as SimpleScore, type Song$1 as Song, type models_SongDifficulties as SongDifficulties, type models_SongDifficulty as SongDifficulty, type models_SongDifficultyUtage as SongDifficultyUtage, type models_SongType as SongType, type models_Trophy as Trophy, type models_Version as Version };
456
+ export { type models_Alias as Alias, type models_AssetType as AssetType, type models_BuddyNotes as BuddyNotes, type models_Collection as Collection, type models_CollectionGenre as CollectionGenre, type models_CollectionRequired as CollectionRequired, type models_CollectionRequiredSong as CollectionRequiredSong, type models_FCType as FCType, type models_FSType as FSType, type models_Frame as Frame, type models_Genre as Genre, type models_Icon as Icon, models_LevelIndex as LevelIndex, type models_NamePlate as NamePlate, type models_Notes as Notes, type models_Player as Player, type models_RateType as RateType, type models_RatingTrend as RatingTrend, type models_Score as Score, type models_SimpleScore as SimpleScore, type Song$1 as Song, type models_SongDifficulties as SongDifficulties, type models_SongDifficulty as SongDifficulty, type models_SongDifficultyUtage as SongDifficultyUtage, type models_SongType as SongType, type models_Trophy as Trophy, type models_Version as Version };
284
457
  }
285
458
 
286
- interface SongList {
287
- songs: Song$1[];
288
- genres: Genre[];
289
- versions: Version[];
290
- }
291
- interface AliasList {
292
- aliases: Alias[];
459
+ interface Bests$1 {
460
+ bests: Score$1[];
461
+ selections: Score$1[];
462
+ new_bests: Score$1[];
463
+ }
464
+ type RecentList$1 = Score$1[];
465
+ type BestScoreList$1 = SimpleScore$1[];
466
+ type Heatmap$1 = Record<string, number>;
467
+ type TrendList$1 = RatingTrend$1[];
468
+ type ScoreHistory$1 = Score$1[];
469
+
470
+ /**
471
+ * chunithm 开发者 API
472
+ */
473
+ declare class ChunithmDevApi {
474
+ readonly http: KyInstance;
475
+ constructor(http: KyInstance);
476
+ /**
477
+ * 创建或修改玩家信息
478
+ */
479
+ postPlayer(body: Player$1): Promise<Player$1>;
480
+ /**
481
+ * 获取玩家信息(通过好友码)
482
+ */
483
+ getPlayer(friendCode: number): Promise<Player$1>;
484
+ /**
485
+ * 获取玩家信息(通过 QQ 号)
486
+ */
487
+ getPlayerByQQ(qq: number): Promise<Player$1>;
488
+ /**
489
+ * 获取 Best 30(old 15 + new 15)
490
+ */
491
+ getBests(friendCode: number): Promise<Bests$1>;
492
+ /**
493
+ * 获取玩家缓存谱面的最佳成绩
494
+ */
495
+ getBest(friendCode: number, options: {
496
+ songId?: number;
497
+ songName?: string;
498
+ levelIndex?: LevelIndex$1;
499
+ }): Promise<Score$1>;
500
+ /**
501
+ * 获取玩家缓存的所有最佳成绩(简化)
502
+ */
503
+ getAllBestScores(friendCode: number): Promise<BestScoreList$1>;
504
+ /**
505
+ * 获取 Recent 50
506
+ */
507
+ getRecents(friendCode: number): Promise<RecentList$1>;
508
+ /**
509
+ * 获取成绩游玩历史记录
510
+ */
511
+ getScoreHistory(friendCode: number, options?: {
512
+ songId?: number;
513
+ levelIndex?: LevelIndex$1;
514
+ }): Promise<ScoreHistory$1>;
515
+ /**
516
+ * 成绩上传热力图
517
+ */
518
+ getHeatmap(friendCode: number): Promise<Heatmap$1>;
519
+ /**
520
+ * Rating 趋势
521
+ */
522
+ getTrend(friendCode: number, version?: number): Promise<TrendList$1>;
523
+ /**
524
+ * 获取玩家收藏品进度
525
+ */
526
+ getCollectionProgress(friendCode: number, collectionType: "trophy" | "character" | "plate" | "icon", collectionId: number): Promise<Collection$1>;
527
+ /**
528
+ * 上传玩家成绩
529
+ */
530
+ postScores(friendCode: number, scores: Score$1[]): Promise<unknown>;
531
+ /**
532
+ * 通过 NET 的 HTML 源代码上传玩家数据
533
+ */
534
+ postHtml(friendCode: number, htmlSource: string): Promise<unknown>;
293
535
  }
294
- interface CollectionGenreList {
295
- collectionGenres: CollectionGenre[];
536
+
537
+ type PlayerScores$1 = Score$1[];
538
+
539
+ /**
540
+ * chunithm 个人 API(需用户身份)
541
+ */
542
+ declare class ChunithmPersonalApi {
543
+ readonly http: KyInstance;
544
+ constructor(http: KyInstance);
545
+ /**
546
+ * 获取玩家信息
547
+ * GET /api/v0/user/chunithm/player
548
+ */
549
+ getPlayer(): Promise<Player$1>;
550
+ /**
551
+ * 获取玩家所有成绩
552
+ * GET /api/v0/user/chunithm/player/scores
553
+ */
554
+ getScores(): Promise<PlayerScores$1>;
555
+ /**
556
+ * 上传玩家成绩
557
+ * POST /api/v0/user/chunithm/player/scores
558
+ */
559
+ postScores(scores: Score$1[]): Promise<unknown>;
296
560
  }
297
561
 
298
- declare class Song implements Song$1 {
299
- readonly id: Song$1["id"];
300
- readonly title: Song$1["title"];
301
- readonly artist: Song$1["artist"];
302
- readonly genre: Song$1["genre"];
303
- readonly version: Song$1["version"];
304
- readonly bpm: Song$1["bpm"];
305
- readonly difficulties: Song$1["difficulties"];
306
- readonly locked: boolean;
307
- readonly disabled: boolean;
308
- readonly rights: Song$1["rights"];
309
- constructor(song: Song$1);
310
- get standard(): Record<"basic" | "advanced" | "expert" | "master" | "remaster", SongDifficulty> | null;
311
- get dx(): Record<"basic" | "advanced" | "expert" | "master" | "remaster", SongDifficulty> | null;
312
- get utage(): Record<"basic" | "advanced" | "expert" | "master" | "remaster", SongDifficultyUtage> | null;
562
+ interface SongList$1 {
563
+ songs: Song$2[];
564
+ genres: Genre$1[];
565
+ versions: Version$1[];
566
+ }
567
+ interface AliasList$1 {
568
+ aliases: Alias$1[];
313
569
  }
314
570
 
315
571
  /**
316
- * maimai 公共 API
572
+ * chunithm 公共 API
317
573
  */
318
- declare class MaimaiPublicApi {
319
- private readonly http;
574
+ declare class ChunithmPublicApi {
575
+ readonly http: KyInstance;
320
576
  constructor(http: KyInstance);
321
577
  /**
322
578
  * 获取歌曲列表
323
- * @param version 版本,不填写遵循api默认行为
324
- * @param notes 是否包含谱面信息,不填写遵循api默认行为
325
- * @returns 歌曲列表
326
579
  */
327
- getSongList(version?: number, notes?: boolean): Promise<SongList>;
580
+ getSongList(version?: number, notes?: boolean): Promise<SongList$1>;
328
581
  /**
329
582
  * 获取歌曲信息
330
- * @param id 歌曲 ID
331
- * @returns 歌曲信息
332
583
  */
333
- getSong(id: number): Promise<Song>;
584
+ getSong(id: number, version?: number): Promise<Song$2>;
334
585
  /**
335
586
  * 获取歌曲别名列表
336
- * @returns 歌曲别名列表
337
587
  */
338
- getAliasList(): Promise<AliasList>;
588
+ getAliasList(): Promise<AliasList$1>;
339
589
  /**
340
590
  * 获取收藏品列表
341
- * @param collectionType trophy | icon | plate | frame
342
- * @param options.version 版本,不填写遵循api默认行为
343
- * @param options.required 是否包含曲目需求,默认值为 false
344
- * @returns 收藏品列表
345
591
  */
346
- getCollectionList(collectionType: "trophy" | "icon" | "plate" | "frame", options?: {
347
- version?: number;
348
- required?: boolean;
349
- }): Promise<Collection[] | undefined>;
592
+ getCollectionList(collectionType: "trophy" | "character" | "plate" | "icon", version?: number): Promise<Collection$1[] | undefined>;
350
593
  /**
351
594
  * 获取收藏品信息
352
- * @param collectionType trophy | icon | plate | frame
353
- * @param id 收藏品 ID
354
- * @param options.version 版本,不填写遵循api默认行为
355
- * @returns 收藏品信息
356
- */
357
- getCollectionInfo(collectionType: "trophy" | "icon" | "plate" | "frame", id: number, options?: {
358
- version?: number;
359
- }): Promise<Collection>;
360
- /**
361
- * 获取收藏品分类列表
362
- * @param options.version 版本,不填写遵循api默认行为
363
- * @returns 收藏品分类列表
364
595
  */
365
- getCollectionGenreList(options?: {
366
- version?: number;
367
- }): Promise<CollectionGenreList>;
368
- /**
369
- * 获取收藏品分类信息
370
- * @param id 收藏品分类 ID
371
- * @param options.version 版本,不填写遵循api默认行为
372
- * @returns 收藏品分类信息
373
- */
374
- getCollectionGenreInfo(id: number, options?: {
375
- version?: number;
376
- }): Promise<CollectionGenre>;
596
+ getCollectionInfo(collectionType: "trophy" | "character" | "plate" | "icon", id: number, version?: number): Promise<Collection$1>;
377
597
  }
378
598
 
379
599
  interface Bests {
@@ -392,7 +612,7 @@ type ScoreHistory = Score[];
392
612
  * maimai 开发者 API(路径风格,与文档一致,不使用查询参数)
393
613
  */
394
614
  declare class MaimaiDevApi {
395
- private readonly http;
615
+ readonly http: KyInstance;
396
616
  constructor(http: KyInstance);
397
617
  /**
398
618
  * 创建或修改玩家信息
@@ -484,7 +704,7 @@ type PlayerScores = Score[];
484
704
  * maimai 个人 API(需用户身份,路径遵循文档)
485
705
  */
486
706
  declare class MaimaiPersonalApi {
487
- private readonly http;
707
+ readonly http: KyInstance;
488
708
  constructor(http: KyInstance);
489
709
  /**
490
710
  * 获取玩家信息
@@ -507,25 +727,133 @@ declare class MaimaiPersonalApi {
507
727
  postScores(scores: Score[]): Promise<unknown>;
508
728
  }
509
729
 
510
- type LxnsApiClientTokens = Omit<LxnsApiClientOptions, "baseURL">;
511
- type Flags = Readonly<LxnsApiClientTokens>;
512
- type Simplify<T> = {
513
- [K in keyof T]: T[K];
514
- } & {};
515
- type IfDefined<T, Then, Else = {}> = [T] extends [NonNullable<T>] ? Then : Else;
516
- type MaiMaiOf<O extends Flags> = Simplify<{
517
- public: MaimaiPublicApi;
518
- } & IfDefined<O["devAccessToken"], {
519
- dev: MaimaiDevApi;
520
- }> & IfDefined<O["personalAccessToken"], {
521
- personal: MaimaiPersonalApi;
522
- }>>;
730
+ declare class Song implements Song$1 {
731
+ readonly id: Song$1["id"];
732
+ readonly title: Song$1["title"];
733
+ readonly artist: Song$1["artist"];
734
+ readonly genre: Song$1["genre"];
735
+ readonly version: Song$1["version"];
736
+ readonly bpm: Song$1["bpm"];
737
+ readonly difficulties: Song$1["difficulties"];
738
+ readonly locked: boolean;
739
+ readonly disabled: boolean;
740
+ readonly rights: Song$1["rights"];
741
+ constructor(song: Song$1);
742
+ get standard(): Record<"basic" | "advanced" | "expert" | "master" | "remaster", SongDifficulty> | null;
743
+ get dx(): Record<"basic" | "advanced" | "expert" | "master" | "remaster", SongDifficulty> | null;
744
+ get utage(): Record<"basic" | "advanced" | "expert" | "master" | "remaster", SongDifficultyUtage> | null;
745
+ }
746
+
747
+ interface SongList {
748
+ songs: Song$1[];
749
+ genres: Genre[];
750
+ versions: Version[];
751
+ }
752
+ interface AliasList {
753
+ aliases: Alias[];
754
+ }
755
+ interface CollectionGenreList {
756
+ collectionGenres: CollectionGenre[];
757
+ }
523
758
 
524
- interface LxnsApiClientOptions {
759
+ /**
760
+ * maimai 公共 API
761
+ */
762
+ declare class MaimaiPublicApi {
763
+ readonly http: KyInstance;
764
+ constructor(http: KyInstance);
765
+ /**
766
+ * 获取歌曲列表
767
+ * @param version 版本,不填写遵循api默认行为
768
+ * @param notes 是否包含谱面信息,不填写遵循api默认行为
769
+ * @returns 歌曲列表
770
+ */
771
+ getSongList(version?: number, notes?: boolean): Promise<SongList>;
772
+ /**
773
+ * 获取歌曲信息
774
+ * @param id 歌曲 ID
775
+ * @returns 歌曲信息
776
+ */
777
+ getSong(id: number): Promise<Song>;
778
+ /**
779
+ * 获取歌曲别名列表
780
+ * @returns 歌曲别名列表
781
+ */
782
+ getAliasList(): Promise<AliasList>;
783
+ /**
784
+ * 获取收藏品列表
785
+ * @param collectionType trophy | icon | plate | frame
786
+ * @param options.version 版本,不填写遵循api默认行为
787
+ * @param options.required 是否包含曲目需求,默认值为 false
788
+ * @returns 收藏品列表
789
+ */
790
+ getCollectionList(collectionType: "trophy" | "icon" | "plate" | "frame", options?: {
791
+ version?: number;
792
+ required?: boolean;
793
+ }): Promise<Collection[] | undefined>;
794
+ /**
795
+ * 获取收藏品信息
796
+ * @param collectionType trophy | icon | plate | frame
797
+ * @param id 收藏品 ID
798
+ * @param options.version 版本,不填写遵循api默认行为
799
+ * @returns 收藏品信息
800
+ */
801
+ getCollectionInfo(collectionType: "trophy" | "icon" | "plate" | "frame", id: number, options?: {
802
+ version?: number;
803
+ }): Promise<Collection>;
804
+ /**
805
+ * 获取收藏品分类列表
806
+ * @param options.version 版本,不填写遵循api默认行为
807
+ * @returns 收藏品分类列表
808
+ */
809
+ getCollectionGenreList(options?: {
810
+ version?: number;
811
+ }): Promise<CollectionGenreList>;
812
+ /**
813
+ * 获取收藏品分类信息
814
+ * @param id 收藏品分类 ID
815
+ * @param options.version 版本,不填写遵循api默认行为
816
+ * @returns 收藏品分类信息
817
+ */
818
+ getCollectionGenreInfo(id: number, options?: {
819
+ version?: number;
820
+ }): Promise<CollectionGenre>;
821
+ }
822
+
823
+ type DataValue = Record<string, unknown> | Array<unknown> | null;
824
+ type ApiResponse<TData = DataValue> = {
825
+ success: boolean;
826
+ code: number;
827
+ message?: string;
828
+ data?: TData;
829
+ };
830
+ interface LxnsApiClientOptions$1 {
525
831
  personalAccessToken?: string;
526
832
  devAccessToken?: string;
527
833
  baseURL?: string;
528
834
  }
835
+ type LxnsApiClientTokenFlags = Readonly<Omit<LxnsApiClientOptions$1, "baseURL">>;
836
+ type IfDefined<T, Then, Else = object> = [T] extends [NonNullable<T>] ? Then : Else;
837
+ type Simplify<T> = {
838
+ [K in keyof T]: T[K];
839
+ };
840
+ type GameApi<O extends LxnsApiClientTokenFlags, TPublic, TDev, TPersonal, TExtra extends object = object> = Simplify<{
841
+ public: TPublic;
842
+ } & TExtra & IfDefined<O["devAccessToken"], {
843
+ dev: TDev;
844
+ }> & IfDefined<O["personalAccessToken"], {
845
+ personal: TPersonal;
846
+ }>>;
847
+ type MaimaiApiExtra = {
848
+ getAsset: (type: AssetType, id: number) => Promise<Uint8Array>;
849
+ };
850
+ type MaimaiApiOf<O extends LxnsApiClientTokenFlags> = GameApi<O, MaimaiPublicApi, MaimaiDevApi, MaimaiPersonalApi, MaimaiApiExtra>;
851
+ type ChunithmApiExtra = {
852
+ getAsset: (type: AssetType$1, id: number) => Promise<Uint8Array>;
853
+ };
854
+ type ChunithmApiOf<O extends LxnsApiClientTokenFlags> = GameApi<O, ChunithmPublicApi, ChunithmDevApi, ChunithmPersonalApi, ChunithmApiExtra>;
855
+
856
+ type LxnsApiClientOptions = LxnsApiClientOptions$1;
529
857
  declare class LxnsApiClient<O extends LxnsApiClientOptions> {
530
858
  config: LxnsApiClientOptions & {
531
859
  baseURL: string;
@@ -533,8 +861,27 @@ declare class LxnsApiClient<O extends LxnsApiClientOptions> {
533
861
  /**
534
862
  * maimai API
535
863
  */
536
- readonly maimai: MaiMaiOf<O>;
864
+ readonly maimai: MaimaiApiOf<O>;
865
+ /**
866
+ * chunithm API
867
+ */
868
+ readonly chunithm: ChunithmApiOf<O>;
869
+ private static readonly BASE_OPTIONS;
870
+ private mountGameApi;
537
871
  constructor(config?: Readonly<O>);
538
872
  }
539
873
 
540
- export { LxnsApiClient, models as MaimaiModels };
874
+ declare class LxnsApiError extends Error {
875
+ readonly code: number;
876
+ readonly status?: number;
877
+ readonly success: boolean;
878
+ readonly data?: DataValue;
879
+ constructor(payload: ApiResponse, status?: number);
880
+ }
881
+ declare function isLxnsApiError(error: unknown): error is LxnsApiError;
882
+ declare function isNotFoundError(error: unknown): error is LxnsApiError;
883
+ declare function isAuthError(error: unknown): error is LxnsApiError;
884
+ declare function isRateLimitError(error: unknown): error is LxnsApiError;
885
+ declare function isServerError(error: unknown): error is LxnsApiError;
886
+
887
+ export { models$1 as ChunithmModels, LxnsApiClient, LxnsApiError, models as MaimaiModels, isAuthError, isLxnsApiError, isNotFoundError, isRateLimitError, isServerError };