r6-data.js 1.7.0 → 1.7.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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # r6-data.js — Complete R6 Rainbow Six Siege API Wrapper
1
+ # r6-data.js — R6 Rainbow Six Siege API Wrapper
2
2
 
3
3
  **Rainbow Six Siege (R6) API wrapper** - Get player stats, operators, maps, ranks, seasons, charms and more. Full TypeScript support included. Last updated Y10S3.3
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "r6-data.js",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
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",
@@ -19,6 +19,7 @@
19
19
  "tsconfig.json",
20
20
  "methods/",
21
21
  "axiosInstance/",
22
+ "types/",
22
23
  "README.md"
23
24
  ],
24
25
  "scripts": {
@@ -0,0 +1,6 @@
1
+ // Base types for r6-data.js
2
+
3
+ export type PlatformType = "uplay" | "psn" | "xbl";
4
+ export type PlatformFamily = "pc" | "console";
5
+ export type BoardId = "casual" | "event" | "warmup" | "standard" | "ranked";
6
+ export type RankVersion = "v1" | "v2" | "v3" | "v4" | "v5" | "v6";
@@ -0,0 +1,40 @@
1
+ // Function declarations for r6-data.js
2
+
3
+ import {
4
+ AccountInfoParams,
5
+ PlayerStatsParams,
6
+ SeasonalStatsParams,
7
+ PlayerComparisonsParams,
8
+ GetMapsParams,
9
+ GetOperatorsParams,
10
+ GetSeasonsParams,
11
+ GetAttachmentParams,
12
+ GetCharmsParams,
13
+ GetWeaponsParams,
14
+ GetUniversalSkinsParams,
15
+ GetRanksParams,
16
+ DiscordWebhookOptions
17
+ } from './params-interfaces';
18
+
19
+ import {
20
+ SearchAllResult,
21
+ GameStats,
22
+ PlayerComparisonsResult
23
+ } from './result-interfaces';
24
+
25
+ export function getAccountInfo(params: AccountInfoParams): Promise<any>;
26
+ export function getPlayerStats(params: PlayerStatsParams): Promise<any>;
27
+ export function getSeasonalStats(params: SeasonalStatsParams): Promise<any>;
28
+ export function getServiceStatus(): Promise<any>;
29
+ export function getGameStats(): Promise<GameStats>;
30
+ export function getMaps(params?: GetMapsParams): Promise<any[]>;
31
+ export function getOperators(params?: GetOperatorsParams): Promise<any[]>;
32
+ export function getSeasons(params?: GetSeasonsParams): Promise<any[]>;
33
+ export function getAttachment(params?: GetAttachmentParams): Promise<any[]>;
34
+ export function getCharms(params?: GetCharmsParams): Promise<any[]>;
35
+ export function getWeapons(params?: GetWeaponsParams): Promise<any[]>;
36
+ export function getUniversalSkins(params?: GetUniversalSkinsParams): Promise<any[]>;
37
+ export function getRanks(params?: GetRanksParams): Promise<any[]>;
38
+ export function getSearchAll(query: string): Promise<SearchAllResult>;
39
+ export function createDiscordR6Webhook(webhookUrl: string, playerData: any, options: DiscordWebhookOptions): Promise<any>;
40
+ export function getPlayerComparisons(params: PlayerComparisonsParams): Promise<PlayerComparisonsResult>;
@@ -0,0 +1,6 @@
1
+ // Index file for all types - re-exports everything for convenience
2
+
3
+ export * from './base-types';
4
+ export * from './params-interfaces';
5
+ export * from './result-interfaces';
6
+ export * from './function-declarations';
@@ -0,0 +1,88 @@
1
+ // Parameter interfaces for r6-data.js
2
+
3
+ import { PlatformType, PlatformFamily, BoardId, RankVersion } from './base-types';
4
+
5
+ export interface AccountInfoParams {
6
+ nameOnPlatform: string;
7
+ platformType: PlatformType;
8
+ }
9
+
10
+ export interface PlayerStatsParams extends AccountInfoParams {
11
+ platform_families: PlatformFamily;
12
+ board_id?: BoardId;
13
+ }
14
+
15
+ export interface SeasonalStatsParams extends AccountInfoParams {}
16
+
17
+ export interface PlayerComparisonsParams {
18
+ players: Array<{
19
+ nameOnPlatform: string;
20
+ platformType: PlatformType;
21
+ }>;
22
+ platform_families: PlatformFamily;
23
+ board_id?: BoardId;
24
+ compareFields?: string[];
25
+ }
26
+
27
+ export interface GetMapsParams {
28
+ name?: string;
29
+ location?: string;
30
+ releaseDate?: string;
31
+ playlists?: string;
32
+ mapReworked?: boolean;
33
+ }
34
+
35
+ export interface GetOperatorsParams {
36
+ name?: string;
37
+ safename?: string;
38
+ realname?: string;
39
+ birthplace?: string;
40
+ age?: number;
41
+ date_of_birth?: string;
42
+ season_introduced?: string;
43
+ }
44
+
45
+ export interface GetSeasonsParams {
46
+ name?: string;
47
+ map?: string;
48
+ operators?: string;
49
+ weapons?: string;
50
+ }
51
+
52
+ export interface GetAttachmentParams {
53
+ name?: string;
54
+ style?: string;
55
+ rarity?: string;
56
+ availability?: string;
57
+ }
58
+
59
+ export interface GetCharmsParams {
60
+ name?: string;
61
+ collection?: string;
62
+ rarity?: string;
63
+ availability?: string;
64
+ bundle?: string;
65
+ season?: string;
66
+ }
67
+
68
+ export interface GetWeaponsParams {
69
+ name?: string;
70
+ }
71
+
72
+ export interface GetUniversalSkinsParams {
73
+ name?: string;
74
+ }
75
+
76
+ export interface GetRanksParams {
77
+ version?: RankVersion;
78
+ min_mmr?: number;
79
+ max_mmr?: number;
80
+ }
81
+
82
+ export interface DiscordWebhookOptions {
83
+ playerName: string;
84
+ title?: string;
85
+ message?: string;
86
+ color?: number;
87
+ avatarUrl?: string;
88
+ }
@@ -0,0 +1,87 @@
1
+ // Result interfaces for r6-data.js
2
+
3
+ import { PlatformType, PlatformFamily } from './base-types';
4
+
5
+ export interface SearchAllResult {
6
+ query: string;
7
+ summary: Record<string, number>;
8
+ results: {
9
+ operators: any[];
10
+ weapons: any[];
11
+ maps: any[];
12
+ seasons: any[];
13
+ charms: any[];
14
+ attachments: any[];
15
+ [k: string]: any;
16
+ };
17
+ }
18
+
19
+ export interface GameStats {
20
+ steam?: {
21
+ concurrent?: number;
22
+ estimate?: number;
23
+ };
24
+ crossPlatform?: {
25
+ totalRegistered?: number;
26
+ monthlyActive?: number;
27
+ trendsEstimate?: number;
28
+ platforms?: {
29
+ pc?: number;
30
+ playstation?: number;
31
+ xbox?: number;
32
+ };
33
+ };
34
+ ubisoft?: {
35
+ onlineEstimate?: number;
36
+ };
37
+ lastUpdated?: string;
38
+ [k: string]: any;
39
+ }
40
+
41
+ export interface PlayerComparisonsResult {
42
+ players: Array<{
43
+ player: {
44
+ nameOnPlatform: string;
45
+ platformType: PlatformType;
46
+ };
47
+ stats: any;
48
+ success: boolean;
49
+ error?: string;
50
+ }>;
51
+ comparison_summary: {
52
+ field_comparisons: Record<string, {
53
+ rankings: Array<{
54
+ player: string;
55
+ value: number;
56
+ platform: PlatformType;
57
+ }>;
58
+ highest: {
59
+ player: string;
60
+ value: number;
61
+ platform: PlatformType;
62
+ };
63
+ lowest: {
64
+ player: string;
65
+ value: number;
66
+ platform: PlatformType;
67
+ };
68
+ average: number;
69
+ }>;
70
+ rankings: Record<string, any>;
71
+ };
72
+ metadata: {
73
+ total_players: number;
74
+ successful_fetches: number;
75
+ failed_fetches: number;
76
+ platform_families: PlatformFamily;
77
+ board_id: string;
78
+ timestamp: string;
79
+ };
80
+ errors?: Array<{
81
+ player: {
82
+ nameOnPlatform: string;
83
+ platformType: PlatformType;
84
+ };
85
+ error: string;
86
+ }>;
87
+ }