@steamsets/client-ts 0.14.24 → 0.14.26

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 (140) hide show
  1. package/README.md +4 -0
  2. package/docs/sdks/account/README.md +79 -0
  3. package/docs/sdks/connection/README.md +79 -0
  4. package/docs/sdks/connections/README.md +3 -3
  5. package/funcs/accountAccountV1ConnectionReconnect.d.ts +11 -0
  6. package/funcs/accountAccountV1ConnectionReconnect.d.ts.map +1 -0
  7. package/funcs/accountAccountV1ConnectionReconnect.js +113 -0
  8. package/funcs/accountAccountV1ConnectionReconnect.js.map +1 -0
  9. package/funcs/accountVerifyEmail.js +3 -3
  10. package/funcs/accountVerifyEmail.js.map +1 -1
  11. package/funcs/connectionAccountV1ConnectionReconnect.d.ts +11 -0
  12. package/funcs/connectionAccountV1ConnectionReconnect.d.ts.map +1 -0
  13. package/funcs/connectionAccountV1ConnectionReconnect.js +113 -0
  14. package/funcs/connectionAccountV1ConnectionReconnect.js.map +1 -0
  15. package/funcs/connectionsConnect.d.ts +1 -1
  16. package/funcs/connectionsConnect.d.ts.map +1 -1
  17. package/funcs/connectionsConnect.js +2 -2
  18. package/funcs/connectionsConnect.js.map +1 -1
  19. package/funcs/sessionLogin.d.ts.map +1 -1
  20. package/funcs/sessionLogin.js +1 -0
  21. package/funcs/sessionLogin.js.map +1 -1
  22. package/funcs/settingsUpdate.js +3 -3
  23. package/funcs/settingsUpdate.js.map +1 -1
  24. package/funcs/settingsVerifyEmail.js +3 -3
  25. package/funcs/settingsVerifyEmail.js.map +1 -1
  26. package/jsr.json +1 -1
  27. package/lib/config.d.ts +3 -3
  28. package/lib/config.js +3 -3
  29. package/models/components/connection.d.ts +8 -8
  30. package/models/components/connection.d.ts.map +1 -1
  31. package/models/components/connection.js +13 -14
  32. package/models/components/connection.js.map +1 -1
  33. package/models/components/index.d.ts +2 -2
  34. package/models/components/index.d.ts.map +1 -1
  35. package/models/components/index.js +2 -2
  36. package/models/components/index.js.map +1 -1
  37. package/models/components/leaderboardaccount.d.ts +36 -1
  38. package/models/components/leaderboardaccount.d.ts.map +1 -1
  39. package/models/components/leaderboardaccount.js +26 -3
  40. package/models/components/leaderboardaccount.js.map +1 -1
  41. package/models/components/v1accountfriend.d.ts +36 -1
  42. package/models/components/v1accountfriend.d.ts.map +1 -1
  43. package/models/components/v1accountfriend.js +27 -3
  44. package/models/components/v1accountfriend.js.map +1 -1
  45. package/models/components/v1accountinforesponsebody.d.ts +8 -8
  46. package/models/components/v1accountinforesponsebody.d.ts.map +1 -1
  47. package/models/components/v1accountinforesponsebody.js +13 -14
  48. package/models/components/v1accountinforesponsebody.js.map +1 -1
  49. package/models/components/v1accountleaderboardaccount.d.ts +36 -1
  50. package/models/components/v1accountleaderboardaccount.d.ts.map +1 -1
  51. package/models/components/v1accountleaderboardaccount.js +26 -3
  52. package/models/components/v1accountleaderboardaccount.js.map +1 -1
  53. package/models/components/v1connectrequestbody.d.ts +87 -0
  54. package/models/components/v1connectrequestbody.d.ts.map +1 -0
  55. package/models/components/v1connectrequestbody.js +90 -0
  56. package/models/components/v1connectrequestbody.js.map +1 -0
  57. package/models/components/v1connectresponsebody.d.ts +42 -0
  58. package/models/components/v1connectresponsebody.d.ts.map +1 -0
  59. package/models/components/{v1verifyemailresponsebody.js → v1connectresponsebody.js} +21 -17
  60. package/models/components/v1connectresponsebody.js.map +1 -0
  61. package/models/components/v1createsessionbody.d.ts +15 -0
  62. package/models/components/v1createsessionbody.d.ts.map +1 -1
  63. package/models/components/v1createsessionbody.js +6 -0
  64. package/models/components/v1createsessionbody.js.map +1 -1
  65. package/models/components/v1getsettingsbody.d.ts +40 -0
  66. package/models/components/v1getsettingsbody.d.ts.map +1 -1
  67. package/models/components/v1getsettingsbody.js +26 -1
  68. package/models/components/v1getsettingsbody.js.map +1 -1
  69. package/models/operations/accountv1connectionconnect.d.ts +2 -2
  70. package/models/operations/accountv1connectionconnect.d.ts.map +1 -1
  71. package/models/operations/accountv1connectionconnect.js +4 -4
  72. package/models/operations/accountv1connectionconnect.js.map +1 -1
  73. package/models/operations/accountv1connectionreconnect.d.ts +35 -0
  74. package/models/operations/accountv1connectionreconnect.d.ts.map +1 -0
  75. package/models/operations/accountv1connectionreconnect.js +75 -0
  76. package/models/operations/accountv1connectionreconnect.js.map +1 -0
  77. package/models/operations/accountv1sessionlogin.d.ts +6 -0
  78. package/models/operations/accountv1sessionlogin.d.ts.map +1 -1
  79. package/models/operations/accountv1sessionlogin.js +4 -0
  80. package/models/operations/accountv1sessionlogin.js.map +1 -1
  81. package/models/operations/accountv1settingsupdate.d.ts +6 -5
  82. package/models/operations/accountv1settingsupdate.d.ts.map +1 -1
  83. package/models/operations/accountv1settingsupdate.js +4 -6
  84. package/models/operations/accountv1settingsupdate.js.map +1 -1
  85. package/models/operations/accountv1settingsverfyemail.d.ts +6 -5
  86. package/models/operations/accountv1settingsverfyemail.d.ts.map +1 -1
  87. package/models/operations/accountv1settingsverfyemail.js +4 -6
  88. package/models/operations/accountv1settingsverfyemail.js.map +1 -1
  89. package/models/operations/index.d.ts +1 -0
  90. package/models/operations/index.d.ts.map +1 -1
  91. package/models/operations/index.js +1 -0
  92. package/models/operations/index.js.map +1 -1
  93. package/package.json +1 -1
  94. package/sdk/account.d.ts +1 -0
  95. package/sdk/account.d.ts.map +1 -1
  96. package/sdk/account.js +4 -0
  97. package/sdk/account.js.map +1 -1
  98. package/sdk/connection.d.ts +1 -0
  99. package/sdk/connection.d.ts.map +1 -1
  100. package/sdk/connection.js +4 -0
  101. package/sdk/connection.js.map +1 -1
  102. package/sdk/connections.d.ts +1 -1
  103. package/sdk/connections.d.ts.map +1 -1
  104. package/sdk/connections.js.map +1 -1
  105. package/src/funcs/accountAccountV1ConnectionReconnect.ts +149 -0
  106. package/src/funcs/accountVerifyEmail.ts +3 -3
  107. package/src/funcs/connectionAccountV1ConnectionReconnect.ts +149 -0
  108. package/src/funcs/connectionsConnect.ts +3 -3
  109. package/src/funcs/sessionLogin.ts +1 -0
  110. package/src/funcs/settingsUpdate.ts +3 -3
  111. package/src/funcs/settingsVerifyEmail.ts +3 -3
  112. package/src/lib/config.ts +3 -3
  113. package/src/models/components/connection.ts +16 -14
  114. package/src/models/components/index.ts +2 -2
  115. package/src/models/components/leaderboardaccount.ts +40 -3
  116. package/src/models/components/v1accountfriend.ts +36 -3
  117. package/src/models/components/v1accountinforesponsebody.ts +18 -14
  118. package/src/models/components/v1accountleaderboardaccount.ts +41 -3
  119. package/src/models/components/v1connectrequestbody.ts +114 -0
  120. package/src/models/components/v1connectresponsebody.ts +92 -0
  121. package/src/models/components/v1createsessionbody.ts +21 -0
  122. package/src/models/components/v1getsettingsbody.ts +44 -0
  123. package/src/models/operations/accountv1connectionconnect.ts +6 -8
  124. package/src/models/operations/accountv1connectionreconnect.ts +94 -0
  125. package/src/models/operations/accountv1sessionlogin.ts +6 -0
  126. package/src/models/operations/accountv1settingsupdate.ts +6 -15
  127. package/src/models/operations/accountv1settingsverfyemail.ts +6 -13
  128. package/src/models/operations/index.ts +1 -0
  129. package/src/sdk/account.ts +12 -0
  130. package/src/sdk/connection.ts +12 -0
  131. package/src/sdk/connections.ts +1 -1
  132. package/models/components/v1updatesettingsresponsebody.d.ts +0 -32
  133. package/models/components/v1updatesettingsresponsebody.d.ts.map +0 -1
  134. package/models/components/v1updatesettingsresponsebody.js +0 -68
  135. package/models/components/v1updatesettingsresponsebody.js.map +0 -1
  136. package/models/components/v1verifyemailresponsebody.d.ts +0 -32
  137. package/models/components/v1verifyemailresponsebody.d.ts.map +0 -1
  138. package/models/components/v1verifyemailresponsebody.js.map +0 -1
  139. package/src/models/components/v1updatesettingsresponsebody.ts +0 -80
  140. package/src/models/components/v1verifyemailresponsebody.ts +0 -78
@@ -0,0 +1,149 @@
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 { SDKError } from "../models/errors/sdkerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ export async function connectionAccountV1ConnectionReconnect(
28
+ client: SteamSetsCore,
29
+ request: components.V1ReconnectRequestBody,
30
+ options?: RequestOptions,
31
+ ): Promise<
32
+ Result<
33
+ operations.AccountV1ConnectionReconnectResponse,
34
+ | errors.ErrorModel
35
+ | errors.ErrorModel
36
+ | SDKError
37
+ | SDKValidationError
38
+ | UnexpectedClientError
39
+ | InvalidRequestError
40
+ | RequestAbortedError
41
+ | RequestTimeoutError
42
+ | ConnectionError
43
+ >
44
+ > {
45
+ const parsed = safeParse(
46
+ request,
47
+ (value) => components.V1ReconnectRequestBody$outboundSchema.parse(value),
48
+ "Input validation failed",
49
+ );
50
+ if (!parsed.ok) {
51
+ return parsed;
52
+ }
53
+ const payload = parsed.value;
54
+ const body = encodeJSON("body", payload, { explode: true });
55
+
56
+ const path = pathToFunc("/account.v1.AccountService/Reconnect")();
57
+
58
+ const headers = new Headers(compactMap({
59
+ "Content-Type": "application/json",
60
+ Accept: "application/json",
61
+ }));
62
+
63
+ const secConfig = await extractSecurity(client._options.token);
64
+ const securityInput = secConfig == null ? {} : { token: secConfig };
65
+ const requestSecurity = resolveGlobalSecurity(securityInput);
66
+
67
+ const context = {
68
+ operationID: "account.v1.connection.reconnect",
69
+ oAuth2Scopes: [],
70
+
71
+ resolvedSecurity: requestSecurity,
72
+
73
+ securitySource: client._options.token,
74
+ retryConfig: options?.retries
75
+ || client._options.retryConfig
76
+ || {
77
+ strategy: "backoff",
78
+ backoff: {
79
+ initialInterval: 500,
80
+ maxInterval: 5000,
81
+ exponent: 1.5,
82
+ maxElapsedTime: 60000,
83
+ },
84
+ retryConnectionErrors: true,
85
+ }
86
+ || { strategy: "none" },
87
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
88
+ };
89
+
90
+ const requestRes = client._createRequest(context, {
91
+ security: requestSecurity,
92
+ method: "POST",
93
+ baseURL: options?.serverURL,
94
+ path: path,
95
+ headers: headers,
96
+ body: body,
97
+ uaHeader: "x-speakeasy-user-agent",
98
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
99
+ }, options);
100
+ if (!requestRes.ok) {
101
+ return requestRes;
102
+ }
103
+ const req = requestRes.value;
104
+
105
+ const doResult = await client._do(req, {
106
+ context,
107
+ errorCodes: ["400", "422", "4XX", "500", "5XX"],
108
+ retryConfig: context.retryConfig,
109
+ retryCodes: context.retryCodes,
110
+ });
111
+ if (!doResult.ok) {
112
+ return doResult;
113
+ }
114
+ const response = doResult.value;
115
+
116
+ const responseFields = {
117
+ HttpMeta: { Response: response, Request: req },
118
+ };
119
+
120
+ const [result] = await M.match<
121
+ operations.AccountV1ConnectionReconnectResponse,
122
+ | errors.ErrorModel
123
+ | errors.ErrorModel
124
+ | SDKError
125
+ | SDKValidationError
126
+ | UnexpectedClientError
127
+ | InvalidRequestError
128
+ | RequestAbortedError
129
+ | RequestTimeoutError
130
+ | ConnectionError
131
+ >(
132
+ M.json(200, operations.AccountV1ConnectionReconnectResponse$inboundSchema, {
133
+ key: "V1ReconnectResponseBody",
134
+ }),
135
+ M.jsonErr([400, 422], errors.ErrorModel$inboundSchema, {
136
+ ctype: "application/problem+json",
137
+ }),
138
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
139
+ ctype: "application/problem+json",
140
+ }),
141
+ M.fail("4XX"),
142
+ M.fail("5XX"),
143
+ )(response, req, { extraFields: responseFields });
144
+ if (!result.ok) {
145
+ return result;
146
+ }
147
+
148
+ return result;
149
+ }
@@ -26,7 +26,7 @@ import { Result } from "../types/fp.js";
26
26
 
27
27
  export async function connectionsConnect(
28
28
  client: SteamSetsCore,
29
- request: components.V1ReconnectRequestBody,
29
+ request: components.V1ConnectRequestBody,
30
30
  options?: RequestOptions,
31
31
  ): Promise<
32
32
  Result<
@@ -44,7 +44,7 @@ export async function connectionsConnect(
44
44
  > {
45
45
  const parsed = safeParse(
46
46
  request,
47
- (value) => components.V1ReconnectRequestBody$outboundSchema.parse(value),
47
+ (value) => components.V1ConnectRequestBody$outboundSchema.parse(value),
48
48
  "Input validation failed",
49
49
  );
50
50
  if (!parsed.ok) {
@@ -130,7 +130,7 @@ export async function connectionsConnect(
130
130
  | ConnectionError
131
131
  >(
132
132
  M.json(200, operations.AccountV1ConnectionConnectResponse$inboundSchema, {
133
- key: "V1ReconnectResponseBody",
133
+ key: "V1ConnectResponseBody",
134
134
  }),
135
135
  M.jsonErr([400, 422], errors.ErrorModel$inboundSchema, {
136
136
  ctype: "application/problem+json",
@@ -139,6 +139,7 @@ export async function sessionLogin(
139
139
  | ConnectionError
140
140
  >(
141
141
  M.json(200, operations.AccountV1SessionLoginResponse$inboundSchema, {
142
+ hdrs: true,
142
143
  key: "V1LoginResponseBody",
143
144
  }),
144
145
  M.jsonErr([400, 422, 429], errors.ErrorModel$inboundSchema, {
@@ -59,7 +59,7 @@ export async function settingsUpdate(
59
59
 
60
60
  const headers = new Headers(compactMap({
61
61
  "Content-Type": "application/json",
62
- Accept: "application/json",
62
+ Accept: "application/problem+json",
63
63
  "X-Forwarded-For": encodeSimple(
64
64
  "X-Forwarded-For",
65
65
  payload["X-Forwarded-For"],
@@ -136,8 +136,8 @@ export async function settingsUpdate(
136
136
  | RequestTimeoutError
137
137
  | ConnectionError
138
138
  >(
139
- M.json(200, operations.AccountV1SettingsUpdateResponse$inboundSchema, {
140
- key: "V1UpdateSettingsResponseBody",
139
+ M.nil(204, operations.AccountV1SettingsUpdateResponse$inboundSchema, {
140
+ hdrs: true,
141
141
  }),
142
142
  M.jsonErr([422, 429], errors.ErrorModel$inboundSchema, {
143
143
  ctype: "application/problem+json",
@@ -57,7 +57,7 @@ export async function settingsVerifyEmail(
57
57
 
58
58
  const headers = new Headers(compactMap({
59
59
  "Content-Type": "application/json",
60
- Accept: "application/json",
60
+ Accept: "application/problem+json",
61
61
  }));
62
62
 
63
63
  const secConfig = await extractSecurity(client._options.token);
@@ -129,8 +129,8 @@ export async function settingsVerifyEmail(
129
129
  | RequestTimeoutError
130
130
  | ConnectionError
131
131
  >(
132
- M.json(200, operations.AccountV1SettingsVerfyEmailResponse$inboundSchema, {
133
- key: "V1VerifyEmailResponseBody",
132
+ M.nil(204, operations.AccountV1SettingsVerfyEmailResponse$inboundSchema, {
133
+ hdrs: true,
134
134
  }),
135
135
  M.jsonErr([404, 422, 429], errors.ErrorModel$inboundSchema, {
136
136
  ctype: "application/problem+json",
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.14.24",
59
- genVersion: "2.495.1",
58
+ sdkVersion: "0.14.26",
59
+ genVersion: "2.497.0",
60
60
  userAgent:
61
- "speakeasy-sdk/typescript 0.14.24 2.495.1 1.0.0 @steamsets/client-ts",
61
+ "speakeasy-sdk/typescript 0.14.26 2.497.0 1.0.0 @steamsets/client-ts",
62
62
  } as const;
@@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
  /**
12
12
  * The provider to connect with
13
13
  */
14
- export const Provider = {
14
+ export const ConnectionProvider = {
15
15
  Discord: "discord",
16
16
  Patreon: "patreon",
17
17
  Kick: "kick",
@@ -24,7 +24,7 @@ export const Provider = {
24
24
  /**
25
25
  * The provider to connect with
26
26
  */
27
- export type Provider = ClosedEnum<typeof Provider>;
27
+ export type ConnectionProvider = ClosedEnum<typeof ConnectionProvider>;
28
28
 
29
29
  export type Connection = {
30
30
  /**
@@ -54,7 +54,7 @@ export type Connection = {
54
54
  /**
55
55
  * The provider to connect with
56
56
  */
57
- provider: Provider;
57
+ provider: ConnectionProvider;
58
58
  /**
59
59
  * Whether the connection has been verified or not
60
60
  */
@@ -62,22 +62,24 @@ export type Connection = {
62
62
  };
63
63
 
64
64
  /** @internal */
65
- export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
66
- .nativeEnum(Provider);
65
+ export const ConnectionProvider$inboundSchema: z.ZodNativeEnum<
66
+ typeof ConnectionProvider
67
+ > = z.nativeEnum(ConnectionProvider);
67
68
 
68
69
  /** @internal */
69
- export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
70
- Provider$inboundSchema;
70
+ export const ConnectionProvider$outboundSchema: z.ZodNativeEnum<
71
+ typeof ConnectionProvider
72
+ > = ConnectionProvider$inboundSchema;
71
73
 
72
74
  /**
73
75
  * @internal
74
76
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
75
77
  */
76
- export namespace Provider$ {
77
- /** @deprecated use `Provider$inboundSchema` instead. */
78
- export const inboundSchema = Provider$inboundSchema;
79
- /** @deprecated use `Provider$outboundSchema` instead. */
80
- export const outboundSchema = Provider$outboundSchema;
78
+ export namespace ConnectionProvider$ {
79
+ /** @deprecated use `ConnectionProvider$inboundSchema` instead. */
80
+ export const inboundSchema = ConnectionProvider$inboundSchema;
81
+ /** @deprecated use `ConnectionProvider$outboundSchema` instead. */
82
+ export const outboundSchema = ConnectionProvider$outboundSchema;
81
83
  }
82
84
 
83
85
  /** @internal */
@@ -92,7 +94,7 @@ export const Connection$inboundSchema: z.ZodType<
92
94
  failed: z.boolean(),
93
95
  hide: z.boolean(),
94
96
  name: z.string(),
95
- provider: Provider$inboundSchema,
97
+ provider: ConnectionProvider$inboundSchema,
96
98
  verified: z.boolean(),
97
99
  });
98
100
 
@@ -120,7 +122,7 @@ export const Connection$outboundSchema: z.ZodType<
120
122
  failed: z.boolean(),
121
123
  hide: z.boolean(),
122
124
  name: z.string(),
123
- provider: Provider$outboundSchema,
125
+ provider: ConnectionProvider$outboundSchema,
124
126
  verified: z.boolean(),
125
127
  });
126
128
 
@@ -80,6 +80,8 @@ export * from "./v1badgesresponsebody.js";
80
80
  export * from "./v1badgetagrequestbody.js";
81
81
  export * from "./v1badgetagresponsebody.js";
82
82
  export * from "./v1badgetagsresponsebody.js";
83
+ export * from "./v1connectrequestbody.js";
84
+ export * from "./v1connectresponsebody.js";
83
85
  export * from "./v1createsessionbody.js";
84
86
  export * from "./v1deleteconnectionrequestbody.js";
85
87
  export * from "./v1deleteconnectionresponsebody.js";
@@ -115,7 +117,6 @@ export * from "./v1updateimage.js";
115
117
  export * from "./v1updateimagerequestbody.js";
116
118
  export * from "./v1updateimageresponsebody.js";
117
119
  export * from "./v1updatesettingsrequestbody.js";
118
- export * from "./v1updatesettingsresponsebody.js";
119
120
  export * from "./v1uploadedimage.js";
120
121
  export * from "./v1uploadimagesrequestbody.js";
121
122
  export * from "./v1uploadimagesresponsebody.js";
@@ -123,5 +124,4 @@ export * from "./v1vanityanalytics.js";
123
124
  export * from "./v1verifyconnectionrequestbody.js";
124
125
  export * from "./v1verifyconnectionresponsebody.js";
125
126
  export * from "./v1verifyemailrequestbody.js";
126
- export * from "./v1verifyemailresponsebody.js";
127
127
  export * from "./vanitystruct.js";
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
10
  import {
@@ -37,6 +38,21 @@ import {
37
38
  Role$outboundSchema,
38
39
  } from "./role.js";
39
40
 
41
+ /**
42
+ * The privacy of the account
43
+ */
44
+ export const LeaderboardAccountPrivacy = {
45
+ Public: "public",
46
+ Private: "private",
47
+ FriendsOnly: "friends_only",
48
+ } as const;
49
+ /**
50
+ * The privacy of the account
51
+ */
52
+ export type LeaderboardAccountPrivacy = ClosedEnum<
53
+ typeof LeaderboardAccountPrivacy
54
+ >;
55
+
40
56
  export type LeaderboardAccount = {
41
57
  /**
42
58
  * The cost of an app
@@ -131,7 +147,7 @@ export type LeaderboardAccount = {
131
147
  /**
132
148
  * The privacy of the account
133
149
  */
134
- privacy: string;
150
+ privacy: LeaderboardAccountPrivacy;
135
151
  region?: LeaderboardRegion | null | undefined;
136
152
  /**
137
153
  * The roles of the account
@@ -164,6 +180,27 @@ export type LeaderboardAccount = {
164
180
  xp: number;
165
181
  };
166
182
 
183
+ /** @internal */
184
+ export const LeaderboardAccountPrivacy$inboundSchema: z.ZodNativeEnum<
185
+ typeof LeaderboardAccountPrivacy
186
+ > = z.nativeEnum(LeaderboardAccountPrivacy);
187
+
188
+ /** @internal */
189
+ export const LeaderboardAccountPrivacy$outboundSchema: z.ZodNativeEnum<
190
+ typeof LeaderboardAccountPrivacy
191
+ > = LeaderboardAccountPrivacy$inboundSchema;
192
+
193
+ /**
194
+ * @internal
195
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
196
+ */
197
+ export namespace LeaderboardAccountPrivacy$ {
198
+ /** @deprecated use `LeaderboardAccountPrivacy$inboundSchema` instead. */
199
+ export const inboundSchema = LeaderboardAccountPrivacy$inboundSchema;
200
+ /** @deprecated use `LeaderboardAccountPrivacy$outboundSchema` instead. */
201
+ export const outboundSchema = LeaderboardAccountPrivacy$outboundSchema;
202
+ }
203
+
167
204
  /** @internal */
168
205
  export const LeaderboardAccount$inboundSchema: z.ZodType<
169
206
  LeaderboardAccount,
@@ -194,7 +231,7 @@ export const LeaderboardAccount$inboundSchema: z.ZodType<
194
231
  playtime: z.number().int(),
195
232
  pointsGiven: z.number().int(),
196
233
  pointsReceived: z.number().int(),
197
- privacy: z.string(),
234
+ privacy: LeaderboardAccountPrivacy$inboundSchema,
198
235
  region: z.nullable(LeaderboardRegion$inboundSchema).optional(),
199
236
  roles: z.nullable(z.array(Role$inboundSchema)),
200
237
  state: z.nullable(LeaderboardState$inboundSchema).optional(),
@@ -274,7 +311,7 @@ export const LeaderboardAccount$outboundSchema: z.ZodType<
274
311
  playtime: z.number().int(),
275
312
  pointsGiven: z.number().int(),
276
313
  pointsReceived: z.number().int(),
277
- privacy: z.string(),
314
+ privacy: LeaderboardAccountPrivacy$outboundSchema,
278
315
  region: z.nullable(LeaderboardRegion$outboundSchema).optional(),
279
316
  roles: z.nullable(z.array(Role$outboundSchema)),
280
317
  state: z.nullable(LeaderboardState$outboundSchema).optional(),
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
10
  import {
@@ -37,6 +38,19 @@ import {
37
38
  Role$outboundSchema,
38
39
  } from "./role.js";
39
40
 
41
+ /**
42
+ * The privacy of the account
43
+ */
44
+ export const Privacy = {
45
+ Public: "public",
46
+ Private: "private",
47
+ FriendsOnly: "friends_only",
48
+ } as const;
49
+ /**
50
+ * The privacy of the account
51
+ */
52
+ export type Privacy = ClosedEnum<typeof Privacy>;
53
+
40
54
  export type V1AccountFriend = {
41
55
  /**
42
56
  * The cost of an app
@@ -132,7 +146,7 @@ export type V1AccountFriend = {
132
146
  /**
133
147
  * The privacy of the account
134
148
  */
135
- privacy: string;
149
+ privacy: Privacy;
136
150
  region?: LeaderboardRegion | null | undefined;
137
151
  /**
138
152
  * The roles of the account
@@ -165,6 +179,25 @@ export type V1AccountFriend = {
165
179
  xp: number;
166
180
  };
167
181
 
182
+ /** @internal */
183
+ export const Privacy$inboundSchema: z.ZodNativeEnum<typeof Privacy> = z
184
+ .nativeEnum(Privacy);
185
+
186
+ /** @internal */
187
+ export const Privacy$outboundSchema: z.ZodNativeEnum<typeof Privacy> =
188
+ Privacy$inboundSchema;
189
+
190
+ /**
191
+ * @internal
192
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
193
+ */
194
+ export namespace Privacy$ {
195
+ /** @deprecated use `Privacy$inboundSchema` instead. */
196
+ export const inboundSchema = Privacy$inboundSchema;
197
+ /** @deprecated use `Privacy$outboundSchema` instead. */
198
+ export const outboundSchema = Privacy$outboundSchema;
199
+ }
200
+
168
201
  /** @internal */
169
202
  export const V1AccountFriend$inboundSchema: z.ZodType<
170
203
  V1AccountFriend,
@@ -198,7 +231,7 @@ export const V1AccountFriend$inboundSchema: z.ZodType<
198
231
  playtime: z.number().int(),
199
232
  pointsGiven: z.number().int(),
200
233
  pointsReceived: z.number().int(),
201
- privacy: z.string(),
234
+ privacy: Privacy$inboundSchema,
202
235
  region: z.nullable(LeaderboardRegion$inboundSchema).optional(),
203
236
  roles: z.nullable(z.array(Role$inboundSchema)),
204
237
  state: z.nullable(LeaderboardState$inboundSchema).optional(),
@@ -280,7 +313,7 @@ export const V1AccountFriend$outboundSchema: z.ZodType<
280
313
  playtime: z.number().int(),
281
314
  pointsGiven: z.number().int(),
282
315
  pointsReceived: z.number().int(),
283
- privacy: z.string(),
316
+ privacy: Privacy$outboundSchema,
284
317
  region: z.nullable(LeaderboardRegion$outboundSchema).optional(),
285
318
  roles: z.nullable(z.array(Role$outboundSchema)),
286
319
  state: z.nullable(LeaderboardState$outboundSchema).optional(),
@@ -96,7 +96,7 @@ export type LastQueueStatus = ClosedEnum<typeof LastQueueStatus>;
96
96
  /**
97
97
  * The privacy of the account
98
98
  */
99
- export const Privacy = {
99
+ export const V1AccountInfoResponseBodyPrivacy = {
100
100
  Private: "private",
101
101
  Public: "public",
102
102
  FriendsOnly: "friends_only",
@@ -104,7 +104,9 @@ export const Privacy = {
104
104
  /**
105
105
  * The privacy of the account
106
106
  */
107
- export type Privacy = ClosedEnum<typeof Privacy>;
107
+ export type V1AccountInfoResponseBodyPrivacy = ClosedEnum<
108
+ typeof V1AccountInfoResponseBodyPrivacy
109
+ >;
108
110
 
109
111
  export type V1AccountInfoResponseBody = {
110
112
  /**
@@ -257,7 +259,7 @@ export type V1AccountInfoResponseBody = {
257
259
  /**
258
260
  * The privacy of the account
259
261
  */
260
- privacy: Privacy;
262
+ privacy: V1AccountInfoResponseBodyPrivacy;
261
263
  region?: LeaderboardRegion | null | undefined;
262
264
  /**
263
265
  * The roles of the account
@@ -364,22 +366,24 @@ export namespace LastQueueStatus$ {
364
366
  }
365
367
 
366
368
  /** @internal */
367
- export const Privacy$inboundSchema: z.ZodNativeEnum<typeof Privacy> = z
368
- .nativeEnum(Privacy);
369
+ export const V1AccountInfoResponseBodyPrivacy$inboundSchema: z.ZodNativeEnum<
370
+ typeof V1AccountInfoResponseBodyPrivacy
371
+ > = z.nativeEnum(V1AccountInfoResponseBodyPrivacy);
369
372
 
370
373
  /** @internal */
371
- export const Privacy$outboundSchema: z.ZodNativeEnum<typeof Privacy> =
372
- Privacy$inboundSchema;
374
+ export const V1AccountInfoResponseBodyPrivacy$outboundSchema: z.ZodNativeEnum<
375
+ typeof V1AccountInfoResponseBodyPrivacy
376
+ > = V1AccountInfoResponseBodyPrivacy$inboundSchema;
373
377
 
374
378
  /**
375
379
  * @internal
376
380
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
377
381
  */
378
- export namespace Privacy$ {
379
- /** @deprecated use `Privacy$inboundSchema` instead. */
380
- export const inboundSchema = Privacy$inboundSchema;
381
- /** @deprecated use `Privacy$outboundSchema` instead. */
382
- export const outboundSchema = Privacy$outboundSchema;
382
+ export namespace V1AccountInfoResponseBodyPrivacy$ {
383
+ /** @deprecated use `V1AccountInfoResponseBodyPrivacy$inboundSchema` instead. */
384
+ export const inboundSchema = V1AccountInfoResponseBodyPrivacy$inboundSchema;
385
+ /** @deprecated use `V1AccountInfoResponseBodyPrivacy$outboundSchema` instead. */
386
+ export const outboundSchema = V1AccountInfoResponseBodyPrivacy$outboundSchema;
383
387
  }
384
388
 
385
389
  /** @internal */
@@ -431,7 +435,7 @@ export const V1AccountInfoResponseBody$inboundSchema: z.ZodType<
431
435
  playtime: z.number().int(),
432
436
  pointsGiven: z.number().int(),
433
437
  pointsReceived: z.number().int(),
434
- privacy: Privacy$inboundSchema,
438
+ privacy: V1AccountInfoResponseBodyPrivacy$inboundSchema,
435
439
  region: z.nullable(LeaderboardRegion$inboundSchema).optional(),
436
440
  roles: z.nullable(z.array(Role$inboundSchema)),
437
441
  shortlinkDomain: z.nullable(z.string()),
@@ -553,7 +557,7 @@ export const V1AccountInfoResponseBody$outboundSchema: z.ZodType<
553
557
  playtime: z.number().int(),
554
558
  pointsGiven: z.number().int(),
555
559
  pointsReceived: z.number().int(),
556
- privacy: Privacy$outboundSchema,
560
+ privacy: V1AccountInfoResponseBodyPrivacy$outboundSchema,
557
561
  region: z.nullable(LeaderboardRegion$outboundSchema).optional(),
558
562
  roles: z.nullable(z.array(Role$outboundSchema)),
559
563
  shortlinkDomain: z.nullable(z.string()),
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
10
  import {
@@ -43,6 +44,21 @@ import {
43
44
  Role$outboundSchema,
44
45
  } from "./role.js";
45
46
 
47
+ /**
48
+ * The privacy of the account
49
+ */
50
+ export const V1AccountLeaderboardAccountPrivacy = {
51
+ Public: "public",
52
+ Private: "private",
53
+ FriendsOnly: "friends_only",
54
+ } as const;
55
+ /**
56
+ * The privacy of the account
57
+ */
58
+ export type V1AccountLeaderboardAccountPrivacy = ClosedEnum<
59
+ typeof V1AccountLeaderboardAccountPrivacy
60
+ >;
61
+
46
62
  export type V1AccountLeaderboardAccount = {
47
63
  /**
48
64
  * The cost of an app
@@ -142,7 +158,7 @@ export type V1AccountLeaderboardAccount = {
142
158
  /**
143
159
  * The privacy of the account
144
160
  */
145
- privacy: string;
161
+ privacy: V1AccountLeaderboardAccountPrivacy;
146
162
  /**
147
163
  * The rank of the account
148
164
  */
@@ -179,6 +195,28 @@ export type V1AccountLeaderboardAccount = {
179
195
  xp: number;
180
196
  };
181
197
 
198
+ /** @internal */
199
+ export const V1AccountLeaderboardAccountPrivacy$inboundSchema: z.ZodNativeEnum<
200
+ typeof V1AccountLeaderboardAccountPrivacy
201
+ > = z.nativeEnum(V1AccountLeaderboardAccountPrivacy);
202
+
203
+ /** @internal */
204
+ export const V1AccountLeaderboardAccountPrivacy$outboundSchema: z.ZodNativeEnum<
205
+ typeof V1AccountLeaderboardAccountPrivacy
206
+ > = V1AccountLeaderboardAccountPrivacy$inboundSchema;
207
+
208
+ /**
209
+ * @internal
210
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
211
+ */
212
+ export namespace V1AccountLeaderboardAccountPrivacy$ {
213
+ /** @deprecated use `V1AccountLeaderboardAccountPrivacy$inboundSchema` instead. */
214
+ export const inboundSchema = V1AccountLeaderboardAccountPrivacy$inboundSchema;
215
+ /** @deprecated use `V1AccountLeaderboardAccountPrivacy$outboundSchema` instead. */
216
+ export const outboundSchema =
217
+ V1AccountLeaderboardAccountPrivacy$outboundSchema;
218
+ }
219
+
182
220
  /** @internal */
183
221
  export const V1AccountLeaderboardAccount$inboundSchema: z.ZodType<
184
222
  V1AccountLeaderboardAccount,
@@ -211,7 +249,7 @@ export const V1AccountLeaderboardAccount$inboundSchema: z.ZodType<
211
249
  playtime: z.number().int(),
212
250
  pointsGiven: z.number().int(),
213
251
  pointsReceived: z.number().int(),
214
- privacy: z.string(),
252
+ privacy: V1AccountLeaderboardAccountPrivacy$inboundSchema,
215
253
  rank: z.number().int(),
216
254
  region: z.nullable(LeaderboardRegion$inboundSchema).optional(),
217
255
  roles: z.nullable(z.array(Role$inboundSchema)),
@@ -297,7 +335,7 @@ export const V1AccountLeaderboardAccount$outboundSchema: z.ZodType<
297
335
  playtime: z.number().int(),
298
336
  pointsGiven: z.number().int(),
299
337
  pointsReceived: z.number().int(),
300
- privacy: z.string(),
338
+ privacy: V1AccountLeaderboardAccountPrivacy$outboundSchema,
301
339
  rank: z.number().int(),
302
340
  region: z.nullable(LeaderboardRegion$outboundSchema).optional(),
303
341
  roles: z.nullable(z.array(Role$outboundSchema)),