@steamsets/client-ts 0.26.8 → 0.27.0

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 (94) hide show
  1. package/README.md +5 -3
  2. package/docs/sdks/badges/README.md +6 -6
  3. package/funcs/badgesListPrices.d.ts +13 -2
  4. package/funcs/badgesListPrices.d.ts.map +1 -1
  5. package/funcs/badgesListPrices.js +21 -20
  6. package/funcs/badgesListPrices.js.map +1 -1
  7. package/jsr.json +1 -1
  8. package/lib/config.d.ts +3 -3
  9. package/lib/config.js +3 -3
  10. package/models/components/badge.d.ts +8 -0
  11. package/models/components/badge.d.ts.map +1 -1
  12. package/models/components/badge.js +8 -0
  13. package/models/components/badge.js.map +1 -1
  14. package/models/components/errormodel.d.ts +63 -0
  15. package/models/components/errormodel.d.ts.map +1 -0
  16. package/models/components/errormodel.js +81 -0
  17. package/models/components/errormodel.js.map +1 -0
  18. package/models/components/index.d.ts +7 -2
  19. package/models/components/index.d.ts.map +1 -1
  20. package/models/components/index.js +7 -2
  21. package/models/components/index.js.map +1 -1
  22. package/models/components/v1accountgetinforesponsebody.d.ts +0 -9
  23. package/models/components/v1accountgetinforesponsebody.d.ts.map +1 -1
  24. package/models/components/v1accountgetinforesponsebody.js +0 -3
  25. package/models/components/v1accountgetinforesponsebody.js.map +1 -1
  26. package/models/components/v1badgeapp.d.ts +37 -0
  27. package/models/components/v1badgeapp.d.ts.map +1 -0
  28. package/models/components/v1badgeapp.js +67 -0
  29. package/models/components/v1badgeapp.js.map +1 -0
  30. package/models/components/v1badgelevel.d.ts +33 -0
  31. package/models/components/v1badgelevel.d.ts.map +1 -0
  32. package/models/components/v1badgelevel.js +63 -0
  33. package/models/components/v1badgelevel.js.map +1 -0
  34. package/models/components/v1badgelistbadgepricesrequestbody.d.ts +2 -10
  35. package/models/components/v1badgelistbadgepricesrequestbody.d.ts.map +1 -1
  36. package/models/components/v1badgelistbadgepricesrequestbody.js +2 -10
  37. package/models/components/v1badgelistbadgepricesrequestbody.js.map +1 -1
  38. package/models/components/v1badgelistbadgepricesresponsebody.d.ts +24 -0
  39. package/models/components/v1badgelistbadgepricesresponsebody.d.ts.map +1 -1
  40. package/models/components/v1badgelistbadgepricesresponsebody.js +11 -0
  41. package/models/components/v1badgelistbadgepricesresponsebody.js.map +1 -1
  42. package/models/components/v1badgeset.d.ts +61 -0
  43. package/models/components/v1badgeset.d.ts.map +1 -0
  44. package/models/components/v1badgeset.js +87 -0
  45. package/models/components/v1badgeset.js.map +1 -0
  46. package/models/components/v1badgesetcount.d.ts +31 -0
  47. package/models/components/v1badgesetcount.d.ts.map +1 -0
  48. package/models/components/v1badgesetcount.js +61 -0
  49. package/models/components/v1badgesetcount.js.map +1 -0
  50. package/models/components/v1badgesetcounts.d.ts +34 -0
  51. package/models/components/v1badgesetcounts.d.ts.map +1 -0
  52. package/models/components/v1badgesetcounts.js +64 -0
  53. package/models/components/v1badgesetcounts.js.map +1 -0
  54. package/models/components/v1badgetypecount.d.ts +33 -0
  55. package/models/components/v1badgetypecount.d.ts.map +1 -0
  56. package/models/components/v1badgetypecount.js +63 -0
  57. package/models/components/v1badgetypecount.js.map +1 -0
  58. package/models/operations/badgelistbadgeprices.d.ts +5 -0
  59. package/models/operations/badgelistbadgeprices.d.ts.map +1 -1
  60. package/models/operations/badgelistbadgeprices.js +4 -0
  61. package/models/operations/badgelistbadgeprices.js.map +1 -1
  62. package/package.json +1 -1
  63. package/sdk/badges.d.ts +11 -1
  64. package/sdk/badges.d.ts.map +1 -1
  65. package/sdk/badges.js +9 -1
  66. package/sdk/badges.js.map +1 -1
  67. package/src/funcs/badgesListPrices.ts +23 -32
  68. package/src/lib/config.ts +3 -3
  69. package/src/models/components/badge.ts +16 -0
  70. package/src/models/components/errormodel.ts +122 -0
  71. package/src/models/components/index.ts +7 -2
  72. package/src/models/components/v1accountgetinforesponsebody.ts +0 -3
  73. package/src/models/components/v1badgeapp.ts +78 -0
  74. package/src/models/components/v1badgelevel.ts +70 -0
  75. package/src/models/components/v1badgelistbadgepricesrequestbody.ts +4 -28
  76. package/src/models/components/v1badgelistbadgepricesresponsebody.ts +43 -0
  77. package/src/models/components/v1badgeset.ts +126 -0
  78. package/src/models/components/v1badgesetcount.ts +68 -0
  79. package/src/models/components/v1badgesetcounts.ts +80 -0
  80. package/src/models/components/v1badgetypecount.ts +74 -0
  81. package/src/models/operations/badgelistbadgeprices.ts +9 -0
  82. package/src/sdk/badges.ts +13 -2
  83. package/src/types/constdatetime.ts +1 -1
  84. package/types/constdatetime.js +1 -1
  85. package/models/components/v1badgelistbadgepricefilters.d.ts +0 -35
  86. package/models/components/v1badgelistbadgepricefilters.d.ts.map +0 -1
  87. package/models/components/v1badgelistbadgepricefilters.js +0 -65
  88. package/models/components/v1badgelistbadgepricefilters.js.map +0 -1
  89. package/models/components/v1badgelistbadgepriceorder.d.ts +0 -57
  90. package/models/components/v1badgelistbadgepriceorder.d.ts.map +0 -1
  91. package/models/components/v1badgelistbadgepriceorder.js +0 -80
  92. package/models/components/v1badgelistbadgepriceorder.js.map +0 -1
  93. package/src/models/components/v1badgelistbadgepricefilters.ts +0 -80
  94. package/src/models/components/v1badgelistbadgepriceorder.ts +0 -102
@@ -3,10 +3,8 @@
3
3
  */
4
4
 
5
5
  import { SteamSetsCore } from "../core.js";
6
- import { encodeJSON } from "../lib/encodings.js";
7
6
  import * as M from "../lib/matchers.js";
8
7
  import { compactMap } from "../lib/primitives.js";
9
- import { safeParse } from "../lib/schemas.js";
10
8
  import { RequestOptions } from "../lib/sdks.js";
11
9
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
10
  import { pathToFunc } from "../lib/url.js";
@@ -18,7 +16,6 @@ import {
18
16
  RequestTimeoutError,
19
17
  UnexpectedClientError,
20
18
  } from "../models/errors/httpclienterrors.js";
21
- import * as errors from "../models/errors/index.js";
22
19
  import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
20
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
21
  import { SteamSetsError } from "../models/errors/steamsetserror.js";
@@ -26,14 +23,24 @@ import * as operations from "../models/operations/index.js";
26
23
  import { APICall, APIPromise } from "../types/async.js";
27
24
  import { Result } from "../types/fp.js";
28
25
 
26
+ export enum ListPricesAcceptEnum {
27
+ applicationJson = "application/json",
28
+ applicationProblemPlusJson = "application/problem+json",
29
+ }
30
+
31
+ /**
32
+ * List badge prices
33
+ *
34
+ * @remarks
35
+ * Get a list of all badge pricing information
36
+ */
29
37
  export function badgesListPrices(
30
38
  client: SteamSetsCore,
31
- request: components.V1BadgeListBadgePricesRequestBody,
32
- options?: RequestOptions,
39
+ _request: components.V1BadgeListBadgePricesRequestBody,
40
+ options?: RequestOptions & { acceptHeaderOverride?: ListPricesAcceptEnum },
33
41
  ): APIPromise<
34
42
  Result<
35
43
  operations.BadgeListBadgePricesResponse,
36
- | errors.ErrorModel
37
44
  | SteamSetsError
38
45
  | ResponseValidationError
39
46
  | ConnectionError
@@ -46,20 +53,19 @@ export function badgesListPrices(
46
53
  > {
47
54
  return new APIPromise($do(
48
55
  client,
49
- request,
56
+ _request,
50
57
  options,
51
58
  ));
52
59
  }
53
60
 
54
61
  async function $do(
55
62
  client: SteamSetsCore,
56
- request: components.V1BadgeListBadgePricesRequestBody,
57
- options?: RequestOptions,
63
+ _request: components.V1BadgeListBadgePricesRequestBody,
64
+ options?: RequestOptions & { acceptHeaderOverride?: ListPricesAcceptEnum },
58
65
  ): Promise<
59
66
  [
60
67
  Result<
61
68
  operations.BadgeListBadgePricesResponse,
62
- | errors.ErrorModel
63
69
  | SteamSetsError
64
70
  | ResponseValidationError
65
71
  | ConnectionError
@@ -72,23 +78,12 @@ async function $do(
72
78
  APICall,
73
79
  ]
74
80
  > {
75
- const parsed = safeParse(
76
- request,
77
- (value) =>
78
- components.V1BadgeListBadgePricesRequestBody$outboundSchema.parse(value),
79
- "Input validation failed",
80
- );
81
- if (!parsed.ok) {
82
- return [parsed, { status: "invalid" }];
83
- }
84
- const payload = parsed.value;
85
- const body = encodeJSON("body", payload, { explode: true });
86
-
87
81
  const path = pathToFunc("/v1/badge.listBadgePrices")();
88
82
 
89
83
  const headers = new Headers(compactMap({
90
84
  "Content-Type": "application/json",
91
- Accept: "application/json",
85
+ Accept: options?.acceptHeaderOverride
86
+ || "application/json;q=1, application/problem+json;q=0",
92
87
  }));
93
88
 
94
89
  const secConfig = await extractSecurity(client._options.token);
@@ -126,7 +121,6 @@ async function $do(
126
121
  baseURL: options?.serverURL,
127
122
  path: path,
128
123
  headers: headers,
129
- body: body,
130
124
  uaHeader: "x-speakeasy-user-agent",
131
125
  userAgent: client._options.userAgent,
132
126
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
@@ -138,7 +132,7 @@ async function $do(
138
132
 
139
133
  const doResult = await client._do(req, {
140
134
  context,
141
- errorCodes: ["403", "404", "422", "4XX", "500", "5XX"],
135
+ errorCodes: ["4XX", "5XX"],
142
136
  retryConfig: context.retryConfig,
143
137
  retryCodes: context.retryCodes,
144
138
  });
@@ -153,7 +147,6 @@ async function $do(
153
147
 
154
148
  const [result] = await M.match<
155
149
  operations.BadgeListBadgePricesResponse,
156
- | errors.ErrorModel
157
150
  | SteamSetsError
158
151
  | ResponseValidationError
159
152
  | ConnectionError
@@ -166,14 +159,12 @@ async function $do(
166
159
  M.json(200, operations.BadgeListBadgePricesResponse$inboundSchema, {
167
160
  key: "V1BadgeListBadgePricesResponseBody",
168
161
  }),
169
- M.jsonErr([403, 404, 422], errors.ErrorModel$inboundSchema, {
170
- ctype: "application/problem+json",
171
- }),
172
- M.jsonErr(500, errors.ErrorModel$inboundSchema, {
173
- ctype: "application/problem+json",
174
- }),
175
162
  M.fail("4XX"),
176
163
  M.fail("5XX"),
164
+ M.json("default", operations.BadgeListBadgePricesResponse$inboundSchema, {
165
+ ctype: "application/problem+json",
166
+ key: "ErrorModel",
167
+ }),
177
168
  )(response, req, { extraFields: responseFields });
178
169
  if (!result.ok) {
179
170
  return [result, { status: "complete", request: req, response }];
package/src/lib/config.ts CHANGED
@@ -59,8 +59,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
59
59
  export const SDK_METADATA = {
60
60
  language: "typescript",
61
61
  openapiDocVersion: "1.0.0",
62
- sdkVersion: "0.26.8",
63
- genVersion: "2.629.1",
62
+ sdkVersion: "0.27.0",
63
+ genVersion: "2.632.2",
64
64
  userAgent:
65
- "speakeasy-sdk/typescript 0.26.8 2.629.1 1.0.0 @steamsets/client-ts",
65
+ "speakeasy-sdk/typescript 0.27.0 2.632.2 1.0.0 @steamsets/client-ts",
66
66
  } as const;
@@ -20,10 +20,12 @@ export type Badge = {
20
20
  appImage: string;
21
21
  appName: string;
22
22
  bookmarks: number;
23
+ cardCount: number;
23
24
  colors: Array<string> | null;
24
25
  designs: Array<string> | null;
25
26
  firstCompletion: number;
26
27
  highestLevel: number;
28
+ highestPrice: number;
27
29
  id: string;
28
30
  image: string;
29
31
  isEvent: boolean;
@@ -31,7 +33,9 @@ export type Badge = {
31
33
  isSale: boolean;
32
34
  lastCompletion: number;
33
35
  level: number;
36
+ lowestPrice: number;
34
37
  name: string;
38
+ price: number;
35
39
  scarcity: number;
36
40
  steamId: number;
37
41
  xp: number;
@@ -45,10 +49,12 @@ export const Badge$inboundSchema: z.ZodType<Badge, z.ZodTypeDef, unknown> = z
45
49
  appImage: z.string(),
46
50
  appName: z.string(),
47
51
  bookmarks: z.number().int(),
52
+ cardCount: z.number().int(),
48
53
  colors: z.nullable(z.array(z.string())),
49
54
  designs: z.nullable(z.array(z.string())),
50
55
  firstCompletion: z.number().int(),
51
56
  highestLevel: z.number().int(),
57
+ highestPrice: z.number(),
52
58
  id: z.string(),
53
59
  image: z.string(),
54
60
  isEvent: z.boolean(),
@@ -56,7 +62,9 @@ export const Badge$inboundSchema: z.ZodType<Badge, z.ZodTypeDef, unknown> = z
56
62
  isSale: z.boolean(),
57
63
  lastCompletion: z.number().int(),
58
64
  level: z.number().int(),
65
+ lowestPrice: z.number(),
59
66
  name: z.string(),
67
+ price: z.number(),
60
68
  scarcity: z.number().int(),
61
69
  steamId: z.number().int(),
62
70
  xp: z.number(),
@@ -73,10 +81,12 @@ export type Badge$Outbound = {
73
81
  appImage: string;
74
82
  appName: string;
75
83
  bookmarks: number;
84
+ cardCount: number;
76
85
  colors: Array<string> | null;
77
86
  designs: Array<string> | null;
78
87
  firstCompletion: number;
79
88
  highestLevel: number;
89
+ highestPrice: number;
80
90
  id: string;
81
91
  image: string;
82
92
  isEvent: boolean;
@@ -84,7 +94,9 @@ export type Badge$Outbound = {
84
94
  isSale: boolean;
85
95
  lastCompletion: number;
86
96
  level: number;
97
+ lowestPrice: number;
87
98
  name: string;
99
+ price: number;
88
100
  scarcity: number;
89
101
  steamId: number;
90
102
  xp: number;
@@ -101,10 +113,12 @@ export const Badge$outboundSchema: z.ZodType<
101
113
  appImage: z.string(),
102
114
  appName: z.string(),
103
115
  bookmarks: z.number().int(),
116
+ cardCount: z.number().int(),
104
117
  colors: z.nullable(z.array(z.string())),
105
118
  designs: z.nullable(z.array(z.string())),
106
119
  firstCompletion: z.number().int(),
107
120
  highestLevel: z.number().int(),
121
+ highestPrice: z.number(),
108
122
  id: z.string(),
109
123
  image: z.string(),
110
124
  isEvent: z.boolean(),
@@ -112,7 +126,9 @@ export const Badge$outboundSchema: z.ZodType<
112
126
  isSale: z.boolean(),
113
127
  lastCompletion: z.number().int(),
114
128
  level: z.number().int(),
129
+ lowestPrice: z.number(),
115
130
  name: z.string(),
131
+ price: z.number(),
116
132
  scarcity: z.number().int(),
117
133
  steamId: z.number().int(),
118
134
  xp: z.number(),
@@ -0,0 +1,122 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ ErrorDetail,
12
+ ErrorDetail$inboundSchema,
13
+ ErrorDetail$Outbound,
14
+ ErrorDetail$outboundSchema,
15
+ } from "./errordetail.js";
16
+
17
+ export type ErrorModel = {
18
+ /**
19
+ * A URL to the JSON Schema for this object.
20
+ */
21
+ dollarSchema?: string | undefined;
22
+ /**
23
+ * A human-readable explanation specific to this occurrence of the problem.
24
+ */
25
+ detail?: string | undefined;
26
+ /**
27
+ * Optional list of individual error details
28
+ */
29
+ errors?: Array<ErrorDetail> | null | undefined;
30
+ /**
31
+ * A URI reference that identifies the specific occurrence of the problem.
32
+ */
33
+ instance?: string | undefined;
34
+ /**
35
+ * HTTP status code
36
+ */
37
+ status?: number | undefined;
38
+ /**
39
+ * A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
40
+ */
41
+ title?: string | undefined;
42
+ /**
43
+ * A URI reference to human-readable documentation for the error.
44
+ */
45
+ type?: string | undefined;
46
+ };
47
+
48
+ /** @internal */
49
+ export const ErrorModel$inboundSchema: z.ZodType<
50
+ ErrorModel,
51
+ z.ZodTypeDef,
52
+ unknown
53
+ > = z.object({
54
+ $schema: z.string().optional(),
55
+ detail: z.string().optional(),
56
+ errors: z.nullable(z.array(ErrorDetail$inboundSchema)).optional(),
57
+ instance: z.string().optional(),
58
+ status: z.number().int().optional(),
59
+ title: z.string().optional(),
60
+ type: z.string().default("about:blank"),
61
+ }).transform((v) => {
62
+ return remap$(v, {
63
+ "$schema": "dollarSchema",
64
+ });
65
+ });
66
+
67
+ /** @internal */
68
+ export type ErrorModel$Outbound = {
69
+ $schema?: string | undefined;
70
+ detail?: string | undefined;
71
+ errors?: Array<ErrorDetail$Outbound> | null | undefined;
72
+ instance?: string | undefined;
73
+ status?: number | undefined;
74
+ title?: string | undefined;
75
+ type: string;
76
+ };
77
+
78
+ /** @internal */
79
+ export const ErrorModel$outboundSchema: z.ZodType<
80
+ ErrorModel$Outbound,
81
+ z.ZodTypeDef,
82
+ ErrorModel
83
+ > = z.object({
84
+ dollarSchema: z.string().optional(),
85
+ detail: z.string().optional(),
86
+ errors: z.nullable(z.array(ErrorDetail$outboundSchema)).optional(),
87
+ instance: z.string().optional(),
88
+ status: z.number().int().optional(),
89
+ title: z.string().optional(),
90
+ type: z.string().default("about:blank"),
91
+ }).transform((v) => {
92
+ return remap$(v, {
93
+ dollarSchema: "$schema",
94
+ });
95
+ });
96
+
97
+ /**
98
+ * @internal
99
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
100
+ */
101
+ export namespace ErrorModel$ {
102
+ /** @deprecated use `ErrorModel$inboundSchema` instead. */
103
+ export const inboundSchema = ErrorModel$inboundSchema;
104
+ /** @deprecated use `ErrorModel$outboundSchema` instead. */
105
+ export const outboundSchema = ErrorModel$outboundSchema;
106
+ /** @deprecated use `ErrorModel$Outbound` instead. */
107
+ export type Outbound = ErrorModel$Outbound;
108
+ }
109
+
110
+ export function errorModelToJSON(errorModel: ErrorModel): string {
111
+ return JSON.stringify(ErrorModel$outboundSchema.parse(errorModel));
112
+ }
113
+
114
+ export function errorModelFromJSON(
115
+ jsonString: string,
116
+ ): SafeParseResult<ErrorModel, SDKValidationError> {
117
+ return safeParse(
118
+ jsonString,
119
+ (x) => ErrorModel$inboundSchema.parse(JSON.parse(x)),
120
+ `Failed to parse 'ErrorModel' from JSON`,
121
+ );
122
+ }
@@ -19,6 +19,7 @@ export * from "./currentcolortag.js";
19
19
  export * from "./designtag.js";
20
20
  export * from "./developerapp.js";
21
21
  export * from "./errordetail.js";
22
+ export * from "./errormodel.js";
22
23
  export * from "./historyvalue.js";
23
24
  export * from "./httpmetadata.js";
24
25
  export * from "./idstruct.js";
@@ -117,21 +118,25 @@ export * from "./v1applistbadgesrequestbody.js";
117
118
  export * from "./v1applistbadgesresponsebody.js";
118
119
  export * from "./v1apporder.js";
119
120
  export * from "./v1badgeaccount.js";
121
+ export * from "./v1badgeapp.js";
122
+ export * from "./v1badgelevel.js";
120
123
  export * from "./v1badgelistaccountsrequestbody.js";
121
124
  export * from "./v1badgelistaccountsresponsebody.js";
122
- export * from "./v1badgelistbadgepricefilters.js";
123
- export * from "./v1badgelistbadgepriceorder.js";
124
125
  export * from "./v1badgelistbadgepricesrequestbody.js";
125
126
  export * from "./v1badgelistbadgepricesresponsebody.js";
126
127
  export * from "./v1badgelisttagsresponsebody.js";
127
128
  export * from "./v1badgelookup.js";
128
129
  export * from "./v1badgeorder.js";
129
130
  export * from "./v1badgesearchbadgesresponsebody.js";
131
+ export * from "./v1badgeset.js";
132
+ export * from "./v1badgesetcount.js";
133
+ export * from "./v1badgesetcounts.js";
130
134
  export * from "./v1badgesuggestsearchbody.js";
131
135
  export * from "./v1badgesuggestsearchrequestbody.js";
132
136
  export * from "./v1badgesuggesttagsrequestbody.js";
133
137
  export * from "./v1badgetagbadgerequestbody.js";
134
138
  export * from "./v1badgetagbadgeresponsebody.js";
139
+ export * from "./v1badgetypecount.js";
135
140
  export * from "./v1groupleaderboardgroup.js";
136
141
  export * from "./v1leaderboardappinfo.js";
137
142
  export * from "./v1leaderboardbadge.js";
@@ -87,10 +87,7 @@ export const LastQueueStatus = {
87
87
  Undefined: "undefined",
88
88
  Pending: "pending",
89
89
  InProgress: "in_progress",
90
- Retrying: "retrying",
91
- Failed: "failed",
92
90
  Completed: "completed",
93
- Cooldown: "cooldown",
94
91
  } as const;
95
92
  export type LastQueueStatus = ClosedEnum<typeof LastQueueStatus>;
96
93
 
@@ -0,0 +1,78 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type V1BadgeApp = {
11
+ bgAvg: number;
12
+ boosterPrice: number | null;
13
+ emoteAvg: number;
14
+ image: string;
15
+ name: string;
16
+ };
17
+
18
+ /** @internal */
19
+ export const V1BadgeApp$inboundSchema: z.ZodType<
20
+ V1BadgeApp,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ bgAvg: z.number().int(),
25
+ boosterPrice: z.nullable(z.number().int()),
26
+ emoteAvg: z.number().int(),
27
+ image: z.string(),
28
+ name: z.string(),
29
+ });
30
+
31
+ /** @internal */
32
+ export type V1BadgeApp$Outbound = {
33
+ bgAvg: number;
34
+ boosterPrice: number | null;
35
+ emoteAvg: number;
36
+ image: string;
37
+ name: string;
38
+ };
39
+
40
+ /** @internal */
41
+ export const V1BadgeApp$outboundSchema: z.ZodType<
42
+ V1BadgeApp$Outbound,
43
+ z.ZodTypeDef,
44
+ V1BadgeApp
45
+ > = z.object({
46
+ bgAvg: z.number().int(),
47
+ boosterPrice: z.nullable(z.number().int()),
48
+ emoteAvg: z.number().int(),
49
+ image: z.string(),
50
+ name: z.string(),
51
+ });
52
+
53
+ /**
54
+ * @internal
55
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
+ */
57
+ export namespace V1BadgeApp$ {
58
+ /** @deprecated use `V1BadgeApp$inboundSchema` instead. */
59
+ export const inboundSchema = V1BadgeApp$inboundSchema;
60
+ /** @deprecated use `V1BadgeApp$outboundSchema` instead. */
61
+ export const outboundSchema = V1BadgeApp$outboundSchema;
62
+ /** @deprecated use `V1BadgeApp$Outbound` instead. */
63
+ export type Outbound = V1BadgeApp$Outbound;
64
+ }
65
+
66
+ export function v1BadgeAppToJSON(v1BadgeApp: V1BadgeApp): string {
67
+ return JSON.stringify(V1BadgeApp$outboundSchema.parse(v1BadgeApp));
68
+ }
69
+
70
+ export function v1BadgeAppFromJSON(
71
+ jsonString: string,
72
+ ): SafeParseResult<V1BadgeApp, SDKValidationError> {
73
+ return safeParse(
74
+ jsonString,
75
+ (x) => V1BadgeApp$inboundSchema.parse(JSON.parse(x)),
76
+ `Failed to parse 'V1BadgeApp' from JSON`,
77
+ );
78
+ }
@@ -0,0 +1,70 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type V1BadgeLevel = {
11
+ image: string;
12
+ name: string;
13
+ scarcity: number;
14
+ };
15
+
16
+ /** @internal */
17
+ export const V1BadgeLevel$inboundSchema: z.ZodType<
18
+ V1BadgeLevel,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ image: z.string(),
23
+ name: z.string(),
24
+ scarcity: z.number().int(),
25
+ });
26
+
27
+ /** @internal */
28
+ export type V1BadgeLevel$Outbound = {
29
+ image: string;
30
+ name: string;
31
+ scarcity: number;
32
+ };
33
+
34
+ /** @internal */
35
+ export const V1BadgeLevel$outboundSchema: z.ZodType<
36
+ V1BadgeLevel$Outbound,
37
+ z.ZodTypeDef,
38
+ V1BadgeLevel
39
+ > = z.object({
40
+ image: z.string(),
41
+ name: z.string(),
42
+ scarcity: z.number().int(),
43
+ });
44
+
45
+ /**
46
+ * @internal
47
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
48
+ */
49
+ export namespace V1BadgeLevel$ {
50
+ /** @deprecated use `V1BadgeLevel$inboundSchema` instead. */
51
+ export const inboundSchema = V1BadgeLevel$inboundSchema;
52
+ /** @deprecated use `V1BadgeLevel$outboundSchema` instead. */
53
+ export const outboundSchema = V1BadgeLevel$outboundSchema;
54
+ /** @deprecated use `V1BadgeLevel$Outbound` instead. */
55
+ export type Outbound = V1BadgeLevel$Outbound;
56
+ }
57
+
58
+ export function v1BadgeLevelToJSON(v1BadgeLevel: V1BadgeLevel): string {
59
+ return JSON.stringify(V1BadgeLevel$outboundSchema.parse(v1BadgeLevel));
60
+ }
61
+
62
+ export function v1BadgeLevelFromJSON(
63
+ jsonString: string,
64
+ ): SafeParseResult<V1BadgeLevel, SDKValidationError> {
65
+ return safeParse(
66
+ jsonString,
67
+ (x) => V1BadgeLevel$inboundSchema.parse(JSON.parse(x)),
68
+ `Failed to parse 'V1BadgeLevel' from JSON`,
69
+ );
70
+ }
@@ -6,49 +6,25 @@ import * as z from "zod";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
- import {
10
- V1BadgeListBadgePriceFilters,
11
- V1BadgeListBadgePriceFilters$inboundSchema,
12
- V1BadgeListBadgePriceFilters$Outbound,
13
- V1BadgeListBadgePriceFilters$outboundSchema,
14
- } from "./v1badgelistbadgepricefilters.js";
15
- import {
16
- V1BadgeListBadgePriceOrder,
17
- V1BadgeListBadgePriceOrder$inboundSchema,
18
- V1BadgeListBadgePriceOrder$Outbound,
19
- V1BadgeListBadgePriceOrder$outboundSchema,
20
- } from "./v1badgelistbadgepriceorder.js";
21
9
 
22
- export type V1BadgeListBadgePricesRequestBody = {
23
- filters?: V1BadgeListBadgePriceFilters | null | undefined;
24
- order?: V1BadgeListBadgePriceOrder | null | undefined;
25
- };
10
+ export type V1BadgeListBadgePricesRequestBody = {};
26
11
 
27
12
  /** @internal */
28
13
  export const V1BadgeListBadgePricesRequestBody$inboundSchema: z.ZodType<
29
14
  V1BadgeListBadgePricesRequestBody,
30
15
  z.ZodTypeDef,
31
16
  unknown
32
- > = z.object({
33
- filters: z.nullable(V1BadgeListBadgePriceFilters$inboundSchema).optional(),
34
- order: z.nullable(V1BadgeListBadgePriceOrder$inboundSchema).optional(),
35
- });
17
+ > = z.object({});
36
18
 
37
19
  /** @internal */
38
- export type V1BadgeListBadgePricesRequestBody$Outbound = {
39
- filters?: V1BadgeListBadgePriceFilters$Outbound | null | undefined;
40
- order?: V1BadgeListBadgePriceOrder$Outbound | null | undefined;
41
- };
20
+ export type V1BadgeListBadgePricesRequestBody$Outbound = {};
42
21
 
43
22
  /** @internal */
44
23
  export const V1BadgeListBadgePricesRequestBody$outboundSchema: z.ZodType<
45
24
  V1BadgeListBadgePricesRequestBody$Outbound,
46
25
  z.ZodTypeDef,
47
26
  V1BadgeListBadgePricesRequestBody
48
- > = z.object({
49
- filters: z.nullable(V1BadgeListBadgePriceFilters$outboundSchema).optional(),
50
- order: z.nullable(V1BadgeListBadgePriceOrder$outboundSchema).optional(),
51
- });
27
+ > = z.object({});
52
28
 
53
29
  /**
54
30
  * @internal
@@ -7,12 +7,43 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ V1BadgeApp,
12
+ V1BadgeApp$inboundSchema,
13
+ V1BadgeApp$Outbound,
14
+ V1BadgeApp$outboundSchema,
15
+ } from "./v1badgeapp.js";
16
+ import {
17
+ V1BadgeSet,
18
+ V1BadgeSet$inboundSchema,
19
+ V1BadgeSet$Outbound,
20
+ V1BadgeSet$outboundSchema,
21
+ } from "./v1badgeset.js";
22
+ import {
23
+ V1BadgeSetCounts,
24
+ V1BadgeSetCounts$inboundSchema,
25
+ V1BadgeSetCounts$Outbound,
26
+ V1BadgeSetCounts$outboundSchema,
27
+ } from "./v1badgesetcounts.js";
10
28
 
11
29
  export type V1BadgeListBadgePricesResponseBody = {
12
30
  /**
13
31
  * A URL to the JSON Schema for this object.
14
32
  */
15
33
  dollarSchema?: string | undefined;
34
+ /**
35
+ * App information indexed by app ID
36
+ */
37
+ apps: { [k: string]: V1BadgeApp };
38
+ setCounts: V1BadgeSetCounts;
39
+ /**
40
+ * Badge sets with pricing information
41
+ */
42
+ sets: Array<V1BadgeSet> | null;
43
+ /**
44
+ * Total number of badge sets
45
+ */
46
+ total: number;
16
47
  };
17
48
 
18
49
  /** @internal */
@@ -22,6 +53,10 @@ export const V1BadgeListBadgePricesResponseBody$inboundSchema: z.ZodType<
22
53
  unknown
23
54
  > = z.object({
24
55
  $schema: z.string().optional(),
56
+ apps: z.record(V1BadgeApp$inboundSchema),
57
+ setCounts: V1BadgeSetCounts$inboundSchema,
58
+ sets: z.nullable(z.array(V1BadgeSet$inboundSchema)),
59
+ total: z.number().int(),
25
60
  }).transform((v) => {
26
61
  return remap$(v, {
27
62
  "$schema": "dollarSchema",
@@ -31,6 +66,10 @@ export const V1BadgeListBadgePricesResponseBody$inboundSchema: z.ZodType<
31
66
  /** @internal */
32
67
  export type V1BadgeListBadgePricesResponseBody$Outbound = {
33
68
  $schema?: string | undefined;
69
+ apps: { [k: string]: V1BadgeApp$Outbound };
70
+ setCounts: V1BadgeSetCounts$Outbound;
71
+ sets: Array<V1BadgeSet$Outbound> | null;
72
+ total: number;
34
73
  };
35
74
 
36
75
  /** @internal */
@@ -40,6 +79,10 @@ export const V1BadgeListBadgePricesResponseBody$outboundSchema: z.ZodType<
40
79
  V1BadgeListBadgePricesResponseBody
41
80
  > = z.object({
42
81
  dollarSchema: z.string().optional(),
82
+ apps: z.record(V1BadgeApp$outboundSchema),
83
+ setCounts: V1BadgeSetCounts$outboundSchema,
84
+ sets: z.nullable(z.array(V1BadgeSet$outboundSchema)),
85
+ total: z.number().int(),
43
86
  }).transform((v) => {
44
87
  return remap$(v, {
45
88
  dollarSchema: "$schema",