@steamsets/client-ts 0.30.1 → 0.31.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.
- package/README.md +5 -5
- package/examples/package-lock.json +1 -1
- package/funcs/accountAccountListInventorySets.d.ts +18 -0
- package/funcs/accountAccountListInventorySets.d.ts.map +1 -0
- package/funcs/{badgesListPrices.js → accountAccountListInventorySets.js} +18 -24
- package/funcs/accountAccountListInventorySets.js.map +1 -0
- package/funcs/accountAccountRefreshInventory.d.ts +18 -0
- package/funcs/accountAccountRefreshInventory.d.ts.map +1 -0
- package/funcs/accountAccountRefreshInventory.js +125 -0
- package/funcs/accountAccountRefreshInventory.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/card.d.ts +17 -0
- package/models/components/card.d.ts.map +1 -0
- package/models/components/{v1badgelevel.js → card.js} +8 -8
- package/models/components/card.js.map +1 -0
- package/models/components/index.d.ts +4 -9
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -9
- package/models/components/index.js.map +1 -1
- package/models/components/inventoryset.d.ts +30 -0
- package/models/components/inventoryset.d.ts.map +1 -0
- package/models/components/{v1badgetypecount.js → inventoryset.js} +12 -9
- package/models/components/inventoryset.js.map +1 -0
- package/models/components/resource.d.ts +1 -0
- package/models/components/resource.d.ts.map +1 -1
- package/models/components/resource.js +1 -0
- package/models/components/resource.js.map +1 -1
- package/models/components/v1accountlistinventorysetsresponsebody.d.ts +26 -0
- package/models/components/v1accountlistinventorysetsresponsebody.d.ts.map +1 -0
- package/models/components/{v1badgelistbadgepricesresponsebody.js → v1accountlistinventorysetsresponsebody.js} +10 -13
- package/models/components/v1accountlistinventorysetsresponsebody.js.map +1 -0
- package/models/components/v1accountrefreshinventoryresponsebody.d.ts +17 -0
- package/models/components/v1accountrefreshinventoryresponsebody.d.ts.map +1 -0
- package/models/components/{errormodel.js → v1accountrefreshinventoryresponsebody.js} +7 -13
- package/models/components/v1accountrefreshinventoryresponsebody.js.map +1 -0
- package/models/operations/accountlistinventorysets.d.ts +15 -0
- package/models/operations/accountlistinventorysets.d.ts.map +1 -0
- package/models/operations/{badgelistbadgeprices.js → accountlistinventorysets.js} +9 -11
- package/models/operations/accountlistinventorysets.js.map +1 -0
- package/models/operations/accountrefreshinventory.d.ts +15 -0
- package/models/operations/accountrefreshinventory.d.ts.map +1 -0
- package/models/operations/accountrefreshinventory.js +59 -0
- package/models/operations/accountrefreshinventory.js.map +1 -0
- package/models/operations/index.d.ts +2 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -1
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/account.d.ts +14 -0
- package/sdk/account.d.ts.map +1 -1
- package/sdk/account.js +20 -0
- package/sdk/account.js.map +1 -1
- package/sdk/badges.d.ts +0 -11
- package/sdk/badges.d.ts.map +1 -1
- package/sdk/badges.js +1 -13
- package/sdk/badges.js.map +1 -1
- package/src/funcs/{badgesListPrices.ts → accountAccountListInventorySets.ts} +24 -29
- package/src/funcs/accountAccountRefreshInventory.ts +169 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/card.ts +36 -0
- package/src/models/components/index.ts +4 -9
- package/src/models/components/inventoryset.ts +55 -0
- package/src/models/components/resource.ts +1 -0
- package/src/models/components/v1accountlistinventorysetsresponsebody.ts +56 -0
- package/src/models/components/v1accountrefreshinventoryresponsebody.ts +45 -0
- package/src/models/operations/accountlistinventorysets.ts +47 -0
- package/src/models/operations/accountrefreshinventory.ts +47 -0
- package/src/models/operations/index.ts +2 -1
- package/src/sdk/account.ts +32 -0
- package/src/sdk/badges.ts +0 -23
- package/funcs/badgesListPrices.d.ts +0 -24
- package/funcs/badgesListPrices.d.ts.map +0 -1
- package/funcs/badgesListPrices.js.map +0 -1
- package/models/components/errormodel.d.ts +0 -38
- package/models/components/errormodel.d.ts.map +0 -1
- package/models/components/errormodel.js.map +0 -1
- package/models/components/v1badgeapp.d.ts +0 -15
- package/models/components/v1badgeapp.d.ts.map +0 -1
- package/models/components/v1badgeapp.js +0 -55
- package/models/components/v1badgeapp.js.map +0 -1
- package/models/components/v1badgelevel.d.ts +0 -12
- package/models/components/v1badgelevel.d.ts.map +0 -1
- package/models/components/v1badgelevel.js.map +0 -1
- package/models/components/v1badgelistbadgepricesrequestbody.d.ts +0 -8
- package/models/components/v1badgelistbadgepricesrequestbody.d.ts.map +0 -1
- package/models/components/v1badgelistbadgepricesrequestbody.js +0 -47
- package/models/components/v1badgelistbadgepricesrequestbody.js.map +0 -1
- package/models/components/v1badgelistbadgepricesresponsebody.d.ts +0 -31
- package/models/components/v1badgelistbadgepricesresponsebody.d.ts.map +0 -1
- package/models/components/v1badgelistbadgepricesresponsebody.js.map +0 -1
- package/models/components/v1badgeset.d.ts +0 -27
- package/models/components/v1badgeset.d.ts.map +0 -1
- package/models/components/v1badgeset.js +0 -65
- package/models/components/v1badgeset.js.map +0 -1
- package/models/components/v1badgesetcount.d.ts +0 -11
- package/models/components/v1badgesetcount.d.ts.map +0 -1
- package/models/components/v1badgesetcount.js +0 -51
- package/models/components/v1badgesetcount.js.map +0 -1
- package/models/components/v1badgesetcounts.d.ts +0 -13
- package/models/components/v1badgesetcounts.d.ts.map +0 -1
- package/models/components/v1badgesetcounts.js +0 -53
- package/models/components/v1badgesetcounts.js.map +0 -1
- package/models/components/v1badgetypecount.d.ts +0 -12
- package/models/components/v1badgetypecount.d.ts.map +0 -1
- package/models/components/v1badgetypecount.js.map +0 -1
- package/models/operations/badgelistbadgeprices.d.ts +0 -19
- package/models/operations/badgelistbadgeprices.d.ts.map +0 -1
- package/models/operations/badgelistbadgeprices.js.map +0 -1
- package/src/models/components/errormodel.ts +0 -70
- package/src/models/components/v1badgeapp.ts +0 -41
- package/src/models/components/v1badgelevel.ts +0 -35
- package/src/models/components/v1badgelistbadgepricesrequestbody.ts +0 -27
- package/src/models/components/v1badgelistbadgepricesresponsebody.ts +0 -63
- package/src/models/components/v1badgeset.ts +0 -62
- package/src/models/components/v1badgesetcount.ts +0 -33
- package/src/models/components/v1badgesetcounts.ts +0 -39
- package/src/models/components/v1badgetypecount.ts +0 -35
- package/src/models/operations/badgelistbadgeprices.ts +0 -52
package/sdk/badges.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badges.js","sourceRoot":"","sources":["../src/sdk/badges.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"badges.js","sourceRoot":"","sources":["../src/sdk/badges.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,wDAAkD;AAClD,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,MAAO,SAAQ,mBAAS;IACnC;;OAEG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CACP,OAA8C,EAC9C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,wBAAS,EAC1B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AA1BD,wBA0BC"}
|
|
@@ -8,7 +8,6 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
8
8
|
import { RequestOptions } from "../lib/sdks.js";
|
|
9
9
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
10
|
import { pathToFunc } from "../lib/url.js";
|
|
11
|
-
import * as components from "../models/components/index.js";
|
|
12
11
|
import {
|
|
13
12
|
ConnectionError,
|
|
14
13
|
InvalidRequestError,
|
|
@@ -16,6 +15,7 @@ import {
|
|
|
16
15
|
RequestTimeoutError,
|
|
17
16
|
UnexpectedClientError,
|
|
18
17
|
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import * as errors from "../models/errors/index.js";
|
|
19
19
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
20
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
21
|
import { SteamSetsError } from "../models/errors/steamsetserror.js";
|
|
@@ -23,24 +23,19 @@ import * as operations from "../models/operations/index.js";
|
|
|
23
23
|
import { APICall, APIPromise } from "../types/async.js";
|
|
24
24
|
import { Result } from "../types/fp.js";
|
|
25
25
|
|
|
26
|
-
export enum ListPricesAcceptEnum {
|
|
27
|
-
applicationJson = "application/json",
|
|
28
|
-
applicationProblemPlusJson = "application/problem+json",
|
|
29
|
-
}
|
|
30
|
-
|
|
31
26
|
/**
|
|
32
|
-
* List
|
|
27
|
+
* List inventory sets
|
|
33
28
|
*
|
|
34
29
|
* @remarks
|
|
35
|
-
* Get
|
|
30
|
+
* Get all trading card sets with ownership information for the authenticated user
|
|
36
31
|
*/
|
|
37
|
-
export function
|
|
32
|
+
export function accountAccountListInventorySets(
|
|
38
33
|
client: SteamSetsCore,
|
|
39
|
-
|
|
40
|
-
options?: RequestOptions & { acceptHeaderOverride?: ListPricesAcceptEnum },
|
|
34
|
+
options?: RequestOptions,
|
|
41
35
|
): APIPromise<
|
|
42
36
|
Result<
|
|
43
|
-
operations.
|
|
37
|
+
operations.AccountListInventorySetsResponse,
|
|
38
|
+
| errors.ErrorModel
|
|
44
39
|
| SteamSetsError
|
|
45
40
|
| ResponseValidationError
|
|
46
41
|
| ConnectionError
|
|
@@ -53,19 +48,18 @@ export function badgesListPrices(
|
|
|
53
48
|
> {
|
|
54
49
|
return new APIPromise($do(
|
|
55
50
|
client,
|
|
56
|
-
_request,
|
|
57
51
|
options,
|
|
58
52
|
));
|
|
59
53
|
}
|
|
60
54
|
|
|
61
55
|
async function $do(
|
|
62
56
|
client: SteamSetsCore,
|
|
63
|
-
|
|
64
|
-
options?: RequestOptions & { acceptHeaderOverride?: ListPricesAcceptEnum },
|
|
57
|
+
options?: RequestOptions,
|
|
65
58
|
): Promise<
|
|
66
59
|
[
|
|
67
60
|
Result<
|
|
68
|
-
operations.
|
|
61
|
+
operations.AccountListInventorySetsResponse,
|
|
62
|
+
| errors.ErrorModel
|
|
69
63
|
| SteamSetsError
|
|
70
64
|
| ResponseValidationError
|
|
71
65
|
| ConnectionError
|
|
@@ -78,12 +72,10 @@ async function $do(
|
|
|
78
72
|
APICall,
|
|
79
73
|
]
|
|
80
74
|
> {
|
|
81
|
-
const path = pathToFunc("/v1/
|
|
75
|
+
const path = pathToFunc("/v1/account.listInventorySets")();
|
|
82
76
|
|
|
83
77
|
const headers = new Headers(compactMap({
|
|
84
|
-
|
|
85
|
-
Accept: options?.acceptHeaderOverride
|
|
86
|
-
|| "application/json;q=1, application/problem+json;q=0",
|
|
78
|
+
Accept: "application/json",
|
|
87
79
|
}));
|
|
88
80
|
|
|
89
81
|
const secConfig = await extractSecurity(client._options.token);
|
|
@@ -93,7 +85,7 @@ async function $do(
|
|
|
93
85
|
const context = {
|
|
94
86
|
options: client._options,
|
|
95
87
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
96
|
-
operationID: "
|
|
88
|
+
operationID: "account.listInventorySets",
|
|
97
89
|
oAuth2Scopes: null,
|
|
98
90
|
|
|
99
91
|
resolvedSecurity: requestSecurity,
|
|
@@ -132,7 +124,7 @@ async function $do(
|
|
|
132
124
|
|
|
133
125
|
const doResult = await client._do(req, {
|
|
134
126
|
context,
|
|
135
|
-
errorCodes: ["4XX", "5XX"],
|
|
127
|
+
errorCodes: ["400", "401", "404", "4XX", "500", "5XX"],
|
|
136
128
|
retryConfig: context.retryConfig,
|
|
137
129
|
retryCodes: context.retryCodes,
|
|
138
130
|
});
|
|
@@ -146,7 +138,8 @@ async function $do(
|
|
|
146
138
|
};
|
|
147
139
|
|
|
148
140
|
const [result] = await M.match<
|
|
149
|
-
operations.
|
|
141
|
+
operations.AccountListInventorySetsResponse,
|
|
142
|
+
| errors.ErrorModel
|
|
150
143
|
| SteamSetsError
|
|
151
144
|
| ResponseValidationError
|
|
152
145
|
| ConnectionError
|
|
@@ -156,15 +149,17 @@ async function $do(
|
|
|
156
149
|
| UnexpectedClientError
|
|
157
150
|
| SDKValidationError
|
|
158
151
|
>(
|
|
159
|
-
M.json(200, operations.
|
|
160
|
-
key: "
|
|
152
|
+
M.json(200, operations.AccountListInventorySetsResponse$inboundSchema, {
|
|
153
|
+
key: "V1AccountListInventorySetsResponseBody",
|
|
161
154
|
}),
|
|
162
|
-
M.
|
|
163
|
-
M.fail("5XX"),
|
|
164
|
-
M.json("default", operations.BadgeListBadgePricesResponse$inboundSchema, {
|
|
155
|
+
M.jsonErr([400, 401, 404], errors.ErrorModel$inboundSchema, {
|
|
165
156
|
ctype: "application/problem+json",
|
|
166
|
-
key: "ErrorModel",
|
|
167
157
|
}),
|
|
158
|
+
M.jsonErr(500, errors.ErrorModel$inboundSchema, {
|
|
159
|
+
ctype: "application/problem+json",
|
|
160
|
+
}),
|
|
161
|
+
M.fail("4XX"),
|
|
162
|
+
M.fail("5XX"),
|
|
168
163
|
)(response, req, { extraFields: responseFields });
|
|
169
164
|
if (!result.ok) {
|
|
170
165
|
return [result, { status: "complete", request: req, response }];
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SteamSetsCore } from "../core.js";
|
|
6
|
+
import * as M from "../lib/matchers.js";
|
|
7
|
+
import { compactMap } from "../lib/primitives.js";
|
|
8
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
10
|
+
import { pathToFunc } from "../lib/url.js";
|
|
11
|
+
import {
|
|
12
|
+
ConnectionError,
|
|
13
|
+
InvalidRequestError,
|
|
14
|
+
RequestAbortedError,
|
|
15
|
+
RequestTimeoutError,
|
|
16
|
+
UnexpectedClientError,
|
|
17
|
+
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import * as errors from "../models/errors/index.js";
|
|
19
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
21
|
+
import { SteamSetsError } from "../models/errors/steamsetserror.js";
|
|
22
|
+
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Refresh inventory
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Trigger a refresh of the authenticated user's Steam inventory. Rate limited based on account tier.
|
|
31
|
+
*/
|
|
32
|
+
export function accountAccountRefreshInventory(
|
|
33
|
+
client: SteamSetsCore,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
operations.AccountRefreshInventoryResponse,
|
|
38
|
+
| errors.ErrorModel
|
|
39
|
+
| SteamSetsError
|
|
40
|
+
| ResponseValidationError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
| RequestAbortedError
|
|
43
|
+
| RequestTimeoutError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| UnexpectedClientError
|
|
46
|
+
| SDKValidationError
|
|
47
|
+
>
|
|
48
|
+
> {
|
|
49
|
+
return new APIPromise($do(
|
|
50
|
+
client,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: SteamSetsCore,
|
|
57
|
+
options?: RequestOptions,
|
|
58
|
+
): Promise<
|
|
59
|
+
[
|
|
60
|
+
Result<
|
|
61
|
+
operations.AccountRefreshInventoryResponse,
|
|
62
|
+
| errors.ErrorModel
|
|
63
|
+
| SteamSetsError
|
|
64
|
+
| ResponseValidationError
|
|
65
|
+
| ConnectionError
|
|
66
|
+
| RequestAbortedError
|
|
67
|
+
| RequestTimeoutError
|
|
68
|
+
| InvalidRequestError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
>,
|
|
72
|
+
APICall,
|
|
73
|
+
]
|
|
74
|
+
> {
|
|
75
|
+
const path = pathToFunc("/v1/account.refreshInventory")();
|
|
76
|
+
|
|
77
|
+
const headers = new Headers(compactMap({
|
|
78
|
+
Accept: "application/json",
|
|
79
|
+
}));
|
|
80
|
+
|
|
81
|
+
const secConfig = await extractSecurity(client._options.token);
|
|
82
|
+
const securityInput = secConfig == null ? {} : { token: secConfig };
|
|
83
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
84
|
+
|
|
85
|
+
const context = {
|
|
86
|
+
options: client._options,
|
|
87
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
88
|
+
operationID: "account.refreshInventory",
|
|
89
|
+
oAuth2Scopes: null,
|
|
90
|
+
|
|
91
|
+
resolvedSecurity: requestSecurity,
|
|
92
|
+
|
|
93
|
+
securitySource: client._options.token,
|
|
94
|
+
retryConfig: options?.retries
|
|
95
|
+
|| client._options.retryConfig
|
|
96
|
+
|| {
|
|
97
|
+
strategy: "backoff",
|
|
98
|
+
backoff: {
|
|
99
|
+
initialInterval: 500,
|
|
100
|
+
maxInterval: 5000,
|
|
101
|
+
exponent: 1.5,
|
|
102
|
+
maxElapsedTime: 60000,
|
|
103
|
+
},
|
|
104
|
+
retryConnectionErrors: true,
|
|
105
|
+
}
|
|
106
|
+
|| { strategy: "none" },
|
|
107
|
+
retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
const requestRes = client._createRequest(context, {
|
|
111
|
+
security: requestSecurity,
|
|
112
|
+
method: "POST",
|
|
113
|
+
baseURL: options?.serverURL,
|
|
114
|
+
path: path,
|
|
115
|
+
headers: headers,
|
|
116
|
+
uaHeader: "x-speakeasy-user-agent",
|
|
117
|
+
userAgent: client._options.userAgent,
|
|
118
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
119
|
+
}, options);
|
|
120
|
+
if (!requestRes.ok) {
|
|
121
|
+
return [requestRes, { status: "invalid" }];
|
|
122
|
+
}
|
|
123
|
+
const req = requestRes.value;
|
|
124
|
+
|
|
125
|
+
const doResult = await client._do(req, {
|
|
126
|
+
context,
|
|
127
|
+
errorCodes: ["400", "401", "404", "429", "4XX", "500", "5XX"],
|
|
128
|
+
retryConfig: context.retryConfig,
|
|
129
|
+
retryCodes: context.retryCodes,
|
|
130
|
+
});
|
|
131
|
+
if (!doResult.ok) {
|
|
132
|
+
return [doResult, { status: "request-error", request: req }];
|
|
133
|
+
}
|
|
134
|
+
const response = doResult.value;
|
|
135
|
+
|
|
136
|
+
const responseFields = {
|
|
137
|
+
HttpMeta: { Response: response, Request: req },
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const [result] = await M.match<
|
|
141
|
+
operations.AccountRefreshInventoryResponse,
|
|
142
|
+
| errors.ErrorModel
|
|
143
|
+
| SteamSetsError
|
|
144
|
+
| ResponseValidationError
|
|
145
|
+
| ConnectionError
|
|
146
|
+
| RequestAbortedError
|
|
147
|
+
| RequestTimeoutError
|
|
148
|
+
| InvalidRequestError
|
|
149
|
+
| UnexpectedClientError
|
|
150
|
+
| SDKValidationError
|
|
151
|
+
>(
|
|
152
|
+
M.json(200, operations.AccountRefreshInventoryResponse$inboundSchema, {
|
|
153
|
+
key: "V1AccountRefreshInventoryResponseBody",
|
|
154
|
+
}),
|
|
155
|
+
M.jsonErr([400, 401, 404, 429], errors.ErrorModel$inboundSchema, {
|
|
156
|
+
ctype: "application/problem+json",
|
|
157
|
+
}),
|
|
158
|
+
M.jsonErr(500, errors.ErrorModel$inboundSchema, {
|
|
159
|
+
ctype: "application/problem+json",
|
|
160
|
+
}),
|
|
161
|
+
M.fail("4XX"),
|
|
162
|
+
M.fail("5XX"),
|
|
163
|
+
)(response, req, { extraFields: responseFields });
|
|
164
|
+
if (!result.ok) {
|
|
165
|
+
return [result, { status: "complete", request: req, response }];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return [result, { status: "complete", request: req, response }];
|
|
169
|
+
}
|
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.
|
|
63
|
-
genVersion: "2.788.
|
|
62
|
+
sdkVersion: "0.31.0",
|
|
63
|
+
genVersion: "2.788.15",
|
|
64
64
|
userAgent:
|
|
65
|
-
"speakeasy-sdk/typescript 0.
|
|
65
|
+
"speakeasy-sdk/typescript 0.31.0 2.788.15 1.0.0 @steamsets/client-ts",
|
|
66
66
|
} as const;
|
|
@@ -0,0 +1,36 @@
|
|
|
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 Card = {
|
|
11
|
+
/**
|
|
12
|
+
* Owned amount
|
|
13
|
+
*/
|
|
14
|
+
amount: number;
|
|
15
|
+
/**
|
|
16
|
+
* Card name
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const Card$inboundSchema: z.ZodType<Card, z.ZodTypeDef, unknown> = z
|
|
23
|
+
.object({
|
|
24
|
+
amount: z.number().int(),
|
|
25
|
+
name: z.string(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function cardFromJSON(
|
|
29
|
+
jsonString: string,
|
|
30
|
+
): SafeParseResult<Card, SDKValidationError> {
|
|
31
|
+
return safeParse(
|
|
32
|
+
jsonString,
|
|
33
|
+
(x) => Card$inboundSchema.parse(JSON.parse(x)),
|
|
34
|
+
`Failed to parse 'Card' from JSON`,
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -9,6 +9,7 @@ export * from "./badge.js";
|
|
|
9
9
|
export * from "./badgesuggesttags.js";
|
|
10
10
|
export * from "./badgevaluefilter.js";
|
|
11
11
|
export * from "./bestleaderboardrank.js";
|
|
12
|
+
export * from "./card.js";
|
|
12
13
|
export * from "./chosenrole.js";
|
|
13
14
|
export * from "./city.js";
|
|
14
15
|
export * from "./colortag.js";
|
|
@@ -23,10 +24,10 @@ export * from "./developerappanalyticsoutcome.js";
|
|
|
23
24
|
export * from "./developerappanalyticstimeseries.js";
|
|
24
25
|
export * from "./developerappanalyticstimeseriespoint.js";
|
|
25
26
|
export * from "./errordetail.js";
|
|
26
|
-
export * from "./errormodel.js";
|
|
27
27
|
export * from "./httpmetadata.js";
|
|
28
28
|
export * from "./idsearch.js";
|
|
29
29
|
export * from "./image.js";
|
|
30
|
+
export * from "./inventoryset.js";
|
|
30
31
|
export * from "./leaderboardaccount.js";
|
|
31
32
|
export * from "./leaderboardcity.js";
|
|
32
33
|
export * from "./leaderboardcountry.js";
|
|
@@ -82,12 +83,14 @@ export * from "./v1accountlistbadgesrequestbody.js";
|
|
|
82
83
|
export * from "./v1accountlistbadgesresponsebody.js";
|
|
83
84
|
export * from "./v1accountlistfriendsresponsebody.js";
|
|
84
85
|
export * from "./v1accountlistimagesresponsebody.js";
|
|
86
|
+
export * from "./v1accountlistinventorysetsresponsebody.js";
|
|
85
87
|
export * from "./v1accountlistleaderboardhistoryresponsebody.js";
|
|
86
88
|
export * from "./v1accountloginresponsebody.js";
|
|
87
89
|
export * from "./v1accountplaytimedatapoint.js";
|
|
88
90
|
export * from "./v1accountqueueupdaterequestbody.js";
|
|
89
91
|
export * from "./v1accountreconnectrequestbody.js";
|
|
90
92
|
export * from "./v1accountreconnectresponsebody.js";
|
|
93
|
+
export * from "./v1accountrefreshinventoryresponsebody.js";
|
|
91
94
|
export * from "./v1accountrefreshsessionbody.js";
|
|
92
95
|
export * from "./v1accountrefreshsessionrequestbody.js";
|
|
93
96
|
export * from "./v1accountsubscribeemailrequestbody.js";
|
|
@@ -110,21 +113,13 @@ export * from "./v1appfilters.js";
|
|
|
110
113
|
export * from "./v1applistbadgesrequestbody.js";
|
|
111
114
|
export * from "./v1applistbadgesresponsebody.js";
|
|
112
115
|
export * from "./v1apporder.js";
|
|
113
|
-
export * from "./v1badgeapp.js";
|
|
114
116
|
export * from "./v1badgefilters.js";
|
|
115
|
-
export * from "./v1badgelevel.js";
|
|
116
|
-
export * from "./v1badgelistbadgepricesrequestbody.js";
|
|
117
|
-
export * from "./v1badgelistbadgepricesresponsebody.js";
|
|
118
117
|
export * from "./v1badgelisttagsresponsebody.js";
|
|
119
118
|
export * from "./v1badgeorder.js";
|
|
120
119
|
export * from "./v1badgesearchbadgesresponsebody.js";
|
|
121
|
-
export * from "./v1badgeset.js";
|
|
122
|
-
export * from "./v1badgesetcount.js";
|
|
123
|
-
export * from "./v1badgesetcounts.js";
|
|
124
120
|
export * from "./v1badgesuggesttagsrequestbody.js";
|
|
125
121
|
export * from "./v1badgetagbadgerequestbody.js";
|
|
126
122
|
export * from "./v1badgetagbadgeresponsebody.js";
|
|
127
|
-
export * from "./v1badgetypecount.js";
|
|
128
123
|
export * from "./v1groupleaderboardgroup.js";
|
|
129
124
|
export * from "./v1leaderboardappinfo.js";
|
|
130
125
|
export * from "./v1leaderboardbadge.js";
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { Card, Card$inboundSchema } from "./card.js";
|
|
10
|
+
|
|
11
|
+
export type InventorySet = {
|
|
12
|
+
/**
|
|
13
|
+
* The app id
|
|
14
|
+
*/
|
|
15
|
+
appId: number;
|
|
16
|
+
/**
|
|
17
|
+
* Foil cards with owned amounts
|
|
18
|
+
*/
|
|
19
|
+
foil: Array<Card> | null;
|
|
20
|
+
/**
|
|
21
|
+
* Number of complete foil sets
|
|
22
|
+
*/
|
|
23
|
+
foilSets: number;
|
|
24
|
+
/**
|
|
25
|
+
* Normal cards with owned amounts
|
|
26
|
+
*/
|
|
27
|
+
normal: Array<Card> | null;
|
|
28
|
+
/**
|
|
29
|
+
* Number of complete normal sets
|
|
30
|
+
*/
|
|
31
|
+
normalSets: number;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const InventorySet$inboundSchema: z.ZodType<
|
|
36
|
+
InventorySet,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
appId: z.number().int(),
|
|
41
|
+
foil: z.nullable(z.array(Card$inboundSchema)),
|
|
42
|
+
foilSets: z.number().int(),
|
|
43
|
+
normal: z.nullable(z.array(Card$inboundSchema)),
|
|
44
|
+
normalSets: z.number().int(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function inventorySetFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<InventorySet, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => InventorySet$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'InventorySet' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -17,6 +17,7 @@ export const ResourceResource = {
|
|
|
17
17
|
MaxLeaderboardEntries: "max_leaderboard_entries",
|
|
18
18
|
MiniBackground: "mini_background",
|
|
19
19
|
AccountRefreshRate: "account_refresh_rate",
|
|
20
|
+
InventoryRefreshRate: "inventory_refresh_rate",
|
|
20
21
|
SocialLinks: "social_links",
|
|
21
22
|
Vanity: "vanity",
|
|
22
23
|
DeveloperApps: "developer_apps",
|
|
@@ -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 { 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 { InventorySet, InventorySet$inboundSchema } from "./inventoryset.js";
|
|
11
|
+
|
|
12
|
+
export type V1AccountListInventorySetsResponseBody = {
|
|
13
|
+
/**
|
|
14
|
+
* A URL to the JSON Schema for this object.
|
|
15
|
+
*/
|
|
16
|
+
dollarSchema?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* When inventory was last updated (unix millis)
|
|
19
|
+
*/
|
|
20
|
+
inventoryUpdatedAt?: number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* When next refresh is allowed (unix seconds)
|
|
23
|
+
*/
|
|
24
|
+
nextRefreshAt?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Inventory sets with ownership info
|
|
27
|
+
*/
|
|
28
|
+
sets: Array<InventorySet> | null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const V1AccountListInventorySetsResponseBody$inboundSchema: z.ZodType<
|
|
33
|
+
V1AccountListInventorySetsResponseBody,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
$schema: z.string().optional(),
|
|
38
|
+
inventoryUpdatedAt: z.number().int().optional(),
|
|
39
|
+
nextRefreshAt: z.number().int().optional(),
|
|
40
|
+
sets: z.nullable(z.array(InventorySet$inboundSchema)),
|
|
41
|
+
}).transform((v) => {
|
|
42
|
+
return remap$(v, {
|
|
43
|
+
"$schema": "dollarSchema",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function v1AccountListInventorySetsResponseBodyFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<V1AccountListInventorySetsResponseBody, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) =>
|
|
53
|
+
V1AccountListInventorySetsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
54
|
+
`Failed to parse 'V1AccountListInventorySetsResponseBody' from JSON`,
|
|
55
|
+
);
|
|
56
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
|
|
11
|
+
export type V1AccountRefreshInventoryResponseBody = {
|
|
12
|
+
/**
|
|
13
|
+
* A URL to the JSON Schema for this object.
|
|
14
|
+
*/
|
|
15
|
+
dollarSchema?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Unix timestamp (seconds) when next refresh is allowed
|
|
18
|
+
*/
|
|
19
|
+
nextRefreshAt: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const V1AccountRefreshInventoryResponseBody$inboundSchema: z.ZodType<
|
|
24
|
+
V1AccountRefreshInventoryResponseBody,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
$schema: z.string().optional(),
|
|
29
|
+
nextRefreshAt: z.number().int(),
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"$schema": "dollarSchema",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export function v1AccountRefreshInventoryResponseBodyFromJSON(
|
|
37
|
+
jsonString: string,
|
|
38
|
+
): SafeParseResult<V1AccountRefreshInventoryResponseBody, SDKValidationError> {
|
|
39
|
+
return safeParse(
|
|
40
|
+
jsonString,
|
|
41
|
+
(x) =>
|
|
42
|
+
V1AccountRefreshInventoryResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'V1AccountRefreshInventoryResponseBody' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -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 AccountListInventorySetsResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
v1AccountListInventorySetsResponseBody?:
|
|
18
|
+
| components.V1AccountListInventorySetsResponseBody
|
|
19
|
+
| undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const AccountListInventorySetsResponse$inboundSchema: z.ZodType<
|
|
24
|
+
AccountListInventorySetsResponse,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
29
|
+
V1AccountListInventorySetsResponseBody: components
|
|
30
|
+
.V1AccountListInventorySetsResponseBody$inboundSchema.optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"HttpMeta": "httpMeta",
|
|
34
|
+
"V1AccountListInventorySetsResponseBody":
|
|
35
|
+
"v1AccountListInventorySetsResponseBody",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function accountListInventorySetsResponseFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<AccountListInventorySetsResponse, SDKValidationError> {
|
|
42
|
+
return safeParse(
|
|
43
|
+
jsonString,
|
|
44
|
+
(x) => AccountListInventorySetsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'AccountListInventorySetsResponse' from JSON`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -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 AccountRefreshInventoryResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
v1AccountRefreshInventoryResponseBody?:
|
|
18
|
+
| components.V1AccountRefreshInventoryResponseBody
|
|
19
|
+
| undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const AccountRefreshInventoryResponse$inboundSchema: z.ZodType<
|
|
24
|
+
AccountRefreshInventoryResponse,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
29
|
+
V1AccountRefreshInventoryResponseBody: components
|
|
30
|
+
.V1AccountRefreshInventoryResponseBody$inboundSchema.optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"HttpMeta": "httpMeta",
|
|
34
|
+
"V1AccountRefreshInventoryResponseBody":
|
|
35
|
+
"v1AccountRefreshInventoryResponseBody",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function accountRefreshInventoryResponseFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<AccountRefreshInventoryResponse, SDKValidationError> {
|
|
42
|
+
return safeParse(
|
|
43
|
+
jsonString,
|
|
44
|
+
(x) => AccountRefreshInventoryResponse$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'AccountRefreshInventoryResponse' from JSON`,
|
|
46
|
+
);
|
|
47
|
+
}
|