@steamsets/client-ts 0.12.4 → 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 (82) 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/index.d.ts +3 -0
  23. package/models/components/index.d.ts.map +1 -1
  24. package/models/components/index.js +3 -0
  25. package/models/components/index.js.map +1 -1
  26. package/models/components/v1accountmetaresponsebody.d.ts +28 -0
  27. package/models/components/v1accountmetaresponsebody.d.ts.map +1 -0
  28. package/models/components/v1accountmetaresponsebody.js +59 -0
  29. package/models/components/v1accountmetaresponsebody.js.map +1 -0
  30. package/models/components/v1adminupdateresourcesrequestbody.d.ts +111 -0
  31. package/models/components/v1adminupdateresourcesrequestbody.d.ts.map +1 -0
  32. package/models/components/v1adminupdateresourcesrequestbody.js +95 -0
  33. package/models/components/v1adminupdateresourcesrequestbody.js.map +1 -0
  34. package/models/components/v1adminupdaterolessrequestbody.d.ts +180 -0
  35. package/models/components/v1adminupdaterolessrequestbody.d.ts.map +1 -0
  36. package/models/components/v1adminupdaterolessrequestbody.js +129 -0
  37. package/models/components/v1adminupdaterolessrequestbody.js.map +1 -0
  38. package/models/operations/accountv1getembed.d.ts +37 -0
  39. package/models/operations/accountv1getembed.d.ts.map +1 -0
  40. package/models/operations/accountv1getembed.js +66 -0
  41. package/models/operations/accountv1getembed.js.map +1 -0
  42. package/models/operations/accountv1getmeta.d.ts +31 -0
  43. package/models/operations/accountv1getmeta.d.ts.map +1 -0
  44. package/models/operations/accountv1getmeta.js +66 -0
  45. package/models/operations/accountv1getmeta.js.map +1 -0
  46. package/models/operations/adminv1updateresources.d.ts +26 -0
  47. package/models/operations/adminv1updateresources.d.ts.map +1 -0
  48. package/models/operations/adminv1updateresources.js +60 -0
  49. package/models/operations/adminv1updateresources.js.map +1 -0
  50. package/models/operations/adminv1updateroles.d.ts +26 -0
  51. package/models/operations/adminv1updateroles.d.ts.map +1 -0
  52. package/models/operations/adminv1updateroles.js +60 -0
  53. package/models/operations/adminv1updateroles.js.map +1 -0
  54. package/models/operations/index.d.ts +4 -0
  55. package/models/operations/index.d.ts.map +1 -1
  56. package/models/operations/index.js +4 -0
  57. package/models/operations/index.js.map +1 -1
  58. package/package.json +1 -1
  59. package/sdk/admin.d.ts +2 -0
  60. package/sdk/admin.d.ts.map +1 -1
  61. package/sdk/admin.js +8 -0
  62. package/sdk/admin.js.map +1 -1
  63. package/sdk/sdk.d.ts +5 -1
  64. package/sdk/sdk.d.ts.map +1 -1
  65. package/sdk/sdk.js +9 -0
  66. package/sdk/sdk.js.map +1 -1
  67. package/src/funcs/accountV1GetEmbed.ts +125 -0
  68. package/src/funcs/accountV1GetMeta.ts +124 -0
  69. package/src/funcs/adminAdminV1UpdateResources.ts +123 -0
  70. package/src/funcs/adminAdminV1UpdateRoles.ts +123 -0
  71. package/src/lib/config.ts +3 -3
  72. package/src/models/components/index.ts +3 -0
  73. package/src/models/components/v1accountmetaresponsebody.ts +57 -0
  74. package/src/models/components/v1adminupdateresourcesrequestbody.ts +131 -0
  75. package/src/models/components/v1adminupdaterolessrequestbody.ts +152 -0
  76. package/src/models/operations/accountv1getembed.ts +68 -0
  77. package/src/models/operations/accountv1getmeta.ts +68 -0
  78. package/src/models/operations/adminv1updateresources.ts +55 -0
  79. package/src/models/operations/adminv1updateroles.ts +55 -0
  80. package/src/models/operations/index.ts +4 -0
  81. package/src/sdk/admin.ts +24 -0
  82. 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 adminAdminV1UpdateResources(
27
+ client: SteamSetsCore,
28
+ request: components.V1AdminUpdateResourcesRequestBody,
29
+ options?: RequestOptions,
30
+ ): Promise<
31
+ Result<
32
+ operations.AdminV1UpdateResourcesResponse,
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.V1AdminUpdateResourcesRequestBody$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/UpdateResources")();
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-resources",
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.AdminV1UpdateResourcesResponse,
103
+ | errors.ErrorModel
104
+ | SDKError
105
+ | SDKValidationError
106
+ | UnexpectedClientError
107
+ | InvalidRequestError
108
+ | RequestAbortedError
109
+ | RequestTimeoutError
110
+ | ConnectionError
111
+ >(
112
+ M.nil(204, operations.AdminV1UpdateResourcesResponse$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
+ }
@@ -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.4",
59
- genVersion: "2.438.15",
58
+ sdkVersion: "0.12.5",
59
+ genVersion: "2.442.11",
60
60
  userAgent:
61
- "speakeasy-sdk/typescript 0.12.4 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;
@@ -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";
@@ -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
+ }
@@ -0,0 +1,68 @@
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
+ import * as components from "../components/index.js";
8
+
9
+ export type AccountV1GetEmbedResponse = {
10
+ httpMeta: components.HTTPMetadata;
11
+ /**
12
+ * OK
13
+ */
14
+ string?: string | undefined;
15
+ headers: { [k: string]: Array<string> };
16
+ };
17
+
18
+ /** @internal */
19
+ export const AccountV1GetEmbedResponse$inboundSchema: z.ZodType<
20
+ AccountV1GetEmbedResponse,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ HttpMeta: components.HTTPMetadata$inboundSchema,
25
+ string: z.string().optional(),
26
+ Headers: z.record(z.array(z.string())),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ "HttpMeta": "httpMeta",
30
+ "Headers": "headers",
31
+ });
32
+ });
33
+
34
+ /** @internal */
35
+ export type AccountV1GetEmbedResponse$Outbound = {
36
+ HttpMeta: components.HTTPMetadata$Outbound;
37
+ string?: string | undefined;
38
+ Headers: { [k: string]: Array<string> };
39
+ };
40
+
41
+ /** @internal */
42
+ export const AccountV1GetEmbedResponse$outboundSchema: z.ZodType<
43
+ AccountV1GetEmbedResponse$Outbound,
44
+ z.ZodTypeDef,
45
+ AccountV1GetEmbedResponse
46
+ > = z.object({
47
+ httpMeta: components.HTTPMetadata$outboundSchema,
48
+ string: z.string().optional(),
49
+ headers: z.record(z.array(z.string())),
50
+ }).transform((v) => {
51
+ return remap$(v, {
52
+ httpMeta: "HttpMeta",
53
+ headers: "Headers",
54
+ });
55
+ });
56
+
57
+ /**
58
+ * @internal
59
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
+ */
61
+ export namespace AccountV1GetEmbedResponse$ {
62
+ /** @deprecated use `AccountV1GetEmbedResponse$inboundSchema` instead. */
63
+ export const inboundSchema = AccountV1GetEmbedResponse$inboundSchema;
64
+ /** @deprecated use `AccountV1GetEmbedResponse$outboundSchema` instead. */
65
+ export const outboundSchema = AccountV1GetEmbedResponse$outboundSchema;
66
+ /** @deprecated use `AccountV1GetEmbedResponse$Outbound` instead. */
67
+ export type Outbound = AccountV1GetEmbedResponse$Outbound;
68
+ }