@steamsets/client-ts 0.25.4 → 0.25.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/docs/sdks/leaderboard/README.md +77 -0
- package/funcs/accountCreateConnection.js +1 -1
- package/funcs/leaderboardLeaderboardPreviewAccountRank.d.ts +12 -0
- package/funcs/leaderboardLeaderboardPreviewAccountRank.d.ts.map +1 -0
- package/funcs/leaderboardLeaderboardPreviewAccountRank.js +117 -0
- package/funcs/leaderboardLeaderboardPreviewAccountRank.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/index.d.ts +3 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -0
- package/models/components/index.js.map +1 -1
- package/models/components/leaderboardcity.d.ts +0 -5
- package/models/components/leaderboardcity.d.ts.map +1 -1
- package/models/components/leaderboardcity.js +0 -2
- package/models/components/leaderboardcity.js.map +1 -1
- package/models/components/leaderboardcountry.d.ts +0 -5
- package/models/components/leaderboardcountry.d.ts.map +1 -1
- package/models/components/leaderboardcountry.js +0 -2
- package/models/components/leaderboardcountry.js.map +1 -1
- package/models/components/leaderboardregion.d.ts +0 -5
- package/models/components/leaderboardregion.d.ts.map +1 -1
- package/models/components/leaderboardregion.js +0 -2
- package/models/components/leaderboardregion.js.map +1 -1
- package/models/components/leaderboardstate.d.ts +0 -5
- package/models/components/leaderboardstate.d.ts.map +1 -1
- package/models/components/leaderboardstate.js +0 -2
- package/models/components/leaderboardstate.js.map +1 -1
- package/models/components/previewaccount.d.ts +241 -0
- package/models/components/previewaccount.d.ts.map +1 -0
- package/models/components/previewaccount.js +157 -0
- package/models/components/previewaccount.js.map +1 -0
- package/models/components/v1leaderboardpreviewaccountrankrequestbody.d.ts +113 -0
- package/models/components/v1leaderboardpreviewaccountrankrequestbody.d.ts.map +1 -0
- package/models/components/v1leaderboardpreviewaccountrankrequestbody.js +98 -0
- package/models/components/v1leaderboardpreviewaccountrankrequestbody.js.map +1 -0
- package/models/components/v1leaderboardpreviewaccountrankresponsebody.d.ts +44 -0
- package/models/components/v1leaderboardpreviewaccountrankresponsebody.d.ts.map +1 -0
- package/models/components/v1leaderboardpreviewaccountrankresponsebody.js +83 -0
- package/models/components/v1leaderboardpreviewaccountrankresponsebody.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/leaderboardpreviewaccountrank.d.ts +35 -0
- package/models/operations/leaderboardpreviewaccountrank.d.ts.map +1 -0
- package/models/operations/leaderboardpreviewaccountrank.js +75 -0
- package/models/operations/leaderboardpreviewaccountrank.js.map +1 -0
- package/package.json +1 -1
- package/sdk/leaderboard.d.ts +1 -0
- package/sdk/leaderboard.d.ts.map +1 -1
- package/sdk/leaderboard.js +4 -0
- package/sdk/leaderboard.js.map +1 -1
- package/src/funcs/accountCreateConnection.ts +1 -1
- package/src/funcs/leaderboardLeaderboardPreviewAccountRank.ts +183 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +3 -0
- package/src/models/components/leaderboardcity.ts +0 -7
- package/src/models/components/leaderboardcountry.ts +0 -7
- package/src/models/components/leaderboardregion.ts +0 -7
- package/src/models/components/leaderboardstate.ts +0 -7
- package/src/models/components/previewaccount.ts +369 -0
- package/src/models/components/v1leaderboardpreviewaccountrankrequestbody.ts +148 -0
- package/src/models/components/v1leaderboardpreviewaccountrankresponsebody.ts +122 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/leaderboardpreviewaccountrank.ts +98 -0
- package/src/sdk/leaderboard.ts +12 -0
|
@@ -8,10 +8,6 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
10
|
export type LeaderboardRegion = {
|
|
11
|
-
/**
|
|
12
|
-
* The id of the region
|
|
13
|
-
*/
|
|
14
|
-
id: number;
|
|
15
11
|
/**
|
|
16
12
|
* The name of the region
|
|
17
13
|
*/
|
|
@@ -24,13 +20,11 @@ export const LeaderboardRegion$inboundSchema: z.ZodType<
|
|
|
24
20
|
z.ZodTypeDef,
|
|
25
21
|
unknown
|
|
26
22
|
> = z.object({
|
|
27
|
-
id: z.number().int(),
|
|
28
23
|
name: z.string(),
|
|
29
24
|
});
|
|
30
25
|
|
|
31
26
|
/** @internal */
|
|
32
27
|
export type LeaderboardRegion$Outbound = {
|
|
33
|
-
id: number;
|
|
34
28
|
name: string;
|
|
35
29
|
};
|
|
36
30
|
|
|
@@ -40,7 +34,6 @@ export const LeaderboardRegion$outboundSchema: z.ZodType<
|
|
|
40
34
|
z.ZodTypeDef,
|
|
41
35
|
LeaderboardRegion
|
|
42
36
|
> = z.object({
|
|
43
|
-
id: z.number().int(),
|
|
44
37
|
name: z.string(),
|
|
45
38
|
});
|
|
46
39
|
|
|
@@ -8,10 +8,6 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
10
|
export type LeaderboardState = {
|
|
11
|
-
/**
|
|
12
|
-
* The id of the state
|
|
13
|
-
*/
|
|
14
|
-
id: number;
|
|
15
11
|
/**
|
|
16
12
|
* The name of the state
|
|
17
13
|
*/
|
|
@@ -24,13 +20,11 @@ export const LeaderboardState$inboundSchema: z.ZodType<
|
|
|
24
20
|
z.ZodTypeDef,
|
|
25
21
|
unknown
|
|
26
22
|
> = z.object({
|
|
27
|
-
id: z.number().int(),
|
|
28
23
|
name: z.string(),
|
|
29
24
|
});
|
|
30
25
|
|
|
31
26
|
/** @internal */
|
|
32
27
|
export type LeaderboardState$Outbound = {
|
|
33
|
-
id: number;
|
|
34
28
|
name: string;
|
|
35
29
|
};
|
|
36
30
|
|
|
@@ -40,7 +34,6 @@ export const LeaderboardState$outboundSchema: z.ZodType<
|
|
|
40
34
|
z.ZodTypeDef,
|
|
41
35
|
LeaderboardState
|
|
42
36
|
> = z.object({
|
|
43
|
-
id: z.number().int(),
|
|
44
37
|
name: z.string(),
|
|
45
38
|
});
|
|
46
39
|
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
LeaderboardCity,
|
|
12
|
+
LeaderboardCity$inboundSchema,
|
|
13
|
+
LeaderboardCity$Outbound,
|
|
14
|
+
LeaderboardCity$outboundSchema,
|
|
15
|
+
} from "./leaderboardcity.js";
|
|
16
|
+
import {
|
|
17
|
+
LeaderboardCountry,
|
|
18
|
+
LeaderboardCountry$inboundSchema,
|
|
19
|
+
LeaderboardCountry$Outbound,
|
|
20
|
+
LeaderboardCountry$outboundSchema,
|
|
21
|
+
} from "./leaderboardcountry.js";
|
|
22
|
+
import {
|
|
23
|
+
LeaderboardRegion,
|
|
24
|
+
LeaderboardRegion$inboundSchema,
|
|
25
|
+
LeaderboardRegion$Outbound,
|
|
26
|
+
LeaderboardRegion$outboundSchema,
|
|
27
|
+
} from "./leaderboardregion.js";
|
|
28
|
+
import {
|
|
29
|
+
LeaderboardState,
|
|
30
|
+
LeaderboardState$inboundSchema,
|
|
31
|
+
LeaderboardState$Outbound,
|
|
32
|
+
LeaderboardState$outboundSchema,
|
|
33
|
+
} from "./leaderboardstate.js";
|
|
34
|
+
import {
|
|
35
|
+
Role,
|
|
36
|
+
Role$inboundSchema,
|
|
37
|
+
Role$Outbound,
|
|
38
|
+
Role$outboundSchema,
|
|
39
|
+
} from "./role.js";
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The privacy of the account
|
|
43
|
+
*/
|
|
44
|
+
export const PreviewAccountPrivacy = {
|
|
45
|
+
Public: "public",
|
|
46
|
+
Private: "private",
|
|
47
|
+
FriendsOnly: "friends_only",
|
|
48
|
+
} as const;
|
|
49
|
+
/**
|
|
50
|
+
* The privacy of the account
|
|
51
|
+
*/
|
|
52
|
+
export type PreviewAccountPrivacy = ClosedEnum<typeof PreviewAccountPrivacy>;
|
|
53
|
+
|
|
54
|
+
export type PreviewAccount = {
|
|
55
|
+
/**
|
|
56
|
+
* The cost of an app
|
|
57
|
+
*
|
|
58
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
59
|
+
*/
|
|
60
|
+
appCost: number;
|
|
61
|
+
/**
|
|
62
|
+
* The number of apps the account has
|
|
63
|
+
*/
|
|
64
|
+
apps: number;
|
|
65
|
+
/**
|
|
66
|
+
* The avatar hash of the account
|
|
67
|
+
*/
|
|
68
|
+
avatar: string;
|
|
69
|
+
/**
|
|
70
|
+
* The number of awards the account has
|
|
71
|
+
*/
|
|
72
|
+
awardsGiven: number;
|
|
73
|
+
/**
|
|
74
|
+
* The number of awards the account has
|
|
75
|
+
*/
|
|
76
|
+
awardsReceived: number;
|
|
77
|
+
/**
|
|
78
|
+
* The number of badges the account has
|
|
79
|
+
*/
|
|
80
|
+
badges: number;
|
|
81
|
+
/**
|
|
82
|
+
* The number of bans
|
|
83
|
+
*/
|
|
84
|
+
bans: number;
|
|
85
|
+
city?: LeaderboardCity | null | undefined;
|
|
86
|
+
country?: LeaderboardCountry | null | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* The time the account was created
|
|
89
|
+
*/
|
|
90
|
+
createdAt: Date;
|
|
91
|
+
/**
|
|
92
|
+
* The difference between the account's score and the user's score
|
|
93
|
+
*/
|
|
94
|
+
differenceToUs: number;
|
|
95
|
+
/**
|
|
96
|
+
* The total of donations the account has
|
|
97
|
+
*/
|
|
98
|
+
donated: number;
|
|
99
|
+
/**
|
|
100
|
+
* The economy ban of the account
|
|
101
|
+
*/
|
|
102
|
+
economyBan: string;
|
|
103
|
+
/**
|
|
104
|
+
* The cost of a foil badge
|
|
105
|
+
*
|
|
106
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
107
|
+
*/
|
|
108
|
+
foilBadgeCost: number;
|
|
109
|
+
/**
|
|
110
|
+
* The number of foil badges the account has
|
|
111
|
+
*/
|
|
112
|
+
foilBadges: number;
|
|
113
|
+
/**
|
|
114
|
+
* The number of friends the account has
|
|
115
|
+
*/
|
|
116
|
+
friends: number;
|
|
117
|
+
/**
|
|
118
|
+
* The number of game bans
|
|
119
|
+
*/
|
|
120
|
+
gameBans: number;
|
|
121
|
+
/**
|
|
122
|
+
* The level of the account
|
|
123
|
+
*/
|
|
124
|
+
level: number;
|
|
125
|
+
/**
|
|
126
|
+
* The name of the account
|
|
127
|
+
*/
|
|
128
|
+
name: string;
|
|
129
|
+
/**
|
|
130
|
+
* The cost of a normal badge
|
|
131
|
+
*
|
|
132
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
133
|
+
*/
|
|
134
|
+
normalBadgeCost: number;
|
|
135
|
+
/**
|
|
136
|
+
* The number of normal badges the account has
|
|
137
|
+
*/
|
|
138
|
+
normalBadges: number;
|
|
139
|
+
/**
|
|
140
|
+
* The playtime of the account
|
|
141
|
+
*/
|
|
142
|
+
playtime: number;
|
|
143
|
+
/**
|
|
144
|
+
* The number of points the account has
|
|
145
|
+
*/
|
|
146
|
+
pointsGiven: number;
|
|
147
|
+
/**
|
|
148
|
+
* The number of points the account has
|
|
149
|
+
*/
|
|
150
|
+
pointsReceived: number;
|
|
151
|
+
/**
|
|
152
|
+
* The privacy of the account
|
|
153
|
+
*/
|
|
154
|
+
privacy: PreviewAccountPrivacy;
|
|
155
|
+
/**
|
|
156
|
+
* The rank of the account
|
|
157
|
+
*/
|
|
158
|
+
rank: number;
|
|
159
|
+
region?: LeaderboardRegion | null | undefined;
|
|
160
|
+
/**
|
|
161
|
+
* The roles of the account
|
|
162
|
+
*/
|
|
163
|
+
roles: Array<Role> | null;
|
|
164
|
+
/**
|
|
165
|
+
* The score of the account
|
|
166
|
+
*/
|
|
167
|
+
score: number;
|
|
168
|
+
state?: LeaderboardState | null | undefined;
|
|
169
|
+
/**
|
|
170
|
+
* The steam id
|
|
171
|
+
*/
|
|
172
|
+
steamId: string;
|
|
173
|
+
/**
|
|
174
|
+
* The steam sets score
|
|
175
|
+
*/
|
|
176
|
+
steamSetsScore: number;
|
|
177
|
+
/**
|
|
178
|
+
* The vanity of the account
|
|
179
|
+
*/
|
|
180
|
+
steamSetsVanity: string;
|
|
181
|
+
/**
|
|
182
|
+
* The vanity of the account
|
|
183
|
+
*/
|
|
184
|
+
steamVanity: string;
|
|
185
|
+
/**
|
|
186
|
+
* The number of vac bans
|
|
187
|
+
*/
|
|
188
|
+
vacBans: number;
|
|
189
|
+
/**
|
|
190
|
+
* The number of xp the account has
|
|
191
|
+
*/
|
|
192
|
+
xp: number;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/** @internal */
|
|
196
|
+
export const PreviewAccountPrivacy$inboundSchema: z.ZodNativeEnum<
|
|
197
|
+
typeof PreviewAccountPrivacy
|
|
198
|
+
> = z.nativeEnum(PreviewAccountPrivacy);
|
|
199
|
+
|
|
200
|
+
/** @internal */
|
|
201
|
+
export const PreviewAccountPrivacy$outboundSchema: z.ZodNativeEnum<
|
|
202
|
+
typeof PreviewAccountPrivacy
|
|
203
|
+
> = PreviewAccountPrivacy$inboundSchema;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @internal
|
|
207
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
208
|
+
*/
|
|
209
|
+
export namespace PreviewAccountPrivacy$ {
|
|
210
|
+
/** @deprecated use `PreviewAccountPrivacy$inboundSchema` instead. */
|
|
211
|
+
export const inboundSchema = PreviewAccountPrivacy$inboundSchema;
|
|
212
|
+
/** @deprecated use `PreviewAccountPrivacy$outboundSchema` instead. */
|
|
213
|
+
export const outboundSchema = PreviewAccountPrivacy$outboundSchema;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** @internal */
|
|
217
|
+
export const PreviewAccount$inboundSchema: z.ZodType<
|
|
218
|
+
PreviewAccount,
|
|
219
|
+
z.ZodTypeDef,
|
|
220
|
+
unknown
|
|
221
|
+
> = z.object({
|
|
222
|
+
appCost: z.number().int(),
|
|
223
|
+
apps: z.number().int(),
|
|
224
|
+
avatar: z.string(),
|
|
225
|
+
awardsGiven: z.number().int(),
|
|
226
|
+
awardsReceived: z.number().int(),
|
|
227
|
+
badges: z.number().int(),
|
|
228
|
+
bans: z.number().int(),
|
|
229
|
+
city: z.nullable(LeaderboardCity$inboundSchema).optional(),
|
|
230
|
+
country: z.nullable(LeaderboardCountry$inboundSchema).optional(),
|
|
231
|
+
createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
232
|
+
differenceToUs: z.number().int(),
|
|
233
|
+
donated: z.number().int(),
|
|
234
|
+
economyBan: z.string(),
|
|
235
|
+
foilBadgeCost: z.number().int(),
|
|
236
|
+
foilBadges: z.number().int(),
|
|
237
|
+
friends: z.number().int(),
|
|
238
|
+
gameBans: z.number().int(),
|
|
239
|
+
level: z.number().int(),
|
|
240
|
+
name: z.string(),
|
|
241
|
+
normalBadgeCost: z.number().int(),
|
|
242
|
+
normalBadges: z.number().int(),
|
|
243
|
+
playtime: z.number().int(),
|
|
244
|
+
pointsGiven: z.number().int(),
|
|
245
|
+
pointsReceived: z.number().int(),
|
|
246
|
+
privacy: PreviewAccountPrivacy$inboundSchema,
|
|
247
|
+
rank: z.number().int(),
|
|
248
|
+
region: z.nullable(LeaderboardRegion$inboundSchema).optional(),
|
|
249
|
+
roles: z.nullable(z.array(Role$inboundSchema)),
|
|
250
|
+
score: z.number().int(),
|
|
251
|
+
state: z.nullable(LeaderboardState$inboundSchema).optional(),
|
|
252
|
+
steamId: z.string(),
|
|
253
|
+
steamSetsScore: z.number().int(),
|
|
254
|
+
steamSetsVanity: z.string(),
|
|
255
|
+
steamVanity: z.string(),
|
|
256
|
+
vacBans: z.number().int(),
|
|
257
|
+
xp: z.number().int(),
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
/** @internal */
|
|
261
|
+
export type PreviewAccount$Outbound = {
|
|
262
|
+
appCost: number;
|
|
263
|
+
apps: number;
|
|
264
|
+
avatar: string;
|
|
265
|
+
awardsGiven: number;
|
|
266
|
+
awardsReceived: number;
|
|
267
|
+
badges: number;
|
|
268
|
+
bans: number;
|
|
269
|
+
city?: LeaderboardCity$Outbound | null | undefined;
|
|
270
|
+
country?: LeaderboardCountry$Outbound | null | undefined;
|
|
271
|
+
createdAt: string;
|
|
272
|
+
differenceToUs: number;
|
|
273
|
+
donated: number;
|
|
274
|
+
economyBan: string;
|
|
275
|
+
foilBadgeCost: number;
|
|
276
|
+
foilBadges: number;
|
|
277
|
+
friends: number;
|
|
278
|
+
gameBans: number;
|
|
279
|
+
level: number;
|
|
280
|
+
name: string;
|
|
281
|
+
normalBadgeCost: number;
|
|
282
|
+
normalBadges: number;
|
|
283
|
+
playtime: number;
|
|
284
|
+
pointsGiven: number;
|
|
285
|
+
pointsReceived: number;
|
|
286
|
+
privacy: string;
|
|
287
|
+
rank: number;
|
|
288
|
+
region?: LeaderboardRegion$Outbound | null | undefined;
|
|
289
|
+
roles: Array<Role$Outbound> | null;
|
|
290
|
+
score: number;
|
|
291
|
+
state?: LeaderboardState$Outbound | null | undefined;
|
|
292
|
+
steamId: string;
|
|
293
|
+
steamSetsScore: number;
|
|
294
|
+
steamSetsVanity: string;
|
|
295
|
+
steamVanity: string;
|
|
296
|
+
vacBans: number;
|
|
297
|
+
xp: number;
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
/** @internal */
|
|
301
|
+
export const PreviewAccount$outboundSchema: z.ZodType<
|
|
302
|
+
PreviewAccount$Outbound,
|
|
303
|
+
z.ZodTypeDef,
|
|
304
|
+
PreviewAccount
|
|
305
|
+
> = z.object({
|
|
306
|
+
appCost: z.number().int(),
|
|
307
|
+
apps: z.number().int(),
|
|
308
|
+
avatar: z.string(),
|
|
309
|
+
awardsGiven: z.number().int(),
|
|
310
|
+
awardsReceived: z.number().int(),
|
|
311
|
+
badges: z.number().int(),
|
|
312
|
+
bans: z.number().int(),
|
|
313
|
+
city: z.nullable(LeaderboardCity$outboundSchema).optional(),
|
|
314
|
+
country: z.nullable(LeaderboardCountry$outboundSchema).optional(),
|
|
315
|
+
createdAt: z.date().transform(v => v.toISOString()),
|
|
316
|
+
differenceToUs: z.number().int(),
|
|
317
|
+
donated: z.number().int(),
|
|
318
|
+
economyBan: z.string(),
|
|
319
|
+
foilBadgeCost: z.number().int(),
|
|
320
|
+
foilBadges: z.number().int(),
|
|
321
|
+
friends: z.number().int(),
|
|
322
|
+
gameBans: z.number().int(),
|
|
323
|
+
level: z.number().int(),
|
|
324
|
+
name: z.string(),
|
|
325
|
+
normalBadgeCost: z.number().int(),
|
|
326
|
+
normalBadges: z.number().int(),
|
|
327
|
+
playtime: z.number().int(),
|
|
328
|
+
pointsGiven: z.number().int(),
|
|
329
|
+
pointsReceived: z.number().int(),
|
|
330
|
+
privacy: PreviewAccountPrivacy$outboundSchema,
|
|
331
|
+
rank: z.number().int(),
|
|
332
|
+
region: z.nullable(LeaderboardRegion$outboundSchema).optional(),
|
|
333
|
+
roles: z.nullable(z.array(Role$outboundSchema)),
|
|
334
|
+
score: z.number().int(),
|
|
335
|
+
state: z.nullable(LeaderboardState$outboundSchema).optional(),
|
|
336
|
+
steamId: z.string(),
|
|
337
|
+
steamSetsScore: z.number().int(),
|
|
338
|
+
steamSetsVanity: z.string(),
|
|
339
|
+
steamVanity: z.string(),
|
|
340
|
+
vacBans: z.number().int(),
|
|
341
|
+
xp: z.number().int(),
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* @internal
|
|
346
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
347
|
+
*/
|
|
348
|
+
export namespace PreviewAccount$ {
|
|
349
|
+
/** @deprecated use `PreviewAccount$inboundSchema` instead. */
|
|
350
|
+
export const inboundSchema = PreviewAccount$inboundSchema;
|
|
351
|
+
/** @deprecated use `PreviewAccount$outboundSchema` instead. */
|
|
352
|
+
export const outboundSchema = PreviewAccount$outboundSchema;
|
|
353
|
+
/** @deprecated use `PreviewAccount$Outbound` instead. */
|
|
354
|
+
export type Outbound = PreviewAccount$Outbound;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export function previewAccountToJSON(previewAccount: PreviewAccount): string {
|
|
358
|
+
return JSON.stringify(PreviewAccount$outboundSchema.parse(previewAccount));
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export function previewAccountFromJSON(
|
|
362
|
+
jsonString: string,
|
|
363
|
+
): SafeParseResult<PreviewAccount, SDKValidationError> {
|
|
364
|
+
return safeParse(
|
|
365
|
+
jsonString,
|
|
366
|
+
(x) => PreviewAccount$inboundSchema.parse(JSON.parse(x)),
|
|
367
|
+
`Failed to parse 'PreviewAccount' from JSON`,
|
|
368
|
+
);
|
|
369
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The leaderboard to get
|
|
13
|
+
*/
|
|
14
|
+
export const V1LeaderboardPreviewAccountRankRequestBodyLeaderboard = {
|
|
15
|
+
Apps: "apps",
|
|
16
|
+
AwardsGiven: "awards_given",
|
|
17
|
+
AwardsReceived: "awards_received",
|
|
18
|
+
Bans: "bans",
|
|
19
|
+
GameBans: "game_bans",
|
|
20
|
+
VacBans: "vac_bans",
|
|
21
|
+
Donations: "donations",
|
|
22
|
+
FoilBadges: "foil_badges",
|
|
23
|
+
NormalBadges: "normal_badges",
|
|
24
|
+
Badges: "badges",
|
|
25
|
+
Playtime: "playtime",
|
|
26
|
+
PointsGiven: "points_given",
|
|
27
|
+
PointsReceived: "points_received",
|
|
28
|
+
SteamSets: "steam_sets",
|
|
29
|
+
Xp: "xp",
|
|
30
|
+
} as const;
|
|
31
|
+
/**
|
|
32
|
+
* The leaderboard to get
|
|
33
|
+
*/
|
|
34
|
+
export type V1LeaderboardPreviewAccountRankRequestBodyLeaderboard = ClosedEnum<
|
|
35
|
+
typeof V1LeaderboardPreviewAccountRankRequestBodyLeaderboard
|
|
36
|
+
>;
|
|
37
|
+
|
|
38
|
+
export type V1LeaderboardPreviewAccountRankRequestBody = {
|
|
39
|
+
/**
|
|
40
|
+
* The leaderboard to get
|
|
41
|
+
*/
|
|
42
|
+
leaderboard: V1LeaderboardPreviewAccountRankRequestBodyLeaderboard;
|
|
43
|
+
/**
|
|
44
|
+
* The steamID who wants the preview
|
|
45
|
+
*/
|
|
46
|
+
steamID?: string | null | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* What their leaderboard score would be
|
|
49
|
+
*/
|
|
50
|
+
value?: number | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$inboundSchema:
|
|
55
|
+
z.ZodNativeEnum<
|
|
56
|
+
typeof V1LeaderboardPreviewAccountRankRequestBodyLeaderboard
|
|
57
|
+
> = z.nativeEnum(V1LeaderboardPreviewAccountRankRequestBodyLeaderboard);
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$outboundSchema:
|
|
61
|
+
z.ZodNativeEnum<
|
|
62
|
+
typeof V1LeaderboardPreviewAccountRankRequestBodyLeaderboard
|
|
63
|
+
> = V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$inboundSchema;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
68
|
+
*/
|
|
69
|
+
export namespace V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$ {
|
|
70
|
+
/** @deprecated use `V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$inboundSchema` instead. */
|
|
71
|
+
export const inboundSchema =
|
|
72
|
+
V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$inboundSchema;
|
|
73
|
+
/** @deprecated use `V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$outboundSchema` instead. */
|
|
74
|
+
export const outboundSchema =
|
|
75
|
+
V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$outboundSchema;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const V1LeaderboardPreviewAccountRankRequestBody$inboundSchema:
|
|
80
|
+
z.ZodType<V1LeaderboardPreviewAccountRankRequestBody, z.ZodTypeDef, unknown> =
|
|
81
|
+
z.object({
|
|
82
|
+
leaderboard:
|
|
83
|
+
V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$inboundSchema,
|
|
84
|
+
steamID: z.nullable(z.string()).optional(),
|
|
85
|
+
value: z.number().int().optional(),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export type V1LeaderboardPreviewAccountRankRequestBody$Outbound = {
|
|
90
|
+
leaderboard: string;
|
|
91
|
+
steamID?: string | null | undefined;
|
|
92
|
+
value?: number | undefined;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const V1LeaderboardPreviewAccountRankRequestBody$outboundSchema:
|
|
97
|
+
z.ZodType<
|
|
98
|
+
V1LeaderboardPreviewAccountRankRequestBody$Outbound,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
V1LeaderboardPreviewAccountRankRequestBody
|
|
101
|
+
> = z.object({
|
|
102
|
+
leaderboard:
|
|
103
|
+
V1LeaderboardPreviewAccountRankRequestBodyLeaderboard$outboundSchema,
|
|
104
|
+
steamID: z.nullable(z.string()).optional(),
|
|
105
|
+
value: z.number().int().optional(),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @internal
|
|
110
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
111
|
+
*/
|
|
112
|
+
export namespace V1LeaderboardPreviewAccountRankRequestBody$ {
|
|
113
|
+
/** @deprecated use `V1LeaderboardPreviewAccountRankRequestBody$inboundSchema` instead. */
|
|
114
|
+
export const inboundSchema =
|
|
115
|
+
V1LeaderboardPreviewAccountRankRequestBody$inboundSchema;
|
|
116
|
+
/** @deprecated use `V1LeaderboardPreviewAccountRankRequestBody$outboundSchema` instead. */
|
|
117
|
+
export const outboundSchema =
|
|
118
|
+
V1LeaderboardPreviewAccountRankRequestBody$outboundSchema;
|
|
119
|
+
/** @deprecated use `V1LeaderboardPreviewAccountRankRequestBody$Outbound` instead. */
|
|
120
|
+
export type Outbound = V1LeaderboardPreviewAccountRankRequestBody$Outbound;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function v1LeaderboardPreviewAccountRankRequestBodyToJSON(
|
|
124
|
+
v1LeaderboardPreviewAccountRankRequestBody:
|
|
125
|
+
V1LeaderboardPreviewAccountRankRequestBody,
|
|
126
|
+
): string {
|
|
127
|
+
return JSON.stringify(
|
|
128
|
+
V1LeaderboardPreviewAccountRankRequestBody$outboundSchema.parse(
|
|
129
|
+
v1LeaderboardPreviewAccountRankRequestBody,
|
|
130
|
+
),
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function v1LeaderboardPreviewAccountRankRequestBodyFromJSON(
|
|
135
|
+
jsonString: string,
|
|
136
|
+
): SafeParseResult<
|
|
137
|
+
V1LeaderboardPreviewAccountRankRequestBody,
|
|
138
|
+
SDKValidationError
|
|
139
|
+
> {
|
|
140
|
+
return safeParse(
|
|
141
|
+
jsonString,
|
|
142
|
+
(x) =>
|
|
143
|
+
V1LeaderboardPreviewAccountRankRequestBody$inboundSchema.parse(
|
|
144
|
+
JSON.parse(x),
|
|
145
|
+
),
|
|
146
|
+
`Failed to parse 'V1LeaderboardPreviewAccountRankRequestBody' from JSON`,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
PreviewAccount,
|
|
12
|
+
PreviewAccount$inboundSchema,
|
|
13
|
+
PreviewAccount$Outbound,
|
|
14
|
+
PreviewAccount$outboundSchema,
|
|
15
|
+
} from "./previewaccount.js";
|
|
16
|
+
|
|
17
|
+
export type V1LeaderboardPreviewAccountRankResponseBody = {
|
|
18
|
+
/**
|
|
19
|
+
* A URL to the JSON Schema for this object.
|
|
20
|
+
*/
|
|
21
|
+
dollarSchema?: string | undefined;
|
|
22
|
+
ownAccount: PreviewAccount | null;
|
|
23
|
+
rankedAbove: PreviewAccount | null;
|
|
24
|
+
rankedBelow: PreviewAccount | null;
|
|
25
|
+
/**
|
|
26
|
+
* The number of accounts that are ranked in the leaderboard
|
|
27
|
+
*/
|
|
28
|
+
rankedOutOf?: number | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const V1LeaderboardPreviewAccountRankResponseBody$inboundSchema:
|
|
33
|
+
z.ZodType<
|
|
34
|
+
V1LeaderboardPreviewAccountRankResponseBody,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
$schema: z.string().optional(),
|
|
39
|
+
OwnAccount: z.nullable(PreviewAccount$inboundSchema),
|
|
40
|
+
RankedAbove: z.nullable(PreviewAccount$inboundSchema),
|
|
41
|
+
RankedBelow: z.nullable(PreviewAccount$inboundSchema),
|
|
42
|
+
rankedOutOf: z.number().int().default(0),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"$schema": "dollarSchema",
|
|
46
|
+
"OwnAccount": "ownAccount",
|
|
47
|
+
"RankedAbove": "rankedAbove",
|
|
48
|
+
"RankedBelow": "rankedBelow",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type V1LeaderboardPreviewAccountRankResponseBody$Outbound = {
|
|
54
|
+
$schema?: string | undefined;
|
|
55
|
+
OwnAccount: PreviewAccount$Outbound | null;
|
|
56
|
+
RankedAbove: PreviewAccount$Outbound | null;
|
|
57
|
+
RankedBelow: PreviewAccount$Outbound | null;
|
|
58
|
+
rankedOutOf: number;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const V1LeaderboardPreviewAccountRankResponseBody$outboundSchema:
|
|
63
|
+
z.ZodType<
|
|
64
|
+
V1LeaderboardPreviewAccountRankResponseBody$Outbound,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
V1LeaderboardPreviewAccountRankResponseBody
|
|
67
|
+
> = z.object({
|
|
68
|
+
dollarSchema: z.string().optional(),
|
|
69
|
+
ownAccount: z.nullable(PreviewAccount$outboundSchema),
|
|
70
|
+
rankedAbove: z.nullable(PreviewAccount$outboundSchema),
|
|
71
|
+
rankedBelow: z.nullable(PreviewAccount$outboundSchema),
|
|
72
|
+
rankedOutOf: z.number().int().default(0),
|
|
73
|
+
}).transform((v) => {
|
|
74
|
+
return remap$(v, {
|
|
75
|
+
dollarSchema: "$schema",
|
|
76
|
+
ownAccount: "OwnAccount",
|
|
77
|
+
rankedAbove: "RankedAbove",
|
|
78
|
+
rankedBelow: "RankedBelow",
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
85
|
+
*/
|
|
86
|
+
export namespace V1LeaderboardPreviewAccountRankResponseBody$ {
|
|
87
|
+
/** @deprecated use `V1LeaderboardPreviewAccountRankResponseBody$inboundSchema` instead. */
|
|
88
|
+
export const inboundSchema =
|
|
89
|
+
V1LeaderboardPreviewAccountRankResponseBody$inboundSchema;
|
|
90
|
+
/** @deprecated use `V1LeaderboardPreviewAccountRankResponseBody$outboundSchema` instead. */
|
|
91
|
+
export const outboundSchema =
|
|
92
|
+
V1LeaderboardPreviewAccountRankResponseBody$outboundSchema;
|
|
93
|
+
/** @deprecated use `V1LeaderboardPreviewAccountRankResponseBody$Outbound` instead. */
|
|
94
|
+
export type Outbound = V1LeaderboardPreviewAccountRankResponseBody$Outbound;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function v1LeaderboardPreviewAccountRankResponseBodyToJSON(
|
|
98
|
+
v1LeaderboardPreviewAccountRankResponseBody:
|
|
99
|
+
V1LeaderboardPreviewAccountRankResponseBody,
|
|
100
|
+
): string {
|
|
101
|
+
return JSON.stringify(
|
|
102
|
+
V1LeaderboardPreviewAccountRankResponseBody$outboundSchema.parse(
|
|
103
|
+
v1LeaderboardPreviewAccountRankResponseBody,
|
|
104
|
+
),
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function v1LeaderboardPreviewAccountRankResponseBodyFromJSON(
|
|
109
|
+
jsonString: string,
|
|
110
|
+
): SafeParseResult<
|
|
111
|
+
V1LeaderboardPreviewAccountRankResponseBody,
|
|
112
|
+
SDKValidationError
|
|
113
|
+
> {
|
|
114
|
+
return safeParse(
|
|
115
|
+
jsonString,
|
|
116
|
+
(x) =>
|
|
117
|
+
V1LeaderboardPreviewAccountRankResponseBody$inboundSchema.parse(
|
|
118
|
+
JSON.parse(x),
|
|
119
|
+
),
|
|
120
|
+
`Failed to parse 'V1LeaderboardPreviewAccountRankResponseBody' from JSON`,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
@@ -52,6 +52,7 @@ export * from "./leaderboardgetaccountsmeta.js";
|
|
|
52
52
|
export * from "./leaderboardgetgroupleaderboard.js";
|
|
53
53
|
export * from "./leaderboardgetgroupsmeta.js";
|
|
54
54
|
export * from "./leaderboardlistbadges.js";
|
|
55
|
+
export * from "./leaderboardpreviewaccountrank.js";
|
|
55
56
|
export * from "./liveness.js";
|
|
56
57
|
export * from "./locationgetlocations.js";
|
|
57
58
|
export * from "./staffliststaff.js";
|