@steamsets/client-ts 0.30.1 → 0.31.1

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 (207) hide show
  1. package/README.md +16 -5
  2. package/examples/package-lock.json +1 -1
  3. package/funcs/accountAccountListInventorySets.d.ts +18 -0
  4. package/funcs/accountAccountListInventorySets.d.ts.map +1 -0
  5. package/funcs/{badgesListPrices.js → accountAccountListInventorySets.js} +18 -24
  6. package/funcs/accountAccountListInventorySets.js.map +1 -0
  7. package/funcs/accountAccountRefreshInventory.d.ts +18 -0
  8. package/funcs/accountAccountRefreshInventory.d.ts.map +1 -0
  9. package/funcs/accountAccountRefreshInventory.js +125 -0
  10. package/funcs/accountAccountRefreshInventory.js.map +1 -0
  11. package/funcs/adminGetAccount.d.ts +16 -0
  12. package/funcs/adminGetAccount.d.ts.map +1 -0
  13. package/funcs/adminGetAccount.js +133 -0
  14. package/funcs/adminGetAccount.js.map +1 -0
  15. package/funcs/adminRemoveVanity.d.ts +16 -0
  16. package/funcs/adminRemoveVanity.d.ts.map +1 -0
  17. package/funcs/adminRemoveVanity.js +133 -0
  18. package/funcs/adminRemoveVanity.js.map +1 -0
  19. package/funcs/adminUpdateResources.d.ts +16 -0
  20. package/funcs/adminUpdateResources.d.ts.map +1 -0
  21. package/funcs/adminUpdateResources.js +131 -0
  22. package/funcs/adminUpdateResources.js.map +1 -0
  23. package/funcs/adminUpdateRoles.d.ts +16 -0
  24. package/funcs/adminUpdateRoles.d.ts.map +1 -0
  25. package/funcs/adminUpdateRoles.js +131 -0
  26. package/funcs/adminUpdateRoles.js.map +1 -0
  27. package/jsr.json +1 -1
  28. package/lib/config.d.ts +3 -3
  29. package/lib/config.js +3 -3
  30. package/models/components/card.d.ts +17 -0
  31. package/models/components/card.d.ts.map +1 -0
  32. package/models/components/{v1badgelevel.js → card.js} +8 -8
  33. package/models/components/card.js.map +1 -0
  34. package/models/components/historyvalue.d.ts +17 -0
  35. package/models/components/historyvalue.d.ts.map +1 -0
  36. package/models/components/{v1badgesetcount.js → historyvalue.js} +8 -8
  37. package/models/components/historyvalue.js.map +1 -0
  38. package/models/components/index.d.ts +12 -9
  39. package/models/components/index.d.ts.map +1 -1
  40. package/models/components/index.js +12 -9
  41. package/models/components/index.js.map +1 -1
  42. package/models/components/inventoryset.d.ts +30 -0
  43. package/models/components/inventoryset.d.ts.map +1 -0
  44. package/models/components/{v1badgeapp.js → inventoryset.js} +12 -12
  45. package/models/components/inventoryset.js.map +1 -0
  46. package/models/components/resource.d.ts +11 -0
  47. package/models/components/resource.d.ts.map +1 -1
  48. package/models/components/resource.js +13 -1
  49. package/models/components/resource.js.map +1 -1
  50. package/models/components/v1accountlistinventorysetsresponsebody.d.ts +26 -0
  51. package/models/components/v1accountlistinventorysetsresponsebody.d.ts.map +1 -0
  52. package/models/components/{v1badgelistbadgepricesresponsebody.js → v1accountlistinventorysetsresponsebody.js} +10 -13
  53. package/models/components/v1accountlistinventorysetsresponsebody.js.map +1 -0
  54. package/models/components/v1accountlocationupdate.d.ts +19 -0
  55. package/models/components/v1accountlocationupdate.d.ts.map +1 -0
  56. package/models/components/v1accountlocationupdate.js +56 -0
  57. package/models/components/v1accountlocationupdate.js.map +1 -0
  58. package/models/components/v1accountnameupdate.d.ts +15 -0
  59. package/models/components/v1accountnameupdate.d.ts.map +1 -0
  60. package/models/components/{v1badgetypecount.js → v1accountnameupdate.js} +9 -9
  61. package/models/components/v1accountnameupdate.js.map +1 -0
  62. package/models/components/v1accountrefreshinventoryresponsebody.d.ts +17 -0
  63. package/models/components/v1accountrefreshinventoryresponsebody.d.ts.map +1 -0
  64. package/models/components/{errormodel.js → v1accountrefreshinventoryresponsebody.js} +7 -13
  65. package/models/components/v1accountrefreshinventoryresponsebody.js.map +1 -0
  66. package/models/components/v1accountvanityupdate.d.ts +15 -0
  67. package/models/components/v1accountvanityupdate.d.ts.map +1 -0
  68. package/models/components/v1accountvanityupdate.js +52 -0
  69. package/models/components/v1accountvanityupdate.js.map +1 -0
  70. package/models/components/v1admingetaccountresponsebody.d.ts +104 -0
  71. package/models/components/v1admingetaccountresponsebody.d.ts.map +1 -0
  72. package/models/components/v1admingetaccountresponsebody.js +90 -0
  73. package/models/components/v1admingetaccountresponsebody.js.map +1 -0
  74. package/models/components/v1adminremovevanityresponsebody.d.ts +13 -0
  75. package/models/components/v1adminremovevanityresponsebody.d.ts.map +1 -0
  76. package/models/components/v1adminremovevanityresponsebody.js +55 -0
  77. package/models/components/v1adminremovevanityresponsebody.js.map +1 -0
  78. package/models/components/v1adminupdateresourcesrequestbody.d.ts +22 -0
  79. package/models/components/v1adminupdateresourcesrequestbody.d.ts.map +1 -0
  80. package/models/components/v1adminupdateresourcesrequestbody.js +54 -0
  81. package/models/components/v1adminupdateresourcesrequestbody.js.map +1 -0
  82. package/models/components/v1adminupdaterolesrequestbody.d.ts +45 -0
  83. package/models/components/v1adminupdaterolesrequestbody.d.ts.map +1 -0
  84. package/models/components/v1adminupdaterolesrequestbody.js +78 -0
  85. package/models/components/v1adminupdaterolesrequestbody.js.map +1 -0
  86. package/models/operations/accountlistinventorysets.d.ts +15 -0
  87. package/models/operations/accountlistinventorysets.d.ts.map +1 -0
  88. package/models/operations/accountlistinventorysets.js +59 -0
  89. package/models/operations/accountlistinventorysets.js.map +1 -0
  90. package/models/operations/accountrefreshinventory.d.ts +15 -0
  91. package/models/operations/accountrefreshinventory.d.ts.map +1 -0
  92. package/models/operations/accountrefreshinventory.js +59 -0
  93. package/models/operations/accountrefreshinventory.js.map +1 -0
  94. package/models/operations/admingetaccount.d.ts +15 -0
  95. package/models/operations/admingetaccount.d.ts.map +1 -0
  96. package/models/{components/v1badgesetcounts.js → operations/admingetaccount.js} +16 -10
  97. package/models/operations/admingetaccount.js.map +1 -0
  98. package/models/operations/adminremovevanity.d.ts +15 -0
  99. package/models/operations/adminremovevanity.d.ts.map +1 -0
  100. package/models/operations/adminremovevanity.js +59 -0
  101. package/models/operations/adminremovevanity.js.map +1 -0
  102. package/models/operations/adminupdateresources.d.ts +11 -0
  103. package/models/operations/adminupdateresources.d.ts.map +1 -0
  104. package/models/operations/{badgelistbadgeprices.js → adminupdateresources.js} +6 -11
  105. package/models/operations/adminupdateresources.js.map +1 -0
  106. package/models/operations/adminupdateroles.d.ts +11 -0
  107. package/models/operations/adminupdateroles.d.ts.map +1 -0
  108. package/models/operations/adminupdateroles.js +56 -0
  109. package/models/operations/adminupdateroles.js.map +1 -0
  110. package/models/operations/index.d.ts +6 -1
  111. package/models/operations/index.d.ts.map +1 -1
  112. package/models/operations/index.js +6 -1
  113. package/models/operations/index.js.map +1 -1
  114. package/package.json +1 -1
  115. package/sdk/account.d.ts +14 -0
  116. package/sdk/account.d.ts.map +1 -1
  117. package/sdk/account.js +20 -0
  118. package/sdk/account.js.map +1 -1
  119. package/sdk/admin.d.ts +22 -0
  120. package/sdk/admin.d.ts.map +1 -0
  121. package/sdk/admin.js +40 -0
  122. package/sdk/admin.js.map +1 -0
  123. package/sdk/badges.d.ts +0 -11
  124. package/sdk/badges.d.ts.map +1 -1
  125. package/sdk/badges.js +1 -13
  126. package/sdk/badges.js.map +1 -1
  127. package/sdk/sdk.d.ts +3 -0
  128. package/sdk/sdk.d.ts.map +1 -1
  129. package/sdk/sdk.js +4 -0
  130. package/sdk/sdk.js.map +1 -1
  131. package/src/funcs/{badgesListPrices.ts → accountAccountListInventorySets.ts} +24 -29
  132. package/src/funcs/accountAccountRefreshInventory.ts +169 -0
  133. package/src/funcs/adminGetAccount.ts +185 -0
  134. package/src/funcs/adminRemoveVanity.ts +185 -0
  135. package/src/funcs/adminUpdateResources.ts +184 -0
  136. package/src/funcs/adminUpdateRoles.ts +184 -0
  137. package/src/lib/config.ts +3 -3
  138. package/src/models/components/card.ts +36 -0
  139. package/src/models/components/historyvalue.ts +39 -0
  140. package/src/models/components/index.ts +12 -9
  141. package/src/models/components/inventoryset.ts +55 -0
  142. package/src/models/components/resource.ts +23 -0
  143. package/src/models/components/v1accountlistinventorysetsresponsebody.ts +56 -0
  144. package/src/models/components/v1accountlocationupdate.ts +45 -0
  145. package/src/models/components/v1accountnameupdate.ts +37 -0
  146. package/src/models/components/v1accountrefreshinventoryresponsebody.ts +45 -0
  147. package/src/models/components/v1accountvanityupdate.ts +37 -0
  148. package/src/models/components/v1admingetaccountresponsebody.ts +163 -0
  149. package/src/models/components/v1adminremovevanityresponsebody.ts +39 -0
  150. package/src/models/components/v1adminupdateresourcesrequestbody.ts +57 -0
  151. package/src/models/components/v1adminupdaterolesrequestbody.ts +80 -0
  152. package/src/models/operations/accountlistinventorysets.ts +47 -0
  153. package/src/models/operations/accountrefreshinventory.ts +47 -0
  154. package/src/models/operations/admingetaccount.ts +46 -0
  155. package/src/models/operations/adminremovevanity.ts +46 -0
  156. package/src/models/operations/adminupdateresources.ts +37 -0
  157. package/src/models/operations/adminupdateroles.ts +37 -0
  158. package/src/models/operations/index.ts +6 -1
  159. package/src/sdk/account.ts +32 -0
  160. package/src/sdk/admin.ts +70 -0
  161. package/src/sdk/badges.ts +0 -23
  162. package/src/sdk/sdk.ts +6 -0
  163. package/funcs/badgesListPrices.d.ts +0 -24
  164. package/funcs/badgesListPrices.d.ts.map +0 -1
  165. package/funcs/badgesListPrices.js.map +0 -1
  166. package/models/components/errormodel.d.ts +0 -38
  167. package/models/components/errormodel.d.ts.map +0 -1
  168. package/models/components/errormodel.js.map +0 -1
  169. package/models/components/v1badgeapp.d.ts +0 -15
  170. package/models/components/v1badgeapp.d.ts.map +0 -1
  171. package/models/components/v1badgeapp.js.map +0 -1
  172. package/models/components/v1badgelevel.d.ts +0 -12
  173. package/models/components/v1badgelevel.d.ts.map +0 -1
  174. package/models/components/v1badgelevel.js.map +0 -1
  175. package/models/components/v1badgelistbadgepricesrequestbody.d.ts +0 -8
  176. package/models/components/v1badgelistbadgepricesrequestbody.d.ts.map +0 -1
  177. package/models/components/v1badgelistbadgepricesrequestbody.js +0 -47
  178. package/models/components/v1badgelistbadgepricesrequestbody.js.map +0 -1
  179. package/models/components/v1badgelistbadgepricesresponsebody.d.ts +0 -31
  180. package/models/components/v1badgelistbadgepricesresponsebody.d.ts.map +0 -1
  181. package/models/components/v1badgelistbadgepricesresponsebody.js.map +0 -1
  182. package/models/components/v1badgeset.d.ts +0 -27
  183. package/models/components/v1badgeset.d.ts.map +0 -1
  184. package/models/components/v1badgeset.js +0 -65
  185. package/models/components/v1badgeset.js.map +0 -1
  186. package/models/components/v1badgesetcount.d.ts +0 -11
  187. package/models/components/v1badgesetcount.d.ts.map +0 -1
  188. package/models/components/v1badgesetcount.js.map +0 -1
  189. package/models/components/v1badgesetcounts.d.ts +0 -13
  190. package/models/components/v1badgesetcounts.d.ts.map +0 -1
  191. package/models/components/v1badgesetcounts.js.map +0 -1
  192. package/models/components/v1badgetypecount.d.ts +0 -12
  193. package/models/components/v1badgetypecount.d.ts.map +0 -1
  194. package/models/components/v1badgetypecount.js.map +0 -1
  195. package/models/operations/badgelistbadgeprices.d.ts +0 -19
  196. package/models/operations/badgelistbadgeprices.d.ts.map +0 -1
  197. package/models/operations/badgelistbadgeprices.js.map +0 -1
  198. package/src/models/components/errormodel.ts +0 -70
  199. package/src/models/components/v1badgeapp.ts +0 -41
  200. package/src/models/components/v1badgelevel.ts +0 -35
  201. package/src/models/components/v1badgelistbadgepricesrequestbody.ts +0 -27
  202. package/src/models/components/v1badgelistbadgepricesresponsebody.ts +0 -63
  203. package/src/models/components/v1badgeset.ts +0 -62
  204. package/src/models/components/v1badgesetcount.ts +0 -33
  205. package/src/models/components/v1badgesetcounts.ts +0 -39
  206. package/src/models/components/v1badgetypecount.ts +0 -35
  207. package/src/models/operations/badgelistbadgeprices.ts +0 -52
@@ -0,0 +1,184 @@
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 * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as components from "../models/components/index.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import { SteamSetsError } from "../models/errors/steamsetserror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Update account roles
31
+ */
32
+ export function adminUpdateRoles(
33
+ client: SteamSetsCore,
34
+ request: components.V1AdminUpdateRolesRequestBody,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ operations.AdminUpdateRolesResponse,
39
+ | errors.ErrorModel
40
+ | SteamSetsError
41
+ | ResponseValidationError
42
+ | ConnectionError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | InvalidRequestError
46
+ | UnexpectedClientError
47
+ | SDKValidationError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client: SteamSetsCore,
59
+ request: components.V1AdminUpdateRolesRequestBody,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ operations.AdminUpdateRolesResponse,
65
+ | errors.ErrorModel
66
+ | SteamSetsError
67
+ | ResponseValidationError
68
+ | ConnectionError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | InvalidRequestError
72
+ | UnexpectedClientError
73
+ | SDKValidationError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed = safeParse(
79
+ request,
80
+ (value) =>
81
+ components.V1AdminUpdateRolesRequestBody$outboundSchema.parse(value),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed.ok) {
85
+ return [parsed, { status: "invalid" }];
86
+ }
87
+ const payload = parsed.value;
88
+ const body = encodeJSON("body", payload, { explode: true });
89
+
90
+ const path = pathToFunc("/v1/admin.updateRoles")();
91
+
92
+ const headers = new Headers(compactMap({
93
+ "Content-Type": "application/json",
94
+ Accept: "application/problem+json",
95
+ }));
96
+
97
+ const secConfig = await extractSecurity(client._options.token);
98
+ const securityInput = secConfig == null ? {} : { token: secConfig };
99
+ const requestSecurity = resolveGlobalSecurity(securityInput);
100
+
101
+ const context = {
102
+ options: client._options,
103
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
104
+ operationID: "admin.updateRoles",
105
+ oAuth2Scopes: null,
106
+
107
+ resolvedSecurity: requestSecurity,
108
+
109
+ securitySource: client._options.token,
110
+ retryConfig: options?.retries
111
+ || client._options.retryConfig
112
+ || {
113
+ strategy: "backoff",
114
+ backoff: {
115
+ initialInterval: 500,
116
+ maxInterval: 5000,
117
+ exponent: 1.5,
118
+ maxElapsedTime: 60000,
119
+ },
120
+ retryConnectionErrors: true,
121
+ }
122
+ || { strategy: "none" },
123
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
124
+ };
125
+
126
+ const requestRes = client._createRequest(context, {
127
+ security: requestSecurity,
128
+ method: "POST",
129
+ baseURL: options?.serverURL,
130
+ path: path,
131
+ headers: headers,
132
+ body: body,
133
+ uaHeader: "x-speakeasy-user-agent",
134
+ userAgent: client._options.userAgent,
135
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
136
+ }, options);
137
+ if (!requestRes.ok) {
138
+ return [requestRes, { status: "invalid" }];
139
+ }
140
+ const req = requestRes.value;
141
+
142
+ const doResult = await client._do(req, {
143
+ context,
144
+ errorCodes: ["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
145
+ retryConfig: context.retryConfig,
146
+ retryCodes: context.retryCodes,
147
+ });
148
+ if (!doResult.ok) {
149
+ return [doResult, { status: "request-error", request: req }];
150
+ }
151
+ const response = doResult.value;
152
+
153
+ const responseFields = {
154
+ HttpMeta: { Response: response, Request: req },
155
+ };
156
+
157
+ const [result] = await M.match<
158
+ operations.AdminUpdateRolesResponse,
159
+ | errors.ErrorModel
160
+ | SteamSetsError
161
+ | ResponseValidationError
162
+ | ConnectionError
163
+ | RequestAbortedError
164
+ | RequestTimeoutError
165
+ | InvalidRequestError
166
+ | UnexpectedClientError
167
+ | SDKValidationError
168
+ >(
169
+ M.nil(204, operations.AdminUpdateRolesResponse$inboundSchema),
170
+ M.jsonErr([400, 401, 403, 404, 422], errors.ErrorModel$inboundSchema, {
171
+ ctype: "application/problem+json",
172
+ }),
173
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
174
+ ctype: "application/problem+json",
175
+ }),
176
+ M.fail("4XX"),
177
+ M.fail("5XX"),
178
+ )(response, req, { extraFields: responseFields });
179
+ if (!result.ok) {
180
+ return [result, { status: "complete", request: req, response }];
181
+ }
182
+
183
+ return [result, { status: "complete", request: req, response }];
184
+ }
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.30.1",
63
- genVersion: "2.788.7",
62
+ sdkVersion: "0.31.1",
63
+ genVersion: "2.791.1",
64
64
  userAgent:
65
- "speakeasy-sdk/typescript 0.30.1 2.788.7 1.0.0 @steamsets/client-ts",
65
+ "speakeasy-sdk/typescript 0.31.1 2.791.1 1.0.0 @steamsets/client-ts",
66
66
  } as const;
@@ -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
+ }
@@ -0,0 +1,39 @@
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 HistoryValue = {
11
+ /**
12
+ * The new value of the history entry
13
+ */
14
+ new: string | null;
15
+ /**
16
+ * The old value of the history entry
17
+ */
18
+ old: string | null;
19
+ };
20
+
21
+ /** @internal */
22
+ export const HistoryValue$inboundSchema: z.ZodType<
23
+ HistoryValue,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ new: z.nullable(z.string()),
28
+ old: z.nullable(z.string()),
29
+ });
30
+
31
+ export function historyValueFromJSON(
32
+ jsonString: string,
33
+ ): SafeParseResult<HistoryValue, SDKValidationError> {
34
+ return safeParse(
35
+ jsonString,
36
+ (x) => HistoryValue$inboundSchema.parse(JSON.parse(x)),
37
+ `Failed to parse 'HistoryValue' from JSON`,
38
+ );
39
+ }
@@ -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,11 @@ 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
+ export * from "./historyvalue.js";
27
28
  export * from "./httpmetadata.js";
28
29
  export * from "./idsearch.js";
29
30
  export * from "./image.js";
31
+ export * from "./inventoryset.js";
30
32
  export * from "./leaderboardaccount.js";
31
33
  export * from "./leaderboardcity.js";
32
34
  export * from "./leaderboardcountry.js";
@@ -82,12 +84,16 @@ export * from "./v1accountlistbadgesrequestbody.js";
82
84
  export * from "./v1accountlistbadgesresponsebody.js";
83
85
  export * from "./v1accountlistfriendsresponsebody.js";
84
86
  export * from "./v1accountlistimagesresponsebody.js";
87
+ export * from "./v1accountlistinventorysetsresponsebody.js";
85
88
  export * from "./v1accountlistleaderboardhistoryresponsebody.js";
89
+ export * from "./v1accountlocationupdate.js";
86
90
  export * from "./v1accountloginresponsebody.js";
91
+ export * from "./v1accountnameupdate.js";
87
92
  export * from "./v1accountplaytimedatapoint.js";
88
93
  export * from "./v1accountqueueupdaterequestbody.js";
89
94
  export * from "./v1accountreconnectrequestbody.js";
90
95
  export * from "./v1accountreconnectresponsebody.js";
96
+ export * from "./v1accountrefreshinventoryresponsebody.js";
91
97
  export * from "./v1accountrefreshsessionbody.js";
92
98
  export * from "./v1accountrefreshsessionrequestbody.js";
93
99
  export * from "./v1accountsubscribeemailrequestbody.js";
@@ -102,29 +108,26 @@ export * from "./v1accountupdatevanityrequestbody.js";
102
108
  export * from "./v1accountuploadedimage.js";
103
109
  export * from "./v1accountuploadimagesrequestbody.js";
104
110
  export * from "./v1accountuploadimagesresponsebody.js";
111
+ export * from "./v1accountvanityupdate.js";
105
112
  export * from "./v1accountverifyconnectionrequestbody.js";
106
113
  export * from "./v1accountverifyconnectionresponsebody.js";
107
114
  export * from "./v1accountverifyemailrequestbody.js";
115
+ export * from "./v1admingetaccountresponsebody.js";
116
+ export * from "./v1adminremovevanityresponsebody.js";
117
+ export * from "./v1adminupdateresourcesrequestbody.js";
118
+ export * from "./v1adminupdaterolesrequestbody.js";
108
119
  export * from "./v1appbadge.js";
109
120
  export * from "./v1appfilters.js";
110
121
  export * from "./v1applistbadgesrequestbody.js";
111
122
  export * from "./v1applistbadgesresponsebody.js";
112
123
  export * from "./v1apporder.js";
113
- export * from "./v1badgeapp.js";
114
124
  export * from "./v1badgefilters.js";
115
- export * from "./v1badgelevel.js";
116
- export * from "./v1badgelistbadgepricesrequestbody.js";
117
- export * from "./v1badgelistbadgepricesresponsebody.js";
118
125
  export * from "./v1badgelisttagsresponsebody.js";
119
126
  export * from "./v1badgeorder.js";
120
127
  export * from "./v1badgesearchbadgesresponsebody.js";
121
- export * from "./v1badgeset.js";
122
- export * from "./v1badgesetcount.js";
123
- export * from "./v1badgesetcounts.js";
124
128
  export * from "./v1badgesuggesttagsrequestbody.js";
125
129
  export * from "./v1badgetagbadgerequestbody.js";
126
130
  export * from "./v1badgetagbadgeresponsebody.js";
127
- export * from "./v1badgetypecount.js";
128
131
  export * from "./v1groupleaderboardgroup.js";
129
132
  export * from "./v1leaderboardappinfo.js";
130
133
  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",
@@ -37,6 +38,10 @@ export type Resource = {
37
38
  export const ResourceResource$inboundSchema: z.ZodNativeEnum<
38
39
  typeof ResourceResource
39
40
  > = z.nativeEnum(ResourceResource);
41
+ /** @internal */
42
+ export const ResourceResource$outboundSchema: z.ZodNativeEnum<
43
+ typeof ResourceResource
44
+ > = ResourceResource$inboundSchema;
40
45
 
41
46
  /** @internal */
42
47
  export const Resource$inboundSchema: z.ZodType<
@@ -47,7 +52,25 @@ export const Resource$inboundSchema: z.ZodType<
47
52
  resource: ResourceResource$inboundSchema,
48
53
  value: z.string(),
49
54
  });
55
+ /** @internal */
56
+ export type Resource$Outbound = {
57
+ resource: string;
58
+ value: string;
59
+ };
60
+
61
+ /** @internal */
62
+ export const Resource$outboundSchema: z.ZodType<
63
+ Resource$Outbound,
64
+ z.ZodTypeDef,
65
+ Resource
66
+ > = z.object({
67
+ resource: ResourceResource$outboundSchema,
68
+ value: z.string(),
69
+ });
50
70
 
71
+ export function resourceToJSON(resource: Resource): string {
72
+ return JSON.stringify(Resource$outboundSchema.parse(resource));
73
+ }
51
74
  export function resourceFromJSON(
52
75
  jsonString: string,
53
76
  ): SafeParseResult<Resource, SDKValidationError> {
@@ -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 { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { HistoryValue, HistoryValue$inboundSchema } from "./historyvalue.js";
10
+
11
+ export type V1AccountLocationUpdate = {
12
+ city: HistoryValue;
13
+ countryCode: HistoryValue;
14
+ countryName: HistoryValue;
15
+ region: HistoryValue;
16
+ state: HistoryValue;
17
+ /**
18
+ * The time the location was updated
19
+ */
20
+ updatedAt: Date;
21
+ };
22
+
23
+ /** @internal */
24
+ export const V1AccountLocationUpdate$inboundSchema: z.ZodType<
25
+ V1AccountLocationUpdate,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ city: HistoryValue$inboundSchema,
30
+ countryCode: HistoryValue$inboundSchema,
31
+ countryName: HistoryValue$inboundSchema,
32
+ region: HistoryValue$inboundSchema,
33
+ state: HistoryValue$inboundSchema,
34
+ updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
35
+ });
36
+
37
+ export function v1AccountLocationUpdateFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<V1AccountLocationUpdate, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => V1AccountLocationUpdate$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'V1AccountLocationUpdate' from JSON`,
44
+ );
45
+ }
@@ -0,0 +1,37 @@
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 { HistoryValue, HistoryValue$inboundSchema } from "./historyvalue.js";
10
+
11
+ export type V1AccountNameUpdate = {
12
+ name: HistoryValue;
13
+ /**
14
+ * The time the name was updated
15
+ */
16
+ updatedAt: Date;
17
+ };
18
+
19
+ /** @internal */
20
+ export const V1AccountNameUpdate$inboundSchema: z.ZodType<
21
+ V1AccountNameUpdate,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ name: HistoryValue$inboundSchema,
26
+ updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
27
+ });
28
+
29
+ export function v1AccountNameUpdateFromJSON(
30
+ jsonString: string,
31
+ ): SafeParseResult<V1AccountNameUpdate, SDKValidationError> {
32
+ return safeParse(
33
+ jsonString,
34
+ (x) => V1AccountNameUpdate$inboundSchema.parse(JSON.parse(x)),
35
+ `Failed to parse 'V1AccountNameUpdate' from JSON`,
36
+ );
37
+ }
@@ -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
+ }
@@ -0,0 +1,37 @@
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 { HistoryValue, HistoryValue$inboundSchema } from "./historyvalue.js";
10
+
11
+ export type V1AccountVanityUpdate = {
12
+ /**
13
+ * The time the vanity was updated
14
+ */
15
+ updatedAt: Date;
16
+ vanity: HistoryValue;
17
+ };
18
+
19
+ /** @internal */
20
+ export const V1AccountVanityUpdate$inboundSchema: z.ZodType<
21
+ V1AccountVanityUpdate,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
26
+ vanity: HistoryValue$inboundSchema,
27
+ });
28
+
29
+ export function v1AccountVanityUpdateFromJSON(
30
+ jsonString: string,
31
+ ): SafeParseResult<V1AccountVanityUpdate, SDKValidationError> {
32
+ return safeParse(
33
+ jsonString,
34
+ (x) => V1AccountVanityUpdate$inboundSchema.parse(JSON.parse(x)),
35
+ `Failed to parse 'V1AccountVanityUpdate' from JSON`,
36
+ );
37
+ }