@steamsets/client-ts 0.1.2

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 (228) hide show
  1. package/.devcontainer/README.md +35 -0
  2. package/README.md +389 -0
  3. package/core.d.ts +10 -0
  4. package/core.d.ts.map +1 -0
  5. package/core.js +17 -0
  6. package/core.js.map +1 -0
  7. package/docs/sdks/account/README.md +97 -0
  8. package/docs/sdks/liveness/README.md +51 -0
  9. package/docs/sdks/steamsets/README.md +7 -0
  10. package/funcs/accountAccountV1Apps.d.ts +13 -0
  11. package/funcs/accountAccountV1Apps.d.ts.map +1 -0
  12. package/funcs/accountAccountV1Apps.js +82 -0
  13. package/funcs/accountAccountV1Apps.js.map +1 -0
  14. package/funcs/accountAccountV1Badge.d.ts +13 -0
  15. package/funcs/accountAccountV1Badge.d.ts.map +1 -0
  16. package/funcs/accountAccountV1Badge.js +82 -0
  17. package/funcs/accountAccountV1Badge.js.map +1 -0
  18. package/funcs/livenessLiveness.d.ts +16 -0
  19. package/funcs/livenessLiveness.d.ts.map +1 -0
  20. package/funcs/livenessLiveness.js +83 -0
  21. package/funcs/livenessLiveness.js.map +1 -0
  22. package/hooks/hooks.d.ts +24 -0
  23. package/hooks/hooks.d.ts.map +1 -0
  24. package/hooks/hooks.js +66 -0
  25. package/hooks/hooks.js.map +1 -0
  26. package/hooks/index.d.ts +3 -0
  27. package/hooks/index.d.ts.map +1 -0
  28. package/hooks/index.js +22 -0
  29. package/hooks/index.js.map +1 -0
  30. package/hooks/types.d.ts +72 -0
  31. package/hooks/types.d.ts.map +1 -0
  32. package/hooks/types.js +6 -0
  33. package/hooks/types.js.map +1 -0
  34. package/index.d.ts +3 -0
  35. package/index.d.ts.map +1 -0
  36. package/index.js +22 -0
  37. package/index.js.map +1 -0
  38. package/lib/base64.d.ts +10 -0
  39. package/lib/base64.d.ts.map +1 -0
  40. package/lib/base64.js +61 -0
  41. package/lib/base64.js.map +1 -0
  42. package/lib/config.d.ts +36 -0
  43. package/lib/config.d.ts.map +1 -0
  44. package/lib/config.js +34 -0
  45. package/lib/config.js.map +1 -0
  46. package/lib/dlv.d.ts +14 -0
  47. package/lib/dlv.d.ts.map +1 -0
  48. package/lib/dlv.js +49 -0
  49. package/lib/dlv.js.map +1 -0
  50. package/lib/encodings.d.ts +51 -0
  51. package/lib/encodings.d.ts.map +1 -0
  52. package/lib/encodings.js +343 -0
  53. package/lib/encodings.js.map +1 -0
  54. package/lib/http.d.ts +66 -0
  55. package/lib/http.d.ts.map +1 -0
  56. package/lib/http.js +217 -0
  57. package/lib/http.js.map +1 -0
  58. package/lib/is-plain-object.d.ts +2 -0
  59. package/lib/is-plain-object.d.ts.map +1 -0
  60. package/lib/is-plain-object.js +41 -0
  61. package/lib/is-plain-object.js.map +1 -0
  62. package/lib/matchers.d.ts +64 -0
  63. package/lib/matchers.d.ts.map +1 -0
  64. package/lib/matchers.js +209 -0
  65. package/lib/matchers.js.map +1 -0
  66. package/lib/primitives.d.ts +16 -0
  67. package/lib/primitives.d.ts.map +1 -0
  68. package/lib/primitives.js +29 -0
  69. package/lib/primitives.js.map +1 -0
  70. package/lib/retries.d.ts +18 -0
  71. package/lib/retries.d.ts.map +1 -0
  72. package/lib/retries.js +130 -0
  73. package/lib/retries.js.map +1 -0
  74. package/lib/schemas.d.ts +19 -0
  75. package/lib/schemas.d.ts.map +1 -0
  76. package/lib/schemas.js +59 -0
  77. package/lib/schemas.js.map +1 -0
  78. package/lib/sdks.d.ts +57 -0
  79. package/lib/sdks.d.ts.map +1 -0
  80. package/lib/sdks.js +159 -0
  81. package/lib/sdks.js.map +1 -0
  82. package/lib/security.d.ts +60 -0
  83. package/lib/security.d.ts.map +1 -0
  84. package/lib/security.js +130 -0
  85. package/lib/security.js.map +1 -0
  86. package/lib/url.d.ts +5 -0
  87. package/lib/url.d.ts.map +1 -0
  88. package/lib/url.js +25 -0
  89. package/lib/url.js.map +1 -0
  90. package/models/components/errordetail.d.ts +38 -0
  91. package/models/components/errordetail.d.ts.map +1 -0
  92. package/models/components/errordetail.js +54 -0
  93. package/models/components/errordetail.js.map +1 -0
  94. package/models/components/index.d.ts +8 -0
  95. package/models/components/index.d.ts.map +1 -0
  96. package/models/components/index.js +27 -0
  97. package/models/components/index.js.map +1 -0
  98. package/models/components/security.d.ts +27 -0
  99. package/models/components/security.d.ts.map +1 -0
  100. package/models/components/security.js +52 -0
  101. package/models/components/security.js.map +1 -0
  102. package/models/components/v1accountsappsresponsebody.d.ts +31 -0
  103. package/models/components/v1accountsappsresponsebody.d.ts.map +1 -0
  104. package/models/components/v1accountsappsresponsebody.js +66 -0
  105. package/models/components/v1accountsappsresponsebody.js.map +1 -0
  106. package/models/components/v1app.d.ts +53 -0
  107. package/models/components/v1app.d.ts.map +1 -0
  108. package/models/components/v1app.js +60 -0
  109. package/models/components/v1app.js.map +1 -0
  110. package/models/components/v1badge.d.ts +51 -0
  111. package/models/components/v1badge.d.ts.map +1 -0
  112. package/models/components/v1badge.js +79 -0
  113. package/models/components/v1badge.js.map +1 -0
  114. package/models/components/v1badgesappsresponsebody.d.ts +31 -0
  115. package/models/components/v1badgesappsresponsebody.d.ts.map +1 -0
  116. package/models/components/v1badgesappsresponsebody.js +66 -0
  117. package/models/components/v1badgesappsresponsebody.js.map +1 -0
  118. package/models/components/v1livenessresponsebody.d.ts +33 -0
  119. package/models/components/v1livenessresponsebody.d.ts.map +1 -0
  120. package/models/components/v1livenessresponsebody.js +65 -0
  121. package/models/components/v1livenessresponsebody.js.map +1 -0
  122. package/models/errors/errormodel.d.ts +98 -0
  123. package/models/errors/errormodel.d.ts.map +1 -0
  124. package/models/errors/errormodel.js +113 -0
  125. package/models/errors/errormodel.js.map +1 -0
  126. package/models/errors/httpclienterrors.d.ts +44 -0
  127. package/models/errors/httpclienterrors.d.ts.map +1 -0
  128. package/models/errors/httpclienterrors.js +78 -0
  129. package/models/errors/httpclienterrors.js.map +1 -0
  130. package/models/errors/index.d.ts +4 -0
  131. package/models/errors/index.d.ts.map +1 -0
  132. package/models/errors/index.js +23 -0
  133. package/models/errors/index.js.map +1 -0
  134. package/models/errors/sdkerror.d.ts +8 -0
  135. package/models/errors/sdkerror.d.ts.map +1 -0
  136. package/models/errors/sdkerror.js +21 -0
  137. package/models/errors/sdkerror.js.map +1 -0
  138. package/models/errors/sdkvalidationerror.d.ts +17 -0
  139. package/models/errors/sdkvalidationerror.d.ts.map +1 -0
  140. package/models/errors/sdkvalidationerror.js +107 -0
  141. package/models/errors/sdkvalidationerror.js.map +1 -0
  142. package/ns/LICENSE +201 -0
  143. package/ns/README.md +1 -0
  144. package/package.json +31 -0
  145. package/sdk/account.d.ts +13 -0
  146. package/sdk/account.d.ts.map +1 -0
  147. package/sdk/account.js +26 -0
  148. package/sdk/account.js.map +1 -0
  149. package/sdk/index.d.ts +2 -0
  150. package/sdk/index.d.ts.map +1 -0
  151. package/sdk/index.js +21 -0
  152. package/sdk/index.js.map +1 -0
  153. package/sdk/liveness.d.ts +12 -0
  154. package/sdk/liveness.d.ts.map +1 -0
  155. package/sdk/liveness.js +22 -0
  156. package/sdk/liveness.js.map +1 -0
  157. package/sdk/sdk.d.ts +10 -0
  158. package/sdk/sdk.d.ts.map +1 -0
  159. package/sdk/sdk.js +21 -0
  160. package/sdk/sdk.js.map +1 -0
  161. package/src/core.ts +13 -0
  162. package/src/funcs/accountAccountV1Apps.ts +109 -0
  163. package/src/funcs/accountAccountV1Badge.ts +109 -0
  164. package/src/funcs/livenessLiveness.ts +110 -0
  165. package/src/hooks/hooks.ts +99 -0
  166. package/src/hooks/index.ts +6 -0
  167. package/src/hooks/types.ts +89 -0
  168. package/src/index.ts +6 -0
  169. package/src/lib/base64.ts +37 -0
  170. package/src/lib/config.ts +60 -0
  171. package/src/lib/dlv.ts +53 -0
  172. package/src/lib/encodings.ts +449 -0
  173. package/src/lib/http.ts +323 -0
  174. package/src/lib/is-plain-object.ts +43 -0
  175. package/src/lib/matchers.ts +308 -0
  176. package/src/lib/primitives.ts +40 -0
  177. package/src/lib/retries.ts +187 -0
  178. package/src/lib/schemas.ts +74 -0
  179. package/src/lib/sdks.ts +261 -0
  180. package/src/lib/security.ts +198 -0
  181. package/src/lib/url.ts +33 -0
  182. package/src/models/components/errordetail.ts +58 -0
  183. package/src/models/components/index.ts +11 -0
  184. package/src/models/components/security.ts +42 -0
  185. package/src/models/components/v1accountsappsresponsebody.ts +66 -0
  186. package/src/models/components/v1app.ts +75 -0
  187. package/src/models/components/v1badge.ts +92 -0
  188. package/src/models/components/v1badgesappsresponsebody.ts +71 -0
  189. package/src/models/components/v1livenessresponsebody.ts +68 -0
  190. package/src/models/errors/errormodel.ts +174 -0
  191. package/src/models/errors/httpclienterrors.ts +62 -0
  192. package/src/models/errors/index.ts +7 -0
  193. package/src/models/errors/sdkerror.ts +25 -0
  194. package/src/models/errors/sdkvalidationerror.ts +95 -0
  195. package/src/sdk/account.ts +25 -0
  196. package/src/sdk/index.ts +5 -0
  197. package/src/sdk/liveness.ts +20 -0
  198. package/src/sdk/sdk.ts +19 -0
  199. package/src/types/blobs.ts +31 -0
  200. package/src/types/enums.ts +16 -0
  201. package/src/types/fp.ts +50 -0
  202. package/src/types/index.ts +11 -0
  203. package/src/types/operations.ts +99 -0
  204. package/src/types/rfcdate.ts +54 -0
  205. package/types/blobs.d.ts +4 -0
  206. package/types/blobs.d.ts.map +1 -0
  207. package/types/blobs.js +52 -0
  208. package/types/blobs.js.map +1 -0
  209. package/types/enums.d.ts +12 -0
  210. package/types/enums.d.ts.map +1 -0
  211. package/types/enums.js +10 -0
  212. package/types/enums.js.map +1 -0
  213. package/types/fp.d.ts +31 -0
  214. package/types/fp.d.ts.map +1 -0
  215. package/types/fp.js +37 -0
  216. package/types/fp.js.map +1 -0
  217. package/types/index.d.ts +8 -0
  218. package/types/index.d.ts.map +1 -0
  219. package/types/index.js +16 -0
  220. package/types/index.js.map +1 -0
  221. package/types/operations.d.ts +25 -0
  222. package/types/operations.d.ts.map +1 -0
  223. package/types/operations.js +80 -0
  224. package/types/operations.js.map +1 -0
  225. package/types/rfcdate.d.ts +21 -0
  226. package/types/rfcdate.d.ts.map +1 -0
  227. package/types/rfcdate.js +46 -0
  228. package/types/rfcdate.js.map +1 -0
@@ -0,0 +1,35 @@
1
+
2
+ <div align="center">
3
+ <a href="https://codespaces.new/steamsets/node-steamsets.git/tree/main"><img src="https://github.com/codespaces/badge.svg" /></a>
4
+ </div>
5
+ <br>
6
+
7
+ > **Remember to shutdown a GitHub Codespace when it is not in use!**
8
+
9
+ # Dev Containers Quick Start
10
+
11
+ The default location for usage snippets is the `samples` directory.
12
+
13
+ ## Running a Usage Sample
14
+
15
+ A sample usage example has been provided in a `root.ts` file. As you work with the SDK, it's expected that you will modify these samples to fit your needs. To execute this particular snippet, use the command below.
16
+
17
+ ```
18
+ ts-node root.ts
19
+ ```
20
+
21
+ ## Generating Additional Usage Samples
22
+
23
+ The speakeasy CLI allows you to generate more usage snippets. Here's how:
24
+
25
+ - To generate a sample for a specific operation by providing an operation ID, use:
26
+
27
+ ```
28
+ speakeasy generate usage -s ./openapi.yaml -l typescript -i {INPUT_OPERATION_ID} -o ./samples
29
+ ```
30
+
31
+ - To generate samples for an entire namespace (like a tag or group name), use:
32
+
33
+ ```
34
+ speakeasy generate usage -s ./openapi.yaml -l typescript -n {INPUT_TAG_NAME} -o ./samples
35
+ ```
package/README.md ADDED
@@ -0,0 +1,389 @@
1
+ # openapi
2
+
3
+ <div align="left">
4
+ <a href="https://www.speakeasy.com/?utm_source=<no value>&utm_campaign=go"><img src="https://custom-icon-badges.demolab.com/badge/-Built%20By%20Speakeasy-212015?style=for-the-badge&logoColor=FBE331&logo=speakeasy&labelColor=545454" /></a>
5
+ <a href="https://opensource.org/licenses/MIT">
6
+ <img src="https://img.shields.io/badge/License-MIT-blue.svg" style="width: 100px; height: 28px;" />
7
+ </a>
8
+ </div>
9
+
10
+
11
+ ## 🏗 **Welcome to your new SDK!** 🏗
12
+
13
+ It has been generated successfully based on your OpenAPI spec. However, it is not yet ready for production use. Here are some next steps:
14
+ - [ ] 🛠 Make your SDK feel handcrafted by [customizing it](https://www.speakeasy.com/docs/customize-sdks)
15
+ - [ ] ♻️ Refine your SDK quickly by iterating locally with the [Speakeasy CLI](https://github.com/speakeasy-api/speakeasy)
16
+ - [ ] 🎁 Publish your SDK to package managers by [configuring automatic publishing](https://www.speakeasy.com/docs/advanced-setup/publish-sdks)
17
+ - [ ] ✨ When ready to productionize, delete this section from the README
18
+
19
+ <!-- Start SDK Installation [installation] -->
20
+ ## SDK Installation
21
+
22
+ ### NPM
23
+
24
+ ```bash
25
+ npm add @steamsets/client-ts
26
+ ```
27
+
28
+ ### PNPM
29
+
30
+ ```bash
31
+ pnpm add @steamsets/client-ts
32
+ ```
33
+
34
+ ### Bun
35
+
36
+ ```bash
37
+ bun add @steamsets/client-ts
38
+ ```
39
+
40
+ ### Yarn
41
+
42
+ ```bash
43
+ yarn add @steamsets/client-ts zod
44
+
45
+ # Note that Yarn does not install peer dependencies automatically. You will need
46
+ # to install zod as shown above.
47
+ ```
48
+ <!-- End SDK Installation [installation] -->
49
+
50
+ <!-- Start SDK Example Usage [usage] -->
51
+ ## SDK Example Usage
52
+
53
+ ### Example
54
+
55
+ ```typescript
56
+ import { SteamSets } from "@steamsets/client-ts";
57
+
58
+ const steamSets = new SteamSets({
59
+ security: {
60
+ apiKey: "<YOUR_API_KEY_HERE>",
61
+ session: "<YOUR_BEARER_TOKEN_HERE>",
62
+ },
63
+ });
64
+
65
+ async function run() {
66
+ const result = await steamSets.account.accountV1Apps();
67
+
68
+ // Handle the result
69
+ console.log(result);
70
+ }
71
+
72
+ run();
73
+
74
+ ```
75
+ <!-- End SDK Example Usage [usage] -->
76
+
77
+ <!-- Start Available Resources and Operations [operations] -->
78
+ ## Available Resources and Operations
79
+
80
+ ### [account](docs/sdks/account/README.md)
81
+
82
+ * [accountV1Apps](docs/sdks/account/README.md#accountv1apps) - Get Account Apps
83
+ * [accountV1Badge](docs/sdks/account/README.md#accountv1badge) - Get Account Badges
84
+
85
+ ### [liveness](docs/sdks/liveness/README.md)
86
+
87
+ * [liveness](docs/sdks/liveness/README.md#liveness) - Liveness check
88
+ <!-- End Available Resources and Operations [operations] -->
89
+
90
+ <!-- Start Retries [retries] -->
91
+ ## Retries
92
+
93
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
94
+
95
+ To change the default retry strategy for a single API call, simply provide a retryConfig object to the call:
96
+ ```typescript
97
+ import { SteamSets } from "@steamsets/client-ts";
98
+
99
+ const steamSets = new SteamSets({
100
+ security: {
101
+ apiKey: "<YOUR_API_KEY_HERE>",
102
+ session: "<YOUR_BEARER_TOKEN_HERE>",
103
+ },
104
+ });
105
+
106
+ async function run() {
107
+ const result = await steamSets.account.accountV1Apps({
108
+ retries: {
109
+ strategy: "backoff",
110
+ backoff: {
111
+ initialInterval: 1,
112
+ maxInterval: 50,
113
+ exponent: 1.1,
114
+ maxElapsedTime: 100,
115
+ },
116
+ retryConnectionErrors: false,
117
+ },
118
+ });
119
+
120
+ // Handle the result
121
+ console.log(result);
122
+ }
123
+
124
+ run();
125
+
126
+ ```
127
+
128
+ If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization:
129
+ ```typescript
130
+ import { SteamSets } from "@steamsets/client-ts";
131
+
132
+ const steamSets = new SteamSets({
133
+ retryConfig: {
134
+ strategy: "backoff",
135
+ backoff: {
136
+ initialInterval: 1,
137
+ maxInterval: 50,
138
+ exponent: 1.1,
139
+ maxElapsedTime: 100,
140
+ },
141
+ retryConnectionErrors: false,
142
+ },
143
+ security: {
144
+ apiKey: "<YOUR_API_KEY_HERE>",
145
+ session: "<YOUR_BEARER_TOKEN_HERE>",
146
+ },
147
+ });
148
+
149
+ async function run() {
150
+ const result = await steamSets.account.accountV1Apps();
151
+
152
+ // Handle the result
153
+ console.log(result);
154
+ }
155
+
156
+ run();
157
+
158
+ ```
159
+ <!-- End Retries [retries] -->
160
+
161
+ <!-- Start Error Handling [errors] -->
162
+ ## Error Handling
163
+
164
+ All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type.
165
+
166
+ | Error Object | Status Code | Content Type |
167
+ | ------------------------ | ------------------------ | ------------------------ |
168
+ | errors.ErrorModel | 400,500 | application/problem+json |
169
+ | errors.SDKError | 4xx-5xx | */* |
170
+
171
+ Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging.
172
+
173
+
174
+ ```typescript
175
+ import { SteamSets } from "@steamsets/client-ts";
176
+ import { SDKValidationError } from "@steamsets/client-ts/models/errors";
177
+
178
+ const steamSets = new SteamSets({
179
+ security: {
180
+ apiKey: "<YOUR_API_KEY_HERE>",
181
+ session: "<YOUR_BEARER_TOKEN_HERE>",
182
+ },
183
+ });
184
+
185
+ async function run() {
186
+ let result;
187
+ try {
188
+ result = await steamSets.account.accountV1Apps();
189
+ } catch (err) {
190
+ switch (true) {
191
+ case err instanceof SDKValidationError: {
192
+ // Validation errors can be pretty-printed
193
+ console.error(err.pretty());
194
+ // Raw value may also be inspected
195
+ console.error(err.rawValue);
196
+ return;
197
+ }
198
+ case err instanceof errors.ErrorModel: {
199
+ console.error(err); // handle exception
200
+ return;
201
+ }
202
+ default: {
203
+ throw err;
204
+ }
205
+ }
206
+ }
207
+
208
+ // Handle the result
209
+ console.log(result);
210
+ }
211
+
212
+ run();
213
+
214
+ ```
215
+ <!-- End Error Handling [errors] -->
216
+
217
+ <!-- Start Server Selection [server] -->
218
+ ## Server Selection
219
+
220
+ ### Select Server by Index
221
+
222
+ You can override the default server globally by passing a server index to the `serverIdx` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers:
223
+
224
+ | # | Server | Variables |
225
+ | - | ------ | --------- |
226
+ | 0 | `https://api.steamsets.com` | None |
227
+
228
+ ```typescript
229
+ import { SteamSets } from "@steamsets/client-ts";
230
+
231
+ const steamSets = new SteamSets({
232
+ serverIdx: 0,
233
+ security: {
234
+ apiKey: "<YOUR_API_KEY_HERE>",
235
+ session: "<YOUR_BEARER_TOKEN_HERE>",
236
+ },
237
+ });
238
+
239
+ async function run() {
240
+ const result = await steamSets.account.accountV1Apps();
241
+
242
+ // Handle the result
243
+ console.log(result);
244
+ }
245
+
246
+ run();
247
+
248
+ ```
249
+
250
+
251
+ ### Override Server URL Per-Client
252
+
253
+ The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example:
254
+
255
+ ```typescript
256
+ import { SteamSets } from "@steamsets/client-ts";
257
+
258
+ const steamSets = new SteamSets({
259
+ serverURL: "https://api.steamsets.com",
260
+ security: {
261
+ apiKey: "<YOUR_API_KEY_HERE>",
262
+ session: "<YOUR_BEARER_TOKEN_HERE>",
263
+ },
264
+ });
265
+
266
+ async function run() {
267
+ const result = await steamSets.account.accountV1Apps();
268
+
269
+ // Handle the result
270
+ console.log(result);
271
+ }
272
+
273
+ run();
274
+
275
+ ```
276
+ <!-- End Server Selection [server] -->
277
+
278
+ <!-- Start Custom HTTP Client [http-client] -->
279
+ ## Custom HTTP Client
280
+
281
+ The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native
282
+ [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This
283
+ client is a thin wrapper around `fetch` and provides the ability to attach hooks
284
+ around the request lifecycle that can be used to modify the request or handle
285
+ errors and response.
286
+
287
+ The `HTTPClient` constructor takes an optional `fetcher` argument that can be
288
+ used to integrate a third-party HTTP client or when writing tests to mock out
289
+ the HTTP client and feed in fixtures.
290
+
291
+ The following example shows how to use the `"beforeRequest"` hook to to add a
292
+ custom header and a timeout to requests and how to use the `"requestError"` hook
293
+ to log errors:
294
+
295
+ ```typescript
296
+ import { SteamSets } from "@steamsets/client-ts";
297
+ import { HTTPClient } from "@steamsets/client-ts/lib/http";
298
+
299
+ const httpClient = new HTTPClient({
300
+ // fetcher takes a function that has the same signature as native `fetch`.
301
+ fetcher: (request) => {
302
+ return fetch(request);
303
+ }
304
+ });
305
+
306
+ httpClient.addHook("beforeRequest", (request) => {
307
+ const nextRequest = new Request(request, {
308
+ signal: request.signal || AbortSignal.timeout(5000)
309
+ });
310
+
311
+ nextRequest.headers.set("x-custom-header", "custom value");
312
+
313
+ return nextRequest;
314
+ });
315
+
316
+ httpClient.addHook("requestError", (error, request) => {
317
+ console.group("Request Error");
318
+ console.log("Reason:", `${error}`);
319
+ console.log("Endpoint:", `${request.method} ${request.url}`);
320
+ console.groupEnd();
321
+ });
322
+
323
+ const sdk = new SteamSets({ httpClient });
324
+ ```
325
+ <!-- End Custom HTTP Client [http-client] -->
326
+
327
+ <!-- Start Authentication [security] -->
328
+ ## Authentication
329
+
330
+ ### Per-Client Security Schemes
331
+
332
+ This SDK supports the following security schemes globally:
333
+
334
+ | Name | Type | Scheme |
335
+ | ----------- | ----------- | ----------- |
336
+ | `apiKey` | apiKey | API key |
337
+ | `session` | http | HTTP Bearer |
338
+
339
+ You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
340
+ ```typescript
341
+ import { SteamSets } from "@steamsets/client-ts";
342
+
343
+ const steamSets = new SteamSets({
344
+ security: {
345
+ apiKey: "<YOUR_API_KEY_HERE>",
346
+ session: "<YOUR_BEARER_TOKEN_HERE>",
347
+ },
348
+ });
349
+
350
+ async function run() {
351
+ const result = await steamSets.account.accountV1Apps();
352
+
353
+ // Handle the result
354
+ console.log(result);
355
+ }
356
+
357
+ run();
358
+
359
+ ```
360
+ <!-- End Authentication [security] -->
361
+
362
+ <!-- Start Special Types [types] -->
363
+ ## Special Types
364
+
365
+
366
+ <!-- End Special Types [types] -->
367
+
368
+ <!-- Start Requirements [requirements] -->
369
+ ## Requirements
370
+
371
+ For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md).
372
+ <!-- End Requirements [requirements] -->
373
+
374
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
375
+
376
+ # Development
377
+
378
+ ## Maturity
379
+
380
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
381
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
382
+ looking for the latest version.
383
+
384
+ ## Contributions
385
+
386
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
387
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
388
+
389
+ ### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=<no value>&utm_campaign=go)
package/core.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { ClientSDK } from "./lib/sdks.js";
2
+ /**
3
+ * A minimal client to use when calling standalone SDK functions. Typically, an
4
+ * instance of this class would be instantiated once at the start of an
5
+ * application and passed around through some dependency injection mechanism to
6
+ * parts of an application that need to make SDK calls.
7
+ */
8
+ export declare class SteamSetsCore extends ClientSDK {
9
+ }
10
+ //# sourceMappingURL=core.d.ts.map
package/core.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,SAAS;CAAG"}
package/core.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /*
3
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SteamSetsCore = void 0;
7
+ const sdks_js_1 = require("./lib/sdks.js");
8
+ /**
9
+ * A minimal client to use when calling standalone SDK functions. Typically, an
10
+ * instance of this class would be instantiated once at the start of an
11
+ * application and passed around through some dependency injection mechanism to
12
+ * parts of an application that need to make SDK calls.
13
+ */
14
+ class SteamSetsCore extends sdks_js_1.ClientSDK {
15
+ }
16
+ exports.SteamSetsCore = SteamSetsCore;
17
+ //# sourceMappingURL=core.js.map
package/core.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["src/core.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,2CAA0C;AAE1C;;;;;GAKG;AACH,MAAa,aAAc,SAAQ,mBAAS;CAAG;AAA/C,sCAA+C"}
@@ -0,0 +1,97 @@
1
+ # Account
2
+ (*account*)
3
+
4
+ ### Available Operations
5
+
6
+ * [accountV1Apps](#accountv1apps) - Get Account Apps
7
+ * [accountV1Badge](#accountv1badge) - Get Account Badges
8
+
9
+ ## accountV1Apps
10
+
11
+ Get Account Apps
12
+
13
+ ### Example Usage
14
+
15
+ ```typescript
16
+ import { SteamSets } from "@steamsets/client-ts";
17
+
18
+ const steamSets = new SteamSets({
19
+ security: {
20
+ apiKey: "<YOUR_API_KEY_HERE>",
21
+ session: "<YOUR_BEARER_TOKEN_HERE>",
22
+ },
23
+ });
24
+
25
+ async function run() {
26
+ const result = await steamSets.account.accountV1Apps();
27
+
28
+ // Handle the result
29
+ console.log(result)
30
+ }
31
+
32
+ run();
33
+ ```
34
+
35
+ ### Parameters
36
+
37
+ | Parameter | Type | Required | Description |
38
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
39
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
40
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
41
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
42
+
43
+
44
+ ### Response
45
+
46
+ **Promise\<[components.V1AccountsAppsResponseBody](../../models/components/v1accountsappsresponsebody.md)\>**
47
+ ### Errors
48
+
49
+ | Error Object | Status Code | Content Type |
50
+ | ------------------------ | ------------------------ | ------------------------ |
51
+ | errors.ErrorModel | 400,500 | application/problem+json |
52
+ | errors.SDKError | 4xx-5xx | */* |
53
+
54
+ ## accountV1Badge
55
+
56
+ Get Account Badges
57
+
58
+ ### Example Usage
59
+
60
+ ```typescript
61
+ import { SteamSets } from "@steamsets/client-ts";
62
+
63
+ const steamSets = new SteamSets({
64
+ security: {
65
+ apiKey: "<YOUR_API_KEY_HERE>",
66
+ session: "<YOUR_BEARER_TOKEN_HERE>",
67
+ },
68
+ });
69
+
70
+ async function run() {
71
+ const result = await steamSets.account.accountV1Badge();
72
+
73
+ // Handle the result
74
+ console.log(result)
75
+ }
76
+
77
+ run();
78
+ ```
79
+
80
+ ### Parameters
81
+
82
+ | Parameter | Type | Required | Description |
83
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
84
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
85
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
86
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
87
+
88
+
89
+ ### Response
90
+
91
+ **Promise\<[components.V1BadgesAppsResponseBody](../../models/components/v1badgesappsresponsebody.md)\>**
92
+ ### Errors
93
+
94
+ | Error Object | Status Code | Content Type |
95
+ | ------------------------ | ------------------------ | ------------------------ |
96
+ | errors.ErrorModel | 400,500 | application/problem+json |
97
+ | errors.SDKError | 4xx-5xx | */* |
@@ -0,0 +1,51 @@
1
+ # Liveness
2
+ (*liveness*)
3
+
4
+ ### Available Operations
5
+
6
+ * [liveness](#liveness) - Liveness check
7
+
8
+ ## liveness
9
+
10
+ This endpoint checks if the service is alive.
11
+
12
+ ### Example Usage
13
+
14
+ ```typescript
15
+ import { SteamSets } from "@steamsets/client-ts";
16
+
17
+ const steamSets = new SteamSets({
18
+ security: {
19
+ apiKey: "<YOUR_API_KEY_HERE>",
20
+ session: "<YOUR_BEARER_TOKEN_HERE>",
21
+ },
22
+ });
23
+
24
+ async function run() {
25
+ const result = await steamSets.liveness.liveness();
26
+
27
+ // Handle the result
28
+ console.log(result)
29
+ }
30
+
31
+ run();
32
+ ```
33
+
34
+ ### Parameters
35
+
36
+ | Parameter | Type | Required | Description |
37
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
38
+ | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
39
+ | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
40
+ | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
41
+
42
+
43
+ ### Response
44
+
45
+ **Promise\<[components.V1LivenessResponseBody](../../models/components/v1livenessresponsebody.md)\>**
46
+ ### Errors
47
+
48
+ | Error Object | Status Code | Content Type |
49
+ | ------------------------ | ------------------------ | ------------------------ |
50
+ | errors.ErrorModel | 500 | application/problem+json |
51
+ | errors.SDKError | 4xx-5xx | */* |
@@ -0,0 +1,7 @@
1
+ # SteamSets SDK
2
+
3
+
4
+ ## Overview
5
+
6
+ ### Available Operations
7
+
@@ -0,0 +1,13 @@
1
+ import { SteamSetsCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import * as components from "../models/components/index.js";
4
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
+ import * as errors from "../models/errors/index.js";
6
+ import { SDKError } from "../models/errors/sdkerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import { Result } from "../types/fp.js";
9
+ /**
10
+ * Get Account Apps
11
+ */
12
+ export declare function accountAccountV1Apps(client$: SteamSetsCore, options?: RequestOptions): Promise<Result<components.V1AccountsAppsResponseBody, errors.ErrorModel | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
13
+ //# sourceMappingURL=accountAccountV1Apps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accountAccountV1Apps.d.ts","sourceRoot":"","sources":["../src/funcs/accountAccountV1Apps.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;GAEG;AACH,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,cAAc,GACzB,OAAO,CACN,MAAM,CACF,UAAU,CAAC,0BAA0B,EACnC,MAAM,CAAC,UAAU,GACjB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CACpB,CACJ,CAoEA"}