@steamsets/client-ts 0.31.0 → 0.31.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 (141) hide show
  1. package/README.md +15 -4
  2. package/examples/package-lock.json +1 -1
  3. package/funcs/{accountAccountListInventorySets.d.ts → accountListInventorySets.d.ts} +2 -2
  4. package/funcs/accountListInventorySets.d.ts.map +1 -0
  5. package/funcs/{accountAccountListInventorySets.js → accountListInventorySets.js} +3 -3
  6. package/funcs/accountListInventorySets.js.map +1 -0
  7. package/funcs/{accountAccountRefreshInventory.d.ts → accountRefreshInventory.d.ts} +2 -2
  8. package/funcs/accountRefreshInventory.d.ts.map +1 -0
  9. package/funcs/{accountAccountRefreshInventory.js → accountRefreshInventory.js} +3 -3
  10. package/funcs/accountRefreshInventory.js.map +1 -0
  11. package/funcs/adminGetAccount.d.ts +16 -0
  12. package/funcs/adminGetAccount.d.ts.map +1 -0
  13. package/funcs/adminGetAccount.js +133 -0
  14. package/funcs/adminGetAccount.js.map +1 -0
  15. package/funcs/adminRemoveVanity.d.ts +16 -0
  16. package/funcs/adminRemoveVanity.d.ts.map +1 -0
  17. package/funcs/adminRemoveVanity.js +133 -0
  18. package/funcs/adminRemoveVanity.js.map +1 -0
  19. package/funcs/adminUpdateResources.d.ts +16 -0
  20. package/funcs/adminUpdateResources.d.ts.map +1 -0
  21. package/funcs/adminUpdateResources.js +131 -0
  22. package/funcs/adminUpdateResources.js.map +1 -0
  23. package/funcs/adminUpdateRoles.d.ts +16 -0
  24. package/funcs/adminUpdateRoles.d.ts.map +1 -0
  25. package/funcs/adminUpdateRoles.js +131 -0
  26. package/funcs/adminUpdateRoles.js.map +1 -0
  27. package/hooks/hooks.d.ts.map +1 -1
  28. package/hooks/hooks.js +2 -0
  29. package/hooks/hooks.js.map +1 -1
  30. package/hooks/registration.d.ts +3 -0
  31. package/hooks/registration.d.ts.map +1 -0
  32. package/hooks/registration.js +15 -0
  33. package/hooks/registration.js.map +1 -0
  34. package/jsr.json +1 -1
  35. package/lib/config.d.ts +3 -3
  36. package/lib/config.js +3 -3
  37. package/lib/config.js.map +1 -1
  38. package/models/components/historyvalue.d.ts +17 -0
  39. package/models/components/historyvalue.d.ts.map +1 -0
  40. package/models/components/historyvalue.js +51 -0
  41. package/models/components/historyvalue.js.map +1 -0
  42. package/models/components/index.d.ts +8 -0
  43. package/models/components/index.d.ts.map +1 -1
  44. package/models/components/index.js +8 -0
  45. package/models/components/index.js.map +1 -1
  46. package/models/components/resource.d.ts +10 -0
  47. package/models/components/resource.d.ts.map +1 -1
  48. package/models/components/resource.js +12 -1
  49. package/models/components/resource.js.map +1 -1
  50. package/models/components/v1accountlocationupdate.d.ts +19 -0
  51. package/models/components/v1accountlocationupdate.d.ts.map +1 -0
  52. package/models/components/v1accountlocationupdate.js +56 -0
  53. package/models/components/v1accountlocationupdate.js.map +1 -0
  54. package/models/components/v1accountnameupdate.d.ts +15 -0
  55. package/models/components/v1accountnameupdate.d.ts.map +1 -0
  56. package/models/components/v1accountnameupdate.js +52 -0
  57. package/models/components/v1accountnameupdate.js.map +1 -0
  58. package/models/components/v1accountvanityupdate.d.ts +15 -0
  59. package/models/components/v1accountvanityupdate.d.ts.map +1 -0
  60. package/models/components/v1accountvanityupdate.js +52 -0
  61. package/models/components/v1accountvanityupdate.js.map +1 -0
  62. package/models/components/v1admingetaccountresponsebody.d.ts +104 -0
  63. package/models/components/v1admingetaccountresponsebody.d.ts.map +1 -0
  64. package/models/components/v1admingetaccountresponsebody.js +90 -0
  65. package/models/components/v1admingetaccountresponsebody.js.map +1 -0
  66. package/models/components/v1adminremovevanityresponsebody.d.ts +13 -0
  67. package/models/components/v1adminremovevanityresponsebody.d.ts.map +1 -0
  68. package/models/components/v1adminremovevanityresponsebody.js +55 -0
  69. package/models/components/v1adminremovevanityresponsebody.js.map +1 -0
  70. package/models/components/v1adminupdateresourcesrequestbody.d.ts +22 -0
  71. package/models/components/v1adminupdateresourcesrequestbody.d.ts.map +1 -0
  72. package/models/components/v1adminupdateresourcesrequestbody.js +54 -0
  73. package/models/components/v1adminupdateresourcesrequestbody.js.map +1 -0
  74. package/models/components/v1adminupdaterolesrequestbody.d.ts +45 -0
  75. package/models/components/v1adminupdaterolesrequestbody.d.ts.map +1 -0
  76. package/models/components/v1adminupdaterolesrequestbody.js +78 -0
  77. package/models/components/v1adminupdaterolesrequestbody.js.map +1 -0
  78. package/models/operations/admingetaccount.d.ts +15 -0
  79. package/models/operations/admingetaccount.d.ts.map +1 -0
  80. package/models/operations/admingetaccount.js +59 -0
  81. package/models/operations/admingetaccount.js.map +1 -0
  82. package/models/operations/adminremovevanity.d.ts +15 -0
  83. package/models/operations/adminremovevanity.d.ts.map +1 -0
  84. package/models/operations/adminremovevanity.js +59 -0
  85. package/models/operations/adminremovevanity.js.map +1 -0
  86. package/models/operations/adminupdateresources.d.ts +11 -0
  87. package/models/operations/adminupdateresources.d.ts.map +1 -0
  88. package/models/operations/adminupdateresources.js +56 -0
  89. package/models/operations/adminupdateresources.js.map +1 -0
  90. package/models/operations/adminupdateroles.d.ts +11 -0
  91. package/models/operations/adminupdateroles.d.ts.map +1 -0
  92. package/models/operations/adminupdateroles.js +56 -0
  93. package/models/operations/adminupdateroles.js.map +1 -0
  94. package/models/operations/index.d.ts +4 -0
  95. package/models/operations/index.d.ts.map +1 -1
  96. package/models/operations/index.js +4 -0
  97. package/models/operations/index.js.map +1 -1
  98. package/package.json +1 -1
  99. package/sdk/account.d.ts +2 -2
  100. package/sdk/account.d.ts.map +1 -1
  101. package/sdk/account.js +6 -6
  102. package/sdk/account.js.map +1 -1
  103. package/sdk/admin.d.ts +22 -0
  104. package/sdk/admin.d.ts.map +1 -0
  105. package/sdk/admin.js +40 -0
  106. package/sdk/admin.js.map +1 -0
  107. package/sdk/sdk.d.ts +3 -0
  108. package/sdk/sdk.d.ts.map +1 -1
  109. package/sdk/sdk.js +4 -0
  110. package/sdk/sdk.js.map +1 -1
  111. package/src/funcs/{accountAccountListInventorySets.ts → accountListInventorySets.ts} +1 -1
  112. package/src/funcs/{accountAccountRefreshInventory.ts → accountRefreshInventory.ts} +1 -1
  113. package/src/funcs/adminGetAccount.ts +185 -0
  114. package/src/funcs/adminRemoveVanity.ts +185 -0
  115. package/src/funcs/adminUpdateResources.ts +184 -0
  116. package/src/funcs/adminUpdateRoles.ts +184 -0
  117. package/src/hooks/hooks.ts +3 -0
  118. package/src/hooks/registration.ts +14 -0
  119. package/src/lib/config.ts +3 -3
  120. package/src/models/components/historyvalue.ts +39 -0
  121. package/src/models/components/index.ts +8 -0
  122. package/src/models/components/resource.ts +22 -0
  123. package/src/models/components/v1accountlocationupdate.ts +45 -0
  124. package/src/models/components/v1accountnameupdate.ts +37 -0
  125. package/src/models/components/v1accountvanityupdate.ts +37 -0
  126. package/src/models/components/v1admingetaccountresponsebody.ts +163 -0
  127. package/src/models/components/v1adminremovevanityresponsebody.ts +39 -0
  128. package/src/models/components/v1adminupdateresourcesrequestbody.ts +57 -0
  129. package/src/models/components/v1adminupdaterolesrequestbody.ts +80 -0
  130. package/src/models/operations/admingetaccount.ts +46 -0
  131. package/src/models/operations/adminremovevanity.ts +46 -0
  132. package/src/models/operations/adminupdateresources.ts +37 -0
  133. package/src/models/operations/adminupdateroles.ts +37 -0
  134. package/src/models/operations/index.ts +4 -0
  135. package/src/sdk/account.ts +6 -6
  136. package/src/sdk/admin.ts +70 -0
  137. package/src/sdk/sdk.ts +6 -0
  138. package/funcs/accountAccountListInventorySets.d.ts.map +0 -1
  139. package/funcs/accountAccountListInventorySets.js.map +0 -1
  140. package/funcs/accountAccountRefreshInventory.d.ts.map +0 -1
  141. package/funcs/accountAccountRefreshInventory.js.map +0 -1
@@ -0,0 +1,184 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as components from "../models/components/index.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import { SteamSetsError } from "../models/errors/steamsetserror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Update account resources
31
+ */
32
+ export function adminUpdateResources(
33
+ client: SteamSetsCore,
34
+ request: components.V1AdminUpdateResourcesRequestBody,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ operations.AdminUpdateResourcesResponse,
39
+ | errors.ErrorModel
40
+ | SteamSetsError
41
+ | ResponseValidationError
42
+ | ConnectionError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | InvalidRequestError
46
+ | UnexpectedClientError
47
+ | SDKValidationError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client: SteamSetsCore,
59
+ request: components.V1AdminUpdateResourcesRequestBody,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ operations.AdminUpdateResourcesResponse,
65
+ | errors.ErrorModel
66
+ | SteamSetsError
67
+ | ResponseValidationError
68
+ | ConnectionError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | InvalidRequestError
72
+ | UnexpectedClientError
73
+ | SDKValidationError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed = safeParse(
79
+ request,
80
+ (value) =>
81
+ components.V1AdminUpdateResourcesRequestBody$outboundSchema.parse(value),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed.ok) {
85
+ return [parsed, { status: "invalid" }];
86
+ }
87
+ const payload = parsed.value;
88
+ const body = encodeJSON("body", payload, { explode: true });
89
+
90
+ const path = pathToFunc("/v1/admin.updateResources")();
91
+
92
+ const headers = new Headers(compactMap({
93
+ "Content-Type": "application/json",
94
+ Accept: "application/problem+json",
95
+ }));
96
+
97
+ const secConfig = await extractSecurity(client._options.token);
98
+ const securityInput = secConfig == null ? {} : { token: secConfig };
99
+ const requestSecurity = resolveGlobalSecurity(securityInput);
100
+
101
+ const context = {
102
+ options: client._options,
103
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
104
+ operationID: "admin.updateResources",
105
+ oAuth2Scopes: null,
106
+
107
+ resolvedSecurity: requestSecurity,
108
+
109
+ securitySource: client._options.token,
110
+ retryConfig: options?.retries
111
+ || client._options.retryConfig
112
+ || {
113
+ strategy: "backoff",
114
+ backoff: {
115
+ initialInterval: 500,
116
+ maxInterval: 5000,
117
+ exponent: 1.5,
118
+ maxElapsedTime: 60000,
119
+ },
120
+ retryConnectionErrors: true,
121
+ }
122
+ || { strategy: "none" },
123
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
124
+ };
125
+
126
+ const requestRes = client._createRequest(context, {
127
+ security: requestSecurity,
128
+ method: "POST",
129
+ baseURL: options?.serverURL,
130
+ path: path,
131
+ headers: headers,
132
+ body: body,
133
+ uaHeader: "x-speakeasy-user-agent",
134
+ userAgent: client._options.userAgent,
135
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
136
+ }, options);
137
+ if (!requestRes.ok) {
138
+ return [requestRes, { status: "invalid" }];
139
+ }
140
+ const req = requestRes.value;
141
+
142
+ const doResult = await client._do(req, {
143
+ context,
144
+ errorCodes: ["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
145
+ retryConfig: context.retryConfig,
146
+ retryCodes: context.retryCodes,
147
+ });
148
+ if (!doResult.ok) {
149
+ return [doResult, { status: "request-error", request: req }];
150
+ }
151
+ const response = doResult.value;
152
+
153
+ const responseFields = {
154
+ HttpMeta: { Response: response, Request: req },
155
+ };
156
+
157
+ const [result] = await M.match<
158
+ operations.AdminUpdateResourcesResponse,
159
+ | errors.ErrorModel
160
+ | SteamSetsError
161
+ | ResponseValidationError
162
+ | ConnectionError
163
+ | RequestAbortedError
164
+ | RequestTimeoutError
165
+ | InvalidRequestError
166
+ | UnexpectedClientError
167
+ | SDKValidationError
168
+ >(
169
+ M.nil(204, operations.AdminUpdateResourcesResponse$inboundSchema),
170
+ M.jsonErr([400, 401, 403, 404, 422], errors.ErrorModel$inboundSchema, {
171
+ ctype: "application/problem+json",
172
+ }),
173
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
174
+ ctype: "application/problem+json",
175
+ }),
176
+ M.fail("4XX"),
177
+ M.fail("5XX"),
178
+ )(response, req, { extraFields: responseFields });
179
+ if (!result.ok) {
180
+ return [result, { status: "complete", request: req, response }];
181
+ }
182
+
183
+ return [result, { status: "complete", request: req, response }];
184
+ }
@@ -0,0 +1,184 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as components from "../models/components/index.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import { SteamSetsError } from "../models/errors/steamsetserror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Update account roles
31
+ */
32
+ export function adminUpdateRoles(
33
+ client: SteamSetsCore,
34
+ request: components.V1AdminUpdateRolesRequestBody,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ operations.AdminUpdateRolesResponse,
39
+ | errors.ErrorModel
40
+ | SteamSetsError
41
+ | ResponseValidationError
42
+ | ConnectionError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | InvalidRequestError
46
+ | UnexpectedClientError
47
+ | SDKValidationError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client: SteamSetsCore,
59
+ request: components.V1AdminUpdateRolesRequestBody,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ operations.AdminUpdateRolesResponse,
65
+ | errors.ErrorModel
66
+ | SteamSetsError
67
+ | ResponseValidationError
68
+ | ConnectionError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | InvalidRequestError
72
+ | UnexpectedClientError
73
+ | SDKValidationError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed = safeParse(
79
+ request,
80
+ (value) =>
81
+ components.V1AdminUpdateRolesRequestBody$outboundSchema.parse(value),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed.ok) {
85
+ return [parsed, { status: "invalid" }];
86
+ }
87
+ const payload = parsed.value;
88
+ const body = encodeJSON("body", payload, { explode: true });
89
+
90
+ const path = pathToFunc("/v1/admin.updateRoles")();
91
+
92
+ const headers = new Headers(compactMap({
93
+ "Content-Type": "application/json",
94
+ Accept: "application/problem+json",
95
+ }));
96
+
97
+ const secConfig = await extractSecurity(client._options.token);
98
+ const securityInput = secConfig == null ? {} : { token: secConfig };
99
+ const requestSecurity = resolveGlobalSecurity(securityInput);
100
+
101
+ const context = {
102
+ options: client._options,
103
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
104
+ operationID: "admin.updateRoles",
105
+ oAuth2Scopes: null,
106
+
107
+ resolvedSecurity: requestSecurity,
108
+
109
+ securitySource: client._options.token,
110
+ retryConfig: options?.retries
111
+ || client._options.retryConfig
112
+ || {
113
+ strategy: "backoff",
114
+ backoff: {
115
+ initialInterval: 500,
116
+ maxInterval: 5000,
117
+ exponent: 1.5,
118
+ maxElapsedTime: 60000,
119
+ },
120
+ retryConnectionErrors: true,
121
+ }
122
+ || { strategy: "none" },
123
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
124
+ };
125
+
126
+ const requestRes = client._createRequest(context, {
127
+ security: requestSecurity,
128
+ method: "POST",
129
+ baseURL: options?.serverURL,
130
+ path: path,
131
+ headers: headers,
132
+ body: body,
133
+ uaHeader: "x-speakeasy-user-agent",
134
+ userAgent: client._options.userAgent,
135
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
136
+ }, options);
137
+ if (!requestRes.ok) {
138
+ return [requestRes, { status: "invalid" }];
139
+ }
140
+ const req = requestRes.value;
141
+
142
+ const doResult = await client._do(req, {
143
+ context,
144
+ errorCodes: ["400", "401", "403", "404", "422", "4XX", "500", "5XX"],
145
+ retryConfig: context.retryConfig,
146
+ retryCodes: context.retryCodes,
147
+ });
148
+ if (!doResult.ok) {
149
+ return [doResult, { status: "request-error", request: req }];
150
+ }
151
+ const response = doResult.value;
152
+
153
+ const responseFields = {
154
+ HttpMeta: { Response: response, Request: req },
155
+ };
156
+
157
+ const [result] = await M.match<
158
+ operations.AdminUpdateRolesResponse,
159
+ | errors.ErrorModel
160
+ | SteamSetsError
161
+ | ResponseValidationError
162
+ | ConnectionError
163
+ | RequestAbortedError
164
+ | RequestTimeoutError
165
+ | InvalidRequestError
166
+ | UnexpectedClientError
167
+ | SDKValidationError
168
+ >(
169
+ M.nil(204, operations.AdminUpdateRolesResponse$inboundSchema),
170
+ M.jsonErr([400, 401, 403, 404, 422], errors.ErrorModel$inboundSchema, {
171
+ ctype: "application/problem+json",
172
+ }),
173
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
174
+ ctype: "application/problem+json",
175
+ }),
176
+ M.fail("4XX"),
177
+ M.fail("5XX"),
178
+ )(response, req, { extraFields: responseFields });
179
+ if (!result.ok) {
180
+ return [result, { status: "complete", request: req, response }];
181
+ }
182
+
183
+ return [result, { status: "complete", request: req, response }];
184
+ }
@@ -18,6 +18,8 @@ import {
18
18
  SDKInitOptions,
19
19
  } from "./types.js";
20
20
 
21
+ import { initHooks } from "./registration.js";
22
+
21
23
  export class SDKHooks implements Hooks {
22
24
  sdkInitHooks: SDKInitHook[] = [];
23
25
  beforeCreateRequestHooks: BeforeCreateRequestHook[] = [];
@@ -45,6 +47,7 @@ export class SDKHooks implements Hooks {
45
47
  this.registerAfterErrorHook(hook);
46
48
  }
47
49
  }
50
+ initHooks(this);
48
51
  }
49
52
 
50
53
  registerSDKInitHook(hook: SDKInitHook) {
@@ -0,0 +1,14 @@
1
+ import { Hooks } from "./types.js";
2
+
3
+ /*
4
+ * This file is only ever generated once on the first generation and then is free to be modified.
5
+ * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them
6
+ * in this file or in separate files in the hooks folder.
7
+ */
8
+
9
+ // @ts-expect-error remove this line when you add your first hook and hooks is used
10
+ export function initHooks(hooks: Hooks) {
11
+ // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook
12
+ // with an instance of a hook that implements that specific Hook interface
13
+ // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
14
+ }
package/src/lib/config.ts CHANGED
@@ -59,8 +59,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
59
59
  export const SDK_METADATA = {
60
60
  language: "typescript",
61
61
  openapiDocVersion: "1.0.0",
62
- sdkVersion: "0.31.0",
63
- genVersion: "2.788.15",
62
+ sdkVersion: "0.31.5",
63
+ genVersion: "2.791.1",
64
64
  userAgent:
65
- "speakeasy-sdk/typescript 0.31.0 2.788.15 1.0.0 @steamsets/client-ts",
65
+ "speakeasy-sdk/typescript 0.31.5 2.791.1 1.0.0 @steamsets/client-ts",
66
66
  } as const;
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 HistoryValue = {
11
+ /**
12
+ * The new value of the history entry
13
+ */
14
+ new: string | null;
15
+ /**
16
+ * The old value of the history entry
17
+ */
18
+ old: string | null;
19
+ };
20
+
21
+ /** @internal */
22
+ export const HistoryValue$inboundSchema: z.ZodType<
23
+ HistoryValue,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ new: z.nullable(z.string()),
28
+ old: z.nullable(z.string()),
29
+ });
30
+
31
+ export function historyValueFromJSON(
32
+ jsonString: string,
33
+ ): SafeParseResult<HistoryValue, SDKValidationError> {
34
+ return safeParse(
35
+ jsonString,
36
+ (x) => HistoryValue$inboundSchema.parse(JSON.parse(x)),
37
+ `Failed to parse 'HistoryValue' from JSON`,
38
+ );
39
+ }
@@ -24,6 +24,7 @@ export * from "./developerappanalyticsoutcome.js";
24
24
  export * from "./developerappanalyticstimeseries.js";
25
25
  export * from "./developerappanalyticstimeseriespoint.js";
26
26
  export * from "./errordetail.js";
27
+ export * from "./historyvalue.js";
27
28
  export * from "./httpmetadata.js";
28
29
  export * from "./idsearch.js";
29
30
  export * from "./image.js";
@@ -85,7 +86,9 @@ export * from "./v1accountlistfriendsresponsebody.js";
85
86
  export * from "./v1accountlistimagesresponsebody.js";
86
87
  export * from "./v1accountlistinventorysetsresponsebody.js";
87
88
  export * from "./v1accountlistleaderboardhistoryresponsebody.js";
89
+ export * from "./v1accountlocationupdate.js";
88
90
  export * from "./v1accountloginresponsebody.js";
91
+ export * from "./v1accountnameupdate.js";
89
92
  export * from "./v1accountplaytimedatapoint.js";
90
93
  export * from "./v1accountqueueupdaterequestbody.js";
91
94
  export * from "./v1accountreconnectrequestbody.js";
@@ -105,9 +108,14 @@ export * from "./v1accountupdatevanityrequestbody.js";
105
108
  export * from "./v1accountuploadedimage.js";
106
109
  export * from "./v1accountuploadimagesrequestbody.js";
107
110
  export * from "./v1accountuploadimagesresponsebody.js";
111
+ export * from "./v1accountvanityupdate.js";
108
112
  export * from "./v1accountverifyconnectionrequestbody.js";
109
113
  export * from "./v1accountverifyconnectionresponsebody.js";
110
114
  export * from "./v1accountverifyemailrequestbody.js";
115
+ export * from "./v1admingetaccountresponsebody.js";
116
+ export * from "./v1adminremovevanityresponsebody.js";
117
+ export * from "./v1adminupdateresourcesrequestbody.js";
118
+ export * from "./v1adminupdaterolesrequestbody.js";
111
119
  export * from "./v1appbadge.js";
112
120
  export * from "./v1appfilters.js";
113
121
  export * from "./v1applistbadgesrequestbody.js";
@@ -38,6 +38,10 @@ export type Resource = {
38
38
  export const ResourceResource$inboundSchema: z.ZodNativeEnum<
39
39
  typeof ResourceResource
40
40
  > = z.nativeEnum(ResourceResource);
41
+ /** @internal */
42
+ export const ResourceResource$outboundSchema: z.ZodNativeEnum<
43
+ typeof ResourceResource
44
+ > = ResourceResource$inboundSchema;
41
45
 
42
46
  /** @internal */
43
47
  export const Resource$inboundSchema: z.ZodType<
@@ -48,7 +52,25 @@ export const Resource$inboundSchema: z.ZodType<
48
52
  resource: ResourceResource$inboundSchema,
49
53
  value: z.string(),
50
54
  });
55
+ /** @internal */
56
+ export type Resource$Outbound = {
57
+ resource: string;
58
+ value: string;
59
+ };
60
+
61
+ /** @internal */
62
+ export const Resource$outboundSchema: z.ZodType<
63
+ Resource$Outbound,
64
+ z.ZodTypeDef,
65
+ Resource
66
+ > = z.object({
67
+ resource: ResourceResource$outboundSchema,
68
+ value: z.string(),
69
+ });
51
70
 
71
+ export function resourceToJSON(resource: Resource): string {
72
+ return JSON.stringify(Resource$outboundSchema.parse(resource));
73
+ }
52
74
  export function resourceFromJSON(
53
75
  jsonString: string,
54
76
  ): SafeParseResult<Resource, SDKValidationError> {
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { HistoryValue, HistoryValue$inboundSchema } from "./historyvalue.js";
10
+
11
+ export type V1AccountLocationUpdate = {
12
+ city: HistoryValue;
13
+ countryCode: HistoryValue;
14
+ countryName: HistoryValue;
15
+ region: HistoryValue;
16
+ state: HistoryValue;
17
+ /**
18
+ * The time the location was updated
19
+ */
20
+ updatedAt: Date;
21
+ };
22
+
23
+ /** @internal */
24
+ export const V1AccountLocationUpdate$inboundSchema: z.ZodType<
25
+ V1AccountLocationUpdate,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ city: HistoryValue$inboundSchema,
30
+ countryCode: HistoryValue$inboundSchema,
31
+ countryName: HistoryValue$inboundSchema,
32
+ region: HistoryValue$inboundSchema,
33
+ state: HistoryValue$inboundSchema,
34
+ updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
35
+ });
36
+
37
+ export function v1AccountLocationUpdateFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<V1AccountLocationUpdate, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => V1AccountLocationUpdate$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'V1AccountLocationUpdate' from JSON`,
44
+ );
45
+ }
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { HistoryValue, HistoryValue$inboundSchema } from "./historyvalue.js";
10
+
11
+ export type V1AccountNameUpdate = {
12
+ name: HistoryValue;
13
+ /**
14
+ * The time the name was updated
15
+ */
16
+ updatedAt: Date;
17
+ };
18
+
19
+ /** @internal */
20
+ export const V1AccountNameUpdate$inboundSchema: z.ZodType<
21
+ V1AccountNameUpdate,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ name: HistoryValue$inboundSchema,
26
+ updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
27
+ });
28
+
29
+ export function v1AccountNameUpdateFromJSON(
30
+ jsonString: string,
31
+ ): SafeParseResult<V1AccountNameUpdate, SDKValidationError> {
32
+ return safeParse(
33
+ jsonString,
34
+ (x) => V1AccountNameUpdate$inboundSchema.parse(JSON.parse(x)),
35
+ `Failed to parse 'V1AccountNameUpdate' from JSON`,
36
+ );
37
+ }
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { HistoryValue, HistoryValue$inboundSchema } from "./historyvalue.js";
10
+
11
+ export type V1AccountVanityUpdate = {
12
+ /**
13
+ * The time the vanity was updated
14
+ */
15
+ updatedAt: Date;
16
+ vanity: HistoryValue;
17
+ };
18
+
19
+ /** @internal */
20
+ export const V1AccountVanityUpdate$inboundSchema: z.ZodType<
21
+ V1AccountVanityUpdate,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ updatedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
26
+ vanity: HistoryValue$inboundSchema,
27
+ });
28
+
29
+ export function v1AccountVanityUpdateFromJSON(
30
+ jsonString: string,
31
+ ): SafeParseResult<V1AccountVanityUpdate, SDKValidationError> {
32
+ return safeParse(
33
+ jsonString,
34
+ (x) => V1AccountVanityUpdate$inboundSchema.parse(JSON.parse(x)),
35
+ `Failed to parse 'V1AccountVanityUpdate' from JSON`,
36
+ );
37
+ }