@steamsets/client-ts 0.32.3 → 0.32.5

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 (56) hide show
  1. package/README.md +2 -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/jsr.json +1 -1
  7. package/lib/config.d.ts +3 -3
  8. package/lib/config.js +3 -3
  9. package/models/components/friendpath.d.ts +18 -0
  10. package/models/components/friendpath.d.ts.map +1 -0
  11. package/models/components/friendpath.js +52 -0
  12. package/models/components/friendpath.js.map +1 -0
  13. package/models/components/index.d.ts +3 -0
  14. package/models/components/index.d.ts.map +1 -1
  15. package/models/components/index.js +3 -0
  16. package/models/components/index.js.map +1 -1
  17. package/models/components/leaderboardaccount.d.ts +4 -4
  18. package/models/components/leaderboardaccount.d.ts.map +1 -1
  19. package/models/components/leaderboardaccount.js +4 -4
  20. package/models/components/leaderboardaccount.js.map +1 -1
  21. package/models/components/v1accountfindfriendpathrequestbody.d.ts +20 -0
  22. package/models/components/v1accountfindfriendpathrequestbody.d.ts.map +1 -0
  23. package/models/components/v1accountfindfriendpathrequestbody.js +52 -0
  24. package/models/components/v1accountfindfriendpathrequestbody.js.map +1 -0
  25. package/models/components/v1accountfindfriendpathresponsebody.d.ts +22 -0
  26. package/models/components/v1accountfindfriendpathresponsebody.d.ts.map +1 -0
  27. package/models/components/v1accountfindfriendpathresponsebody.js +58 -0
  28. package/models/components/v1accountfindfriendpathresponsebody.js.map +1 -0
  29. package/models/components/v1accountgetinforesponsebody.d.ts +4 -4
  30. package/models/components/v1accountgetinforesponsebody.d.ts.map +1 -1
  31. package/models/components/v1accountgetinforesponsebody.js +4 -4
  32. package/models/components/v1accountgetinforesponsebody.js.map +1 -1
  33. package/models/operations/accountfindfriendpath.d.ts +15 -0
  34. package/models/operations/accountfindfriendpath.d.ts.map +1 -0
  35. package/models/operations/accountfindfriendpath.js +59 -0
  36. package/models/operations/accountfindfriendpath.js.map +1 -0
  37. package/models/operations/index.d.ts +1 -0
  38. package/models/operations/index.d.ts.map +1 -1
  39. package/models/operations/index.js +1 -0
  40. package/models/operations/index.js.map +1 -1
  41. package/package.json +1 -1
  42. package/sdk/account.d.ts +4 -0
  43. package/sdk/account.d.ts.map +1 -1
  44. package/sdk/account.js +7 -0
  45. package/sdk/account.js.map +1 -1
  46. package/src/funcs/accountAccountFindFriendPath.ts +186 -0
  47. package/src/lib/config.ts +3 -3
  48. package/src/models/components/friendpath.ts +43 -0
  49. package/src/models/components/index.ts +3 -0
  50. package/src/models/components/leaderboardaccount.ts +6 -11
  51. package/src/models/components/v1accountfindfriendpathrequestbody.ts +47 -0
  52. package/src/models/components/v1accountfindfriendpathresponsebody.ts +51 -0
  53. package/src/models/components/v1accountgetinforesponsebody.ts +11 -6
  54. package/src/models/operations/accountfindfriendpath.ts +47 -0
  55. package/src/models/operations/index.ts +1 -0
  56. package/src/sdk/account.ts +15 -0
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ LeaderboardAccount,
11
+ LeaderboardAccount$inboundSchema,
12
+ } from "./leaderboardaccount.js";
13
+
14
+ export type FriendPath = {
15
+ /**
16
+ * Number of hops in this path
17
+ */
18
+ distance: number;
19
+ /**
20
+ * Ordered accounts from source to target
21
+ */
22
+ path: Array<LeaderboardAccount | null> | null;
23
+ };
24
+
25
+ /** @internal */
26
+ export const FriendPath$inboundSchema: z.ZodType<
27
+ FriendPath,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ distance: z.number().int(),
32
+ path: z.nullable(z.array(z.nullable(LeaderboardAccount$inboundSchema))),
33
+ });
34
+
35
+ export function friendPathFromJSON(
36
+ jsonString: string,
37
+ ): SafeParseResult<FriendPath, SDKValidationError> {
38
+ return safeParse(
39
+ jsonString,
40
+ (x) => FriendPath$inboundSchema.parse(JSON.parse(x)),
41
+ `Failed to parse 'FriendPath' from JSON`,
42
+ );
43
+ }
@@ -24,6 +24,7 @@ export * from "./developerappanalyticsoutcome.js";
24
24
  export * from "./developerappanalyticstimeseries.js";
25
25
  export * from "./developerappanalyticstimeseriespoint.js";
26
26
  export * from "./errordetail.js";
27
+ export * from "./friendpath.js";
27
28
  export * from "./historyvalue.js";
28
29
  export * from "./httpmetadata.js";
29
30
  export * from "./idsearch.js";
@@ -69,6 +70,8 @@ export * from "./v1accountdeletesessionrequestbody.js";
69
70
  export * from "./v1accountdeletesessionresponsebody.js";
70
71
  export * from "./v1accountdeveloperappupdaterequestbody.js";
71
72
  export * from "./v1accountdeveloperappupdateresponsebody.js";
73
+ export * from "./v1accountfindfriendpathrequestbody.js";
74
+ export * from "./v1accountfindfriendpathresponsebody.js";
72
75
  export * from "./v1accountfriend.js";
73
76
  export * from "./v1accountgetdatapointsresponsebody.js";
74
77
  export * from "./v1accountgetinforesponsebody.js";
@@ -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,47 @@
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
+ /**
15
+ * Max number of paths to return (default 10, capped at 50). A direct friendship always returns a single path regardless of this value.
16
+ */
17
+ maxPaths?: number | undefined;
18
+ to: AccountSearch;
19
+ };
20
+
21
+ /** @internal */
22
+ export type V1AccountFindFriendPathRequestBody$Outbound = {
23
+ from: AccountSearch$Outbound;
24
+ maxPaths?: number | undefined;
25
+ to: AccountSearch$Outbound;
26
+ };
27
+
28
+ /** @internal */
29
+ export const V1AccountFindFriendPathRequestBody$outboundSchema: z.ZodType<
30
+ V1AccountFindFriendPathRequestBody$Outbound,
31
+ z.ZodTypeDef,
32
+ V1AccountFindFriendPathRequestBody
33
+ > = z.object({
34
+ from: AccountSearch$outboundSchema,
35
+ maxPaths: z.number().int().optional(),
36
+ to: AccountSearch$outboundSchema,
37
+ });
38
+
39
+ export function v1AccountFindFriendPathRequestBodyToJSON(
40
+ v1AccountFindFriendPathRequestBody: V1AccountFindFriendPathRequestBody,
41
+ ): string {
42
+ return JSON.stringify(
43
+ V1AccountFindFriendPathRequestBody$outboundSchema.parse(
44
+ v1AccountFindFriendPathRequestBody,
45
+ ),
46
+ );
47
+ }
@@ -0,0 +1,51 @@
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 { FriendPath, FriendPath$inboundSchema } from "./friendpath.js";
11
+
12
+ export type V1AccountFindFriendPathResponseBody = {
13
+ /**
14
+ * A URL to the JSON Schema for this object.
15
+ */
16
+ dollarSchema?: string | undefined;
17
+ /**
18
+ * Whether any path was found
19
+ */
20
+ found: boolean;
21
+ /**
22
+ * Paths sorted ascending by distance
23
+ */
24
+ paths: Array<FriendPath> | null;
25
+ };
26
+
27
+ /** @internal */
28
+ export const V1AccountFindFriendPathResponseBody$inboundSchema: z.ZodType<
29
+ V1AccountFindFriendPathResponseBody,
30
+ z.ZodTypeDef,
31
+ unknown
32
+ > = z.object({
33
+ $schema: z.string().optional(),
34
+ found: z.boolean(),
35
+ paths: z.nullable(z.array(FriendPath$inboundSchema)),
36
+ }).transform((v) => {
37
+ return remap$(v, {
38
+ "$schema": "dollarSchema",
39
+ });
40
+ });
41
+
42
+ export function v1AccountFindFriendPathResponseBodyFromJSON(
43
+ jsonString: string,
44
+ ): SafeParseResult<V1AccountFindFriendPathResponseBody, SDKValidationError> {
45
+ return safeParse(
46
+ jsonString,
47
+ (x) =>
48
+ V1AccountFindFriendPathResponseBody$inboundSchema.parse(JSON.parse(x)),
49
+ `Failed to parse 'V1AccountFindFriendPathResponseBody' from JSON`,
50
+ );
51
+ }
@@ -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
+ }
@@ -9,6 +9,7 @@ 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";
12
13
  export * from "./accountgetbadgeheatmap.js";
13
14
  export * from "./accountgetbadgestats.js";
14
15
  export * from "./accountgetdatapoints.js";
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ import { accountAccountFindFriendPath } from "../funcs/accountAccountFindFriendPath.js";
5
6
  import { accountAccountGetBadgeHeatmap } from "../funcs/accountAccountGetBadgeHeatmap.js";
6
7
  import { accountAccountListOwnedGroups } from "../funcs/accountAccountListOwnedGroups.js";
7
8
  import { accountBookmarkBadge } from "../funcs/accountBookmarkBadge.js";
@@ -146,6 +147,20 @@ export class Account extends ClientSDK {
146
147
  ));
147
148
  }
148
149
 
150
+ /**
151
+ * Find up to N shortest friend paths 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
+
149
164
  /**
150
165
  * Get monthly badge crafting counts for an account
151
166
  */