@valpro-labs/valorant-api 1.0.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.
- package/LICENSE +21 -0
- package/README.md +45 -0
- package/dist/ValorantApi.d.ts +45 -0
- package/dist/ValorantApi.js +68 -0
- package/dist/endpoints/AgentsEndpoints.d.ts +168 -0
- package/dist/endpoints/AgentsEndpoints.js +80 -0
- package/dist/endpoints/BaseEndpoint.d.ts +10 -0
- package/dist/endpoints/BaseEndpoint.js +21 -0
- package/dist/endpoints/BuddiesEndpoints.d.ts +53 -0
- package/dist/endpoints/BuddiesEndpoints.js +37 -0
- package/dist/endpoints/BundlesEndpoints.d.ts +36 -0
- package/dist/endpoints/BundlesEndpoints.js +31 -0
- package/dist/endpoints/CompetitiveTiersEndpoints.d.ts +57 -0
- package/dist/endpoints/CompetitiveTiersEndpoints.js +36 -0
- package/dist/endpoints/ContentTierEndpoints.d.ts +32 -0
- package/dist/endpoints/ContentTierEndpoints.js +29 -0
- package/dist/endpoints/ContractsEndpoints.d.ts +168 -0
- package/dist/endpoints/ContractsEndpoints.js +65 -0
- package/dist/endpoints/CurrenciesEndpoints.d.ts +28 -0
- package/dist/endpoints/CurrenciesEndpoints.js +27 -0
- package/dist/endpoints/EventsEndpoints.d.ts +35 -0
- package/dist/endpoints/EventsEndpoints.js +35 -0
- package/dist/endpoints/FlexEndpoints.d.ts +24 -0
- package/dist/endpoints/FlexEndpoints.js +26 -0
- package/dist/endpoints/GameModesEndpoints.d.ts +70 -0
- package/dist/endpoints/GameModesEndpoints.js +46 -0
- package/dist/endpoints/LevelBordersEndpoints.d.ts +28 -0
- package/dist/endpoints/LevelBordersEndpoints.js +27 -0
- package/dist/endpoints/MapsEndpoints.d.ts +127 -0
- package/dist/endpoints/MapsEndpoints.js +62 -0
- package/dist/endpoints/MissionsEndpoints.d.ts +45 -0
- package/dist/endpoints/MissionsEndpoints.js +35 -0
- package/dist/endpoints/ObjectivesEndpoints.d.ts +20 -0
- package/dist/endpoints/ObjectivesEndpoints.js +23 -0
- package/dist/endpoints/PlayerCardsEndpoints.d.ts +32 -0
- package/dist/endpoints/PlayerCardsEndpoints.js +29 -0
- package/dist/endpoints/PlayerTitlesEndpoints.d.ts +24 -0
- package/dist/endpoints/PlayerTitlesEndpoints.js +25 -0
- package/dist/endpoints/SeasonsEndpoints.d.ts +39 -0
- package/dist/endpoints/SeasonsEndpoints.js +37 -0
- package/dist/endpoints/SpraysEndpoints.d.ts +58 -0
- package/dist/endpoints/SpraysEndpoints.js +39 -0
- package/dist/endpoints/VersionEndpoint.d.ts +18 -0
- package/dist/endpoints/VersionEndpoint.js +24 -0
- package/dist/endpoints/WeaponsEndpoints.d.ts +309 -0
- package/dist/endpoints/WeaponsEndpoints.js +114 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +39 -0
- package/dist/schemas/SharedSchemas.d.ts +3 -0
- package/dist/schemas/SharedSchemas.js +5 -0
- package/package.json +40 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpraysEndpoints = exports.SpraysSchema = exports.SpraySchema = exports.SprayLevelSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
exports.SprayLevelSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
sprayUuid: zod_1.z.string().uuid(),
|
|
9
|
+
displayName: zod_1.z.string(),
|
|
10
|
+
displayIcon: zod_1.z.string().nullable(),
|
|
11
|
+
assetPath: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
exports.SpraySchema = zod_1.z.object({
|
|
14
|
+
uuid: zod_1.z.string().uuid(),
|
|
15
|
+
displayName: zod_1.z.string(),
|
|
16
|
+
category: zod_1.z.string().nullable(),
|
|
17
|
+
themeUuid: zod_1.z.string().uuid().nullable(),
|
|
18
|
+
isNull: zod_1.z.boolean(),
|
|
19
|
+
displayIcon: zod_1.z.string().nullable(),
|
|
20
|
+
fullIcon: zod_1.z.string().nullable(),
|
|
21
|
+
fullTransparentIcon: zod_1.z.string().nullable(),
|
|
22
|
+
animationPng: zod_1.z.string().nullable(),
|
|
23
|
+
animationGif: zod_1.z.string().nullable(),
|
|
24
|
+
assetPath: zod_1.z.string(),
|
|
25
|
+
levels: zod_1.z.array(exports.SprayLevelSchema),
|
|
26
|
+
});
|
|
27
|
+
exports.SpraysSchema = zod_1.z.array(exports.SpraySchema);
|
|
28
|
+
class SpraysEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
29
|
+
constructor(config) {
|
|
30
|
+
super(config);
|
|
31
|
+
}
|
|
32
|
+
async getSpraysV1() {
|
|
33
|
+
return this.requestValorantApi('v1/sprays');
|
|
34
|
+
}
|
|
35
|
+
async getSprayByUuidV1(uuid) {
|
|
36
|
+
return this.requestValorantApi(`v1/sprays/${uuid}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.SpraysEndpoints = SpraysEndpoints;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
export declare const VersionSchema: z.ZodObject<{
|
|
4
|
+
manifestId: z.ZodString;
|
|
5
|
+
branch: z.ZodString;
|
|
6
|
+
version: z.ZodString;
|
|
7
|
+
buildVersion: z.ZodString;
|
|
8
|
+
engineVersion: z.ZodString;
|
|
9
|
+
riotClientVersion: z.ZodString;
|
|
10
|
+
riotClientBuild: z.ZodString;
|
|
11
|
+
buildDate: z.ZodPipe<z.ZodString, z.ZodCoercedDate<string>>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type VersionResponse = z.infer<typeof VersionSchema>;
|
|
14
|
+
declare class VersionEndpoint extends BaseEndpoint {
|
|
15
|
+
constructor(config?: ValorantApiConfig);
|
|
16
|
+
getVersionV1(): Promise<VersionResponse>;
|
|
17
|
+
}
|
|
18
|
+
export { VersionEndpoint };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VersionEndpoint = exports.VersionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
exports.VersionSchema = zod_1.z.object({
|
|
7
|
+
manifestId: zod_1.z.string(),
|
|
8
|
+
branch: zod_1.z.string(),
|
|
9
|
+
version: zod_1.z.string(),
|
|
10
|
+
buildVersion: zod_1.z.string(),
|
|
11
|
+
engineVersion: zod_1.z.string(),
|
|
12
|
+
riotClientVersion: zod_1.z.string(),
|
|
13
|
+
riotClientBuild: zod_1.z.string(),
|
|
14
|
+
buildDate: zod_1.z.string().datetime().pipe(zod_1.z.coerce.date()),
|
|
15
|
+
});
|
|
16
|
+
class VersionEndpoint extends BaseEndpoint_1.BaseEndpoint {
|
|
17
|
+
constructor(config) {
|
|
18
|
+
super(config);
|
|
19
|
+
}
|
|
20
|
+
async getVersionV1() {
|
|
21
|
+
return this.requestValorantApi('v1/version');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.VersionEndpoint = VersionEndpoint;
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
export declare const AdsStatsSchema: z.ZodObject<{
|
|
4
|
+
zoomMultiplier: z.ZodNumber;
|
|
5
|
+
fireRate: z.ZodNumber;
|
|
6
|
+
runSpeedMultiplier: z.ZodNumber;
|
|
7
|
+
burstCount: z.ZodNumber;
|
|
8
|
+
firstBulletAccuracy: z.ZodNumber;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type AdsStatsResponse = z.infer<typeof AdsStatsSchema>;
|
|
11
|
+
export declare const AltShotgunStatsSchema: z.ZodObject<{
|
|
12
|
+
shotgunPelletCount: z.ZodNumber;
|
|
13
|
+
burstRate: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type AltShotgunStatsResponse = z.infer<typeof AltShotgunStatsSchema>;
|
|
16
|
+
export declare const AirBurstStatsSchema: z.ZodObject<{
|
|
17
|
+
shotgunPelletCount: z.ZodNumber;
|
|
18
|
+
burstDistance: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type AirBurstStatsResponse = z.infer<typeof AirBurstStatsSchema>;
|
|
21
|
+
export declare const DamageRangeSchema: z.ZodObject<{
|
|
22
|
+
rangeStartMeters: z.ZodNumber;
|
|
23
|
+
rangeEndMeters: z.ZodNumber;
|
|
24
|
+
headDamage: z.ZodNumber;
|
|
25
|
+
bodyDamage: z.ZodNumber;
|
|
26
|
+
legDamage: z.ZodNumber;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type DamageRangeResponse = z.infer<typeof DamageRangeSchema>;
|
|
29
|
+
export declare const WeaponStatsSchema: z.ZodObject<{
|
|
30
|
+
fireRate: z.ZodNumber;
|
|
31
|
+
magazineSize: z.ZodNumber;
|
|
32
|
+
runSpeedMultiplier: z.ZodNumber;
|
|
33
|
+
equipTimeSeconds: z.ZodNumber;
|
|
34
|
+
reloadTimeSeconds: z.ZodNumber;
|
|
35
|
+
firstBulletAccuracy: z.ZodNumber;
|
|
36
|
+
shotgunPelletCount: z.ZodNumber;
|
|
37
|
+
wallPenetration: z.ZodString;
|
|
38
|
+
feature: z.ZodString;
|
|
39
|
+
fireMode: z.ZodString;
|
|
40
|
+
altFireType: z.ZodString;
|
|
41
|
+
adsStats: z.ZodObject<{
|
|
42
|
+
zoomMultiplier: z.ZodNumber;
|
|
43
|
+
fireRate: z.ZodNumber;
|
|
44
|
+
runSpeedMultiplier: z.ZodNumber;
|
|
45
|
+
burstCount: z.ZodNumber;
|
|
46
|
+
firstBulletAccuracy: z.ZodNumber;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
altShotgunStats: z.ZodObject<{
|
|
49
|
+
shotgunPelletCount: z.ZodNumber;
|
|
50
|
+
burstRate: z.ZodNumber;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
airBurstStats: z.ZodObject<{
|
|
53
|
+
shotgunPelletCount: z.ZodNumber;
|
|
54
|
+
burstDistance: z.ZodNumber;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
damageRanges: z.ZodArray<z.ZodObject<{
|
|
57
|
+
rangeStartMeters: z.ZodNumber;
|
|
58
|
+
rangeEndMeters: z.ZodNumber;
|
|
59
|
+
headDamage: z.ZodNumber;
|
|
60
|
+
bodyDamage: z.ZodNumber;
|
|
61
|
+
legDamage: z.ZodNumber;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
export type WeaponStatsResponse = z.infer<typeof WeaponStatsSchema>;
|
|
65
|
+
export declare const GridPositionSchema: z.ZodObject<{
|
|
66
|
+
row: z.ZodNumber;
|
|
67
|
+
column: z.ZodNumber;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type GridPositionResponse = z.infer<typeof GridPositionSchema>;
|
|
70
|
+
export declare const ShopDataSchema: z.ZodObject<{
|
|
71
|
+
cost: z.ZodNumber;
|
|
72
|
+
category: z.ZodString;
|
|
73
|
+
shopOrderPriority: z.ZodNumber;
|
|
74
|
+
categoryText: z.ZodString;
|
|
75
|
+
gridPosition: z.ZodObject<{
|
|
76
|
+
row: z.ZodNumber;
|
|
77
|
+
column: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
canBeTrashed: z.ZodBoolean;
|
|
80
|
+
image: z.ZodString;
|
|
81
|
+
newImage: z.ZodString;
|
|
82
|
+
newImage2: z.ZodString;
|
|
83
|
+
assetPath: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type ShopDataResponse = z.infer<typeof ShopDataSchema>;
|
|
86
|
+
export declare const ChromaSchema: z.ZodObject<{
|
|
87
|
+
uuid: z.ZodString;
|
|
88
|
+
displayName: z.ZodString;
|
|
89
|
+
displayIcon: z.ZodString;
|
|
90
|
+
fullRender: z.ZodString;
|
|
91
|
+
swatch: z.ZodString;
|
|
92
|
+
streamedVideo: z.ZodString;
|
|
93
|
+
assetPath: z.ZodString;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type ChromaResponse = z.infer<typeof ChromaSchema>;
|
|
96
|
+
export declare const LevelSchema: z.ZodObject<{
|
|
97
|
+
uuid: z.ZodString;
|
|
98
|
+
displayName: z.ZodString;
|
|
99
|
+
levelItem: z.ZodString;
|
|
100
|
+
displayIcon: z.ZodString;
|
|
101
|
+
streamedVideo: z.ZodString;
|
|
102
|
+
assetPath: z.ZodString;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export type LevelResponse = z.infer<typeof LevelSchema>;
|
|
105
|
+
export declare const SkinSchema: z.ZodObject<{
|
|
106
|
+
uuid: z.ZodString;
|
|
107
|
+
displayName: z.ZodString;
|
|
108
|
+
themeUuid: z.ZodString;
|
|
109
|
+
contentTierUuid: z.ZodString;
|
|
110
|
+
displayIcon: z.ZodString;
|
|
111
|
+
wallpaper: z.ZodString;
|
|
112
|
+
assetPath: z.ZodString;
|
|
113
|
+
chromas: z.ZodArray<z.ZodObject<{
|
|
114
|
+
uuid: z.ZodString;
|
|
115
|
+
displayName: z.ZodString;
|
|
116
|
+
displayIcon: z.ZodString;
|
|
117
|
+
fullRender: z.ZodString;
|
|
118
|
+
swatch: z.ZodString;
|
|
119
|
+
streamedVideo: z.ZodString;
|
|
120
|
+
assetPath: z.ZodString;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
levels: z.ZodArray<z.ZodObject<{
|
|
123
|
+
uuid: z.ZodString;
|
|
124
|
+
displayName: z.ZodString;
|
|
125
|
+
levelItem: z.ZodString;
|
|
126
|
+
displayIcon: z.ZodString;
|
|
127
|
+
streamedVideo: z.ZodString;
|
|
128
|
+
assetPath: z.ZodString;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
export type SkinResponse = z.infer<typeof SkinSchema>;
|
|
132
|
+
export declare const WeaponSchema: z.ZodObject<{
|
|
133
|
+
uuid: z.ZodString;
|
|
134
|
+
displayName: z.ZodString;
|
|
135
|
+
category: z.ZodString;
|
|
136
|
+
defaultSkinUuid: z.ZodString;
|
|
137
|
+
displayIcon: z.ZodString;
|
|
138
|
+
killStreamIcon: z.ZodString;
|
|
139
|
+
assetPath: z.ZodString;
|
|
140
|
+
weaponStats: z.ZodObject<{
|
|
141
|
+
fireRate: z.ZodNumber;
|
|
142
|
+
magazineSize: z.ZodNumber;
|
|
143
|
+
runSpeedMultiplier: z.ZodNumber;
|
|
144
|
+
equipTimeSeconds: z.ZodNumber;
|
|
145
|
+
reloadTimeSeconds: z.ZodNumber;
|
|
146
|
+
firstBulletAccuracy: z.ZodNumber;
|
|
147
|
+
shotgunPelletCount: z.ZodNumber;
|
|
148
|
+
wallPenetration: z.ZodString;
|
|
149
|
+
feature: z.ZodString;
|
|
150
|
+
fireMode: z.ZodString;
|
|
151
|
+
altFireType: z.ZodString;
|
|
152
|
+
adsStats: z.ZodObject<{
|
|
153
|
+
zoomMultiplier: z.ZodNumber;
|
|
154
|
+
fireRate: z.ZodNumber;
|
|
155
|
+
runSpeedMultiplier: z.ZodNumber;
|
|
156
|
+
burstCount: z.ZodNumber;
|
|
157
|
+
firstBulletAccuracy: z.ZodNumber;
|
|
158
|
+
}, z.core.$strip>;
|
|
159
|
+
altShotgunStats: z.ZodObject<{
|
|
160
|
+
shotgunPelletCount: z.ZodNumber;
|
|
161
|
+
burstRate: z.ZodNumber;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
airBurstStats: z.ZodObject<{
|
|
164
|
+
shotgunPelletCount: z.ZodNumber;
|
|
165
|
+
burstDistance: z.ZodNumber;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
damageRanges: z.ZodArray<z.ZodObject<{
|
|
168
|
+
rangeStartMeters: z.ZodNumber;
|
|
169
|
+
rangeEndMeters: z.ZodNumber;
|
|
170
|
+
headDamage: z.ZodNumber;
|
|
171
|
+
bodyDamage: z.ZodNumber;
|
|
172
|
+
legDamage: z.ZodNumber;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
shopData: z.ZodObject<{
|
|
176
|
+
cost: z.ZodNumber;
|
|
177
|
+
category: z.ZodString;
|
|
178
|
+
shopOrderPriority: z.ZodNumber;
|
|
179
|
+
categoryText: z.ZodString;
|
|
180
|
+
gridPosition: z.ZodObject<{
|
|
181
|
+
row: z.ZodNumber;
|
|
182
|
+
column: z.ZodNumber;
|
|
183
|
+
}, z.core.$strip>;
|
|
184
|
+
canBeTrashed: z.ZodBoolean;
|
|
185
|
+
image: z.ZodString;
|
|
186
|
+
newImage: z.ZodString;
|
|
187
|
+
newImage2: z.ZodString;
|
|
188
|
+
assetPath: z.ZodString;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
skins: z.ZodArray<z.ZodObject<{
|
|
191
|
+
uuid: z.ZodString;
|
|
192
|
+
displayName: z.ZodString;
|
|
193
|
+
themeUuid: z.ZodString;
|
|
194
|
+
contentTierUuid: z.ZodString;
|
|
195
|
+
displayIcon: z.ZodString;
|
|
196
|
+
wallpaper: z.ZodString;
|
|
197
|
+
assetPath: z.ZodString;
|
|
198
|
+
chromas: z.ZodArray<z.ZodObject<{
|
|
199
|
+
uuid: z.ZodString;
|
|
200
|
+
displayName: z.ZodString;
|
|
201
|
+
displayIcon: z.ZodString;
|
|
202
|
+
fullRender: z.ZodString;
|
|
203
|
+
swatch: z.ZodString;
|
|
204
|
+
streamedVideo: z.ZodString;
|
|
205
|
+
assetPath: z.ZodString;
|
|
206
|
+
}, z.core.$strip>>;
|
|
207
|
+
levels: z.ZodArray<z.ZodObject<{
|
|
208
|
+
uuid: z.ZodString;
|
|
209
|
+
displayName: z.ZodString;
|
|
210
|
+
levelItem: z.ZodString;
|
|
211
|
+
displayIcon: z.ZodString;
|
|
212
|
+
streamedVideo: z.ZodString;
|
|
213
|
+
assetPath: z.ZodString;
|
|
214
|
+
}, z.core.$strip>>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
export declare const WeaponsSchema: z.ZodArray<z.ZodObject<{
|
|
218
|
+
uuid: z.ZodString;
|
|
219
|
+
displayName: z.ZodString;
|
|
220
|
+
category: z.ZodString;
|
|
221
|
+
defaultSkinUuid: z.ZodString;
|
|
222
|
+
displayIcon: z.ZodString;
|
|
223
|
+
killStreamIcon: z.ZodString;
|
|
224
|
+
assetPath: z.ZodString;
|
|
225
|
+
weaponStats: z.ZodObject<{
|
|
226
|
+
fireRate: z.ZodNumber;
|
|
227
|
+
magazineSize: z.ZodNumber;
|
|
228
|
+
runSpeedMultiplier: z.ZodNumber;
|
|
229
|
+
equipTimeSeconds: z.ZodNumber;
|
|
230
|
+
reloadTimeSeconds: z.ZodNumber;
|
|
231
|
+
firstBulletAccuracy: z.ZodNumber;
|
|
232
|
+
shotgunPelletCount: z.ZodNumber;
|
|
233
|
+
wallPenetration: z.ZodString;
|
|
234
|
+
feature: z.ZodString;
|
|
235
|
+
fireMode: z.ZodString;
|
|
236
|
+
altFireType: z.ZodString;
|
|
237
|
+
adsStats: z.ZodObject<{
|
|
238
|
+
zoomMultiplier: z.ZodNumber;
|
|
239
|
+
fireRate: z.ZodNumber;
|
|
240
|
+
runSpeedMultiplier: z.ZodNumber;
|
|
241
|
+
burstCount: z.ZodNumber;
|
|
242
|
+
firstBulletAccuracy: z.ZodNumber;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
altShotgunStats: z.ZodObject<{
|
|
245
|
+
shotgunPelletCount: z.ZodNumber;
|
|
246
|
+
burstRate: z.ZodNumber;
|
|
247
|
+
}, z.core.$strip>;
|
|
248
|
+
airBurstStats: z.ZodObject<{
|
|
249
|
+
shotgunPelletCount: z.ZodNumber;
|
|
250
|
+
burstDistance: z.ZodNumber;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
damageRanges: z.ZodArray<z.ZodObject<{
|
|
253
|
+
rangeStartMeters: z.ZodNumber;
|
|
254
|
+
rangeEndMeters: z.ZodNumber;
|
|
255
|
+
headDamage: z.ZodNumber;
|
|
256
|
+
bodyDamage: z.ZodNumber;
|
|
257
|
+
legDamage: z.ZodNumber;
|
|
258
|
+
}, z.core.$strip>>;
|
|
259
|
+
}, z.core.$strip>;
|
|
260
|
+
shopData: z.ZodObject<{
|
|
261
|
+
cost: z.ZodNumber;
|
|
262
|
+
category: z.ZodString;
|
|
263
|
+
shopOrderPriority: z.ZodNumber;
|
|
264
|
+
categoryText: z.ZodString;
|
|
265
|
+
gridPosition: z.ZodObject<{
|
|
266
|
+
row: z.ZodNumber;
|
|
267
|
+
column: z.ZodNumber;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
canBeTrashed: z.ZodBoolean;
|
|
270
|
+
image: z.ZodString;
|
|
271
|
+
newImage: z.ZodString;
|
|
272
|
+
newImage2: z.ZodString;
|
|
273
|
+
assetPath: z.ZodString;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
skins: z.ZodArray<z.ZodObject<{
|
|
276
|
+
uuid: z.ZodString;
|
|
277
|
+
displayName: z.ZodString;
|
|
278
|
+
themeUuid: z.ZodString;
|
|
279
|
+
contentTierUuid: z.ZodString;
|
|
280
|
+
displayIcon: z.ZodString;
|
|
281
|
+
wallpaper: z.ZodString;
|
|
282
|
+
assetPath: z.ZodString;
|
|
283
|
+
chromas: z.ZodArray<z.ZodObject<{
|
|
284
|
+
uuid: z.ZodString;
|
|
285
|
+
displayName: z.ZodString;
|
|
286
|
+
displayIcon: z.ZodString;
|
|
287
|
+
fullRender: z.ZodString;
|
|
288
|
+
swatch: z.ZodString;
|
|
289
|
+
streamedVideo: z.ZodString;
|
|
290
|
+
assetPath: z.ZodString;
|
|
291
|
+
}, z.core.$strip>>;
|
|
292
|
+
levels: z.ZodArray<z.ZodObject<{
|
|
293
|
+
uuid: z.ZodString;
|
|
294
|
+
displayName: z.ZodString;
|
|
295
|
+
levelItem: z.ZodString;
|
|
296
|
+
displayIcon: z.ZodString;
|
|
297
|
+
streamedVideo: z.ZodString;
|
|
298
|
+
assetPath: z.ZodString;
|
|
299
|
+
}, z.core.$strip>>;
|
|
300
|
+
}, z.core.$strip>>;
|
|
301
|
+
}, z.core.$strip>>;
|
|
302
|
+
export type WeaponResponse = z.infer<typeof WeaponSchema>;
|
|
303
|
+
export type WeaponsResponse = z.infer<typeof WeaponsSchema>;
|
|
304
|
+
declare class WeaponsEndpoints extends BaseEndpoint {
|
|
305
|
+
constructor(config?: ValorantApiConfig);
|
|
306
|
+
getWeaponsV1(): Promise<WeaponsResponse>;
|
|
307
|
+
getWeaponByUuidV1(uuid: string): Promise<WeaponResponse>;
|
|
308
|
+
}
|
|
309
|
+
export { WeaponsEndpoints };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WeaponsEndpoints = exports.WeaponsSchema = exports.WeaponSchema = exports.SkinSchema = exports.LevelSchema = exports.ChromaSchema = exports.ShopDataSchema = exports.GridPositionSchema = exports.WeaponStatsSchema = exports.DamageRangeSchema = exports.AirBurstStatsSchema = exports.AltShotgunStatsSchema = exports.AdsStatsSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
const SharedSchemas_1 = require("../schemas/SharedSchemas");
|
|
7
|
+
exports.AdsStatsSchema = zod_1.z.object({
|
|
8
|
+
zoomMultiplier: zod_1.z.number(),
|
|
9
|
+
fireRate: zod_1.z.number(),
|
|
10
|
+
runSpeedMultiplier: zod_1.z.number(),
|
|
11
|
+
burstCount: zod_1.z.number().int(),
|
|
12
|
+
firstBulletAccuracy: zod_1.z.number(),
|
|
13
|
+
});
|
|
14
|
+
exports.AltShotgunStatsSchema = zod_1.z.object({
|
|
15
|
+
shotgunPelletCount: zod_1.z.number().int(),
|
|
16
|
+
burstRate: zod_1.z.number(),
|
|
17
|
+
});
|
|
18
|
+
exports.AirBurstStatsSchema = zod_1.z.object({
|
|
19
|
+
shotgunPelletCount: zod_1.z.number().int(),
|
|
20
|
+
burstDistance: zod_1.z.number(),
|
|
21
|
+
});
|
|
22
|
+
exports.DamageRangeSchema = zod_1.z.object({
|
|
23
|
+
rangeStartMeters: zod_1.z.number(),
|
|
24
|
+
rangeEndMeters: zod_1.z.number(),
|
|
25
|
+
headDamage: zod_1.z.number(),
|
|
26
|
+
bodyDamage: zod_1.z.number(),
|
|
27
|
+
legDamage: zod_1.z.number(),
|
|
28
|
+
});
|
|
29
|
+
exports.WeaponStatsSchema = zod_1.z.object({
|
|
30
|
+
fireRate: zod_1.z.number(),
|
|
31
|
+
magazineSize: zod_1.z.number().int(),
|
|
32
|
+
runSpeedMultiplier: zod_1.z.number(),
|
|
33
|
+
equipTimeSeconds: zod_1.z.number(),
|
|
34
|
+
reloadTimeSeconds: zod_1.z.number(),
|
|
35
|
+
firstBulletAccuracy: zod_1.z.number(),
|
|
36
|
+
shotgunPelletCount: zod_1.z.number().int(),
|
|
37
|
+
wallPenetration: zod_1.z.string(),
|
|
38
|
+
feature: zod_1.z.string(),
|
|
39
|
+
fireMode: zod_1.z.string(),
|
|
40
|
+
altFireType: zod_1.z.string(),
|
|
41
|
+
adsStats: exports.AdsStatsSchema,
|
|
42
|
+
altShotgunStats: exports.AltShotgunStatsSchema,
|
|
43
|
+
airBurstStats: exports.AirBurstStatsSchema,
|
|
44
|
+
damageRanges: zod_1.z.array(exports.DamageRangeSchema),
|
|
45
|
+
});
|
|
46
|
+
exports.GridPositionSchema = zod_1.z.object({
|
|
47
|
+
row: zod_1.z.number().int(),
|
|
48
|
+
column: zod_1.z.number().int(),
|
|
49
|
+
});
|
|
50
|
+
exports.ShopDataSchema = zod_1.z.object({
|
|
51
|
+
cost: zod_1.z.number().int(),
|
|
52
|
+
category: zod_1.z.string(),
|
|
53
|
+
shopOrderPriority: zod_1.z.number().int(),
|
|
54
|
+
categoryText: SharedSchemas_1.LocalizedStringSchema,
|
|
55
|
+
gridPosition: exports.GridPositionSchema,
|
|
56
|
+
canBeTrashed: zod_1.z.boolean(),
|
|
57
|
+
image: zod_1.z.string(),
|
|
58
|
+
newImage: zod_1.z.string(),
|
|
59
|
+
newImage2: zod_1.z.string(),
|
|
60
|
+
assetPath: zod_1.z.string(),
|
|
61
|
+
});
|
|
62
|
+
exports.ChromaSchema = zod_1.z.object({
|
|
63
|
+
uuid: zod_1.z.string().uuid(),
|
|
64
|
+
displayName: SharedSchemas_1.LocalizedStringSchema,
|
|
65
|
+
displayIcon: zod_1.z.string(),
|
|
66
|
+
fullRender: zod_1.z.string(),
|
|
67
|
+
swatch: zod_1.z.string(),
|
|
68
|
+
streamedVideo: zod_1.z.string(),
|
|
69
|
+
assetPath: zod_1.z.string(),
|
|
70
|
+
});
|
|
71
|
+
exports.LevelSchema = zod_1.z.object({
|
|
72
|
+
uuid: zod_1.z.string().uuid(),
|
|
73
|
+
displayName: SharedSchemas_1.LocalizedStringSchema,
|
|
74
|
+
levelItem: zod_1.z.string(),
|
|
75
|
+
displayIcon: zod_1.z.string(),
|
|
76
|
+
streamedVideo: zod_1.z.string(),
|
|
77
|
+
assetPath: zod_1.z.string(),
|
|
78
|
+
});
|
|
79
|
+
exports.SkinSchema = zod_1.z.object({
|
|
80
|
+
uuid: zod_1.z.string().uuid(),
|
|
81
|
+
displayName: SharedSchemas_1.LocalizedStringSchema,
|
|
82
|
+
themeUuid: zod_1.z.string().uuid(),
|
|
83
|
+
contentTierUuid: zod_1.z.string().uuid(),
|
|
84
|
+
displayIcon: zod_1.z.string(),
|
|
85
|
+
wallpaper: zod_1.z.string(),
|
|
86
|
+
assetPath: zod_1.z.string(),
|
|
87
|
+
chromas: zod_1.z.array(exports.ChromaSchema),
|
|
88
|
+
levels: zod_1.z.array(exports.LevelSchema),
|
|
89
|
+
});
|
|
90
|
+
exports.WeaponSchema = zod_1.z.object({
|
|
91
|
+
uuid: zod_1.z.string().uuid(),
|
|
92
|
+
displayName: SharedSchemas_1.LocalizedStringSchema,
|
|
93
|
+
category: zod_1.z.string(),
|
|
94
|
+
defaultSkinUuid: zod_1.z.string().uuid(),
|
|
95
|
+
displayIcon: zod_1.z.string(),
|
|
96
|
+
killStreamIcon: zod_1.z.string(),
|
|
97
|
+
assetPath: zod_1.z.string(),
|
|
98
|
+
weaponStats: exports.WeaponStatsSchema,
|
|
99
|
+
shopData: exports.ShopDataSchema,
|
|
100
|
+
skins: zod_1.z.array(exports.SkinSchema),
|
|
101
|
+
});
|
|
102
|
+
exports.WeaponsSchema = zod_1.z.array(exports.WeaponSchema);
|
|
103
|
+
class WeaponsEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
104
|
+
constructor(config) {
|
|
105
|
+
super(config);
|
|
106
|
+
}
|
|
107
|
+
async getWeaponsV1() {
|
|
108
|
+
return this.requestValorantApi('v1/weapons');
|
|
109
|
+
}
|
|
110
|
+
async getWeaponByUuidV1(uuid) {
|
|
111
|
+
return this.requestValorantApi(`v1/weapons/${uuid}`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.WeaponsEndpoints = WeaponsEndpoints;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './ValorantApi';
|
|
2
|
+
export * from './endpoints/AgentsEndpoints';
|
|
3
|
+
export * from './endpoints/BaseEndpoint';
|
|
4
|
+
export * from './endpoints/BuddiesEndpoints';
|
|
5
|
+
export * from './endpoints/BundlesEndpoints';
|
|
6
|
+
export * from './endpoints/CompetitiveTiersEndpoints';
|
|
7
|
+
export * from './endpoints/ContentTierEndpoints';
|
|
8
|
+
export * from './endpoints/CurrenciesEndpoints';
|
|
9
|
+
export * from './endpoints/FlexEndpoints';
|
|
10
|
+
export * from './endpoints/LevelBordersEndpoints';
|
|
11
|
+
export * from './endpoints/MapsEndpoints';
|
|
12
|
+
export * from './endpoints/MissionsEndpoints';
|
|
13
|
+
export * from './endpoints/ObjectivesEndpoints';
|
|
14
|
+
export * from './endpoints/PlayerCardsEndpoints';
|
|
15
|
+
export * from './endpoints/PlayerTitlesEndpoints';
|
|
16
|
+
export * from './endpoints/SpraysEndpoints';
|
|
17
|
+
export * from './endpoints/VersionEndpoint';
|
|
18
|
+
export * from './endpoints/WeaponsEndpoints';
|
|
19
|
+
export * from './endpoints/GameModesEndpoints';
|
|
20
|
+
export * from './endpoints/ContractsEndpoints';
|
|
21
|
+
export * from './endpoints/EventsEndpoints';
|
|
22
|
+
export * from './endpoints/SeasonsEndpoints';
|
|
23
|
+
export * from './schemas/SharedSchemas';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ValorantApi"), exports);
|
|
18
|
+
__exportStar(require("./endpoints/AgentsEndpoints"), exports);
|
|
19
|
+
__exportStar(require("./endpoints/BaseEndpoint"), exports);
|
|
20
|
+
__exportStar(require("./endpoints/BuddiesEndpoints"), exports);
|
|
21
|
+
__exportStar(require("./endpoints/BundlesEndpoints"), exports);
|
|
22
|
+
__exportStar(require("./endpoints/CompetitiveTiersEndpoints"), exports);
|
|
23
|
+
__exportStar(require("./endpoints/ContentTierEndpoints"), exports);
|
|
24
|
+
__exportStar(require("./endpoints/CurrenciesEndpoints"), exports);
|
|
25
|
+
__exportStar(require("./endpoints/FlexEndpoints"), exports);
|
|
26
|
+
__exportStar(require("./endpoints/LevelBordersEndpoints"), exports);
|
|
27
|
+
__exportStar(require("./endpoints/MapsEndpoints"), exports);
|
|
28
|
+
__exportStar(require("./endpoints/MissionsEndpoints"), exports);
|
|
29
|
+
__exportStar(require("./endpoints/ObjectivesEndpoints"), exports);
|
|
30
|
+
__exportStar(require("./endpoints/PlayerCardsEndpoints"), exports);
|
|
31
|
+
__exportStar(require("./endpoints/PlayerTitlesEndpoints"), exports);
|
|
32
|
+
__exportStar(require("./endpoints/SpraysEndpoints"), exports);
|
|
33
|
+
__exportStar(require("./endpoints/VersionEndpoint"), exports);
|
|
34
|
+
__exportStar(require("./endpoints/WeaponsEndpoints"), exports);
|
|
35
|
+
__exportStar(require("./endpoints/GameModesEndpoints"), exports);
|
|
36
|
+
__exportStar(require("./endpoints/ContractsEndpoints"), exports);
|
|
37
|
+
__exportStar(require("./endpoints/EventsEndpoints"), exports);
|
|
38
|
+
__exportStar(require("./endpoints/SeasonsEndpoints"), exports);
|
|
39
|
+
__exportStar(require("./schemas/SharedSchemas"), exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@valpro-labs/valorant-api",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A typed TypeScript client for Valorant-API",
|
|
5
|
+
"homepage": "https://github.com/valpro-labs/valorant-api#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/valpro-labs/valorant-api/issues"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/valpro-labs/valorant-api.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"valorant"
|
|
16
|
+
],
|
|
17
|
+
"author": "rhy3h",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"main": "dist/index.js",
|
|
22
|
+
"types": "dist/index.d.ts",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"prepare": "npm run build",
|
|
26
|
+
"test": "jest"
|
|
27
|
+
},
|
|
28
|
+
"type": "commonjs",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"axios": "^1.13.5",
|
|
31
|
+
"zod": "^4.3.6"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/jest": "^30.0.0",
|
|
35
|
+
"@types/node": "^25.3.0",
|
|
36
|
+
"jest": "^30.2.0",
|
|
37
|
+
"ts-jest": "^29.4.6",
|
|
38
|
+
"typescript": "^5.9.3"
|
|
39
|
+
}
|
|
40
|
+
}
|