@steamsets/client-ts 0.19.0 → 0.19.1
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 +4 -0
- package/docs/sdks/badge/README.md +77 -0
- package/docs/sdks/internal/README.md +77 -0
- package/funcs/badgeBadgeV1TagsSuggest.d.ts +12 -0
- package/funcs/badgeBadgeV1TagsSuggest.d.ts.map +1 -0
- package/funcs/badgeBadgeV1TagsSuggest.js +118 -0
- package/funcs/badgeBadgeV1TagsSuggest.js.map +1 -0
- package/funcs/internalBadgeV1TagsSuggest.d.ts +12 -0
- package/funcs/internalBadgeV1TagsSuggest.d.ts.map +1 -0
- package/funcs/internalBadgeV1TagsSuggest.js +118 -0
- package/funcs/internalBadgeV1TagsSuggest.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/badgesuggesttags.d.ts +36 -0
- package/models/components/badgesuggesttags.d.ts.map +1 -0
- package/models/components/badgesuggesttags.js +72 -0
- package/models/components/badgesuggesttags.js.map +1 -0
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/v1badgetagssuggestrequestbody.d.ts +32 -0
- package/models/components/v1badgetagssuggestrequestbody.d.ts.map +1 -0
- package/models/components/v1badgetagssuggestrequestbody.js +59 -0
- package/models/components/v1badgetagssuggestrequestbody.js.map +1 -0
- package/models/operations/badgev1tagssuggest.d.ts +35 -0
- package/models/operations/badgev1tagssuggest.d.ts.map +1 -0
- package/models/operations/badgev1tagssuggest.js +73 -0
- package/models/operations/badgev1tagssuggest.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/badge.d.ts +2 -0
- package/sdk/badge.d.ts.map +1 -1
- package/sdk/badge.js +4 -0
- package/sdk/badge.js.map +1 -1
- package/sdk/internal.d.ts +1 -0
- package/sdk/internal.d.ts.map +1 -1
- package/sdk/internal.js +4 -0
- package/sdk/internal.js.map +1 -1
- package/src/funcs/badgeBadgeV1TagsSuggest.ts +180 -0
- package/src/funcs/internalBadgeV1TagsSuggest.ts +180 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/badgesuggesttags.ts +86 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/v1badgetagssuggestrequestbody.ts +71 -0
- package/src/models/operations/badgev1tagssuggest.ts +85 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/badge.ts +13 -0
- package/src/sdk/internal.ts +12 -0
|
@@ -0,0 +1,180 @@
|
|
|
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 { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
export function badgeBadgeV1TagsSuggest(
|
|
29
|
+
client: SteamSetsCore,
|
|
30
|
+
request: components.V1BadgeTagsSuggestRequestBody,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<
|
|
33
|
+
Result<
|
|
34
|
+
operations.BadgeV1TagsSuggestResponse,
|
|
35
|
+
| errors.ErrorModel
|
|
36
|
+
| errors.ErrorModel
|
|
37
|
+
| SDKError
|
|
38
|
+
| SDKValidationError
|
|
39
|
+
| UnexpectedClientError
|
|
40
|
+
| InvalidRequestError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
>
|
|
45
|
+
> {
|
|
46
|
+
return new APIPromise($do(
|
|
47
|
+
client,
|
|
48
|
+
request,
|
|
49
|
+
options,
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function $do(
|
|
54
|
+
client: SteamSetsCore,
|
|
55
|
+
request: components.V1BadgeTagsSuggestRequestBody,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): Promise<
|
|
58
|
+
[
|
|
59
|
+
Result<
|
|
60
|
+
operations.BadgeV1TagsSuggestResponse,
|
|
61
|
+
| errors.ErrorModel
|
|
62
|
+
| errors.ErrorModel
|
|
63
|
+
| SDKError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
73
|
+
> {
|
|
74
|
+
const parsed = safeParse(
|
|
75
|
+
request,
|
|
76
|
+
(value) =>
|
|
77
|
+
components.V1BadgeTagsSuggestRequestBody$outboundSchema.parse(value),
|
|
78
|
+
"Input validation failed",
|
|
79
|
+
);
|
|
80
|
+
if (!parsed.ok) {
|
|
81
|
+
return [parsed, { status: "invalid" }];
|
|
82
|
+
}
|
|
83
|
+
const payload = parsed.value;
|
|
84
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
85
|
+
|
|
86
|
+
const path = pathToFunc("/badge.v1.BadgeService/SuggestTags")();
|
|
87
|
+
|
|
88
|
+
const headers = new Headers(compactMap({
|
|
89
|
+
"Content-Type": "application/json",
|
|
90
|
+
Accept: "application/json",
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
const secConfig = await extractSecurity(client._options.token);
|
|
94
|
+
const securityInput = secConfig == null ? {} : { token: secConfig };
|
|
95
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
96
|
+
|
|
97
|
+
const context = {
|
|
98
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
99
|
+
operationID: "badge.v1.tags.suggest",
|
|
100
|
+
oAuth2Scopes: [],
|
|
101
|
+
|
|
102
|
+
resolvedSecurity: requestSecurity,
|
|
103
|
+
|
|
104
|
+
securitySource: client._options.token,
|
|
105
|
+
retryConfig: options?.retries
|
|
106
|
+
|| client._options.retryConfig
|
|
107
|
+
|| {
|
|
108
|
+
strategy: "backoff",
|
|
109
|
+
backoff: {
|
|
110
|
+
initialInterval: 500,
|
|
111
|
+
maxInterval: 5000,
|
|
112
|
+
exponent: 1.5,
|
|
113
|
+
maxElapsedTime: 60000,
|
|
114
|
+
},
|
|
115
|
+
retryConnectionErrors: true,
|
|
116
|
+
}
|
|
117
|
+
|| { strategy: "none" },
|
|
118
|
+
retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const requestRes = client._createRequest(context, {
|
|
122
|
+
security: requestSecurity,
|
|
123
|
+
method: "POST",
|
|
124
|
+
baseURL: options?.serverURL,
|
|
125
|
+
path: path,
|
|
126
|
+
headers: headers,
|
|
127
|
+
body: body,
|
|
128
|
+
uaHeader: "x-speakeasy-user-agent",
|
|
129
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
130
|
+
}, options);
|
|
131
|
+
if (!requestRes.ok) {
|
|
132
|
+
return [requestRes, { status: "invalid" }];
|
|
133
|
+
}
|
|
134
|
+
const req = requestRes.value;
|
|
135
|
+
|
|
136
|
+
const doResult = await client._do(req, {
|
|
137
|
+
context,
|
|
138
|
+
errorCodes: ["403", "404", "422", "4XX", "500", "5XX"],
|
|
139
|
+
retryConfig: context.retryConfig,
|
|
140
|
+
retryCodes: context.retryCodes,
|
|
141
|
+
});
|
|
142
|
+
if (!doResult.ok) {
|
|
143
|
+
return [doResult, { status: "request-error", request: req }];
|
|
144
|
+
}
|
|
145
|
+
const response = doResult.value;
|
|
146
|
+
|
|
147
|
+
const responseFields = {
|
|
148
|
+
HttpMeta: { Response: response, Request: req },
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const [result] = await M.match<
|
|
152
|
+
operations.BadgeV1TagsSuggestResponse,
|
|
153
|
+
| errors.ErrorModel
|
|
154
|
+
| errors.ErrorModel
|
|
155
|
+
| SDKError
|
|
156
|
+
| SDKValidationError
|
|
157
|
+
| UnexpectedClientError
|
|
158
|
+
| InvalidRequestError
|
|
159
|
+
| RequestAbortedError
|
|
160
|
+
| RequestTimeoutError
|
|
161
|
+
| ConnectionError
|
|
162
|
+
>(
|
|
163
|
+
M.json(200, operations.BadgeV1TagsSuggestResponse$inboundSchema, {
|
|
164
|
+
key: "BadgeSuggestTags",
|
|
165
|
+
}),
|
|
166
|
+
M.jsonErr([403, 404, 422], errors.ErrorModel$inboundSchema, {
|
|
167
|
+
ctype: "application/problem+json",
|
|
168
|
+
}),
|
|
169
|
+
M.jsonErr(500, errors.ErrorModel$inboundSchema, {
|
|
170
|
+
ctype: "application/problem+json",
|
|
171
|
+
}),
|
|
172
|
+
M.fail("4XX"),
|
|
173
|
+
M.fail("5XX"),
|
|
174
|
+
)(response, req, { extraFields: responseFields });
|
|
175
|
+
if (!result.ok) {
|
|
176
|
+
return [result, { status: "complete", request: req, response }];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
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 { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
export function internalBadgeV1TagsSuggest(
|
|
29
|
+
client: SteamSetsCore,
|
|
30
|
+
request: components.V1BadgeTagsSuggestRequestBody,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<
|
|
33
|
+
Result<
|
|
34
|
+
operations.BadgeV1TagsSuggestResponse,
|
|
35
|
+
| errors.ErrorModel
|
|
36
|
+
| errors.ErrorModel
|
|
37
|
+
| SDKError
|
|
38
|
+
| SDKValidationError
|
|
39
|
+
| UnexpectedClientError
|
|
40
|
+
| InvalidRequestError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
>
|
|
45
|
+
> {
|
|
46
|
+
return new APIPromise($do(
|
|
47
|
+
client,
|
|
48
|
+
request,
|
|
49
|
+
options,
|
|
50
|
+
));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async function $do(
|
|
54
|
+
client: SteamSetsCore,
|
|
55
|
+
request: components.V1BadgeTagsSuggestRequestBody,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): Promise<
|
|
58
|
+
[
|
|
59
|
+
Result<
|
|
60
|
+
operations.BadgeV1TagsSuggestResponse,
|
|
61
|
+
| errors.ErrorModel
|
|
62
|
+
| errors.ErrorModel
|
|
63
|
+
| SDKError
|
|
64
|
+
| SDKValidationError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| InvalidRequestError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| ConnectionError
|
|
70
|
+
>,
|
|
71
|
+
APICall,
|
|
72
|
+
]
|
|
73
|
+
> {
|
|
74
|
+
const parsed = safeParse(
|
|
75
|
+
request,
|
|
76
|
+
(value) =>
|
|
77
|
+
components.V1BadgeTagsSuggestRequestBody$outboundSchema.parse(value),
|
|
78
|
+
"Input validation failed",
|
|
79
|
+
);
|
|
80
|
+
if (!parsed.ok) {
|
|
81
|
+
return [parsed, { status: "invalid" }];
|
|
82
|
+
}
|
|
83
|
+
const payload = parsed.value;
|
|
84
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
85
|
+
|
|
86
|
+
const path = pathToFunc("/badge.v1.BadgeService/SuggestTags")();
|
|
87
|
+
|
|
88
|
+
const headers = new Headers(compactMap({
|
|
89
|
+
"Content-Type": "application/json",
|
|
90
|
+
Accept: "application/json",
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
const secConfig = await extractSecurity(client._options.token);
|
|
94
|
+
const securityInput = secConfig == null ? {} : { token: secConfig };
|
|
95
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
96
|
+
|
|
97
|
+
const context = {
|
|
98
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
99
|
+
operationID: "badge.v1.tags.suggest",
|
|
100
|
+
oAuth2Scopes: [],
|
|
101
|
+
|
|
102
|
+
resolvedSecurity: requestSecurity,
|
|
103
|
+
|
|
104
|
+
securitySource: client._options.token,
|
|
105
|
+
retryConfig: options?.retries
|
|
106
|
+
|| client._options.retryConfig
|
|
107
|
+
|| {
|
|
108
|
+
strategy: "backoff",
|
|
109
|
+
backoff: {
|
|
110
|
+
initialInterval: 500,
|
|
111
|
+
maxInterval: 5000,
|
|
112
|
+
exponent: 1.5,
|
|
113
|
+
maxElapsedTime: 60000,
|
|
114
|
+
},
|
|
115
|
+
retryConnectionErrors: true,
|
|
116
|
+
}
|
|
117
|
+
|| { strategy: "none" },
|
|
118
|
+
retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const requestRes = client._createRequest(context, {
|
|
122
|
+
security: requestSecurity,
|
|
123
|
+
method: "POST",
|
|
124
|
+
baseURL: options?.serverURL,
|
|
125
|
+
path: path,
|
|
126
|
+
headers: headers,
|
|
127
|
+
body: body,
|
|
128
|
+
uaHeader: "x-speakeasy-user-agent",
|
|
129
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
130
|
+
}, options);
|
|
131
|
+
if (!requestRes.ok) {
|
|
132
|
+
return [requestRes, { status: "invalid" }];
|
|
133
|
+
}
|
|
134
|
+
const req = requestRes.value;
|
|
135
|
+
|
|
136
|
+
const doResult = await client._do(req, {
|
|
137
|
+
context,
|
|
138
|
+
errorCodes: ["403", "404", "422", "4XX", "500", "5XX"],
|
|
139
|
+
retryConfig: context.retryConfig,
|
|
140
|
+
retryCodes: context.retryCodes,
|
|
141
|
+
});
|
|
142
|
+
if (!doResult.ok) {
|
|
143
|
+
return [doResult, { status: "request-error", request: req }];
|
|
144
|
+
}
|
|
145
|
+
const response = doResult.value;
|
|
146
|
+
|
|
147
|
+
const responseFields = {
|
|
148
|
+
HttpMeta: { Response: response, Request: req },
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
const [result] = await M.match<
|
|
152
|
+
operations.BadgeV1TagsSuggestResponse,
|
|
153
|
+
| errors.ErrorModel
|
|
154
|
+
| errors.ErrorModel
|
|
155
|
+
| SDKError
|
|
156
|
+
| SDKValidationError
|
|
157
|
+
| UnexpectedClientError
|
|
158
|
+
| InvalidRequestError
|
|
159
|
+
| RequestAbortedError
|
|
160
|
+
| RequestTimeoutError
|
|
161
|
+
| ConnectionError
|
|
162
|
+
>(
|
|
163
|
+
M.json(200, operations.BadgeV1TagsSuggestResponse$inboundSchema, {
|
|
164
|
+
key: "BadgeSuggestTags",
|
|
165
|
+
}),
|
|
166
|
+
M.jsonErr([403, 404, 422], errors.ErrorModel$inboundSchema, {
|
|
167
|
+
ctype: "application/problem+json",
|
|
168
|
+
}),
|
|
169
|
+
M.jsonErr(500, errors.ErrorModel$inboundSchema, {
|
|
170
|
+
ctype: "application/problem+json",
|
|
171
|
+
}),
|
|
172
|
+
M.fail("4XX"),
|
|
173
|
+
M.fail("5XX"),
|
|
174
|
+
)(response, req, { extraFields: responseFields });
|
|
175
|
+
if (!result.ok) {
|
|
176
|
+
return [result, { status: "complete", request: req, response }];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -55,8 +55,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
55
55
|
export const SDK_METADATA = {
|
|
56
56
|
language: "typescript",
|
|
57
57
|
openapiDocVersion: "1.0.0",
|
|
58
|
-
sdkVersion: "0.19.
|
|
59
|
-
genVersion: "2.
|
|
58
|
+
sdkVersion: "0.19.1",
|
|
59
|
+
genVersion: "2.545.1",
|
|
60
60
|
userAgent:
|
|
61
|
-
"speakeasy-sdk/typescript 0.19.
|
|
61
|
+
"speakeasy-sdk/typescript 0.19.1 2.545.1 1.0.0 @steamsets/client-ts",
|
|
62
62
|
} as const;
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { 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 BadgeSuggestTags = {
|
|
12
|
+
/**
|
|
13
|
+
* A URL to the JSON Schema for this object.
|
|
14
|
+
*/
|
|
15
|
+
dollarSchema?: string | undefined;
|
|
16
|
+
colors: Array<string> | null;
|
|
17
|
+
designs: Array<string> | null;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const BadgeSuggestTags$inboundSchema: z.ZodType<
|
|
22
|
+
BadgeSuggestTags,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
$schema: z.string().optional(),
|
|
27
|
+
colors: z.nullable(z.array(z.string())),
|
|
28
|
+
designs: z.nullable(z.array(z.string())),
|
|
29
|
+
}).transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
"$schema": "dollarSchema",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type BadgeSuggestTags$Outbound = {
|
|
37
|
+
$schema?: string | undefined;
|
|
38
|
+
colors: Array<string> | null;
|
|
39
|
+
designs: Array<string> | null;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const BadgeSuggestTags$outboundSchema: z.ZodType<
|
|
44
|
+
BadgeSuggestTags$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
BadgeSuggestTags
|
|
47
|
+
> = z.object({
|
|
48
|
+
dollarSchema: z.string().optional(),
|
|
49
|
+
colors: z.nullable(z.array(z.string())),
|
|
50
|
+
designs: z.nullable(z.array(z.string())),
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
dollarSchema: "$schema",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @internal
|
|
59
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
+
*/
|
|
61
|
+
export namespace BadgeSuggestTags$ {
|
|
62
|
+
/** @deprecated use `BadgeSuggestTags$inboundSchema` instead. */
|
|
63
|
+
export const inboundSchema = BadgeSuggestTags$inboundSchema;
|
|
64
|
+
/** @deprecated use `BadgeSuggestTags$outboundSchema` instead. */
|
|
65
|
+
export const outboundSchema = BadgeSuggestTags$outboundSchema;
|
|
66
|
+
/** @deprecated use `BadgeSuggestTags$Outbound` instead. */
|
|
67
|
+
export type Outbound = BadgeSuggestTags$Outbound;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function badgeSuggestTagsToJSON(
|
|
71
|
+
badgeSuggestTags: BadgeSuggestTags,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
BadgeSuggestTags$outboundSchema.parse(badgeSuggestTags),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function badgeSuggestTagsFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<BadgeSuggestTags, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => BadgeSuggestTags$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'BadgeSuggestTags' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -8,6 +8,7 @@ export * from "./accountsearch.js";
|
|
|
8
8
|
export * from "./accountsearchidstruct.js";
|
|
9
9
|
export * from "./accountsearchvanitystruct.js";
|
|
10
10
|
export * from "./badge.js";
|
|
11
|
+
export * from "./badgesuggesttags.js";
|
|
11
12
|
export * from "./bestleaderboardrank.js";
|
|
12
13
|
export * from "./chosenrole.js";
|
|
13
14
|
export * from "./city.js";
|
|
@@ -83,6 +84,7 @@ export * from "./v1badgesresponsebody.js";
|
|
|
83
84
|
export * from "./v1badgetagrequestbody.js";
|
|
84
85
|
export * from "./v1badgetagresponsebody.js";
|
|
85
86
|
export * from "./v1badgetagsresponsebody.js";
|
|
87
|
+
export * from "./v1badgetagssuggestrequestbody.js";
|
|
86
88
|
export * from "./v1connectrequestbody.js";
|
|
87
89
|
export * from "./v1connectresponsebody.js";
|
|
88
90
|
export * from "./v1createsessionbody.js";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 V1BadgeTagsSuggestRequestBody = {
|
|
11
|
+
/**
|
|
12
|
+
* The ID of the badge to suggest tags for
|
|
13
|
+
*/
|
|
14
|
+
badgeId: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const V1BadgeTagsSuggestRequestBody$inboundSchema: z.ZodType<
|
|
19
|
+
V1BadgeTagsSuggestRequestBody,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
badgeId: z.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export type V1BadgeTagsSuggestRequestBody$Outbound = {
|
|
28
|
+
badgeId: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const V1BadgeTagsSuggestRequestBody$outboundSchema: z.ZodType<
|
|
33
|
+
V1BadgeTagsSuggestRequestBody$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
V1BadgeTagsSuggestRequestBody
|
|
36
|
+
> = z.object({
|
|
37
|
+
badgeId: z.string(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export namespace V1BadgeTagsSuggestRequestBody$ {
|
|
45
|
+
/** @deprecated use `V1BadgeTagsSuggestRequestBody$inboundSchema` instead. */
|
|
46
|
+
export const inboundSchema = V1BadgeTagsSuggestRequestBody$inboundSchema;
|
|
47
|
+
/** @deprecated use `V1BadgeTagsSuggestRequestBody$outboundSchema` instead. */
|
|
48
|
+
export const outboundSchema = V1BadgeTagsSuggestRequestBody$outboundSchema;
|
|
49
|
+
/** @deprecated use `V1BadgeTagsSuggestRequestBody$Outbound` instead. */
|
|
50
|
+
export type Outbound = V1BadgeTagsSuggestRequestBody$Outbound;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function v1BadgeTagsSuggestRequestBodyToJSON(
|
|
54
|
+
v1BadgeTagsSuggestRequestBody: V1BadgeTagsSuggestRequestBody,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
V1BadgeTagsSuggestRequestBody$outboundSchema.parse(
|
|
58
|
+
v1BadgeTagsSuggestRequestBody,
|
|
59
|
+
),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function v1BadgeTagsSuggestRequestBodyFromJSON(
|
|
64
|
+
jsonString: string,
|
|
65
|
+
): SafeParseResult<V1BadgeTagsSuggestRequestBody, SDKValidationError> {
|
|
66
|
+
return safeParse(
|
|
67
|
+
jsonString,
|
|
68
|
+
(x) => V1BadgeTagsSuggestRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
+
`Failed to parse 'V1BadgeTagsSuggestRequestBody' from JSON`,
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 { 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 BadgeV1TagsSuggestResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
badgeSuggestTags?: components.BadgeSuggestTags | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const BadgeV1TagsSuggestResponse$inboundSchema: z.ZodType<
|
|
22
|
+
BadgeV1TagsSuggestResponse,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
27
|
+
BadgeSuggestTags: components.BadgeSuggestTags$inboundSchema.optional(),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"HttpMeta": "httpMeta",
|
|
31
|
+
"BadgeSuggestTags": "badgeSuggestTags",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type BadgeV1TagsSuggestResponse$Outbound = {
|
|
37
|
+
HttpMeta: components.HTTPMetadata$Outbound;
|
|
38
|
+
BadgeSuggestTags?: components.BadgeSuggestTags$Outbound | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const BadgeV1TagsSuggestResponse$outboundSchema: z.ZodType<
|
|
43
|
+
BadgeV1TagsSuggestResponse$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
BadgeV1TagsSuggestResponse
|
|
46
|
+
> = z.object({
|
|
47
|
+
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
48
|
+
badgeSuggestTags: components.BadgeSuggestTags$outboundSchema.optional(),
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
httpMeta: "HttpMeta",
|
|
52
|
+
badgeSuggestTags: "BadgeSuggestTags",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
+
*/
|
|
60
|
+
export namespace BadgeV1TagsSuggestResponse$ {
|
|
61
|
+
/** @deprecated use `BadgeV1TagsSuggestResponse$inboundSchema` instead. */
|
|
62
|
+
export const inboundSchema = BadgeV1TagsSuggestResponse$inboundSchema;
|
|
63
|
+
/** @deprecated use `BadgeV1TagsSuggestResponse$outboundSchema` instead. */
|
|
64
|
+
export const outboundSchema = BadgeV1TagsSuggestResponse$outboundSchema;
|
|
65
|
+
/** @deprecated use `BadgeV1TagsSuggestResponse$Outbound` instead. */
|
|
66
|
+
export type Outbound = BadgeV1TagsSuggestResponse$Outbound;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function badgeV1TagsSuggestResponseToJSON(
|
|
70
|
+
badgeV1TagsSuggestResponse: BadgeV1TagsSuggestResponse,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
BadgeV1TagsSuggestResponse$outboundSchema.parse(badgeV1TagsSuggestResponse),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function badgeV1TagsSuggestResponseFromJSON(
|
|
78
|
+
jsonString: string,
|
|
79
|
+
): SafeParseResult<BadgeV1TagsSuggestResponse, SDKValidationError> {
|
|
80
|
+
return safeParse(
|
|
81
|
+
jsonString,
|
|
82
|
+
(x) => BadgeV1TagsSuggestResponse$inboundSchema.parse(JSON.parse(x)),
|
|
83
|
+
`Failed to parse 'BadgeV1TagsSuggestResponse' from JSON`,
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -45,6 +45,7 @@ export * from "./appv1listbadges.js";
|
|
|
45
45
|
export * from "./badgev1search.js";
|
|
46
46
|
export * from "./badgev1tag.js";
|
|
47
47
|
export * from "./badgev1tags.js";
|
|
48
|
+
export * from "./badgev1tagssuggest.js";
|
|
48
49
|
export * from "./leaderboardv1getaccount.js";
|
|
49
50
|
export * from "./leaderboardv1getaccountmeta.js";
|
|
50
51
|
export * from "./leaderboardv1getbadges.js";
|
package/src/sdk/badge.ts
CHANGED
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { badgeBadgeV1TagsSuggest } from "../funcs/badgeBadgeV1TagsSuggest.js";
|
|
5
6
|
import { badgeGetTags } from "../funcs/badgeGetTags.js";
|
|
6
7
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
8
|
+
import * as components from "../models/components/index.js";
|
|
7
9
|
import * as operations from "../models/operations/index.js";
|
|
8
10
|
import { unwrapAsync } from "../types/fp.js";
|
|
9
11
|
|
|
@@ -16,4 +18,15 @@ export class Badge extends ClientSDK {
|
|
|
16
18
|
options,
|
|
17
19
|
));
|
|
18
20
|
}
|
|
21
|
+
|
|
22
|
+
async badgeV1TagsSuggest(
|
|
23
|
+
request: components.V1BadgeTagsSuggestRequestBody,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<operations.BadgeV1TagsSuggestResponse> {
|
|
26
|
+
return unwrapAsync(badgeBadgeV1TagsSuggest(
|
|
27
|
+
this,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
));
|
|
31
|
+
}
|
|
19
32
|
}
|
package/src/sdk/internal.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { internalAccountV1GetMeta } from "../funcs/internalAccountV1GetMeta.js";
|
|
6
|
+
import { internalBadgeV1TagsSuggest } from "../funcs/internalBadgeV1TagsSuggest.js";
|
|
6
7
|
import { internalCheck } from "../funcs/internalCheck.js";
|
|
7
8
|
import { internalCreateDeveloperApp } from "../funcs/internalCreateDeveloperApp.js";
|
|
8
9
|
import { internalDeleteDeveloperApp } from "../funcs/internalDeleteDeveloperApp.js";
|
|
@@ -114,6 +115,17 @@ export class Internal extends ClientSDK {
|
|
|
114
115
|
));
|
|
115
116
|
}
|
|
116
117
|
|
|
118
|
+
async badgeV1TagsSuggest(
|
|
119
|
+
request: components.V1BadgeTagsSuggestRequestBody,
|
|
120
|
+
options?: RequestOptions,
|
|
121
|
+
): Promise<operations.BadgeV1TagsSuggestResponse> {
|
|
122
|
+
return unwrapAsync(internalBadgeV1TagsSuggest(
|
|
123
|
+
this,
|
|
124
|
+
request,
|
|
125
|
+
options,
|
|
126
|
+
));
|
|
127
|
+
}
|
|
128
|
+
|
|
117
129
|
async leaderboardV1GetAccountMeta(
|
|
118
130
|
request: components.V1LeaderboardAccountMetaRequestBody,
|
|
119
131
|
options?: RequestOptions,
|