@hizollo/osu-api 1.2.0 → 1.2.2

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.
@@ -0,0 +1,703 @@
1
+ import { Buffer } from "node:buffer";
2
+ export type ModsResolvable = number | string | bigint | ModsBitField | Array<ModsResolvable>;
3
+ export declare class ModsBitField {
4
+ static Flags: {
5
+ None: bigint;
6
+ NoFail: bigint;
7
+ Easy: bigint;
8
+ TouchDevice: bigint;
9
+ Hidden: bigint;
10
+ HardRock: bigint;
11
+ SuddenDeath: bigint;
12
+ DoubleTime: bigint;
13
+ Relax: bigint;
14
+ HalfTime: bigint;
15
+ Nightcore: bigint;
16
+ Flashlight: bigint;
17
+ Autoplay: bigint;
18
+ SpunOut: bigint;
19
+ AutoPilot: bigint;
20
+ Perfect: bigint;
21
+ Key4: bigint;
22
+ Key5: bigint;
23
+ Key6: bigint;
24
+ Key7: bigint;
25
+ Key8: bigint;
26
+ FadeIn: bigint;
27
+ Random: bigint;
28
+ Cinema: bigint;
29
+ Target: bigint;
30
+ Key9: bigint;
31
+ KeyCoop: bigint;
32
+ Key1: bigint;
33
+ Key3: bigint;
34
+ Key2: bigint;
35
+ ScoreV2: bigint;
36
+ Mirror: bigint;
37
+ };
38
+ static KeyMod: bigint;
39
+ static FreeModAllowed: bigint;
40
+ static ScoreIncreaseMods: bigint;
41
+ bitfield: bigint;
42
+ constructor(bits?: ModsResolvable);
43
+ any(bit: ModsResolvable): boolean;
44
+ equals(bit: ModsResolvable): boolean;
45
+ has(bit: ModsResolvable): boolean;
46
+ add(...bits: Array<ModsResolvable>): this;
47
+ remove(...bits: ModsResolvable[]): this;
48
+ toArray(): string[];
49
+ serialize(): {
50
+ [key: string]: boolean;
51
+ };
52
+ isNone(): boolean;
53
+ valueOf(): bigint;
54
+ static resolve(bit: ModsResolvable): bigint;
55
+ }
56
+ export declare enum GameMode {
57
+ Standard = 0,
58
+ Taiko = 1,
59
+ Catch = 2,
60
+ Mania = 3
61
+ }
62
+ export declare enum UserRequestType {
63
+ String = "string",
64
+ Id = "id"
65
+ }
66
+ export declare const Mods: {
67
+ None: bigint;
68
+ NoFail: bigint;
69
+ Easy: bigint;
70
+ TouchDevice: bigint;
71
+ Hidden: bigint;
72
+ HardRock: bigint;
73
+ SuddenDeath: bigint;
74
+ DoubleTime: bigint;
75
+ Relax: bigint;
76
+ HalfTime: bigint;
77
+ Nightcore: bigint;
78
+ Flashlight: bigint;
79
+ Autoplay: bigint;
80
+ SpunOut: bigint;
81
+ AutoPilot: bigint;
82
+ Perfect: bigint;
83
+ Key4: bigint;
84
+ Key5: bigint;
85
+ Key6: bigint;
86
+ Key7: bigint;
87
+ Key8: bigint;
88
+ FadeIn: bigint;
89
+ Random: bigint;
90
+ Cinema: bigint;
91
+ Target: bigint;
92
+ Key9: bigint;
93
+ KeyCoop: bigint;
94
+ Key1: bigint;
95
+ Key3: bigint;
96
+ Key2: bigint;
97
+ ScoreV2: bigint;
98
+ Mirror: bigint;
99
+ };
100
+ export declare const ModsAbbreviation: {
101
+ NoFail: string;
102
+ Easy: string;
103
+ TouchDevice: string;
104
+ Hidden: string;
105
+ HardRock: string;
106
+ SuddenDeath: string;
107
+ DoubleTime: string;
108
+ Relax: string;
109
+ HalfTime: string;
110
+ Nightcore: string;
111
+ Flashlight: string;
112
+ Autoplay: string;
113
+ SpunOut: string;
114
+ AutoPilot: string;
115
+ Perfect: string;
116
+ Key4: string;
117
+ Key5: string;
118
+ Key6: string;
119
+ Key7: string;
120
+ Key8: string;
121
+ FadeIn: string;
122
+ Random: string;
123
+ Cinema: string;
124
+ Target: string;
125
+ Key9: string;
126
+ KeyCoop: string;
127
+ Key1: string;
128
+ Key3: string;
129
+ Key2: string;
130
+ ScoreV2: string;
131
+ Mirror: string;
132
+ };
133
+ export declare enum BeatmapApprovedState {
134
+ Graveyard = -2,
135
+ WIP = -1,
136
+ Pending = 0,
137
+ Ranked = 1,
138
+ Approved = 2,
139
+ Qualified = 3,
140
+ Loved = 4
141
+ }
142
+ export declare enum BeatmapGenre {
143
+ Any = 0,
144
+ Unspecified = 1,
145
+ VideoGame = 2,
146
+ Anime = 3,
147
+ Rock = 4,
148
+ Pop = 5,
149
+ Other = 6,
150
+ Novelty = 7,
151
+ HipHop = 9,
152
+ Electronic = 10,
153
+ Metal = 11,
154
+ Classic = 12,
155
+ Folk = 13,
156
+ Jazz = 14
157
+ }
158
+ export declare enum BeatmapLanguage {
159
+ Any = 0,
160
+ Unspecified = 1,
161
+ English = 2,
162
+ Japanese = 3,
163
+ Chinese = 4,
164
+ Instrumental = 5,
165
+ Korean = 6,
166
+ French = 7,
167
+ German = 8,
168
+ Swedish = 9,
169
+ Spanish = 10,
170
+ Italian = 11,
171
+ Russian = 12,
172
+ Polish = 13,
173
+ Other = 14
174
+ }
175
+ export declare enum ScoreRank {
176
+ XH = 0,
177
+ X = 1,
178
+ SH = 2,
179
+ S = 3,
180
+ A = 4,
181
+ B = 5,
182
+ C = 6,
183
+ D = 7,
184
+ F = 8
185
+ }
186
+ export declare enum MatchScoringType {
187
+ Score = 0,
188
+ Accuracy = 1,
189
+ Combo = 2,
190
+ ScoreV2 = 3
191
+ }
192
+ export declare enum MatchTeamType {
193
+ HeadToHead = 0,
194
+ TagCoop = 1,
195
+ TeamVs = 2,
196
+ TagTeamVs = 3
197
+ }
198
+ export declare enum Team {
199
+ None = 0,
200
+ Blue = 1,
201
+ Red = 2
202
+ }
203
+ export interface ClientOptions {
204
+ apiKey: string;
205
+ }
206
+ export interface FetchUserBannerOptions {
207
+ id: string;
208
+ }
209
+ export interface UserScoreRankCount {
210
+ ssh: number;
211
+ ss: number;
212
+ sh: number;
213
+ s: number;
214
+ a: number;
215
+ }
216
+ export interface BeatmapDiffculty {
217
+ ApproachRate: number;
218
+ CircleSize: number;
219
+ HPDrainRate: number;
220
+ OverallDifficulty: number;
221
+ aim: number | null;
222
+ speed: number | null;
223
+ rating: number;
224
+ }
225
+ export interface BeatmapObjectCount {
226
+ circle: number;
227
+ slider: number;
228
+ spinner: number;
229
+ }
230
+ export interface ScoreStatistics {
231
+ count50: number;
232
+ count100: number;
233
+ count300: number;
234
+ countMiss: number;
235
+ countKatu: number;
236
+ countGeki: number;
237
+ }
238
+ export interface RequestOptions<T extends OsuApiRequestOptions> {
239
+ path: string;
240
+ queries: T;
241
+ }
242
+ export interface BeatmapScoreOtherInfo {
243
+ mapId?: string;
244
+ mode?: GameMode;
245
+ }
246
+ export interface OsuApiRequestOptions {}
247
+ export interface APIGetUserRequestOptions extends OsuApiRequestOptions {
248
+ u: string;
249
+ m?: GameMode;
250
+ type?: UserRequestType;
251
+ event_days?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
252
+ }
253
+ export interface GetUserRequestOptions {
254
+ user: string;
255
+ gameMode?: GameMode;
256
+ type?: UserRequestType;
257
+ eventDays?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
258
+ }
259
+ export interface APIGetBeatmapsRequestOptions extends OsuApiRequestOptions {
260
+ since?: string;
261
+ s?: string;
262
+ b?: string;
263
+ u?: string;
264
+ type?: UserRequestType;
265
+ m?: GameMode;
266
+ a?: boolean;
267
+ h?: string;
268
+ limit?: number;
269
+ mods?: bigint;
270
+ }
271
+ export interface GetBeatmapsRequestOptions {
272
+ since?: Date;
273
+ beatmapsetId?: string;
274
+ beatmapId?: string;
275
+ user?: string;
276
+ type?: UserRequestType;
277
+ mode?: GameMode;
278
+ showConverted?: boolean;
279
+ hash?: string;
280
+ limit?: number;
281
+ mods?: ModsResolvable;
282
+ }
283
+ export interface APIGetScoresRequestOptions extends OsuApiRequestOptions {
284
+ b: string;
285
+ u?: string;
286
+ m?: GameMode;
287
+ mods?: bigint;
288
+ type?: UserRequestType;
289
+ limit?: number;
290
+ }
291
+ export interface GetScoreRequestOptions {
292
+ beatmapId: string;
293
+ user?: string;
294
+ mode?: GameMode;
295
+ mods?: ModsResolvable;
296
+ type?: UserRequestType;
297
+ limit?: number;
298
+ }
299
+ export interface APIGetUserBestRequestOptions extends OsuApiRequestOptions {
300
+ u: string;
301
+ m?: GameMode;
302
+ type?: UserRequestType;
303
+ limit?: number;
304
+ }
305
+ export interface GetUserBestRequestOptions {
306
+ user: string;
307
+ mode?: GameMode;
308
+ type?: UserRequestType;
309
+ limit?: number;
310
+ }
311
+ export interface APIGetUserRecentRequestOptions extends OsuApiRequestOptions {
312
+ u: string;
313
+ m?: GameMode;
314
+ type?: UserRequestType;
315
+ limit?: number;
316
+ }
317
+ export interface GetUserRecentRequestOptions {
318
+ user: string;
319
+ mode?: GameMode;
320
+ type?: UserRequestType;
321
+ limit?: number;
322
+ }
323
+ export interface APIGetReplayRequestOptions extends OsuApiRequestOptions {
324
+ b?: string;
325
+ u?: string;
326
+ m?: GameMode;
327
+ s?: string;
328
+ type?: UserRequestType;
329
+ mods?: bigint;
330
+ }
331
+ export interface GetReplayRequestOptions {
332
+ beatmapId?: string;
333
+ user?: string;
334
+ mode?: GameMode;
335
+ scoreId?: string;
336
+ type?: UserRequestType;
337
+ mods?: ModsResolvable;
338
+ }
339
+ export interface APIGetMatchRequestOptions extends OsuApiRequestOptions {
340
+ mp: string;
341
+ }
342
+ export interface GetMatchRequestOptions {
343
+ matchId: string;
344
+ }
345
+ export interface APIUser {
346
+ user_id: string;
347
+ username: string;
348
+ join_date: string;
349
+ count300: string;
350
+ count100: string;
351
+ count50: string;
352
+ playcount: string;
353
+ ranked_score: string;
354
+ total_score: string;
355
+ pp_rank: string;
356
+ level: string;
357
+ pp_raw: string;
358
+ accuracy: string;
359
+ count_rank_ss: string;
360
+ count_rank_ssh: string;
361
+ count_rank_s: string;
362
+ count_rank_sh: string;
363
+ count_rank_a: string;
364
+ country: string;
365
+ total_seconds_played: string;
366
+ pp_country_rank: string;
367
+ events: Array<APIUserEvent>;
368
+ }
369
+ export interface APIUserEvent {
370
+ display_html: string;
371
+ beatmap_id: string;
372
+ beatmapset_id: string;
373
+ date: string;
374
+ epicfactor: string;
375
+ }
376
+ export interface APIBeatmap {
377
+ beatmapset_id: string;
378
+ beatmap_id: string;
379
+ approved: '-2' | '-1' | '0' | '1' | '2' | '3' | '4';
380
+ total_length: string;
381
+ hit_length: string;
382
+ version: string;
383
+ file_md5: string;
384
+ diff_size: string;
385
+ diff_overall: string;
386
+ diff_approach: string;
387
+ diff_drain: string;
388
+ mode: string;
389
+ count_normal: string;
390
+ count_slider: string;
391
+ count_spinner: string;
392
+ submit_date: string;
393
+ approved_date: string | null;
394
+ last_update: string;
395
+ artist: string;
396
+ title: string;
397
+ creator: string;
398
+ creator_id: string;
399
+ bpm: string;
400
+ source: string;
401
+ tags: string;
402
+ genre_id: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '9' | '10' | '11' | '12' | '13' | '14';
403
+ language_id: '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14';
404
+ favourite_count: string;
405
+ rating: string;
406
+ download_unavailable: '0' | '1';
407
+ audio_unavailable: '0' | '1';
408
+ playcount: string;
409
+ passcount: string;
410
+ max_combo: string | null;
411
+ diff_aim: string | null;
412
+ diff_speed: string | null;
413
+ difficultyrating: string | null;
414
+ }
415
+ export interface APIBasicScore {
416
+ score: string;
417
+ maxcombo: string;
418
+ count50: string;
419
+ count100: string;
420
+ count300: string;
421
+ countmiss: string;
422
+ countkatu: string;
423
+ countgeki: string;
424
+ perfect: '0' | '1';
425
+ enabled_mods: string | null;
426
+ user_id: string;
427
+ rank: keyof typeof ScoreRank;
428
+ }
429
+ export interface APIUserRecentPlayedScore extends APIBasicScore {
430
+ date: string;
431
+ beatmap_id: string;
432
+ }
433
+ export interface APIUserBestPerformanceScore extends APIUserRecentPlayedScore {
434
+ score_id: string;
435
+ pp: string;
436
+ replay_available: '0' | '1';
437
+ }
438
+ export interface APIBeatmapScore extends APIBasicScore {
439
+ date: string;
440
+ score_id: string;
441
+ username: string;
442
+ pp: string;
443
+ replay_available: '0' | '1';
444
+ }
445
+ export interface APIMatchScore extends APIBasicScore {
446
+ slot: string;
447
+ team: '0' | '1' | '2';
448
+ pass: '0' | '1';
449
+ }
450
+ export interface APIMatchData {
451
+ match_id: string;
452
+ name: string;
453
+ start_time: string;
454
+ end_time: string | null;
455
+ }
456
+ export interface APIMatchGameData {
457
+ game_id: string;
458
+ start_time: string;
459
+ end_time: string;
460
+ beatmap_id: string;
461
+ play_mode: '0' | '1' | '2' | '3';
462
+ match_type: string;
463
+ scoring_type: '0' | '1' | '2' | '3';
464
+ team_type: '0' | '1' | '2' | '3';
465
+ mods: string;
466
+ scores: Array<APIMatchScore>;
467
+ }
468
+ export interface APIMatch {
469
+ match: APIMatchData;
470
+ games: Array<APIMatchGameData>;
471
+ }
472
+ export interface APIMatchNotFound {
473
+ match: 0;
474
+ games: [];
475
+ }
476
+ export interface APIReplay {
477
+ content: string;
478
+ encoding: 'base64';
479
+ }
480
+ export declare class Beatmapset {
481
+ readonly client: Client;
482
+ readonly beatmaps: Array<Beatmap>;
483
+ readonly id: string;
484
+ readonly approvedState: BeatmapApprovedState;
485
+ readonly length: number;
486
+ readonly submitDate: Date;
487
+ readonly approvedDate: Date | null;
488
+ readonly lastUpdate: Date;
489
+ readonly artist: string;
490
+ readonly title: string;
491
+ readonly creator: string;
492
+ readonly creatorId: string;
493
+ readonly source: string;
494
+ readonly tags: string[];
495
+ readonly genre: BeatmapGenre;
496
+ readonly language: BeatmapLanguage;
497
+ readonly favoriteCount: number;
498
+ readonly rating: number;
499
+ readonly downloadUnavailable: boolean;
500
+ readonly audioUnavailable: boolean;
501
+ constructor(client: Client, data: Beatmap, maps: Array<Beatmap>);
502
+ beatmapsetURL(): string;
503
+ coverImageURL(): string;
504
+ coverThumbnailURL(): string;
505
+ getCreator(): Promise<User | undefined>;
506
+ }
507
+ export declare class UserEvent {
508
+ readonly user: User;
509
+ readonly displayHtml: string;
510
+ readonly beatmapId: string;
511
+ readonly beatmapsetId: string;
512
+ readonly date: Date;
513
+ readonly epicfactor: number;
514
+ constructor(user: User, data: APIUserEvent);
515
+ getBeatmap(): Promise<Beatmap | undefined>;
516
+ getBeatmapset(): Promise<Beatmapset | undefined>;
517
+ }
518
+ export declare class User {
519
+ readonly client: Client;
520
+ readonly id: string;
521
+ readonly username: string;
522
+ readonly joinDate: Date;
523
+ readonly playcount: number;
524
+ readonly level: number;
525
+ readonly country: string;
526
+ readonly playtime: number;
527
+ readonly events: Array<UserEvent>;
528
+ banner: string | null;
529
+ readonly count300: number;
530
+ readonly count100: number;
531
+ readonly count50: number;
532
+ readonly rankedScore: number;
533
+ readonly totalScore: number;
534
+ readonly rank: number;
535
+ readonly countryRank: number;
536
+ readonly pp: number;
537
+ readonly accuracy: number;
538
+ readonly scoreRankCount: UserScoreRankCount;
539
+ constructor(client: Client, data: APIUser);
540
+ avatarURL(): string;
541
+ profileURL(): string;
542
+ fetchBanner(force?: boolean): Promise<string>;
543
+ getBest(options?: Omit<GetUserBestRequestOptions, "user" | "type">): Promise<BeatmapScore[]>;
544
+ getRecent(options?: Omit<GetUserRecentRequestOptions, "user" | "type">): Promise<BeatmapScore[]>;
545
+ }
546
+ export declare class Beatmap {
547
+ readonly client: Client;
548
+ readonly id: string;
549
+ readonly beatmapsetId: string;
550
+ readonly approvedState: BeatmapApprovedState;
551
+ readonly totalLength: number;
552
+ readonly hitLength: number;
553
+ readonly diffcultyName: string;
554
+ readonly hash: string;
555
+ readonly difficulty: BeatmapDiffculty;
556
+ readonly mode: GameMode;
557
+ readonly objectCount: BeatmapObjectCount;
558
+ readonly submitDate: Date;
559
+ readonly approvedDate: Date | null;
560
+ readonly lastUpdate: Date;
561
+ readonly artist: string;
562
+ readonly title: string;
563
+ readonly creator: string;
564
+ readonly creatorId: string;
565
+ readonly bpm: number;
566
+ readonly source: string;
567
+ readonly tags: string[];
568
+ readonly genre: BeatmapGenre;
569
+ readonly language: BeatmapLanguage;
570
+ readonly favoriteCount: number;
571
+ readonly rating: number;
572
+ readonly downloadUnavailable: boolean;
573
+ readonly audioUnavailable: boolean;
574
+ readonly playcount: number;
575
+ readonly passcount: number;
576
+ readonly maxCombo: number | null;
577
+ constructor(client: Client, data: APIBeatmap);
578
+ beatmapsetURL(): string;
579
+ beatmapURL(): string;
580
+ coverImageURL(): string;
581
+ coverThumbnailURL(): string;
582
+ getCreator(): Promise<User | undefined>;
583
+ getBeatmapset(): Promise<Beatmapset>;
584
+ }
585
+ export declare class Replay {
586
+ readonly client: Client;
587
+ readonly content: string;
588
+ readonly stream: Buffer;
589
+ constructor(client: Client, data: APIReplay);
590
+ }
591
+ export type APIScore = APIBasicScore | APIUserRecentPlayedScore | APIUserBestPerformanceScore | APIBeatmapScore | APIMatchScore;
592
+ export declare abstract class BaseScore {
593
+ readonly client: Client;
594
+ readonly score: number;
595
+ readonly maxCombo: number;
596
+ readonly statistics: ScoreStatistics;
597
+ readonly perfect: boolean;
598
+ readonly enabledMods: ModsBitField;
599
+ readonly userId: string;
600
+ readonly rank: ScoreRank;
601
+ readonly mode: GameMode;
602
+ readonly beatmapId: string;
603
+ readonly accuracy: number;
604
+ constructor(client: Client, data: APIScore, other: BeatmapScoreOtherInfo);
605
+ getPlayer(options?: Omit<GetUserRequestOptions, "user" | "type">): Promise<User | undefined>;
606
+ getBeatmap(): Promise<Beatmap | undefined>;
607
+ getReplay(): Promise<Replay>;
608
+ }
609
+ export declare class BeatmapScore extends BaseScore {
610
+ readonly date: Date;
611
+ readonly scoreId: string | null;
612
+ readonly username: string | null;
613
+ readonly pp: number | null;
614
+ readonly replayAvailable: boolean | null;
615
+ constructor(client: Client, data: APIBeatmapScore, other: BeatmapScoreOtherInfo);
616
+ constructor(client: Client, data: APIUserBestPerformanceScore, other: BeatmapScoreOtherInfo);
617
+ constructor(client: Client, data: APIUserRecentPlayedScore, other: BeatmapScoreOtherInfo);
618
+ scoreURL(): string | null;
619
+ }
620
+ export declare abstract class BaseManager {
621
+ readonly client: Client;
622
+ constructor(client: Client);
623
+ }
624
+ export declare class UserManager extends BaseManager {
625
+ getUser(options: GetUserRequestOptions): Promise<User[]>;
626
+ fetchBanner({ id }: FetchUserBannerOptions): Promise<string>;
627
+ getUserBest(options: GetUserBestRequestOptions): Promise<BeatmapScore[]>;
628
+ getUserRecent(options: GetUserRecentRequestOptions): Promise<BeatmapScore[]>;
629
+ }
630
+ export declare class BeatmapManager extends BaseManager {
631
+ getBeatmaps(options?: GetBeatmapsRequestOptions): Promise<Beatmap[]>;
632
+ }
633
+ export declare class ScoreManager extends BaseManager {
634
+ getScores(options: GetScoreRequestOptions): Promise<BeatmapScore[]>;
635
+ }
636
+ export declare class ReplayManager extends BaseManager {
637
+ getReplay(options: GetReplayRequestOptions): Promise<Replay>;
638
+ }
639
+ export declare class MatchScore extends BaseScore {
640
+ readonly slot: number;
641
+ readonly team: Team;
642
+ readonly pass: boolean;
643
+ constructor(client: Client, data: APIMatchScore, other: BeatmapScoreOtherInfo);
644
+ }
645
+ export declare class MatchGame {
646
+ readonly client: Client;
647
+ readonly match: Match;
648
+ readonly id: string;
649
+ readonly startAt: Date;
650
+ readonly endAt: Date;
651
+ readonly beatmapId: string;
652
+ readonly mode: GameMode;
653
+ readonly matchType: number;
654
+ readonly scoringType: MatchScoringType;
655
+ readonly teamType: Team;
656
+ readonly mods: ModsBitField;
657
+ readonly scores: Array<MatchScore>;
658
+ constructor(match: Match, data: APIMatchGameData);
659
+ getBeatmap(): Promise<Beatmap | undefined>;
660
+ }
661
+ export declare class Match {
662
+ readonly client: Client;
663
+ readonly id: string;
664
+ readonly name: string;
665
+ readonly startAt: Date;
666
+ readonly endAt: Date | null;
667
+ readonly games: Array<MatchGame>;
668
+ constructor(client: Client, data: APIMatch);
669
+ }
670
+ export declare class MatchManager extends BaseManager {
671
+ getMatch(options: GetMatchRequestOptions): Promise<Match | null>;
672
+ }
673
+ export declare class Client {
674
+ private apiKey;
675
+ users: UserManager;
676
+ beatmaps: BeatmapManager;
677
+ scores: ScoreManager;
678
+ replays: ReplayManager;
679
+ matches: MatchManager;
680
+ constructor(options: ClientOptions);
681
+ request<T extends OsuApiRequestOptions>(options: RequestOptions<T>): Promise<any>;
682
+ }
683
+ export declare abstract class URLBuilder {
684
+ private static gameModeToURLPattern;
685
+ static avatar(id: string): string;
686
+ static profile(idOrName: string): string;
687
+ static banner(userId: string, hash: string, ext: string): string;
688
+ static defaultBanner(id: string, ext: string): string;
689
+ static beatmapsetURL(beatmapsetId: string): string;
690
+ static beatmapURL(beatmapsetId: string, beatmapId: string, mode: GameMode): string;
691
+ static beatmapCoverImage(beatmapsetId: string): string;
692
+ static beatmapCoverThumbnail(beatmapsetId: string): string;
693
+ static scoreURL(mode: GameMode, scoreId: string): string;
694
+ }
695
+ export declare abstract class AccuracyCalculator {
696
+ static standard(count300: number, count100: number, count50: number, countMiss: number): number;
697
+ static taiko(count300: number, count100: number, countMiss: number): number;
698
+ static catch(count300: number, count100: number, count50: number, countKatu: number, countMiss: number): number;
699
+ static mania(count300: number, count100: number, count50: number, countKatu: number, countGeki: number, countMiss: number): number;
700
+ static maniaV2(count300: number, count100: number, count50: number, countKatu: number, countGeki: number, countMiss: number): number;
701
+ static calculate(score: BaseScore, v2?: boolean): number;
702
+ }
703
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":["_$__Beatmapset0.Beatmapset","_$__BeatmapScore0.BeatmapScore","_$__Beatmap0.Beatmap","_$__Replay0.Replay"],"sources":["../src/structures/ModsBitField.ts","../src/types/enums.ts","../src/types/interfaces.ts","../src/types/osuApiTypes.ts","../src/structures/Beatmapset.ts","../src/structures/UserEvent.ts","../src/structures/User.ts","../src/structures/Beatmap.ts","../src/structures/Replay.ts","../src/structures/BaseScore.ts","../src/structures/BeatmapScore.ts","../src/managers/BaseManager.ts","../src/managers/UserManager.ts","../src/managers/BeatmapManager.ts","../src/managers/ScoreManager.ts","../src/managers/ReplayManager.ts","../src/structures/MatchScore.ts","../src/structures/MatchGame.ts","../src/structures/Match.ts","../src/managers/MatchManager.ts","../src/Client.ts","../src/utils/URLBuilder.ts","../src/utils/AccuracyCalculator.ts"],"mappings":";YAEY,4CAA4C,eAAe,MAAM;qBAEhE;SACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SACA;SAGA;SAIA;EAGA;EACK,YAAA,OAAM;EAIX,IAAI,KAAK;EAIT,OAAO,KAAK;EAIZ,IAAI,KAAK;EAKT,OAAO,MAAM,MAAM;EAUnB,UAAU,MAAM;EAUhB;EAIA;;;EAQA;EAIA;SAIO,QAAQ,KAAK;;oBC1EnB;EACR;EAAU;EAAO;EAAO;;oBAGhB;EACR;EACA;;qBAGS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAmCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAkCD;EACR;EACA;EACA;EACA;EACA;EACA;EACA;;oBAGQ;EACR;EAAK;EAAa;EAAW;EAAO;EAAM;EAAK;EAAO;EACtD;EAAY;EAAY;EAAO;EAAS;EAAM;;oBAGtC;EACR;EAAK;EAAa;EAAS;EAAU;EACrC;EAAc;EAAQ;EAAQ;EAAQ;EACtC;EAAS;EAAS;EAAS;EAAQ;;oBAG3B;EACR;EAAI;EAAG;EAAI;EAAG;EAAG;EAAG;EAAG;EAAG;;oBAGlB;EACR;EAAO;EAAU;EAAO;;oBAGhB;EACR;EAAY;EAAS;EAAQ;;oBAGrB;EACR;EAAM;EAAM;;iBC7GC;EACb;;iBAGa;EACb;;iBAGa;EACb;EACA;EACA;EACA;EACA;;iBAGa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGa;EACb;EACA;EACA;;iBAGa;EACb;EACA;EACA;EACA;EACA;EACA;;iBAGa,eAAe,UAAU;EACtC;EACA,SAAS;;iBAGI;EACb;EACA,OAAO;;iBAGM;iBAEA,iCAAiC;EAC9C;EACA,IAAI;EACJ,OAAO;EACP;;iBAGa;EACb;EACA,WAAW;EACX,OAAO;EACP;;iBAGa,qCAAqC;EAClD;EACA;EACA;EACA;EACA,OAAO;EACP,IAAI;EACJ;EACA;EACA;EACA;;iBAGa;EACb,QAAQ;EACR;EACA;EACA;EACA,OAAO;EACP,OAAO;EACP;EACA;EACA;EACA,OAAO;;iBAGM,mCAAmC;EAChD;EACA;EACA,IAAI;EACJ;EACA,OAAO;EACP;;iBAGa;EACb;EACA;EACA,OAAO;EACP,OAAO;EACP,OAAO;EACP;;iBAGa,qCAAqC;EAClD;EACA,IAAI;EACJ,OAAO;EACP;;iBAGa;EACb;EACA,OAAO;EACP,OAAO;EACP;;iBAGa,uCAAuC;EACpD;EACA,IAAI;EACJ,OAAO;EACP;;iBAGa;EACb;EACA,OAAO;EACP,OAAO;EACP;;iBAGa,mCAAmC;EAChD;EACA;EACA,IAAI;EACJ;EACA,OAAO;EACP;;iBAGa;EACb;EACA;EACA,OAAO;EACP;EACA,OAAO;EACP,OAAO;;iBAGM,kCAAkC;EAC/C;;iBAGa;EACb;;iBCnKa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ,MAAM;;iBAGD;EACb;EACA;EACA;EACA;EACA;;iBAGa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,mBAAmB;;iBAGN,iCAAiC;EAC9C;EACA;;iBA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