r6-data.js 1.6.2 → 1.7.0

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 (2) hide show
  1. package/index.d.ts +21 -129
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,136 +1,28 @@
1
1
  // TypeScript declarations for r6-data.js (module-style, no ambient wrapper)
2
2
 
3
- // ----- Types -----
4
- export type PlatformType = "uplay" | "psn" | "xbl";
5
- export type PlatformFamily = "pc" | "console";
6
- export type BoardId = "casual" | "event" | "warmup" | "standard" | "ranked";
7
- export type RankVersion = "v1" | "v2" | "v3" | "v4" | "v5" | "v6";
8
-
9
- export interface AccountInfoParams {
10
- nameOnPlatform: string;
11
- platformType: PlatformType;
12
- }
13
- export interface PlayerStatsParams extends AccountInfoParams {
14
- platform_families: PlatformFamily;
15
- board_id?: BoardId;
16
- }
17
- export interface SeasonalStatsParams extends AccountInfoParams {}
18
-
19
- export interface PlayerComparisonsParams {
20
- players: Array<{
21
- nameOnPlatform: string;
22
- platformType: PlatformType;
23
- }>;
24
- platform_families: PlatformFamily;
25
- board_id?: BoardId;
26
- compareFields?: string[];
27
- }
28
-
29
- export interface GetMapsParams {
30
- name?: string; location?: string; releaseDate?: string; playlists?: string; mapReworked?: boolean;
31
- }
32
- export interface GetOperatorsParams {
33
- name?: string; safename?: string; realname?: string; birthplace?: string; age?: number; date_of_birth?: string; season_introduced?: string;
34
- }
35
- export interface GetSeasonsParams {
36
- name?: string; map?: string; operators?: string; weapons?: string;
37
- }
38
- export interface GetAttachmentParams {
39
- name?: string; style?: string; rarity?: string; availability?: string;
40
- }
41
- export interface GetCharmsParams {
42
- name?: string; collection?: string; rarity?: string; availability?: string; bundle?: string; season?: string;
43
- }
44
- export interface GetWeaponsParams { name?: string; }
45
- export interface GetUniversalSkinsParams { name?: string; }
46
- export interface GetRanksParams { version?: RankVersion; min_mmr?: number; max_mmr?: number; }
47
-
48
- export interface SearchAllResult {
49
- query: string;
50
- summary: Record<string, number>;
51
- results: {
52
- operators: any[]; weapons: any[]; maps: any[]; seasons: any[]; charms: any[]; attachments: any[];
53
- [k: string]: any;
54
- };
55
- }
56
- export interface GameStats {
57
- steam?: { concurrent?: number; estimate?: number };
58
- crossPlatform?: { totalRegistered?: number; monthlyActive?: number; trendsEstimate?: number; platforms?: { pc?: number; playstation?: number; xbox?: number } };
59
- ubisoft?: { onlineEstimate?: number };
60
- lastUpdated?: string;
61
- [k: string]: any;
62
- }
63
- export interface DiscordWebhookOptions {
64
- playerName: string; title?: string; message?: string; color?: number; avatarUrl?: string;
65
- }
66
-
67
- export interface PlayerComparisonsResult {
68
- players: Array<{
69
- player: {
70
- nameOnPlatform: string;
71
- platformType: PlatformType;
72
- };
73
- stats: any;
74
- success: boolean;
75
- error?: string;
76
- }>;
77
- comparison_summary: {
78
- field_comparisons: Record<string, {
79
- rankings: Array<{
80
- player: string;
81
- value: number;
82
- platform: PlatformType;
83
- }>;
84
- highest: {
85
- player: string;
86
- value: number;
87
- platform: PlatformType;
88
- };
89
- lowest: {
90
- player: string;
91
- value: number;
92
- platform: PlatformType;
93
- };
94
- average: number;
95
- }>;
96
- rankings: Record<string, any>;
97
- };
98
- metadata: {
99
- total_players: number;
100
- successful_fetches: number;
101
- failed_fetches: number;
102
- platform_families: PlatformFamily;
103
- board_id: string;
104
- timestamp: string;
105
- };
106
- errors?: Array<{
107
- player: {
108
- nameOnPlatform: string;
109
- platformType: PlatformType;
110
- };
111
- error: string;
112
- }>;
113
- }
114
-
115
- // ----- Function declarations -----
116
- export function getAccountInfo(params: AccountInfoParams): Promise<any>;
117
- export function getPlayerStats(params: PlayerStatsParams): Promise<any>;
118
- export function getSeasonalStats(params: SeasonalStatsParams): Promise<any>;
119
- export function getServiceStatus(): Promise<any>;
120
- export function getGameStats(): Promise<GameStats>;
121
- export function getMaps(params?: GetMapsParams): Promise<any[]>;
122
- export function getOperators(params?: GetOperatorsParams): Promise<any[]>;
123
- export function getSeasons(params?: GetSeasonsParams): Promise<any[]>;
124
- export function getAttachment(params?: GetAttachmentParams): Promise<any[]>;
125
- export function getCharms(params?: GetCharmsParams): Promise<any[]>;
126
- export function getWeapons(params?: GetWeaponsParams): Promise<any[]>;
127
- export function getUniversalSkins(params?: GetUniversalSkinsParams): Promise<any[]>;
128
- export function getRanks(params?: GetRanksParams): Promise<any[]>;
129
- export function getSearchAll(query: string): Promise<SearchAllResult>;
130
- export function createDiscordR6Webhook(webhookUrl: string, playerData: any, options: DiscordWebhookOptions): Promise<any>;
131
- export function getPlayerComparisons(params: PlayerComparisonsParams): Promise<PlayerComparisonsResult>;
3
+ // Re-export all types and interfaces from modular files
4
+ export * from './types';
132
5
 
133
6
  // ----- Default export -----
7
+ import {
8
+ getAccountInfo,
9
+ getPlayerStats,
10
+ getSeasonalStats,
11
+ getServiceStatus,
12
+ getGameStats,
13
+ getMaps,
14
+ getOperators,
15
+ getSeasons,
16
+ getAttachment,
17
+ getCharms,
18
+ getWeapons,
19
+ getUniversalSkins,
20
+ getRanks,
21
+ getSearchAll,
22
+ createDiscordR6Webhook,
23
+ getPlayerComparisons
24
+ } from './types/function-declarations';
25
+
134
26
  declare const r6Data: {
135
27
  getAccountInfo: typeof getAccountInfo;
136
28
  getPlayerStats: typeof getPlayerStats;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "r6-data.js",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "R6 (Rainbow Six Siege) API wrapper for player stats, operators, maps, ranks, seasons, and game data. Typescript support. Last Updated Y10S3",
5
5
  "main": "index.js",
6
6
  "module": "index.js",