@steamsets/client-ts 0.33.5 → 0.33.7
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 +10 -8
- package/funcs/{leaderboardLeaderboardGetBucketLeaders.d.ts → accountCompareBadges.d.ts} +3 -3
- package/funcs/accountCompareBadges.d.ts.map +1 -0
- package/funcs/accountCompareBadges.js +134 -0
- package/funcs/accountCompareBadges.js.map +1 -0
- package/funcs/{accountAccountGetViewStats.d.ts → accountGetViewStats.d.ts} +2 -2
- package/funcs/accountGetViewStats.d.ts.map +1 -0
- package/funcs/{accountAccountGetViewStats.js → accountGetViewStats.js} +5 -5
- package/funcs/accountGetViewStats.js.map +1 -0
- package/funcs/{activityActivityListAccountFeed.d.ts → activityListAccountFeed.d.ts} +2 -2
- package/funcs/activityListAccountFeed.d.ts.map +1 -0
- package/funcs/{activityActivityListAccountFeed.js → activityListAccountFeed.js} +5 -5
- package/funcs/activityListAccountFeed.js.map +1 -0
- package/funcs/leaderboardGetBucketLeaders.d.ts +16 -0
- package/funcs/leaderboardGetBucketLeaders.d.ts.map +1 -0
- package/funcs/{leaderboardLeaderboardGetBucketLeaders.js → leaderboardGetBucketLeaders.js} +6 -6
- package/funcs/leaderboardGetBucketLeaders.js.map +1 -0
- package/funcs/{leaderboardLeaderboardGetChanges.d.ts → leaderboardGetChanges.d.ts} +2 -2
- package/funcs/leaderboardGetChanges.d.ts.map +1 -0
- package/funcs/{leaderboardLeaderboardGetChanges.js → leaderboardGetChanges.js} +5 -5
- package/funcs/leaderboardGetChanges.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/bucketleader.d.ts +4 -12
- package/models/components/bucketleader.d.ts.map +1 -1
- package/models/components/bucketleader.js +2 -4
- package/models/components/bucketleader.js.map +1 -1
- package/models/components/comparedtuple.d.ts +23 -0
- package/models/components/comparedtuple.d.ts.map +1 -0
- package/models/components/comparedtuple.js +63 -0
- package/models/components/comparedtuple.js.map +1 -0
- package/models/components/index.d.ts +7 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -0
- package/models/components/index.js.map +1 -1
- package/models/components/order.d.ts +32 -0
- package/models/components/order.d.ts.map +1 -0
- package/models/components/order.js +66 -0
- package/models/components/order.js.map +1 -0
- package/models/components/rangefilter.d.ts +23 -0
- package/models/components/rangefilter.d.ts.map +1 -0
- package/models/components/rangefilter.js +56 -0
- package/models/components/rangefilter.js.map +1 -0
- package/models/components/resolvedaccount.d.ts +13 -0
- package/models/components/resolvedaccount.d.ts.map +1 -0
- package/models/components/resolvedaccount.js +53 -0
- package/models/components/resolvedaccount.js.map +1 -0
- package/models/components/tupleaccount.d.ts +13 -0
- package/models/components/tupleaccount.d.ts.map +1 -0
- package/models/components/tupleaccount.js +54 -0
- package/models/components/tupleaccount.js.map +1 -0
- package/models/components/v1accountcomparebadgesrequestbody.d.ts +74 -0
- package/models/components/v1accountcomparebadgesrequestbody.d.ts.map +1 -0
- package/models/components/v1accountcomparebadgesrequestbody.js +94 -0
- package/models/components/v1accountcomparebadgesrequestbody.js.map +1 -0
- package/models/components/v1accountcomparebadgesresponsebody.d.ts +25 -0
- package/models/components/v1accountcomparebadgesresponsebody.d.ts.map +1 -0
- package/models/components/v1accountcomparebadgesresponsebody.js +61 -0
- package/models/components/v1accountcomparebadgesresponsebody.js.map +1 -0
- package/models/components/v1accountlistbadgesrequestbody.d.ts +4 -4
- package/models/components/v1accountlistbadgesrequestbody.d.ts.map +1 -1
- package/models/components/v1accountlistbadgesrequestbody.js +4 -5
- package/models/components/v1accountlistbadgesrequestbody.js.map +1 -1
- package/models/components/v1apporder.d.ts +8 -8
- package/models/components/v1apporder.d.ts.map +1 -1
- package/models/components/v1apporder.js +7 -8
- package/models/components/v1apporder.js.map +1 -1
- package/models/components/v1leaderboardgetbucketleadersrequestbody.d.ts +5 -4
- package/models/components/v1leaderboardgetbucketleadersrequestbody.d.ts.map +1 -1
- package/models/components/v1leaderboardgetbucketleadersrequestbody.js +2 -1
- package/models/components/v1leaderboardgetbucketleadersrequestbody.js.map +1 -1
- package/models/operations/comparebadges.d.ts +15 -0
- package/models/operations/comparebadges.d.ts.map +1 -0
- package/models/operations/comparebadges.js +59 -0
- package/models/operations/comparebadges.js.map +1 -0
- package/models/operations/getbucketleaders.d.ts +15 -0
- package/models/operations/getbucketleaders.d.ts.map +1 -0
- package/models/operations/{leaderboardgetbucketleaders.js → getbucketleaders.js} +6 -6
- package/models/operations/getbucketleaders.js.map +1 -0
- package/models/operations/{leaderboardgetchanges.d.ts → getchanges.d.ts} +4 -4
- package/models/operations/getchanges.d.ts.map +1 -0
- package/models/operations/{leaderboardgetchanges.js → getchanges.js} +6 -6
- package/models/operations/getchanges.js.map +1 -0
- package/models/operations/getviewstats.d.ts +15 -0
- package/models/operations/getviewstats.d.ts.map +1 -0
- package/models/operations/{accountgetviewstats.js → getviewstats.js} +6 -6
- package/models/operations/getviewstats.js.map +1 -0
- package/models/operations/index.d.ts +5 -4
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -4
- package/models/operations/index.js.map +1 -1
- package/models/operations/{activitylistaccountfeed.d.ts → listaccountfeed.d.ts} +4 -4
- package/models/operations/listaccountfeed.d.ts.map +1 -0
- package/models/operations/{activitylistaccountfeed.js → listaccountfeed.js} +6 -6
- package/models/operations/listaccountfeed.js.map +1 -0
- package/package.json +1 -1
- package/sdk/account.d.ts +5 -1
- package/sdk/account.d.ts.map +1 -1
- package/sdk/account.js +10 -3
- package/sdk/account.js.map +1 -1
- package/sdk/activity.d.ts +1 -1
- package/sdk/activity.d.ts.map +1 -1
- package/sdk/activity.js +3 -3
- package/sdk/activity.js.map +1 -1
- package/sdk/leaderboard.d.ts +3 -3
- package/sdk/leaderboard.d.ts.map +1 -1
- package/sdk/leaderboard.js +7 -7
- package/sdk/leaderboard.js.map +1 -1
- package/src/funcs/accountCompareBadges.ts +188 -0
- package/src/funcs/{accountAccountGetViewStats.ts → accountGetViewStats.ts} +6 -6
- package/src/funcs/{activityActivityListAccountFeed.ts → activityListAccountFeed.ts} +6 -6
- package/src/funcs/{leaderboardLeaderboardGetBucketLeaders.ts → leaderboardGetBucketLeaders.ts} +7 -7
- package/src/funcs/{leaderboardLeaderboardGetChanges.ts → leaderboardGetChanges.ts} +6 -6
- package/src/lib/config.ts +2 -2
- package/src/models/components/bucketleader.ts +6 -16
- package/src/models/components/comparedtuple.ts +56 -0
- package/src/models/components/index.ts +7 -0
- package/src/models/components/order.ts +53 -0
- package/src/models/components/rangefilter.ts +44 -0
- package/src/models/components/resolvedaccount.ts +37 -0
- package/src/models/components/tupleaccount.ts +38 -0
- package/src/models/components/v1accountcomparebadgesrequestbody.ts +128 -0
- package/src/models/components/v1accountcomparebadgesresponsebody.ts +59 -0
- package/src/models/components/v1accountlistbadgesrequestbody.ts +12 -6
- package/src/models/components/v1apporder.ts +13 -11
- package/src/models/components/v1leaderboardgetbucketleadersrequestbody.ts +5 -4
- package/src/models/operations/comparebadges.ts +46 -0
- package/src/models/operations/{leaderboardgetbucketleaders.ts → getbucketleaders.ts} +7 -8
- package/src/models/operations/{leaderboardgetchanges.ts → getchanges.ts} +7 -7
- package/src/models/operations/{accountgetviewstats.ts → getviewstats.ts} +7 -7
- package/src/models/operations/index.ts +5 -4
- package/src/models/operations/{activitylistaccountfeed.ts → listaccountfeed.ts} +7 -7
- package/src/sdk/account.ts +19 -4
- package/src/sdk/activity.ts +4 -4
- package/src/sdk/leaderboard.ts +9 -9
- package/funcs/accountAccountGetViewStats.d.ts.map +0 -1
- package/funcs/accountAccountGetViewStats.js.map +0 -1
- package/funcs/activityActivityListAccountFeed.d.ts.map +0 -1
- package/funcs/activityActivityListAccountFeed.js.map +0 -1
- package/funcs/leaderboardLeaderboardGetBucketLeaders.d.ts.map +0 -1
- package/funcs/leaderboardLeaderboardGetBucketLeaders.js.map +0 -1
- package/funcs/leaderboardLeaderboardGetChanges.d.ts.map +0 -1
- package/funcs/leaderboardLeaderboardGetChanges.js.map +0 -1
- package/models/operations/accountgetviewstats.d.ts +0 -15
- package/models/operations/accountgetviewstats.d.ts.map +0 -1
- package/models/operations/accountgetviewstats.js.map +0 -1
- package/models/operations/activitylistaccountfeed.d.ts.map +0 -1
- package/models/operations/activitylistaccountfeed.js.map +0 -1
- package/models/operations/leaderboardgetbucketleaders.d.ts +0 -15
- package/models/operations/leaderboardgetbucketleaders.d.ts.map +0 -1
- package/models/operations/leaderboardgetbucketleaders.js.map +0 -1
- package/models/operations/leaderboardgetchanges.d.ts.map +0 -1
- package/models/operations/leaderboardgetchanges.js.map +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SteamSetsCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import { SteamSetsError } from "../models/errors/steamsetserror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Compare badge collections between accounts
|
|
32
|
+
*/
|
|
33
|
+
export function accountCompareBadges(
|
|
34
|
+
client: SteamSetsCore,
|
|
35
|
+
request: components.V1AccountCompareBadgesRequestBody,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<
|
|
38
|
+
Result<
|
|
39
|
+
operations.CompareBadgesResponse,
|
|
40
|
+
| errors.ErrorModel
|
|
41
|
+
| SteamSetsError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: SteamSetsCore,
|
|
60
|
+
request: components.V1AccountCompareBadgesRequestBody,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.CompareBadgesResponse,
|
|
66
|
+
| errors.ErrorModel
|
|
67
|
+
| SteamSetsError
|
|
68
|
+
| ResponseValidationError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
| RequestAbortedError
|
|
71
|
+
| RequestTimeoutError
|
|
72
|
+
| InvalidRequestError
|
|
73
|
+
| UnexpectedClientError
|
|
74
|
+
| SDKValidationError
|
|
75
|
+
>,
|
|
76
|
+
APICall,
|
|
77
|
+
]
|
|
78
|
+
> {
|
|
79
|
+
const parsed = safeParse(
|
|
80
|
+
request,
|
|
81
|
+
(value) =>
|
|
82
|
+
components.V1AccountCompareBadgesRequestBody$outboundSchema.parse(value),
|
|
83
|
+
"Input validation failed",
|
|
84
|
+
);
|
|
85
|
+
if (!parsed.ok) {
|
|
86
|
+
return [parsed, { status: "invalid" }];
|
|
87
|
+
}
|
|
88
|
+
const payload = parsed.value;
|
|
89
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
90
|
+
|
|
91
|
+
const path = pathToFunc("/v1/account.compareBadges")();
|
|
92
|
+
|
|
93
|
+
const headers = new Headers(compactMap({
|
|
94
|
+
"Content-Type": "application/json",
|
|
95
|
+
Accept: "application/json",
|
|
96
|
+
}));
|
|
97
|
+
|
|
98
|
+
const secConfig = await extractSecurity(client._options.token);
|
|
99
|
+
const securityInput = secConfig == null ? {} : { token: secConfig };
|
|
100
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
101
|
+
|
|
102
|
+
const context = {
|
|
103
|
+
options: client._options,
|
|
104
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
105
|
+
operationID: "compareBadges",
|
|
106
|
+
oAuth2Scopes: null,
|
|
107
|
+
|
|
108
|
+
resolvedSecurity: requestSecurity,
|
|
109
|
+
|
|
110
|
+
securitySource: client._options.token,
|
|
111
|
+
retryConfig: options?.retries
|
|
112
|
+
|| client._options.retryConfig
|
|
113
|
+
|| {
|
|
114
|
+
strategy: "backoff",
|
|
115
|
+
backoff: {
|
|
116
|
+
initialInterval: 500,
|
|
117
|
+
maxInterval: 5000,
|
|
118
|
+
exponent: 1.5,
|
|
119
|
+
maxElapsedTime: 60000,
|
|
120
|
+
},
|
|
121
|
+
retryConnectionErrors: true,
|
|
122
|
+
}
|
|
123
|
+
|| { strategy: "none" },
|
|
124
|
+
retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
const requestRes = client._createRequest(context, {
|
|
128
|
+
security: requestSecurity,
|
|
129
|
+
method: "POST",
|
|
130
|
+
baseURL: options?.serverURL,
|
|
131
|
+
path: path,
|
|
132
|
+
headers: headers,
|
|
133
|
+
body: body,
|
|
134
|
+
uaHeader: "x-speakeasy-user-agent",
|
|
135
|
+
userAgent: client._options.userAgent,
|
|
136
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
137
|
+
}, options);
|
|
138
|
+
if (!requestRes.ok) {
|
|
139
|
+
return [requestRes, { status: "invalid" }];
|
|
140
|
+
}
|
|
141
|
+
const req = requestRes.value;
|
|
142
|
+
|
|
143
|
+
const doResult = await client._do(req, {
|
|
144
|
+
context,
|
|
145
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
146
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
147
|
+
retryConfig: context.retryConfig,
|
|
148
|
+
retryCodes: context.retryCodes,
|
|
149
|
+
});
|
|
150
|
+
if (!doResult.ok) {
|
|
151
|
+
return [doResult, { status: "request-error", request: req }];
|
|
152
|
+
}
|
|
153
|
+
const response = doResult.value;
|
|
154
|
+
|
|
155
|
+
const responseFields = {
|
|
156
|
+
HttpMeta: { Response: response, Request: req },
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
const [result] = await M.match<
|
|
160
|
+
operations.CompareBadgesResponse,
|
|
161
|
+
| errors.ErrorModel
|
|
162
|
+
| SteamSetsError
|
|
163
|
+
| ResponseValidationError
|
|
164
|
+
| ConnectionError
|
|
165
|
+
| RequestAbortedError
|
|
166
|
+
| RequestTimeoutError
|
|
167
|
+
| InvalidRequestError
|
|
168
|
+
| UnexpectedClientError
|
|
169
|
+
| SDKValidationError
|
|
170
|
+
>(
|
|
171
|
+
M.json(200, operations.CompareBadgesResponse$inboundSchema, {
|
|
172
|
+
key: "V1AccountCompareBadgesResponseBody",
|
|
173
|
+
}),
|
|
174
|
+
M.jsonErr([400, 401, 404, 422], errors.ErrorModel$inboundSchema, {
|
|
175
|
+
ctype: "application/problem+json",
|
|
176
|
+
}),
|
|
177
|
+
M.jsonErr(500, errors.ErrorModel$inboundSchema, {
|
|
178
|
+
ctype: "application/problem+json",
|
|
179
|
+
}),
|
|
180
|
+
M.fail("4XX"),
|
|
181
|
+
M.fail("5XX"),
|
|
182
|
+
)(response, req, { extraFields: responseFields });
|
|
183
|
+
if (!result.ok) {
|
|
184
|
+
return [result, { status: "complete", request: req, response }];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return [result, { status: "complete", request: req, response }];
|
|
188
|
+
}
|
|
@@ -30,13 +30,13 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
/**
|
|
31
31
|
* Get profile view counts (24h/7d/30d × unique/total) for an account
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function accountGetViewStats(
|
|
34
34
|
client: SteamSetsCore,
|
|
35
35
|
request: components.AccountSearch,
|
|
36
36
|
options?: RequestOptions,
|
|
37
37
|
): APIPromise<
|
|
38
38
|
Result<
|
|
39
|
-
operations.
|
|
39
|
+
operations.GetViewStatsResponse,
|
|
40
40
|
| errors.ErrorModel
|
|
41
41
|
| SteamSetsError
|
|
42
42
|
| ResponseValidationError
|
|
@@ -62,7 +62,7 @@ async function $do(
|
|
|
62
62
|
): Promise<
|
|
63
63
|
[
|
|
64
64
|
Result<
|
|
65
|
-
operations.
|
|
65
|
+
operations.GetViewStatsResponse,
|
|
66
66
|
| errors.ErrorModel
|
|
67
67
|
| SteamSetsError
|
|
68
68
|
| ResponseValidationError
|
|
@@ -101,7 +101,7 @@ async function $do(
|
|
|
101
101
|
const context = {
|
|
102
102
|
options: client._options,
|
|
103
103
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
104
|
-
operationID: "
|
|
104
|
+
operationID: "getViewStats",
|
|
105
105
|
oAuth2Scopes: null,
|
|
106
106
|
|
|
107
107
|
resolvedSecurity: requestSecurity,
|
|
@@ -156,7 +156,7 @@ async function $do(
|
|
|
156
156
|
};
|
|
157
157
|
|
|
158
158
|
const [result] = await M.match<
|
|
159
|
-
operations.
|
|
159
|
+
operations.GetViewStatsResponse,
|
|
160
160
|
| errors.ErrorModel
|
|
161
161
|
| SteamSetsError
|
|
162
162
|
| ResponseValidationError
|
|
@@ -167,7 +167,7 @@ async function $do(
|
|
|
167
167
|
| UnexpectedClientError
|
|
168
168
|
| SDKValidationError
|
|
169
169
|
>(
|
|
170
|
-
M.json(200, operations.
|
|
170
|
+
M.json(200, operations.GetViewStatsResponse$inboundSchema, {
|
|
171
171
|
key: "AccountViewStats",
|
|
172
172
|
}),
|
|
173
173
|
M.jsonErr([400, 401, 404, 422], errors.ErrorModel$inboundSchema, {
|
|
@@ -30,13 +30,13 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
/**
|
|
31
31
|
* List the activity feed for a single account (profile timeline)
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function activityListAccountFeed(
|
|
34
34
|
client: SteamSetsCore,
|
|
35
35
|
request: components.V1ActivityListAccountFeedRequestBody,
|
|
36
36
|
options?: RequestOptions,
|
|
37
37
|
): APIPromise<
|
|
38
38
|
Result<
|
|
39
|
-
operations.
|
|
39
|
+
operations.ListAccountFeedResponse,
|
|
40
40
|
| errors.ErrorModel
|
|
41
41
|
| SteamSetsError
|
|
42
42
|
| ResponseValidationError
|
|
@@ -62,7 +62,7 @@ async function $do(
|
|
|
62
62
|
): Promise<
|
|
63
63
|
[
|
|
64
64
|
Result<
|
|
65
|
-
operations.
|
|
65
|
+
operations.ListAccountFeedResponse,
|
|
66
66
|
| errors.ErrorModel
|
|
67
67
|
| SteamSetsError
|
|
68
68
|
| ResponseValidationError
|
|
@@ -104,7 +104,7 @@ async function $do(
|
|
|
104
104
|
const context = {
|
|
105
105
|
options: client._options,
|
|
106
106
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
107
|
-
operationID: "
|
|
107
|
+
operationID: "listAccountFeed",
|
|
108
108
|
oAuth2Scopes: null,
|
|
109
109
|
|
|
110
110
|
resolvedSecurity: requestSecurity,
|
|
@@ -159,7 +159,7 @@ async function $do(
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
const [result] = await M.match<
|
|
162
|
-
operations.
|
|
162
|
+
operations.ListAccountFeedResponse,
|
|
163
163
|
| errors.ErrorModel
|
|
164
164
|
| SteamSetsError
|
|
165
165
|
| ResponseValidationError
|
|
@@ -170,7 +170,7 @@ async function $do(
|
|
|
170
170
|
| UnexpectedClientError
|
|
171
171
|
| SDKValidationError
|
|
172
172
|
>(
|
|
173
|
-
M.json(200, operations.
|
|
173
|
+
M.json(200, operations.ListAccountFeedResponse$inboundSchema, {
|
|
174
174
|
key: "V1ActivityListAccountFeedResponseBody",
|
|
175
175
|
}),
|
|
176
176
|
M.jsonErr([400, 422], errors.ErrorModel$inboundSchema, {
|
package/src/funcs/{leaderboardLeaderboardGetBucketLeaders.ts → leaderboardGetBucketLeaders.ts}
RENAMED
|
@@ -28,15 +28,15 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
28
28
|
import { Result } from "../types/fp.js";
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Get the top account in each
|
|
31
|
+
* Get the top account in each value bucket
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function leaderboardGetBucketLeaders(
|
|
34
34
|
client: SteamSetsCore,
|
|
35
35
|
request: components.V1LeaderboardGetBucketLeadersRequestBody,
|
|
36
36
|
options?: RequestOptions,
|
|
37
37
|
): APIPromise<
|
|
38
38
|
Result<
|
|
39
|
-
operations.
|
|
39
|
+
operations.GetBucketLeadersResponse,
|
|
40
40
|
| errors.ErrorModel
|
|
41
41
|
| SteamSetsError
|
|
42
42
|
| ResponseValidationError
|
|
@@ -62,7 +62,7 @@ async function $do(
|
|
|
62
62
|
): Promise<
|
|
63
63
|
[
|
|
64
64
|
Result<
|
|
65
|
-
operations.
|
|
65
|
+
operations.GetBucketLeadersResponse,
|
|
66
66
|
| errors.ErrorModel
|
|
67
67
|
| SteamSetsError
|
|
68
68
|
| ResponseValidationError
|
|
@@ -104,7 +104,7 @@ async function $do(
|
|
|
104
104
|
const context = {
|
|
105
105
|
options: client._options,
|
|
106
106
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
107
|
-
operationID: "
|
|
107
|
+
operationID: "getBucketLeaders",
|
|
108
108
|
oAuth2Scopes: null,
|
|
109
109
|
|
|
110
110
|
resolvedSecurity: requestSecurity,
|
|
@@ -159,7 +159,7 @@ async function $do(
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
const [result] = await M.match<
|
|
162
|
-
operations.
|
|
162
|
+
operations.GetBucketLeadersResponse,
|
|
163
163
|
| errors.ErrorModel
|
|
164
164
|
| SteamSetsError
|
|
165
165
|
| ResponseValidationError
|
|
@@ -170,7 +170,7 @@ async function $do(
|
|
|
170
170
|
| UnexpectedClientError
|
|
171
171
|
| SDKValidationError
|
|
172
172
|
>(
|
|
173
|
-
M.json(200, operations.
|
|
173
|
+
M.json(200, operations.GetBucketLeadersResponse$inboundSchema, {
|
|
174
174
|
key: "BucketLeaders",
|
|
175
175
|
}),
|
|
176
176
|
M.jsonErr([400, 401, 422], errors.ErrorModel$inboundSchema, {
|
|
@@ -30,13 +30,13 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
/**
|
|
31
31
|
* Top movers in a windowed delta on a leaderboard
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function leaderboardGetChanges(
|
|
34
34
|
client: SteamSetsCore,
|
|
35
35
|
request: components.LeaderboardGetChangesRequestBody,
|
|
36
36
|
options?: RequestOptions,
|
|
37
37
|
): APIPromise<
|
|
38
38
|
Result<
|
|
39
|
-
operations.
|
|
39
|
+
operations.GetChangesResponse,
|
|
40
40
|
| errors.ErrorModel
|
|
41
41
|
| SteamSetsError
|
|
42
42
|
| ResponseValidationError
|
|
@@ -62,7 +62,7 @@ async function $do(
|
|
|
62
62
|
): Promise<
|
|
63
63
|
[
|
|
64
64
|
Result<
|
|
65
|
-
operations.
|
|
65
|
+
operations.GetChangesResponse,
|
|
66
66
|
| errors.ErrorModel
|
|
67
67
|
| SteamSetsError
|
|
68
68
|
| ResponseValidationError
|
|
@@ -102,7 +102,7 @@ async function $do(
|
|
|
102
102
|
const context = {
|
|
103
103
|
options: client._options,
|
|
104
104
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
105
|
-
operationID: "
|
|
105
|
+
operationID: "getChanges",
|
|
106
106
|
oAuth2Scopes: null,
|
|
107
107
|
|
|
108
108
|
resolvedSecurity: requestSecurity,
|
|
@@ -157,7 +157,7 @@ async function $do(
|
|
|
157
157
|
};
|
|
158
158
|
|
|
159
159
|
const [result] = await M.match<
|
|
160
|
-
operations.
|
|
160
|
+
operations.GetChangesResponse,
|
|
161
161
|
| errors.ErrorModel
|
|
162
162
|
| SteamSetsError
|
|
163
163
|
| ResponseValidationError
|
|
@@ -168,7 +168,7 @@ async function $do(
|
|
|
168
168
|
| UnexpectedClientError
|
|
169
169
|
| SDKValidationError
|
|
170
170
|
>(
|
|
171
|
-
M.json(200, operations.
|
|
171
|
+
M.json(200, operations.GetChangesResponse$inboundSchema, {
|
|
172
172
|
key: "LeaderboardGetChangesResponseBody",
|
|
173
173
|
}),
|
|
174
174
|
M.jsonErr([400, 422], errors.ErrorModel$inboundSchema, {
|
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.33.
|
|
62
|
+
sdkVersion: "0.33.7",
|
|
63
63
|
genVersion: "2.881.4",
|
|
64
64
|
userAgent:
|
|
65
|
-
"speakeasy-sdk/typescript 0.33.
|
|
65
|
+
"speakeasy-sdk/typescript 0.33.7 2.881.4 1.0.0 @steamsets/client-ts",
|
|
66
66
|
} as const;
|
|
@@ -19,23 +19,15 @@ export type BucketLeader = {
|
|
|
19
19
|
*/
|
|
20
20
|
empty: boolean;
|
|
21
21
|
/**
|
|
22
|
-
* Inclusive bucket lower bound (level)
|
|
22
|
+
* Inclusive bucket lower bound in the leaderboard's native unit (level for xp, game count for apps)
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* XP required for fromLevel
|
|
27
|
-
*/
|
|
28
|
-
fromXp: number;
|
|
24
|
+
from: number;
|
|
29
25
|
rank?: number | undefined;
|
|
30
26
|
score?: number | undefined;
|
|
31
27
|
/**
|
|
32
|
-
* Inclusive bucket upper bound
|
|
33
|
-
*/
|
|
34
|
-
toLevel: number;
|
|
35
|
-
/**
|
|
36
|
-
* XP required for toLevel+1, minus 1 — i.e. the cap of this bucket
|
|
28
|
+
* Inclusive bucket upper bound in the leaderboard's native unit
|
|
37
29
|
*/
|
|
38
|
-
|
|
30
|
+
to: number;
|
|
39
31
|
};
|
|
40
32
|
|
|
41
33
|
/** @internal */
|
|
@@ -47,12 +39,10 @@ export const BucketLeader$inboundSchema: z.ZodType<
|
|
|
47
39
|
account: z.nullable(LeaderboardAccount$inboundSchema).optional(),
|
|
48
40
|
accountId: z.number().int().optional(),
|
|
49
41
|
empty: z.boolean(),
|
|
50
|
-
|
|
51
|
-
fromXp: z.number().int(),
|
|
42
|
+
from: z.number().int(),
|
|
52
43
|
rank: z.number().int().optional(),
|
|
53
44
|
score: z.number().int().optional(),
|
|
54
|
-
|
|
55
|
-
toXp: z.number().int(),
|
|
45
|
+
to: z.number().int(),
|
|
56
46
|
});
|
|
57
47
|
|
|
58
48
|
export function bucketLeaderFromJSON(
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { TupleAccount, TupleAccount$inboundSchema } from "./tupleaccount.js";
|
|
10
|
+
|
|
11
|
+
export type ComparedTuple = {
|
|
12
|
+
accounts: Array<TupleAccount> | null;
|
|
13
|
+
appId: number;
|
|
14
|
+
appImage: string;
|
|
15
|
+
appName: string;
|
|
16
|
+
appType: string;
|
|
17
|
+
badgeImage: string;
|
|
18
|
+
badgeName: string;
|
|
19
|
+
isEvent: boolean;
|
|
20
|
+
isFoil: boolean;
|
|
21
|
+
isSale: boolean;
|
|
22
|
+
maxLevel: number;
|
|
23
|
+
scarcity: number;
|
|
24
|
+
steamId: number;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ComparedTuple$inboundSchema: z.ZodType<
|
|
29
|
+
ComparedTuple,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
accounts: z.nullable(z.array(TupleAccount$inboundSchema)),
|
|
34
|
+
appId: z.number().int(),
|
|
35
|
+
appImage: z.string(),
|
|
36
|
+
appName: z.string(),
|
|
37
|
+
appType: z.string(),
|
|
38
|
+
badgeImage: z.string(),
|
|
39
|
+
badgeName: z.string(),
|
|
40
|
+
isEvent: z.boolean(),
|
|
41
|
+
isFoil: z.boolean(),
|
|
42
|
+
isSale: z.boolean(),
|
|
43
|
+
maxLevel: z.number().int(),
|
|
44
|
+
scarcity: z.number().int(),
|
|
45
|
+
steamId: z.number().int(),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function comparedTupleFromJSON(
|
|
49
|
+
jsonString: string,
|
|
50
|
+
): SafeParseResult<ComparedTuple, SDKValidationError> {
|
|
51
|
+
return safeParse(
|
|
52
|
+
jsonString,
|
|
53
|
+
(x) => ComparedTuple$inboundSchema.parse(JSON.parse(x)),
|
|
54
|
+
`Failed to parse 'ComparedTuple' from JSON`,
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -23,6 +23,7 @@ export * from "./city.js";
|
|
|
23
23
|
export * from "./cmslistitem.js";
|
|
24
24
|
export * from "./cmsversionitem.js";
|
|
25
25
|
export * from "./colortag.js";
|
|
26
|
+
export * from "./comparedtuple.js";
|
|
26
27
|
export * from "./connection.js";
|
|
27
28
|
export * from "./country.js";
|
|
28
29
|
export * from "./currentcolortag.js";
|
|
@@ -50,11 +51,14 @@ export * from "./leaderboardgetchangesresponsebody.js";
|
|
|
50
51
|
export * from "./leaderboardregion.js";
|
|
51
52
|
export * from "./leaderboardstate.js";
|
|
52
53
|
export * from "./loginrequestbody.js";
|
|
54
|
+
export * from "./order.js";
|
|
53
55
|
export * from "./previewaccount.js";
|
|
54
56
|
export * from "./range.js";
|
|
57
|
+
export * from "./rangefilter.js";
|
|
55
58
|
export * from "./region.js";
|
|
56
59
|
export * from "./reorderitemreq.js";
|
|
57
60
|
export * from "./requestbody.js";
|
|
61
|
+
export * from "./resolvedaccount.js";
|
|
58
62
|
export * from "./resource.js";
|
|
59
63
|
export * from "./responsebody.js";
|
|
60
64
|
export * from "./role.js";
|
|
@@ -67,6 +71,7 @@ export * from "./setremovedesigntag.js";
|
|
|
67
71
|
export * from "./state.js";
|
|
68
72
|
export * from "./trendingaccount.js";
|
|
69
73
|
export * from "./trendingsearch.js";
|
|
74
|
+
export * from "./tupleaccount.js";
|
|
70
75
|
export * from "./v1accountapp.js";
|
|
71
76
|
export * from "./v1accountbadgebookmark.js";
|
|
72
77
|
export * from "./v1accountbadgebookmarksresponsebody.js";
|
|
@@ -77,6 +82,8 @@ export * from "./v1accountbadgestats.js";
|
|
|
77
82
|
export * from "./v1accountbadgexpstats.js";
|
|
78
83
|
export * from "./v1accountbookmarkbadgerequestbody.js";
|
|
79
84
|
export * from "./v1accountbookmarkbadgeresponsebody.js";
|
|
85
|
+
export * from "./v1accountcomparebadgesrequestbody.js";
|
|
86
|
+
export * from "./v1accountcomparebadgesresponsebody.js";
|
|
80
87
|
export * from "./v1accountcreateconnectionrequestbody.js";
|
|
81
88
|
export * from "./v1accountcreateconnectionresponsebody.js";
|
|
82
89
|
export * from "./v1accountcreatedeveloperapprequestbody.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const By = {
|
|
9
|
+
Scarcity: "scarcity",
|
|
10
|
+
Level: "level",
|
|
11
|
+
Name: "name",
|
|
12
|
+
Xp: "xp",
|
|
13
|
+
CompletedAt: "completedAt",
|
|
14
|
+
} as const;
|
|
15
|
+
export type By = ClosedEnum<typeof By>;
|
|
16
|
+
|
|
17
|
+
export const Direction = {
|
|
18
|
+
Asc: "asc",
|
|
19
|
+
Desc: "desc",
|
|
20
|
+
} as const;
|
|
21
|
+
export type Direction = ClosedEnum<typeof Direction>;
|
|
22
|
+
|
|
23
|
+
export type Order = {
|
|
24
|
+
by?: By | undefined;
|
|
25
|
+
direction?: Direction | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const By$outboundSchema: z.ZodNativeEnum<typeof By> = z.nativeEnum(By);
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const Direction$outboundSchema: z.ZodNativeEnum<typeof Direction> = z
|
|
33
|
+
.nativeEnum(Direction);
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type Order$Outbound = {
|
|
37
|
+
by: string;
|
|
38
|
+
direction: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const Order$outboundSchema: z.ZodType<
|
|
43
|
+
Order$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
Order
|
|
46
|
+
> = z.object({
|
|
47
|
+
by: By$outboundSchema.default("scarcity"),
|
|
48
|
+
direction: Direction$outboundSchema.default("desc"),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function orderToJSON(order: Order): string {
|
|
52
|
+
return JSON.stringify(Order$outboundSchema.parse(order));
|
|
53
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const RangeFilterType = {
|
|
9
|
+
Scarcity: "scarcity",
|
|
10
|
+
} as const;
|
|
11
|
+
export type RangeFilterType = ClosedEnum<typeof RangeFilterType>;
|
|
12
|
+
|
|
13
|
+
export type RangeFilter = {
|
|
14
|
+
max?: number | undefined;
|
|
15
|
+
min?: number | undefined;
|
|
16
|
+
type: RangeFilterType;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const RangeFilterType$outboundSchema: z.ZodNativeEnum<
|
|
21
|
+
typeof RangeFilterType
|
|
22
|
+
> = z.nativeEnum(RangeFilterType);
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export type RangeFilter$Outbound = {
|
|
26
|
+
max?: number | undefined;
|
|
27
|
+
min?: number | undefined;
|
|
28
|
+
type: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const RangeFilter$outboundSchema: z.ZodType<
|
|
33
|
+
RangeFilter$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
RangeFilter
|
|
36
|
+
> = z.object({
|
|
37
|
+
max: z.number().int().optional(),
|
|
38
|
+
min: z.number().int().optional(),
|
|
39
|
+
type: RangeFilterType$outboundSchema,
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export function rangeFilterToJSON(rangeFilter: RangeFilter): string {
|
|
43
|
+
return JSON.stringify(RangeFilter$outboundSchema.parse(rangeFilter));
|
|
44
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
|
|
10
|
+
export type ResolvedAccount = {
|
|
11
|
+
accountId: number;
|
|
12
|
+
avatar: string;
|
|
13
|
+
steamId: string;
|
|
14
|
+
vanity?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const ResolvedAccount$inboundSchema: z.ZodType<
|
|
19
|
+
ResolvedAccount,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
accountId: z.number().int(),
|
|
24
|
+
avatar: z.string(),
|
|
25
|
+
steamId: z.string(),
|
|
26
|
+
vanity: z.string().optional(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function resolvedAccountFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<ResolvedAccount, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => ResolvedAccount$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'ResolvedAccount' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|