@steamsets/client-ts 0.11.3 → 0.11.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 (162) hide show
  1. package/README.md +16 -6
  2. package/docs/sdks/account/README.md +160 -0
  3. package/docs/sdks/app/README.md +6 -6
  4. package/docs/sdks/data/README.md +83 -4
  5. package/docs/sdks/developer/README.md +16 -8
  6. package/docs/sdks/leaderboard/README.md +81 -0
  7. package/docs/sdks/public/README.md +83 -4
  8. package/funcs/{developerAccountV1SettingsDeveloperAppGenerateKey.d.ts → accountAccountV1LeaderboardPreview.d.ts} +3 -3
  9. package/funcs/accountAccountV1LeaderboardPreview.d.ts.map +1 -0
  10. package/funcs/accountAccountV1LeaderboardPreview.js +99 -0
  11. package/funcs/accountAccountV1LeaderboardPreview.js.map +1 -0
  12. package/funcs/accountAccountV1Queue.d.ts +14 -0
  13. package/funcs/accountAccountV1Queue.d.ts.map +1 -0
  14. package/funcs/{appAccountV1Queue.js → accountAccountV1Queue.js} +6 -6
  15. package/funcs/accountAccountV1Queue.js.map +1 -0
  16. package/funcs/{appAccountV1Queue.d.ts → appAppV1Queue.d.ts} +2 -2
  17. package/funcs/appAppV1Queue.d.ts.map +1 -0
  18. package/funcs/appAppV1Queue.js +97 -0
  19. package/funcs/appAppV1Queue.js.map +1 -0
  20. package/funcs/dataAccountV1Queue.d.ts +2 -2
  21. package/funcs/dataAccountV1Queue.d.ts.map +1 -1
  22. package/funcs/dataAccountV1Queue.js +3 -3
  23. package/funcs/dataAccountV1Queue.js.map +1 -1
  24. package/funcs/dataAppV1Queue.d.ts +14 -0
  25. package/funcs/dataAppV1Queue.d.ts.map +1 -0
  26. package/funcs/dataAppV1Queue.js +97 -0
  27. package/funcs/dataAppV1Queue.js.map +1 -0
  28. package/funcs/developerAccountV1SettingsDeveloperAppUpdate.d.ts +14 -0
  29. package/funcs/developerAccountV1SettingsDeveloperAppUpdate.d.ts.map +1 -0
  30. package/funcs/{developerAccountV1SettingsDeveloperAppGenerateKey.js → developerAccountV1SettingsDeveloperAppUpdate.js} +8 -9
  31. package/funcs/developerAccountV1SettingsDeveloperAppUpdate.js.map +1 -0
  32. package/funcs/leaderboardAccountV1LeaderboardPreview.d.ts +14 -0
  33. package/funcs/leaderboardAccountV1LeaderboardPreview.d.ts.map +1 -0
  34. package/funcs/leaderboardAccountV1LeaderboardPreview.js +99 -0
  35. package/funcs/leaderboardAccountV1LeaderboardPreview.js.map +1 -0
  36. package/funcs/publicAccountV1Queue.d.ts +2 -2
  37. package/funcs/publicAccountV1Queue.d.ts.map +1 -1
  38. package/funcs/publicAccountV1Queue.js +3 -3
  39. package/funcs/publicAccountV1Queue.js.map +1 -1
  40. package/funcs/publicAppV1Queue.d.ts +14 -0
  41. package/funcs/publicAppV1Queue.d.ts.map +1 -0
  42. package/funcs/publicAppV1Queue.js +97 -0
  43. package/funcs/publicAppV1Queue.js.map +1 -0
  44. package/lib/config.d.ts +2 -2
  45. package/lib/config.js +2 -2
  46. package/models/components/developerapp.d.ts +88 -0
  47. package/models/components/developerapp.d.ts.map +1 -0
  48. package/models/components/developerapp.js +83 -0
  49. package/models/components/developerapp.js.map +1 -0
  50. package/models/components/index.d.ts +5 -2
  51. package/models/components/index.d.ts.map +1 -1
  52. package/models/components/index.js +5 -2
  53. package/models/components/index.js.map +1 -1
  54. package/models/components/v1accountdeveloperappupdaterequestbody.d.ts +48 -0
  55. package/models/components/v1accountdeveloperappupdaterequestbody.d.ts.map +1 -0
  56. package/models/components/{v1accountdeveloperappgeneratekeyrequestbody.js → v1accountdeveloperappupdaterequestbody.js} +19 -11
  57. package/models/components/v1accountdeveloperappupdaterequestbody.js.map +1 -0
  58. package/models/components/v1accountdeveloperappupdateresponsebody.d.ts +33 -0
  59. package/models/components/v1accountdeveloperappupdateresponsebody.d.ts.map +1 -0
  60. package/models/components/{v1accountdeveloperappgeneratekeyresponsebody.js → v1accountdeveloperappupdateresponsebody.js} +13 -13
  61. package/models/components/v1accountdeveloperappupdateresponsebody.js.map +1 -0
  62. package/models/components/v1accountleaderboardpreviewrequestbody.d.ts +110 -0
  63. package/models/components/v1accountleaderboardpreviewrequestbody.d.ts.map +1 -0
  64. package/models/components/v1accountleaderboardpreviewrequestbody.js +90 -0
  65. package/models/components/v1accountleaderboardpreviewrequestbody.js.map +1 -0
  66. package/models/components/v1accountleaderboardpreviewresponsebody.d.ts +38 -0
  67. package/models/components/v1accountleaderboardpreviewresponsebody.d.ts.map +1 -0
  68. package/models/components/v1accountleaderboardpreviewresponsebody.js +63 -0
  69. package/models/components/v1accountleaderboardpreviewresponsebody.js.map +1 -0
  70. package/models/components/v1getsettingsbody.d.ts +6 -0
  71. package/models/components/v1getsettingsbody.d.ts.map +1 -1
  72. package/models/components/v1getsettingsbody.js +3 -0
  73. package/models/components/v1getsettingsbody.js.map +1 -1
  74. package/models/operations/accountv1leaderboardpreview.d.ts +31 -0
  75. package/models/operations/accountv1leaderboardpreview.d.ts.map +1 -0
  76. package/models/operations/{accountv1settingsdeveloperappgeneratekey.js → accountv1leaderboardpreview.js} +17 -17
  77. package/models/operations/accountv1leaderboardpreview.js.map +1 -0
  78. package/models/operations/accountv1settingsdeveloperappupdate.d.ts +31 -0
  79. package/models/operations/accountv1settingsdeveloperappupdate.d.ts.map +1 -0
  80. package/models/operations/accountv1settingsdeveloperappupdate.js +66 -0
  81. package/models/operations/accountv1settingsdeveloperappupdate.js.map +1 -0
  82. package/models/operations/appv1queue.d.ts +32 -0
  83. package/models/operations/appv1queue.d.ts.map +1 -0
  84. package/models/operations/appv1queue.js +64 -0
  85. package/models/operations/appv1queue.js.map +1 -0
  86. package/models/operations/index.d.ts +3 -1
  87. package/models/operations/index.d.ts.map +1 -1
  88. package/models/operations/index.js +3 -1
  89. package/models/operations/index.js.map +1 -1
  90. package/package.json +1 -1
  91. package/sdk/account.d.ts +8 -0
  92. package/sdk/account.d.ts.map +1 -1
  93. package/sdk/account.js +14 -0
  94. package/sdk/account.js.map +1 -1
  95. package/sdk/app.d.ts +1 -1
  96. package/sdk/app.d.ts.map +1 -1
  97. package/sdk/app.js +3 -3
  98. package/sdk/app.js.map +1 -1
  99. package/sdk/data.d.ts +5 -1
  100. package/sdk/data.d.ts.map +1 -1
  101. package/sdk/data.js +8 -1
  102. package/sdk/data.js.map +1 -1
  103. package/sdk/developer.d.ts +2 -2
  104. package/sdk/developer.d.ts.map +1 -1
  105. package/sdk/developer.js +4 -4
  106. package/sdk/developer.js.map +1 -1
  107. package/sdk/leaderboard.d.ts +4 -0
  108. package/sdk/leaderboard.d.ts.map +1 -1
  109. package/sdk/leaderboard.js +7 -0
  110. package/sdk/leaderboard.js.map +1 -1
  111. package/sdk/public.d.ts +5 -1
  112. package/sdk/public.d.ts.map +1 -1
  113. package/sdk/public.js +8 -1
  114. package/sdk/public.js.map +1 -1
  115. package/sdk/sdk.d.ts +2 -2
  116. package/sdk/sdk.d.ts.map +1 -1
  117. package/sdk/sdk.js +4 -4
  118. package/sdk/sdk.js.map +1 -1
  119. package/src/funcs/accountAccountV1LeaderboardPreview.ts +132 -0
  120. package/src/funcs/accountAccountV1Queue.ts +127 -0
  121. package/src/funcs/{appAccountV1Queue.ts → appAppV1Queue.ts} +5 -5
  122. package/src/funcs/dataAccountV1Queue.ts +4 -4
  123. package/src/funcs/dataAppV1Queue.ts +127 -0
  124. package/src/funcs/{developerAccountV1SettingsDeveloperAppGenerateKey.ts → developerAccountV1SettingsDeveloperAppUpdate.ts} +12 -13
  125. package/src/funcs/leaderboardAccountV1LeaderboardPreview.ts +132 -0
  126. package/src/funcs/publicAccountV1Queue.ts +4 -4
  127. package/src/funcs/publicAppV1Queue.ts +127 -0
  128. package/src/lib/config.ts +2 -2
  129. package/src/models/components/developerapp.ts +120 -0
  130. package/src/models/components/index.ts +5 -2
  131. package/src/models/components/v1accountdeveloperappupdaterequestbody.ts +78 -0
  132. package/src/models/components/v1accountdeveloperappupdateresponsebody.ts +66 -0
  133. package/src/models/components/v1accountleaderboardpreviewrequestbody.ts +110 -0
  134. package/src/models/components/v1accountleaderboardpreviewresponsebody.ts +73 -0
  135. package/src/models/components/v1getsettingsbody.ts +13 -0
  136. package/src/models/operations/accountv1leaderboardpreview.ts +74 -0
  137. package/src/models/operations/accountv1settingsdeveloperappupdate.ts +76 -0
  138. package/src/models/operations/appv1queue.ts +61 -0
  139. package/src/models/operations/index.ts +3 -1
  140. package/src/sdk/account.ts +30 -0
  141. package/src/sdk/app.ts +4 -4
  142. package/src/sdk/data.ts +17 -2
  143. package/src/sdk/developer.ts +6 -6
  144. package/src/sdk/leaderboard.ts +15 -0
  145. package/src/sdk/public.ts +17 -2
  146. package/src/sdk/sdk.ts +5 -5
  147. package/funcs/appAccountV1Queue.d.ts.map +0 -1
  148. package/funcs/appAccountV1Queue.js.map +0 -1
  149. package/funcs/developerAccountV1SettingsDeveloperAppGenerateKey.d.ts.map +0 -1
  150. package/funcs/developerAccountV1SettingsDeveloperAppGenerateKey.js.map +0 -1
  151. package/models/components/v1accountdeveloperappgeneratekeyrequestbody.d.ts +0 -28
  152. package/models/components/v1accountdeveloperappgeneratekeyrequestbody.d.ts.map +0 -1
  153. package/models/components/v1accountdeveloperappgeneratekeyrequestbody.js.map +0 -1
  154. package/models/components/v1accountdeveloperappgeneratekeyresponsebody.d.ts +0 -33
  155. package/models/components/v1accountdeveloperappgeneratekeyresponsebody.d.ts.map +0 -1
  156. package/models/components/v1accountdeveloperappgeneratekeyresponsebody.js.map +0 -1
  157. package/models/operations/accountv1settingsdeveloperappgeneratekey.d.ts +0 -31
  158. package/models/operations/accountv1settingsdeveloperappgeneratekey.d.ts.map +0 -1
  159. package/models/operations/accountv1settingsdeveloperappgeneratekey.js.map +0 -1
  160. package/src/models/components/v1accountdeveloperappgeneratekeyrequestbody.ts +0 -52
  161. package/src/models/components/v1accountdeveloperappgeneratekeyresponsebody.ts +0 -68
  162. package/src/models/operations/accountv1settingsdeveloperappgeneratekey.ts +0 -77
@@ -0,0 +1,127 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Queue a app for processing
28
+ */
29
+ export async function dataAppV1Queue(
30
+ client: SteamSetsCore,
31
+ request: components.AppSearch,
32
+ options?: RequestOptions,
33
+ ): Promise<
34
+ Result<
35
+ operations.AppV1QueueResponse,
36
+ | errors.ErrorModel
37
+ | SDKError
38
+ | SDKValidationError
39
+ | UnexpectedClientError
40
+ | InvalidRequestError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | ConnectionError
44
+ >
45
+ > {
46
+ const input = request;
47
+
48
+ const parsed = safeParse(
49
+ input,
50
+ (value) => components.AppSearch$outboundSchema.parse(value),
51
+ "Input validation failed",
52
+ );
53
+ if (!parsed.ok) {
54
+ return parsed;
55
+ }
56
+ const payload = parsed.value;
57
+ const body = encodeJSON("body", payload, { explode: true });
58
+
59
+ const path = pathToFunc("/app.v1.AppService/Queue")();
60
+
61
+ const headers = new Headers({
62
+ "Content-Type": "application/json",
63
+ Accept: "application/problem+json",
64
+ });
65
+
66
+ const secConfig = await extractSecurity(client._options.session);
67
+ const securityInput = secConfig == null ? {} : { session: secConfig };
68
+ const context = {
69
+ operationID: "app.v1.queue",
70
+ oAuth2Scopes: [],
71
+ securitySource: client._options.session,
72
+ };
73
+ const requestSecurity = resolveGlobalSecurity(securityInput);
74
+
75
+ const requestRes = client._createRequest(context, {
76
+ security: requestSecurity,
77
+ method: "POST",
78
+ path: path,
79
+ headers: headers,
80
+ body: body,
81
+ uaHeader: "x-speakeasy-user-agent",
82
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
83
+ }, options);
84
+ if (!requestRes.ok) {
85
+ return requestRes;
86
+ }
87
+ const req = requestRes.value;
88
+
89
+ const doResult = await client._do(req, {
90
+ context,
91
+ errorCodes: ["400", "422", "429", "4XX", "500", "5XX"],
92
+ retryConfig: options?.retries
93
+ || client._options.retryConfig,
94
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
95
+ });
96
+ if (!doResult.ok) {
97
+ return doResult;
98
+ }
99
+ const response = doResult.value;
100
+
101
+ const responseFields = {
102
+ HttpMeta: { Response: response, Request: req },
103
+ };
104
+
105
+ const [result] = await M.match<
106
+ operations.AppV1QueueResponse,
107
+ | errors.ErrorModel
108
+ | SDKError
109
+ | SDKValidationError
110
+ | UnexpectedClientError
111
+ | InvalidRequestError
112
+ | RequestAbortedError
113
+ | RequestTimeoutError
114
+ | ConnectionError
115
+ >(
116
+ M.nil(204, operations.AppV1QueueResponse$inboundSchema, { hdrs: true }),
117
+ M.jsonErr([400, 422, 429, 500], errors.ErrorModel$inboundSchema, {
118
+ ctype: "application/problem+json",
119
+ }),
120
+ M.fail(["4XX", "5XX"]),
121
+ )(response, req, { extraFields: responseFields });
122
+ if (!result.ok) {
123
+ return result;
124
+ }
125
+
126
+ return result;
127
+ }
@@ -24,15 +24,15 @@ import * as operations from "../models/operations/index.js";
24
24
  import { Result } from "../types/fp.js";
25
25
 
26
26
  /**
27
- * Generate a new API key for the developer app
27
+ * Update the developer app/re-generate the api key
28
28
  */
29
- export async function developerAccountV1SettingsDeveloperAppGenerateKey(
29
+ export async function developerAccountV1SettingsDeveloperAppUpdate(
30
30
  client: SteamSetsCore,
31
- request: components.V1AccountDeveloperAppGenerateKeyRequestBody,
31
+ request: components.V1AccountDeveloperAppUpdateRequestBody,
32
32
  options?: RequestOptions,
33
33
  ): Promise<
34
34
  Result<
35
- operations.AccountV1SettingsDeveloperAppGenerateKeyResponse,
35
+ operations.AccountV1SettingsDeveloperAppUpdateResponse,
36
36
  | errors.ErrorModel
37
37
  | SDKError
38
38
  | SDKValidationError
@@ -48,8 +48,9 @@ export async function developerAccountV1SettingsDeveloperAppGenerateKey(
48
48
  const parsed = safeParse(
49
49
  input,
50
50
  (value) =>
51
- components.V1AccountDeveloperAppGenerateKeyRequestBody$outboundSchema
52
- .parse(value),
51
+ components.V1AccountDeveloperAppUpdateRequestBody$outboundSchema.parse(
52
+ value,
53
+ ),
53
54
  "Input validation failed",
54
55
  );
55
56
  if (!parsed.ok) {
@@ -58,9 +59,7 @@ export async function developerAccountV1SettingsDeveloperAppGenerateKey(
58
59
  const payload = parsed.value;
59
60
  const body = encodeJSON("body", payload, { explode: true });
60
61
 
61
- const path = pathToFunc(
62
- "/account.v1.AccountService/GenerateDeveloperAppKey",
63
- )();
62
+ const path = pathToFunc("/account.v1.AccountService/DeveloperAppUpdate")();
64
63
 
65
64
  const headers = new Headers({
66
65
  "Content-Type": "application/json",
@@ -70,7 +69,7 @@ export async function developerAccountV1SettingsDeveloperAppGenerateKey(
70
69
  const secConfig = await extractSecurity(client._options.session);
71
70
  const securityInput = secConfig == null ? {} : { session: secConfig };
72
71
  const context = {
73
- operationID: "account.v1.settings.developer-app-generate-key",
72
+ operationID: "account.v1.settings.developer-app-update",
74
73
  oAuth2Scopes: [],
75
74
  securitySource: client._options.session,
76
75
  };
@@ -107,7 +106,7 @@ export async function developerAccountV1SettingsDeveloperAppGenerateKey(
107
106
  };
108
107
 
109
108
  const [result] = await M.match<
110
- operations.AccountV1SettingsDeveloperAppGenerateKeyResponse,
109
+ operations.AccountV1SettingsDeveloperAppUpdateResponse,
111
110
  | errors.ErrorModel
112
111
  | SDKError
113
112
  | SDKValidationError
@@ -119,8 +118,8 @@ export async function developerAccountV1SettingsDeveloperAppGenerateKey(
119
118
  >(
120
119
  M.json(
121
120
  200,
122
- operations.AccountV1SettingsDeveloperAppGenerateKeyResponse$inboundSchema,
123
- { key: "V1AccountDeveloperAppGenerateKeyResponseBody" },
121
+ operations.AccountV1SettingsDeveloperAppUpdateResponse$inboundSchema,
122
+ { key: "V1AccountDeveloperAppUpdateResponseBody" },
124
123
  ),
125
124
  M.jsonErr([404, 422, 429, 500], errors.ErrorModel$inboundSchema, {
126
125
  ctype: "application/problem+json",
@@ -0,0 +1,132 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Preview what a given score would result in
28
+ */
29
+ export async function leaderboardAccountV1LeaderboardPreview(
30
+ client: SteamSetsCore,
31
+ request: components.V1AccountLeaderboardPreviewRequestBody,
32
+ options?: RequestOptions,
33
+ ): Promise<
34
+ Result<
35
+ operations.AccountV1LeaderboardPreviewResponse,
36
+ | errors.ErrorModel
37
+ | SDKError
38
+ | SDKValidationError
39
+ | UnexpectedClientError
40
+ | InvalidRequestError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | ConnectionError
44
+ >
45
+ > {
46
+ const input = request;
47
+
48
+ const parsed = safeParse(
49
+ input,
50
+ (value) =>
51
+ components.V1AccountLeaderboardPreviewRequestBody$outboundSchema.parse(
52
+ value,
53
+ ),
54
+ "Input validation failed",
55
+ );
56
+ if (!parsed.ok) {
57
+ return parsed;
58
+ }
59
+ const payload = parsed.value;
60
+ const body = encodeJSON("body", payload, { explode: true });
61
+
62
+ const path = pathToFunc("/account.v1.AccountService/GetLeaderboardPreview")();
63
+
64
+ const headers = new Headers({
65
+ "Content-Type": "application/json",
66
+ Accept: "application/json",
67
+ });
68
+
69
+ const secConfig = await extractSecurity(client._options.session);
70
+ const securityInput = secConfig == null ? {} : { session: secConfig };
71
+ const context = {
72
+ operationID: "account.v1.leaderboardPreview",
73
+ oAuth2Scopes: [],
74
+ securitySource: client._options.session,
75
+ };
76
+ const requestSecurity = resolveGlobalSecurity(securityInput);
77
+
78
+ const requestRes = client._createRequest(context, {
79
+ security: requestSecurity,
80
+ method: "POST",
81
+ path: path,
82
+ headers: headers,
83
+ body: body,
84
+ uaHeader: "x-speakeasy-user-agent",
85
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
86
+ }, options);
87
+ if (!requestRes.ok) {
88
+ return requestRes;
89
+ }
90
+ const req = requestRes.value;
91
+
92
+ const doResult = await client._do(req, {
93
+ context,
94
+ errorCodes: ["404", "422", "4XX", "500", "5XX"],
95
+ retryConfig: options?.retries
96
+ || client._options.retryConfig,
97
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
98
+ });
99
+ if (!doResult.ok) {
100
+ return doResult;
101
+ }
102
+ const response = doResult.value;
103
+
104
+ const responseFields = {
105
+ HttpMeta: { Response: response, Request: req },
106
+ };
107
+
108
+ const [result] = await M.match<
109
+ operations.AccountV1LeaderboardPreviewResponse,
110
+ | errors.ErrorModel
111
+ | SDKError
112
+ | SDKValidationError
113
+ | UnexpectedClientError
114
+ | InvalidRequestError
115
+ | RequestAbortedError
116
+ | RequestTimeoutError
117
+ | ConnectionError
118
+ >(
119
+ M.json(200, operations.AccountV1LeaderboardPreviewResponse$inboundSchema, {
120
+ key: "V1AccountLeaderboardPreviewResponseBody",
121
+ }),
122
+ M.jsonErr([404, 422, 500], errors.ErrorModel$inboundSchema, {
123
+ ctype: "application/problem+json",
124
+ }),
125
+ M.fail(["4XX", "5XX"]),
126
+ )(response, req, { extraFields: responseFields });
127
+ if (!result.ok) {
128
+ return result;
129
+ }
130
+
131
+ return result;
132
+ }
@@ -24,11 +24,11 @@ import * as operations from "../models/operations/index.js";
24
24
  import { Result } from "../types/fp.js";
25
25
 
26
26
  /**
27
- * Queue a app for processing
27
+ * Queue an account for processing
28
28
  */
29
29
  export async function publicAccountV1Queue(
30
30
  client: SteamSetsCore,
31
- request: components.AppSearch,
31
+ request: components.AccountSearch,
32
32
  options?: RequestOptions,
33
33
  ): Promise<
34
34
  Result<
@@ -47,7 +47,7 @@ export async function publicAccountV1Queue(
47
47
 
48
48
  const parsed = safeParse(
49
49
  input,
50
- (value) => components.AppSearch$outboundSchema.parse(value),
50
+ (value) => components.AccountSearch$outboundSchema.parse(value),
51
51
  "Input validation failed",
52
52
  );
53
53
  if (!parsed.ok) {
@@ -56,7 +56,7 @@ export async function publicAccountV1Queue(
56
56
  const payload = parsed.value;
57
57
  const body = encodeJSON("body", payload, { explode: true });
58
58
 
59
- const path = pathToFunc("/app.v1.AppService/Queue")();
59
+ const path = pathToFunc("/account.v1.AccountService/Queue")();
60
60
 
61
61
  const headers = new Headers({
62
62
  "Content-Type": "application/json",
@@ -0,0 +1,127 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { safeParse } from "../lib/schemas.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as components from "../models/components/index.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Queue a app for processing
28
+ */
29
+ export async function publicAppV1Queue(
30
+ client: SteamSetsCore,
31
+ request: components.AppSearch,
32
+ options?: RequestOptions,
33
+ ): Promise<
34
+ Result<
35
+ operations.AppV1QueueResponse,
36
+ | errors.ErrorModel
37
+ | SDKError
38
+ | SDKValidationError
39
+ | UnexpectedClientError
40
+ | InvalidRequestError
41
+ | RequestAbortedError
42
+ | RequestTimeoutError
43
+ | ConnectionError
44
+ >
45
+ > {
46
+ const input = request;
47
+
48
+ const parsed = safeParse(
49
+ input,
50
+ (value) => components.AppSearch$outboundSchema.parse(value),
51
+ "Input validation failed",
52
+ );
53
+ if (!parsed.ok) {
54
+ return parsed;
55
+ }
56
+ const payload = parsed.value;
57
+ const body = encodeJSON("body", payload, { explode: true });
58
+
59
+ const path = pathToFunc("/app.v1.AppService/Queue")();
60
+
61
+ const headers = new Headers({
62
+ "Content-Type": "application/json",
63
+ Accept: "application/problem+json",
64
+ });
65
+
66
+ const secConfig = await extractSecurity(client._options.session);
67
+ const securityInput = secConfig == null ? {} : { session: secConfig };
68
+ const context = {
69
+ operationID: "app.v1.queue",
70
+ oAuth2Scopes: [],
71
+ securitySource: client._options.session,
72
+ };
73
+ const requestSecurity = resolveGlobalSecurity(securityInput);
74
+
75
+ const requestRes = client._createRequest(context, {
76
+ security: requestSecurity,
77
+ method: "POST",
78
+ path: path,
79
+ headers: headers,
80
+ body: body,
81
+ uaHeader: "x-speakeasy-user-agent",
82
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
83
+ }, options);
84
+ if (!requestRes.ok) {
85
+ return requestRes;
86
+ }
87
+ const req = requestRes.value;
88
+
89
+ const doResult = await client._do(req, {
90
+ context,
91
+ errorCodes: ["400", "422", "429", "4XX", "500", "5XX"],
92
+ retryConfig: options?.retries
93
+ || client._options.retryConfig,
94
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
95
+ });
96
+ if (!doResult.ok) {
97
+ return doResult;
98
+ }
99
+ const response = doResult.value;
100
+
101
+ const responseFields = {
102
+ HttpMeta: { Response: response, Request: req },
103
+ };
104
+
105
+ const [result] = await M.match<
106
+ operations.AppV1QueueResponse,
107
+ | errors.ErrorModel
108
+ | SDKError
109
+ | SDKValidationError
110
+ | UnexpectedClientError
111
+ | InvalidRequestError
112
+ | RequestAbortedError
113
+ | RequestTimeoutError
114
+ | ConnectionError
115
+ >(
116
+ M.nil(204, operations.AppV1QueueResponse$inboundSchema, { hdrs: true }),
117
+ M.jsonErr([400, 422, 429, 500], errors.ErrorModel$inboundSchema, {
118
+ ctype: "application/problem+json",
119
+ }),
120
+ M.fail(["4XX", "5XX"]),
121
+ )(response, req, { extraFields: responseFields });
122
+ if (!result.ok) {
123
+ return result;
124
+ }
125
+
126
+ return result;
127
+ }
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.11.3",
58
+ sdkVersion: "0.11.5",
59
59
  genVersion: "2.426.2",
60
60
  userAgent:
61
- "speakeasy-sdk/typescript 0.11.3 2.426.2 1.0.0 @steamsets/client-ts",
61
+ "speakeasy-sdk/typescript 0.11.5 2.426.2 1.0.0 @steamsets/client-ts",
62
62
  } as const;
@@ -0,0 +1,120 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ /**
9
+ * The environment of the developer app
10
+ */
11
+ export const DeveloperAppEnvironment = {
12
+ Production: "production",
13
+ Development: "development",
14
+ Staging: "staging",
15
+ } as const;
16
+ /**
17
+ * The environment of the developer app
18
+ */
19
+ export type DeveloperAppEnvironment = ClosedEnum<
20
+ typeof DeveloperAppEnvironment
21
+ >;
22
+
23
+ export type DeveloperApp = {
24
+ /**
25
+ * The api key of the developer app
26
+ */
27
+ apiKey: string | null;
28
+ /**
29
+ * The description of the developer app
30
+ */
31
+ description: string;
32
+ /**
33
+ * The environment of the developer app
34
+ */
35
+ environment: DeveloperAppEnvironment;
36
+ /**
37
+ * The icon of the developer app
38
+ */
39
+ icon: string | null;
40
+ /**
41
+ * The id of the developer app
42
+ */
43
+ id: string;
44
+ /**
45
+ * The name of the developer app
46
+ */
47
+ name: string;
48
+ };
49
+
50
+ /** @internal */
51
+ export const DeveloperAppEnvironment$inboundSchema: z.ZodNativeEnum<
52
+ typeof DeveloperAppEnvironment
53
+ > = z.nativeEnum(DeveloperAppEnvironment);
54
+
55
+ /** @internal */
56
+ export const DeveloperAppEnvironment$outboundSchema: z.ZodNativeEnum<
57
+ typeof DeveloperAppEnvironment
58
+ > = DeveloperAppEnvironment$inboundSchema;
59
+
60
+ /**
61
+ * @internal
62
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
63
+ */
64
+ export namespace DeveloperAppEnvironment$ {
65
+ /** @deprecated use `DeveloperAppEnvironment$inboundSchema` instead. */
66
+ export const inboundSchema = DeveloperAppEnvironment$inboundSchema;
67
+ /** @deprecated use `DeveloperAppEnvironment$outboundSchema` instead. */
68
+ export const outboundSchema = DeveloperAppEnvironment$outboundSchema;
69
+ }
70
+
71
+ /** @internal */
72
+ export const DeveloperApp$inboundSchema: z.ZodType<
73
+ DeveloperApp,
74
+ z.ZodTypeDef,
75
+ unknown
76
+ > = z.object({
77
+ apiKey: z.nullable(z.string()),
78
+ description: z.string(),
79
+ environment: DeveloperAppEnvironment$inboundSchema,
80
+ icon: z.nullable(z.string()),
81
+ id: z.string(),
82
+ name: z.string(),
83
+ });
84
+
85
+ /** @internal */
86
+ export type DeveloperApp$Outbound = {
87
+ apiKey: string | null;
88
+ description: string;
89
+ environment: string;
90
+ icon: string | null;
91
+ id: string;
92
+ name: string;
93
+ };
94
+
95
+ /** @internal */
96
+ export const DeveloperApp$outboundSchema: z.ZodType<
97
+ DeveloperApp$Outbound,
98
+ z.ZodTypeDef,
99
+ DeveloperApp
100
+ > = z.object({
101
+ apiKey: z.nullable(z.string()),
102
+ description: z.string(),
103
+ environment: DeveloperAppEnvironment$outboundSchema,
104
+ icon: z.nullable(z.string()),
105
+ id: z.string(),
106
+ name: z.string(),
107
+ });
108
+
109
+ /**
110
+ * @internal
111
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
112
+ */
113
+ export namespace DeveloperApp$ {
114
+ /** @deprecated use `DeveloperApp$inboundSchema` instead. */
115
+ export const inboundSchema = DeveloperApp$inboundSchema;
116
+ /** @deprecated use `DeveloperApp$outboundSchema` instead. */
117
+ export const outboundSchema = DeveloperApp$outboundSchema;
118
+ /** @deprecated use `DeveloperApp$Outbound` instead. */
119
+ export type Outbound = DeveloperApp$Outbound;
120
+ }
@@ -17,6 +17,7 @@ export * from "./colortag.js";
17
17
  export * from "./connection.js";
18
18
  export * from "./country.js";
19
19
  export * from "./designtag.js";
20
+ export * from "./developerapp.js";
20
21
  export * from "./emailnotification.js";
21
22
  export * from "./errordetail.js";
22
23
  export * from "./httpmetadata.js";
@@ -38,13 +39,15 @@ export * from "./v1accountbadgecompletion.js";
38
39
  export * from "./v1accountdatapointsresponsebody.js";
39
40
  export * from "./v1accountdeveloperappdeleterequestbody.js";
40
41
  export * from "./v1accountdeveloperappdeleteresponsebody.js";
41
- export * from "./v1accountdeveloperappgeneratekeyrequestbody.js";
42
- export * from "./v1accountdeveloperappgeneratekeyresponsebody.js";
42
+ export * from "./v1accountdeveloperappupdaterequestbody.js";
43
+ export * from "./v1accountdeveloperappupdateresponsebody.js";
43
44
  export * from "./v1accountfriend.js";
44
45
  export * from "./v1accountfriendsresponsebody.js";
45
46
  export * from "./v1accountleaderboardaccount.js";
46
47
  export * from "./v1accountleaderboardbadgeinfo.js";
47
48
  export * from "./v1accountleaderboardhistoryresponsebody.js";
49
+ export * from "./v1accountleaderboardpreviewrequestbody.js";
50
+ export * from "./v1accountleaderboardpreviewresponsebody.js";
48
51
  export * from "./v1accountleaderboardrequestbody.js";
49
52
  export * from "./v1accountleaderboardresponsebody.js";
50
53
  export * from "./v1accountsappsresponsebody.js";