@steamsets/client-ts 0.25.13 → 0.25.14

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 (50) hide show
  1. package/docs/sdks/account/README.md +20 -10
  2. package/docs/sdks/admin/README.md +2 -6
  3. package/jsr.json +1 -1
  4. package/lib/config.d.ts +3 -3
  5. package/lib/config.js +3 -3
  6. package/lib/matchers.d.ts +3 -1
  7. package/lib/matchers.d.ts.map +1 -1
  8. package/lib/matchers.js +12 -0
  9. package/lib/matchers.js.map +1 -1
  10. package/lib/sdks.js +7 -2
  11. package/lib/sdks.js.map +1 -1
  12. package/models/components/index.d.ts +2 -0
  13. package/models/components/index.d.ts.map +1 -1
  14. package/models/components/index.js +2 -0
  15. package/models/components/index.js.map +1 -1
  16. package/models/components/v1accountcompare.d.ts +72 -0
  17. package/models/components/v1accountcompare.d.ts.map +1 -0
  18. package/models/components/v1accountcompare.js +84 -0
  19. package/models/components/v1accountcompare.js.map +1 -0
  20. package/models/components/v1accountcomparebadgeorder.d.ts +88 -0
  21. package/models/components/v1accountcomparebadgeorder.d.ts.map +1 -0
  22. package/models/components/v1accountcomparebadgeorder.js +102 -0
  23. package/models/components/v1accountcomparebadgeorder.js.map +1 -0
  24. package/models/components/v1accountcomparebadgesrequestbody.d.ts +69 -0
  25. package/models/components/v1accountcomparebadgesrequestbody.d.ts.map +1 -1
  26. package/models/components/v1accountcomparebadgesrequestbody.js +55 -1
  27. package/models/components/v1accountcomparebadgesrequestbody.js.map +1 -1
  28. package/models/components/v1accountcomparebadgesresponsebody.d.ts +10 -0
  29. package/models/components/v1accountcomparebadgesresponsebody.d.ts.map +1 -1
  30. package/models/components/v1accountcomparebadgesresponsebody.js +4 -0
  31. package/models/components/v1accountcomparebadgesresponsebody.js.map +1 -1
  32. package/models/components/v1accountlistbadgesrequestbody.d.ts +8 -8
  33. package/models/components/v1accountlistbadgesrequestbody.d.ts.map +1 -1
  34. package/models/components/v1accountlistbadgesrequestbody.js +13 -14
  35. package/models/components/v1accountlistbadgesrequestbody.js.map +1 -1
  36. package/models/components/v1apporder.d.ts +16 -16
  37. package/models/components/v1apporder.d.ts.map +1 -1
  38. package/models/components/v1apporder.js +25 -26
  39. package/models/components/v1apporder.js.map +1 -1
  40. package/package.json +1 -1
  41. package/src/lib/config.ts +3 -3
  42. package/src/lib/matchers.ts +20 -0
  43. package/src/lib/sdks.ts +8 -2
  44. package/src/models/components/index.ts +2 -0
  45. package/src/models/components/v1accountcompare.ts +104 -0
  46. package/src/models/components/v1accountcomparebadgeorder.ts +121 -0
  47. package/src/models/components/v1accountcomparebadgesrequestbody.ts +85 -0
  48. package/src/models/components/v1accountcomparebadgesresponsebody.ts +14 -0
  49. package/src/models/components/v1accountlistbadgesrequestbody.ts +25 -14
  50. package/src/models/components/v1apporder.ts +30 -26
@@ -26,59 +26,58 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.V1AppOrder$ = exports.V1AppOrder$outboundSchema = exports.V1AppOrder$inboundSchema = exports.Direction$ = exports.Direction$outboundSchema = exports.Direction$inboundSchema = exports.By$ = exports.By$outboundSchema = exports.By$inboundSchema = exports.Direction = exports.By = void 0;
29
+ exports.V1AppOrder$ = exports.V1AppOrder$outboundSchema = exports.V1AppOrder$inboundSchema = exports.V1AppOrderDirection$ = exports.V1AppOrderDirection$outboundSchema = exports.V1AppOrderDirection$inboundSchema = exports.V1AppOrderBy$ = exports.V1AppOrderBy$outboundSchema = exports.V1AppOrderBy$inboundSchema = exports.V1AppOrderDirection = exports.V1AppOrderBy = void 0;
30
30
  exports.v1AppOrderToJSON = v1AppOrderToJSON;
31
31
  exports.v1AppOrderFromJSON = v1AppOrderFromJSON;
32
32
  const z = __importStar(require("zod"));
33
33
  const schemas_js_1 = require("../../lib/schemas.js");
34
- exports.By = {
34
+ exports.V1AppOrderBy = {
35
35
  AppId: "appId",
36
36
  Playtime: "playtime",
37
37
  };
38
- exports.Direction = {
38
+ exports.V1AppOrderDirection = {
39
39
  Asc: "asc",
40
40
  Desc: "desc",
41
41
  };
42
42
  /** @internal */
43
- exports.By$inboundSchema = z.nativeEnum(exports.By);
43
+ exports.V1AppOrderBy$inboundSchema = z.nativeEnum(exports.V1AppOrderBy);
44
44
  /** @internal */
45
- exports.By$outboundSchema = exports.By$inboundSchema;
45
+ exports.V1AppOrderBy$outboundSchema = exports.V1AppOrderBy$inboundSchema;
46
46
  /**
47
47
  * @internal
48
48
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
49
49
  */
50
- var By$;
51
- (function (By$) {
52
- /** @deprecated use `By$inboundSchema` instead. */
53
- By$.inboundSchema = exports.By$inboundSchema;
54
- /** @deprecated use `By$outboundSchema` instead. */
55
- By$.outboundSchema = exports.By$outboundSchema;
56
- })(By$ || (exports.By$ = By$ = {}));
50
+ var V1AppOrderBy$;
51
+ (function (V1AppOrderBy$) {
52
+ /** @deprecated use `V1AppOrderBy$inboundSchema` instead. */
53
+ V1AppOrderBy$.inboundSchema = exports.V1AppOrderBy$inboundSchema;
54
+ /** @deprecated use `V1AppOrderBy$outboundSchema` instead. */
55
+ V1AppOrderBy$.outboundSchema = exports.V1AppOrderBy$outboundSchema;
56
+ })(V1AppOrderBy$ || (exports.V1AppOrderBy$ = V1AppOrderBy$ = {}));
57
57
  /** @internal */
58
- exports.Direction$inboundSchema = z
59
- .nativeEnum(exports.Direction);
58
+ exports.V1AppOrderDirection$inboundSchema = z.nativeEnum(exports.V1AppOrderDirection);
60
59
  /** @internal */
61
- exports.Direction$outboundSchema = exports.Direction$inboundSchema;
60
+ exports.V1AppOrderDirection$outboundSchema = exports.V1AppOrderDirection$inboundSchema;
62
61
  /**
63
62
  * @internal
64
63
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
65
64
  */
66
- var Direction$;
67
- (function (Direction$) {
68
- /** @deprecated use `Direction$inboundSchema` instead. */
69
- Direction$.inboundSchema = exports.Direction$inboundSchema;
70
- /** @deprecated use `Direction$outboundSchema` instead. */
71
- Direction$.outboundSchema = exports.Direction$outboundSchema;
72
- })(Direction$ || (exports.Direction$ = Direction$ = {}));
65
+ var V1AppOrderDirection$;
66
+ (function (V1AppOrderDirection$) {
67
+ /** @deprecated use `V1AppOrderDirection$inboundSchema` instead. */
68
+ V1AppOrderDirection$.inboundSchema = exports.V1AppOrderDirection$inboundSchema;
69
+ /** @deprecated use `V1AppOrderDirection$outboundSchema` instead. */
70
+ V1AppOrderDirection$.outboundSchema = exports.V1AppOrderDirection$outboundSchema;
71
+ })(V1AppOrderDirection$ || (exports.V1AppOrderDirection$ = V1AppOrderDirection$ = {}));
73
72
  /** @internal */
74
73
  exports.V1AppOrder$inboundSchema = z.object({
75
- by: exports.By$inboundSchema,
76
- direction: exports.Direction$inboundSchema.default("desc"),
74
+ by: exports.V1AppOrderBy$inboundSchema,
75
+ direction: exports.V1AppOrderDirection$inboundSchema.default("desc"),
77
76
  });
78
77
  /** @internal */
79
78
  exports.V1AppOrder$outboundSchema = z.object({
80
- by: exports.By$outboundSchema,
81
- direction: exports.Direction$outboundSchema.default("desc"),
79
+ by: exports.V1AppOrderBy$outboundSchema,
80
+ direction: exports.V1AppOrderDirection$outboundSchema.default("desc"),
82
81
  });
83
82
  /**
84
83
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"v1apporder.js","sourceRoot":"","sources":["../../src/models/components/v1apporder.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGH,4CAEC;AAED,gDAQC;AA9GD,uCAAyB;AACzB,qDAAiD;AAKpC,QAAA,EAAE,GAAG;IAChB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;CACZ,CAAC;AAGE,QAAA,SAAS,GAAG;IACvB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACJ,CAAC;AAQX,gBAAgB;AACH,QAAA,gBAAgB,G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CAAC;IAC/D,oEAAoE;IACvD,mCAAc,GAAG,0CAAkC,CAAC;AACnE,CAAC,EALgB,oBAAoB,oCAApB,oBAAoB,QAKpC;AAED,gBAAgB;AACH,QAAA,wBAAwB,GAIjC,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,kCAA0B;IAC9B,SAAS,EAAE,yCAAiC,CAAC,OAAO,CAAC,MAAM,CAAC;CAC7D,CAAC,CAAC;AAQH,gBAAgB;AACH,QAAA,yBAAyB,GAIlC,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,mCAA2B;IAC/B,SAAS,EAAE,0CAAkC,CAAC,OAAO,CAAC,MAAM,CAAC;CAC9D,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,WAAW,CAO3B;AAPD,WAAiB,WAAW;IAC1B,0DAA0D;IAC7C,yBAAa,GAAG,gCAAwB,CAAC;IACtD,2DAA2D;IAC9C,0BAAc,GAAG,iCAAyB,CAAC;AAG1D,CAAC,EAPgB,WAAW,2BAAX,WAAW,QAO3B;AAED,SAAgB,gBAAgB,CAAC,UAAsB;IACrD,OAAO,IAAI,CAAC,SAAS,CAAC,iCAAyB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AACrE,CAAC;AAED,SAAgB,kBAAkB,CAChC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAwB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACpD,wCAAwC,CACzC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steamsets/client-ts",
3
- "version": "0.25.13",
3
+ "version": "0.25.14",
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.25.13",
59
- genVersion: "2.570.4",
58
+ sdkVersion: "0.25.14",
59
+ genVersion: "2.593.3",
60
60
  userAgent:
61
- "speakeasy-sdk/typescript 0.25.13 2.570.4 1.0.0 @steamsets/client-ts",
61
+ "speakeasy-sdk/typescript 0.25.14 2.593.3 1.0.0 @steamsets/client-ts",
62
62
  } as const;
@@ -10,6 +10,7 @@ import { isPlainObject } from "./is-plain-object.js";
10
10
  import { safeParse } from "./schemas.js";
11
11
 
12
12
  export type Encoding =
13
+ | "jsonl"
13
14
  | "json"
14
15
  | "text"
15
16
  | "bytes"
@@ -19,6 +20,7 @@ export type Encoding =
19
20
  | "fail";
20
21
 
21
22
  const DEFAULT_CONTENT_TYPES: Record<Encoding, string> = {
23
+ jsonl: "application/jsonl",
22
24
  json: "application/json",
23
25
  text: "text/plain",
24
26
  bytes: "application/octet-stream",
@@ -72,6 +74,21 @@ export function json<T>(
72
74
  return { ...options, enc: "json", codes, schema };
73
75
  }
74
76
 
77
+ export function jsonl<T>(
78
+ codes: StatusCodePredicate,
79
+ schema: Schema<T>,
80
+ options?: MatchOptions,
81
+ ): ValueMatcher<T> {
82
+ return { ...options, enc: "jsonl", codes, schema };
83
+ }
84
+
85
+ export function jsonlErr<E>(
86
+ codes: StatusCodePredicate,
87
+ schema: Schema<E>,
88
+ options?: MatchOptions,
89
+ ): ErrorMatcher<E> {
90
+ return { ...options, err: true, enc: "jsonl", codes, schema };
91
+ }
75
92
  export function textErr<E>(
76
93
  codes: StatusCodePredicate,
77
94
  schema: Schema<E>,
@@ -205,6 +222,9 @@ export function match<T, E>(
205
222
  case "json":
206
223
  raw = await response.json();
207
224
  break;
225
+ case "jsonl":
226
+ raw = response.body;
227
+ break;
208
228
  case "bytes":
209
229
  raw = new Uint8Array(await response.arrayBuffer());
210
230
  break;
package/src/lib/sdks.ts CHANGED
@@ -298,7 +298,9 @@ export class ClientSDK {
298
298
  }
299
299
  }
300
300
 
301
- const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/;
301
+ const jsonLikeContentTypeRE = /(application|text)\/.*?\+*json.*/;
302
+ const jsonlLikeContentTypeRE =
303
+ /(application|text)\/(.*?\+*\bjsonl\b.*|.*?\+*\bx-ndjson\b.*)/;
302
304
  async function logRequest(logger: Logger | undefined, req: Request) {
303
305
  if (!logger) {
304
306
  return;
@@ -364,9 +366,13 @@ async function logResponse(
364
366
  logger.group("Body:");
365
367
  switch (true) {
366
368
  case matchContentType(res, "application/json")
367
- || jsonLikeContentTypeRE.test(ct):
369
+ || jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct):
368
370
  logger.log(await res.clone().json());
369
371
  break;
372
+ case matchContentType(res, "application/jsonl")
373
+ || jsonlLikeContentTypeRE.test(ct):
374
+ logger.log(await res.clone().text());
375
+ break;
370
376
  case matchContentType(res, "text/event-stream"):
371
377
  logger.log(`<${contentType}>`);
372
378
  break;
@@ -45,6 +45,8 @@ export * from "./v1accountbadgeownedbadge.js";
45
45
  export * from "./v1accountbadgeownedbadgesresponsebody.js";
46
46
  export * from "./v1accountbookmarkbadgerequestbody.js";
47
47
  export * from "./v1accountbookmarkbadgeresponsebody.js";
48
+ export * from "./v1accountcompare.js";
49
+ export * from "./v1accountcomparebadgeorder.js";
48
50
  export * from "./v1accountcomparebadgesrequestbody.js";
49
51
  export * from "./v1accountcomparebadgesresponsebody.js";
50
52
  export * from "./v1accountcomparedappbadge.js";
@@ -0,0 +1,104 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const Mode = {
12
+ All: "all",
13
+ Missing: "missing",
14
+ Owned: "owned",
15
+ ReverseOwned: "reverse_owned",
16
+ BothMissing: "both_missing",
17
+ BothOwned: "both_owned",
18
+ } as const;
19
+ export type Mode = ClosedEnum<typeof Mode>;
20
+
21
+ export type V1AccountCompare = {
22
+ /**
23
+ * The SteamID to compare against
24
+ */
25
+ against: string;
26
+ mode?: Mode | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export const Mode$inboundSchema: z.ZodNativeEnum<typeof Mode> = z.nativeEnum(
31
+ Mode,
32
+ );
33
+
34
+ /** @internal */
35
+ export const Mode$outboundSchema: z.ZodNativeEnum<typeof Mode> =
36
+ Mode$inboundSchema;
37
+
38
+ /**
39
+ * @internal
40
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
41
+ */
42
+ export namespace Mode$ {
43
+ /** @deprecated use `Mode$inboundSchema` instead. */
44
+ export const inboundSchema = Mode$inboundSchema;
45
+ /** @deprecated use `Mode$outboundSchema` instead. */
46
+ export const outboundSchema = Mode$outboundSchema;
47
+ }
48
+
49
+ /** @internal */
50
+ export const V1AccountCompare$inboundSchema: z.ZodType<
51
+ V1AccountCompare,
52
+ z.ZodTypeDef,
53
+ unknown
54
+ > = z.object({
55
+ against: z.string(),
56
+ mode: Mode$inboundSchema.default("missing"),
57
+ });
58
+
59
+ /** @internal */
60
+ export type V1AccountCompare$Outbound = {
61
+ against: string;
62
+ mode: string;
63
+ };
64
+
65
+ /** @internal */
66
+ export const V1AccountCompare$outboundSchema: z.ZodType<
67
+ V1AccountCompare$Outbound,
68
+ z.ZodTypeDef,
69
+ V1AccountCompare
70
+ > = z.object({
71
+ against: z.string(),
72
+ mode: Mode$outboundSchema.default("missing"),
73
+ });
74
+
75
+ /**
76
+ * @internal
77
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
78
+ */
79
+ export namespace V1AccountCompare$ {
80
+ /** @deprecated use `V1AccountCompare$inboundSchema` instead. */
81
+ export const inboundSchema = V1AccountCompare$inboundSchema;
82
+ /** @deprecated use `V1AccountCompare$outboundSchema` instead. */
83
+ export const outboundSchema = V1AccountCompare$outboundSchema;
84
+ /** @deprecated use `V1AccountCompare$Outbound` instead. */
85
+ export type Outbound = V1AccountCompare$Outbound;
86
+ }
87
+
88
+ export function v1AccountCompareToJSON(
89
+ v1AccountCompare: V1AccountCompare,
90
+ ): string {
91
+ return JSON.stringify(
92
+ V1AccountCompare$outboundSchema.parse(v1AccountCompare),
93
+ );
94
+ }
95
+
96
+ export function v1AccountCompareFromJSON(
97
+ jsonString: string,
98
+ ): SafeParseResult<V1AccountCompare, SDKValidationError> {
99
+ return safeParse(
100
+ jsonString,
101
+ (x) => V1AccountCompare$inboundSchema.parse(JSON.parse(x)),
102
+ `Failed to parse 'V1AccountCompare' from JSON`,
103
+ );
104
+ }
@@ -0,0 +1,121 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const By = {
12
+ Xp: "xp",
13
+ Level: "level",
14
+ Scarcity: "scarcity",
15
+ Name: "name",
16
+ } as const;
17
+ export type By = ClosedEnum<typeof By>;
18
+
19
+ export const Direction = {
20
+ Asc: "asc",
21
+ Desc: "desc",
22
+ } as const;
23
+ export type Direction = ClosedEnum<typeof Direction>;
24
+
25
+ export type V1AccountCompareBadgeOrder = {
26
+ by?: By | undefined;
27
+ direction?: Direction | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const By$inboundSchema: z.ZodNativeEnum<typeof By> = z.nativeEnum(By);
32
+
33
+ /** @internal */
34
+ export const By$outboundSchema: z.ZodNativeEnum<typeof By> = By$inboundSchema;
35
+
36
+ /**
37
+ * @internal
38
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
39
+ */
40
+ export namespace By$ {
41
+ /** @deprecated use `By$inboundSchema` instead. */
42
+ export const inboundSchema = By$inboundSchema;
43
+ /** @deprecated use `By$outboundSchema` instead. */
44
+ export const outboundSchema = By$outboundSchema;
45
+ }
46
+
47
+ /** @internal */
48
+ export const Direction$inboundSchema: z.ZodNativeEnum<typeof Direction> = z
49
+ .nativeEnum(Direction);
50
+
51
+ /** @internal */
52
+ export const Direction$outboundSchema: z.ZodNativeEnum<typeof Direction> =
53
+ Direction$inboundSchema;
54
+
55
+ /**
56
+ * @internal
57
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
58
+ */
59
+ export namespace Direction$ {
60
+ /** @deprecated use `Direction$inboundSchema` instead. */
61
+ export const inboundSchema = Direction$inboundSchema;
62
+ /** @deprecated use `Direction$outboundSchema` instead. */
63
+ export const outboundSchema = Direction$outboundSchema;
64
+ }
65
+
66
+ /** @internal */
67
+ export const V1AccountCompareBadgeOrder$inboundSchema: z.ZodType<
68
+ V1AccountCompareBadgeOrder,
69
+ z.ZodTypeDef,
70
+ unknown
71
+ > = z.object({
72
+ by: By$inboundSchema.default("xp"),
73
+ direction: Direction$inboundSchema.default("desc"),
74
+ });
75
+
76
+ /** @internal */
77
+ export type V1AccountCompareBadgeOrder$Outbound = {
78
+ by: string;
79
+ direction: string;
80
+ };
81
+
82
+ /** @internal */
83
+ export const V1AccountCompareBadgeOrder$outboundSchema: z.ZodType<
84
+ V1AccountCompareBadgeOrder$Outbound,
85
+ z.ZodTypeDef,
86
+ V1AccountCompareBadgeOrder
87
+ > = z.object({
88
+ by: By$outboundSchema.default("xp"),
89
+ direction: Direction$outboundSchema.default("desc"),
90
+ });
91
+
92
+ /**
93
+ * @internal
94
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
95
+ */
96
+ export namespace V1AccountCompareBadgeOrder$ {
97
+ /** @deprecated use `V1AccountCompareBadgeOrder$inboundSchema` instead. */
98
+ export const inboundSchema = V1AccountCompareBadgeOrder$inboundSchema;
99
+ /** @deprecated use `V1AccountCompareBadgeOrder$outboundSchema` instead. */
100
+ export const outboundSchema = V1AccountCompareBadgeOrder$outboundSchema;
101
+ /** @deprecated use `V1AccountCompareBadgeOrder$Outbound` instead. */
102
+ export type Outbound = V1AccountCompareBadgeOrder$Outbound;
103
+ }
104
+
105
+ export function v1AccountCompareBadgeOrderToJSON(
106
+ v1AccountCompareBadgeOrder: V1AccountCompareBadgeOrder,
107
+ ): string {
108
+ return JSON.stringify(
109
+ V1AccountCompareBadgeOrder$outboundSchema.parse(v1AccountCompareBadgeOrder),
110
+ );
111
+ }
112
+
113
+ export function v1AccountCompareBadgeOrderFromJSON(
114
+ jsonString: string,
115
+ ): SafeParseResult<V1AccountCompareBadgeOrder, SDKValidationError> {
116
+ return safeParse(
117
+ jsonString,
118
+ (x) => V1AccountCompareBadgeOrder$inboundSchema.parse(JSON.parse(x)),
119
+ `Failed to parse 'V1AccountCompareBadgeOrder' from JSON`,
120
+ );
121
+ }
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
8
9
  import { Result as SafeParseResult } from "../../types/fp.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
11
  import {
@@ -13,11 +14,80 @@ import {
13
14
  AccountSearch$Outbound,
14
15
  AccountSearch$outboundSchema,
15
16
  } from "./accountsearch.js";
17
+ import {
18
+ V1AccountCompare,
19
+ V1AccountCompare$inboundSchema,
20
+ V1AccountCompare$Outbound,
21
+ V1AccountCompare$outboundSchema,
22
+ } from "./v1accountcompare.js";
23
+ import {
24
+ V1AccountCompareBadgeOrder,
25
+ V1AccountCompareBadgeOrder$inboundSchema,
26
+ V1AccountCompareBadgeOrder$Outbound,
27
+ V1AccountCompareBadgeOrder$outboundSchema,
28
+ } from "./v1accountcomparebadgeorder.js";
29
+
30
+ export const Filter = {
31
+ All: "all",
32
+ Normal: "normal",
33
+ Foil: "foil",
34
+ } as const;
35
+ export type Filter = ClosedEnum<typeof Filter>;
36
+
37
+ export const Ignore = {
38
+ Event: "event",
39
+ Sale: "sale",
40
+ Steam: "steam",
41
+ } as const;
42
+ export type Ignore = ClosedEnum<typeof Ignore>;
16
43
 
17
44
  export type V1AccountCompareBadgesRequestBody = {
18
45
  comparing: Array<AccountSearch> | null;
46
+ compare: V1AccountCompare | null;
47
+ filter?: Filter | undefined;
48
+ ignore: Array<Ignore> | null;
49
+ order: V1AccountCompareBadgeOrder | null;
50
+ page?: number | undefined;
19
51
  };
20
52
 
53
+ /** @internal */
54
+ export const Filter$inboundSchema: z.ZodNativeEnum<typeof Filter> = z
55
+ .nativeEnum(Filter);
56
+
57
+ /** @internal */
58
+ export const Filter$outboundSchema: z.ZodNativeEnum<typeof Filter> =
59
+ Filter$inboundSchema;
60
+
61
+ /**
62
+ * @internal
63
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
64
+ */
65
+ export namespace Filter$ {
66
+ /** @deprecated use `Filter$inboundSchema` instead. */
67
+ export const inboundSchema = Filter$inboundSchema;
68
+ /** @deprecated use `Filter$outboundSchema` instead. */
69
+ export const outboundSchema = Filter$outboundSchema;
70
+ }
71
+
72
+ /** @internal */
73
+ export const Ignore$inboundSchema: z.ZodNativeEnum<typeof Ignore> = z
74
+ .nativeEnum(Ignore);
75
+
76
+ /** @internal */
77
+ export const Ignore$outboundSchema: z.ZodNativeEnum<typeof Ignore> =
78
+ Ignore$inboundSchema;
79
+
80
+ /**
81
+ * @internal
82
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
+ */
84
+ export namespace Ignore$ {
85
+ /** @deprecated use `Ignore$inboundSchema` instead. */
86
+ export const inboundSchema = Ignore$inboundSchema;
87
+ /** @deprecated use `Ignore$outboundSchema` instead. */
88
+ export const outboundSchema = Ignore$outboundSchema;
89
+ }
90
+
21
91
  /** @internal */
22
92
  export const V1AccountCompareBadgesRequestBody$inboundSchema: z.ZodType<
23
93
  V1AccountCompareBadgesRequestBody,
@@ -25,6 +95,11 @@ export const V1AccountCompareBadgesRequestBody$inboundSchema: z.ZodType<
25
95
  unknown
26
96
  > = z.object({
27
97
  Comparing: z.nullable(z.array(AccountSearch$inboundSchema)),
98
+ compare: z.nullable(V1AccountCompare$inboundSchema),
99
+ filter: Filter$inboundSchema.default("all"),
100
+ ignore: z.nullable(z.array(Ignore$inboundSchema)),
101
+ order: z.nullable(V1AccountCompareBadgeOrder$inboundSchema),
102
+ page: z.number().int().default(1),
28
103
  }).transform((v) => {
29
104
  return remap$(v, {
30
105
  "Comparing": "comparing",
@@ -34,6 +109,11 @@ export const V1AccountCompareBadgesRequestBody$inboundSchema: z.ZodType<
34
109
  /** @internal */
35
110
  export type V1AccountCompareBadgesRequestBody$Outbound = {
36
111
  Comparing: Array<AccountSearch$Outbound> | null;
112
+ compare: V1AccountCompare$Outbound | null;
113
+ filter: string;
114
+ ignore: Array<string> | null;
115
+ order: V1AccountCompareBadgeOrder$Outbound | null;
116
+ page: number;
37
117
  };
38
118
 
39
119
  /** @internal */
@@ -43,6 +123,11 @@ export const V1AccountCompareBadgesRequestBody$outboundSchema: z.ZodType<
43
123
  V1AccountCompareBadgesRequestBody
44
124
  > = z.object({
45
125
  comparing: z.nullable(z.array(AccountSearch$outboundSchema)),
126
+ compare: z.nullable(V1AccountCompare$outboundSchema),
127
+ filter: Filter$outboundSchema.default("all"),
128
+ ignore: z.nullable(z.array(Ignore$outboundSchema)),
129
+ order: z.nullable(V1AccountCompareBadgeOrder$outboundSchema),
130
+ page: z.number().int().default(1),
46
131
  }).transform((v) => {
47
132
  return remap$(v, {
48
133
  comparing: "Comparing",
@@ -20,6 +20,14 @@ export type V1AccountCompareBadgesResponseBody = {
20
20
  */
21
21
  dollarSchema?: string | undefined;
22
22
  appBadges: Array<V1AccountComparedAppBadge> | null;
23
+ /**
24
+ * The number of pages
25
+ */
26
+ pages: number;
27
+ /**
28
+ * The total number of hits for all pages
29
+ */
30
+ totalHits: number;
23
31
  };
24
32
 
25
33
  /** @internal */
@@ -30,6 +38,8 @@ export const V1AccountCompareBadgesResponseBody$inboundSchema: z.ZodType<
30
38
  > = z.object({
31
39
  $schema: z.string().optional(),
32
40
  appBadges: z.nullable(z.array(V1AccountComparedAppBadge$inboundSchema)),
41
+ pages: z.number().int(),
42
+ totalHits: z.number().int(),
33
43
  }).transform((v) => {
34
44
  return remap$(v, {
35
45
  "$schema": "dollarSchema",
@@ -40,6 +50,8 @@ export const V1AccountCompareBadgesResponseBody$inboundSchema: z.ZodType<
40
50
  export type V1AccountCompareBadgesResponseBody$Outbound = {
41
51
  $schema?: string | undefined;
42
52
  appBadges: Array<V1AccountComparedAppBadge$Outbound> | null;
53
+ pages: number;
54
+ totalHits: number;
43
55
  };
44
56
 
45
57
  /** @internal */
@@ -50,6 +62,8 @@ export const V1AccountCompareBadgesResponseBody$outboundSchema: z.ZodType<
50
62
  > = z.object({
51
63
  dollarSchema: z.string().optional(),
52
64
  appBadges: z.nullable(z.array(V1AccountComparedAppBadge$outboundSchema)),
65
+ pages: z.number().int(),
66
+ totalHits: z.number().int(),
53
67
  }).transform((v) => {
54
68
  return remap$(v, {
55
69
  dollarSchema: "$schema",
@@ -26,15 +26,17 @@ import {
26
26
  VanityStruct$outboundSchema,
27
27
  } from "./vanitystruct.js";
28
28
 
29
- export const Filter = {
29
+ export const V1AccountListBadgesRequestBodyFilter = {
30
30
  Foil: "foil",
31
31
  Sale: "sale",
32
32
  Event: "event",
33
33
  } as const;
34
- export type Filter = ClosedEnum<typeof Filter>;
34
+ export type V1AccountListBadgesRequestBodyFilter = ClosedEnum<
35
+ typeof V1AccountListBadgesRequestBodyFilter
36
+ >;
35
37
 
36
38
  export type V1AccountListBadgesRequestBody = {
37
- filter?: Array<Filter> | null | undefined;
39
+ filter?: Array<V1AccountListBadgesRequestBodyFilter> | null | undefined;
38
40
  id?: IDStruct | undefined;
39
41
  order?: V1BadgeOrder | null | undefined;
40
42
  page?: number | undefined;
@@ -43,22 +45,27 @@ export type V1AccountListBadgesRequestBody = {
43
45
  };
44
46
 
45
47
  /** @internal */
46
- export const Filter$inboundSchema: z.ZodNativeEnum<typeof Filter> = z
47
- .nativeEnum(Filter);
48
+ export const V1AccountListBadgesRequestBodyFilter$inboundSchema:
49
+ z.ZodNativeEnum<typeof V1AccountListBadgesRequestBodyFilter> = z.nativeEnum(
50
+ V1AccountListBadgesRequestBodyFilter,
51
+ );
48
52
 
49
53
  /** @internal */
50
- export const Filter$outboundSchema: z.ZodNativeEnum<typeof Filter> =
51
- Filter$inboundSchema;
54
+ export const V1AccountListBadgesRequestBodyFilter$outboundSchema:
55
+ z.ZodNativeEnum<typeof V1AccountListBadgesRequestBodyFilter> =
56
+ V1AccountListBadgesRequestBodyFilter$inboundSchema;
52
57
 
53
58
  /**
54
59
  * @internal
55
60
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
61
  */
57
- export namespace Filter$ {
58
- /** @deprecated use `Filter$inboundSchema` instead. */
59
- export const inboundSchema = Filter$inboundSchema;
60
- /** @deprecated use `Filter$outboundSchema` instead. */
61
- export const outboundSchema = Filter$outboundSchema;
62
+ export namespace V1AccountListBadgesRequestBodyFilter$ {
63
+ /** @deprecated use `V1AccountListBadgesRequestBodyFilter$inboundSchema` instead. */
64
+ export const inboundSchema =
65
+ V1AccountListBadgesRequestBodyFilter$inboundSchema;
66
+ /** @deprecated use `V1AccountListBadgesRequestBodyFilter$outboundSchema` instead. */
67
+ export const outboundSchema =
68
+ V1AccountListBadgesRequestBodyFilter$outboundSchema;
62
69
  }
63
70
 
64
71
  /** @internal */
@@ -67,7 +74,9 @@ export const V1AccountListBadgesRequestBody$inboundSchema: z.ZodType<
67
74
  z.ZodTypeDef,
68
75
  unknown
69
76
  > = z.object({
70
- filter: z.nullable(z.array(Filter$inboundSchema)).optional(),
77
+ filter: z.nullable(
78
+ z.array(V1AccountListBadgesRequestBodyFilter$inboundSchema),
79
+ ).optional(),
71
80
  id: IDStruct$inboundSchema.optional(),
72
81
  order: z.nullable(V1BadgeOrder$inboundSchema).optional(),
73
82
  page: z.number().int().default(1),
@@ -91,7 +100,9 @@ export const V1AccountListBadgesRequestBody$outboundSchema: z.ZodType<
91
100
  z.ZodTypeDef,
92
101
  V1AccountListBadgesRequestBody
93
102
  > = z.object({
94
- filter: z.nullable(z.array(Filter$outboundSchema)).optional(),
103
+ filter: z.nullable(
104
+ z.array(V1AccountListBadgesRequestBodyFilter$outboundSchema),
105
+ ).optional(),
95
106
  id: IDStruct$outboundSchema.optional(),
96
107
  order: z.nullable(V1BadgeOrder$outboundSchema).optional(),
97
108
  page: z.number().int().default(1),