@steamsets/client-ts 0.32.2 → 0.32.4

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 (72) hide show
  1. package/README.md +4 -0
  2. package/funcs/accountAccountFindFriendPath.d.ts +16 -0
  3. package/funcs/accountAccountFindFriendPath.d.ts.map +1 -0
  4. package/funcs/accountAccountFindFriendPath.js +133 -0
  5. package/funcs/accountAccountFindFriendPath.js.map +1 -0
  6. package/funcs/accountAccountGetBadgeHeatmap.d.ts +16 -0
  7. package/funcs/accountAccountGetBadgeHeatmap.d.ts.map +1 -0
  8. package/funcs/accountAccountGetBadgeHeatmap.js +133 -0
  9. package/funcs/accountAccountGetBadgeHeatmap.js.map +1 -0
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +3 -3
  12. package/lib/config.js +3 -3
  13. package/lib/config.js.map +1 -1
  14. package/lib/encodings.d.ts +1 -0
  15. package/lib/encodings.d.ts.map +1 -1
  16. package/lib/encodings.js +27 -5
  17. package/lib/encodings.js.map +1 -1
  18. package/lib/security.d.ts +1 -1
  19. package/lib/security.d.ts.map +1 -1
  20. package/lib/security.js +19 -8
  21. package/lib/security.js.map +1 -1
  22. package/models/components/index.d.ts +2 -0
  23. package/models/components/index.d.ts.map +1 -1
  24. package/models/components/index.js +2 -0
  25. package/models/components/index.js.map +1 -1
  26. package/models/components/leaderboardaccount.d.ts +4 -4
  27. package/models/components/leaderboardaccount.d.ts.map +1 -1
  28. package/models/components/leaderboardaccount.js +4 -4
  29. package/models/components/leaderboardaccount.js.map +1 -1
  30. package/models/components/v1accountfindfriendpathrequestbody.d.ts +15 -0
  31. package/models/components/v1accountfindfriendpathrequestbody.d.ts.map +1 -0
  32. package/models/components/v1accountfindfriendpathrequestbody.js +51 -0
  33. package/models/components/v1accountfindfriendpathrequestbody.js.map +1 -0
  34. package/models/components/v1accountfindfriendpathresponsebody.d.ts +26 -0
  35. package/models/components/v1accountfindfriendpathresponsebody.d.ts.map +1 -0
  36. package/models/components/v1accountfindfriendpathresponsebody.js +59 -0
  37. package/models/components/v1accountfindfriendpathresponsebody.js.map +1 -0
  38. package/models/components/v1accountgetinforesponsebody.d.ts +4 -4
  39. package/models/components/v1accountgetinforesponsebody.d.ts.map +1 -1
  40. package/models/components/v1accountgetinforesponsebody.js +4 -4
  41. package/models/components/v1accountgetinforesponsebody.js.map +1 -1
  42. package/models/operations/accountfindfriendpath.d.ts +15 -0
  43. package/models/operations/accountfindfriendpath.d.ts.map +1 -0
  44. package/models/operations/accountfindfriendpath.js +59 -0
  45. package/models/operations/accountfindfriendpath.js.map +1 -0
  46. package/models/operations/accountgetbadgeheatmap.d.ts +17 -0
  47. package/models/operations/accountgetbadgeheatmap.d.ts.map +1 -0
  48. package/models/operations/accountgetbadgeheatmap.js +57 -0
  49. package/models/operations/accountgetbadgeheatmap.js.map +1 -0
  50. package/models/operations/index.d.ts +2 -0
  51. package/models/operations/index.d.ts.map +1 -1
  52. package/models/operations/index.js +2 -0
  53. package/models/operations/index.js.map +1 -1
  54. package/package.json +1 -1
  55. package/sdk/account.d.ts +8 -0
  56. package/sdk/account.d.ts.map +1 -1
  57. package/sdk/account.js +14 -0
  58. package/sdk/account.js.map +1 -1
  59. package/src/funcs/accountAccountFindFriendPath.ts +186 -0
  60. package/src/funcs/accountAccountGetBadgeHeatmap.ts +185 -0
  61. package/src/lib/config.ts +3 -3
  62. package/src/lib/encodings.ts +32 -4
  63. package/src/lib/security.ts +14 -2
  64. package/src/models/components/index.ts +2 -0
  65. package/src/models/components/leaderboardaccount.ts +6 -11
  66. package/src/models/components/v1accountfindfriendpathrequestbody.ts +41 -0
  67. package/src/models/components/v1accountfindfriendpathresponsebody.ts +59 -0
  68. package/src/models/components/v1accountgetinforesponsebody.ts +11 -6
  69. package/src/models/operations/accountfindfriendpath.ts +47 -0
  70. package/src/models/operations/accountgetbadgeheatmap.ts +42 -0
  71. package/src/models/operations/index.ts +2 -0
  72. package/src/sdk/account.ts +30 -0
@@ -30,7 +30,7 @@ import { Role, Role$inboundSchema } from "./role.js";
30
30
  /**
31
31
  * The privacy of the account
32
32
  */
33
- export const LeaderboardAccountPrivacy = {
33
+ export const Privacy = {
34
34
  Public: "public",
35
35
  Private: "private",
36
36
  FriendsOnly: "friends_only",
@@ -38,9 +38,7 @@ export const LeaderboardAccountPrivacy = {
38
38
  /**
39
39
  * The privacy of the account
40
40
  */
41
- export type LeaderboardAccountPrivacy = OpenEnum<
42
- typeof LeaderboardAccountPrivacy
43
- >;
41
+ export type Privacy = OpenEnum<typeof Privacy>;
44
42
 
45
43
  export type LeaderboardAccount = {
46
44
  /**
@@ -158,7 +156,7 @@ export type LeaderboardAccount = {
158
156
  /**
159
157
  * The privacy of the account
160
158
  */
161
- privacy: LeaderboardAccountPrivacy;
159
+ privacy: Privacy;
162
160
  region?: LeaderboardRegion | null | undefined;
163
161
  /**
164
162
  * The roles of the account
@@ -192,11 +190,8 @@ export type LeaderboardAccount = {
192
190
  };
193
191
 
194
192
  /** @internal */
195
- export const LeaderboardAccountPrivacy$inboundSchema: z.ZodType<
196
- LeaderboardAccountPrivacy,
197
- z.ZodTypeDef,
198
- unknown
199
- > = openEnums.inboundSchema(LeaderboardAccountPrivacy);
193
+ export const Privacy$inboundSchema: z.ZodType<Privacy, z.ZodTypeDef, unknown> =
194
+ openEnums.inboundSchema(Privacy);
200
195
 
201
196
  /** @internal */
202
197
  export const LeaderboardAccount$inboundSchema: z.ZodType<
@@ -232,7 +227,7 @@ export const LeaderboardAccount$inboundSchema: z.ZodType<
232
227
  playtime: z.number().int(),
233
228
  pointsGiven: z.number().int(),
234
229
  pointsReceived: z.number().int(),
235
- privacy: LeaderboardAccountPrivacy$inboundSchema,
230
+ privacy: Privacy$inboundSchema,
236
231
  region: z.nullable(LeaderboardRegion$inboundSchema).optional(),
237
232
  roles: z.nullable(z.array(Role$inboundSchema)),
238
233
  state: z.nullable(LeaderboardState$inboundSchema).optional(),
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import {
7
+ AccountSearch,
8
+ AccountSearch$Outbound,
9
+ AccountSearch$outboundSchema,
10
+ } from "./accountsearch.js";
11
+
12
+ export type V1AccountFindFriendPathRequestBody = {
13
+ from: AccountSearch;
14
+ to: AccountSearch;
15
+ };
16
+
17
+ /** @internal */
18
+ export type V1AccountFindFriendPathRequestBody$Outbound = {
19
+ from: AccountSearch$Outbound;
20
+ to: AccountSearch$Outbound;
21
+ };
22
+
23
+ /** @internal */
24
+ export const V1AccountFindFriendPathRequestBody$outboundSchema: z.ZodType<
25
+ V1AccountFindFriendPathRequestBody$Outbound,
26
+ z.ZodTypeDef,
27
+ V1AccountFindFriendPathRequestBody
28
+ > = z.object({
29
+ from: AccountSearch$outboundSchema,
30
+ to: AccountSearch$outboundSchema,
31
+ });
32
+
33
+ export function v1AccountFindFriendPathRequestBodyToJSON(
34
+ v1AccountFindFriendPathRequestBody: V1AccountFindFriendPathRequestBody,
35
+ ): string {
36
+ return JSON.stringify(
37
+ V1AccountFindFriendPathRequestBody$outboundSchema.parse(
38
+ v1AccountFindFriendPathRequestBody,
39
+ ),
40
+ );
41
+ }
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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
+ LeaderboardAccount,
12
+ LeaderboardAccount$inboundSchema,
13
+ } from "./leaderboardaccount.js";
14
+
15
+ export type V1AccountFindFriendPathResponseBody = {
16
+ /**
17
+ * A URL to the JSON Schema for this object.
18
+ */
19
+ dollarSchema?: string | undefined;
20
+ /**
21
+ * Number of hops between accounts
22
+ */
23
+ distance: number;
24
+ /**
25
+ * Whether a path was found
26
+ */
27
+ found: boolean;
28
+ /**
29
+ * Ordered accounts from source to target
30
+ */
31
+ path: Array<LeaderboardAccount | null> | null;
32
+ };
33
+
34
+ /** @internal */
35
+ export const V1AccountFindFriendPathResponseBody$inboundSchema: z.ZodType<
36
+ V1AccountFindFriendPathResponseBody,
37
+ z.ZodTypeDef,
38
+ unknown
39
+ > = z.object({
40
+ $schema: z.string().optional(),
41
+ distance: z.number().int(),
42
+ found: z.boolean(),
43
+ path: z.nullable(z.array(z.nullable(LeaderboardAccount$inboundSchema))),
44
+ }).transform((v) => {
45
+ return remap$(v, {
46
+ "$schema": "dollarSchema",
47
+ });
48
+ });
49
+
50
+ export function v1AccountFindFriendPathResponseBodyFromJSON(
51
+ jsonString: string,
52
+ ): SafeParseResult<V1AccountFindFriendPathResponseBody, SDKValidationError> {
53
+ return safeParse(
54
+ jsonString,
55
+ (x) =>
56
+ V1AccountFindFriendPathResponseBody$inboundSchema.parse(JSON.parse(x)),
57
+ `Failed to parse 'V1AccountFindFriendPathResponseBody' from JSON`,
58
+ );
59
+ }
@@ -70,7 +70,7 @@ export type LastQueueStatus = OpenEnum<typeof LastQueueStatus>;
70
70
  /**
71
71
  * The privacy of the account
72
72
  */
73
- export const Privacy = {
73
+ export const V1AccountGetInfoResponseBodyPrivacy = {
74
74
  Private: "private",
75
75
  Public: "public",
76
76
  FriendsOnly: "friends_only",
@@ -78,7 +78,9 @@ export const Privacy = {
78
78
  /**
79
79
  * The privacy of the account
80
80
  */
81
- export type Privacy = OpenEnum<typeof Privacy>;
81
+ export type V1AccountGetInfoResponseBodyPrivacy = OpenEnum<
82
+ typeof V1AccountGetInfoResponseBodyPrivacy
83
+ >;
82
84
 
83
85
  export type V1AccountGetInfoResponseBody = {
84
86
  /**
@@ -237,7 +239,7 @@ export type V1AccountGetInfoResponseBody = {
237
239
  /**
238
240
  * The privacy of the account
239
241
  */
240
- privacy: Privacy;
242
+ privacy: V1AccountGetInfoResponseBodyPrivacy;
241
243
  region?: LeaderboardRegion | null | undefined;
242
244
  /**
243
245
  * The roles of the account
@@ -304,8 +306,11 @@ export const LastQueueStatus$inboundSchema: z.ZodType<
304
306
  > = openEnums.inboundSchema(LastQueueStatus);
305
307
 
306
308
  /** @internal */
307
- export const Privacy$inboundSchema: z.ZodType<Privacy, z.ZodTypeDef, unknown> =
308
- openEnums.inboundSchema(Privacy);
309
+ export const V1AccountGetInfoResponseBodyPrivacy$inboundSchema: z.ZodType<
310
+ V1AccountGetInfoResponseBodyPrivacy,
311
+ z.ZodTypeDef,
312
+ unknown
313
+ > = openEnums.inboundSchema(V1AccountGetInfoResponseBodyPrivacy);
309
314
 
310
315
  /** @internal */
311
316
  export const V1AccountGetInfoResponseBody$inboundSchema: z.ZodType<
@@ -358,7 +363,7 @@ export const V1AccountGetInfoResponseBody$inboundSchema: z.ZodType<
358
363
  playtime: z.number().int(),
359
364
  pointsGiven: z.number().int(),
360
365
  pointsReceived: z.number().int(),
361
- privacy: Privacy$inboundSchema,
366
+ privacy: V1AccountGetInfoResponseBodyPrivacy$inboundSchema,
362
367
  region: z.nullable(LeaderboardRegion$inboundSchema).optional(),
363
368
  roles: z.nullable(z.array(Role$inboundSchema)),
364
369
  shortlinkDomain: z.nullable(z.string()),
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type AccountFindFriendPathResponse = {
13
+ httpMeta: components.HTTPMetadata;
14
+ /**
15
+ * OK
16
+ */
17
+ v1AccountFindFriendPathResponseBody?:
18
+ | components.V1AccountFindFriendPathResponseBody
19
+ | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const AccountFindFriendPathResponse$inboundSchema: z.ZodType<
24
+ AccountFindFriendPathResponse,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ HttpMeta: components.HTTPMetadata$inboundSchema,
29
+ V1AccountFindFriendPathResponseBody: components
30
+ .V1AccountFindFriendPathResponseBody$inboundSchema.optional(),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "HttpMeta": "httpMeta",
34
+ "V1AccountFindFriendPathResponseBody":
35
+ "v1AccountFindFriendPathResponseBody",
36
+ });
37
+ });
38
+
39
+ export function accountFindFriendPathResponseFromJSON(
40
+ jsonString: string,
41
+ ): SafeParseResult<AccountFindFriendPathResponse, SDKValidationError> {
42
+ return safeParse(
43
+ jsonString,
44
+ (x) => AccountFindFriendPathResponse$inboundSchema.parse(JSON.parse(x)),
45
+ `Failed to parse 'AccountFindFriendPathResponse' from JSON`,
46
+ );
47
+ }
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type AccountGetBadgeHeatmapResponse = {
13
+ httpMeta: components.HTTPMetadata;
14
+ /**
15
+ * OK
16
+ */
17
+ object?: { [k: string]: number } | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export const AccountGetBadgeHeatmapResponse$inboundSchema: z.ZodType<
22
+ AccountGetBadgeHeatmapResponse,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ HttpMeta: components.HTTPMetadata$inboundSchema,
27
+ object: z.record(z.number().int()).optional(),
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ "HttpMeta": "httpMeta",
31
+ });
32
+ });
33
+
34
+ export function accountGetBadgeHeatmapResponseFromJSON(
35
+ jsonString: string,
36
+ ): SafeParseResult<AccountGetBadgeHeatmapResponse, SDKValidationError> {
37
+ return safeParse(
38
+ jsonString,
39
+ (x) => AccountGetBadgeHeatmapResponse$inboundSchema.parse(JSON.parse(x)),
40
+ `Failed to parse 'AccountGetBadgeHeatmapResponse' from JSON`,
41
+ );
42
+ }
@@ -9,6 +9,8 @@ export * from "./accountdeleteconnection.js";
9
9
  export * from "./accountdeletedeveloperapp.js";
10
10
  export * from "./accountdeleteimages.js";
11
11
  export * from "./accountdeletesession.js";
12
+ export * from "./accountfindfriendpath.js";
13
+ export * from "./accountgetbadgeheatmap.js";
12
14
  export * from "./accountgetbadgestats.js";
13
15
  export * from "./accountgetdatapoints.js";
14
16
  export * from "./accountgetinfo.js";
@@ -2,6 +2,8 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { accountAccountFindFriendPath } from "../funcs/accountAccountFindFriendPath.js";
6
+ import { accountAccountGetBadgeHeatmap } from "../funcs/accountAccountGetBadgeHeatmap.js";
5
7
  import { accountAccountListOwnedGroups } from "../funcs/accountAccountListOwnedGroups.js";
6
8
  import { accountBookmarkBadge } from "../funcs/accountBookmarkBadge.js";
7
9
  import { accountCreateConnection } from "../funcs/accountCreateConnection.js";
@@ -145,6 +147,34 @@ export class Account extends ClientSDK {
145
147
  ));
146
148
  }
147
149
 
150
+ /**
151
+ * Find shortest friend path between two accounts
152
+ */
153
+ async accountFindFriendPath(
154
+ request: components.V1AccountFindFriendPathRequestBody,
155
+ options?: RequestOptions,
156
+ ): Promise<operations.AccountFindFriendPathResponse> {
157
+ return unwrapAsync(accountAccountFindFriendPath(
158
+ this,
159
+ request,
160
+ options,
161
+ ));
162
+ }
163
+
164
+ /**
165
+ * Get monthly badge crafting counts for an account
166
+ */
167
+ async accountGetBadgeHeatmap(
168
+ request: components.AccountSearch,
169
+ options?: RequestOptions,
170
+ ): Promise<operations.AccountGetBadgeHeatmapResponse> {
171
+ return unwrapAsync(accountAccountGetBadgeHeatmap(
172
+ this,
173
+ request,
174
+ options,
175
+ ));
176
+ }
177
+
148
178
  /**
149
179
  * Get account badge statistics
150
180
  */