@steamsets/client-ts 0.11.1 → 0.11.2
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 +0 -2
- package/docs/sdks/badge/README.md +0 -175
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/accountinfobody.d.ts +15 -10
- package/models/components/accountinfobody.d.ts.map +1 -1
- package/models/components/accountinfobody.js +12 -10
- package/models/components/accountinfobody.js.map +1 -1
- package/models/components/index.d.ts +0 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -1
- package/models/components/index.js.map +1 -1
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/badge.d.ts +0 -4
- package/sdk/badge.d.ts.map +1 -1
- package/sdk/badge.js +0 -7
- package/sdk/badge.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/accountinfobody.ts +36 -23
- package/src/models/components/index.ts +0 -1
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/badge.ts +0 -15
- package/funcs/badgeBadgeV1Search.d.ts +0 -14
- package/funcs/badgeBadgeV1Search.d.ts.map +0 -1
- package/funcs/badgeBadgeV1Search.js +0 -97
- package/funcs/badgeBadgeV1Search.js.map +0 -1
- package/models/components/badgesearch.d.ts +0 -86
- package/models/components/badgesearch.d.ts.map +0 -1
- package/models/components/badgesearch.js +0 -70
- package/models/components/badgesearch.js.map +0 -1
- package/models/operations/badgev1search.d.ts +0 -26
- package/models/operations/badgev1search.d.ts.map +0 -1
- package/models/operations/badgev1search.js +0 -60
- package/models/operations/badgev1search.js.map +0 -1
- package/src/funcs/badgeBadgeV1Search.ts +0 -127
- package/src/models/components/badgesearch.ts +0 -118
- package/src/models/operations/badgev1search.ts +0 -55
|
@@ -1,127 +0,0 @@
|
|
|
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 * as M from "../lib/matchers.js";
|
|
8
|
-
import { safeParse } from "../lib/schemas.js";
|
|
9
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
-
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import * as components from "../models/components/index.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { Result } from "../types/fp.js";
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Search for badges
|
|
28
|
-
*/
|
|
29
|
-
export async function badgeBadgeV1Search(
|
|
30
|
-
client: SteamSetsCore,
|
|
31
|
-
request: components.BadgeSearch,
|
|
32
|
-
options?: RequestOptions,
|
|
33
|
-
): Promise<
|
|
34
|
-
Result<
|
|
35
|
-
operations.BadgeV1SearchResponse,
|
|
36
|
-
| errors.ErrorModel
|
|
37
|
-
| SDKError
|
|
38
|
-
| SDKValidationError
|
|
39
|
-
| UnexpectedClientError
|
|
40
|
-
| InvalidRequestError
|
|
41
|
-
| RequestAbortedError
|
|
42
|
-
| RequestTimeoutError
|
|
43
|
-
| ConnectionError
|
|
44
|
-
>
|
|
45
|
-
> {
|
|
46
|
-
const input = request;
|
|
47
|
-
|
|
48
|
-
const parsed = safeParse(
|
|
49
|
-
input,
|
|
50
|
-
(value) => components.BadgeSearch$outboundSchema.parse(value),
|
|
51
|
-
"Input validation failed",
|
|
52
|
-
);
|
|
53
|
-
if (!parsed.ok) {
|
|
54
|
-
return parsed;
|
|
55
|
-
}
|
|
56
|
-
const payload = parsed.value;
|
|
57
|
-
const body = encodeJSON("body", payload, { explode: true });
|
|
58
|
-
|
|
59
|
-
const path = pathToFunc("/badge.v1.BadgeService/Search")();
|
|
60
|
-
|
|
61
|
-
const headers = new Headers({
|
|
62
|
-
"Content-Type": "application/json",
|
|
63
|
-
Accept: "application/problem+json",
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
const secConfig = await extractSecurity(client._options.session);
|
|
67
|
-
const securityInput = secConfig == null ? {} : { session: secConfig };
|
|
68
|
-
const context = {
|
|
69
|
-
operationID: "badge.v1.search",
|
|
70
|
-
oAuth2Scopes: [],
|
|
71
|
-
securitySource: client._options.session,
|
|
72
|
-
};
|
|
73
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
74
|
-
|
|
75
|
-
const requestRes = client._createRequest(context, {
|
|
76
|
-
security: requestSecurity,
|
|
77
|
-
method: "POST",
|
|
78
|
-
path: path,
|
|
79
|
-
headers: headers,
|
|
80
|
-
body: body,
|
|
81
|
-
uaHeader: "x-speakeasy-user-agent",
|
|
82
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
83
|
-
}, options);
|
|
84
|
-
if (!requestRes.ok) {
|
|
85
|
-
return requestRes;
|
|
86
|
-
}
|
|
87
|
-
const req = requestRes.value;
|
|
88
|
-
|
|
89
|
-
const doResult = await client._do(req, {
|
|
90
|
-
context,
|
|
91
|
-
errorCodes: ["403", "404", "422", "4XX", "500", "5XX"],
|
|
92
|
-
retryConfig: options?.retries
|
|
93
|
-
|| client._options.retryConfig,
|
|
94
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
95
|
-
});
|
|
96
|
-
if (!doResult.ok) {
|
|
97
|
-
return doResult;
|
|
98
|
-
}
|
|
99
|
-
const response = doResult.value;
|
|
100
|
-
|
|
101
|
-
const responseFields = {
|
|
102
|
-
HttpMeta: { Response: response, Request: req },
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
const [result] = await M.match<
|
|
106
|
-
operations.BadgeV1SearchResponse,
|
|
107
|
-
| errors.ErrorModel
|
|
108
|
-
| SDKError
|
|
109
|
-
| SDKValidationError
|
|
110
|
-
| UnexpectedClientError
|
|
111
|
-
| InvalidRequestError
|
|
112
|
-
| RequestAbortedError
|
|
113
|
-
| RequestTimeoutError
|
|
114
|
-
| ConnectionError
|
|
115
|
-
>(
|
|
116
|
-
M.nil(204, operations.BadgeV1SearchResponse$inboundSchema),
|
|
117
|
-
M.jsonErr([403, 404, 422, 500], errors.ErrorModel$inboundSchema, {
|
|
118
|
-
ctype: "application/problem+json",
|
|
119
|
-
}),
|
|
120
|
-
M.fail(["4XX", "5XX"]),
|
|
121
|
-
)(response, req, { extraFields: responseFields });
|
|
122
|
-
if (!result.ok) {
|
|
123
|
-
return result;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
return result;
|
|
127
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
|
|
7
|
-
export type BadgeSearch = {
|
|
8
|
-
/**
|
|
9
|
-
* The app id
|
|
10
|
-
*/
|
|
11
|
-
appId: number | null;
|
|
12
|
-
/**
|
|
13
|
-
* The app ids
|
|
14
|
-
*/
|
|
15
|
-
appIds: Array<number> | null;
|
|
16
|
-
/**
|
|
17
|
-
* The badge id
|
|
18
|
-
*/
|
|
19
|
-
badgeId: string | null;
|
|
20
|
-
/**
|
|
21
|
-
* The badge ids
|
|
22
|
-
*/
|
|
23
|
-
badgeIds: Array<string> | null;
|
|
24
|
-
/**
|
|
25
|
-
* The color tags you want to search for
|
|
26
|
-
*/
|
|
27
|
-
colorSearch: Array<{ [k: string]: Array<string> }> | null;
|
|
28
|
-
/**
|
|
29
|
-
* Whether to include/exclude event badges
|
|
30
|
-
*/
|
|
31
|
-
isEvent: boolean | null;
|
|
32
|
-
/**
|
|
33
|
-
* Whether to include/exclude foil badges
|
|
34
|
-
*/
|
|
35
|
-
isFoil: boolean | null;
|
|
36
|
-
/**
|
|
37
|
-
* Whether to include/exclude sale badges
|
|
38
|
-
*/
|
|
39
|
-
isSale: boolean | null;
|
|
40
|
-
/**
|
|
41
|
-
* The limit of results
|
|
42
|
-
*/
|
|
43
|
-
limit: number | null;
|
|
44
|
-
/**
|
|
45
|
-
* The offset of results
|
|
46
|
-
*/
|
|
47
|
-
offset: number | null;
|
|
48
|
-
/**
|
|
49
|
-
* The tags you want to search for
|
|
50
|
-
*/
|
|
51
|
-
typeSearch: Array<{ [k: string]: Array<string> }> | null;
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
/** @internal */
|
|
55
|
-
export const BadgeSearch$inboundSchema: z.ZodType<
|
|
56
|
-
BadgeSearch,
|
|
57
|
-
z.ZodTypeDef,
|
|
58
|
-
unknown
|
|
59
|
-
> = z.object({
|
|
60
|
-
appId: z.nullable(z.number().int()),
|
|
61
|
-
appIds: z.nullable(z.array(z.number().int())),
|
|
62
|
-
badgeId: z.nullable(z.string()),
|
|
63
|
-
badgeIds: z.nullable(z.array(z.string())),
|
|
64
|
-
colorSearch: z.nullable(z.array(z.record(z.array(z.string())))),
|
|
65
|
-
isEvent: z.nullable(z.boolean()),
|
|
66
|
-
isFoil: z.nullable(z.boolean()),
|
|
67
|
-
isSale: z.nullable(z.boolean()),
|
|
68
|
-
limit: z.nullable(z.number().int()),
|
|
69
|
-
offset: z.nullable(z.number().int()),
|
|
70
|
-
typeSearch: z.nullable(z.array(z.record(z.array(z.string())))),
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
/** @internal */
|
|
74
|
-
export type BadgeSearch$Outbound = {
|
|
75
|
-
appId: number | null;
|
|
76
|
-
appIds: Array<number> | null;
|
|
77
|
-
badgeId: string | null;
|
|
78
|
-
badgeIds: Array<string> | null;
|
|
79
|
-
colorSearch: Array<{ [k: string]: Array<string> }> | null;
|
|
80
|
-
isEvent: boolean | null;
|
|
81
|
-
isFoil: boolean | null;
|
|
82
|
-
isSale: boolean | null;
|
|
83
|
-
limit: number | null;
|
|
84
|
-
offset: number | null;
|
|
85
|
-
typeSearch: Array<{ [k: string]: Array<string> }> | null;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/** @internal */
|
|
89
|
-
export const BadgeSearch$outboundSchema: z.ZodType<
|
|
90
|
-
BadgeSearch$Outbound,
|
|
91
|
-
z.ZodTypeDef,
|
|
92
|
-
BadgeSearch
|
|
93
|
-
> = z.object({
|
|
94
|
-
appId: z.nullable(z.number().int()),
|
|
95
|
-
appIds: z.nullable(z.array(z.number().int())),
|
|
96
|
-
badgeId: z.nullable(z.string()),
|
|
97
|
-
badgeIds: z.nullable(z.array(z.string())),
|
|
98
|
-
colorSearch: z.nullable(z.array(z.record(z.array(z.string())))),
|
|
99
|
-
isEvent: z.nullable(z.boolean()),
|
|
100
|
-
isFoil: z.nullable(z.boolean()),
|
|
101
|
-
isSale: z.nullable(z.boolean()),
|
|
102
|
-
limit: z.nullable(z.number().int()),
|
|
103
|
-
offset: z.nullable(z.number().int()),
|
|
104
|
-
typeSearch: z.nullable(z.array(z.record(z.array(z.string())))),
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* @internal
|
|
109
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
110
|
-
*/
|
|
111
|
-
export namespace BadgeSearch$ {
|
|
112
|
-
/** @deprecated use `BadgeSearch$inboundSchema` instead. */
|
|
113
|
-
export const inboundSchema = BadgeSearch$inboundSchema;
|
|
114
|
-
/** @deprecated use `BadgeSearch$outboundSchema` instead. */
|
|
115
|
-
export const outboundSchema = BadgeSearch$outboundSchema;
|
|
116
|
-
/** @deprecated use `BadgeSearch$Outbound` instead. */
|
|
117
|
-
export type Outbound = BadgeSearch$Outbound;
|
|
118
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import * as components from "../components/index.js";
|
|
8
|
-
|
|
9
|
-
export type BadgeV1SearchResponse = {
|
|
10
|
-
httpMeta: components.HTTPMetadata;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
/** @internal */
|
|
14
|
-
export const BadgeV1SearchResponse$inboundSchema: z.ZodType<
|
|
15
|
-
BadgeV1SearchResponse,
|
|
16
|
-
z.ZodTypeDef,
|
|
17
|
-
unknown
|
|
18
|
-
> = z.object({
|
|
19
|
-
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
20
|
-
}).transform((v) => {
|
|
21
|
-
return remap$(v, {
|
|
22
|
-
"HttpMeta": "httpMeta",
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
/** @internal */
|
|
27
|
-
export type BadgeV1SearchResponse$Outbound = {
|
|
28
|
-
HttpMeta: components.HTTPMetadata$Outbound;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const BadgeV1SearchResponse$outboundSchema: z.ZodType<
|
|
33
|
-
BadgeV1SearchResponse$Outbound,
|
|
34
|
-
z.ZodTypeDef,
|
|
35
|
-
BadgeV1SearchResponse
|
|
36
|
-
> = z.object({
|
|
37
|
-
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
38
|
-
}).transform((v) => {
|
|
39
|
-
return remap$(v, {
|
|
40
|
-
httpMeta: "HttpMeta",
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* @internal
|
|
46
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
47
|
-
*/
|
|
48
|
-
export namespace BadgeV1SearchResponse$ {
|
|
49
|
-
/** @deprecated use `BadgeV1SearchResponse$inboundSchema` instead. */
|
|
50
|
-
export const inboundSchema = BadgeV1SearchResponse$inboundSchema;
|
|
51
|
-
/** @deprecated use `BadgeV1SearchResponse$outboundSchema` instead. */
|
|
52
|
-
export const outboundSchema = BadgeV1SearchResponse$outboundSchema;
|
|
53
|
-
/** @deprecated use `BadgeV1SearchResponse$Outbound` instead. */
|
|
54
|
-
export type Outbound = BadgeV1SearchResponse$Outbound;
|
|
55
|
-
}
|