@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.
- package/README.md +2 -0
- package/funcs/accountAccountFindFriendPath.d.ts +16 -0
- package/funcs/accountAccountFindFriendPath.d.ts.map +1 -0
- package/funcs/accountAccountFindFriendPath.js +133 -0
- package/funcs/accountAccountFindFriendPath.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/friendpath.d.ts +18 -0
- package/models/components/friendpath.d.ts.map +1 -0
- package/models/components/friendpath.js +52 -0
- package/models/components/friendpath.js.map +1 -0
- package/models/components/index.d.ts +3 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -0
- package/models/components/index.js.map +1 -1
- package/models/components/leaderboardaccount.d.ts +4 -4
- package/models/components/leaderboardaccount.d.ts.map +1 -1
- package/models/components/leaderboardaccount.js +4 -4
- package/models/components/leaderboardaccount.js.map +1 -1
- package/models/components/v1accountfindfriendpathrequestbody.d.ts +20 -0
- package/models/components/v1accountfindfriendpathrequestbody.d.ts.map +1 -0
- package/models/components/v1accountfindfriendpathrequestbody.js +52 -0
- package/models/components/v1accountfindfriendpathrequestbody.js.map +1 -0
- package/models/components/v1accountfindfriendpathresponsebody.d.ts +22 -0
- package/models/components/v1accountfindfriendpathresponsebody.d.ts.map +1 -0
- package/models/components/v1accountfindfriendpathresponsebody.js +58 -0
- package/models/components/v1accountfindfriendpathresponsebody.js.map +1 -0
- package/models/components/v1accountgetinforesponsebody.d.ts +4 -4
- package/models/components/v1accountgetinforesponsebody.d.ts.map +1 -1
- package/models/components/v1accountgetinforesponsebody.js +4 -4
- package/models/components/v1accountgetinforesponsebody.js.map +1 -1
- package/models/operations/accountfindfriendpath.d.ts +15 -0
- package/models/operations/accountfindfriendpath.d.ts.map +1 -0
- package/models/operations/accountfindfriendpath.js +59 -0
- package/models/operations/accountfindfriendpath.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/account.d.ts +4 -0
- package/sdk/account.d.ts.map +1 -1
- package/sdk/account.js +7 -0
- package/sdk/account.js.map +1 -1
- package/src/funcs/accountAccountFindFriendPath.ts +186 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/friendpath.ts +43 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/leaderboardaccount.ts +6 -11
- package/src/models/components/v1accountfindfriendpathrequestbody.ts +47 -0
- package/src/models/components/v1accountfindfriendpathresponsebody.ts +51 -0
- package/src/models/components/v1accountgetinforesponsebody.ts +11 -6
- package/src/models/operations/accountfindfriendpath.ts +47 -0
- package/src/models/operations/index.ts +1 -0
- 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
|
|
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
|
|
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:
|
|
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
|
|
196
|
-
|
|
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:
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
308
|
-
|
|
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:
|
|
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";
|
package/src/sdk/account.ts
CHANGED
|
@@ -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
|
*/
|