@valpro-labs/valorant-api 1.0.1 → 1.0.3

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 (89) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +44 -44
  3. package/dist/endpoints/AgentsEndpoints.d.ts +1 -161
  4. package/dist/endpoints/AgentsEndpoints.js +6 -66
  5. package/dist/endpoints/BuddiesEndpoints.d.ts +1 -45
  6. package/dist/endpoints/BuddiesEndpoints.js +1 -19
  7. package/dist/endpoints/BundlesEndpoints.d.ts +1 -29
  8. package/dist/endpoints/BundlesEndpoints.js +1 -16
  9. package/dist/endpoints/CompetitiveTiersEndpoints.d.ts +1 -50
  10. package/dist/endpoints/CompetitiveTiersEndpoints.js +1 -21
  11. package/dist/endpoints/ContentTierEndpoints.d.ts +1 -25
  12. package/dist/endpoints/ContentTierEndpoints.js +1 -14
  13. package/dist/endpoints/ContractsEndpoints.d.ts +1 -152
  14. package/dist/endpoints/ContractsEndpoints.js +1 -40
  15. package/dist/endpoints/CurrenciesEndpoints.d.ts +1 -21
  16. package/dist/endpoints/CurrenciesEndpoints.js +1 -12
  17. package/dist/endpoints/EventsEndpoints.d.ts +1 -19
  18. package/dist/endpoints/EventsEndpoints.js +1 -11
  19. package/dist/endpoints/FlexEndpoints.d.ts +1 -17
  20. package/dist/endpoints/FlexEndpoints.js +1 -11
  21. package/dist/endpoints/GameModesEndpoints.d.ts +1 -63
  22. package/dist/endpoints/GameModesEndpoints.js +1 -31
  23. package/dist/endpoints/LevelBordersEndpoints.d.ts +1 -21
  24. package/dist/endpoints/LevelBordersEndpoints.js +0 -11
  25. package/dist/endpoints/MapsEndpoints.d.ts +1 -120
  26. package/dist/endpoints/MapsEndpoints.js +1 -47
  27. package/dist/endpoints/MissionsEndpoints.d.ts +1 -38
  28. package/dist/endpoints/MissionsEndpoints.js +1 -20
  29. package/dist/endpoints/ObjectivesEndpoints.d.ts +1 -13
  30. package/dist/endpoints/ObjectivesEndpoints.js +1 -8
  31. package/dist/endpoints/PlayerCardsEndpoints.d.ts +1 -25
  32. package/dist/endpoints/PlayerCardsEndpoints.js +1 -14
  33. package/dist/endpoints/PlayerTitlesEndpoints.d.ts +1 -17
  34. package/dist/endpoints/PlayerTitlesEndpoints.js +1 -10
  35. package/dist/endpoints/SeasonsEndpoints.d.ts +1 -23
  36. package/dist/endpoints/SeasonsEndpoints.js +1 -13
  37. package/dist/endpoints/SpraysEndpoints.d.ts +1 -51
  38. package/dist/endpoints/SpraysEndpoints.js +1 -24
  39. package/dist/endpoints/VersionEndpoint.d.ts +1 -12
  40. package/dist/endpoints/VersionEndpoint.js +1 -12
  41. package/dist/endpoints/WeaponsEndpoints.d.ts +1 -302
  42. package/dist/endpoints/WeaponsEndpoints.js +1 -99
  43. package/dist/endpoints/index.d.ts +21 -0
  44. package/dist/endpoints/index.js +37 -0
  45. package/dist/index.d.ts +2 -22
  46. package/dist/index.js +2 -22
  47. package/dist/schemas/AgentSchemas.d.ts +161 -0
  48. package/dist/schemas/AgentSchemas.js +65 -0
  49. package/dist/schemas/BuddySchemas.d.ts +45 -0
  50. package/dist/schemas/BuddySchemas.js +21 -0
  51. package/dist/schemas/BundleSchemas.d.ts +29 -0
  52. package/dist/schemas/BundleSchemas.js +18 -0
  53. package/dist/schemas/CompetitiveTierSchemas.d.ts +50 -0
  54. package/dist/schemas/CompetitiveTierSchemas.js +23 -0
  55. package/dist/schemas/ContentTierSchemas.d.ts +25 -0
  56. package/dist/schemas/ContentTierSchemas.js +16 -0
  57. package/dist/schemas/ContractSchemas.d.ts +152 -0
  58. package/dist/schemas/ContractSchemas.js +42 -0
  59. package/dist/schemas/CurrencySchemas.d.ts +21 -0
  60. package/dist/schemas/CurrencySchemas.js +14 -0
  61. package/dist/schemas/EventSchemas.d.ts +19 -0
  62. package/dist/schemas/EventSchemas.js +13 -0
  63. package/dist/schemas/FlexSchemas.d.ts +17 -0
  64. package/dist/schemas/FlexSchemas.js +13 -0
  65. package/dist/schemas/GameModeSchemas.d.ts +63 -0
  66. package/dist/schemas/GameModeSchemas.js +33 -0
  67. package/dist/schemas/LevelBorderSchemas.d.ts +21 -0
  68. package/dist/schemas/LevelBorderSchemas.js +14 -0
  69. package/dist/schemas/MapSchemas.d.ts +120 -0
  70. package/dist/schemas/MapSchemas.js +49 -0
  71. package/dist/schemas/MissionSchemas.d.ts +38 -0
  72. package/dist/schemas/MissionSchemas.js +22 -0
  73. package/dist/schemas/ObjectiveSchemas.d.ts +13 -0
  74. package/dist/schemas/ObjectiveSchemas.js +10 -0
  75. package/dist/schemas/PlayerCardSchemas.d.ts +25 -0
  76. package/dist/schemas/PlayerCardSchemas.js +16 -0
  77. package/dist/schemas/PlayerTitleSchemas.d.ts +17 -0
  78. package/dist/schemas/PlayerTitleSchemas.js +12 -0
  79. package/dist/schemas/SeasonSchemas.d.ts +23 -0
  80. package/dist/schemas/SeasonSchemas.js +15 -0
  81. package/dist/schemas/SpraySchemas.d.ts +51 -0
  82. package/dist/schemas/SpraySchemas.js +26 -0
  83. package/dist/schemas/VersionSchemas.d.ts +12 -0
  84. package/dist/schemas/VersionSchemas.js +14 -0
  85. package/dist/schemas/WeaponSchemas.d.ts +302 -0
  86. package/dist/schemas/WeaponSchemas.js +101 -0
  87. package/dist/schemas/index.d.ts +21 -0
  88. package/dist/schemas/index.js +37 -0
  89. package/package.json +1 -1
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 valpro-labs
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 valpro-labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,45 +1,45 @@
1
- # Valorant-API (unofficial)
2
-
3
- [![npm](https://img.shields.io/npm/v/@valpro-labs/valorant-api.svg)](https://www.npmjs.com/package/@valpro-labs/valorant-api)
4
-
5
- A typed TypeScript client for [valorant-api.com](https://valorant-api.com/). This library provides easy access to Valorant game data with full TypeScript support.
6
-
7
- ## Features
8
-
9
- - **Full Type Safety**: All responses are typed for a better developer experience.
10
- - **Zod Powered Types**: Use [Zod](https://zod.dev/) for robust schema definitions and type inference.
11
- - **Comprehensive Coverage**: Supporting endpoints for Agents, Maps, Weapons, Contracts, and more.
12
-
13
- - **Clean API**: Intuitive organizational structure for accessing different game resources.
14
-
15
- ## Installation
16
-
17
- ```bash
18
- npm install @valpro-labs/valorant-api
19
- ```
20
-
21
- ## Example
22
-
23
- ```typescript
24
- import { ValorantApi } from '@valpro-labs/valorant-api';
25
-
26
- const valorantApi = new ValorantApi({ language: 'en-US' });
27
-
28
- // Get all agents
29
- const agents = await valorantApi.agentsEndpoints.getAgentsV1();
30
-
31
- // Get version info
32
- const version = await valorantApi.versionEndpoint.getVersionV1();
33
- ```
34
-
35
- ## Supported Endpoints
36
-
37
- - Agents
38
- - Maps
39
- - Weapons & Skins
40
- - Bundles
41
- - Contracts
42
- - Competitive Tiers
43
- - And many more...
44
-
1
+ # Valorant-API (unofficial)
2
+
3
+ [![npm](https://img.shields.io/npm/v/@valpro-labs/valorant-api.svg)](https://www.npmjs.com/package/@valpro-labs/valorant-api)
4
+
5
+ A typed TypeScript client for [valorant-api.com](https://valorant-api.com/). This library provides easy access to Valorant game data with full TypeScript support.
6
+
7
+ ## Features
8
+
9
+ - **Full Type Safety**: All responses are typed for a better developer experience.
10
+ - **Zod Powered Types**: Use [Zod](https://zod.dev/) for robust schema definitions and type inference.
11
+ - **Comprehensive Coverage**: Supporting endpoints for Agents, Maps, Weapons, Contracts, and more.
12
+
13
+ - **Clean API**: Intuitive organizational structure for accessing different game resources.
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ npm install @valpro-labs/valorant-api
19
+ ```
20
+
21
+ ## Example
22
+
23
+ ```typescript
24
+ import { ValorantApi } from '@valpro-labs/valorant-api';
25
+
26
+ const valorantApi = new ValorantApi({ language: 'en-US' });
27
+
28
+ // Get all agents
29
+ const agents = await valorantApi.agentsEndpoints.getAgentsV1();
30
+
31
+ // Get version info
32
+ const version = await valorantApi.versionEndpoint.getVersionV1();
33
+ ```
34
+
35
+ ## Supported Endpoints
36
+
37
+ - Agents
38
+ - Maps
39
+ - Weapons & Skins
40
+ - Bundles
41
+ - Contracts
42
+ - Competitive Tiers
43
+ - And many more...
44
+
45
45
  > **@valpro-labs/valorant-api** isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games, and all associated properties are trademarks or registered trademarks of Riot Games, Inc..
@@ -1,165 +1,5 @@
1
- import { z } from 'zod';
2
1
  import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
- export declare const VoiceLineMediaSchema: z.ZodObject<{
4
- id: z.ZodNumber;
5
- wwise: z.ZodString;
6
- wave: z.ZodString;
7
- }, z.core.$strip>;
8
- export type VoiceLineMediaResponse = z.infer<typeof VoiceLineMediaSchema>;
9
- export declare const VoiceLineSchema: z.ZodObject<{
10
- minDuration: z.ZodNumber;
11
- maxDuration: z.ZodNumber;
12
- mediaList: z.ZodArray<z.ZodObject<{
13
- id: z.ZodNumber;
14
- wwise: z.ZodString;
15
- wave: z.ZodString;
16
- }, z.core.$strip>>;
17
- }, z.core.$strip>;
18
- export type VoiceLineResponse = z.infer<typeof VoiceLineSchema>;
19
- export declare const AbilitySchema: z.ZodObject<{
20
- slot: z.ZodString;
21
- displayName: z.ZodString;
22
- description: z.ZodString;
23
- displayIcon: z.ZodString;
24
- voiceLine: z.ZodObject<{
25
- minDuration: z.ZodNumber;
26
- maxDuration: z.ZodNumber;
27
- mediaList: z.ZodArray<z.ZodObject<{
28
- id: z.ZodNumber;
29
- wwise: z.ZodString;
30
- wave: z.ZodString;
31
- }, z.core.$strip>>;
32
- }, z.core.$strip>;
33
- }, z.core.$strip>;
34
- export type AbilityResponse = z.infer<typeof AbilitySchema>;
35
- export declare const RoleSchema: z.ZodObject<{
36
- uuid: z.ZodString;
37
- displayName: z.ZodString;
38
- description: z.ZodString;
39
- displayIcon: z.ZodString;
40
- assetPath: z.ZodString;
41
- }, z.core.$strip>;
42
- export declare const RecruitmentDataSchema: z.ZodObject<{
43
- counterId: z.ZodString;
44
- milestoneId: z.ZodString;
45
- milestoneThreshold: z.ZodNumber;
46
- useLevelVpCostOverride: z.ZodBoolean;
47
- levelVpCostOverride: z.ZodNumber;
48
- startDate: z.ZodString;
49
- endDate: z.ZodString;
50
- }, z.core.$strip>;
51
- export type RecruitmentDataResponse = z.infer<typeof RecruitmentDataSchema>;
52
- export declare const AgentSchema: z.ZodObject<{
53
- uuid: z.ZodString;
54
- displayName: z.ZodString;
55
- description: z.ZodString;
56
- developerName: z.ZodString;
57
- releaseDate: z.ZodString;
58
- characterTags: z.ZodArray<z.ZodString>;
59
- displayIcon: z.ZodString;
60
- displayIconSmall: z.ZodString;
61
- bustPortrait: z.ZodString;
62
- fullPortrait: z.ZodString;
63
- fullPortraitV2: z.ZodString;
64
- killfeedPortrait: z.ZodString;
65
- minimapPortrait: z.ZodString;
66
- homeScreenPromoTileImage: z.ZodString;
67
- background: z.ZodString;
68
- backgroundGradientColors: z.ZodArray<z.ZodString>;
69
- assetPath: z.ZodString;
70
- isFullPortraitRightFacing: z.ZodBoolean;
71
- isPlayableCharacter: z.ZodBoolean;
72
- isAvailableForTest: z.ZodBoolean;
73
- isBaseContent: z.ZodBoolean;
74
- role: z.ZodObject<{
75
- uuid: z.ZodString;
76
- displayName: z.ZodString;
77
- description: z.ZodString;
78
- displayIcon: z.ZodString;
79
- assetPath: z.ZodString;
80
- }, z.core.$strip>;
81
- recruitmentData: z.ZodObject<{
82
- counterId: z.ZodString;
83
- milestoneId: z.ZodString;
84
- milestoneThreshold: z.ZodNumber;
85
- useLevelVpCostOverride: z.ZodBoolean;
86
- levelVpCostOverride: z.ZodNumber;
87
- startDate: z.ZodString;
88
- endDate: z.ZodString;
89
- }, z.core.$strip>;
90
- abilities: z.ZodArray<z.ZodObject<{
91
- slot: z.ZodString;
92
- displayName: z.ZodString;
93
- description: z.ZodString;
94
- displayIcon: z.ZodString;
95
- voiceLine: z.ZodObject<{
96
- minDuration: z.ZodNumber;
97
- maxDuration: z.ZodNumber;
98
- mediaList: z.ZodArray<z.ZodObject<{
99
- id: z.ZodNumber;
100
- wwise: z.ZodString;
101
- wave: z.ZodString;
102
- }, z.core.$strip>>;
103
- }, z.core.$strip>;
104
- }, z.core.$strip>>;
105
- }, z.core.$strip>;
106
- export declare const AgentsSchema: z.ZodArray<z.ZodObject<{
107
- uuid: z.ZodString;
108
- displayName: z.ZodString;
109
- description: z.ZodString;
110
- developerName: z.ZodString;
111
- releaseDate: z.ZodString;
112
- characterTags: z.ZodArray<z.ZodString>;
113
- displayIcon: z.ZodString;
114
- displayIconSmall: z.ZodString;
115
- bustPortrait: z.ZodString;
116
- fullPortrait: z.ZodString;
117
- fullPortraitV2: z.ZodString;
118
- killfeedPortrait: z.ZodString;
119
- minimapPortrait: z.ZodString;
120
- homeScreenPromoTileImage: z.ZodString;
121
- background: z.ZodString;
122
- backgroundGradientColors: z.ZodArray<z.ZodString>;
123
- assetPath: z.ZodString;
124
- isFullPortraitRightFacing: z.ZodBoolean;
125
- isPlayableCharacter: z.ZodBoolean;
126
- isAvailableForTest: z.ZodBoolean;
127
- isBaseContent: z.ZodBoolean;
128
- role: z.ZodObject<{
129
- uuid: z.ZodString;
130
- displayName: z.ZodString;
131
- description: z.ZodString;
132
- displayIcon: z.ZodString;
133
- assetPath: z.ZodString;
134
- }, z.core.$strip>;
135
- recruitmentData: z.ZodObject<{
136
- counterId: z.ZodString;
137
- milestoneId: z.ZodString;
138
- milestoneThreshold: z.ZodNumber;
139
- useLevelVpCostOverride: z.ZodBoolean;
140
- levelVpCostOverride: z.ZodNumber;
141
- startDate: z.ZodString;
142
- endDate: z.ZodString;
143
- }, z.core.$strip>;
144
- abilities: z.ZodArray<z.ZodObject<{
145
- slot: z.ZodString;
146
- displayName: z.ZodString;
147
- description: z.ZodString;
148
- displayIcon: z.ZodString;
149
- voiceLine: z.ZodObject<{
150
- minDuration: z.ZodNumber;
151
- maxDuration: z.ZodNumber;
152
- mediaList: z.ZodArray<z.ZodObject<{
153
- id: z.ZodNumber;
154
- wwise: z.ZodString;
155
- wave: z.ZodString;
156
- }, z.core.$strip>>;
157
- }, z.core.$strip>;
158
- }, z.core.$strip>>;
159
- }, z.core.$strip>>;
160
- export type RoleResponse = z.infer<typeof RoleSchema>;
161
- export type AgentResponse = z.infer<typeof AgentSchema>;
162
- export type AgentsResponse = z.infer<typeof AgentsSchema>;
2
+ import { AgentResponse, AgentsResponse } from '../schemas';
163
3
  declare class AgentsEndpoints extends BaseEndpoint {
164
4
  constructor(config?: ValorantApiConfig);
165
5
  getAgentsV1(isPlayableCharacter?: boolean): Promise<AgentsResponse>;
@@ -1,77 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AgentsEndpoints = exports.AgentsSchema = exports.AgentSchema = exports.RecruitmentDataSchema = exports.RoleSchema = exports.AbilitySchema = exports.VoiceLineSchema = exports.VoiceLineMediaSchema = void 0;
4
- const zod_1 = require("zod");
3
+ exports.AgentsEndpoints = void 0;
5
4
  const BaseEndpoint_1 = require("./BaseEndpoint");
6
- const SharedSchemas_1 = require("../schemas/SharedSchemas");
7
- exports.VoiceLineMediaSchema = zod_1.z.object({
8
- id: zod_1.z.number().int(),
9
- wwise: zod_1.z.string(),
10
- wave: zod_1.z.string(),
11
- });
12
- exports.VoiceLineSchema = zod_1.z.object({
13
- minDuration: zod_1.z.number(),
14
- maxDuration: zod_1.z.number(),
15
- mediaList: zod_1.z.array(exports.VoiceLineMediaSchema),
16
- });
17
- exports.AbilitySchema = zod_1.z.object({
18
- slot: zod_1.z.string(),
19
- displayName: SharedSchemas_1.LocalizedStringSchema,
20
- description: SharedSchemas_1.LocalizedStringSchema,
21
- displayIcon: zod_1.z.string(),
22
- voiceLine: exports.VoiceLineSchema,
23
- });
24
- exports.RoleSchema = zod_1.z.object({
25
- uuid: zod_1.z.string().uuid(),
26
- displayName: SharedSchemas_1.LocalizedStringSchema,
27
- description: SharedSchemas_1.LocalizedStringSchema,
28
- displayIcon: zod_1.z.string(),
29
- assetPath: zod_1.z.string(),
30
- });
31
- exports.RecruitmentDataSchema = zod_1.z.object({
32
- counterId: zod_1.z.string().uuid(),
33
- milestoneId: zod_1.z.string().uuid(),
34
- milestoneThreshold: zod_1.z.number().int(),
35
- useLevelVpCostOverride: zod_1.z.boolean(),
36
- levelVpCostOverride: zod_1.z.number().int(),
37
- startDate: zod_1.z.string().datetime(),
38
- endDate: zod_1.z.string().datetime(),
39
- });
40
- exports.AgentSchema = zod_1.z.object({
41
- uuid: zod_1.z.string().uuid(),
42
- displayName: SharedSchemas_1.LocalizedStringSchema,
43
- description: SharedSchemas_1.LocalizedStringSchema,
44
- developerName: zod_1.z.string(),
45
- releaseDate: zod_1.z.string().datetime(),
46
- characterTags: zod_1.z.array(SharedSchemas_1.LocalizedStringSchema),
47
- displayIcon: zod_1.z.string(),
48
- displayIconSmall: zod_1.z.string(),
49
- bustPortrait: zod_1.z.string(),
50
- fullPortrait: zod_1.z.string(),
51
- fullPortraitV2: zod_1.z.string(),
52
- killfeedPortrait: zod_1.z.string(),
53
- minimapPortrait: zod_1.z.string(),
54
- homeScreenPromoTileImage: zod_1.z.string(),
55
- background: zod_1.z.string(),
56
- backgroundGradientColors: zod_1.z.array(zod_1.z.string()),
57
- assetPath: zod_1.z.string(),
58
- isFullPortraitRightFacing: zod_1.z.boolean(),
59
- isPlayableCharacter: zod_1.z.boolean(),
60
- isAvailableForTest: zod_1.z.boolean(),
61
- isBaseContent: zod_1.z.boolean(),
62
- role: exports.RoleSchema,
63
- recruitmentData: exports.RecruitmentDataSchema,
64
- abilities: zod_1.z.array(exports.AbilitySchema),
65
- });
66
- exports.AgentsSchema = zod_1.z.array(exports.AgentSchema);
67
5
  class AgentsEndpoints extends BaseEndpoint_1.BaseEndpoint {
68
6
  constructor(config) {
69
7
  super(config);
70
8
  }
71
9
  async getAgentsV1(isPlayableCharacter = true) {
72
- const url = new URL('v1/agents', 'https://valorant-api.com/');
73
- url.searchParams.set('isPlayableCharacter', isPlayableCharacter.toString());
74
- return this.requestValorantApi(url.toString());
10
+ let endpointUrl = 'v1/agents';
11
+ if (isPlayableCharacter) {
12
+ endpointUrl += '?isPlayableCharacter=true';
13
+ }
14
+ return this.requestValorantApi(endpointUrl);
75
15
  }
76
16
  async getAgentsByUuidV1(uuid) {
77
17
  return this.requestValorantApi(`v1/agents/${uuid}`);
@@ -1,49 +1,5 @@
1
- import { z } from 'zod';
2
1
  import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
- export declare const BuddyLevelSchema: z.ZodObject<{
4
- uuid: z.ZodString;
5
- displayName: z.ZodString;
6
- displayIcon: z.ZodString;
7
- assetPath: z.ZodString;
8
- }, z.core.$strip>;
9
- export declare const BuddySchema: z.ZodObject<{
10
- uuid: z.ZodString;
11
- displayName: z.ZodString;
12
- isHiddenIfNotOwned: z.ZodBoolean;
13
- themeUuid: z.ZodNullable<z.ZodString>;
14
- displayIcon: z.ZodString;
15
- assetPath: z.ZodString;
16
- levels: z.ZodArray<z.ZodObject<{
17
- uuid: z.ZodString;
18
- displayName: z.ZodString;
19
- displayIcon: z.ZodString;
20
- assetPath: z.ZodString;
21
- }, z.core.$strip>>;
22
- }, z.core.$strip>;
23
- export declare const BuddiesSchema: z.ZodArray<z.ZodObject<{
24
- uuid: z.ZodString;
25
- displayName: z.ZodString;
26
- isHiddenIfNotOwned: z.ZodBoolean;
27
- themeUuid: z.ZodNullable<z.ZodString>;
28
- displayIcon: z.ZodString;
29
- assetPath: z.ZodString;
30
- levels: z.ZodArray<z.ZodObject<{
31
- uuid: z.ZodString;
32
- displayName: z.ZodString;
33
- displayIcon: z.ZodString;
34
- assetPath: z.ZodString;
35
- }, z.core.$strip>>;
36
- }, z.core.$strip>>;
37
- export declare const BuddyLevelsSchema: z.ZodArray<z.ZodObject<{
38
- uuid: z.ZodString;
39
- displayName: z.ZodString;
40
- displayIcon: z.ZodString;
41
- assetPath: z.ZodString;
42
- }, z.core.$strip>>;
43
- export type BuddyResponse = z.infer<typeof BuddySchema>;
44
- export type BuddiesResponse = z.infer<typeof BuddiesSchema>;
45
- export type BuddyLevelResponse = z.infer<typeof BuddyLevelSchema>;
46
- export type BuddyLevelsResponse = z.infer<typeof BuddyLevelsSchema>;
2
+ import { BuddyResponse, BuddiesResponse, BuddyLevelResponse } from '../schemas';
47
3
  declare class BuddiesEndpoints extends BaseEndpoint {
48
4
  constructor(config?: ValorantApiConfig);
49
5
  getBuddiesV1(): Promise<BuddiesResponse>;
@@ -1,25 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BuddiesEndpoints = exports.BuddyLevelsSchema = exports.BuddiesSchema = exports.BuddySchema = exports.BuddyLevelSchema = void 0;
4
- const zod_1 = require("zod");
3
+ exports.BuddiesEndpoints = void 0;
5
4
  const BaseEndpoint_1 = require("./BaseEndpoint");
6
- exports.BuddyLevelSchema = zod_1.z.object({
7
- uuid: zod_1.z.string().uuid(),
8
- displayName: zod_1.z.string(),
9
- displayIcon: zod_1.z.string(),
10
- assetPath: zod_1.z.string(),
11
- });
12
- exports.BuddySchema = zod_1.z.object({
13
- uuid: zod_1.z.string().uuid(),
14
- displayName: zod_1.z.string(),
15
- isHiddenIfNotOwned: zod_1.z.boolean(),
16
- themeUuid: zod_1.z.string().uuid().nullable(),
17
- displayIcon: zod_1.z.string(),
18
- assetPath: zod_1.z.string(),
19
- levels: zod_1.z.array(exports.BuddyLevelSchema),
20
- });
21
- exports.BuddiesSchema = zod_1.z.array(exports.BuddySchema);
22
- exports.BuddyLevelsSchema = zod_1.z.array(exports.BuddyLevelSchema);
23
5
  class BuddiesEndpoints extends BaseEndpoint_1.BaseEndpoint {
24
6
  constructor(config) {
25
7
  super(config);
@@ -1,33 +1,5 @@
1
- import { z } from 'zod';
2
1
  import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
- export declare const BundleSchema: z.ZodObject<{
4
- uuid: z.ZodString;
5
- displayName: z.ZodString;
6
- displayNameSubtext: z.ZodString;
7
- description: z.ZodString;
8
- extraDescription: z.ZodString;
9
- promoDescription: z.ZodString;
10
- useBackgroundGradient: z.ZodBoolean;
11
- displayIcon: z.ZodString;
12
- displayIcon2: z.ZodString;
13
- verticalPromoImage: z.ZodString;
14
- assetPath: z.ZodString;
15
- }, z.core.$strip>;
16
- export declare const BundlesSchema: z.ZodArray<z.ZodObject<{
17
- uuid: z.ZodString;
18
- displayName: z.ZodString;
19
- displayNameSubtext: z.ZodString;
20
- description: z.ZodString;
21
- extraDescription: z.ZodString;
22
- promoDescription: z.ZodString;
23
- useBackgroundGradient: z.ZodBoolean;
24
- displayIcon: z.ZodString;
25
- displayIcon2: z.ZodString;
26
- verticalPromoImage: z.ZodString;
27
- assetPath: z.ZodString;
28
- }, z.core.$strip>>;
29
- export type BundleResponse = z.infer<typeof BundleSchema>;
30
- export type BundlesResponse = z.infer<typeof BundlesSchema>;
2
+ import { BundleResponse, BundlesResponse } from '../schemas';
31
3
  declare class BundlesEndpoints extends BaseEndpoint {
32
4
  constructor(config?: ValorantApiConfig);
33
5
  getBundlesV1(): Promise<BundlesResponse>;
@@ -1,22 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BundlesEndpoints = exports.BundlesSchema = exports.BundleSchema = void 0;
4
- const zod_1 = require("zod");
3
+ exports.BundlesEndpoints = void 0;
5
4
  const BaseEndpoint_1 = require("./BaseEndpoint");
6
- exports.BundleSchema = zod_1.z.object({
7
- uuid: zod_1.z.string().uuid(),
8
- displayName: zod_1.z.string(),
9
- displayNameSubtext: zod_1.z.string(),
10
- description: zod_1.z.string(),
11
- extraDescription: zod_1.z.string(),
12
- promoDescription: zod_1.z.string(),
13
- useBackgroundGradient: zod_1.z.boolean(),
14
- displayIcon: zod_1.z.string(),
15
- displayIcon2: zod_1.z.string(),
16
- verticalPromoImage: zod_1.z.string(),
17
- assetPath: zod_1.z.string(),
18
- });
19
- exports.BundlesSchema = zod_1.z.array(exports.BundleSchema);
20
5
  class BundlesEndpoints extends BaseEndpoint_1.BaseEndpoint {
21
6
  constructor(config) {
22
7
  super(config);
@@ -1,54 +1,5 @@
1
- import { z } from 'zod';
2
1
  import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
- export declare const TierSchema: z.ZodObject<{
4
- tier: z.ZodNumber;
5
- tierName: z.ZodString;
6
- division: z.ZodString;
7
- divisionName: z.ZodString;
8
- color: z.ZodString;
9
- backgroundColor: z.ZodString;
10
- smallIcon: z.ZodNullable<z.ZodString>;
11
- largeIcon: z.ZodNullable<z.ZodString>;
12
- rankTriangleDownIcon: z.ZodNullable<z.ZodString>;
13
- rankTriangleUpIcon: z.ZodNullable<z.ZodString>;
14
- }, z.core.$strip>;
15
- export declare const CompetitiveTierSetSchema: z.ZodObject<{
16
- uuid: z.ZodString;
17
- assetObjectName: z.ZodString;
18
- tiers: z.ZodArray<z.ZodObject<{
19
- tier: z.ZodNumber;
20
- tierName: z.ZodString;
21
- division: z.ZodString;
22
- divisionName: z.ZodString;
23
- color: z.ZodString;
24
- backgroundColor: z.ZodString;
25
- smallIcon: z.ZodNullable<z.ZodString>;
26
- largeIcon: z.ZodNullable<z.ZodString>;
27
- rankTriangleDownIcon: z.ZodNullable<z.ZodString>;
28
- rankTriangleUpIcon: z.ZodNullable<z.ZodString>;
29
- }, z.core.$strip>>;
30
- assetPath: z.ZodString;
31
- }, z.core.$strip>;
32
- export declare const CompetitiveTiersSchema: z.ZodArray<z.ZodObject<{
33
- uuid: z.ZodString;
34
- assetObjectName: z.ZodString;
35
- tiers: z.ZodArray<z.ZodObject<{
36
- tier: z.ZodNumber;
37
- tierName: z.ZodString;
38
- division: z.ZodString;
39
- divisionName: z.ZodString;
40
- color: z.ZodString;
41
- backgroundColor: z.ZodString;
42
- smallIcon: z.ZodNullable<z.ZodString>;
43
- largeIcon: z.ZodNullable<z.ZodString>;
44
- rankTriangleDownIcon: z.ZodNullable<z.ZodString>;
45
- rankTriangleUpIcon: z.ZodNullable<z.ZodString>;
46
- }, z.core.$strip>>;
47
- assetPath: z.ZodString;
48
- }, z.core.$strip>>;
49
- export type TierResponse = z.infer<typeof TierSchema>;
50
- export type CompetitiveTierSetResponse = z.infer<typeof CompetitiveTierSetSchema>;
51
- export type CompetitiveTiersResponse = z.infer<typeof CompetitiveTiersSchema>;
2
+ import { CompetitiveTierSetResponse, CompetitiveTiersResponse } from '../schemas';
52
3
  declare class CompetitiveTiersEndpoints extends BaseEndpoint {
53
4
  constructor(config?: ValorantApiConfig);
54
5
  getCompetitiveTiersV1(): Promise<CompetitiveTiersResponse>;
@@ -1,27 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CompetitiveTiersEndpoints = exports.CompetitiveTiersSchema = exports.CompetitiveTierSetSchema = exports.TierSchema = void 0;
4
- const zod_1 = require("zod");
3
+ exports.CompetitiveTiersEndpoints = void 0;
5
4
  const BaseEndpoint_1 = require("./BaseEndpoint");
6
- exports.TierSchema = zod_1.z.object({
7
- tier: zod_1.z.number().int(),
8
- tierName: zod_1.z.string(),
9
- division: zod_1.z.string(),
10
- divisionName: zod_1.z.string(),
11
- color: zod_1.z.string(),
12
- backgroundColor: zod_1.z.string(),
13
- smallIcon: zod_1.z.string().nullable(),
14
- largeIcon: zod_1.z.string().nullable(),
15
- rankTriangleDownIcon: zod_1.z.string().nullable(),
16
- rankTriangleUpIcon: zod_1.z.string().nullable(),
17
- });
18
- exports.CompetitiveTierSetSchema = zod_1.z.object({
19
- uuid: zod_1.z.string().uuid(),
20
- assetObjectName: zod_1.z.string(),
21
- tiers: zod_1.z.array(exports.TierSchema),
22
- assetPath: zod_1.z.string(),
23
- });
24
- exports.CompetitiveTiersSchema = zod_1.z.array(exports.CompetitiveTierSetSchema);
25
5
  class CompetitiveTiersEndpoints extends BaseEndpoint_1.BaseEndpoint {
26
6
  constructor(config) {
27
7
  super(config);
@@ -1,29 +1,5 @@
1
- import { z } from 'zod';
2
1
  import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
- export declare const ContentTierSchema: z.ZodObject<{
4
- uuid: z.ZodString;
5
- displayName: z.ZodString;
6
- devName: z.ZodString;
7
- rank: z.ZodNumber;
8
- juiceValue: z.ZodNumber;
9
- juiceCost: z.ZodNumber;
10
- highlightColor: z.ZodString;
11
- displayIcon: z.ZodString;
12
- assetPath: z.ZodString;
13
- }, z.core.$strip>;
14
- export declare const ContentTiersSchema: z.ZodArray<z.ZodObject<{
15
- uuid: z.ZodString;
16
- displayName: z.ZodString;
17
- devName: z.ZodString;
18
- rank: z.ZodNumber;
19
- juiceValue: z.ZodNumber;
20
- juiceCost: z.ZodNumber;
21
- highlightColor: z.ZodString;
22
- displayIcon: z.ZodString;
23
- assetPath: z.ZodString;
24
- }, z.core.$strip>>;
25
- export type ContentTierResponse = z.infer<typeof ContentTierSchema>;
26
- export type ContentTiersResponse = z.infer<typeof ContentTiersSchema>;
2
+ import { ContentTierResponse, ContentTiersResponse } from '../schemas';
27
3
  declare class ContentTierEndpoints extends BaseEndpoint {
28
4
  constructor(config?: ValorantApiConfig);
29
5
  getContentTiersV1(): Promise<ContentTiersResponse>;
@@ -1,20 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContentTierEndpoints = exports.ContentTiersSchema = exports.ContentTierSchema = void 0;
4
- const zod_1 = require("zod");
3
+ exports.ContentTierEndpoints = void 0;
5
4
  const BaseEndpoint_1 = require("./BaseEndpoint");
6
- exports.ContentTierSchema = zod_1.z.object({
7
- uuid: zod_1.z.string().uuid(),
8
- displayName: zod_1.z.string(),
9
- devName: zod_1.z.string(),
10
- rank: zod_1.z.number().int(),
11
- juiceValue: zod_1.z.number().int(),
12
- juiceCost: zod_1.z.number().int(),
13
- highlightColor: zod_1.z.string(),
14
- displayIcon: zod_1.z.string().url(),
15
- assetPath: zod_1.z.string(),
16
- });
17
- exports.ContentTiersSchema = zod_1.z.array(exports.ContentTierSchema);
18
5
  class ContentTierEndpoints extends BaseEndpoint_1.BaseEndpoint {
19
6
  constructor(config) {
20
7
  super(config);