@steamsets/client-ts 0.32.1 → 0.32.2

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 (69) hide show
  1. package/README.md +2 -0
  2. package/funcs/adminAdminUpdateRoleOverride.d.ts +16 -0
  3. package/funcs/adminAdminUpdateRoleOverride.d.ts.map +1 -0
  4. package/funcs/adminAdminUpdateRoleOverride.js +131 -0
  5. package/funcs/adminAdminUpdateRoleOverride.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/lib/files.d.ts +13 -0
  10. package/lib/files.d.ts.map +1 -1
  11. package/lib/files.js +19 -0
  12. package/lib/files.js.map +1 -1
  13. package/lib/sdks.d.ts.map +1 -1
  14. package/lib/sdks.js +8 -4
  15. package/lib/sdks.js.map +1 -1
  16. package/lib/url.d.ts.map +1 -1
  17. package/lib/url.js +4 -2
  18. package/lib/url.js.map +1 -1
  19. package/models/components/index.d.ts +1 -0
  20. package/models/components/index.d.ts.map +1 -1
  21. package/models/components/index.js +1 -0
  22. package/models/components/index.js.map +1 -1
  23. package/models/components/leaderboardaccount.d.ts +21 -0
  24. package/models/components/leaderboardaccount.d.ts.map +1 -1
  25. package/models/components/leaderboardaccount.js +6 -0
  26. package/models/components/leaderboardaccount.js.map +1 -1
  27. package/models/components/previewaccount.d.ts +21 -0
  28. package/models/components/previewaccount.d.ts.map +1 -1
  29. package/models/components/previewaccount.js +6 -0
  30. package/models/components/previewaccount.js.map +1 -1
  31. package/models/components/v1accountfriend.d.ts +21 -0
  32. package/models/components/v1accountfriend.d.ts.map +1 -1
  33. package/models/components/v1accountfriend.js +6 -0
  34. package/models/components/v1accountfriend.js.map +1 -1
  35. package/models/components/v1accountleaderboardaccount.d.ts +21 -0
  36. package/models/components/v1accountleaderboardaccount.d.ts.map +1 -1
  37. package/models/components/v1accountleaderboardaccount.js +6 -0
  38. package/models/components/v1accountleaderboardaccount.js.map +1 -1
  39. package/models/components/v1adminupdateroleoverriderequestbody.d.ts +43 -0
  40. package/models/components/v1adminupdateroleoverriderequestbody.d.ts.map +1 -0
  41. package/models/components/v1adminupdateroleoverriderequestbody.js +66 -0
  42. package/models/components/v1adminupdateroleoverriderequestbody.js.map +1 -0
  43. package/models/operations/adminupdateroleoverride.d.ts +11 -0
  44. package/models/operations/adminupdateroleoverride.d.ts.map +1 -0
  45. package/models/operations/adminupdateroleoverride.js +56 -0
  46. package/models/operations/adminupdateroleoverride.js.map +1 -0
  47. package/models/operations/index.d.ts +1 -0
  48. package/models/operations/index.d.ts.map +1 -1
  49. package/models/operations/index.js +1 -0
  50. package/models/operations/index.js.map +1 -1
  51. package/package.json +1 -1
  52. package/sdk/admin.d.ts +4 -0
  53. package/sdk/admin.d.ts.map +1 -1
  54. package/sdk/admin.js +7 -0
  55. package/sdk/admin.js.map +1 -1
  56. package/src/funcs/adminAdminUpdateRoleOverride.ts +186 -0
  57. package/src/lib/config.ts +3 -3
  58. package/src/lib/files.ts +22 -0
  59. package/src/lib/sdks.ts +7 -5
  60. package/src/lib/url.ts +16 -14
  61. package/src/models/components/index.ts +1 -0
  62. package/src/models/components/leaderboardaccount.ts +26 -0
  63. package/src/models/components/previewaccount.ts +26 -0
  64. package/src/models/components/v1accountfriend.ts +26 -0
  65. package/src/models/components/v1accountleaderboardaccount.ts +26 -0
  66. package/src/models/components/v1adminupdateroleoverriderequestbody.ts +79 -0
  67. package/src/models/operations/adminupdateroleoverride.ts +37 -0
  68. package/src/models/operations/index.ts +1 -0
  69. package/src/sdk/admin.ts +15 -0
package/sdk/admin.js CHANGED
@@ -4,6 +4,7 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Admin = void 0;
7
+ const adminAdminUpdateRoleOverride_js_1 = require("../funcs/adminAdminUpdateRoleOverride.js");
7
8
  const adminGetAccount_js_1 = require("../funcs/adminGetAccount.js");
8
9
  const adminRemoveVanity_js_1 = require("../funcs/adminRemoveVanity.js");
9
10
  const adminUpdateResources_js_1 = require("../funcs/adminUpdateResources.js");
@@ -29,6 +30,12 @@ class Admin extends sdks_js_1.ClientSDK {
29
30
  async updateResources(request, options) {
30
31
  return (0, fp_js_1.unwrapAsync)((0, adminUpdateResources_js_1.adminUpdateResources)(this, request, options));
31
32
  }
33
+ /**
34
+ * Set or remove a tier role override for an account
35
+ */
36
+ async adminUpdateRoleOverride(request, options) {
37
+ return (0, fp_js_1.unwrapAsync)((0, adminAdminUpdateRoleOverride_js_1.adminAdminUpdateRoleOverride)(this, request, options));
38
+ }
32
39
  /**
33
40
  * Update account roles
34
41
  */
package/sdk/admin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"admin.js","sourceRoot":"","sources":["../src/sdk/admin.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,oEAA8D;AAC9D,wEAAkE;AAClE,8EAAwE;AACxE,sEAAgE;AAChE,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,KAAM,SAAQ,mBAAS;IAClC;;OAEG;IACH,KAAK,CAAC,UAAU,CACd,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAChB,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAiB,EAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe,CACnB,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CACf,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sCAAgB,EACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAxDD,sBAwDC"}
1
+ {"version":3,"file":"admin.js","sourceRoot":"","sources":["../src/sdk/admin.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8FAAwF;AACxF,oEAA8D;AAC9D,wEAAkE;AAClE,8EAAwE;AACxE,sEAAgE;AAChE,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,KAAM,SAAQ,mBAAS;IAClC;;OAEG;IACH,KAAK,CAAC,UAAU,CACd,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAChB,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wCAAiB,EAClC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe,CACnB,OAAqD,EACrD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,uBAAuB,CAC3B,OAAwD,EACxD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8DAA4B,EAC7C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CACf,OAAiD,EACjD,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,sCAAgB,EACjC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAtED,sBAsEC"}
@@ -0,0 +1,186 @@
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
+ * Set or remove a tier role override for an account
31
+ */
32
+ export function adminAdminUpdateRoleOverride(
33
+ client: SteamSetsCore,
34
+ request: components.V1AdminUpdateRoleOverrideRequestBody,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ operations.AdminUpdateRoleOverrideResponse,
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.V1AdminUpdateRoleOverrideRequestBody,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ operations.AdminUpdateRoleOverrideResponse,
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.V1AdminUpdateRoleOverrideRequestBody$outboundSchema.parse(
82
+ value,
83
+ ),
84
+ "Input validation failed",
85
+ );
86
+ if (!parsed.ok) {
87
+ return [parsed, { status: "invalid" }];
88
+ }
89
+ const payload = parsed.value;
90
+ const body = encodeJSON("body", payload, { explode: true });
91
+
92
+ const path = pathToFunc("/v1/admin.updateRoleOverride")();
93
+
94
+ const headers = new Headers(compactMap({
95
+ "Content-Type": "application/json",
96
+ Accept: "application/problem+json",
97
+ }));
98
+
99
+ const secConfig = await extractSecurity(client._options.token);
100
+ const securityInput = secConfig == null ? {} : { token: secConfig };
101
+ const requestSecurity = resolveGlobalSecurity(securityInput);
102
+
103
+ const context = {
104
+ options: client._options,
105
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
106
+ operationID: "admin.updateRoleOverride",
107
+ oAuth2Scopes: null,
108
+
109
+ resolvedSecurity: requestSecurity,
110
+
111
+ securitySource: client._options.token,
112
+ retryConfig: options?.retries
113
+ || client._options.retryConfig
114
+ || {
115
+ strategy: "backoff",
116
+ backoff: {
117
+ initialInterval: 500,
118
+ maxInterval: 5000,
119
+ exponent: 1.5,
120
+ maxElapsedTime: 60000,
121
+ },
122
+ retryConnectionErrors: true,
123
+ }
124
+ || { strategy: "none" },
125
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
126
+ };
127
+
128
+ const requestRes = client._createRequest(context, {
129
+ security: requestSecurity,
130
+ method: "POST",
131
+ baseURL: options?.serverURL,
132
+ path: path,
133
+ headers: headers,
134
+ body: body,
135
+ uaHeader: "x-speakeasy-user-agent",
136
+ userAgent: client._options.userAgent,
137
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
138
+ }, options);
139
+ if (!requestRes.ok) {
140
+ return [requestRes, { status: "invalid" }];
141
+ }
142
+ const req = requestRes.value;
143
+
144
+ const doResult = await client._do(req, {
145
+ context,
146
+ errorCodes: ["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
147
+ retryConfig: context.retryConfig,
148
+ retryCodes: context.retryCodes,
149
+ });
150
+ if (!doResult.ok) {
151
+ return [doResult, { status: "request-error", request: req }];
152
+ }
153
+ const response = doResult.value;
154
+
155
+ const responseFields = {
156
+ HttpMeta: { Response: response, Request: req },
157
+ };
158
+
159
+ const [result] = await M.match<
160
+ operations.AdminUpdateRoleOverrideResponse,
161
+ | errors.ErrorModel
162
+ | SteamSetsError
163
+ | ResponseValidationError
164
+ | ConnectionError
165
+ | RequestAbortedError
166
+ | RequestTimeoutError
167
+ | InvalidRequestError
168
+ | UnexpectedClientError
169
+ | SDKValidationError
170
+ >(
171
+ M.nil(204, operations.AdminUpdateRoleOverrideResponse$inboundSchema),
172
+ M.jsonErr([400, 401, 403, 404, 422], errors.ErrorModel$inboundSchema, {
173
+ ctype: "application/problem+json",
174
+ }),
175
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
176
+ ctype: "application/problem+json",
177
+ }),
178
+ M.fail("4XX"),
179
+ M.fail("5XX"),
180
+ )(response, req, { extraFields: responseFields });
181
+ if (!result.ok) {
182
+ return [result, { status: "complete", request: req, response }];
183
+ }
184
+
185
+ return [result, { status: "complete", request: req, response }];
186
+ }
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.32.1",
63
- genVersion: "2.856.1",
62
+ sdkVersion: "0.32.2",
63
+ genVersion: "2.869.3",
64
64
  userAgent:
65
- "speakeasy-sdk/typescript 0.32.1 2.856.1 1.0.0 @steamsets/client-ts",
65
+ "speakeasy-sdk/typescript 0.32.2 2.869.3 1.0.0 @steamsets/client-ts",
66
66
  } as const;
package/src/lib/files.ts CHANGED
@@ -80,3 +80,25 @@ export function getContentTypeFromFileName(fileName: string): string | null {
80
80
 
81
81
  return mimeTypes[ext] || null;
82
82
  }
83
+
84
+ /**
85
+ * Creates a Blob from file content with the given MIME type.
86
+ *
87
+ * Node.js Buffers are Uint8Array subclasses that may share a pooled
88
+ * ArrayBuffer (byteOffset > 0, byteLength < buffer.byteLength). Passing
89
+ * such a Buffer directly to `new Blob([buf])` can include the entire
90
+ * underlying pool on some runtimes, producing a Blob with extra bytes
91
+ * that corrupts multipart uploads.
92
+ *
93
+ * Copying into a standalone Uint8Array ensures the Blob receives only the
94
+ * intended bytes regardless of runtime behaviour.
95
+ */
96
+ export function bytesToBlob(
97
+ content: Uint8Array<ArrayBufferLike> | ArrayBuffer | Blob | string,
98
+ contentType: string,
99
+ ): Blob {
100
+ if (content instanceof Uint8Array) {
101
+ return new Blob([new Uint8Array(content)], { type: contentType });
102
+ }
103
+ return new Blob([content as BlobPart], { type: contentType });
104
+ }
package/src/lib/sdks.ts CHANGED
@@ -124,13 +124,15 @@ export class ClientSDK {
124
124
  if (!base) {
125
125
  return ERR(new InvalidRequestError("No base URL provided for operation"));
126
126
  }
127
- const reqURL = new URL(base);
128
- const inputURL = new URL(path, reqURL);
129
-
127
+ const baseURL = new URL(base);
128
+ let reqURL: URL;
130
129
  if (path) {
131
- reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/";
132
- reqURL.pathname += inputURL.pathname.replace(/^\/+/, "");
130
+ baseURL.pathname = baseURL.pathname.replace(/\/+$/, "") + "/";
131
+ reqURL = new URL(path, baseURL);
132
+ } else {
133
+ reqURL = baseURL;
133
134
  }
135
+ reqURL.hash = "";
134
136
 
135
137
  let finalQuery = query || "";
136
138
 
package/src/lib/url.ts CHANGED
@@ -13,21 +13,23 @@ export function pathToFunc(
13
13
  const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
14
14
 
15
15
  return function buildURLPath(params: Record<string, unknown> = {}): string {
16
- return pathPattern.replace(paramRE, function (_, placeholder) {
17
- if (!hasOwn.call(params, placeholder)) {
18
- throw new Error(`Parameter '${placeholder}' is required`);
19
- }
16
+ return pathPattern
17
+ .replace(paramRE, function (_, placeholder) {
18
+ if (!hasOwn.call(params, placeholder)) {
19
+ throw new Error(`Parameter '${placeholder}' is required`);
20
+ }
20
21
 
21
- const value = params[placeholder];
22
- if (typeof value !== "string" && typeof value !== "number") {
23
- throw new Error(
24
- `Parameter '${placeholder}' must be a string or number`,
25
- );
26
- }
22
+ const value = params[placeholder];
23
+ if (typeof value !== "string" && typeof value !== "number") {
24
+ throw new Error(
25
+ `Parameter '${placeholder}' must be a string or number`,
26
+ );
27
+ }
27
28
 
28
- return options?.charEncoding === "percent"
29
- ? encodeURIComponent(`${value}`)
30
- : `${value}`;
31
- });
29
+ return options?.charEncoding === "percent"
30
+ ? encodeURIComponent(`${value}`)
31
+ : `${value}`;
32
+ })
33
+ .replace(/^\/+/, "");
32
34
  };
33
35
  }
@@ -116,6 +116,7 @@ export * from "./v1accountverifyemailrequestbody.js";
116
116
  export * from "./v1admingetaccountresponsebody.js";
117
117
  export * from "./v1adminremovevanityresponsebody.js";
118
118
  export * from "./v1adminupdateresourcesrequestbody.js";
119
+ export * from "./v1adminupdateroleoverriderequestbody.js";
119
120
  export * from "./v1adminupdaterolesrequestbody.js";
120
121
  export * from "./v1appbadge.js";
121
122
  export * from "./v1appfilters.js";
@@ -8,6 +8,7 @@ import * as openEnums from "../../types/enums.js";
8
8
  import { OpenEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import { Image, Image$inboundSchema } from "./image.js";
11
12
  import {
12
13
  LeaderboardCity,
13
14
  LeaderboardCity$inboundSchema,
@@ -42,6 +43,10 @@ export type LeaderboardAccountPrivacy = OpenEnum<
42
43
  >;
43
44
 
44
45
  export type LeaderboardAccount = {
46
+ /**
47
+ * The animated avatar of the account
48
+ */
49
+ animatedAvatar: string;
45
50
  /**
46
51
  * The cost of an app
47
52
  *
@@ -56,6 +61,10 @@ export type LeaderboardAccount = {
56
61
  * The avatar hash of the account
57
62
  */
58
63
  avatar: string;
64
+ /**
65
+ * The avatar frame of the account
66
+ */
67
+ avatarFrame: string;
59
68
  /**
60
69
  * The number of awards the account has
61
70
  */
@@ -64,6 +73,10 @@ export type LeaderboardAccount = {
64
73
  * The number of awards the account has
65
74
  */
66
75
  awardsReceived: number;
76
+ /**
77
+ * The background of the account
78
+ */
79
+ background: string;
67
80
  /**
68
81
  * The number of badges the account has
69
82
  */
@@ -104,10 +117,18 @@ export type LeaderboardAccount = {
104
117
  * The number of game bans
105
118
  */
106
119
  gameBans: number;
120
+ /**
121
+ * The images of the account
122
+ */
123
+ images: Array<Image> | null;
107
124
  /**
108
125
  * The level of the account
109
126
  */
110
127
  level: number;
128
+ /**
129
+ * The mini background of the account
130
+ */
131
+ miniBackground: string;
111
132
  /**
112
133
  * The name of the account
113
134
  */
@@ -183,11 +204,14 @@ export const LeaderboardAccount$inboundSchema: z.ZodType<
183
204
  z.ZodTypeDef,
184
205
  unknown
185
206
  > = z.object({
207
+ animatedAvatar: z.string(),
186
208
  appCost: z.number().int(),
187
209
  apps: z.number().int(),
188
210
  avatar: z.string(),
211
+ avatarFrame: z.string(),
189
212
  awardsGiven: z.number().int(),
190
213
  awardsReceived: z.number().int(),
214
+ background: z.string(),
191
215
  badges: z.number().int(),
192
216
  bans: z.number().int(),
193
217
  city: z.nullable(LeaderboardCity$inboundSchema).optional(),
@@ -199,7 +223,9 @@ export const LeaderboardAccount$inboundSchema: z.ZodType<
199
223
  foilBadges: z.number().int(),
200
224
  friends: z.number().int(),
201
225
  gameBans: z.number().int(),
226
+ images: z.nullable(z.array(Image$inboundSchema)),
202
227
  level: z.number().int(),
228
+ miniBackground: z.string(),
203
229
  name: z.string(),
204
230
  normalBadgeCost: z.number().int(),
205
231
  normalBadges: z.number().int(),
@@ -8,6 +8,7 @@ import * as openEnums from "../../types/enums.js";
8
8
  import { OpenEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import { Image, Image$inboundSchema } from "./image.js";
11
12
  import {
12
13
  LeaderboardCity,
13
14
  LeaderboardCity$inboundSchema,
@@ -40,6 +41,10 @@ export const PreviewAccountPrivacy = {
40
41
  export type PreviewAccountPrivacy = OpenEnum<typeof PreviewAccountPrivacy>;
41
42
 
42
43
  export type PreviewAccount = {
44
+ /**
45
+ * The animated avatar of the account
46
+ */
47
+ animatedAvatar: string;
43
48
  /**
44
49
  * The cost of an app
45
50
  *
@@ -54,6 +59,10 @@ export type PreviewAccount = {
54
59
  * The avatar hash of the account
55
60
  */
56
61
  avatar: string;
62
+ /**
63
+ * The avatar frame of the account
64
+ */
65
+ avatarFrame: string;
57
66
  /**
58
67
  * The number of awards the account has
59
68
  */
@@ -62,6 +71,10 @@ export type PreviewAccount = {
62
71
  * The number of awards the account has
63
72
  */
64
73
  awardsReceived: number;
74
+ /**
75
+ * The background of the account
76
+ */
77
+ background: string;
65
78
  /**
66
79
  * The number of badges the account has
67
80
  */
@@ -106,10 +119,18 @@ export type PreviewAccount = {
106
119
  * The number of game bans
107
120
  */
108
121
  gameBans: number;
122
+ /**
123
+ * The images of the account
124
+ */
125
+ images: Array<Image> | null;
109
126
  /**
110
127
  * The level of the account
111
128
  */
112
129
  level: number;
130
+ /**
131
+ * The mini background of the account
132
+ */
133
+ miniBackground: string;
113
134
  /**
114
135
  * The name of the account
115
136
  */
@@ -193,11 +214,14 @@ export const PreviewAccount$inboundSchema: z.ZodType<
193
214
  z.ZodTypeDef,
194
215
  unknown
195
216
  > = z.object({
217
+ animatedAvatar: z.string(),
196
218
  appCost: z.number().int(),
197
219
  apps: z.number().int(),
198
220
  avatar: z.string(),
221
+ avatarFrame: z.string(),
199
222
  awardsGiven: z.number().int(),
200
223
  awardsReceived: z.number().int(),
224
+ background: z.string(),
201
225
  badges: z.number().int(),
202
226
  bans: z.number().int(),
203
227
  city: z.nullable(LeaderboardCity$inboundSchema).optional(),
@@ -210,7 +234,9 @@ export const PreviewAccount$inboundSchema: z.ZodType<
210
234
  foilBadges: z.number().int(),
211
235
  friends: z.number().int(),
212
236
  gameBans: z.number().int(),
237
+ images: z.nullable(z.array(Image$inboundSchema)),
213
238
  level: z.number().int(),
239
+ miniBackground: z.string(),
214
240
  name: z.string(),
215
241
  normalBadgeCost: z.number().int(),
216
242
  normalBadges: z.number().int(),
@@ -8,6 +8,7 @@ import * as openEnums from "../../types/enums.js";
8
8
  import { OpenEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import { Image, Image$inboundSchema } from "./image.js";
11
12
  import {
12
13
  LeaderboardCity,
13
14
  LeaderboardCity$inboundSchema,
@@ -40,6 +41,10 @@ export const V1AccountFriendPrivacy = {
40
41
  export type V1AccountFriendPrivacy = OpenEnum<typeof V1AccountFriendPrivacy>;
41
42
 
42
43
  export type V1AccountFriend = {
44
+ /**
45
+ * The animated avatar of the account
46
+ */
47
+ animatedAvatar: string;
43
48
  /**
44
49
  * The cost of an app
45
50
  *
@@ -54,6 +59,10 @@ export type V1AccountFriend = {
54
59
  * The avatar hash of the account
55
60
  */
56
61
  avatar: string;
62
+ /**
63
+ * The avatar frame of the account
64
+ */
65
+ avatarFrame: string;
57
66
  /**
58
67
  * The number of awards the account has
59
68
  */
@@ -62,6 +71,10 @@ export type V1AccountFriend = {
62
71
  * The number of awards the account has
63
72
  */
64
73
  awardsReceived: number;
74
+ /**
75
+ * The background of the account
76
+ */
77
+ background: string;
65
78
  /**
66
79
  * The number of badges the account has
67
80
  */
@@ -103,10 +116,18 @@ export type V1AccountFriend = {
103
116
  * The number of game bans
104
117
  */
105
118
  gameBans: number;
119
+ /**
120
+ * The images of the account
121
+ */
122
+ images: Array<Image> | null;
106
123
  /**
107
124
  * The level of the account
108
125
  */
109
126
  level: number;
127
+ /**
128
+ * The mini background of the account
129
+ */
130
+ miniBackground: string;
110
131
  /**
111
132
  * The name of the account
112
133
  */
@@ -182,11 +203,14 @@ export const V1AccountFriend$inboundSchema: z.ZodType<
182
203
  z.ZodTypeDef,
183
204
  unknown
184
205
  > = z.object({
206
+ animatedAvatar: z.string(),
185
207
  appCost: z.number().int(),
186
208
  apps: z.number().int(),
187
209
  avatar: z.string(),
210
+ avatarFrame: z.string(),
188
211
  awardsGiven: z.number().int(),
189
212
  awardsReceived: z.number().int(),
213
+ background: z.string(),
190
214
  badges: z.number().int(),
191
215
  bans: z.number().int(),
192
216
  city: z.nullable(LeaderboardCity$inboundSchema).optional(),
@@ -201,7 +225,9 @@ export const V1AccountFriend$inboundSchema: z.ZodType<
201
225
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
202
226
  ),
203
227
  gameBans: z.number().int(),
228
+ images: z.nullable(z.array(Image$inboundSchema)),
204
229
  level: z.number().int(),
230
+ miniBackground: z.string(),
205
231
  name: z.string(),
206
232
  normalBadgeCost: z.number().int(),
207
233
  normalBadges: z.number().int(),
@@ -12,6 +12,7 @@ import {
12
12
  AccountBadgeInfo,
13
13
  AccountBadgeInfo$inboundSchema,
14
14
  } from "./accountbadgeinfo.js";
15
+ import { Image, Image$inboundSchema } from "./image.js";
15
16
  import {
16
17
  LeaderboardCity,
17
18
  LeaderboardCity$inboundSchema,
@@ -46,6 +47,10 @@ export type V1AccountLeaderboardAccountPrivacy = OpenEnum<
46
47
  >;
47
48
 
48
49
  export type V1AccountLeaderboardAccount = {
50
+ /**
51
+ * The animated avatar of the account
52
+ */
53
+ animatedAvatar: string;
49
54
  /**
50
55
  * The cost of an app
51
56
  *
@@ -64,6 +69,10 @@ export type V1AccountLeaderboardAccount = {
64
69
  * The avatar hash of the account
65
70
  */
66
71
  avatar: string;
72
+ /**
73
+ * The avatar frame of the account
74
+ */
75
+ avatarFrame: string;
67
76
  /**
68
77
  * The number of awards the account has
69
78
  */
@@ -72,6 +81,10 @@ export type V1AccountLeaderboardAccount = {
72
81
  * The number of awards the account has
73
82
  */
74
83
  awardsReceived: number;
84
+ /**
85
+ * The background of the account
86
+ */
87
+ background: string;
75
88
  badgeInfo?: AccountBadgeInfo | null | undefined;
76
89
  /**
77
90
  * The number of badges the account has
@@ -113,10 +126,18 @@ export type V1AccountLeaderboardAccount = {
113
126
  * The number of game bans
114
127
  */
115
128
  gameBans: number;
129
+ /**
130
+ * The images of the account
131
+ */
132
+ images: Array<Image> | null;
116
133
  /**
117
134
  * The level of the account
118
135
  */
119
136
  level: number;
137
+ /**
138
+ * The mini background of the account
139
+ */
140
+ miniBackground: string;
120
141
  /**
121
142
  * The name of the account
122
143
  */
@@ -196,12 +217,15 @@ export const V1AccountLeaderboardAccount$inboundSchema: z.ZodType<
196
217
  z.ZodTypeDef,
197
218
  unknown
198
219
  > = z.object({
220
+ animatedAvatar: z.string(),
199
221
  appCost: z.number().int(),
200
222
  appPlaytime: z.nullable(z.number().int()),
201
223
  apps: z.number().int(),
202
224
  avatar: z.string(),
225
+ avatarFrame: z.string(),
203
226
  awardsGiven: z.number().int(),
204
227
  awardsReceived: z.number().int(),
228
+ background: z.string(),
205
229
  badgeInfo: z.nullable(AccountBadgeInfo$inboundSchema).optional(),
206
230
  badges: z.number().int(),
207
231
  bans: z.number().int(),
@@ -214,7 +238,9 @@ export const V1AccountLeaderboardAccount$inboundSchema: z.ZodType<
214
238
  foilBadges: z.number().int(),
215
239
  friends: z.number().int(),
216
240
  gameBans: z.number().int(),
241
+ images: z.nullable(z.array(Image$inboundSchema)),
217
242
  level: z.number().int(),
243
+ miniBackground: z.string(),
218
244
  name: z.string(),
219
245
  normalBadgeCost: z.number().int(),
220
246
  normalBadges: z.number().int(),