@steamsets/client-ts 0.36.2 → 0.36.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +2 -0
  2. package/funcs/badgesListCrafters.d.ts +19 -0
  3. package/funcs/badgesListCrafters.d.ts.map +1 -0
  4. package/funcs/badgesListCrafters.js +158 -0
  5. package/funcs/badgesListCrafters.js.map +1 -0
  6. package/jsr.json +1 -1
  7. package/lib/config.d.ts +3 -3
  8. package/lib/config.js +3 -3
  9. package/models/components/badgelistcraftersentry.d.ts +180 -0
  10. package/models/components/badgelistcraftersentry.d.ts.map +1 -0
  11. package/models/components/badgelistcraftersentry.js +105 -0
  12. package/models/components/badgelistcraftersentry.js.map +1 -0
  13. package/models/components/badgelistcraftersrequestbody.d.ts +25 -0
  14. package/models/components/badgelistcraftersrequestbody.d.ts.map +1 -0
  15. package/models/components/badgelistcraftersrequestbody.js +51 -0
  16. package/models/components/badgelistcraftersrequestbody.js.map +1 -0
  17. package/models/components/badgelistcraftersresponsebody.d.ts +27 -0
  18. package/models/components/badgelistcraftersresponsebody.d.ts.map +1 -0
  19. package/models/components/badgelistcraftersresponsebody.js +60 -0
  20. package/models/components/badgelistcraftersresponsebody.js.map +1 -0
  21. package/models/components/comparedtuple.d.ts +1 -0
  22. package/models/components/comparedtuple.d.ts.map +1 -1
  23. package/models/components/comparedtuple.js +1 -0
  24. package/models/components/comparedtuple.js.map +1 -1
  25. package/models/components/index.d.ts +3 -0
  26. package/models/components/index.d.ts.map +1 -1
  27. package/models/components/index.js +3 -0
  28. package/models/components/index.js.map +1 -1
  29. package/models/components/resource.d.ts +1 -0
  30. package/models/components/resource.d.ts.map +1 -1
  31. package/models/components/resource.js +1 -0
  32. package/models/components/resource.js.map +1 -1
  33. package/models/components/v1appbadge.d.ts +1 -0
  34. package/models/components/v1appbadge.d.ts.map +1 -1
  35. package/models/components/v1appbadge.js +1 -0
  36. package/models/components/v1appbadge.js.map +1 -1
  37. package/models/components/v1leaderboardbadge.d.ts +4 -0
  38. package/models/components/v1leaderboardbadge.d.ts.map +1 -1
  39. package/models/components/v1leaderboardbadge.js +1 -0
  40. package/models/components/v1leaderboardbadge.js.map +1 -1
  41. package/models/operations/badgelistcrafters.d.ts +15 -0
  42. package/models/operations/badgelistcrafters.d.ts.map +1 -0
  43. package/models/operations/badgelistcrafters.js +59 -0
  44. package/models/operations/badgelistcrafters.js.map +1 -0
  45. package/models/operations/index.d.ts +1 -0
  46. package/models/operations/index.d.ts.map +1 -1
  47. package/models/operations/index.js +1 -0
  48. package/models/operations/index.js.map +1 -1
  49. package/package.json +1 -1
  50. package/sdk/badges.d.ts +7 -0
  51. package/sdk/badges.d.ts.map +1 -1
  52. package/sdk/badges.js +8 -0
  53. package/sdk/badges.js.map +1 -1
  54. package/src/funcs/badgesListCrafters.ts +249 -0
  55. package/src/lib/config.ts +3 -3
  56. package/src/models/components/badgelistcraftersentry.ts +262 -0
  57. package/src/models/components/badgelistcraftersrequestbody.ts +48 -0
  58. package/src/models/components/badgelistcraftersresponsebody.ts +62 -0
  59. package/src/models/components/comparedtuple.ts +2 -0
  60. package/src/models/components/index.ts +3 -0
  61. package/src/models/components/resource.ts +1 -0
  62. package/src/models/components/v1appbadge.ts +2 -0
  63. package/src/models/components/v1leaderboardbadge.ts +5 -0
  64. package/src/models/operations/badgelistcrafters.ts +46 -0
  65. package/src/models/operations/index.ts +1 -0
  66. package/src/sdk/badges.ts +18 -0
@@ -0,0 +1,249 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import * as components from "../models/components/index.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import { SteamSetsError } from "../models/errors/steamsetserror.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { APICall, APIPromise } from "../types/async.js";
28
+ import { Result } from "../types/fp.js";
29
+ import {
30
+ createPageIterator,
31
+ haltIterator,
32
+ PageIterator,
33
+ Paginator,
34
+ } from "../types/operations.js";
35
+
36
+ /**
37
+ * List accounts that own a badge (earliest completion first). Donator perk — page size scales with Patreon tier.
38
+ */
39
+ export function badgesListCrafters(
40
+ client: SteamSetsCore,
41
+ request: components.BadgeListCraftersRequestBody,
42
+ options?: RequestOptions,
43
+ ): APIPromise<
44
+ PageIterator<
45
+ Result<
46
+ operations.BadgeListCraftersResponse,
47
+ | errors.ErrorModel
48
+ | SteamSetsError
49
+ | ResponseValidationError
50
+ | ConnectionError
51
+ | RequestAbortedError
52
+ | RequestTimeoutError
53
+ | InvalidRequestError
54
+ | UnexpectedClientError
55
+ | SDKValidationError
56
+ >,
57
+ { cursor: string }
58
+ >
59
+ > {
60
+ return new APIPromise($do(
61
+ client,
62
+ request,
63
+ options,
64
+ ));
65
+ }
66
+
67
+ async function $do(
68
+ client: SteamSetsCore,
69
+ request: components.BadgeListCraftersRequestBody,
70
+ options?: RequestOptions,
71
+ ): Promise<
72
+ [
73
+ PageIterator<
74
+ Result<
75
+ operations.BadgeListCraftersResponse,
76
+ | errors.ErrorModel
77
+ | SteamSetsError
78
+ | ResponseValidationError
79
+ | ConnectionError
80
+ | RequestAbortedError
81
+ | RequestTimeoutError
82
+ | InvalidRequestError
83
+ | UnexpectedClientError
84
+ | SDKValidationError
85
+ >,
86
+ { cursor: string }
87
+ >,
88
+ APICall,
89
+ ]
90
+ > {
91
+ const parsed = safeParse(
92
+ request,
93
+ (value) =>
94
+ components.BadgeListCraftersRequestBody$outboundSchema.parse(value),
95
+ "Input validation failed",
96
+ );
97
+ if (!parsed.ok) {
98
+ return [haltIterator(parsed), { status: "invalid" }];
99
+ }
100
+ const payload = parsed.value;
101
+ const body = encodeJSON("body", payload, { explode: true });
102
+
103
+ const path = pathToFunc("/v1/badge.listCrafters")();
104
+
105
+ const headers = new Headers(compactMap({
106
+ "Content-Type": "application/json",
107
+ Accept: "application/json",
108
+ }));
109
+
110
+ const secConfig = await extractSecurity(client._options.token);
111
+ const securityInput = secConfig == null ? {} : { token: secConfig };
112
+ const requestSecurity = resolveGlobalSecurity(securityInput);
113
+
114
+ const context = {
115
+ options: client._options,
116
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
117
+ operationID: "badge.listCrafters",
118
+ oAuth2Scopes: null,
119
+
120
+ resolvedSecurity: requestSecurity,
121
+
122
+ securitySource: client._options.token,
123
+ retryConfig: options?.retries
124
+ || client._options.retryConfig
125
+ || {
126
+ strategy: "backoff",
127
+ backoff: {
128
+ initialInterval: 500,
129
+ maxInterval: 5000,
130
+ exponent: 1.5,
131
+ maxElapsedTime: 60000,
132
+ },
133
+ retryConnectionErrors: true,
134
+ }
135
+ || { strategy: "none" },
136
+ retryCodes: options?.retryCodes || ["429", "501", "502", "503", "504"],
137
+ };
138
+
139
+ const requestRes = client._createRequest(context, {
140
+ security: requestSecurity,
141
+ method: "POST",
142
+ baseURL: options?.serverURL,
143
+ path: path,
144
+ headers: headers,
145
+ body: body,
146
+ uaHeader: "x-speakeasy-user-agent",
147
+ userAgent: client._options.userAgent,
148
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 30000,
149
+ }, options);
150
+ if (!requestRes.ok) {
151
+ return [haltIterator(requestRes), { status: "invalid" }];
152
+ }
153
+ const req = requestRes.value;
154
+
155
+ const doResult = await client._do(req, {
156
+ context,
157
+ isErrorStatusCode: (statusCode: number) =>
158
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
159
+ retryConfig: context.retryConfig,
160
+ retryCodes: context.retryCodes,
161
+ });
162
+ if (!doResult.ok) {
163
+ return [haltIterator(doResult), { status: "request-error", request: req }];
164
+ }
165
+ const response = doResult.value;
166
+
167
+ const responseFields = {
168
+ HttpMeta: { Response: response, Request: req },
169
+ };
170
+
171
+ const [result, raw] = await M.match<
172
+ operations.BadgeListCraftersResponse,
173
+ | errors.ErrorModel
174
+ | SteamSetsError
175
+ | ResponseValidationError
176
+ | ConnectionError
177
+ | RequestAbortedError
178
+ | RequestTimeoutError
179
+ | InvalidRequestError
180
+ | UnexpectedClientError
181
+ | SDKValidationError
182
+ >(
183
+ M.json(200, operations.BadgeListCraftersResponse$inboundSchema, {
184
+ key: "BadgeListCraftersResponseBody",
185
+ }),
186
+ M.jsonErr([400, 401, 403, 404, 422], errors.ErrorModel$inboundSchema, {
187
+ ctype: "application/problem+json",
188
+ }),
189
+ M.jsonErr([500, 503], errors.ErrorModel$inboundSchema, {
190
+ ctype: "application/problem+json",
191
+ }),
192
+ M.fail("4XX"),
193
+ M.fail("5XX"),
194
+ )(response, req, { extraFields: responseFields });
195
+ if (!result.ok) {
196
+ return [haltIterator(result), {
197
+ status: "complete",
198
+ request: req,
199
+ response,
200
+ }];
201
+ }
202
+
203
+ const nextFunc = (
204
+ responseData: unknown,
205
+ ): {
206
+ next: Paginator<
207
+ Result<
208
+ operations.BadgeListCraftersResponse,
209
+ | errors.ErrorModel
210
+ | SteamSetsError
211
+ | ResponseValidationError
212
+ | ConnectionError
213
+ | RequestAbortedError
214
+ | RequestTimeoutError
215
+ | InvalidRequestError
216
+ | UnexpectedClientError
217
+ | SDKValidationError
218
+ >
219
+ >;
220
+ "~next"?: { cursor: string };
221
+ } => {
222
+ const nextCursor = (responseData as { nextCursor?: unknown }).nextCursor;
223
+ if (typeof nextCursor !== "string") {
224
+ return { next: () => null };
225
+ }
226
+ if (nextCursor.trim() === "") {
227
+ return { next: () => null };
228
+ }
229
+
230
+ const nextVal = () =>
231
+ badgesListCrafters(
232
+ client,
233
+ {
234
+ ...request,
235
+ cursor: nextCursor,
236
+ },
237
+ options,
238
+ );
239
+
240
+ return { next: nextVal, "~next": { cursor: nextCursor } };
241
+ };
242
+
243
+ const page = { ...result, ...nextFunc(raw) };
244
+ return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
245
+ status: "complete",
246
+ request: req,
247
+ response,
248
+ }];
249
+ }
package/src/lib/config.ts CHANGED
@@ -59,8 +59,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
59
59
  export const SDK_METADATA = {
60
60
  language: "typescript",
61
61
  openapiDocVersion: "1.0.0",
62
- sdkVersion: "0.36.2",
63
- genVersion: "2.915.1",
62
+ sdkVersion: "0.36.3",
63
+ genVersion: "2.916.2",
64
64
  userAgent:
65
- "speakeasy-sdk/typescript 0.36.2 2.915.1 1.0.0 @steamsets/client-ts",
65
+ "speakeasy-sdk/typescript 0.36.3 2.916.2 1.0.0 @steamsets/client-ts",
66
66
  } as const;
@@ -0,0 +1,262 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import * as openEnums from "../../types/enums.js";
8
+ import { OpenEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import { Image, Image$inboundSchema } from "./image.js";
12
+ import {
13
+ LeaderboardCity,
14
+ LeaderboardCity$inboundSchema,
15
+ } from "./leaderboardcity.js";
16
+ import {
17
+ LeaderboardCountry,
18
+ LeaderboardCountry$inboundSchema,
19
+ } from "./leaderboardcountry.js";
20
+ import {
21
+ LeaderboardRegion,
22
+ LeaderboardRegion$inboundSchema,
23
+ } from "./leaderboardregion.js";
24
+ import {
25
+ LeaderboardState,
26
+ LeaderboardState$inboundSchema,
27
+ } from "./leaderboardstate.js";
28
+ import { Role, Role$inboundSchema } from "./role.js";
29
+
30
+ /**
31
+ * The privacy of the account
32
+ */
33
+ export const BadgeListCraftersEntryPrivacy = {
34
+ Public: "public",
35
+ Private: "private",
36
+ FriendsOnly: "friends_only",
37
+ } as const;
38
+ /**
39
+ * The privacy of the account
40
+ */
41
+ export type BadgeListCraftersEntryPrivacy = OpenEnum<
42
+ typeof BadgeListCraftersEntryPrivacy
43
+ >;
44
+
45
+ export type BadgeListCraftersEntry = {
46
+ /**
47
+ * The animated avatar of the account
48
+ */
49
+ animatedAvatar: string;
50
+ /**
51
+ * The cost of an app
52
+ *
53
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
54
+ */
55
+ appCost: number;
56
+ /**
57
+ * The number of apps the account has
58
+ */
59
+ apps: number;
60
+ /**
61
+ * The avatar hash of the account
62
+ */
63
+ avatar: string;
64
+ /**
65
+ * The avatar frame of the account
66
+ */
67
+ avatarFrame: string;
68
+ /**
69
+ * The number of awards the account has
70
+ */
71
+ awardsGiven: number;
72
+ /**
73
+ * The number of awards the account has
74
+ */
75
+ awardsReceived: number;
76
+ /**
77
+ * The background of the account
78
+ */
79
+ background: string;
80
+ /**
81
+ * The number of badges the account has
82
+ */
83
+ badges: number;
84
+ /**
85
+ * The number of bans
86
+ */
87
+ bans: number;
88
+ city?: LeaderboardCity | null | undefined;
89
+ /**
90
+ * When this account completed the badge (UTC)
91
+ */
92
+ completedAt: Date;
93
+ country?: LeaderboardCountry | null | undefined;
94
+ /**
95
+ * The time the account was created
96
+ */
97
+ createdAt: Date;
98
+ /**
99
+ * The total of donations the account has
100
+ */
101
+ donated: number;
102
+ /**
103
+ * The economy ban of the account
104
+ */
105
+ economyBan: string;
106
+ /**
107
+ * The cost of a foil badge
108
+ *
109
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
110
+ */
111
+ foilBadgeCost: number;
112
+ /**
113
+ * The number of foil badges the account has
114
+ */
115
+ foilBadges: number;
116
+ /**
117
+ * The number of friends the account has
118
+ */
119
+ friends: number;
120
+ /**
121
+ * The number of game bans
122
+ */
123
+ gameBans: number;
124
+ /**
125
+ * The images of the account
126
+ */
127
+ images: Array<Image> | null;
128
+ /**
129
+ * The level of the account
130
+ */
131
+ level: number;
132
+ /**
133
+ * The mini background of the account
134
+ */
135
+ miniBackground: string;
136
+ /**
137
+ * The name of the account
138
+ */
139
+ name: string;
140
+ /**
141
+ * The cost of a normal badge
142
+ *
143
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
144
+ */
145
+ normalBadgeCost: number;
146
+ /**
147
+ * The number of normal badges the account has
148
+ */
149
+ normalBadges: number;
150
+ /**
151
+ * The playtime of the account
152
+ */
153
+ playtime: number;
154
+ /**
155
+ * The number of points the account has
156
+ */
157
+ pointsGiven: number;
158
+ /**
159
+ * The number of points the account has
160
+ */
161
+ pointsReceived: number;
162
+ /**
163
+ * The privacy of the account
164
+ */
165
+ privacy: BadgeListCraftersEntryPrivacy;
166
+ region?: LeaderboardRegion | null | undefined;
167
+ /**
168
+ * The roles of the account
169
+ */
170
+ roles: Array<Role> | null;
171
+ state?: LeaderboardState | null | undefined;
172
+ /**
173
+ * The steam id
174
+ */
175
+ steamId: string;
176
+ /**
177
+ * The steam sets score
178
+ */
179
+ steamSetsScore: number;
180
+ /**
181
+ * The vanity of the account
182
+ */
183
+ steamSetsVanity: string;
184
+ /**
185
+ * The vanity of the account
186
+ */
187
+ steamVanity: string;
188
+ /**
189
+ * The number of vac bans
190
+ */
191
+ vacBans: number;
192
+ /**
193
+ * The number of xp the account has
194
+ */
195
+ xp: number;
196
+ };
197
+
198
+ /** @internal */
199
+ export const BadgeListCraftersEntryPrivacy$inboundSchema: z.ZodType<
200
+ BadgeListCraftersEntryPrivacy,
201
+ z.ZodTypeDef,
202
+ unknown
203
+ > = openEnums.inboundSchema(BadgeListCraftersEntryPrivacy);
204
+
205
+ /** @internal */
206
+ export const BadgeListCraftersEntry$inboundSchema: z.ZodType<
207
+ BadgeListCraftersEntry,
208
+ z.ZodTypeDef,
209
+ unknown
210
+ > = z.object({
211
+ animatedAvatar: z.string(),
212
+ appCost: z.number().int(),
213
+ apps: z.number().int(),
214
+ avatar: z.string(),
215
+ avatarFrame: z.string(),
216
+ awardsGiven: z.number().int(),
217
+ awardsReceived: z.number().int(),
218
+ background: z.string(),
219
+ badges: z.number().int(),
220
+ bans: z.number().int(),
221
+ city: z.nullable(LeaderboardCity$inboundSchema).optional(),
222
+ completedAt: z.string().datetime({ offset: true }).transform(v =>
223
+ new Date(v)
224
+ ),
225
+ country: z.nullable(LeaderboardCountry$inboundSchema).optional(),
226
+ createdAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
227
+ donated: z.number().int(),
228
+ economyBan: z.string(),
229
+ foilBadgeCost: z.number().int(),
230
+ foilBadges: z.number().int(),
231
+ friends: z.number().int(),
232
+ gameBans: z.number().int(),
233
+ images: z.nullable(z.array(Image$inboundSchema)),
234
+ level: z.number().int(),
235
+ miniBackground: z.string(),
236
+ name: z.string(),
237
+ normalBadgeCost: z.number().int(),
238
+ normalBadges: z.number().int(),
239
+ playtime: z.number().int(),
240
+ pointsGiven: z.number().int(),
241
+ pointsReceived: z.number().int(),
242
+ privacy: BadgeListCraftersEntryPrivacy$inboundSchema,
243
+ region: z.nullable(LeaderboardRegion$inboundSchema).optional(),
244
+ roles: z.nullable(z.array(Role$inboundSchema)),
245
+ state: z.nullable(LeaderboardState$inboundSchema).optional(),
246
+ steamId: z.string(),
247
+ steamSetsScore: z.number().int(),
248
+ steamSetsVanity: z.string(),
249
+ steamVanity: z.string(),
250
+ vacBans: z.number().int(),
251
+ xp: z.number().int(),
252
+ });
253
+
254
+ export function badgeListCraftersEntryFromJSON(
255
+ jsonString: string,
256
+ ): SafeParseResult<BadgeListCraftersEntry, SDKValidationError> {
257
+ return safeParse(
258
+ jsonString,
259
+ (x) => BadgeListCraftersEntry$inboundSchema.parse(JSON.parse(x)),
260
+ `Failed to parse 'BadgeListCraftersEntry' from JSON`,
261
+ );
262
+ }
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ export type BadgeListCraftersRequestBody = {
8
+ /**
9
+ * Badge id
10
+ */
11
+ badgeId: string;
12
+ /**
13
+ * Opaque pagination cursor from the previous page's nextCursor. Omit for the first page.
14
+ */
15
+ cursor?: string | undefined;
16
+ /**
17
+ * Page size (capped by donator tier)
18
+ */
19
+ limit?: number | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export type BadgeListCraftersRequestBody$Outbound = {
24
+ badgeId: string;
25
+ cursor?: string | undefined;
26
+ limit?: number | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export const BadgeListCraftersRequestBody$outboundSchema: z.ZodType<
31
+ BadgeListCraftersRequestBody$Outbound,
32
+ z.ZodTypeDef,
33
+ BadgeListCraftersRequestBody
34
+ > = z.object({
35
+ badgeId: z.string(),
36
+ cursor: z.string().optional(),
37
+ limit: z.number().int().optional(),
38
+ });
39
+
40
+ export function badgeListCraftersRequestBodyToJSON(
41
+ badgeListCraftersRequestBody: BadgeListCraftersRequestBody,
42
+ ): string {
43
+ return JSON.stringify(
44
+ BadgeListCraftersRequestBody$outboundSchema.parse(
45
+ badgeListCraftersRequestBody,
46
+ ),
47
+ );
48
+ }
@@ -0,0 +1,62 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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
+ BadgeListCraftersEntry,
12
+ BadgeListCraftersEntry$inboundSchema,
13
+ } from "./badgelistcraftersentry.js";
14
+
15
+ export type BadgeListCraftersResponseBody = {
16
+ /**
17
+ * A URL to the JSON Schema for this object.
18
+ */
19
+ dollarSchema?: string | undefined;
20
+ crafters: Array<BadgeListCraftersEntry | null> | null;
21
+ /**
22
+ * Largest page size your donator tier allows
23
+ */
24
+ maxPageSize: number;
25
+ /**
26
+ * Pass as cursor to fetch the next page. Absent when there are no more crafters.
27
+ */
28
+ nextCursor?: string | undefined;
29
+ /**
30
+ * Holders steamsets tracks for this badge
31
+ */
32
+ trackedHolders: number;
33
+ };
34
+
35
+ /** @internal */
36
+ export const BadgeListCraftersResponseBody$inboundSchema: z.ZodType<
37
+ BadgeListCraftersResponseBody,
38
+ z.ZodTypeDef,
39
+ unknown
40
+ > = z.object({
41
+ $schema: z.string().optional(),
42
+ crafters: z.nullable(
43
+ z.array(z.nullable(BadgeListCraftersEntry$inboundSchema)),
44
+ ),
45
+ maxPageSize: z.number().int(),
46
+ nextCursor: z.string().optional(),
47
+ trackedHolders: z.number().int(),
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ "$schema": "dollarSchema",
51
+ });
52
+ });
53
+
54
+ export function badgeListCraftersResponseBodyFromJSON(
55
+ jsonString: string,
56
+ ): SafeParseResult<BadgeListCraftersResponseBody, SDKValidationError> {
57
+ return safeParse(
58
+ jsonString,
59
+ (x) => BadgeListCraftersResponseBody$inboundSchema.parse(JSON.parse(x)),
60
+ `Failed to parse 'BadgeListCraftersResponseBody' from JSON`,
61
+ );
62
+ }
@@ -22,6 +22,7 @@ export type ComparedTuple = {
22
22
  maxLevel: number;
23
23
  scarcity: number;
24
24
  steamId: number;
25
+ trackedHolders: number;
25
26
  };
26
27
 
27
28
  /** @internal */
@@ -43,6 +44,7 @@ export const ComparedTuple$inboundSchema: z.ZodType<
43
44
  maxLevel: z.number().int(),
44
45
  scarcity: z.number().int(),
45
46
  steamId: z.number().int(),
47
+ trackedHolders: z.number().int(),
46
48
  });
47
49
 
48
50
  export function comparedTupleFromJSON(
@@ -34,6 +34,9 @@ export * from "./analyticstrackeventrequestbody.js";
34
34
  export * from "./analyticstrackeventresponsebody.js";
35
35
  export * from "./analyticstrend.js";
36
36
  export * from "./analyticstrendpoint.js";
37
+ export * from "./badgelistcraftersentry.js";
38
+ export * from "./badgelistcraftersrequestbody.js";
39
+ export * from "./badgelistcraftersresponsebody.js";
37
40
  export * from "./badgesuggesttags.js";
38
41
  export * from "./badgevaluefilter.js";
39
42
  export * from "./bestleaderboardrank.js";
@@ -25,6 +25,7 @@ export const ResourceResource = {
25
25
  AccountQueues: "account_queues",
26
26
  ShortLinkDomain: "short_link_domain",
27
27
  MaxFindOwners: "max_find_owners",
28
+ MaxBadgeCrafters: "max_badge_crafters",
28
29
  } as const;
29
30
  export type ResourceResource = OpenEnum<typeof ResourceResource>;
30
31
 
@@ -51,6 +51,7 @@ export type V1AppBadge = {
51
51
  price: number;
52
52
  scarcity: number;
53
53
  steamId: number;
54
+ trackedHolders: number;
54
55
  };
55
56
 
56
57
  /** @internal */
@@ -84,6 +85,7 @@ export const V1AppBadge$inboundSchema: z.ZodType<
84
85
  price: z.number().int(),
85
86
  scarcity: z.number().int(),
86
87
  steamId: z.number().int(),
88
+ trackedHolders: z.number().int(),
87
89
  });
88
90
 
89
91
  export function v1AppBadgeFromJSON(
@@ -74,6 +74,10 @@ export type V1LeaderboardBadge = {
74
74
  * The steam id
75
75
  */
76
76
  steamId: number;
77
+ /**
78
+ * The number of holders steamsets tracks for the badge
79
+ */
80
+ trackedHolders: number | null;
77
81
  /**
78
82
  * The xp of the badge
79
83
  */
@@ -106,6 +110,7 @@ export const V1LeaderboardBadge$inboundSchema: z.ZodType<
106
110
  price: z.number().int(),
107
111
  scarcity: z.nullable(z.number().int()),
108
112
  steamId: z.number().int(),
113
+ trackedHolders: z.nullable(z.number().int()),
109
114
  xp: z.number().int(),
110
115
  });
111
116