@steamsets/client-ts 0.29.1 → 0.31.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 (152) hide show
  1. package/README.md +14 -14
  2. package/_speakeasy/.github/action-inputs-config.json +53 -0
  3. package/_speakeasy/.github/action-security-config.json +88 -0
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/accountAccountListInventorySets.d.ts +18 -0
  6. package/funcs/accountAccountListInventorySets.d.ts.map +1 -0
  7. package/funcs/{badgesListPrices.js → accountAccountListInventorySets.js} +18 -24
  8. package/funcs/accountAccountListInventorySets.js.map +1 -0
  9. package/funcs/accountAccountRefreshInventory.d.ts +18 -0
  10. package/funcs/accountAccountRefreshInventory.d.ts.map +1 -0
  11. package/funcs/accountAccountRefreshInventory.js +125 -0
  12. package/funcs/accountAccountRefreshInventory.js.map +1 -0
  13. package/jsr.json +1 -1
  14. package/lib/config.d.ts +3 -3
  15. package/lib/config.js +3 -3
  16. package/lib/config.js.map +1 -1
  17. package/lib/encodings.d.ts +1 -0
  18. package/lib/encodings.d.ts.map +1 -1
  19. package/lib/encodings.js +12 -1
  20. package/lib/encodings.js.map +1 -1
  21. package/models/components/card.d.ts +17 -0
  22. package/models/components/card.d.ts.map +1 -0
  23. package/models/components/{v1badgelevel.js → card.js} +8 -8
  24. package/models/components/card.js.map +1 -0
  25. package/models/components/index.d.ts +4 -9
  26. package/models/components/index.d.ts.map +1 -1
  27. package/models/components/index.js +4 -9
  28. package/models/components/index.js.map +1 -1
  29. package/models/components/inventoryset.d.ts +30 -0
  30. package/models/components/inventoryset.d.ts.map +1 -0
  31. package/models/components/{v1badgetypecount.js → inventoryset.js} +12 -9
  32. package/models/components/inventoryset.js.map +1 -0
  33. package/models/components/resource.d.ts +1 -0
  34. package/models/components/resource.d.ts.map +1 -1
  35. package/models/components/resource.js +1 -0
  36. package/models/components/resource.js.map +1 -1
  37. package/models/components/v1accountlistinventorysetsresponsebody.d.ts +26 -0
  38. package/models/components/v1accountlistinventorysetsresponsebody.d.ts.map +1 -0
  39. package/models/components/{v1badgelistbadgepricesresponsebody.js → v1accountlistinventorysetsresponsebody.js} +10 -13
  40. package/models/components/v1accountlistinventorysetsresponsebody.js.map +1 -0
  41. package/models/components/v1accountrefreshinventoryresponsebody.d.ts +17 -0
  42. package/models/components/v1accountrefreshinventoryresponsebody.d.ts.map +1 -0
  43. package/models/components/{errormodel.js → v1accountrefreshinventoryresponsebody.js} +7 -13
  44. package/models/components/v1accountrefreshinventoryresponsebody.js.map +1 -0
  45. package/models/components/v1leaderboardgetaccountleaderboardresponsebody.d.ts +1 -1
  46. package/models/components/v1leaderboardgetaccountleaderboardresponsebody.d.ts.map +1 -1
  47. package/models/components/v1leaderboardgetgroupleaderboardresponsebody.d.ts +1 -1
  48. package/models/components/v1leaderboardgetgroupleaderboardresponsebody.d.ts.map +1 -1
  49. package/models/components/v1leaderboardpreviewaccountrankresponsebody.d.ts +1 -1
  50. package/models/components/v1leaderboardpreviewaccountrankresponsebody.d.ts.map +1 -1
  51. package/models/operations/accountlistinventorysets.d.ts +15 -0
  52. package/models/operations/accountlistinventorysets.d.ts.map +1 -0
  53. package/models/operations/{badgelistbadgeprices.js → accountlistinventorysets.js} +9 -11
  54. package/models/operations/accountlistinventorysets.js.map +1 -0
  55. package/models/operations/accountrefreshinventory.d.ts +15 -0
  56. package/models/operations/accountrefreshinventory.d.ts.map +1 -0
  57. package/models/{components/v1badgeapp.js → operations/accountrefreshinventory.js} +16 -12
  58. package/models/operations/accountrefreshinventory.js.map +1 -0
  59. package/models/operations/index.d.ts +2 -1
  60. package/models/operations/index.d.ts.map +1 -1
  61. package/models/operations/index.js +2 -1
  62. package/models/operations/index.js.map +1 -1
  63. package/package.json +1 -1
  64. package/sdk/account.d.ts +14 -0
  65. package/sdk/account.d.ts.map +1 -1
  66. package/sdk/account.js +20 -0
  67. package/sdk/account.js.map +1 -1
  68. package/sdk/badges.d.ts +0 -11
  69. package/sdk/badges.d.ts.map +1 -1
  70. package/sdk/badges.js +1 -13
  71. package/sdk/badges.js.map +1 -1
  72. package/src/funcs/{badgesListPrices.ts → accountAccountListInventorySets.ts} +24 -29
  73. package/src/funcs/accountAccountRefreshInventory.ts +169 -0
  74. package/src/lib/config.ts +3 -3
  75. package/src/lib/encodings.ts +17 -3
  76. package/src/models/components/card.ts +36 -0
  77. package/src/models/components/index.ts +4 -9
  78. package/src/models/components/inventoryset.ts +55 -0
  79. package/src/models/components/resource.ts +1 -0
  80. package/src/models/components/v1accountlistinventorysetsresponsebody.ts +56 -0
  81. package/src/models/components/v1accountrefreshinventoryresponsebody.ts +45 -0
  82. package/src/models/components/v1leaderboardgetaccountleaderboardresponsebody.ts +1 -1
  83. package/src/models/components/v1leaderboardgetgroupleaderboardresponsebody.ts +1 -1
  84. package/src/models/components/v1leaderboardpreviewaccountrankresponsebody.ts +1 -1
  85. package/src/models/operations/accountlistinventorysets.ts +47 -0
  86. package/src/models/operations/accountrefreshinventory.ts +47 -0
  87. package/src/models/operations/index.ts +2 -1
  88. package/src/sdk/account.ts +32 -0
  89. package/src/sdk/badges.ts +0 -23
  90. package/src/types/enums.ts +1 -21
  91. package/src/types/index.ts +2 -1
  92. package/src/types/unrecognized.ts +35 -0
  93. package/tsconfig.json +1 -2
  94. package/types/enums.d.ts +1 -8
  95. package/types/enums.d.ts.map +1 -1
  96. package/types/enums.js +3 -21
  97. package/types/enums.js.map +1 -1
  98. package/types/index.d.ts +2 -1
  99. package/types/index.d.ts.map +1 -1
  100. package/types/index.js +15 -0
  101. package/types/index.js.map +1 -1
  102. package/types/unrecognized.d.ts +16 -0
  103. package/types/unrecognized.d.ts.map +1 -0
  104. package/types/unrecognized.js +34 -0
  105. package/types/unrecognized.js.map +1 -0
  106. package/funcs/badgesListPrices.d.ts +0 -24
  107. package/funcs/badgesListPrices.d.ts.map +0 -1
  108. package/funcs/badgesListPrices.js.map +0 -1
  109. package/models/components/errormodel.d.ts +0 -38
  110. package/models/components/errormodel.d.ts.map +0 -1
  111. package/models/components/errormodel.js.map +0 -1
  112. package/models/components/v1badgeapp.d.ts +0 -15
  113. package/models/components/v1badgeapp.d.ts.map +0 -1
  114. package/models/components/v1badgeapp.js.map +0 -1
  115. package/models/components/v1badgelevel.d.ts +0 -12
  116. package/models/components/v1badgelevel.d.ts.map +0 -1
  117. package/models/components/v1badgelevel.js.map +0 -1
  118. package/models/components/v1badgelistbadgepricesrequestbody.d.ts +0 -8
  119. package/models/components/v1badgelistbadgepricesrequestbody.d.ts.map +0 -1
  120. package/models/components/v1badgelistbadgepricesrequestbody.js +0 -47
  121. package/models/components/v1badgelistbadgepricesrequestbody.js.map +0 -1
  122. package/models/components/v1badgelistbadgepricesresponsebody.d.ts +0 -31
  123. package/models/components/v1badgelistbadgepricesresponsebody.d.ts.map +0 -1
  124. package/models/components/v1badgelistbadgepricesresponsebody.js.map +0 -1
  125. package/models/components/v1badgeset.d.ts +0 -27
  126. package/models/components/v1badgeset.d.ts.map +0 -1
  127. package/models/components/v1badgeset.js +0 -65
  128. package/models/components/v1badgeset.js.map +0 -1
  129. package/models/components/v1badgesetcount.d.ts +0 -11
  130. package/models/components/v1badgesetcount.d.ts.map +0 -1
  131. package/models/components/v1badgesetcount.js +0 -51
  132. package/models/components/v1badgesetcount.js.map +0 -1
  133. package/models/components/v1badgesetcounts.d.ts +0 -13
  134. package/models/components/v1badgesetcounts.d.ts.map +0 -1
  135. package/models/components/v1badgesetcounts.js +0 -53
  136. package/models/components/v1badgesetcounts.js.map +0 -1
  137. package/models/components/v1badgetypecount.d.ts +0 -12
  138. package/models/components/v1badgetypecount.d.ts.map +0 -1
  139. package/models/components/v1badgetypecount.js.map +0 -1
  140. package/models/operations/badgelistbadgeprices.d.ts +0 -19
  141. package/models/operations/badgelistbadgeprices.d.ts.map +0 -1
  142. package/models/operations/badgelistbadgeprices.js.map +0 -1
  143. package/src/models/components/errormodel.ts +0 -70
  144. package/src/models/components/v1badgeapp.ts +0 -41
  145. package/src/models/components/v1badgelevel.ts +0 -35
  146. package/src/models/components/v1badgelistbadgepricesrequestbody.ts +0 -27
  147. package/src/models/components/v1badgelistbadgepricesresponsebody.ts +0 -63
  148. package/src/models/components/v1badgeset.ts +0 -62
  149. package/src/models/components/v1badgesetcount.ts +0 -33
  150. package/src/models/components/v1badgesetcounts.ts +0 -39
  151. package/src/models/components/v1badgetypecount.ts +0 -35
  152. package/src/models/operations/badgelistbadgeprices.ts +0 -52
@@ -0,0 +1,169 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { RequestOptions } from "../lib/sdks.js";
9
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
+ import { pathToFunc } from "../lib/url.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import * as errors from "../models/errors/index.js";
19
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import { SteamSetsError } from "../models/errors/steamsetserror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { APICall, APIPromise } from "../types/async.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Refresh inventory
28
+ *
29
+ * @remarks
30
+ * Trigger a refresh of the authenticated user's Steam inventory. Rate limited based on account tier.
31
+ */
32
+ export function accountAccountRefreshInventory(
33
+ client: SteamSetsCore,
34
+ options?: RequestOptions,
35
+ ): APIPromise<
36
+ Result<
37
+ operations.AccountRefreshInventoryResponse,
38
+ | errors.ErrorModel
39
+ | SteamSetsError
40
+ | ResponseValidationError
41
+ | ConnectionError
42
+ | RequestAbortedError
43
+ | RequestTimeoutError
44
+ | InvalidRequestError
45
+ | UnexpectedClientError
46
+ | SDKValidationError
47
+ >
48
+ > {
49
+ return new APIPromise($do(
50
+ client,
51
+ options,
52
+ ));
53
+ }
54
+
55
+ async function $do(
56
+ client: SteamSetsCore,
57
+ options?: RequestOptions,
58
+ ): Promise<
59
+ [
60
+ Result<
61
+ operations.AccountRefreshInventoryResponse,
62
+ | errors.ErrorModel
63
+ | SteamSetsError
64
+ | ResponseValidationError
65
+ | ConnectionError
66
+ | RequestAbortedError
67
+ | RequestTimeoutError
68
+ | InvalidRequestError
69
+ | UnexpectedClientError
70
+ | SDKValidationError
71
+ >,
72
+ APICall,
73
+ ]
74
+ > {
75
+ const path = pathToFunc("/v1/account.refreshInventory")();
76
+
77
+ const headers = new Headers(compactMap({
78
+ Accept: "application/json",
79
+ }));
80
+
81
+ const secConfig = await extractSecurity(client._options.token);
82
+ const securityInput = secConfig == null ? {} : { token: secConfig };
83
+ const requestSecurity = resolveGlobalSecurity(securityInput);
84
+
85
+ const context = {
86
+ options: client._options,
87
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
88
+ operationID: "account.refreshInventory",
89
+ oAuth2Scopes: null,
90
+
91
+ resolvedSecurity: requestSecurity,
92
+
93
+ securitySource: client._options.token,
94
+ retryConfig: options?.retries
95
+ || client._options.retryConfig
96
+ || {
97
+ strategy: "backoff",
98
+ backoff: {
99
+ initialInterval: 500,
100
+ maxInterval: 5000,
101
+ exponent: 1.5,
102
+ maxElapsedTime: 60000,
103
+ },
104
+ retryConnectionErrors: true,
105
+ }
106
+ || { strategy: "none" },
107
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
108
+ };
109
+
110
+ const requestRes = client._createRequest(context, {
111
+ security: requestSecurity,
112
+ method: "POST",
113
+ baseURL: options?.serverURL,
114
+ path: path,
115
+ headers: headers,
116
+ uaHeader: "x-speakeasy-user-agent",
117
+ userAgent: client._options.userAgent,
118
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
119
+ }, options);
120
+ if (!requestRes.ok) {
121
+ return [requestRes, { status: "invalid" }];
122
+ }
123
+ const req = requestRes.value;
124
+
125
+ const doResult = await client._do(req, {
126
+ context,
127
+ errorCodes: ["400", "401", "404", "429", "4XX", "500", "5XX"],
128
+ retryConfig: context.retryConfig,
129
+ retryCodes: context.retryCodes,
130
+ });
131
+ if (!doResult.ok) {
132
+ return [doResult, { status: "request-error", request: req }];
133
+ }
134
+ const response = doResult.value;
135
+
136
+ const responseFields = {
137
+ HttpMeta: { Response: response, Request: req },
138
+ };
139
+
140
+ const [result] = await M.match<
141
+ operations.AccountRefreshInventoryResponse,
142
+ | errors.ErrorModel
143
+ | SteamSetsError
144
+ | ResponseValidationError
145
+ | ConnectionError
146
+ | RequestAbortedError
147
+ | RequestTimeoutError
148
+ | InvalidRequestError
149
+ | UnexpectedClientError
150
+ | SDKValidationError
151
+ >(
152
+ M.json(200, operations.AccountRefreshInventoryResponse$inboundSchema, {
153
+ key: "V1AccountRefreshInventoryResponseBody",
154
+ }),
155
+ M.jsonErr([400, 401, 404, 429], errors.ErrorModel$inboundSchema, {
156
+ ctype: "application/problem+json",
157
+ }),
158
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
159
+ ctype: "application/problem+json",
160
+ }),
161
+ M.fail("4XX"),
162
+ M.fail("5XX"),
163
+ )(response, req, { extraFields: responseFields });
164
+ if (!result.ok) {
165
+ return [result, { status: "complete", request: req, response }];
166
+ }
167
+
168
+ return [result, { status: "complete", request: req, response }];
169
+ }
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.29.1",
63
- genVersion: "2.755.0",
62
+ sdkVersion: "0.31.0",
63
+ genVersion: "2.788.15",
64
64
  userAgent:
65
- "speakeasy-sdk/typescript 0.29.1 2.755.0 1.0.0 @steamsets/client-ts",
65
+ "speakeasy-sdk/typescript 0.31.0 2.788.15 1.0.0 @steamsets/client-ts",
66
66
  } as const;
@@ -102,8 +102,9 @@ export function encodeLabel(
102
102
  });
103
103
  encValue = mapped?.join("").slice(1);
104
104
  } else {
105
- const k =
106
- options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : "";
105
+ const k = options?.explode && isPlainObject(value)
106
+ ? `${encodeString(pk)}=`
107
+ : "";
107
108
  encValue = `${k}${encodeValue(pv)}`;
108
109
  }
109
110
 
@@ -426,6 +427,7 @@ export function queryJoin(...args: (string | undefined)[]): string {
426
427
  type QueryEncoderOptions = {
427
428
  explode?: boolean;
428
429
  charEncoding?: "percent" | "none";
430
+ allowEmptyValue?: string[];
429
431
  };
430
432
 
431
433
  type QueryEncoder = (
@@ -440,7 +442,7 @@ type BulkQueryEncoder = (
440
442
  ) => string;
441
443
 
442
444
  export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
443
- const bulkEncode = function (
445
+ const bulkEncode = function(
444
446
  values: Record<string, unknown>,
445
447
  options?: QueryEncoderOptions,
446
448
  ): string {
@@ -450,7 +452,19 @@ export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
450
452
  charEncoding: options?.charEncoding ?? "percent",
451
453
  };
452
454
 
455
+ const allowEmptySet = new Set(options?.allowEmptyValue ?? []);
456
+
453
457
  const encoded = Object.entries(values).map(([key, value]) => {
458
+ if (allowEmptySet.has(key)) {
459
+ if (
460
+ value === undefined
461
+ || value === null
462
+ || value === ""
463
+ || (Array.isArray(value) && value.length === 0)
464
+ ) {
465
+ return `${encodeURIComponent(key)}=`;
466
+ }
467
+ }
454
468
  return f(key, value, opts);
455
469
  });
456
470
  return queryJoin(...encoded);
@@ -0,0 +1,36 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type Card = {
11
+ /**
12
+ * Owned amount
13
+ */
14
+ amount: number;
15
+ /**
16
+ * Card name
17
+ */
18
+ name: string;
19
+ };
20
+
21
+ /** @internal */
22
+ export const Card$inboundSchema: z.ZodType<Card, z.ZodTypeDef, unknown> = z
23
+ .object({
24
+ amount: z.number().int(),
25
+ name: z.string(),
26
+ });
27
+
28
+ export function cardFromJSON(
29
+ jsonString: string,
30
+ ): SafeParseResult<Card, SDKValidationError> {
31
+ return safeParse(
32
+ jsonString,
33
+ (x) => Card$inboundSchema.parse(JSON.parse(x)),
34
+ `Failed to parse 'Card' from JSON`,
35
+ );
36
+ }
@@ -9,6 +9,7 @@ export * from "./badge.js";
9
9
  export * from "./badgesuggesttags.js";
10
10
  export * from "./badgevaluefilter.js";
11
11
  export * from "./bestleaderboardrank.js";
12
+ export * from "./card.js";
12
13
  export * from "./chosenrole.js";
13
14
  export * from "./city.js";
14
15
  export * from "./colortag.js";
@@ -23,10 +24,10 @@ export * from "./developerappanalyticsoutcome.js";
23
24
  export * from "./developerappanalyticstimeseries.js";
24
25
  export * from "./developerappanalyticstimeseriespoint.js";
25
26
  export * from "./errordetail.js";
26
- export * from "./errormodel.js";
27
27
  export * from "./httpmetadata.js";
28
28
  export * from "./idsearch.js";
29
29
  export * from "./image.js";
30
+ export * from "./inventoryset.js";
30
31
  export * from "./leaderboardaccount.js";
31
32
  export * from "./leaderboardcity.js";
32
33
  export * from "./leaderboardcountry.js";
@@ -82,12 +83,14 @@ export * from "./v1accountlistbadgesrequestbody.js";
82
83
  export * from "./v1accountlistbadgesresponsebody.js";
83
84
  export * from "./v1accountlistfriendsresponsebody.js";
84
85
  export * from "./v1accountlistimagesresponsebody.js";
86
+ export * from "./v1accountlistinventorysetsresponsebody.js";
85
87
  export * from "./v1accountlistleaderboardhistoryresponsebody.js";
86
88
  export * from "./v1accountloginresponsebody.js";
87
89
  export * from "./v1accountplaytimedatapoint.js";
88
90
  export * from "./v1accountqueueupdaterequestbody.js";
89
91
  export * from "./v1accountreconnectrequestbody.js";
90
92
  export * from "./v1accountreconnectresponsebody.js";
93
+ export * from "./v1accountrefreshinventoryresponsebody.js";
91
94
  export * from "./v1accountrefreshsessionbody.js";
92
95
  export * from "./v1accountrefreshsessionrequestbody.js";
93
96
  export * from "./v1accountsubscribeemailrequestbody.js";
@@ -110,21 +113,13 @@ export * from "./v1appfilters.js";
110
113
  export * from "./v1applistbadgesrequestbody.js";
111
114
  export * from "./v1applistbadgesresponsebody.js";
112
115
  export * from "./v1apporder.js";
113
- export * from "./v1badgeapp.js";
114
116
  export * from "./v1badgefilters.js";
115
- export * from "./v1badgelevel.js";
116
- export * from "./v1badgelistbadgepricesrequestbody.js";
117
- export * from "./v1badgelistbadgepricesresponsebody.js";
118
117
  export * from "./v1badgelisttagsresponsebody.js";
119
118
  export * from "./v1badgeorder.js";
120
119
  export * from "./v1badgesearchbadgesresponsebody.js";
121
- export * from "./v1badgeset.js";
122
- export * from "./v1badgesetcount.js";
123
- export * from "./v1badgesetcounts.js";
124
120
  export * from "./v1badgesuggesttagsrequestbody.js";
125
121
  export * from "./v1badgetagbadgerequestbody.js";
126
122
  export * from "./v1badgetagbadgeresponsebody.js";
127
- export * from "./v1badgetypecount.js";
128
123
  export * from "./v1groupleaderboardgroup.js";
129
124
  export * from "./v1leaderboardappinfo.js";
130
125
  export * from "./v1leaderboardbadge.js";
@@ -0,0 +1,55 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { Card, Card$inboundSchema } from "./card.js";
10
+
11
+ export type InventorySet = {
12
+ /**
13
+ * The app id
14
+ */
15
+ appId: number;
16
+ /**
17
+ * Foil cards with owned amounts
18
+ */
19
+ foil: Array<Card> | null;
20
+ /**
21
+ * Number of complete foil sets
22
+ */
23
+ foilSets: number;
24
+ /**
25
+ * Normal cards with owned amounts
26
+ */
27
+ normal: Array<Card> | null;
28
+ /**
29
+ * Number of complete normal sets
30
+ */
31
+ normalSets: number;
32
+ };
33
+
34
+ /** @internal */
35
+ export const InventorySet$inboundSchema: z.ZodType<
36
+ InventorySet,
37
+ z.ZodTypeDef,
38
+ unknown
39
+ > = z.object({
40
+ appId: z.number().int(),
41
+ foil: z.nullable(z.array(Card$inboundSchema)),
42
+ foilSets: z.number().int(),
43
+ normal: z.nullable(z.array(Card$inboundSchema)),
44
+ normalSets: z.number().int(),
45
+ });
46
+
47
+ export function inventorySetFromJSON(
48
+ jsonString: string,
49
+ ): SafeParseResult<InventorySet, SDKValidationError> {
50
+ return safeParse(
51
+ jsonString,
52
+ (x) => InventorySet$inboundSchema.parse(JSON.parse(x)),
53
+ `Failed to parse 'InventorySet' from JSON`,
54
+ );
55
+ }
@@ -17,6 +17,7 @@ export const ResourceResource = {
17
17
  MaxLeaderboardEntries: "max_leaderboard_entries",
18
18
  MiniBackground: "mini_background",
19
19
  AccountRefreshRate: "account_refresh_rate",
20
+ InventoryRefreshRate: "inventory_refresh_rate",
20
21
  SocialLinks: "social_links",
21
22
  Vanity: "vanity",
22
23
  DeveloperApps: "developer_apps",
@@ -0,0 +1,56 @@
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 { InventorySet, InventorySet$inboundSchema } from "./inventoryset.js";
11
+
12
+ export type V1AccountListInventorySetsResponseBody = {
13
+ /**
14
+ * A URL to the JSON Schema for this object.
15
+ */
16
+ dollarSchema?: string | undefined;
17
+ /**
18
+ * When inventory was last updated (unix millis)
19
+ */
20
+ inventoryUpdatedAt?: number | undefined;
21
+ /**
22
+ * When next refresh is allowed (unix seconds)
23
+ */
24
+ nextRefreshAt?: number | undefined;
25
+ /**
26
+ * Inventory sets with ownership info
27
+ */
28
+ sets: Array<InventorySet> | null;
29
+ };
30
+
31
+ /** @internal */
32
+ export const V1AccountListInventorySetsResponseBody$inboundSchema: z.ZodType<
33
+ V1AccountListInventorySetsResponseBody,
34
+ z.ZodTypeDef,
35
+ unknown
36
+ > = z.object({
37
+ $schema: z.string().optional(),
38
+ inventoryUpdatedAt: z.number().int().optional(),
39
+ nextRefreshAt: z.number().int().optional(),
40
+ sets: z.nullable(z.array(InventorySet$inboundSchema)),
41
+ }).transform((v) => {
42
+ return remap$(v, {
43
+ "$schema": "dollarSchema",
44
+ });
45
+ });
46
+
47
+ export function v1AccountListInventorySetsResponseBodyFromJSON(
48
+ jsonString: string,
49
+ ): SafeParseResult<V1AccountListInventorySetsResponseBody, SDKValidationError> {
50
+ return safeParse(
51
+ jsonString,
52
+ (x) =>
53
+ V1AccountListInventorySetsResponseBody$inboundSchema.parse(JSON.parse(x)),
54
+ `Failed to parse 'V1AccountListInventorySetsResponseBody' from JSON`,
55
+ );
56
+ }
@@ -0,0 +1,45 @@
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
+
11
+ export type V1AccountRefreshInventoryResponseBody = {
12
+ /**
13
+ * A URL to the JSON Schema for this object.
14
+ */
15
+ dollarSchema?: string | undefined;
16
+ /**
17
+ * Unix timestamp (seconds) when next refresh is allowed
18
+ */
19
+ nextRefreshAt: number;
20
+ };
21
+
22
+ /** @internal */
23
+ export const V1AccountRefreshInventoryResponseBody$inboundSchema: z.ZodType<
24
+ V1AccountRefreshInventoryResponseBody,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ $schema: z.string().optional(),
29
+ nextRefreshAt: z.number().int(),
30
+ }).transform((v) => {
31
+ return remap$(v, {
32
+ "$schema": "dollarSchema",
33
+ });
34
+ });
35
+
36
+ export function v1AccountRefreshInventoryResponseBodyFromJSON(
37
+ jsonString: string,
38
+ ): SafeParseResult<V1AccountRefreshInventoryResponseBody, SDKValidationError> {
39
+ return safeParse(
40
+ jsonString,
41
+ (x) =>
42
+ V1AccountRefreshInventoryResponseBody$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'V1AccountRefreshInventoryResponseBody' from JSON`,
44
+ );
45
+ }
@@ -41,7 +41,7 @@ export type V1LeaderboardGetAccountLeaderboardResponseBody = {
41
41
  /**
42
42
  * The number of accounts that are ranked in the leaderboard
43
43
  */
44
- rankedOutOf?: number | undefined;
44
+ rankedOutOf: number;
45
45
  };
46
46
 
47
47
  /** @internal */
@@ -21,7 +21,7 @@ export type V1LeaderboardGetGroupLeaderboardResponseBody = {
21
21
  /**
22
22
  * The number of accounts that are ranked in the leaderboard
23
23
  */
24
- rankedOutOf?: number | undefined;
24
+ rankedOutOf: number;
25
25
  steamSetsGroup: V1GroupLeaderboardGroup;
26
26
  };
27
27
 
@@ -23,7 +23,7 @@ export type V1LeaderboardPreviewAccountRankResponseBody = {
23
23
  /**
24
24
  * The number of accounts that are ranked in the leaderboard
25
25
  */
26
- rankedOutOf?: number | undefined;
26
+ rankedOutOf: number;
27
27
  };
28
28
 
29
29
  /** @internal */
@@ -0,0 +1,47 @@
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 * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type AccountListInventorySetsResponse = {
13
+ httpMeta: components.HTTPMetadata;
14
+ /**
15
+ * OK
16
+ */
17
+ v1AccountListInventorySetsResponseBody?:
18
+ | components.V1AccountListInventorySetsResponseBody
19
+ | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const AccountListInventorySetsResponse$inboundSchema: z.ZodType<
24
+ AccountListInventorySetsResponse,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ HttpMeta: components.HTTPMetadata$inboundSchema,
29
+ V1AccountListInventorySetsResponseBody: components
30
+ .V1AccountListInventorySetsResponseBody$inboundSchema.optional(),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "HttpMeta": "httpMeta",
34
+ "V1AccountListInventorySetsResponseBody":
35
+ "v1AccountListInventorySetsResponseBody",
36
+ });
37
+ });
38
+
39
+ export function accountListInventorySetsResponseFromJSON(
40
+ jsonString: string,
41
+ ): SafeParseResult<AccountListInventorySetsResponse, SDKValidationError> {
42
+ return safeParse(
43
+ jsonString,
44
+ (x) => AccountListInventorySetsResponse$inboundSchema.parse(JSON.parse(x)),
45
+ `Failed to parse 'AccountListInventorySetsResponse' from JSON`,
46
+ );
47
+ }
@@ -0,0 +1,47 @@
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 * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type AccountRefreshInventoryResponse = {
13
+ httpMeta: components.HTTPMetadata;
14
+ /**
15
+ * OK
16
+ */
17
+ v1AccountRefreshInventoryResponseBody?:
18
+ | components.V1AccountRefreshInventoryResponseBody
19
+ | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const AccountRefreshInventoryResponse$inboundSchema: z.ZodType<
24
+ AccountRefreshInventoryResponse,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ HttpMeta: components.HTTPMetadata$inboundSchema,
29
+ V1AccountRefreshInventoryResponseBody: components
30
+ .V1AccountRefreshInventoryResponseBody$inboundSchema.optional(),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "HttpMeta": "httpMeta",
34
+ "V1AccountRefreshInventoryResponseBody":
35
+ "v1AccountRefreshInventoryResponseBody",
36
+ });
37
+ });
38
+
39
+ export function accountRefreshInventoryResponseFromJSON(
40
+ jsonString: string,
41
+ ): SafeParseResult<AccountRefreshInventoryResponse, SDKValidationError> {
42
+ return safeParse(
43
+ jsonString,
44
+ (x) => AccountRefreshInventoryResponse$inboundSchema.parse(JSON.parse(x)),
45
+ `Failed to parse 'AccountRefreshInventoryResponse' from JSON`,
46
+ );
47
+ }
@@ -20,12 +20,14 @@ export * from "./accountlistbadgebookmarks.js";
20
20
  export * from "./accountlistbadges.js";
21
21
  export * from "./accountlistfriends.js";
22
22
  export * from "./accountlistimages.js";
23
+ export * from "./accountlistinventorysets.js";
23
24
  export * from "./accountlistleaderboardhistory.js";
24
25
  export * from "./accountlistownedbadges.js";
25
26
  export * from "./accountlogin.js";
26
27
  export * from "./accountlogout.js";
27
28
  export * from "./accountqueueupdate.js";
28
29
  export * from "./accountreconnectconnection.js";
30
+ export * from "./accountrefreshinventory.js";
29
31
  export * from "./accountrefreshsession.js";
30
32
  export * from "./accountsendemailverification.js";
31
33
  export * from "./accountsubscribeemail.js";
@@ -39,7 +41,6 @@ export * from "./accountuploadimages.js";
39
41
  export * from "./accountverifyconnection.js";
40
42
  export * from "./accountverifyemail.js";
41
43
  export * from "./applistbadges.js";
42
- export * from "./badgelistbadgeprices.js";
43
44
  export * from "./badgelisttags.js";
44
45
  export * from "./badgesearchbadges.js";
45
46
  export * from "./badgesuggesttags.js";