@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,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GameModesEndpoints = exports.GameModesSchema = exports.GameModeSchema = exports.GameRuleBoolOverrideSchema = exports.GameFeatureOverrideSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
const SharedSchemas_1 = require("../schemas/SharedSchemas");
|
|
7
|
+
exports.GameFeatureOverrideSchema = zod_1.z.object({
|
|
8
|
+
featureName: zod_1.z.string(),
|
|
9
|
+
state: zod_1.z.boolean(),
|
|
10
|
+
});
|
|
11
|
+
exports.GameRuleBoolOverrideSchema = zod_1.z.object({
|
|
12
|
+
ruleName: zod_1.z.string(),
|
|
13
|
+
state: zod_1.z.boolean(),
|
|
14
|
+
});
|
|
15
|
+
exports.GameModeSchema = zod_1.z.object({
|
|
16
|
+
uuid: zod_1.z.string().uuid(),
|
|
17
|
+
displayName: SharedSchemas_1.LocalizedStringSchema,
|
|
18
|
+
description: SharedSchemas_1.LocalizedStringSchema.nullable(),
|
|
19
|
+
duration: zod_1.z.string().nullable(),
|
|
20
|
+
economyType: zod_1.z.string().nullable(),
|
|
21
|
+
allowsMatchTimeouts: zod_1.z.boolean(),
|
|
22
|
+
allowsCustomGameReplays: zod_1.z.boolean(),
|
|
23
|
+
isTeamVoiceAllowed: zod_1.z.boolean(),
|
|
24
|
+
isMinimapHidden: zod_1.z.boolean(),
|
|
25
|
+
orbCount: zod_1.z.number(),
|
|
26
|
+
roundsPerHalf: zod_1.z.number(),
|
|
27
|
+
teamRoles: zod_1.z.array(zod_1.z.string()).nullable(),
|
|
28
|
+
gameFeatureOverrides: zod_1.z.array(exports.GameFeatureOverrideSchema).nullable().optional(),
|
|
29
|
+
gameRuleBoolOverrides: zod_1.z.array(exports.GameRuleBoolOverrideSchema).nullable().optional(),
|
|
30
|
+
displayIcon: zod_1.z.string().nullable(),
|
|
31
|
+
listViewIconTall: zod_1.z.string().nullable().optional(),
|
|
32
|
+
assetPath: zod_1.z.string(),
|
|
33
|
+
});
|
|
34
|
+
exports.GameModesSchema = zod_1.z.array(exports.GameModeSchema);
|
|
35
|
+
class GameModesEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
36
|
+
constructor(config) {
|
|
37
|
+
super(config);
|
|
38
|
+
}
|
|
39
|
+
async getGameModesV1() {
|
|
40
|
+
return this.requestValorantApi('v1/gamemodes');
|
|
41
|
+
}
|
|
42
|
+
async getGameModeByUuidV1(uuid) {
|
|
43
|
+
return this.requestValorantApi(`v1/gamemodes/${uuid}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.GameModesEndpoints = GameModesEndpoints;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
declare const LevelBorderSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
displayName: z.ZodString;
|
|
6
|
+
startingLevel: z.ZodNumber;
|
|
7
|
+
levelNumber: z.ZodNumber;
|
|
8
|
+
levelNumberAppearance: z.ZodString;
|
|
9
|
+
smallPlayerCardAppearance: z.ZodString;
|
|
10
|
+
assetPath: z.ZodString;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
declare const LevelBordersSchema: z.ZodArray<z.ZodObject<{
|
|
13
|
+
uuid: z.ZodString;
|
|
14
|
+
displayName: z.ZodString;
|
|
15
|
+
startingLevel: z.ZodNumber;
|
|
16
|
+
levelNumber: z.ZodNumber;
|
|
17
|
+
levelNumberAppearance: z.ZodString;
|
|
18
|
+
smallPlayerCardAppearance: z.ZodString;
|
|
19
|
+
assetPath: z.ZodString;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
export type LevelBorderResponse = z.infer<typeof LevelBorderSchema>;
|
|
22
|
+
export type LevelBordersResponse = z.infer<typeof LevelBordersSchema>;
|
|
23
|
+
declare class LevelBordersEndpoints extends BaseEndpoint {
|
|
24
|
+
constructor(config?: ValorantApiConfig);
|
|
25
|
+
getLevelBordersV1(): Promise<LevelBordersResponse>;
|
|
26
|
+
getLevelBorderByUuidV1(uuid: string): Promise<LevelBorderResponse>;
|
|
27
|
+
}
|
|
28
|
+
export { LevelBordersEndpoints };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LevelBordersEndpoints = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
const LevelBorderSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
displayName: zod_1.z.string(),
|
|
9
|
+
startingLevel: zod_1.z.number().int(),
|
|
10
|
+
levelNumber: zod_1.z.number().int(),
|
|
11
|
+
levelNumberAppearance: zod_1.z.string(),
|
|
12
|
+
smallPlayerCardAppearance: zod_1.z.string(),
|
|
13
|
+
assetPath: zod_1.z.string(),
|
|
14
|
+
});
|
|
15
|
+
const LevelBordersSchema = zod_1.z.array(LevelBorderSchema);
|
|
16
|
+
class LevelBordersEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
17
|
+
constructor(config) {
|
|
18
|
+
super(config);
|
|
19
|
+
}
|
|
20
|
+
async getLevelBordersV1() {
|
|
21
|
+
return this.requestValorantApi('v1/levelborders');
|
|
22
|
+
}
|
|
23
|
+
async getLevelBorderByUuidV1(uuid) {
|
|
24
|
+
return this.requestValorantApi(`v1/levelborders/${uuid}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.LevelBordersEndpoints = LevelBordersEndpoints;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
export declare const LocationSchema: z.ZodObject<{
|
|
4
|
+
x: z.ZodNumber;
|
|
5
|
+
y: z.ZodNumber;
|
|
6
|
+
z: z.ZodNumber;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export type LocationResponse = z.infer<typeof LocationSchema>;
|
|
9
|
+
export declare const Scale3DSchema: z.ZodObject<{
|
|
10
|
+
x: z.ZodNumber;
|
|
11
|
+
y: z.ZodNumber;
|
|
12
|
+
z: z.ZodNumber;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type Scale3DResponse = z.infer<typeof Scale3DSchema>;
|
|
15
|
+
export declare const RotationSchema: z.ZodObject<{
|
|
16
|
+
pitch: z.ZodNumber;
|
|
17
|
+
yaw: z.ZodNumber;
|
|
18
|
+
roll: z.ZodNumber;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type RotationResponse = z.infer<typeof RotationSchema>;
|
|
21
|
+
export declare const CalloutSchema: z.ZodObject<{
|
|
22
|
+
regionName: z.ZodString;
|
|
23
|
+
superRegion: z.ZodString;
|
|
24
|
+
superRegionName: z.ZodString;
|
|
25
|
+
location: z.ZodObject<{
|
|
26
|
+
x: z.ZodNumber;
|
|
27
|
+
y: z.ZodNumber;
|
|
28
|
+
z: z.ZodNumber;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
scale3D: z.ZodObject<{
|
|
31
|
+
x: z.ZodNumber;
|
|
32
|
+
y: z.ZodNumber;
|
|
33
|
+
z: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
rotation: z.ZodObject<{
|
|
36
|
+
pitch: z.ZodNumber;
|
|
37
|
+
yaw: z.ZodNumber;
|
|
38
|
+
roll: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type CalloutResponse = z.infer<typeof CalloutSchema>;
|
|
42
|
+
export declare const MapSchema: z.ZodObject<{
|
|
43
|
+
uuid: z.ZodString;
|
|
44
|
+
displayName: z.ZodString;
|
|
45
|
+
narrativeDescription: z.ZodString;
|
|
46
|
+
tacticalDescription: z.ZodString;
|
|
47
|
+
coordinates: z.ZodString;
|
|
48
|
+
displayIcon: z.ZodString;
|
|
49
|
+
listViewIcon: z.ZodString;
|
|
50
|
+
listViewIconTall: z.ZodString;
|
|
51
|
+
splash: z.ZodString;
|
|
52
|
+
stylizedBackgroundImage: z.ZodString;
|
|
53
|
+
premierBackgroundImage: z.ZodString;
|
|
54
|
+
assetPath: z.ZodString;
|
|
55
|
+
mapUrl: z.ZodString;
|
|
56
|
+
xMultiplier: z.ZodNumber;
|
|
57
|
+
yMultiplier: z.ZodNumber;
|
|
58
|
+
xScalarToAdd: z.ZodNumber;
|
|
59
|
+
yScalarToAdd: z.ZodNumber;
|
|
60
|
+
callouts: z.ZodArray<z.ZodObject<{
|
|
61
|
+
regionName: z.ZodString;
|
|
62
|
+
superRegion: z.ZodString;
|
|
63
|
+
superRegionName: z.ZodString;
|
|
64
|
+
location: z.ZodObject<{
|
|
65
|
+
x: z.ZodNumber;
|
|
66
|
+
y: z.ZodNumber;
|
|
67
|
+
z: z.ZodNumber;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
scale3D: z.ZodObject<{
|
|
70
|
+
x: z.ZodNumber;
|
|
71
|
+
y: z.ZodNumber;
|
|
72
|
+
z: z.ZodNumber;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
rotation: z.ZodObject<{
|
|
75
|
+
pitch: z.ZodNumber;
|
|
76
|
+
yaw: z.ZodNumber;
|
|
77
|
+
roll: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export declare const MapsSchema: z.ZodArray<z.ZodObject<{
|
|
82
|
+
uuid: z.ZodString;
|
|
83
|
+
displayName: z.ZodString;
|
|
84
|
+
narrativeDescription: z.ZodString;
|
|
85
|
+
tacticalDescription: z.ZodString;
|
|
86
|
+
coordinates: z.ZodString;
|
|
87
|
+
displayIcon: z.ZodString;
|
|
88
|
+
listViewIcon: z.ZodString;
|
|
89
|
+
listViewIconTall: z.ZodString;
|
|
90
|
+
splash: z.ZodString;
|
|
91
|
+
stylizedBackgroundImage: z.ZodString;
|
|
92
|
+
premierBackgroundImage: z.ZodString;
|
|
93
|
+
assetPath: z.ZodString;
|
|
94
|
+
mapUrl: z.ZodString;
|
|
95
|
+
xMultiplier: z.ZodNumber;
|
|
96
|
+
yMultiplier: z.ZodNumber;
|
|
97
|
+
xScalarToAdd: z.ZodNumber;
|
|
98
|
+
yScalarToAdd: z.ZodNumber;
|
|
99
|
+
callouts: z.ZodArray<z.ZodObject<{
|
|
100
|
+
regionName: z.ZodString;
|
|
101
|
+
superRegion: z.ZodString;
|
|
102
|
+
superRegionName: z.ZodString;
|
|
103
|
+
location: z.ZodObject<{
|
|
104
|
+
x: z.ZodNumber;
|
|
105
|
+
y: z.ZodNumber;
|
|
106
|
+
z: z.ZodNumber;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
scale3D: z.ZodObject<{
|
|
109
|
+
x: z.ZodNumber;
|
|
110
|
+
y: z.ZodNumber;
|
|
111
|
+
z: z.ZodNumber;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
rotation: z.ZodObject<{
|
|
114
|
+
pitch: z.ZodNumber;
|
|
115
|
+
yaw: z.ZodNumber;
|
|
116
|
+
roll: z.ZodNumber;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
export type MapResponse = z.infer<typeof MapSchema>;
|
|
121
|
+
export type MapsResponse = z.infer<typeof MapsSchema>;
|
|
122
|
+
declare class MapsEndpoints extends BaseEndpoint {
|
|
123
|
+
constructor(config?: ValorantApiConfig);
|
|
124
|
+
getMapsV1(): Promise<MapsResponse>;
|
|
125
|
+
getMapByUuidV1(uuid: string): Promise<MapResponse>;
|
|
126
|
+
}
|
|
127
|
+
export { MapsEndpoints };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MapsEndpoints = exports.MapsSchema = exports.MapSchema = exports.CalloutSchema = exports.RotationSchema = exports.Scale3DSchema = exports.LocationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
const SharedSchemas_1 = require("../schemas/SharedSchemas");
|
|
7
|
+
exports.LocationSchema = zod_1.z.object({
|
|
8
|
+
x: zod_1.z.number(),
|
|
9
|
+
y: zod_1.z.number(),
|
|
10
|
+
z: zod_1.z.number(),
|
|
11
|
+
});
|
|
12
|
+
exports.Scale3DSchema = zod_1.z.object({
|
|
13
|
+
x: zod_1.z.number(),
|
|
14
|
+
y: zod_1.z.number(),
|
|
15
|
+
z: zod_1.z.number(),
|
|
16
|
+
});
|
|
17
|
+
exports.RotationSchema = zod_1.z.object({
|
|
18
|
+
pitch: zod_1.z.number(),
|
|
19
|
+
yaw: zod_1.z.number(),
|
|
20
|
+
roll: zod_1.z.number(),
|
|
21
|
+
});
|
|
22
|
+
exports.CalloutSchema = zod_1.z.object({
|
|
23
|
+
regionName: SharedSchemas_1.LocalizedStringSchema,
|
|
24
|
+
superRegion: zod_1.z.string(),
|
|
25
|
+
superRegionName: SharedSchemas_1.LocalizedStringSchema,
|
|
26
|
+
location: exports.LocationSchema,
|
|
27
|
+
scale3D: exports.Scale3DSchema,
|
|
28
|
+
rotation: exports.RotationSchema,
|
|
29
|
+
});
|
|
30
|
+
exports.MapSchema = zod_1.z.object({
|
|
31
|
+
uuid: zod_1.z.string().uuid(),
|
|
32
|
+
displayName: SharedSchemas_1.LocalizedStringSchema,
|
|
33
|
+
narrativeDescription: SharedSchemas_1.LocalizedStringSchema,
|
|
34
|
+
tacticalDescription: SharedSchemas_1.LocalizedStringSchema,
|
|
35
|
+
coordinates: SharedSchemas_1.LocalizedStringSchema,
|
|
36
|
+
displayIcon: zod_1.z.string(),
|
|
37
|
+
listViewIcon: zod_1.z.string(),
|
|
38
|
+
listViewIconTall: zod_1.z.string(),
|
|
39
|
+
splash: zod_1.z.string(),
|
|
40
|
+
stylizedBackgroundImage: zod_1.z.string(),
|
|
41
|
+
premierBackgroundImage: zod_1.z.string(),
|
|
42
|
+
assetPath: zod_1.z.string(),
|
|
43
|
+
mapUrl: zod_1.z.string(),
|
|
44
|
+
xMultiplier: zod_1.z.number(),
|
|
45
|
+
yMultiplier: zod_1.z.number(),
|
|
46
|
+
xScalarToAdd: zod_1.z.number(),
|
|
47
|
+
yScalarToAdd: zod_1.z.number(),
|
|
48
|
+
callouts: zod_1.z.array(exports.CalloutSchema),
|
|
49
|
+
});
|
|
50
|
+
exports.MapsSchema = zod_1.z.array(exports.MapSchema);
|
|
51
|
+
class MapsEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
52
|
+
constructor(config) {
|
|
53
|
+
super(config);
|
|
54
|
+
}
|
|
55
|
+
async getMapsV1() {
|
|
56
|
+
return this.requestValorantApi('v1/maps');
|
|
57
|
+
}
|
|
58
|
+
async getMapByUuidV1(uuid) {
|
|
59
|
+
return this.requestValorantApi(`v1/maps/${uuid}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.MapsEndpoints = MapsEndpoints;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
export declare const MissionObjectiveSchema: z.ZodObject<{
|
|
4
|
+
objectiveUuid: z.ZodString;
|
|
5
|
+
value: z.ZodNumber;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type MissionObjectiveResponse = z.infer<typeof MissionObjectiveSchema>;
|
|
8
|
+
export declare const MissionSchema: z.ZodObject<{
|
|
9
|
+
uuid: z.ZodString;
|
|
10
|
+
displayName: z.ZodString;
|
|
11
|
+
title: z.ZodString;
|
|
12
|
+
type: z.ZodString;
|
|
13
|
+
xpGrant: z.ZodNumber;
|
|
14
|
+
progressToComplete: z.ZodNumber;
|
|
15
|
+
activationDate: z.ZodString;
|
|
16
|
+
expirationDate: z.ZodString;
|
|
17
|
+
assetPath: z.ZodString;
|
|
18
|
+
objectives: z.ZodArray<z.ZodObject<{
|
|
19
|
+
objectiveUuid: z.ZodString;
|
|
20
|
+
value: z.ZodNumber;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export declare const MissionsSchema: z.ZodArray<z.ZodObject<{
|
|
24
|
+
uuid: z.ZodString;
|
|
25
|
+
displayName: z.ZodString;
|
|
26
|
+
title: z.ZodString;
|
|
27
|
+
type: z.ZodString;
|
|
28
|
+
xpGrant: z.ZodNumber;
|
|
29
|
+
progressToComplete: z.ZodNumber;
|
|
30
|
+
activationDate: z.ZodString;
|
|
31
|
+
expirationDate: z.ZodString;
|
|
32
|
+
assetPath: z.ZodString;
|
|
33
|
+
objectives: z.ZodArray<z.ZodObject<{
|
|
34
|
+
objectiveUuid: z.ZodString;
|
|
35
|
+
value: z.ZodNumber;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
export type MissionResponse = z.infer<typeof MissionSchema>;
|
|
39
|
+
export type MissionsResponse = z.infer<typeof MissionsSchema>;
|
|
40
|
+
declare class MissionsEndpoints extends BaseEndpoint {
|
|
41
|
+
constructor(config?: ValorantApiConfig);
|
|
42
|
+
getMissionsV1(): Promise<MissionsResponse>;
|
|
43
|
+
getMissionByUuidV1(uuid: string): Promise<MissionResponse>;
|
|
44
|
+
}
|
|
45
|
+
export { MissionsEndpoints };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MissionsEndpoints = exports.MissionsSchema = exports.MissionSchema = exports.MissionObjectiveSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
const SharedSchemas_1 = require("../schemas/SharedSchemas");
|
|
7
|
+
exports.MissionObjectiveSchema = zod_1.z.object({
|
|
8
|
+
objectiveUuid: zod_1.z.string().uuid(),
|
|
9
|
+
value: zod_1.z.number().int(),
|
|
10
|
+
});
|
|
11
|
+
exports.MissionSchema = zod_1.z.object({
|
|
12
|
+
uuid: zod_1.z.string().uuid(),
|
|
13
|
+
displayName: SharedSchemas_1.LocalizedStringSchema,
|
|
14
|
+
title: SharedSchemas_1.LocalizedStringSchema,
|
|
15
|
+
type: zod_1.z.string(),
|
|
16
|
+
xpGrant: zod_1.z.number().int(),
|
|
17
|
+
progressToComplete: zod_1.z.number().int(),
|
|
18
|
+
activationDate: zod_1.z.string().datetime(),
|
|
19
|
+
expirationDate: zod_1.z.string().datetime(),
|
|
20
|
+
assetPath: zod_1.z.string(),
|
|
21
|
+
objectives: zod_1.z.array(exports.MissionObjectiveSchema),
|
|
22
|
+
});
|
|
23
|
+
exports.MissionsSchema = zod_1.z.array(exports.MissionSchema);
|
|
24
|
+
class MissionsEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
25
|
+
constructor(config) {
|
|
26
|
+
super(config);
|
|
27
|
+
}
|
|
28
|
+
async getMissionsV1() {
|
|
29
|
+
return this.requestValorantApi('v1/missions');
|
|
30
|
+
}
|
|
31
|
+
async getMissionByUuidV1(uuid) {
|
|
32
|
+
return this.requestValorantApi(`v1/missions/${uuid}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.MissionsEndpoints = MissionsEndpoints;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
export declare const ObjectiveSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
directive: z.ZodString;
|
|
6
|
+
assetPath: z.ZodString;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const ObjectivesSchema: z.ZodArray<z.ZodObject<{
|
|
9
|
+
uuid: z.ZodString;
|
|
10
|
+
directive: z.ZodString;
|
|
11
|
+
assetPath: z.ZodString;
|
|
12
|
+
}, z.core.$strip>>;
|
|
13
|
+
export type ObjectiveResponse = z.infer<typeof ObjectiveSchema>;
|
|
14
|
+
export type ObjectivesResponse = z.infer<typeof ObjectivesSchema>;
|
|
15
|
+
declare class ObjectivesEndpoints extends BaseEndpoint {
|
|
16
|
+
constructor(config?: ValorantApiConfig);
|
|
17
|
+
getObjectivesV1(): Promise<ObjectivesResponse>;
|
|
18
|
+
getObjectiveByUuidV1(uuid: string): Promise<ObjectiveResponse>;
|
|
19
|
+
}
|
|
20
|
+
export { ObjectivesEndpoints };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ObjectivesEndpoints = exports.ObjectivesSchema = exports.ObjectiveSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
exports.ObjectiveSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
directive: zod_1.z.string(),
|
|
9
|
+
assetPath: zod_1.z.string(),
|
|
10
|
+
});
|
|
11
|
+
exports.ObjectivesSchema = zod_1.z.array(exports.ObjectiveSchema);
|
|
12
|
+
class ObjectivesEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
13
|
+
constructor(config) {
|
|
14
|
+
super(config);
|
|
15
|
+
}
|
|
16
|
+
async getObjectivesV1() {
|
|
17
|
+
return this.requestValorantApi('v1/objectives');
|
|
18
|
+
}
|
|
19
|
+
async getObjectiveByUuidV1(uuid) {
|
|
20
|
+
return this.requestValorantApi(`v1/objectives/${uuid}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ObjectivesEndpoints = ObjectivesEndpoints;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
export declare const PlayerCardSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
displayName: z.ZodString;
|
|
6
|
+
isHiddenIfNotOwned: z.ZodBoolean;
|
|
7
|
+
themeUuid: z.ZodString;
|
|
8
|
+
displayIcon: z.ZodString;
|
|
9
|
+
smallArt: z.ZodString;
|
|
10
|
+
wideArt: z.ZodString;
|
|
11
|
+
largeArt: z.ZodString;
|
|
12
|
+
assetPath: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export declare const PlayerCardsSchema: z.ZodArray<z.ZodObject<{
|
|
15
|
+
uuid: z.ZodString;
|
|
16
|
+
displayName: z.ZodString;
|
|
17
|
+
isHiddenIfNotOwned: z.ZodBoolean;
|
|
18
|
+
themeUuid: z.ZodString;
|
|
19
|
+
displayIcon: z.ZodString;
|
|
20
|
+
smallArt: z.ZodString;
|
|
21
|
+
wideArt: z.ZodString;
|
|
22
|
+
largeArt: z.ZodString;
|
|
23
|
+
assetPath: z.ZodString;
|
|
24
|
+
}, z.core.$strip>>;
|
|
25
|
+
export type PlayerCardResponse = z.infer<typeof PlayerCardSchema>;
|
|
26
|
+
export type PlayerCardsResponse = z.infer<typeof PlayerCardsSchema>;
|
|
27
|
+
declare class PlayerCardsEndpoints extends BaseEndpoint {
|
|
28
|
+
constructor(config?: ValorantApiConfig);
|
|
29
|
+
getPlayerCardsV1(): Promise<PlayerCardsResponse>;
|
|
30
|
+
getPlayerCardByUuidV1(uuid: string): Promise<PlayerCardResponse>;
|
|
31
|
+
}
|
|
32
|
+
export { PlayerCardsEndpoints };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlayerCardsEndpoints = exports.PlayerCardsSchema = exports.PlayerCardSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
exports.PlayerCardSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
displayName: zod_1.z.string(),
|
|
9
|
+
isHiddenIfNotOwned: zod_1.z.boolean(),
|
|
10
|
+
themeUuid: zod_1.z.string().uuid(),
|
|
11
|
+
displayIcon: zod_1.z.string(),
|
|
12
|
+
smallArt: zod_1.z.string(),
|
|
13
|
+
wideArt: zod_1.z.string(),
|
|
14
|
+
largeArt: zod_1.z.string(),
|
|
15
|
+
assetPath: zod_1.z.string(),
|
|
16
|
+
});
|
|
17
|
+
exports.PlayerCardsSchema = zod_1.z.array(exports.PlayerCardSchema);
|
|
18
|
+
class PlayerCardsEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
19
|
+
constructor(config) {
|
|
20
|
+
super(config);
|
|
21
|
+
}
|
|
22
|
+
async getPlayerCardsV1() {
|
|
23
|
+
return this.requestValorantApi('v1/playercards');
|
|
24
|
+
}
|
|
25
|
+
async getPlayerCardByUuidV1(uuid) {
|
|
26
|
+
return this.requestValorantApi(`v1/playercards/${uuid}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.PlayerCardsEndpoints = PlayerCardsEndpoints;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
export declare const PlayerTitleSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
displayName: z.ZodString;
|
|
6
|
+
titleText: z.ZodString;
|
|
7
|
+
isHiddenIfNotOwned: z.ZodBoolean;
|
|
8
|
+
assetPath: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const PlayerTitlesSchema: z.ZodArray<z.ZodObject<{
|
|
11
|
+
uuid: z.ZodString;
|
|
12
|
+
displayName: z.ZodString;
|
|
13
|
+
titleText: z.ZodString;
|
|
14
|
+
isHiddenIfNotOwned: z.ZodBoolean;
|
|
15
|
+
assetPath: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
export type PlayerTitleResponse = z.infer<typeof PlayerTitleSchema>;
|
|
18
|
+
export type PlayerTitlesResponse = z.infer<typeof PlayerTitlesSchema>;
|
|
19
|
+
declare class PlayerTitlesEndpoints extends BaseEndpoint {
|
|
20
|
+
constructor(config?: ValorantApiConfig);
|
|
21
|
+
getPlayerTitlesV1(): Promise<PlayerTitlesResponse>;
|
|
22
|
+
getPlayerTitleByUuidV1(uuid: string): Promise<PlayerTitleResponse>;
|
|
23
|
+
}
|
|
24
|
+
export { PlayerTitlesEndpoints };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlayerTitlesEndpoints = exports.PlayerTitlesSchema = exports.PlayerTitleSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
exports.PlayerTitleSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
displayName: zod_1.z.string(),
|
|
9
|
+
titleText: zod_1.z.string(),
|
|
10
|
+
isHiddenIfNotOwned: zod_1.z.boolean(),
|
|
11
|
+
assetPath: zod_1.z.string(),
|
|
12
|
+
});
|
|
13
|
+
exports.PlayerTitlesSchema = zod_1.z.array(exports.PlayerTitleSchema);
|
|
14
|
+
class PlayerTitlesEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
15
|
+
constructor(config) {
|
|
16
|
+
super(config);
|
|
17
|
+
}
|
|
18
|
+
async getPlayerTitlesV1() {
|
|
19
|
+
return this.requestValorantApi('v1/playertitles');
|
|
20
|
+
}
|
|
21
|
+
async getPlayerTitleByUuidV1(uuid) {
|
|
22
|
+
return this.requestValorantApi(`v1/playertitles/${uuid}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.PlayerTitlesEndpoints = PlayerTitlesEndpoints;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
export declare const SeasonSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
displayName: z.ZodString;
|
|
6
|
+
title: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
7
|
+
type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
8
|
+
startTime: z.ZodString;
|
|
9
|
+
endTime: z.ZodString;
|
|
10
|
+
parentUuid: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
11
|
+
assetPath: z.ZodString;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export declare const SeasonsSchema: z.ZodArray<z.ZodObject<{
|
|
14
|
+
uuid: z.ZodString;
|
|
15
|
+
displayName: z.ZodString;
|
|
16
|
+
title: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
17
|
+
type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
18
|
+
startTime: z.ZodString;
|
|
19
|
+
endTime: z.ZodString;
|
|
20
|
+
parentUuid: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
|
+
assetPath: z.ZodString;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
export type SeasonResponse = z.infer<typeof SeasonSchema>;
|
|
24
|
+
export type SeasonsResponse = z.infer<typeof SeasonsSchema>;
|
|
25
|
+
declare class SeasonsEndpoints extends BaseEndpoint {
|
|
26
|
+
constructor(config?: ValorantApiConfig);
|
|
27
|
+
/**
|
|
28
|
+
* Get all seasons
|
|
29
|
+
* @returns Promise<SeasonsResponse>
|
|
30
|
+
*/
|
|
31
|
+
getSeasonsV1(): Promise<SeasonsResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Get season by UUID
|
|
34
|
+
* @param uuid Season UUID
|
|
35
|
+
* @returns Promise<SeasonResponse>
|
|
36
|
+
*/
|
|
37
|
+
getSeasonByUuidV1(uuid: string): Promise<SeasonResponse>;
|
|
38
|
+
}
|
|
39
|
+
export { SeasonsEndpoints };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SeasonsEndpoints = exports.SeasonsSchema = exports.SeasonSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const BaseEndpoint_1 = require("./BaseEndpoint");
|
|
6
|
+
exports.SeasonSchema = zod_1.z.object({
|
|
7
|
+
uuid: zod_1.z.string().uuid(),
|
|
8
|
+
displayName: zod_1.z.string(),
|
|
9
|
+
title: zod_1.z.string().optional().nullable(),
|
|
10
|
+
type: zod_1.z.string().optional().nullable(),
|
|
11
|
+
startTime: zod_1.z.string(),
|
|
12
|
+
endTime: zod_1.z.string(),
|
|
13
|
+
parentUuid: zod_1.z.string().uuid().optional().nullable(),
|
|
14
|
+
assetPath: zod_1.z.string(),
|
|
15
|
+
});
|
|
16
|
+
exports.SeasonsSchema = zod_1.z.array(exports.SeasonSchema);
|
|
17
|
+
class SeasonsEndpoints extends BaseEndpoint_1.BaseEndpoint {
|
|
18
|
+
constructor(config) {
|
|
19
|
+
super(config);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get all seasons
|
|
23
|
+
* @returns Promise<SeasonsResponse>
|
|
24
|
+
*/
|
|
25
|
+
async getSeasonsV1() {
|
|
26
|
+
return this.requestValorantApi('v1/seasons');
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get season by UUID
|
|
30
|
+
* @param uuid Season UUID
|
|
31
|
+
* @returns Promise<SeasonResponse>
|
|
32
|
+
*/
|
|
33
|
+
async getSeasonByUuidV1(uuid) {
|
|
34
|
+
return this.requestValorantApi(`v1/seasons/${uuid}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.SeasonsEndpoints = SeasonsEndpoints;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
|
|
3
|
+
export declare const SprayLevelSchema: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
sprayUuid: z.ZodString;
|
|
6
|
+
displayName: z.ZodString;
|
|
7
|
+
displayIcon: z.ZodNullable<z.ZodString>;
|
|
8
|
+
assetPath: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type SprayLevelResponse = z.infer<typeof SprayLevelSchema>;
|
|
11
|
+
export declare const SpraySchema: z.ZodObject<{
|
|
12
|
+
uuid: z.ZodString;
|
|
13
|
+
displayName: z.ZodString;
|
|
14
|
+
category: z.ZodNullable<z.ZodString>;
|
|
15
|
+
themeUuid: z.ZodNullable<z.ZodString>;
|
|
16
|
+
isNull: z.ZodBoolean;
|
|
17
|
+
displayIcon: z.ZodNullable<z.ZodString>;
|
|
18
|
+
fullIcon: z.ZodNullable<z.ZodString>;
|
|
19
|
+
fullTransparentIcon: z.ZodNullable<z.ZodString>;
|
|
20
|
+
animationPng: z.ZodNullable<z.ZodString>;
|
|
21
|
+
animationGif: z.ZodNullable<z.ZodString>;
|
|
22
|
+
assetPath: z.ZodString;
|
|
23
|
+
levels: z.ZodArray<z.ZodObject<{
|
|
24
|
+
uuid: z.ZodString;
|
|
25
|
+
sprayUuid: z.ZodString;
|
|
26
|
+
displayName: z.ZodString;
|
|
27
|
+
displayIcon: z.ZodNullable<z.ZodString>;
|
|
28
|
+
assetPath: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const SpraysSchema: z.ZodArray<z.ZodObject<{
|
|
32
|
+
uuid: z.ZodString;
|
|
33
|
+
displayName: z.ZodString;
|
|
34
|
+
category: z.ZodNullable<z.ZodString>;
|
|
35
|
+
themeUuid: z.ZodNullable<z.ZodString>;
|
|
36
|
+
isNull: z.ZodBoolean;
|
|
37
|
+
displayIcon: z.ZodNullable<z.ZodString>;
|
|
38
|
+
fullIcon: z.ZodNullable<z.ZodString>;
|
|
39
|
+
fullTransparentIcon: z.ZodNullable<z.ZodString>;
|
|
40
|
+
animationPng: z.ZodNullable<z.ZodString>;
|
|
41
|
+
animationGif: z.ZodNullable<z.ZodString>;
|
|
42
|
+
assetPath: z.ZodString;
|
|
43
|
+
levels: z.ZodArray<z.ZodObject<{
|
|
44
|
+
uuid: z.ZodString;
|
|
45
|
+
sprayUuid: z.ZodString;
|
|
46
|
+
displayName: z.ZodString;
|
|
47
|
+
displayIcon: z.ZodNullable<z.ZodString>;
|
|
48
|
+
assetPath: z.ZodString;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
export type SprayResponse = z.infer<typeof SpraySchema>;
|
|
52
|
+
export type SpraysResponse = z.infer<typeof SpraysSchema>;
|
|
53
|
+
declare class SpraysEndpoints extends BaseEndpoint {
|
|
54
|
+
constructor(config?: ValorantApiConfig);
|
|
55
|
+
getSpraysV1(): Promise<SpraysResponse>;
|
|
56
|
+
getSprayByUuidV1(uuid: string): Promise<SprayResponse>;
|
|
57
|
+
}
|
|
58
|
+
export { SpraysEndpoints };
|