@steamsets/client-ts 0.12.3 → 0.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +19 -30
  2. package/docs/sdks/admin/README.md +180 -0
  3. package/docs/sdks/steamsets/README.md +148 -1
  4. package/funcs/accountV1GetEmbed.d.ts +11 -0
  5. package/funcs/accountV1GetEmbed.d.ts.map +1 -0
  6. package/funcs/accountV1GetEmbed.js +96 -0
  7. package/funcs/accountV1GetEmbed.js.map +1 -0
  8. package/funcs/accountV1GetMeta.d.ts +11 -0
  9. package/funcs/accountV1GetMeta.d.ts.map +1 -0
  10. package/funcs/accountV1GetMeta.js +95 -0
  11. package/funcs/accountV1GetMeta.js.map +1 -0
  12. package/funcs/adminAdminV1UpdateResources.d.ts +11 -0
  13. package/funcs/adminAdminV1UpdateResources.d.ts.map +1 -0
  14. package/funcs/adminAdminV1UpdateResources.js +93 -0
  15. package/funcs/adminAdminV1UpdateResources.js.map +1 -0
  16. package/funcs/adminAdminV1UpdateRoles.d.ts +11 -0
  17. package/funcs/adminAdminV1UpdateRoles.d.ts.map +1 -0
  18. package/funcs/adminAdminV1UpdateRoles.js +93 -0
  19. package/funcs/adminAdminV1UpdateRoles.js.map +1 -0
  20. package/lib/config.d.ts +3 -3
  21. package/lib/config.js +3 -3
  22. package/models/components/accountinfobody.d.ts +5 -5
  23. package/models/components/accountinfobody.d.ts.map +1 -1
  24. package/models/components/accountinfobody.js +2 -2
  25. package/models/components/accountinfobody.js.map +1 -1
  26. package/models/components/index.d.ts +3 -0
  27. package/models/components/index.d.ts.map +1 -1
  28. package/models/components/index.js +3 -0
  29. package/models/components/index.js.map +1 -1
  30. package/models/components/leaderboardaccount.d.ts +0 -5
  31. package/models/components/leaderboardaccount.d.ts.map +1 -1
  32. package/models/components/leaderboardaccount.js +0 -2
  33. package/models/components/leaderboardaccount.js.map +1 -1
  34. package/models/components/v1accountfriend.d.ts +0 -5
  35. package/models/components/v1accountfriend.d.ts.map +1 -1
  36. package/models/components/v1accountfriend.js +0 -2
  37. package/models/components/v1accountfriend.js.map +1 -1
  38. package/models/components/v1accountleaderboardaccount.d.ts +0 -5
  39. package/models/components/v1accountleaderboardaccount.d.ts.map +1 -1
  40. package/models/components/v1accountleaderboardaccount.js +0 -2
  41. package/models/components/v1accountleaderboardaccount.js.map +1 -1
  42. package/models/components/v1accountmetaresponsebody.d.ts +28 -0
  43. package/models/components/v1accountmetaresponsebody.d.ts.map +1 -0
  44. package/models/components/v1accountmetaresponsebody.js +59 -0
  45. package/models/components/v1accountmetaresponsebody.js.map +1 -0
  46. package/models/components/v1adminupdateresourcesrequestbody.d.ts +111 -0
  47. package/models/components/v1adminupdateresourcesrequestbody.d.ts.map +1 -0
  48. package/models/components/v1adminupdateresourcesrequestbody.js +95 -0
  49. package/models/components/v1adminupdateresourcesrequestbody.js.map +1 -0
  50. package/models/components/v1adminupdaterolessrequestbody.d.ts +180 -0
  51. package/models/components/v1adminupdaterolessrequestbody.d.ts.map +1 -0
  52. package/models/components/v1adminupdaterolessrequestbody.js +129 -0
  53. package/models/components/v1adminupdaterolessrequestbody.js.map +1 -0
  54. package/models/operations/accountv1getembed.d.ts +37 -0
  55. package/models/operations/accountv1getembed.d.ts.map +1 -0
  56. package/models/operations/accountv1getembed.js +66 -0
  57. package/models/operations/accountv1getembed.js.map +1 -0
  58. package/models/operations/accountv1getmeta.d.ts +31 -0
  59. package/models/operations/accountv1getmeta.d.ts.map +1 -0
  60. package/models/operations/accountv1getmeta.js +66 -0
  61. package/models/operations/accountv1getmeta.js.map +1 -0
  62. package/models/operations/adminv1updateresources.d.ts +26 -0
  63. package/models/operations/adminv1updateresources.d.ts.map +1 -0
  64. package/models/operations/adminv1updateresources.js +60 -0
  65. package/models/operations/adminv1updateresources.js.map +1 -0
  66. package/models/operations/adminv1updateroles.d.ts +26 -0
  67. package/models/operations/adminv1updateroles.d.ts.map +1 -0
  68. package/models/operations/adminv1updateroles.js +60 -0
  69. package/models/operations/adminv1updateroles.js.map +1 -0
  70. package/models/operations/index.d.ts +4 -0
  71. package/models/operations/index.d.ts.map +1 -1
  72. package/models/operations/index.js +4 -0
  73. package/models/operations/index.js.map +1 -1
  74. package/package.json +1 -1
  75. package/sdk/admin.d.ts +2 -0
  76. package/sdk/admin.d.ts.map +1 -1
  77. package/sdk/admin.js +8 -0
  78. package/sdk/admin.js.map +1 -1
  79. package/sdk/sdk.d.ts +5 -1
  80. package/sdk/sdk.d.ts.map +1 -1
  81. package/sdk/sdk.js +9 -0
  82. package/sdk/sdk.js.map +1 -1
  83. package/src/funcs/accountV1GetEmbed.ts +125 -0
  84. package/src/funcs/accountV1GetMeta.ts +124 -0
  85. package/src/funcs/adminAdminV1UpdateResources.ts +123 -0
  86. package/src/funcs/adminAdminV1UpdateRoles.ts +123 -0
  87. package/src/lib/config.ts +3 -3
  88. package/src/models/components/accountinfobody.ts +7 -7
  89. package/src/models/components/index.ts +3 -0
  90. package/src/models/components/leaderboardaccount.ts +0 -7
  91. package/src/models/components/v1accountfriend.ts +0 -7
  92. package/src/models/components/v1accountleaderboardaccount.ts +0 -7
  93. package/src/models/components/v1accountmetaresponsebody.ts +57 -0
  94. package/src/models/components/v1adminupdateresourcesrequestbody.ts +131 -0
  95. package/src/models/components/v1adminupdaterolessrequestbody.ts +152 -0
  96. package/src/models/operations/accountv1getembed.ts +68 -0
  97. package/src/models/operations/accountv1getmeta.ts +68 -0
  98. package/src/models/operations/adminv1updateresources.ts +55 -0
  99. package/src/models/operations/adminv1updateroles.ts +55 -0
  100. package/src/models/operations/index.ts +4 -0
  101. package/src/sdk/admin.ts +24 -0
  102. package/src/sdk/sdk.ts +28 -1
@@ -0,0 +1,123 @@
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 { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ export async function adminAdminV1UpdateRoles(
27
+ client: SteamSetsCore,
28
+ request: components.V1AdminUpdateRolessRequestBody,
29
+ options?: RequestOptions,
30
+ ): Promise<
31
+ Result<
32
+ operations.AdminV1UpdateRolesResponse,
33
+ | errors.ErrorModel
34
+ | SDKError
35
+ | SDKValidationError
36
+ | UnexpectedClientError
37
+ | InvalidRequestError
38
+ | RequestAbortedError
39
+ | RequestTimeoutError
40
+ | ConnectionError
41
+ >
42
+ > {
43
+ const parsed = safeParse(
44
+ request,
45
+ (value) =>
46
+ components.V1AdminUpdateRolessRequestBody$outboundSchema.parse(value),
47
+ "Input validation failed",
48
+ );
49
+ if (!parsed.ok) {
50
+ return parsed;
51
+ }
52
+ const payload = parsed.value;
53
+ const body = encodeJSON("body", payload, { explode: true });
54
+
55
+ const path = pathToFunc("/admin.v1.AdminService/UpdateRoles")();
56
+
57
+ const headers = new Headers({
58
+ "Content-Type": "application/json",
59
+ Accept: "application/problem+json",
60
+ });
61
+
62
+ const secConfig = await extractSecurity(client._options.token);
63
+ const securityInput = secConfig == null ? {} : { token: secConfig };
64
+ const context = {
65
+ operationID: "admin.v1.update-roles",
66
+ oAuth2Scopes: [],
67
+ securitySource: client._options.token,
68
+ };
69
+ const requestSecurity = resolveGlobalSecurity(securityInput);
70
+
71
+ const requestRes = client._createRequest(context, {
72
+ security: requestSecurity,
73
+ method: "POST",
74
+ path: path,
75
+ headers: headers,
76
+ body: body,
77
+ uaHeader: "x-speakeasy-user-agent",
78
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
79
+ }, options);
80
+ if (!requestRes.ok) {
81
+ return requestRes;
82
+ }
83
+ const req = requestRes.value;
84
+
85
+ const doResult = await client._do(req, {
86
+ context,
87
+ errorCodes: ["403", "404", "422", "429", "4XX", "500", "5XX"],
88
+ retryConfig: options?.retries
89
+ || client._options.retryConfig,
90
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
91
+ });
92
+ if (!doResult.ok) {
93
+ return doResult;
94
+ }
95
+ const response = doResult.value;
96
+
97
+ const responseFields = {
98
+ HttpMeta: { Response: response, Request: req },
99
+ };
100
+
101
+ const [result] = await M.match<
102
+ operations.AdminV1UpdateRolesResponse,
103
+ | errors.ErrorModel
104
+ | SDKError
105
+ | SDKValidationError
106
+ | UnexpectedClientError
107
+ | InvalidRequestError
108
+ | RequestAbortedError
109
+ | RequestTimeoutError
110
+ | ConnectionError
111
+ >(
112
+ M.nil(204, operations.AdminV1UpdateRolesResponse$inboundSchema),
113
+ M.jsonErr([403, 404, 422, 429, 500], errors.ErrorModel$inboundSchema, {
114
+ ctype: "application/problem+json",
115
+ }),
116
+ M.fail(["4XX", "5XX"]),
117
+ )(response, req, { extraFields: responseFields });
118
+ if (!result.ok) {
119
+ return result;
120
+ }
121
+
122
+ return result;
123
+ }
package/src/lib/config.ts CHANGED
@@ -55,8 +55,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
55
55
  export const SDK_METADATA = {
56
56
  language: "typescript",
57
57
  openapiDocVersion: "1.0.0",
58
- sdkVersion: "0.12.3",
59
- genVersion: "2.438.15",
58
+ sdkVersion: "0.12.5",
59
+ genVersion: "2.442.11",
60
60
  userAgent:
61
- "speakeasy-sdk/typescript 0.12.3 2.438.15 1.0.0 @steamsets/client-ts",
61
+ "speakeasy-sdk/typescript 0.12.5 2.442.11 1.0.0 @steamsets/client-ts",
62
62
  } as const;
@@ -212,10 +212,6 @@ export type AccountInfoBody = {
212
212
  * The number of game bans
213
213
  */
214
214
  gameBans: number;
215
- /**
216
- * Whether the account is hidden in the leaderboards
217
- */
218
- hidden: boolean;
219
215
  /**
220
216
  * The images of the account
221
217
  */
@@ -269,6 +265,10 @@ export type AccountInfoBody = {
269
265
  * The roles of the account
270
266
  */
271
267
  roles: Array<Role> | null;
268
+ /**
269
+ * The shortlink domain of the account, is to be used with their steamsets vanity
270
+ */
271
+ shortlinkDomain: string | null;
272
272
  state?: LeaderboardState | null | undefined;
273
273
  /**
274
274
  * The steam id
@@ -410,7 +410,6 @@ export const AccountInfoBody$inboundSchema: z.ZodType<
410
410
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
411
411
  ),
412
412
  gameBans: z.number().int(),
413
- hidden: z.boolean(),
414
413
  images: z.nullable(z.array(Image$inboundSchema)),
415
414
  lastBanDate: z.nullable(
416
415
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
@@ -427,6 +426,7 @@ export const AccountInfoBody$inboundSchema: z.ZodType<
427
426
  privacy: Privacy$inboundSchema,
428
427
  region: z.nullable(LeaderboardRegion$inboundSchema).optional(),
429
428
  roles: z.nullable(z.array(Role$inboundSchema)),
429
+ shortlinkDomain: z.nullable(z.string()),
430
430
  state: z.nullable(LeaderboardState$inboundSchema).optional(),
431
431
  steamId: z.string(),
432
432
  steamSetsScore: z.number().int(),
@@ -477,7 +477,6 @@ export type AccountInfoBody$Outbound = {
477
477
  friends: number;
478
478
  friendsUpdatedAt: string | null;
479
479
  gameBans: number;
480
- hidden: boolean;
481
480
  images: Array<Image$Outbound> | null;
482
481
  lastBanDate: string | null;
483
482
  level: number;
@@ -492,6 +491,7 @@ export type AccountInfoBody$Outbound = {
492
491
  privacy: string;
493
492
  region?: LeaderboardRegion$Outbound | null | undefined;
494
493
  roles: Array<Role$Outbound> | null;
494
+ shortlinkDomain: string | null;
495
495
  state?: LeaderboardState$Outbound | null | undefined;
496
496
  steamId: string;
497
497
  steamSetsScore: number;
@@ -540,7 +540,6 @@ export const AccountInfoBody$outboundSchema: z.ZodType<
540
540
  friends: z.number().int(),
541
541
  friendsUpdatedAt: z.nullable(z.date().transform(v => v.toISOString())),
542
542
  gameBans: z.number().int(),
543
- hidden: z.boolean(),
544
543
  images: z.nullable(z.array(Image$outboundSchema)),
545
544
  lastBanDate: z.nullable(z.date().transform(v => v.toISOString())),
546
545
  level: z.number().int(),
@@ -555,6 +554,7 @@ export const AccountInfoBody$outboundSchema: z.ZodType<
555
554
  privacy: Privacy$outboundSchema,
556
555
  region: z.nullable(LeaderboardRegion$outboundSchema).optional(),
557
556
  roles: z.nullable(z.array(Role$outboundSchema)),
557
+ shortlinkDomain: z.nullable(z.string()),
558
558
  state: z.nullable(LeaderboardState$outboundSchema).optional(),
559
559
  steamId: z.string(),
560
560
  steamSetsScore: z.number().int(),
@@ -49,11 +49,14 @@ export * from "./v1accountleaderboardhistoryresponsebody.js";
49
49
  export * from "./v1accountleaderboardrequestbody.js";
50
50
  export * from "./v1accountleaderboardresponsebody.js";
51
51
  export * from "./v1accountlocationupdate.js";
52
+ export * from "./v1accountmetaresponsebody.js";
52
53
  export * from "./v1accountnameupdate.js";
53
54
  export * from "./v1accountplaytimedatapoint.js";
54
55
  export * from "./v1accountqueuerequestbody.js";
55
56
  export * from "./v1accountsappsresponsebody.js";
56
57
  export * from "./v1admingetaccountresponsebody.js";
58
+ export * from "./v1adminupdateresourcesrequestbody.js";
59
+ export * from "./v1adminupdaterolessrequestbody.js";
57
60
  export * from "./v1appbadge.js";
58
61
  export * from "./v1appdetail.js";
59
62
  export * from "./v1appitem.js";
@@ -93,10 +93,6 @@ export type LeaderboardAccount = {
93
93
  * The number of game bans
94
94
  */
95
95
  gameBans: number;
96
- /**
97
- * Whether the account is hidden in the leaderboards
98
- */
99
- hidden: boolean;
100
96
  /**
101
97
  * The level of the account
102
98
  */
@@ -187,7 +183,6 @@ export const LeaderboardAccount$inboundSchema: z.ZodType<
187
183
  foilBadges: z.number().int(),
188
184
  friends: z.number().int(),
189
185
  gameBans: z.number().int(),
190
- hidden: z.boolean(),
191
186
  level: z.number().int(),
192
187
  limitedApps: z.number().int(),
193
188
  name: z.string(),
@@ -226,7 +221,6 @@ export type LeaderboardAccount$Outbound = {
226
221
  foilBadges: number;
227
222
  friends: number;
228
223
  gameBans: number;
229
- hidden: boolean;
230
224
  level: number;
231
225
  limitedApps: number;
232
226
  name: string;
@@ -269,7 +263,6 @@ export const LeaderboardAccount$outboundSchema: z.ZodType<
269
263
  foilBadges: z.number().int(),
270
264
  friends: z.number().int(),
271
265
  gameBans: z.number().int(),
272
- hidden: z.boolean(),
273
266
  level: z.number().int(),
274
267
  limitedApps: z.number().int(),
275
268
  name: z.string(),
@@ -94,10 +94,6 @@ export type V1AccountFriend = {
94
94
  * The number of game bans
95
95
  */
96
96
  gameBans: number;
97
- /**
98
- * Whether the account is hidden in the leaderboards
99
- */
100
- hidden: boolean;
101
97
  /**
102
98
  * The level of the account
103
99
  */
@@ -191,7 +187,6 @@ export const V1AccountFriend$inboundSchema: z.ZodType<
191
187
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
192
188
  ),
193
189
  gameBans: z.number().int(),
194
- hidden: z.boolean(),
195
190
  level: z.number().int(),
196
191
  limitedApps: z.number().int(),
197
192
  name: z.string(),
@@ -231,7 +226,6 @@ export type V1AccountFriend$Outbound = {
231
226
  friends: number;
232
227
  friendsSince: string | null;
233
228
  gameBans: number;
234
- hidden: boolean;
235
229
  level: number;
236
230
  limitedApps: number;
237
231
  name: string;
@@ -275,7 +269,6 @@ export const V1AccountFriend$outboundSchema: z.ZodType<
275
269
  friends: z.number().int(),
276
270
  friendsSince: z.nullable(z.date().transform(v => v.toISOString())),
277
271
  gameBans: z.number().int(),
278
- hidden: z.boolean(),
279
272
  level: z.number().int(),
280
273
  limitedApps: z.number().int(),
281
274
  name: z.string(),
@@ -104,10 +104,6 @@ export type V1AccountLeaderboardAccount = {
104
104
  * The number of game bans
105
105
  */
106
106
  gameBans: number;
107
- /**
108
- * Whether the account is hidden in the leaderboards
109
- */
110
- hidden: boolean;
111
107
  /**
112
108
  * The level of the account
113
109
  */
@@ -204,7 +200,6 @@ export const V1AccountLeaderboardAccount$inboundSchema: z.ZodType<
204
200
  foilBadges: z.number().int(),
205
201
  friends: z.number().int(),
206
202
  gameBans: z.number().int(),
207
- hidden: z.boolean(),
208
203
  level: z.number().int(),
209
204
  limitedApps: z.number().int(),
210
205
  name: z.string(),
@@ -246,7 +241,6 @@ export type V1AccountLeaderboardAccount$Outbound = {
246
241
  foilBadges: number;
247
242
  friends: number;
248
243
  gameBans: number;
249
- hidden: boolean;
250
244
  level: number;
251
245
  limitedApps: number;
252
246
  name: string;
@@ -292,7 +286,6 @@ export const V1AccountLeaderboardAccount$outboundSchema: z.ZodType<
292
286
  foilBadges: z.number().int(),
293
287
  friends: z.number().int(),
294
288
  gameBans: z.number().int(),
295
- hidden: z.boolean(),
296
289
  level: z.number().int(),
297
290
  limitedApps: z.number().int(),
298
291
  name: z.string(),
@@ -0,0 +1,57 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+
8
+ export type V1AccountMetaResponseBody = {
9
+ /**
10
+ * A URL to the JSON Schema for this object.
11
+ */
12
+ dollarSchema?: string | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export const V1AccountMetaResponseBody$inboundSchema: z.ZodType<
17
+ V1AccountMetaResponseBody,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ $schema: z.string().optional(),
22
+ }).transform((v) => {
23
+ return remap$(v, {
24
+ "$schema": "dollarSchema",
25
+ });
26
+ });
27
+
28
+ /** @internal */
29
+ export type V1AccountMetaResponseBody$Outbound = {
30
+ $schema?: string | undefined;
31
+ };
32
+
33
+ /** @internal */
34
+ export const V1AccountMetaResponseBody$outboundSchema: z.ZodType<
35
+ V1AccountMetaResponseBody$Outbound,
36
+ z.ZodTypeDef,
37
+ V1AccountMetaResponseBody
38
+ > = z.object({
39
+ dollarSchema: z.string().optional(),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ dollarSchema: "$schema",
43
+ });
44
+ });
45
+
46
+ /**
47
+ * @internal
48
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
49
+ */
50
+ export namespace V1AccountMetaResponseBody$ {
51
+ /** @deprecated use `V1AccountMetaResponseBody$inboundSchema` instead. */
52
+ export const inboundSchema = V1AccountMetaResponseBody$inboundSchema;
53
+ /** @deprecated use `V1AccountMetaResponseBody$outboundSchema` instead. */
54
+ export const outboundSchema = V1AccountMetaResponseBody$outboundSchema;
55
+ /** @deprecated use `V1AccountMetaResponseBody$Outbound` instead. */
56
+ export type Outbound = V1AccountMetaResponseBody$Outbound;
57
+ }
@@ -0,0 +1,131 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+ import {
8
+ IDStruct,
9
+ IDStruct$inboundSchema,
10
+ IDStruct$Outbound,
11
+ IDStruct$outboundSchema,
12
+ } from "./idstruct.js";
13
+ import {
14
+ Resource,
15
+ Resource$inboundSchema,
16
+ Resource$Outbound,
17
+ Resource$outboundSchema,
18
+ } from "./resource.js";
19
+ import {
20
+ VanityStruct,
21
+ VanityStruct$inboundSchema,
22
+ VanityStruct$Outbound,
23
+ VanityStruct$outboundSchema,
24
+ } from "./vanitystruct.js";
25
+
26
+ export const V1AdminUpdateResourcesRequestBodyResource = {
27
+ AnimatedAvatar: "animated_avatar",
28
+ AutoRefresh: "auto_refresh",
29
+ AvatarFrame: "avatar_frame",
30
+ Background: "background",
31
+ BetaAccess: "beta_access",
32
+ CustomVanity: "custom_vanity",
33
+ GoToLeaderboardEntry: "go_to_leaderboard_entry",
34
+ MaxLeaderboardEntries: "max_leaderboard_entries",
35
+ MiniBackground: "mini_background",
36
+ AccountColors: "account_colors",
37
+ AccountRefreshRate: "account_refresh_rate",
38
+ SiteColor: "site_color",
39
+ SocialLinks: "social_links",
40
+ Theme: "theme",
41
+ VanityLength: "vanity_length",
42
+ DeveloperApps: "developer_apps",
43
+ AccountQueues: "account_queues",
44
+ ShortLinkDomain: "short_link_domain",
45
+ } as const;
46
+ export type V1AdminUpdateResourcesRequestBodyResource = ClosedEnum<
47
+ typeof V1AdminUpdateResourcesRequestBodyResource
48
+ >;
49
+
50
+ export type V1AdminUpdateResourcesRequestBody = {
51
+ id?: IDStruct | undefined;
52
+ /**
53
+ * The resources to add for this account
54
+ */
55
+ newResources: Array<Resource> | null;
56
+ resource: Array<V1AdminUpdateResourcesRequestBodyResource> | null;
57
+ vanity?: VanityStruct | undefined;
58
+ };
59
+
60
+ /** @internal */
61
+ export const V1AdminUpdateResourcesRequestBodyResource$inboundSchema:
62
+ z.ZodNativeEnum<typeof V1AdminUpdateResourcesRequestBodyResource> = z
63
+ .nativeEnum(V1AdminUpdateResourcesRequestBodyResource);
64
+
65
+ /** @internal */
66
+ export const V1AdminUpdateResourcesRequestBodyResource$outboundSchema:
67
+ z.ZodNativeEnum<typeof V1AdminUpdateResourcesRequestBodyResource> =
68
+ V1AdminUpdateResourcesRequestBodyResource$inboundSchema;
69
+
70
+ /**
71
+ * @internal
72
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
73
+ */
74
+ export namespace V1AdminUpdateResourcesRequestBodyResource$ {
75
+ /** @deprecated use `V1AdminUpdateResourcesRequestBodyResource$inboundSchema` instead. */
76
+ export const inboundSchema =
77
+ V1AdminUpdateResourcesRequestBodyResource$inboundSchema;
78
+ /** @deprecated use `V1AdminUpdateResourcesRequestBodyResource$outboundSchema` instead. */
79
+ export const outboundSchema =
80
+ V1AdminUpdateResourcesRequestBodyResource$outboundSchema;
81
+ }
82
+
83
+ /** @internal */
84
+ export const V1AdminUpdateResourcesRequestBody$inboundSchema: z.ZodType<
85
+ V1AdminUpdateResourcesRequestBody,
86
+ z.ZodTypeDef,
87
+ unknown
88
+ > = z.object({
89
+ id: IDStruct$inboundSchema.optional(),
90
+ newResources: z.nullable(z.array(Resource$inboundSchema)),
91
+ resource: z.nullable(
92
+ z.array(V1AdminUpdateResourcesRequestBodyResource$inboundSchema),
93
+ ),
94
+ vanity: VanityStruct$inboundSchema.optional(),
95
+ });
96
+
97
+ /** @internal */
98
+ export type V1AdminUpdateResourcesRequestBody$Outbound = {
99
+ id?: IDStruct$Outbound | undefined;
100
+ newResources: Array<Resource$Outbound> | null;
101
+ resource: Array<string> | null;
102
+ vanity?: VanityStruct$Outbound | undefined;
103
+ };
104
+
105
+ /** @internal */
106
+ export const V1AdminUpdateResourcesRequestBody$outboundSchema: z.ZodType<
107
+ V1AdminUpdateResourcesRequestBody$Outbound,
108
+ z.ZodTypeDef,
109
+ V1AdminUpdateResourcesRequestBody
110
+ > = z.object({
111
+ id: IDStruct$outboundSchema.optional(),
112
+ newResources: z.nullable(z.array(Resource$outboundSchema)),
113
+ resource: z.nullable(
114
+ z.array(V1AdminUpdateResourcesRequestBodyResource$outboundSchema),
115
+ ),
116
+ vanity: VanityStruct$outboundSchema.optional(),
117
+ });
118
+
119
+ /**
120
+ * @internal
121
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
122
+ */
123
+ export namespace V1AdminUpdateResourcesRequestBody$ {
124
+ /** @deprecated use `V1AdminUpdateResourcesRequestBody$inboundSchema` instead. */
125
+ export const inboundSchema = V1AdminUpdateResourcesRequestBody$inboundSchema;
126
+ /** @deprecated use `V1AdminUpdateResourcesRequestBody$outboundSchema` instead. */
127
+ export const outboundSchema =
128
+ V1AdminUpdateResourcesRequestBody$outboundSchema;
129
+ /** @deprecated use `V1AdminUpdateResourcesRequestBody$Outbound` instead. */
130
+ export type Outbound = V1AdminUpdateResourcesRequestBody$Outbound;
131
+ }
@@ -0,0 +1,152 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+ import {
8
+ IDStruct,
9
+ IDStruct$inboundSchema,
10
+ IDStruct$Outbound,
11
+ IDStruct$outboundSchema,
12
+ } from "./idstruct.js";
13
+ import {
14
+ VanityStruct,
15
+ VanityStruct$inboundSchema,
16
+ VanityStruct$Outbound,
17
+ VanityStruct$outboundSchema,
18
+ } from "./vanitystruct.js";
19
+
20
+ export const DeletedRoles = {
21
+ User: "user",
22
+ Donator: "donator",
23
+ Staff: "staff",
24
+ Developer: "developer",
25
+ Partner: "partner",
26
+ Owner: "owner",
27
+ Amethyst: "amethyst",
28
+ Amber: "amber",
29
+ Emerald: "emerald",
30
+ Sapphire: "sapphire",
31
+ Ruby: "ruby",
32
+ Diamond: "diamond",
33
+ Contributor: "contributor",
34
+ EarlySupporter: "early_supporter",
35
+ Beta: "beta",
36
+ Translator: "translator",
37
+ Top100: "top_100",
38
+ BadgeScout: "badge_scout",
39
+ } as const;
40
+ export type DeletedRoles = ClosedEnum<typeof DeletedRoles>;
41
+
42
+ export const NewRoles = {
43
+ User: "user",
44
+ Donator: "donator",
45
+ Staff: "staff",
46
+ Developer: "developer",
47
+ Partner: "partner",
48
+ Owner: "owner",
49
+ Amethyst: "amethyst",
50
+ Amber: "amber",
51
+ Emerald: "emerald",
52
+ Sapphire: "sapphire",
53
+ Ruby: "ruby",
54
+ Diamond: "diamond",
55
+ Contributor: "contributor",
56
+ EarlySupporter: "early_supporter",
57
+ Beta: "beta",
58
+ Translator: "translator",
59
+ Top100: "top_100",
60
+ BadgeScout: "badge_scout",
61
+ } as const;
62
+ export type NewRoles = ClosedEnum<typeof NewRoles>;
63
+
64
+ export type V1AdminUpdateRolessRequestBody = {
65
+ deletedRoles: Array<DeletedRoles> | null;
66
+ id?: IDStruct | undefined;
67
+ newRoles: Array<NewRoles> | null;
68
+ vanity?: VanityStruct | undefined;
69
+ };
70
+
71
+ /** @internal */
72
+ export const DeletedRoles$inboundSchema: z.ZodNativeEnum<typeof DeletedRoles> =
73
+ z.nativeEnum(DeletedRoles);
74
+
75
+ /** @internal */
76
+ export const DeletedRoles$outboundSchema: z.ZodNativeEnum<typeof DeletedRoles> =
77
+ DeletedRoles$inboundSchema;
78
+
79
+ /**
80
+ * @internal
81
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
82
+ */
83
+ export namespace DeletedRoles$ {
84
+ /** @deprecated use `DeletedRoles$inboundSchema` instead. */
85
+ export const inboundSchema = DeletedRoles$inboundSchema;
86
+ /** @deprecated use `DeletedRoles$outboundSchema` instead. */
87
+ export const outboundSchema = DeletedRoles$outboundSchema;
88
+ }
89
+
90
+ /** @internal */
91
+ export const NewRoles$inboundSchema: z.ZodNativeEnum<typeof NewRoles> = z
92
+ .nativeEnum(NewRoles);
93
+
94
+ /** @internal */
95
+ export const NewRoles$outboundSchema: z.ZodNativeEnum<typeof NewRoles> =
96
+ NewRoles$inboundSchema;
97
+
98
+ /**
99
+ * @internal
100
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
101
+ */
102
+ export namespace NewRoles$ {
103
+ /** @deprecated use `NewRoles$inboundSchema` instead. */
104
+ export const inboundSchema = NewRoles$inboundSchema;
105
+ /** @deprecated use `NewRoles$outboundSchema` instead. */
106
+ export const outboundSchema = NewRoles$outboundSchema;
107
+ }
108
+
109
+ /** @internal */
110
+ export const V1AdminUpdateRolessRequestBody$inboundSchema: z.ZodType<
111
+ V1AdminUpdateRolessRequestBody,
112
+ z.ZodTypeDef,
113
+ unknown
114
+ > = z.object({
115
+ deletedRoles: z.nullable(z.array(DeletedRoles$inboundSchema)),
116
+ id: IDStruct$inboundSchema.optional(),
117
+ newRoles: z.nullable(z.array(NewRoles$inboundSchema)),
118
+ vanity: VanityStruct$inboundSchema.optional(),
119
+ });
120
+
121
+ /** @internal */
122
+ export type V1AdminUpdateRolessRequestBody$Outbound = {
123
+ deletedRoles: Array<string> | null;
124
+ id?: IDStruct$Outbound | undefined;
125
+ newRoles: Array<string> | null;
126
+ vanity?: VanityStruct$Outbound | undefined;
127
+ };
128
+
129
+ /** @internal */
130
+ export const V1AdminUpdateRolessRequestBody$outboundSchema: z.ZodType<
131
+ V1AdminUpdateRolessRequestBody$Outbound,
132
+ z.ZodTypeDef,
133
+ V1AdminUpdateRolessRequestBody
134
+ > = z.object({
135
+ deletedRoles: z.nullable(z.array(DeletedRoles$outboundSchema)),
136
+ id: IDStruct$outboundSchema.optional(),
137
+ newRoles: z.nullable(z.array(NewRoles$outboundSchema)),
138
+ vanity: VanityStruct$outboundSchema.optional(),
139
+ });
140
+
141
+ /**
142
+ * @internal
143
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
144
+ */
145
+ export namespace V1AdminUpdateRolessRequestBody$ {
146
+ /** @deprecated use `V1AdminUpdateRolessRequestBody$inboundSchema` instead. */
147
+ export const inboundSchema = V1AdminUpdateRolessRequestBody$inboundSchema;
148
+ /** @deprecated use `V1AdminUpdateRolessRequestBody$outboundSchema` instead. */
149
+ export const outboundSchema = V1AdminUpdateRolessRequestBody$outboundSchema;
150
+ /** @deprecated use `V1AdminUpdateRolessRequestBody$Outbound` instead. */
151
+ export type Outbound = V1AdminUpdateRolessRequestBody$Outbound;
152
+ }