@steamsets/client-ts 0.14.1 → 0.14.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.
package/README.md CHANGED
@@ -268,25 +268,15 @@ run();
268
268
  <!-- Start Error Handling [errors] -->
269
269
  ## Error Handling
270
270
 
271
- All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`.
272
-
273
- If a HTTP request fails, an operation my also throw an error from the `models/errors/httpclienterrors.ts` module:
274
-
275
- | HTTP Client Error | Description |
276
- | ---------------------------------------------------- | ---------------------------------------------------- |
277
- | RequestAbortedError | HTTP request was aborted by the client |
278
- | RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
279
- | ConnectionError | HTTP client was unable to make a request to a server |
280
- | InvalidRequestError | Any input used to create a request is invalid |
281
- | UnexpectedClientError | Unrecognised or unexpected error |
282
-
283
- In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `accountV1BookmarkBadge` method may throw the following errors:
271
+ Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `accountV1BookmarkBadge` method may throw the following errors:
284
272
 
285
273
  | Error Type | Status Code | Content Type |
286
274
  | ----------------- | ------------------ | ------------------------ |
287
275
  | errors.ErrorModel | 403, 404, 422, 500 | application/problem+json |
288
276
  | errors.SDKError | 4XX, 5XX | \*/\* |
289
277
 
278
+ If the method throws an error and it is not captured by the known errors, it will default to throwing a `SDKError`.
279
+
290
280
  ```typescript
291
281
  import { SteamSets } from "@steamsets/client-ts";
292
282
  import {
@@ -310,8 +300,9 @@ async function run() {
310
300
  console.log(result);
311
301
  } catch (err) {
312
302
  switch (true) {
303
+ // The server response does not match the expected SDK schema
313
304
  case (err instanceof SDKValidationError): {
314
- // Validation errors can be pretty-printed
305
+ // Pretty-print will provide a human-readable multi-line error message
315
306
  console.error(err.pretty());
316
307
  // Raw value may also be inspected
317
308
  console.error(err.rawValue);
@@ -323,6 +314,7 @@ async function run() {
323
314
  return;
324
315
  }
325
316
  default: {
317
+ // Other errors such as network errors, see HTTPClientErrors for more details
326
318
  throw err;
327
319
  }
328
320
  }
@@ -333,7 +325,17 @@ run();
333
325
 
334
326
  ```
335
327
 
336
- 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.
328
+ 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 multi-line string since validation errors can list many issues and the plain error string may be difficult read when debugging.
329
+
330
+ In some rare cases, the SDK can fail to get a response from the server or even make the request due to unexpected circumstances such as network conditions. These types of errors are captured in the `models/errors/httpclienterrors.ts` module:
331
+
332
+ | HTTP Client Error | Description |
333
+ | ---------------------------------------------------- | ---------------------------------------------------- |
334
+ | RequestAbortedError | HTTP request was aborted by the client |
335
+ | RequestTimeoutError | HTTP request timed out due to an AbortSignal signal |
336
+ | ConnectionError | HTTP client was unable to make a request to a server |
337
+ | InvalidRequestError | Any input used to create a request is invalid |
338
+ | UnexpectedClientError | Unrecognised or unexpected error |
337
339
  <!-- End Error Handling [errors] -->
338
340
 
339
341
  <!-- Start Server Selection [server] -->
package/lib/config.d.ts CHANGED
@@ -27,8 +27,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
27
27
  export declare const SDK_METADATA: {
28
28
  readonly language: "typescript";
29
29
  readonly openapiDocVersion: "1.0.0";
30
- readonly sdkVersion: "0.14.1";
31
- readonly genVersion: "2.477.0";
32
- readonly userAgent: "speakeasy-sdk/typescript 0.14.1 2.477.0 1.0.0 @steamsets/client-ts";
30
+ readonly sdkVersion: "0.14.2";
31
+ readonly genVersion: "2.479.3";
32
+ readonly userAgent: "speakeasy-sdk/typescript 0.14.2 2.479.3 1.0.0 @steamsets/client-ts";
33
33
  };
34
34
  //# sourceMappingURL=config.d.ts.map
package/lib/config.js CHANGED
@@ -30,8 +30,8 @@ function serverURLFromOptions(options) {
30
30
  exports.SDK_METADATA = {
31
31
  language: "typescript",
32
32
  openapiDocVersion: "1.0.0",
33
- sdkVersion: "0.14.1",
34
- genVersion: "2.477.0",
35
- userAgent: "speakeasy-sdk/typescript 0.14.1 2.477.0 1.0.0 @steamsets/client-ts",
33
+ sdkVersion: "0.14.2",
34
+ genVersion: "2.479.3",
35
+ userAgent: "speakeasy-sdk/typescript 0.14.2 2.479.3 1.0.0 @steamsets/client-ts",
36
36
  };
37
37
  //# sourceMappingURL=config.js.map
@@ -8,6 +8,10 @@ export type V1GroupLeaderboardResponseBody = {
8
8
  */
9
9
  dollarSchema?: string | undefined;
10
10
  groups: Array<V1GroupLeaderboardGroup> | null;
11
+ /**
12
+ * The number of accounts that are ranked in the leaderboard
13
+ */
14
+ rankedOutOf?: number | undefined;
11
15
  steamSetsGroup: V1GroupLeaderboardGroup;
12
16
  };
13
17
  /** @internal */
@@ -16,6 +20,7 @@ export declare const V1GroupLeaderboardResponseBody$inboundSchema: z.ZodType<V1G
16
20
  export type V1GroupLeaderboardResponseBody$Outbound = {
17
21
  $schema?: string | undefined;
18
22
  groups: Array<V1GroupLeaderboardGroup$Outbound> | null;
23
+ rankedOutOf: number;
19
24
  steamSetsGroup: V1GroupLeaderboardGroup$Outbound;
20
25
  };
21
26
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"v1groupleaderboardresponsebody.d.ts","sourceRoot":"","sources":["../../src/models/components/v1groupleaderboardresponsebody.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,uBAAuB,EAEvB,gCAAgC,EAEjC,MAAM,8BAA8B,CAAC;AAEtC,MAAM,MAAM,8BAA8B,GAAG;IAC3C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,KAAK,CAAC,uBAAuB,CAAC,GAAG,IAAI,CAAC;IAC9C,cAAc,EAAE,uBAAuB,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,8BAA8B,EAC9B,CAAC,CAAC,UAAU,EACZ,OAAO,CASP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,uCAAuC,GAAG;IACpD,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,MAAM,EAAE,KAAK,CAAC,gCAAgC,CAAC,GAAG,IAAI,CAAC;IACvD,cAAc,EAAE,gCAAgC,CAAC;CAClD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAAO,CACnE,uCAAuC,EACvC,CAAC,CAAC,UAAU,EACZ,8BAA8B,CAS9B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,+BAA+B,CAAC;IAC/C,8EAA8E;IACvE,MAAM,aAAa,kEAA+C,CAAC;IAC1E,+EAA+E;IACxE,MAAM,cAAc,kGAAgD,CAAC;IAC5E,yEAAyE;IACzE,KAAY,QAAQ,GAAG,uCAAuC,CAAC;CAChE;AAED,wBAAgB,oCAAoC,CAClD,8BAA8B,EAAE,8BAA8B,GAC7D,MAAM,CAMR;AAED,wBAAgB,sCAAsC,CACpD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,8BAA8B,EAAE,kBAAkB,CAAC,CAMrE"}
1
+ {"version":3,"file":"v1groupleaderboardresponsebody.d.ts","sourceRoot":"","sources":["../../src/models/components/v1groupleaderboardresponsebody.ts"],"names":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AAE,8BAA8B,GAC7D,MAAM,CAMR;AAED,wBAAgB,sCAAsC,CACpD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,8BAA8B,EAAE,kBAAkB,CAAC,CAMrE"}
@@ -37,6 +37,7 @@ const v1groupleaderboardgroup_js_1 = require("./v1groupleaderboardgroup.js");
37
37
  exports.V1GroupLeaderboardResponseBody$inboundSchema = z.object({
38
38
  $schema: z.string().optional(),
39
39
  groups: z.nullable(z.array(v1groupleaderboardgroup_js_1.V1GroupLeaderboardGroup$inboundSchema)),
40
+ rankedOutOf: z.number().int().default(0),
40
41
  steamSetsGroup: v1groupleaderboardgroup_js_1.V1GroupLeaderboardGroup$inboundSchema,
41
42
  }).transform((v) => {
42
43
  return (0, primitives_js_1.remap)(v, {
@@ -47,6 +48,7 @@ exports.V1GroupLeaderboardResponseBody$inboundSchema = z.object({
47
48
  exports.V1GroupLeaderboardResponseBody$outboundSchema = z.object({
48
49
  dollarSchema: z.string().optional(),
49
50
  groups: z.nullable(z.array(v1groupleaderboardgroup_js_1.V1GroupLeaderboardGroup$outboundSchema)),
51
+ rankedOutOf: z.number().int().default(0),
50
52
  steamSetsGroup: v1groupleaderboardgroup_js_1.V1GroupLeaderboardGroup$outboundSchema,
51
53
  }).transform((v) => {
52
54
  return (0, primitives_js_1.remap)(v, {
@@ -1 +1 @@
1
- {"version":3,"file":"v1groupleaderboardresponsebody.js","sourceRoot":"","sources":["../../src/models/components/v1groupleaderboardresponsebody.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEH,oFAQC;AAED,wFAQC;AAzFD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,6EAKsC;AAWtC,gBAAgB;AACH,QAAA,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,C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B,+BAA+B;IAC9C,8EAA8E;IACjE,6CAAa,GAAG,oDAA4C,CAAC;IAC1E,+EAA+E;IAClE,8CAAc,GAAG,qDAA6C,CAAC;AAG9E,CAAC,EAPgB,+BAA+B,+CAA/B,+BAA+B,QAO/C;AAED,SAAgB,oCAAoC,CAClD,8BAA8D;IAE9D,OAAO,IAAI,CAAC,SAAS,CACnB,qDAA6C,CAAC,KAAK,CACjD,8BAA8B,CAC/B,CACF,CAAC;AACJ,CAAC;AAED,SAAgB,sCAAsC,CACpD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,oDAA4C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxE,4DAA4D,CAC7D,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steamsets/client-ts",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "author": "Speakeasy",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
package/src/lib/config.ts CHANGED
@@ -55,8 +55,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
55
55
  export const SDK_METADATA = {
56
56
  language: "typescript",
57
57
  openapiDocVersion: "1.0.0",
58
- sdkVersion: "0.14.1",
59
- genVersion: "2.477.0",
58
+ sdkVersion: "0.14.2",
59
+ genVersion: "2.479.3",
60
60
  userAgent:
61
- "speakeasy-sdk/typescript 0.14.1 2.477.0 1.0.0 @steamsets/client-ts",
61
+ "speakeasy-sdk/typescript 0.14.2 2.479.3 1.0.0 @steamsets/client-ts",
62
62
  } as const;
@@ -20,6 +20,10 @@ export type V1GroupLeaderboardResponseBody = {
20
20
  */
21
21
  dollarSchema?: string | undefined;
22
22
  groups: Array<V1GroupLeaderboardGroup> | null;
23
+ /**
24
+ * The number of accounts that are ranked in the leaderboard
25
+ */
26
+ rankedOutOf?: number | undefined;
23
27
  steamSetsGroup: V1GroupLeaderboardGroup;
24
28
  };
25
29
 
@@ -31,6 +35,7 @@ export const V1GroupLeaderboardResponseBody$inboundSchema: z.ZodType<
31
35
  > = z.object({
32
36
  $schema: z.string().optional(),
33
37
  groups: z.nullable(z.array(V1GroupLeaderboardGroup$inboundSchema)),
38
+ rankedOutOf: z.number().int().default(0),
34
39
  steamSetsGroup: V1GroupLeaderboardGroup$inboundSchema,
35
40
  }).transform((v) => {
36
41
  return remap$(v, {
@@ -42,6 +47,7 @@ export const V1GroupLeaderboardResponseBody$inboundSchema: z.ZodType<
42
47
  export type V1GroupLeaderboardResponseBody$Outbound = {
43
48
  $schema?: string | undefined;
44
49
  groups: Array<V1GroupLeaderboardGroup$Outbound> | null;
50
+ rankedOutOf: number;
45
51
  steamSetsGroup: V1GroupLeaderboardGroup$Outbound;
46
52
  };
47
53
 
@@ -53,6 +59,7 @@ export const V1GroupLeaderboardResponseBody$outboundSchema: z.ZodType<
53
59
  > = z.object({
54
60
  dollarSchema: z.string().optional(),
55
61
  groups: z.nullable(z.array(V1GroupLeaderboardGroup$outboundSchema)),
62
+ rankedOutOf: z.number().int().default(0),
56
63
  steamSetsGroup: V1GroupLeaderboardGroup$outboundSchema,
57
64
  }).transform((v) => {
58
65
  return remap$(v, {