@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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -0
  3. package/dist/ValorantApi.d.ts +45 -0
  4. package/dist/ValorantApi.js +68 -0
  5. package/dist/endpoints/AgentsEndpoints.d.ts +168 -0
  6. package/dist/endpoints/AgentsEndpoints.js +80 -0
  7. package/dist/endpoints/BaseEndpoint.d.ts +10 -0
  8. package/dist/endpoints/BaseEndpoint.js +21 -0
  9. package/dist/endpoints/BuddiesEndpoints.d.ts +53 -0
  10. package/dist/endpoints/BuddiesEndpoints.js +37 -0
  11. package/dist/endpoints/BundlesEndpoints.d.ts +36 -0
  12. package/dist/endpoints/BundlesEndpoints.js +31 -0
  13. package/dist/endpoints/CompetitiveTiersEndpoints.d.ts +57 -0
  14. package/dist/endpoints/CompetitiveTiersEndpoints.js +36 -0
  15. package/dist/endpoints/ContentTierEndpoints.d.ts +32 -0
  16. package/dist/endpoints/ContentTierEndpoints.js +29 -0
  17. package/dist/endpoints/ContractsEndpoints.d.ts +168 -0
  18. package/dist/endpoints/ContractsEndpoints.js +65 -0
  19. package/dist/endpoints/CurrenciesEndpoints.d.ts +28 -0
  20. package/dist/endpoints/CurrenciesEndpoints.js +27 -0
  21. package/dist/endpoints/EventsEndpoints.d.ts +35 -0
  22. package/dist/endpoints/EventsEndpoints.js +35 -0
  23. package/dist/endpoints/FlexEndpoints.d.ts +24 -0
  24. package/dist/endpoints/FlexEndpoints.js +26 -0
  25. package/dist/endpoints/GameModesEndpoints.d.ts +70 -0
  26. package/dist/endpoints/GameModesEndpoints.js +46 -0
  27. package/dist/endpoints/LevelBordersEndpoints.d.ts +28 -0
  28. package/dist/endpoints/LevelBordersEndpoints.js +27 -0
  29. package/dist/endpoints/MapsEndpoints.d.ts +127 -0
  30. package/dist/endpoints/MapsEndpoints.js +62 -0
  31. package/dist/endpoints/MissionsEndpoints.d.ts +45 -0
  32. package/dist/endpoints/MissionsEndpoints.js +35 -0
  33. package/dist/endpoints/ObjectivesEndpoints.d.ts +20 -0
  34. package/dist/endpoints/ObjectivesEndpoints.js +23 -0
  35. package/dist/endpoints/PlayerCardsEndpoints.d.ts +32 -0
  36. package/dist/endpoints/PlayerCardsEndpoints.js +29 -0
  37. package/dist/endpoints/PlayerTitlesEndpoints.d.ts +24 -0
  38. package/dist/endpoints/PlayerTitlesEndpoints.js +25 -0
  39. package/dist/endpoints/SeasonsEndpoints.d.ts +39 -0
  40. package/dist/endpoints/SeasonsEndpoints.js +37 -0
  41. package/dist/endpoints/SpraysEndpoints.d.ts +58 -0
  42. package/dist/endpoints/SpraysEndpoints.js +39 -0
  43. package/dist/endpoints/VersionEndpoint.d.ts +18 -0
  44. package/dist/endpoints/VersionEndpoint.js +24 -0
  45. package/dist/endpoints/WeaponsEndpoints.d.ts +309 -0
  46. package/dist/endpoints/WeaponsEndpoints.js +114 -0
  47. package/dist/index.d.ts +23 -0
  48. package/dist/index.js +39 -0
  49. package/dist/schemas/SharedSchemas.d.ts +3 -0
  50. package/dist/schemas/SharedSchemas.js +5 -0
  51. package/package.json +40 -0
@@ -0,0 +1,57 @@
1
+ import { z } from 'zod';
2
+ 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>;
52
+ declare class CompetitiveTiersEndpoints extends BaseEndpoint {
53
+ constructor(config?: ValorantApiConfig);
54
+ getCompetitiveTiersV1(): Promise<CompetitiveTiersResponse>;
55
+ getCompetitiveTiersByUuidV1(uuid: string): Promise<CompetitiveTierSetResponse>;
56
+ }
57
+ export { CompetitiveTiersEndpoints };
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompetitiveTiersEndpoints = exports.CompetitiveTiersSchema = exports.CompetitiveTierSetSchema = exports.TierSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ 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
+ class CompetitiveTiersEndpoints extends BaseEndpoint_1.BaseEndpoint {
26
+ constructor(config) {
27
+ super(config);
28
+ }
29
+ async getCompetitiveTiersV1() {
30
+ return this.requestValorantApi('v1/competitivetiers');
31
+ }
32
+ async getCompetitiveTiersByUuidV1(uuid) {
33
+ return this.requestValorantApi(`v1/competitivetiers/${uuid}`);
34
+ }
35
+ }
36
+ exports.CompetitiveTiersEndpoints = CompetitiveTiersEndpoints;
@@ -0,0 +1,32 @@
1
+ import { z } from 'zod';
2
+ 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>;
27
+ declare class ContentTierEndpoints extends BaseEndpoint {
28
+ constructor(config?: ValorantApiConfig);
29
+ getContentTiersV1(): Promise<ContentTiersResponse>;
30
+ getContentTierByUuidV1(uuid: string): Promise<ContentTierResponse>;
31
+ }
32
+ export { ContentTierEndpoints };
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContentTierEndpoints = exports.ContentTiersSchema = exports.ContentTierSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ 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
+ class ContentTierEndpoints extends BaseEndpoint_1.BaseEndpoint {
19
+ constructor(config) {
20
+ super(config);
21
+ }
22
+ async getContentTiersV1() {
23
+ return this.requestValorantApi('v1/contenttiers');
24
+ }
25
+ async getContentTierByUuidV1(uuid) {
26
+ return this.requestValorantApi(`v1/contenttiers/${uuid}`);
27
+ }
28
+ }
29
+ exports.ContentTierEndpoints = ContentTierEndpoints;
@@ -0,0 +1,168 @@
1
+ import { z } from 'zod';
2
+ import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
+ export declare const RewardSchema: z.ZodObject<{
4
+ type: z.ZodString;
5
+ uuid: z.ZodString;
6
+ amount: z.ZodNumber;
7
+ isHighlighted: z.ZodBoolean;
8
+ }, z.core.$strip>;
9
+ export type RewardResponse = z.infer<typeof RewardSchema>;
10
+ export declare const ContractLevelSchema: z.ZodObject<{
11
+ reward: z.ZodObject<{
12
+ type: z.ZodString;
13
+ uuid: z.ZodString;
14
+ amount: z.ZodNumber;
15
+ isHighlighted: z.ZodBoolean;
16
+ }, z.core.$strip>;
17
+ xp: z.ZodNumber;
18
+ vpCost: z.ZodNumber;
19
+ isPurchasableWithVP: z.ZodBoolean;
20
+ doughCost: z.ZodNumber;
21
+ isPurchasableWithDough: z.ZodBoolean;
22
+ }, z.core.$strip>;
23
+ export type ContractLevelResponse = z.infer<typeof ContractLevelSchema>;
24
+ export declare const ChapterSchema: z.ZodObject<{
25
+ isEpilogue: z.ZodBoolean;
26
+ levels: z.ZodArray<z.ZodObject<{
27
+ reward: z.ZodObject<{
28
+ type: z.ZodString;
29
+ uuid: z.ZodString;
30
+ amount: z.ZodNumber;
31
+ isHighlighted: z.ZodBoolean;
32
+ }, z.core.$strip>;
33
+ xp: z.ZodNumber;
34
+ vpCost: z.ZodNumber;
35
+ isPurchasableWithVP: z.ZodBoolean;
36
+ doughCost: z.ZodNumber;
37
+ isPurchasableWithDough: z.ZodBoolean;
38
+ }, z.core.$strip>>;
39
+ freeRewards: z.ZodNullable<z.ZodArray<z.ZodObject<{
40
+ type: z.ZodString;
41
+ uuid: z.ZodString;
42
+ amount: z.ZodNumber;
43
+ isHighlighted: z.ZodBoolean;
44
+ }, z.core.$strip>>>;
45
+ }, z.core.$strip>;
46
+ export type ChapterResponse = z.infer<typeof ChapterSchema>;
47
+ export declare const ContractContentSchema: z.ZodObject<{
48
+ relationType: z.ZodNullable<z.ZodString>;
49
+ relationUuid: z.ZodNullable<z.ZodString>;
50
+ chapters: z.ZodArray<z.ZodObject<{
51
+ isEpilogue: z.ZodBoolean;
52
+ levels: z.ZodArray<z.ZodObject<{
53
+ reward: z.ZodObject<{
54
+ type: z.ZodString;
55
+ uuid: z.ZodString;
56
+ amount: z.ZodNumber;
57
+ isHighlighted: z.ZodBoolean;
58
+ }, z.core.$strip>;
59
+ xp: z.ZodNumber;
60
+ vpCost: z.ZodNumber;
61
+ isPurchasableWithVP: z.ZodBoolean;
62
+ doughCost: z.ZodNumber;
63
+ isPurchasableWithDough: z.ZodBoolean;
64
+ }, z.core.$strip>>;
65
+ freeRewards: z.ZodNullable<z.ZodArray<z.ZodObject<{
66
+ type: z.ZodString;
67
+ uuid: z.ZodString;
68
+ amount: z.ZodNumber;
69
+ isHighlighted: z.ZodBoolean;
70
+ }, z.core.$strip>>>;
71
+ }, z.core.$strip>>;
72
+ premiumRewardScheduleUuid: z.ZodNullable<z.ZodString>;
73
+ premiumVPCost: z.ZodNumber;
74
+ }, z.core.$strip>;
75
+ export type ContractContentResponse = z.infer<typeof ContractContentSchema>;
76
+ export declare const ContractSchema: z.ZodObject<{
77
+ uuid: z.ZodString;
78
+ displayName: z.ZodString;
79
+ displayIcon: z.ZodNullable<z.ZodString>;
80
+ shipIt: z.ZodBoolean;
81
+ useLevelVPCostOverride: z.ZodBoolean;
82
+ levelVPCostOverride: z.ZodNumber;
83
+ freeRewardScheduleUuid: z.ZodNullable<z.ZodString>;
84
+ content: z.ZodObject<{
85
+ relationType: z.ZodNullable<z.ZodString>;
86
+ relationUuid: z.ZodNullable<z.ZodString>;
87
+ chapters: z.ZodArray<z.ZodObject<{
88
+ isEpilogue: z.ZodBoolean;
89
+ levels: z.ZodArray<z.ZodObject<{
90
+ reward: z.ZodObject<{
91
+ type: z.ZodString;
92
+ uuid: z.ZodString;
93
+ amount: z.ZodNumber;
94
+ isHighlighted: z.ZodBoolean;
95
+ }, z.core.$strip>;
96
+ xp: z.ZodNumber;
97
+ vpCost: z.ZodNumber;
98
+ isPurchasableWithVP: z.ZodBoolean;
99
+ doughCost: z.ZodNumber;
100
+ isPurchasableWithDough: z.ZodBoolean;
101
+ }, z.core.$strip>>;
102
+ freeRewards: z.ZodNullable<z.ZodArray<z.ZodObject<{
103
+ type: z.ZodString;
104
+ uuid: z.ZodString;
105
+ amount: z.ZodNumber;
106
+ isHighlighted: z.ZodBoolean;
107
+ }, z.core.$strip>>>;
108
+ }, z.core.$strip>>;
109
+ premiumRewardScheduleUuid: z.ZodNullable<z.ZodString>;
110
+ premiumVPCost: z.ZodNumber;
111
+ }, z.core.$strip>;
112
+ assetPath: z.ZodString;
113
+ }, z.core.$strip>;
114
+ export type ContractResponse = z.infer<typeof ContractSchema>;
115
+ export declare const ContractsSchema: z.ZodArray<z.ZodObject<{
116
+ uuid: z.ZodString;
117
+ displayName: z.ZodString;
118
+ displayIcon: z.ZodNullable<z.ZodString>;
119
+ shipIt: z.ZodBoolean;
120
+ useLevelVPCostOverride: z.ZodBoolean;
121
+ levelVPCostOverride: z.ZodNumber;
122
+ freeRewardScheduleUuid: z.ZodNullable<z.ZodString>;
123
+ content: z.ZodObject<{
124
+ relationType: z.ZodNullable<z.ZodString>;
125
+ relationUuid: z.ZodNullable<z.ZodString>;
126
+ chapters: z.ZodArray<z.ZodObject<{
127
+ isEpilogue: z.ZodBoolean;
128
+ levels: z.ZodArray<z.ZodObject<{
129
+ reward: z.ZodObject<{
130
+ type: z.ZodString;
131
+ uuid: z.ZodString;
132
+ amount: z.ZodNumber;
133
+ isHighlighted: z.ZodBoolean;
134
+ }, z.core.$strip>;
135
+ xp: z.ZodNumber;
136
+ vpCost: z.ZodNumber;
137
+ isPurchasableWithVP: z.ZodBoolean;
138
+ doughCost: z.ZodNumber;
139
+ isPurchasableWithDough: z.ZodBoolean;
140
+ }, z.core.$strip>>;
141
+ freeRewards: z.ZodNullable<z.ZodArray<z.ZodObject<{
142
+ type: z.ZodString;
143
+ uuid: z.ZodString;
144
+ amount: z.ZodNumber;
145
+ isHighlighted: z.ZodBoolean;
146
+ }, z.core.$strip>>>;
147
+ }, z.core.$strip>>;
148
+ premiumRewardScheduleUuid: z.ZodNullable<z.ZodString>;
149
+ premiumVPCost: z.ZodNumber;
150
+ }, z.core.$strip>;
151
+ assetPath: z.ZodString;
152
+ }, z.core.$strip>>;
153
+ export type ContractsResponse = z.infer<typeof ContractsSchema>;
154
+ declare class ContractsEndpoints extends BaseEndpoint {
155
+ constructor(config?: ValorantApiConfig);
156
+ /**
157
+ * Get all contracts
158
+ * @returns Promise<ContractsResponse>
159
+ */
160
+ getContractsV1(): Promise<ContractsResponse>;
161
+ /**
162
+ * Get contract by UUID
163
+ * @param uuid Contract UUID
164
+ * @returns Promise<ContractResponse>
165
+ */
166
+ getContractByUuidV1(uuid: string): Promise<ContractResponse>;
167
+ }
168
+ export { ContractsEndpoints };
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContractsEndpoints = exports.ContractsSchema = exports.ContractSchema = exports.ContractContentSchema = exports.ChapterSchema = exports.ContractLevelSchema = exports.RewardSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const BaseEndpoint_1 = require("./BaseEndpoint");
6
+ exports.RewardSchema = zod_1.z.object({
7
+ type: zod_1.z.string(),
8
+ uuid: zod_1.z.string().uuid(),
9
+ amount: zod_1.z.number().int(),
10
+ isHighlighted: zod_1.z.boolean(),
11
+ });
12
+ exports.ContractLevelSchema = zod_1.z.object({
13
+ reward: exports.RewardSchema,
14
+ xp: zod_1.z.number().int(),
15
+ vpCost: zod_1.z.number().int(),
16
+ isPurchasableWithVP: zod_1.z.boolean(),
17
+ doughCost: zod_1.z.number().int(),
18
+ isPurchasableWithDough: zod_1.z.boolean(),
19
+ });
20
+ exports.ChapterSchema = zod_1.z.object({
21
+ isEpilogue: zod_1.z.boolean(),
22
+ levels: zod_1.z.array(exports.ContractLevelSchema),
23
+ freeRewards: zod_1.z.array(exports.RewardSchema).nullable(),
24
+ });
25
+ exports.ContractContentSchema = zod_1.z.object({
26
+ relationType: zod_1.z.string().nullable(),
27
+ relationUuid: zod_1.z.string().uuid().nullable(),
28
+ chapters: zod_1.z.array(exports.ChapterSchema),
29
+ premiumRewardScheduleUuid: zod_1.z.string().uuid().nullable(),
30
+ premiumVPCost: zod_1.z.number().int(),
31
+ });
32
+ exports.ContractSchema = zod_1.z.object({
33
+ uuid: zod_1.z.string().uuid(),
34
+ displayName: zod_1.z.string(),
35
+ displayIcon: zod_1.z.string().nullable(),
36
+ shipIt: zod_1.z.boolean(),
37
+ useLevelVPCostOverride: zod_1.z.boolean(),
38
+ levelVPCostOverride: zod_1.z.number().int(),
39
+ freeRewardScheduleUuid: zod_1.z.string().uuid().nullable(),
40
+ content: exports.ContractContentSchema,
41
+ assetPath: zod_1.z.string(),
42
+ });
43
+ exports.ContractsSchema = zod_1.z.array(exports.ContractSchema);
44
+ // Types already defined above
45
+ class ContractsEndpoints extends BaseEndpoint_1.BaseEndpoint {
46
+ constructor(config) {
47
+ super(config);
48
+ }
49
+ /**
50
+ * Get all contracts
51
+ * @returns Promise<ContractsResponse>
52
+ */
53
+ async getContractsV1() {
54
+ return this.requestValorantApi('v1/contracts');
55
+ }
56
+ /**
57
+ * Get contract by UUID
58
+ * @param uuid Contract UUID
59
+ * @returns Promise<ContractResponse>
60
+ */
61
+ async getContractByUuidV1(uuid) {
62
+ return this.requestValorantApi(`v1/contracts/${uuid}`);
63
+ }
64
+ }
65
+ exports.ContractsEndpoints = ContractsEndpoints;
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
+ export declare const CurrencySchema: z.ZodObject<{
4
+ uuid: z.ZodString;
5
+ displayName: z.ZodString;
6
+ displayNameSingular: z.ZodString;
7
+ displayIcon: z.ZodString;
8
+ largeIcon: z.ZodString;
9
+ rewardPreviewIcon: z.ZodString;
10
+ assetPath: z.ZodString;
11
+ }, z.core.$strip>;
12
+ export declare const CurrenciesSchema: z.ZodArray<z.ZodObject<{
13
+ uuid: z.ZodString;
14
+ displayName: z.ZodString;
15
+ displayNameSingular: z.ZodString;
16
+ displayIcon: z.ZodString;
17
+ largeIcon: z.ZodString;
18
+ rewardPreviewIcon: z.ZodString;
19
+ assetPath: z.ZodString;
20
+ }, z.core.$strip>>;
21
+ export type CurrencyResponse = z.infer<typeof CurrencySchema>;
22
+ export type CurrenciesResponse = z.infer<typeof CurrenciesSchema>;
23
+ declare class CurrenciesEndpoints extends BaseEndpoint {
24
+ constructor(config?: ValorantApiConfig);
25
+ getCurrenciesV1(): Promise<CurrenciesResponse>;
26
+ getCurrencyByUuidV1(uuid: string): Promise<CurrencyResponse>;
27
+ }
28
+ export { CurrenciesEndpoints };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CurrenciesEndpoints = exports.CurrenciesSchema = exports.CurrencySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const BaseEndpoint_1 = require("./BaseEndpoint");
6
+ exports.CurrencySchema = zod_1.z.object({
7
+ uuid: zod_1.z.string().uuid(),
8
+ displayName: zod_1.z.string(),
9
+ displayNameSingular: zod_1.z.string(),
10
+ displayIcon: zod_1.z.string().url(),
11
+ largeIcon: zod_1.z.string().url(),
12
+ rewardPreviewIcon: zod_1.z.string().url(),
13
+ assetPath: zod_1.z.string(),
14
+ });
15
+ exports.CurrenciesSchema = zod_1.z.array(exports.CurrencySchema);
16
+ class CurrenciesEndpoints extends BaseEndpoint_1.BaseEndpoint {
17
+ constructor(config) {
18
+ super(config);
19
+ }
20
+ async getCurrenciesV1() {
21
+ return this.requestValorantApi('v1/currencies');
22
+ }
23
+ async getCurrencyByUuidV1(uuid) {
24
+ return this.requestValorantApi(`v1/currencies/${uuid}`);
25
+ }
26
+ }
27
+ exports.CurrenciesEndpoints = CurrenciesEndpoints;
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
+ export declare const EventSchema: z.ZodObject<{
4
+ uuid: z.ZodString;
5
+ displayName: z.ZodString;
6
+ shortDisplayName: z.ZodString;
7
+ startTime: z.ZodString;
8
+ endTime: z.ZodString;
9
+ assetPath: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export declare const EventsSchema: z.ZodArray<z.ZodObject<{
12
+ uuid: z.ZodString;
13
+ displayName: z.ZodString;
14
+ shortDisplayName: z.ZodString;
15
+ startTime: z.ZodString;
16
+ endTime: z.ZodString;
17
+ assetPath: z.ZodString;
18
+ }, z.core.$strip>>;
19
+ export type EventResponse = z.infer<typeof EventSchema>;
20
+ export type EventsResponse = z.infer<typeof EventsSchema>;
21
+ declare class EventsEndpoints extends BaseEndpoint {
22
+ constructor(config?: ValorantApiConfig);
23
+ /**
24
+ * Get all events
25
+ * @returns Promise<EventsResponse>
26
+ */
27
+ getEventsV1(): Promise<EventsResponse>;
28
+ /**
29
+ * Get event by UUID
30
+ * @param uuid Event UUID
31
+ * @returns Promise<EventResponse>
32
+ */
33
+ getEventByUuidV1(uuid: string): Promise<EventResponse>;
34
+ }
35
+ export { EventsEndpoints };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventsEndpoints = exports.EventsSchema = exports.EventSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const BaseEndpoint_1 = require("./BaseEndpoint");
6
+ exports.EventSchema = zod_1.z.object({
7
+ uuid: zod_1.z.string().uuid(),
8
+ displayName: zod_1.z.string(),
9
+ shortDisplayName: zod_1.z.string(),
10
+ startTime: zod_1.z.string(),
11
+ endTime: zod_1.z.string(),
12
+ assetPath: zod_1.z.string(),
13
+ });
14
+ exports.EventsSchema = zod_1.z.array(exports.EventSchema);
15
+ class EventsEndpoints extends BaseEndpoint_1.BaseEndpoint {
16
+ constructor(config) {
17
+ super(config);
18
+ }
19
+ /**
20
+ * Get all events
21
+ * @returns Promise<EventsResponse>
22
+ */
23
+ async getEventsV1() {
24
+ return this.requestValorantApi('v1/events');
25
+ }
26
+ /**
27
+ * Get event by UUID
28
+ * @param uuid Event UUID
29
+ * @returns Promise<EventResponse>
30
+ */
31
+ async getEventByUuidV1(uuid) {
32
+ return this.requestValorantApi(`v1/events/${uuid}`);
33
+ }
34
+ }
35
+ exports.EventsEndpoints = EventsEndpoints;
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
+ export declare const FlexSchema: z.ZodObject<{
4
+ uuid: z.ZodString;
5
+ displayName: z.ZodString;
6
+ displayNameAllCaps: z.ZodString;
7
+ displayIcon: z.ZodString;
8
+ assetPath: z.ZodString;
9
+ }, z.core.$strip>;
10
+ export declare const FlexsSchema: z.ZodArray<z.ZodObject<{
11
+ uuid: z.ZodString;
12
+ displayName: z.ZodString;
13
+ displayNameAllCaps: z.ZodString;
14
+ displayIcon: z.ZodString;
15
+ assetPath: z.ZodString;
16
+ }, z.core.$strip>>;
17
+ export type FlexResponse = z.infer<typeof FlexSchema>;
18
+ export type FlexsResponse = z.infer<typeof FlexsSchema>;
19
+ declare class FlexEndpoints extends BaseEndpoint {
20
+ constructor(config?: ValorantApiConfig);
21
+ getFlexV1(): Promise<FlexsResponse>;
22
+ getFlexByUuidV1(uuid: string): Promise<FlexResponse>;
23
+ }
24
+ export { FlexEndpoints };
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FlexEndpoints = exports.FlexsSchema = exports.FlexSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const BaseEndpoint_1 = require("./BaseEndpoint");
6
+ const SharedSchemas_1 = require("../schemas/SharedSchemas");
7
+ exports.FlexSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ displayName: SharedSchemas_1.LocalizedStringSchema,
10
+ displayNameAllCaps: SharedSchemas_1.LocalizedStringSchema,
11
+ displayIcon: zod_1.z.string(),
12
+ assetPath: zod_1.z.string(),
13
+ });
14
+ exports.FlexsSchema = zod_1.z.array(exports.FlexSchema);
15
+ class FlexEndpoints extends BaseEndpoint_1.BaseEndpoint {
16
+ constructor(config) {
17
+ super(config);
18
+ }
19
+ async getFlexV1() {
20
+ return this.requestValorantApi('v1/flex');
21
+ }
22
+ async getFlexByUuidV1(uuid) {
23
+ return this.requestValorantApi(`v1/flex/${uuid}`);
24
+ }
25
+ }
26
+ exports.FlexEndpoints = FlexEndpoints;
@@ -0,0 +1,70 @@
1
+ import { z } from 'zod';
2
+ import { BaseEndpoint, ValorantApiConfig } from './BaseEndpoint';
3
+ export declare const GameFeatureOverrideSchema: z.ZodObject<{
4
+ featureName: z.ZodString;
5
+ state: z.ZodBoolean;
6
+ }, z.core.$strip>;
7
+ export type GameFeatureOverrideResponse = z.infer<typeof GameFeatureOverrideSchema>;
8
+ export declare const GameRuleBoolOverrideSchema: z.ZodObject<{
9
+ ruleName: z.ZodString;
10
+ state: z.ZodBoolean;
11
+ }, z.core.$strip>;
12
+ export type GameRuleBoolOverrideResponse = z.infer<typeof GameRuleBoolOverrideSchema>;
13
+ export declare const GameModeSchema: z.ZodObject<{
14
+ uuid: z.ZodString;
15
+ displayName: z.ZodString;
16
+ description: z.ZodNullable<z.ZodString>;
17
+ duration: z.ZodNullable<z.ZodString>;
18
+ economyType: z.ZodNullable<z.ZodString>;
19
+ allowsMatchTimeouts: z.ZodBoolean;
20
+ allowsCustomGameReplays: z.ZodBoolean;
21
+ isTeamVoiceAllowed: z.ZodBoolean;
22
+ isMinimapHidden: z.ZodBoolean;
23
+ orbCount: z.ZodNumber;
24
+ roundsPerHalf: z.ZodNumber;
25
+ teamRoles: z.ZodNullable<z.ZodArray<z.ZodString>>;
26
+ gameFeatureOverrides: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
27
+ featureName: z.ZodString;
28
+ state: z.ZodBoolean;
29
+ }, z.core.$strip>>>>;
30
+ gameRuleBoolOverrides: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
31
+ ruleName: z.ZodString;
32
+ state: z.ZodBoolean;
33
+ }, z.core.$strip>>>>;
34
+ displayIcon: z.ZodNullable<z.ZodString>;
35
+ listViewIconTall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ assetPath: z.ZodString;
37
+ }, z.core.$strip>;
38
+ export declare const GameModesSchema: z.ZodArray<z.ZodObject<{
39
+ uuid: z.ZodString;
40
+ displayName: z.ZodString;
41
+ description: z.ZodNullable<z.ZodString>;
42
+ duration: z.ZodNullable<z.ZodString>;
43
+ economyType: z.ZodNullable<z.ZodString>;
44
+ allowsMatchTimeouts: z.ZodBoolean;
45
+ allowsCustomGameReplays: z.ZodBoolean;
46
+ isTeamVoiceAllowed: z.ZodBoolean;
47
+ isMinimapHidden: z.ZodBoolean;
48
+ orbCount: z.ZodNumber;
49
+ roundsPerHalf: z.ZodNumber;
50
+ teamRoles: z.ZodNullable<z.ZodArray<z.ZodString>>;
51
+ gameFeatureOverrides: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
52
+ featureName: z.ZodString;
53
+ state: z.ZodBoolean;
54
+ }, z.core.$strip>>>>;
55
+ gameRuleBoolOverrides: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
56
+ ruleName: z.ZodString;
57
+ state: z.ZodBoolean;
58
+ }, z.core.$strip>>>>;
59
+ displayIcon: z.ZodNullable<z.ZodString>;
60
+ listViewIconTall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
61
+ assetPath: z.ZodString;
62
+ }, z.core.$strip>>;
63
+ export type GameModeResponse = z.infer<typeof GameModeSchema>;
64
+ export type GameModesResponse = z.infer<typeof GameModesSchema>;
65
+ declare class GameModesEndpoints extends BaseEndpoint {
66
+ constructor(config?: ValorantApiConfig);
67
+ getGameModesV1(): Promise<GameModesResponse>;
68
+ getGameModeByUuidV1(uuid: string): Promise<GameModeResponse>;
69
+ }
70
+ export { GameModesEndpoints };