@steamsets/client-ts 0.14.28 → 0.15.0

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 (177) hide show
  1. package/FUNCTIONS.md +4 -4
  2. package/README.md +83 -30
  3. package/docs/sdks/account/README.md +254 -98
  4. package/docs/sdks/internal/README.md +224 -68
  5. package/docs/sdks/settings/README.md +197 -41
  6. package/docs/sdks/steamsets/README.md +78 -0
  7. package/funcs/accountAccountV1SettingsEmailSendVerification.d.ts +10 -0
  8. package/funcs/accountAccountV1SettingsEmailSendVerification.d.ts.map +1 -0
  9. package/funcs/{settingsSendEmailVerification.js → accountAccountV1SettingsEmailSendVerification.js} +7 -7
  10. package/funcs/accountAccountV1SettingsEmailSendVerification.js.map +1 -0
  11. package/funcs/{accountSendEmailVerification.d.ts → accountAccountV1SettingsEmailSubscribe.d.ts} +2 -2
  12. package/funcs/accountAccountV1SettingsEmailSubscribe.d.ts.map +1 -0
  13. package/funcs/accountAccountV1SettingsEmailSubscribe.js +113 -0
  14. package/funcs/accountAccountV1SettingsEmailSubscribe.js.map +1 -0
  15. package/funcs/accountAccountV1SettingsEmailVerify.d.ts +11 -0
  16. package/funcs/accountAccountV1SettingsEmailVerify.d.ts.map +1 -0
  17. package/funcs/{accountVerifyEmail.js → accountAccountV1SettingsEmailVerify.js} +6 -6
  18. package/funcs/accountAccountV1SettingsEmailVerify.js.map +1 -0
  19. package/funcs/{accountVerifyEmail.d.ts → accountAccountV1SettingsUpdateRole.d.ts} +2 -2
  20. package/funcs/accountAccountV1SettingsUpdateRole.d.ts.map +1 -0
  21. package/funcs/accountAccountV1SettingsUpdateRole.js +113 -0
  22. package/funcs/accountAccountV1SettingsUpdateRole.js.map +1 -0
  23. package/funcs/internalAccountV1SettingsEmailSendVerification.d.ts +10 -0
  24. package/funcs/internalAccountV1SettingsEmailSendVerification.d.ts.map +1 -0
  25. package/funcs/{internalSendEmailVerification.js → internalAccountV1SettingsEmailSendVerification.js} +7 -7
  26. package/funcs/internalAccountV1SettingsEmailSendVerification.js.map +1 -0
  27. package/funcs/{internalSendEmailVerification.d.ts → internalAccountV1SettingsEmailSubscribe.d.ts} +2 -2
  28. package/funcs/internalAccountV1SettingsEmailSubscribe.d.ts.map +1 -0
  29. package/funcs/internalAccountV1SettingsEmailSubscribe.js +113 -0
  30. package/funcs/internalAccountV1SettingsEmailSubscribe.js.map +1 -0
  31. package/funcs/internalAccountV1SettingsEmailVerify.d.ts +11 -0
  32. package/funcs/internalAccountV1SettingsEmailVerify.d.ts.map +1 -0
  33. package/funcs/{settingsVerifyEmail.js → internalAccountV1SettingsEmailVerify.js} +6 -6
  34. package/funcs/internalAccountV1SettingsEmailVerify.js.map +1 -0
  35. package/funcs/{internalVerifyEmail.d.ts → internalAccountV1SettingsUpdateRole.d.ts} +2 -2
  36. package/funcs/internalAccountV1SettingsUpdateRole.d.ts.map +1 -0
  37. package/funcs/internalAccountV1SettingsUpdateRole.js +113 -0
  38. package/funcs/internalAccountV1SettingsUpdateRole.js.map +1 -0
  39. package/funcs/{settingsVerifyEmail.d.ts → resendWebhook.d.ts} +2 -4
  40. package/funcs/resendWebhook.d.ts.map +1 -0
  41. package/funcs/resendWebhook.js +114 -0
  42. package/funcs/resendWebhook.js.map +1 -0
  43. package/funcs/settingsAccountV1SettingsEmailSendVerification.d.ts +10 -0
  44. package/funcs/settingsAccountV1SettingsEmailSendVerification.d.ts.map +1 -0
  45. package/funcs/{accountSendEmailVerification.js → settingsAccountV1SettingsEmailSendVerification.js} +7 -7
  46. package/funcs/settingsAccountV1SettingsEmailSendVerification.js.map +1 -0
  47. package/funcs/{settingsSendEmailVerification.d.ts → settingsAccountV1SettingsEmailSubscribe.d.ts} +2 -2
  48. package/funcs/settingsAccountV1SettingsEmailSubscribe.d.ts.map +1 -0
  49. package/funcs/settingsAccountV1SettingsEmailSubscribe.js +113 -0
  50. package/funcs/settingsAccountV1SettingsEmailSubscribe.js.map +1 -0
  51. package/funcs/settingsAccountV1SettingsEmailVerify.d.ts +11 -0
  52. package/funcs/settingsAccountV1SettingsEmailVerify.d.ts.map +1 -0
  53. package/funcs/{internalVerifyEmail.js → settingsAccountV1SettingsEmailVerify.js} +6 -6
  54. package/funcs/settingsAccountV1SettingsEmailVerify.js.map +1 -0
  55. package/funcs/settingsAccountV1SettingsUpdateRole.d.ts +11 -0
  56. package/funcs/settingsAccountV1SettingsUpdateRole.d.ts.map +1 -0
  57. package/funcs/settingsAccountV1SettingsUpdateRole.js +113 -0
  58. package/funcs/settingsAccountV1SettingsUpdateRole.js.map +1 -0
  59. package/jsr.json +1 -1
  60. package/lib/config.d.ts +2 -2
  61. package/lib/config.js +2 -2
  62. package/lib/config.js.map +1 -1
  63. package/models/components/errormodel.d.ts +63 -0
  64. package/models/components/errormodel.d.ts.map +1 -0
  65. package/models/components/errormodel.js +81 -0
  66. package/models/components/errormodel.js.map +1 -0
  67. package/models/components/index.d.ts +3 -0
  68. package/models/components/index.d.ts.map +1 -1
  69. package/models/components/index.js +3 -0
  70. package/models/components/index.js.map +1 -1
  71. package/models/components/v1accountinforesponsebody.d.ts +8 -0
  72. package/models/components/v1accountinforesponsebody.d.ts.map +1 -1
  73. package/models/components/v1accountinforesponsebody.js +3 -0
  74. package/models/components/v1accountinforesponsebody.js.map +1 -1
  75. package/models/components/v1emailsubscriptionrequestbody.d.ts +37 -0
  76. package/models/components/v1emailsubscriptionrequestbody.d.ts.map +1 -0
  77. package/models/components/v1emailsubscriptionrequestbody.js +61 -0
  78. package/models/components/v1emailsubscriptionrequestbody.js.map +1 -0
  79. package/models/components/v1getsettingsbody.d.ts +5 -0
  80. package/models/components/v1getsettingsbody.d.ts.map +1 -1
  81. package/models/components/v1getsettingsbody.js +2 -0
  82. package/models/components/v1getsettingsbody.js.map +1 -1
  83. package/models/components/v1updaterolerequestbody.d.ts +76 -0
  84. package/models/components/v1updaterolerequestbody.d.ts.map +1 -0
  85. package/models/components/v1updaterolerequestbody.js +85 -0
  86. package/models/components/v1updaterolerequestbody.js.map +1 -0
  87. package/models/components/v1updatesettingsrequestbody.d.ts +0 -49
  88. package/models/components/v1updatesettingsrequestbody.d.ts.map +1 -1
  89. package/models/components/v1updatesettingsrequestbody.js +1 -29
  90. package/models/components/v1updatesettingsrequestbody.js.map +1 -1
  91. package/models/operations/accountv1settingsemailsendverification.d.ts +61 -0
  92. package/models/operations/{accountv1settingssendemailverification.d.ts.map → accountv1settingsemailsendverification.d.ts.map} +1 -1
  93. package/models/operations/accountv1settingsemailsendverification.js +108 -0
  94. package/models/operations/{accountv1settingssendemailverification.js.map → accountv1settingsemailsendverification.js.map} +1 -1
  95. package/models/operations/accountv1settingsemailsubscribe.d.ts +63 -0
  96. package/models/operations/accountv1settingsemailsubscribe.d.ts.map +1 -0
  97. package/models/operations/accountv1settingsemailsubscribe.js +112 -0
  98. package/models/operations/accountv1settingsemailsubscribe.js.map +1 -0
  99. package/models/operations/accountv1settingsemailverify.d.ts +36 -0
  100. package/models/operations/accountv1settingsemailverify.d.ts.map +1 -0
  101. package/models/operations/accountv1settingsemailverify.js +73 -0
  102. package/models/operations/accountv1settingsemailverify.js.map +1 -0
  103. package/models/operations/accountv1settingsupdaterole.d.ts +36 -0
  104. package/models/operations/{accountv1settingsverfyemail.d.ts.map → accountv1settingsupdaterole.d.ts.map} +1 -1
  105. package/models/operations/{accountv1settingsverfyemail.js → accountv1settingsupdaterole.js} +17 -17
  106. package/models/operations/{accountv1settingsverfyemail.js.map → accountv1settingsupdaterole.js.map} +1 -1
  107. package/models/operations/index.d.ts +5 -2
  108. package/models/operations/index.d.ts.map +1 -1
  109. package/models/operations/index.js +5 -2
  110. package/models/operations/index.js.map +1 -1
  111. package/models/operations/resendwebhook.d.ts +66 -0
  112. package/models/operations/resendwebhook.d.ts.map +1 -0
  113. package/models/operations/resendwebhook.js +130 -0
  114. package/models/operations/resendwebhook.js.map +1 -0
  115. package/package.json +1 -1
  116. package/sdk/account.d.ts +4 -2
  117. package/sdk/account.d.ts.map +1 -1
  118. package/sdk/account.js +16 -8
  119. package/sdk/account.js.map +1 -1
  120. package/sdk/internal.d.ts +4 -2
  121. package/sdk/internal.d.ts.map +1 -1
  122. package/sdk/internal.js +16 -8
  123. package/sdk/internal.js.map +1 -1
  124. package/sdk/sdk.d.ts +5 -3
  125. package/sdk/sdk.d.ts.map +1 -1
  126. package/sdk/sdk.js +8 -3
  127. package/sdk/sdk.js.map +1 -1
  128. package/sdk/settings.d.ts +4 -2
  129. package/sdk/settings.d.ts.map +1 -1
  130. package/sdk/settings.js +15 -7
  131. package/sdk/settings.js.map +1 -1
  132. package/src/funcs/{internalSendEmailVerification.ts → accountAccountV1SettingsEmailSendVerification.ts} +8 -8
  133. package/src/funcs/accountAccountV1SettingsEmailSubscribe.ts +160 -0
  134. package/src/funcs/{settingsVerifyEmail.ts → accountAccountV1SettingsEmailVerify.ts} +6 -6
  135. package/src/funcs/accountAccountV1SettingsUpdateRole.ts +149 -0
  136. package/src/funcs/{accountSendEmailVerification.ts → internalAccountV1SettingsEmailSendVerification.ts} +8 -8
  137. package/src/funcs/internalAccountV1SettingsEmailSubscribe.ts +160 -0
  138. package/src/funcs/{internalVerifyEmail.ts → internalAccountV1SettingsEmailVerify.ts} +6 -6
  139. package/src/funcs/internalAccountV1SettingsUpdateRole.ts +149 -0
  140. package/src/funcs/resendWebhook.ts +153 -0
  141. package/src/funcs/{settingsSendEmailVerification.ts → settingsAccountV1SettingsEmailSendVerification.ts} +8 -8
  142. package/src/funcs/settingsAccountV1SettingsEmailSubscribe.ts +160 -0
  143. package/src/funcs/{accountVerifyEmail.ts → settingsAccountV1SettingsEmailVerify.ts} +6 -6
  144. package/src/funcs/settingsAccountV1SettingsUpdateRole.ts +149 -0
  145. package/src/lib/config.ts +2 -2
  146. package/src/models/components/errormodel.ts +122 -0
  147. package/src/models/components/index.ts +3 -0
  148. package/src/models/components/v1accountinforesponsebody.ts +10 -0
  149. package/src/models/components/v1emailsubscriptionrequestbody.ts +78 -0
  150. package/src/models/components/v1getsettingsbody.ts +7 -0
  151. package/src/models/components/v1updaterolerequestbody.ts +109 -0
  152. package/src/models/components/v1updatesettingsrequestbody.ts +0 -47
  153. package/src/models/operations/{accountv1settingssendemailverification.ts → accountv1settingsemailsendverification.ts} +46 -46
  154. package/src/models/operations/accountv1settingsemailsubscribe.ts +174 -0
  155. package/src/models/operations/accountv1settingsemailverify.ts +87 -0
  156. package/src/models/operations/{accountv1settingsverfyemail.ts → accountv1settingsupdaterole.ts} +22 -22
  157. package/src/models/operations/index.ts +5 -2
  158. package/src/models/operations/resendwebhook.ts +179 -0
  159. package/src/sdk/account.ts +45 -21
  160. package/src/sdk/internal.ts +45 -21
  161. package/src/sdk/sdk.ts +20 -6
  162. package/src/sdk/settings.ts +41 -17
  163. package/funcs/accountSendEmailVerification.d.ts.map +0 -1
  164. package/funcs/accountSendEmailVerification.js.map +0 -1
  165. package/funcs/accountVerifyEmail.d.ts.map +0 -1
  166. package/funcs/accountVerifyEmail.js.map +0 -1
  167. package/funcs/internalSendEmailVerification.d.ts.map +0 -1
  168. package/funcs/internalSendEmailVerification.js.map +0 -1
  169. package/funcs/internalVerifyEmail.d.ts.map +0 -1
  170. package/funcs/internalVerifyEmail.js.map +0 -1
  171. package/funcs/settingsSendEmailVerification.d.ts.map +0 -1
  172. package/funcs/settingsSendEmailVerification.js.map +0 -1
  173. package/funcs/settingsVerifyEmail.d.ts.map +0 -1
  174. package/funcs/settingsVerifyEmail.js.map +0 -1
  175. package/models/operations/accountv1settingssendemailverification.d.ts +0 -61
  176. package/models/operations/accountv1settingssendemailverification.js +0 -108
  177. package/models/operations/accountv1settingsverfyemail.d.ts +0 -36
@@ -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 settingsAccountV1SettingsUpdateRole(
28
+ client: SteamSetsCore,
29
+ request: components.V1UpdateRoleRequestBody,
30
+ options?: RequestOptions,
31
+ ): Promise<
32
+ Result<
33
+ operations.AccountV1SettingsUpdateRoleResponse,
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.V1UpdateRoleRequestBody$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/UpdateRole")();
57
+
58
+ const headers = new Headers(compactMap({
59
+ "Content-Type": "application/json",
60
+ Accept: "application/problem+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.settings.update-role",
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: ["422", "429", "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.AccountV1SettingsUpdateRoleResponse,
122
+ | errors.ErrorModel
123
+ | errors.ErrorModel
124
+ | SDKError
125
+ | SDKValidationError
126
+ | UnexpectedClientError
127
+ | InvalidRequestError
128
+ | RequestAbortedError
129
+ | RequestTimeoutError
130
+ | ConnectionError
131
+ >(
132
+ M.nil(204, operations.AccountV1SettingsUpdateRoleResponse$inboundSchema, {
133
+ hdrs: true,
134
+ }),
135
+ M.jsonErr([422, 429], 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
+ }
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.28",
58
+ sdkVersion: "0.15.0",
59
59
  genVersion: "2.500.5",
60
60
  userAgent:
61
- "speakeasy-sdk/typescript 0.14.28 2.500.5 1.0.0 @steamsets/client-ts",
61
+ "speakeasy-sdk/typescript 0.15.0 2.500.5 1.0.0 @steamsets/client-ts",
62
62
  } as const;
@@ -0,0 +1,122 @@
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 { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ ErrorDetail,
12
+ ErrorDetail$inboundSchema,
13
+ ErrorDetail$Outbound,
14
+ ErrorDetail$outboundSchema,
15
+ } from "./errordetail.js";
16
+
17
+ export type ErrorModel = {
18
+ /**
19
+ * A URL to the JSON Schema for this object.
20
+ */
21
+ dollarSchema?: string | undefined;
22
+ /**
23
+ * A human-readable explanation specific to this occurrence of the problem.
24
+ */
25
+ detail?: string | undefined;
26
+ /**
27
+ * Optional list of individual error details
28
+ */
29
+ errors?: Array<ErrorDetail> | null | undefined;
30
+ /**
31
+ * A URI reference that identifies the specific occurrence of the problem.
32
+ */
33
+ instance?: string | undefined;
34
+ /**
35
+ * HTTP status code
36
+ */
37
+ status?: number | undefined;
38
+ /**
39
+ * A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
40
+ */
41
+ title?: string | undefined;
42
+ /**
43
+ * A URI reference to human-readable documentation for the error.
44
+ */
45
+ type?: string | undefined;
46
+ };
47
+
48
+ /** @internal */
49
+ export const ErrorModel$inboundSchema: z.ZodType<
50
+ ErrorModel,
51
+ z.ZodTypeDef,
52
+ unknown
53
+ > = z.object({
54
+ $schema: z.string().optional(),
55
+ detail: z.string().optional(),
56
+ errors: z.nullable(z.array(ErrorDetail$inboundSchema)).optional(),
57
+ instance: z.string().optional(),
58
+ status: z.number().int().optional(),
59
+ title: z.string().optional(),
60
+ type: z.string().default("about:blank"),
61
+ }).transform((v) => {
62
+ return remap$(v, {
63
+ "$schema": "dollarSchema",
64
+ });
65
+ });
66
+
67
+ /** @internal */
68
+ export type ErrorModel$Outbound = {
69
+ $schema?: string | undefined;
70
+ detail?: string | undefined;
71
+ errors?: Array<ErrorDetail$Outbound> | null | undefined;
72
+ instance?: string | undefined;
73
+ status?: number | undefined;
74
+ title?: string | undefined;
75
+ type: string;
76
+ };
77
+
78
+ /** @internal */
79
+ export const ErrorModel$outboundSchema: z.ZodType<
80
+ ErrorModel$Outbound,
81
+ z.ZodTypeDef,
82
+ ErrorModel
83
+ > = z.object({
84
+ dollarSchema: z.string().optional(),
85
+ detail: z.string().optional(),
86
+ errors: z.nullable(z.array(ErrorDetail$outboundSchema)).optional(),
87
+ instance: z.string().optional(),
88
+ status: z.number().int().optional(),
89
+ title: z.string().optional(),
90
+ type: z.string().default("about:blank"),
91
+ }).transform((v) => {
92
+ return remap$(v, {
93
+ dollarSchema: "$schema",
94
+ });
95
+ });
96
+
97
+ /**
98
+ * @internal
99
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
100
+ */
101
+ export namespace ErrorModel$ {
102
+ /** @deprecated use `ErrorModel$inboundSchema` instead. */
103
+ export const inboundSchema = ErrorModel$inboundSchema;
104
+ /** @deprecated use `ErrorModel$outboundSchema` instead. */
105
+ export const outboundSchema = ErrorModel$outboundSchema;
106
+ /** @deprecated use `ErrorModel$Outbound` instead. */
107
+ export type Outbound = ErrorModel$Outbound;
108
+ }
109
+
110
+ export function errorModelToJSON(errorModel: ErrorModel): string {
111
+ return JSON.stringify(ErrorModel$outboundSchema.parse(errorModel));
112
+ }
113
+
114
+ export function errorModelFromJSON(
115
+ jsonString: string,
116
+ ): SafeParseResult<ErrorModel, SDKValidationError> {
117
+ return safeParse(
118
+ jsonString,
119
+ (x) => ErrorModel$inboundSchema.parse(JSON.parse(x)),
120
+ `Failed to parse 'ErrorModel' from JSON`,
121
+ );
122
+ }
@@ -18,6 +18,7 @@ export * from "./currentcolortag.js";
18
18
  export * from "./designtag.js";
19
19
  export * from "./developerapp.js";
20
20
  export * from "./errordetail.js";
21
+ export * from "./errormodel.js";
21
22
  export * from "./historyvalue.js";
22
23
  export * from "./httpmetadata.js";
23
24
  export * from "./idstruct.js";
@@ -91,6 +92,7 @@ export * from "./v1deletesessionrequestbody.js";
91
92
  export * from "./v1deletesessionresponsebody.js";
92
93
  export * from "./v1developerappcreaterequestbody.js";
93
94
  export * from "./v1developerappcreateresponsebody.js";
95
+ export * from "./v1emailsubscriptionrequestbody.js";
94
96
  export * from "./v1event.js";
95
97
  export * from "./v1getimagesresponsebody.js";
96
98
  export * from "./v1getsessionbody.js";
@@ -116,6 +118,7 @@ export * from "./v1updateconnectionresponsebody.js";
116
118
  export * from "./v1updateimage.js";
117
119
  export * from "./v1updateimagerequestbody.js";
118
120
  export * from "./v1updateimageresponsebody.js";
121
+ export * from "./v1updaterolerequestbody.js";
119
122
  export * from "./v1updatesettingsrequestbody.js";
120
123
  export * from "./v1uploadedimage.js";
121
124
  export * from "./v1uploadimagesrequestbody.js";
@@ -90,6 +90,7 @@ export const LastQueueStatus = {
90
90
  Retrying: "retrying",
91
91
  Failed: "failed",
92
92
  Completed: "completed",
93
+ Cooldown: "cooldown",
93
94
  } as const;
94
95
  export type LastQueueStatus = ClosedEnum<typeof LastQueueStatus>;
95
96
 
@@ -232,6 +233,10 @@ export type V1AccountInfoResponseBody = {
232
233
  * The name of the account
233
234
  */
234
235
  name: string;
236
+ /**
237
+ * The time the account is allowed to be refreshed
238
+ */
239
+ nextAllowedTime: Date;
235
240
  /**
236
241
  * The cost of a normal badge
237
242
  */
@@ -425,6 +430,9 @@ export const V1AccountInfoResponseBody$inboundSchema: z.ZodType<
425
430
  level: z.number().int(),
426
431
  miniBackground: z.string(),
427
432
  name: z.string(),
433
+ nextAllowedTime: z.string().datetime({ offset: true }).transform(v =>
434
+ new Date(v)
435
+ ),
428
436
  normalBadgeCost: z.number().int(),
429
437
  normalBadges: z.number().int(),
430
438
  playtime: z.number().int(),
@@ -486,6 +494,7 @@ export type V1AccountInfoResponseBody$Outbound = {
486
494
  level: number;
487
495
  miniBackground: string;
488
496
  name: string;
497
+ nextAllowedTime: string;
489
498
  normalBadgeCost: number;
490
499
  normalBadges: number;
491
500
  playtime: number;
@@ -545,6 +554,7 @@ export const V1AccountInfoResponseBody$outboundSchema: z.ZodType<
545
554
  level: z.number().int(),
546
555
  miniBackground: z.string(),
547
556
  name: z.string(),
557
+ nextAllowedTime: z.date().transform(v => v.toISOString()),
548
558
  normalBadgeCost: z.number().int(),
549
559
  normalBadges: z.number().int(),
550
560
  playtime: z.number().int(),
@@ -0,0 +1,78 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type V1EmailSubscriptionRequestBody = {
11
+ /**
12
+ * The email address to subscribe to the newsletter (only for the landing page)
13
+ */
14
+ email: string | null;
15
+ /**
16
+ * Whether the user wants to be subscribed to the newsletter
17
+ */
18
+ subscribed: boolean;
19
+ };
20
+
21
+ /** @internal */
22
+ export const V1EmailSubscriptionRequestBody$inboundSchema: z.ZodType<
23
+ V1EmailSubscriptionRequestBody,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ email: z.nullable(z.string()),
28
+ subscribed: z.boolean(),
29
+ });
30
+
31
+ /** @internal */
32
+ export type V1EmailSubscriptionRequestBody$Outbound = {
33
+ email: string | null;
34
+ subscribed: boolean;
35
+ };
36
+
37
+ /** @internal */
38
+ export const V1EmailSubscriptionRequestBody$outboundSchema: z.ZodType<
39
+ V1EmailSubscriptionRequestBody$Outbound,
40
+ z.ZodTypeDef,
41
+ V1EmailSubscriptionRequestBody
42
+ > = z.object({
43
+ email: z.nullable(z.string()),
44
+ subscribed: z.boolean(),
45
+ });
46
+
47
+ /**
48
+ * @internal
49
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
+ */
51
+ export namespace V1EmailSubscriptionRequestBody$ {
52
+ /** @deprecated use `V1EmailSubscriptionRequestBody$inboundSchema` instead. */
53
+ export const inboundSchema = V1EmailSubscriptionRequestBody$inboundSchema;
54
+ /** @deprecated use `V1EmailSubscriptionRequestBody$outboundSchema` instead. */
55
+ export const outboundSchema = V1EmailSubscriptionRequestBody$outboundSchema;
56
+ /** @deprecated use `V1EmailSubscriptionRequestBody$Outbound` instead. */
57
+ export type Outbound = V1EmailSubscriptionRequestBody$Outbound;
58
+ }
59
+
60
+ export function v1EmailSubscriptionRequestBodyToJSON(
61
+ v1EmailSubscriptionRequestBody: V1EmailSubscriptionRequestBody,
62
+ ): string {
63
+ return JSON.stringify(
64
+ V1EmailSubscriptionRequestBody$outboundSchema.parse(
65
+ v1EmailSubscriptionRequestBody,
66
+ ),
67
+ );
68
+ }
69
+
70
+ export function v1EmailSubscriptionRequestBodyFromJSON(
71
+ jsonString: string,
72
+ ): SafeParseResult<V1EmailSubscriptionRequestBody, SDKValidationError> {
73
+ return safeParse(
74
+ jsonString,
75
+ (x) => V1EmailSubscriptionRequestBody$inboundSchema.parse(JSON.parse(x)),
76
+ `Failed to parse 'V1EmailSubscriptionRequestBody' from JSON`,
77
+ );
78
+ }
@@ -104,6 +104,10 @@ export type V1GetSettingsBody = {
104
104
  * The sessions the account has
105
105
  */
106
106
  sessions: Array<Session> | null;
107
+ /**
108
+ * Whether the account is subscribed to marketing emails
109
+ */
110
+ subscribed: boolean;
107
111
  /**
108
112
  * The vanity the account is using
109
113
  */
@@ -151,6 +155,7 @@ export const V1GetSettingsBody$inboundSchema: z.ZodType<
151
155
  language: z.string(),
152
156
  privacy: V1GetSettingsBodyPrivacy$inboundSchema,
153
157
  sessions: z.nullable(z.array(Session$inboundSchema)),
158
+ subscribed: z.boolean(),
154
159
  vanity: z.string(),
155
160
  vanityAnalytics: z.nullable(V1VanityAnalytics$inboundSchema),
156
161
  }).transform((v) => {
@@ -172,6 +177,7 @@ export type V1GetSettingsBody$Outbound = {
172
177
  language: string;
173
178
  privacy: string;
174
179
  sessions: Array<Session$Outbound> | null;
180
+ subscribed: boolean;
175
181
  vanity: string;
176
182
  vanityAnalytics: V1VanityAnalytics$Outbound | null;
177
183
  };
@@ -193,6 +199,7 @@ export const V1GetSettingsBody$outboundSchema: z.ZodType<
193
199
  language: z.string(),
194
200
  privacy: V1GetSettingsBodyPrivacy$outboundSchema,
195
201
  sessions: z.nullable(z.array(Session$outboundSchema)),
202
+ subscribed: z.boolean(),
196
203
  vanity: z.string(),
197
204
  vanityAnalytics: z.nullable(V1VanityAnalytics$outboundSchema),
198
205
  }).transform((v) => {
@@ -0,0 +1,109 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The role the account should have between one of the 6 donation roles
13
+ */
14
+ export const V1UpdateRoleRequestBodyRole = {
15
+ Amber: "amber",
16
+ Amethyst: "amethyst",
17
+ Emerald: "emerald",
18
+ Sapphire: "sapphire",
19
+ Ruby: "ruby",
20
+ Diamond: "diamond",
21
+ } as const;
22
+ /**
23
+ * The role the account should have between one of the 6 donation roles
24
+ */
25
+ export type V1UpdateRoleRequestBodyRole = ClosedEnum<
26
+ typeof V1UpdateRoleRequestBodyRole
27
+ >;
28
+
29
+ export type V1UpdateRoleRequestBody = {
30
+ /**
31
+ * The role the account should have between one of the 6 donation roles
32
+ */
33
+ role?: V1UpdateRoleRequestBodyRole | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const V1UpdateRoleRequestBodyRole$inboundSchema: z.ZodNativeEnum<
38
+ typeof V1UpdateRoleRequestBodyRole
39
+ > = z.nativeEnum(V1UpdateRoleRequestBodyRole);
40
+
41
+ /** @internal */
42
+ export const V1UpdateRoleRequestBodyRole$outboundSchema: z.ZodNativeEnum<
43
+ typeof V1UpdateRoleRequestBodyRole
44
+ > = V1UpdateRoleRequestBodyRole$inboundSchema;
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 V1UpdateRoleRequestBodyRole$ {
51
+ /** @deprecated use `V1UpdateRoleRequestBodyRole$inboundSchema` instead. */
52
+ export const inboundSchema = V1UpdateRoleRequestBodyRole$inboundSchema;
53
+ /** @deprecated use `V1UpdateRoleRequestBodyRole$outboundSchema` instead. */
54
+ export const outboundSchema = V1UpdateRoleRequestBodyRole$outboundSchema;
55
+ }
56
+
57
+ /** @internal */
58
+ export const V1UpdateRoleRequestBody$inboundSchema: z.ZodType<
59
+ V1UpdateRoleRequestBody,
60
+ z.ZodTypeDef,
61
+ unknown
62
+ > = z.object({
63
+ role: V1UpdateRoleRequestBodyRole$inboundSchema.optional(),
64
+ });
65
+
66
+ /** @internal */
67
+ export type V1UpdateRoleRequestBody$Outbound = {
68
+ role?: string | undefined;
69
+ };
70
+
71
+ /** @internal */
72
+ export const V1UpdateRoleRequestBody$outboundSchema: z.ZodType<
73
+ V1UpdateRoleRequestBody$Outbound,
74
+ z.ZodTypeDef,
75
+ V1UpdateRoleRequestBody
76
+ > = z.object({
77
+ role: V1UpdateRoleRequestBodyRole$outboundSchema.optional(),
78
+ });
79
+
80
+ /**
81
+ * @internal
82
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
+ */
84
+ export namespace V1UpdateRoleRequestBody$ {
85
+ /** @deprecated use `V1UpdateRoleRequestBody$inboundSchema` instead. */
86
+ export const inboundSchema = V1UpdateRoleRequestBody$inboundSchema;
87
+ /** @deprecated use `V1UpdateRoleRequestBody$outboundSchema` instead. */
88
+ export const outboundSchema = V1UpdateRoleRequestBody$outboundSchema;
89
+ /** @deprecated use `V1UpdateRoleRequestBody$Outbound` instead. */
90
+ export type Outbound = V1UpdateRoleRequestBody$Outbound;
91
+ }
92
+
93
+ export function v1UpdateRoleRequestBodyToJSON(
94
+ v1UpdateRoleRequestBody: V1UpdateRoleRequestBody,
95
+ ): string {
96
+ return JSON.stringify(
97
+ V1UpdateRoleRequestBody$outboundSchema.parse(v1UpdateRoleRequestBody),
98
+ );
99
+ }
100
+
101
+ export function v1UpdateRoleRequestBodyFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<V1UpdateRoleRequestBody, SDKValidationError> {
104
+ return safeParse(
105
+ jsonString,
106
+ (x) => V1UpdateRoleRequestBody$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'V1UpdateRoleRequestBody' from JSON`,
108
+ );
109
+ }
@@ -4,28 +4,9 @@
4
4
 
5
5
  import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
- import { ClosedEnum } from "../../types/enums.js";
8
7
  import { Result as SafeParseResult } from "../../types/fp.js";
9
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
9
 
11
- /**
12
- * The role the account should have between one of the 6 donation roles
13
- */
14
- export const V1UpdateSettingsRequestBodyRole = {
15
- Amber: "amber",
16
- Amethyst: "amethyst",
17
- Emerald: "emerald",
18
- Sapphire: "sapphire",
19
- Ruby: "ruby",
20
- Diamond: "diamond",
21
- } as const;
22
- /**
23
- * The role the account should have between one of the 6 donation roles
24
- */
25
- export type V1UpdateSettingsRequestBodyRole = ClosedEnum<
26
- typeof V1UpdateSettingsRequestBodyRole
27
- >;
28
-
29
10
  export type V1UpdateSettingsRequestBody = {
30
11
  /**
31
12
  * The email the account should use, only if the account is private
@@ -39,37 +20,12 @@ export type V1UpdateSettingsRequestBody = {
39
20
  * The language the account should use, only if the account is private
40
21
  */
41
22
  language: string;
42
- /**
43
- * The role the account should have between one of the 6 donation roles
44
- */
45
- role?: V1UpdateSettingsRequestBodyRole | null | undefined;
46
23
  /**
47
24
  * The vanity the account should use
48
25
  */
49
26
  vanity: string | null;
50
27
  };
51
28
 
52
- /** @internal */
53
- export const V1UpdateSettingsRequestBodyRole$inboundSchema: z.ZodNativeEnum<
54
- typeof V1UpdateSettingsRequestBodyRole
55
- > = z.nativeEnum(V1UpdateSettingsRequestBodyRole);
56
-
57
- /** @internal */
58
- export const V1UpdateSettingsRequestBodyRole$outboundSchema: z.ZodNativeEnum<
59
- typeof V1UpdateSettingsRequestBodyRole
60
- > = V1UpdateSettingsRequestBodyRole$inboundSchema;
61
-
62
- /**
63
- * @internal
64
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
65
- */
66
- export namespace V1UpdateSettingsRequestBodyRole$ {
67
- /** @deprecated use `V1UpdateSettingsRequestBodyRole$inboundSchema` instead. */
68
- export const inboundSchema = V1UpdateSettingsRequestBodyRole$inboundSchema;
69
- /** @deprecated use `V1UpdateSettingsRequestBodyRole$outboundSchema` instead. */
70
- export const outboundSchema = V1UpdateSettingsRequestBodyRole$outboundSchema;
71
- }
72
-
73
29
  /** @internal */
74
30
  export const V1UpdateSettingsRequestBody$inboundSchema: z.ZodType<
75
31
  V1UpdateSettingsRequestBody,
@@ -79,7 +35,6 @@ export const V1UpdateSettingsRequestBody$inboundSchema: z.ZodType<
79
35
  email: z.nullable(z.string()),
80
36
  hidden: z.boolean(),
81
37
  language: z.string(),
82
- role: z.nullable(V1UpdateSettingsRequestBodyRole$inboundSchema).optional(),
83
38
  vanity: z.nullable(z.string()),
84
39
  });
85
40
 
@@ -88,7 +43,6 @@ export type V1UpdateSettingsRequestBody$Outbound = {
88
43
  email: string | null;
89
44
  hidden: boolean;
90
45
  language: string;
91
- role?: string | null | undefined;
92
46
  vanity: string | null;
93
47
  };
94
48
 
@@ -101,7 +55,6 @@ export const V1UpdateSettingsRequestBody$outboundSchema: z.ZodType<
101
55
  email: z.nullable(z.string()),
102
56
  hidden: z.boolean(),
103
57
  language: z.string(),
104
- role: z.nullable(V1UpdateSettingsRequestBodyRole$outboundSchema).optional(),
105
58
  vanity: z.nullable(z.string()),
106
59
  });
107
60