@steamsets/client-ts 0.14.26 → 0.14.27

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 (251) hide show
  1. package/README.md +83 -17
  2. package/docs/sdks/account/README.md +493 -1
  3. package/docs/sdks/admin/README.md +1 -1
  4. package/docs/sdks/badge/README.md +2 -0
  5. package/docs/sdks/data/README.md +1 -73
  6. package/docs/sdks/developer/README.md +1 -1
  7. package/docs/sdks/event/README.md +168 -0
  8. package/docs/sdks/{public → external}/README.md +93 -21
  9. package/docs/sdks/internal/README.md +1726 -0
  10. package/docs/sdks/leaderboard/README.md +2 -0
  11. package/docs/sdks/liveness/README.md +1 -1
  12. package/docs/sdks/stats/README.md +1 -1
  13. package/funcs/accountAdminV1UpdateResources.d.ts +11 -0
  14. package/funcs/accountAdminV1UpdateResources.d.ts.map +1 -0
  15. package/funcs/accountAdminV1UpdateResources.js +111 -0
  16. package/funcs/accountAdminV1UpdateResources.js.map +1 -0
  17. package/funcs/accountAdminV1UpdateRoles.d.ts +11 -0
  18. package/funcs/accountAdminV1UpdateRoles.d.ts.map +1 -0
  19. package/funcs/accountAdminV1UpdateRoles.js +111 -0
  20. package/funcs/accountAdminV1UpdateRoles.js.map +1 -0
  21. package/funcs/accountCreateDeveloperApp.d.ts +11 -0
  22. package/funcs/accountCreateDeveloperApp.d.ts.map +1 -0
  23. package/funcs/accountCreateDeveloperApp.js +111 -0
  24. package/funcs/accountCreateDeveloperApp.js.map +1 -0
  25. package/funcs/accountDeleteDeveloperApp.d.ts +11 -0
  26. package/funcs/accountDeleteDeveloperApp.d.ts.map +1 -0
  27. package/funcs/accountDeleteDeveloperApp.js +111 -0
  28. package/funcs/accountDeleteDeveloperApp.js.map +1 -0
  29. package/funcs/{publicGetBadges.d.ts → accountGetAccount.d.ts} +2 -2
  30. package/funcs/accountGetAccount.d.ts.map +1 -0
  31. package/funcs/accountGetAccount.js +113 -0
  32. package/funcs/accountGetAccount.js.map +1 -0
  33. package/funcs/accountUpdateApp.d.ts +11 -0
  34. package/funcs/{publicGetFriends.d.ts.map → accountUpdateApp.d.ts.map} +1 -1
  35. package/funcs/accountUpdateApp.js +111 -0
  36. package/funcs/{publicGetFriends.js.map → accountUpdateApp.js.map} +1 -1
  37. package/funcs/eventAdminV1GetEvents.d.ts +10 -0
  38. package/funcs/eventAdminV1GetEvents.d.ts.map +1 -0
  39. package/funcs/eventAdminV1GetEvents.js +102 -0
  40. package/funcs/eventAdminV1GetEvents.js.map +1 -0
  41. package/funcs/{publicGetLeaderboardHistory.d.ts → eventAdminV1UpdateEvent.d.ts} +2 -2
  42. package/funcs/eventAdminV1UpdateEvent.d.ts.map +1 -0
  43. package/funcs/eventAdminV1UpdateEvent.js +113 -0
  44. package/funcs/eventAdminV1UpdateEvent.js.map +1 -0
  45. package/funcs/externalGetApps.d.ts +11 -0
  46. package/funcs/{publicGetBadges.d.ts.map → externalGetApps.d.ts.map} +1 -1
  47. package/funcs/{publicGetApps.js → externalGetApps.js} +3 -3
  48. package/funcs/{publicGetBadges.js.map → externalGetApps.js.map} +1 -1
  49. package/funcs/{publicGetApps.d.ts → externalGetBadges.d.ts} +2 -2
  50. package/funcs/externalGetBadges.d.ts.map +1 -0
  51. package/funcs/{publicGetBadges.js → externalGetBadges.js} +3 -3
  52. package/funcs/externalGetBadges.js.map +1 -0
  53. package/funcs/{publicGetDataPoints.d.ts → externalGetDataPoints.d.ts} +2 -2
  54. package/funcs/externalGetDataPoints.d.ts.map +1 -0
  55. package/funcs/{publicGetDataPoints.js → externalGetDataPoints.js} +3 -3
  56. package/funcs/externalGetDataPoints.js.map +1 -0
  57. package/funcs/externalGetFriends.d.ts +11 -0
  58. package/funcs/externalGetFriends.d.ts.map +1 -0
  59. package/funcs/{publicGetFriends.js → externalGetFriends.js} +3 -3
  60. package/funcs/externalGetFriends.js.map +1 -0
  61. package/funcs/{publicGetInfo.d.ts → externalGetInfo.d.ts} +2 -2
  62. package/funcs/externalGetInfo.d.ts.map +1 -0
  63. package/funcs/{publicGetInfo.js → externalGetInfo.js} +3 -3
  64. package/funcs/externalGetInfo.js.map +1 -0
  65. package/funcs/externalGetLeaderboardHistory.d.ts +11 -0
  66. package/funcs/externalGetLeaderboardHistory.d.ts.map +1 -0
  67. package/funcs/{publicGetLeaderboardHistory.js → externalGetLeaderboardHistory.js} +3 -3
  68. package/funcs/externalGetLeaderboardHistory.js.map +1 -0
  69. package/funcs/externalStatsV1StatsGet.d.ts +10 -0
  70. package/funcs/externalStatsV1StatsGet.d.ts.map +1 -0
  71. package/funcs/externalStatsV1StatsGet.js +102 -0
  72. package/funcs/externalStatsV1StatsGet.js.map +1 -0
  73. package/funcs/internalAccountV1BookmarkBadge.d.ts +11 -0
  74. package/funcs/internalAccountV1BookmarkBadge.d.ts.map +1 -0
  75. package/funcs/internalAccountV1BookmarkBadge.js +113 -0
  76. package/funcs/internalAccountV1BookmarkBadge.js.map +1 -0
  77. package/funcs/internalAccountV1ConnectionReconnect.d.ts +11 -0
  78. package/funcs/internalAccountV1ConnectionReconnect.d.ts.map +1 -0
  79. package/funcs/internalAccountV1ConnectionReconnect.js +113 -0
  80. package/funcs/internalAccountV1ConnectionReconnect.js.map +1 -0
  81. package/funcs/internalAccountV1GetBadgeBookmarks.d.ts +10 -0
  82. package/funcs/internalAccountV1GetBadgeBookmarks.d.ts.map +1 -0
  83. package/funcs/internalAccountV1GetBadgeBookmarks.js +102 -0
  84. package/funcs/internalAccountV1GetBadgeBookmarks.js.map +1 -0
  85. package/funcs/internalAccountV1GetOwnedBadges.d.ts +10 -0
  86. package/funcs/internalAccountV1GetOwnedBadges.d.ts.map +1 -0
  87. package/funcs/internalAccountV1GetOwnedBadges.js +102 -0
  88. package/funcs/internalAccountV1GetOwnedBadges.js.map +1 -0
  89. package/funcs/internalAccountV1ImagesGet.d.ts +10 -0
  90. package/funcs/internalAccountV1ImagesGet.d.ts.map +1 -0
  91. package/funcs/internalAccountV1ImagesGet.js +100 -0
  92. package/funcs/internalAccountV1ImagesGet.js.map +1 -0
  93. package/funcs/internalAccountV1ImagesUpdate.d.ts +11 -0
  94. package/funcs/internalAccountV1ImagesUpdate.d.ts.map +1 -0
  95. package/funcs/internalAccountV1ImagesUpdate.js +113 -0
  96. package/funcs/internalAccountV1ImagesUpdate.js.map +1 -0
  97. package/funcs/internalAdminV1GetEvents.d.ts +10 -0
  98. package/funcs/internalAdminV1GetEvents.d.ts.map +1 -0
  99. package/funcs/internalAdminV1GetEvents.js +102 -0
  100. package/funcs/internalAdminV1GetEvents.js.map +1 -0
  101. package/funcs/internalAdminV1UpdateEvent.d.ts +11 -0
  102. package/funcs/internalAdminV1UpdateEvent.d.ts.map +1 -0
  103. package/funcs/internalAdminV1UpdateEvent.js +113 -0
  104. package/funcs/internalAdminV1UpdateEvent.js.map +1 -0
  105. package/funcs/internalAdminV1UpdateResources.d.ts +11 -0
  106. package/funcs/internalAdminV1UpdateResources.d.ts.map +1 -0
  107. package/funcs/internalAdminV1UpdateResources.js +111 -0
  108. package/funcs/internalAdminV1UpdateResources.js.map +1 -0
  109. package/funcs/internalAdminV1UpdateRoles.d.ts +11 -0
  110. package/funcs/internalAdminV1UpdateRoles.d.ts.map +1 -0
  111. package/funcs/internalAdminV1UpdateRoles.js +111 -0
  112. package/funcs/internalAdminV1UpdateRoles.js.map +1 -0
  113. package/funcs/internalBadgeV1Search.d.ts +11 -0
  114. package/funcs/internalBadgeV1Search.d.ts.map +1 -0
  115. package/funcs/internalBadgeV1Search.js +113 -0
  116. package/funcs/internalBadgeV1Search.js.map +1 -0
  117. package/funcs/internalCheck.d.ts +16 -0
  118. package/funcs/internalCheck.d.ts.map +1 -0
  119. package/funcs/internalCheck.js +106 -0
  120. package/funcs/internalCheck.js.map +1 -0
  121. package/funcs/internalCreateDeveloperApp.d.ts +11 -0
  122. package/funcs/internalCreateDeveloperApp.d.ts.map +1 -0
  123. package/funcs/internalCreateDeveloperApp.js +111 -0
  124. package/funcs/internalCreateDeveloperApp.js.map +1 -0
  125. package/funcs/internalDeleteDeveloperApp.d.ts +11 -0
  126. package/funcs/internalDeleteDeveloperApp.d.ts.map +1 -0
  127. package/funcs/internalDeleteDeveloperApp.js +111 -0
  128. package/funcs/internalDeleteDeveloperApp.js.map +1 -0
  129. package/funcs/internalDeleteImages.d.ts +11 -0
  130. package/funcs/internalDeleteImages.d.ts.map +1 -0
  131. package/funcs/internalDeleteImages.js +113 -0
  132. package/funcs/internalDeleteImages.js.map +1 -0
  133. package/funcs/{publicGetFriends.d.ts → internalGetAccount.d.ts} +2 -2
  134. package/funcs/internalGetAccount.d.ts.map +1 -0
  135. package/funcs/internalGetAccount.js +113 -0
  136. package/funcs/internalGetAccount.js.map +1 -0
  137. package/funcs/internalGetStaff.d.ts +10 -0
  138. package/funcs/internalGetStaff.d.ts.map +1 -0
  139. package/funcs/{dataGetStaff.js → internalGetStaff.js} +3 -3
  140. package/funcs/internalGetStaff.js.map +1 -0
  141. package/funcs/{dataGetStaff.d.ts → internalGetTags.d.ts} +2 -2
  142. package/funcs/internalGetTags.d.ts.map +1 -0
  143. package/funcs/internalGetTags.js +102 -0
  144. package/funcs/internalGetTags.js.map +1 -0
  145. package/funcs/internalSendEmailVerification.d.ts +10 -0
  146. package/funcs/internalSendEmailVerification.d.ts.map +1 -0
  147. package/funcs/internalSendEmailVerification.js +111 -0
  148. package/funcs/internalSendEmailVerification.js.map +1 -0
  149. package/funcs/internalUpdateApp.d.ts +11 -0
  150. package/funcs/internalUpdateApp.d.ts.map +1 -0
  151. package/funcs/internalUpdateApp.js +111 -0
  152. package/funcs/internalUpdateApp.js.map +1 -0
  153. package/funcs/internalUploadImages.d.ts +11 -0
  154. package/funcs/internalUploadImages.d.ts.map +1 -0
  155. package/funcs/internalUploadImages.js +113 -0
  156. package/funcs/internalUploadImages.js.map +1 -0
  157. package/funcs/internalVerifyEmail.d.ts +11 -0
  158. package/funcs/{publicGetDataPoints.d.ts.map → internalVerifyEmail.d.ts.map} +1 -1
  159. package/funcs/internalVerifyEmail.js +113 -0
  160. package/funcs/{publicGetDataPoints.js.map → internalVerifyEmail.js.map} +1 -1
  161. package/jsr.json +1 -1
  162. package/lib/config.d.ts +3 -3
  163. package/lib/config.js +3 -3
  164. package/lib/retries.js +0 -1
  165. package/lib/retries.js.map +1 -1
  166. package/models/components/v1stats.d.ts +0 -5
  167. package/models/components/v1stats.d.ts.map +1 -1
  168. package/models/components/v1stats.js +0 -2
  169. package/models/components/v1stats.js.map +1 -1
  170. package/package.json +6 -7
  171. package/sdk/account.d.ts +6 -0
  172. package/sdk/account.d.ts.map +1 -1
  173. package/sdk/account.js +24 -0
  174. package/sdk/account.js.map +1 -1
  175. package/sdk/data.d.ts +0 -1
  176. package/sdk/data.d.ts.map +1 -1
  177. package/sdk/data.js +0 -4
  178. package/sdk/data.js.map +1 -1
  179. package/sdk/event.d.ts +8 -0
  180. package/sdk/event.d.ts.map +1 -0
  181. package/sdk/event.js +20 -0
  182. package/sdk/event.js.map +1 -0
  183. package/sdk/{public.d.ts → external.d.ts} +3 -2
  184. package/sdk/external.d.ts.map +1 -0
  185. package/sdk/external.js +40 -0
  186. package/sdk/external.js.map +1 -0
  187. package/sdk/internal.d.ts +34 -0
  188. package/sdk/internal.d.ts.map +1 -0
  189. package/sdk/internal.js +106 -0
  190. package/sdk/internal.js.map +1 -0
  191. package/sdk/sdk.d.ts +11 -5
  192. package/sdk/sdk.d.ts.map +1 -1
  193. package/sdk/sdk.js +14 -6
  194. package/sdk/sdk.js.map +1 -1
  195. package/src/funcs/accountAdminV1UpdateResources.ts +148 -0
  196. package/src/funcs/accountAdminV1UpdateRoles.ts +148 -0
  197. package/src/funcs/accountCreateDeveloperApp.ts +152 -0
  198. package/src/funcs/accountDeleteDeveloperApp.ts +154 -0
  199. package/src/funcs/accountGetAccount.ts +149 -0
  200. package/src/funcs/accountUpdateApp.ts +154 -0
  201. package/src/funcs/eventAdminV1GetEvents.ts +132 -0
  202. package/src/funcs/eventAdminV1UpdateEvent.ts +150 -0
  203. package/src/funcs/{publicGetApps.ts → externalGetApps.ts} +1 -1
  204. package/src/funcs/{publicGetBadges.ts → externalGetBadges.ts} +1 -1
  205. package/src/funcs/{publicGetDataPoints.ts → externalGetDataPoints.ts} +1 -1
  206. package/src/funcs/{publicGetFriends.ts → externalGetFriends.ts} +1 -1
  207. package/src/funcs/{publicGetInfo.ts → externalGetInfo.ts} +1 -1
  208. package/src/funcs/{publicGetLeaderboardHistory.ts → externalGetLeaderboardHistory.ts} +1 -1
  209. package/src/funcs/externalStatsV1StatsGet.ts +132 -0
  210. package/src/funcs/internalAccountV1BookmarkBadge.ts +150 -0
  211. package/src/funcs/internalAccountV1ConnectionReconnect.ts +149 -0
  212. package/src/funcs/internalAccountV1GetBadgeBookmarks.ts +132 -0
  213. package/src/funcs/internalAccountV1GetOwnedBadges.ts +132 -0
  214. package/src/funcs/internalAccountV1ImagesGet.ts +127 -0
  215. package/src/funcs/internalAccountV1ImagesUpdate.ts +149 -0
  216. package/src/funcs/internalAdminV1GetEvents.ts +132 -0
  217. package/src/funcs/internalAdminV1UpdateEvent.ts +150 -0
  218. package/src/funcs/internalAdminV1UpdateResources.ts +148 -0
  219. package/src/funcs/internalAdminV1UpdateRoles.ts +148 -0
  220. package/src/funcs/internalBadgeV1Search.ts +149 -0
  221. package/src/funcs/internalCheck.ts +133 -0
  222. package/src/funcs/internalCreateDeveloperApp.ts +152 -0
  223. package/src/funcs/internalDeleteDeveloperApp.ts +154 -0
  224. package/src/funcs/internalDeleteImages.ts +149 -0
  225. package/src/funcs/internalGetAccount.ts +149 -0
  226. package/src/funcs/{dataGetStaff.ts → internalGetStaff.ts} +1 -1
  227. package/src/funcs/internalGetTags.ts +132 -0
  228. package/src/funcs/internalSendEmailVerification.ts +156 -0
  229. package/src/funcs/internalUpdateApp.ts +154 -0
  230. package/src/funcs/internalUploadImages.ts +149 -0
  231. package/src/funcs/internalVerifyEmail.ts +149 -0
  232. package/src/lib/config.ts +3 -3
  233. package/src/lib/retries.ts +0 -1
  234. package/src/models/components/v1stats.ts +0 -7
  235. package/src/sdk/account.ts +72 -0
  236. package/src/sdk/data.ts +0 -10
  237. package/src/sdk/event.ts +32 -0
  238. package/src/sdk/{public.ts → external.ts} +23 -13
  239. package/src/sdk/internal.ts +266 -0
  240. package/src/sdk/sdk.ts +21 -9
  241. package/funcs/dataGetStaff.d.ts.map +0 -1
  242. package/funcs/dataGetStaff.js.map +0 -1
  243. package/funcs/publicGetApps.d.ts.map +0 -1
  244. package/funcs/publicGetApps.js.map +0 -1
  245. package/funcs/publicGetInfo.d.ts.map +0 -1
  246. package/funcs/publicGetInfo.js.map +0 -1
  247. package/funcs/publicGetLeaderboardHistory.d.ts.map +0 -1
  248. package/funcs/publicGetLeaderboardHistory.js.map +0 -1
  249. package/sdk/public.d.ts.map +0 -1
  250. package/sdk/public.js +0 -36
  251. package/sdk/public.js.map +0 -1
@@ -0,0 +1,154 @@
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 accountUpdateApp(
28
+ client: SteamSetsCore,
29
+ request: components.V1AccountDeveloperAppUpdateRequestBody,
30
+ options?: RequestOptions,
31
+ ): Promise<
32
+ Result<
33
+ operations.AccountV1SettingsDeveloperAppUpdateResponse,
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) =>
48
+ components.V1AccountDeveloperAppUpdateRequestBody$outboundSchema.parse(
49
+ value,
50
+ ),
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("/account.v1.AccountService/DeveloperAppUpdate")();
60
+
61
+ const headers = new Headers(compactMap({
62
+ "Content-Type": "application/json",
63
+ Accept: "application/json",
64
+ }));
65
+
66
+ const secConfig = await extractSecurity(client._options.token);
67
+ const securityInput = secConfig == null ? {} : { token: secConfig };
68
+ const requestSecurity = resolveGlobalSecurity(securityInput);
69
+
70
+ const context = {
71
+ operationID: "account.v1.settings.developer-app-update",
72
+ oAuth2Scopes: [],
73
+
74
+ resolvedSecurity: requestSecurity,
75
+
76
+ securitySource: client._options.token,
77
+ retryConfig: options?.retries
78
+ || client._options.retryConfig
79
+ || {
80
+ strategy: "backoff",
81
+ backoff: {
82
+ initialInterval: 500,
83
+ maxInterval: 5000,
84
+ exponent: 1.5,
85
+ maxElapsedTime: 60000,
86
+ },
87
+ retryConnectionErrors: true,
88
+ }
89
+ || { strategy: "none" },
90
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
91
+ };
92
+
93
+ const requestRes = client._createRequest(context, {
94
+ security: requestSecurity,
95
+ method: "POST",
96
+ baseURL: options?.serverURL,
97
+ path: path,
98
+ headers: headers,
99
+ body: body,
100
+ uaHeader: "x-speakeasy-user-agent",
101
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
102
+ }, options);
103
+ if (!requestRes.ok) {
104
+ return requestRes;
105
+ }
106
+ const req = requestRes.value;
107
+
108
+ const doResult = await client._do(req, {
109
+ context,
110
+ errorCodes: ["404", "422", "429", "4XX", "500", "5XX"],
111
+ retryConfig: context.retryConfig,
112
+ retryCodes: context.retryCodes,
113
+ });
114
+ if (!doResult.ok) {
115
+ return doResult;
116
+ }
117
+ const response = doResult.value;
118
+
119
+ const responseFields = {
120
+ HttpMeta: { Response: response, Request: req },
121
+ };
122
+
123
+ const [result] = await M.match<
124
+ operations.AccountV1SettingsDeveloperAppUpdateResponse,
125
+ | errors.ErrorModel
126
+ | errors.ErrorModel
127
+ | SDKError
128
+ | SDKValidationError
129
+ | UnexpectedClientError
130
+ | InvalidRequestError
131
+ | RequestAbortedError
132
+ | RequestTimeoutError
133
+ | ConnectionError
134
+ >(
135
+ M.json(
136
+ 200,
137
+ operations.AccountV1SettingsDeveloperAppUpdateResponse$inboundSchema,
138
+ { key: "V1AccountDeveloperAppUpdateResponseBody" },
139
+ ),
140
+ M.jsonErr([404, 422, 429], errors.ErrorModel$inboundSchema, {
141
+ ctype: "application/problem+json",
142
+ }),
143
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
144
+ ctype: "application/problem+json",
145
+ }),
146
+ M.fail("4XX"),
147
+ M.fail("5XX"),
148
+ )(response, req, { extraFields: responseFields });
149
+ if (!result.ok) {
150
+ return result;
151
+ }
152
+
153
+ return result;
154
+ }
@@ -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 * as M from "../lib/matchers.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { RequestOptions } from "../lib/sdks.js";
9
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
+ import { pathToFunc } from "../lib/url.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import * as errors from "../models/errors/index.js";
19
+ import { SDKError } from "../models/errors/sdkerror.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import * as operations from "../models/operations/index.js";
22
+ import { Result } from "../types/fp.js";
23
+
24
+ export async function eventAdminV1GetEvents(
25
+ client: SteamSetsCore,
26
+ options?: RequestOptions,
27
+ ): Promise<
28
+ Result<
29
+ operations.AdminV1GetEventsResponse,
30
+ | errors.ErrorModel
31
+ | errors.ErrorModel
32
+ | SDKError
33
+ | SDKValidationError
34
+ | UnexpectedClientError
35
+ | InvalidRequestError
36
+ | RequestAbortedError
37
+ | RequestTimeoutError
38
+ | ConnectionError
39
+ >
40
+ > {
41
+ const path = pathToFunc("/admin.v1.AdminService/GetEvents")();
42
+
43
+ const headers = new Headers(compactMap({
44
+ Accept: "application/json",
45
+ }));
46
+
47
+ const secConfig = await extractSecurity(client._options.token);
48
+ const securityInput = secConfig == null ? {} : { token: secConfig };
49
+ const requestSecurity = resolveGlobalSecurity(securityInput);
50
+
51
+ const context = {
52
+ operationID: "admin.v1.get-events",
53
+ oAuth2Scopes: [],
54
+
55
+ resolvedSecurity: requestSecurity,
56
+
57
+ securitySource: client._options.token,
58
+ retryConfig: options?.retries
59
+ || client._options.retryConfig
60
+ || {
61
+ strategy: "backoff",
62
+ backoff: {
63
+ initialInterval: 500,
64
+ maxInterval: 5000,
65
+ exponent: 1.5,
66
+ maxElapsedTime: 60000,
67
+ },
68
+ retryConnectionErrors: true,
69
+ }
70
+ || { strategy: "none" },
71
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
72
+ };
73
+
74
+ const requestRes = client._createRequest(context, {
75
+ security: requestSecurity,
76
+ method: "POST",
77
+ baseURL: options?.serverURL,
78
+ path: path,
79
+ headers: headers,
80
+ uaHeader: "x-speakeasy-user-agent",
81
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
82
+ }, options);
83
+ if (!requestRes.ok) {
84
+ return requestRes;
85
+ }
86
+ const req = requestRes.value;
87
+
88
+ const doResult = await client._do(req, {
89
+ context,
90
+ errorCodes: ["403", "404", "429", "4XX", "500", "5XX"],
91
+ retryConfig: context.retryConfig,
92
+ retryCodes: context.retryCodes,
93
+ });
94
+ if (!doResult.ok) {
95
+ return doResult;
96
+ }
97
+ const response = doResult.value;
98
+
99
+ const responseFields = {
100
+ HttpMeta: { Response: response, Request: req },
101
+ };
102
+
103
+ const [result] = await M.match<
104
+ operations.AdminV1GetEventsResponse,
105
+ | errors.ErrorModel
106
+ | errors.ErrorModel
107
+ | SDKError
108
+ | SDKValidationError
109
+ | UnexpectedClientError
110
+ | InvalidRequestError
111
+ | RequestAbortedError
112
+ | RequestTimeoutError
113
+ | ConnectionError
114
+ >(
115
+ M.json(200, operations.AdminV1GetEventsResponse$inboundSchema, {
116
+ key: "V1AdminGetEventsResponseBody",
117
+ }),
118
+ M.jsonErr([403, 404, 429], errors.ErrorModel$inboundSchema, {
119
+ ctype: "application/problem+json",
120
+ }),
121
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
122
+ ctype: "application/problem+json",
123
+ }),
124
+ M.fail("4XX"),
125
+ M.fail("5XX"),
126
+ )(response, req, { extraFields: responseFields });
127
+ if (!result.ok) {
128
+ return result;
129
+ }
130
+
131
+ return result;
132
+ }
@@ -0,0 +1,150 @@
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 eventAdminV1UpdateEvent(
28
+ client: SteamSetsCore,
29
+ request: components.V1AdminUpdateEventRequestBody,
30
+ options?: RequestOptions,
31
+ ): Promise<
32
+ Result<
33
+ operations.AdminV1UpdateEventResponse,
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) =>
48
+ components.V1AdminUpdateEventRequestBody$outboundSchema.parse(value),
49
+ "Input validation failed",
50
+ );
51
+ if (!parsed.ok) {
52
+ return parsed;
53
+ }
54
+ const payload = parsed.value;
55
+ const body = encodeJSON("body", payload, { explode: true });
56
+
57
+ const path = pathToFunc("/admin.v1.AdminService/UpdateEvent")();
58
+
59
+ const headers = new Headers(compactMap({
60
+ "Content-Type": "application/json",
61
+ Accept: "application/json",
62
+ }));
63
+
64
+ const secConfig = await extractSecurity(client._options.token);
65
+ const securityInput = secConfig == null ? {} : { token: secConfig };
66
+ const requestSecurity = resolveGlobalSecurity(securityInput);
67
+
68
+ const context = {
69
+ operationID: "admin.v1.update-event",
70
+ oAuth2Scopes: [],
71
+
72
+ resolvedSecurity: requestSecurity,
73
+
74
+ securitySource: client._options.token,
75
+ retryConfig: options?.retries
76
+ || client._options.retryConfig
77
+ || {
78
+ strategy: "backoff",
79
+ backoff: {
80
+ initialInterval: 500,
81
+ maxInterval: 5000,
82
+ exponent: 1.5,
83
+ maxElapsedTime: 60000,
84
+ },
85
+ retryConnectionErrors: true,
86
+ }
87
+ || { strategy: "none" },
88
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
89
+ };
90
+
91
+ const requestRes = client._createRequest(context, {
92
+ security: requestSecurity,
93
+ method: "POST",
94
+ baseURL: options?.serverURL,
95
+ path: path,
96
+ headers: headers,
97
+ body: body,
98
+ uaHeader: "x-speakeasy-user-agent",
99
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
100
+ }, options);
101
+ if (!requestRes.ok) {
102
+ return requestRes;
103
+ }
104
+ const req = requestRes.value;
105
+
106
+ const doResult = await client._do(req, {
107
+ context,
108
+ errorCodes: ["403", "404", "422", "429", "4XX", "500", "5XX"],
109
+ retryConfig: context.retryConfig,
110
+ retryCodes: context.retryCodes,
111
+ });
112
+ if (!doResult.ok) {
113
+ return doResult;
114
+ }
115
+ const response = doResult.value;
116
+
117
+ const responseFields = {
118
+ HttpMeta: { Response: response, Request: req },
119
+ };
120
+
121
+ const [result] = await M.match<
122
+ operations.AdminV1UpdateEventResponse,
123
+ | errors.ErrorModel
124
+ | errors.ErrorModel
125
+ | SDKError
126
+ | SDKValidationError
127
+ | UnexpectedClientError
128
+ | InvalidRequestError
129
+ | RequestAbortedError
130
+ | RequestTimeoutError
131
+ | ConnectionError
132
+ >(
133
+ M.json(200, operations.AdminV1UpdateEventResponse$inboundSchema, {
134
+ key: "V1AdminUpdateEventResponseBody",
135
+ }),
136
+ M.jsonErr([403, 404, 422, 429], errors.ErrorModel$inboundSchema, {
137
+ ctype: "application/problem+json",
138
+ }),
139
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
140
+ ctype: "application/problem+json",
141
+ }),
142
+ M.fail("4XX"),
143
+ M.fail("5XX"),
144
+ )(response, req, { extraFields: responseFields });
145
+ if (!result.ok) {
146
+ return result;
147
+ }
148
+
149
+ return result;
150
+ }
@@ -24,7 +24,7 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
24
  import * as operations from "../models/operations/index.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
- export async function publicGetApps(
27
+ export async function externalGetApps(
28
28
  client: SteamSetsCore,
29
29
  request: components.V1AccountsAppsRequestBody,
30
30
  options?: RequestOptions,
@@ -24,7 +24,7 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
24
  import * as operations from "../models/operations/index.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
- export async function publicGetBadges(
27
+ export async function externalGetBadges(
28
28
  client: SteamSetsCore,
29
29
  request: components.V1BadgesRequestBody,
30
30
  options?: RequestOptions,
@@ -24,7 +24,7 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
24
  import * as operations from "../models/operations/index.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
- export async function publicGetDataPoints(
27
+ export async function externalGetDataPoints(
28
28
  client: SteamSetsCore,
29
29
  request: components.AccountSearch,
30
30
  options?: RequestOptions,
@@ -24,7 +24,7 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
24
  import * as operations from "../models/operations/index.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
- export async function publicGetFriends(
27
+ export async function externalGetFriends(
28
28
  client: SteamSetsCore,
29
29
  request: components.AccountSearch,
30
30
  options?: RequestOptions,
@@ -24,7 +24,7 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
24
  import * as operations from "../models/operations/index.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
- export async function publicGetInfo(
27
+ export async function externalGetInfo(
28
28
  client: SteamSetsCore,
29
29
  request: components.AccountSearch,
30
30
  options?: RequestOptions,
@@ -24,7 +24,7 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
24
  import * as operations from "../models/operations/index.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
- export async function publicGetLeaderboardHistory(
27
+ export async function externalGetLeaderboardHistory(
28
28
  client: SteamSetsCore,
29
29
  request: components.AccountSearch,
30
30
  options?: RequestOptions,
@@ -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 * as M from "../lib/matchers.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { RequestOptions } from "../lib/sdks.js";
9
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
+ import { pathToFunc } from "../lib/url.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import * as errors from "../models/errors/index.js";
19
+ import { SDKError } from "../models/errors/sdkerror.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import * as operations from "../models/operations/index.js";
22
+ import { Result } from "../types/fp.js";
23
+
24
+ export async function externalStatsV1StatsGet(
25
+ client: SteamSetsCore,
26
+ options?: RequestOptions,
27
+ ): Promise<
28
+ Result<
29
+ operations.StatsV1StatsGetResponse,
30
+ | errors.ErrorModel
31
+ | errors.ErrorModel
32
+ | SDKError
33
+ | SDKValidationError
34
+ | UnexpectedClientError
35
+ | InvalidRequestError
36
+ | RequestAbortedError
37
+ | RequestTimeoutError
38
+ | ConnectionError
39
+ >
40
+ > {
41
+ const path = pathToFunc("/stats.v1.StatsService/GetStats")();
42
+
43
+ const headers = new Headers(compactMap({
44
+ Accept: "application/json",
45
+ }));
46
+
47
+ const secConfig = await extractSecurity(client._options.token);
48
+ const securityInput = secConfig == null ? {} : { token: secConfig };
49
+ const requestSecurity = resolveGlobalSecurity(securityInput);
50
+
51
+ const context = {
52
+ operationID: "stats.v1.stats.get",
53
+ oAuth2Scopes: [],
54
+
55
+ resolvedSecurity: requestSecurity,
56
+
57
+ securitySource: client._options.token,
58
+ retryConfig: options?.retries
59
+ || client._options.retryConfig
60
+ || {
61
+ strategy: "backoff",
62
+ backoff: {
63
+ initialInterval: 500,
64
+ maxInterval: 5000,
65
+ exponent: 1.5,
66
+ maxElapsedTime: 60000,
67
+ },
68
+ retryConnectionErrors: true,
69
+ }
70
+ || { strategy: "none" },
71
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
72
+ };
73
+
74
+ const requestRes = client._createRequest(context, {
75
+ security: requestSecurity,
76
+ method: "POST",
77
+ baseURL: options?.serverURL,
78
+ path: path,
79
+ headers: headers,
80
+ uaHeader: "x-speakeasy-user-agent",
81
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
82
+ }, options);
83
+ if (!requestRes.ok) {
84
+ return requestRes;
85
+ }
86
+ const req = requestRes.value;
87
+
88
+ const doResult = await client._do(req, {
89
+ context,
90
+ errorCodes: ["404", "429", "4XX", "500", "5XX"],
91
+ retryConfig: context.retryConfig,
92
+ retryCodes: context.retryCodes,
93
+ });
94
+ if (!doResult.ok) {
95
+ return doResult;
96
+ }
97
+ const response = doResult.value;
98
+
99
+ const responseFields = {
100
+ HttpMeta: { Response: response, Request: req },
101
+ };
102
+
103
+ const [result] = await M.match<
104
+ operations.StatsV1StatsGetResponse,
105
+ | errors.ErrorModel
106
+ | errors.ErrorModel
107
+ | SDKError
108
+ | SDKValidationError
109
+ | UnexpectedClientError
110
+ | InvalidRequestError
111
+ | RequestAbortedError
112
+ | RequestTimeoutError
113
+ | ConnectionError
114
+ >(
115
+ M.json(200, operations.StatsV1StatsGetResponse$inboundSchema, {
116
+ key: "V1Stats",
117
+ }),
118
+ M.jsonErr([404, 429], errors.ErrorModel$inboundSchema, {
119
+ ctype: "application/problem+json",
120
+ }),
121
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
122
+ ctype: "application/problem+json",
123
+ }),
124
+ M.fail("4XX"),
125
+ M.fail("5XX"),
126
+ )(response, req, { extraFields: responseFields });
127
+ if (!result.ok) {
128
+ return result;
129
+ }
130
+
131
+ return result;
132
+ }