@steamsets/client-ts 0.1.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/.devcontainer/README.md +35 -0
- package/README.md +389 -0
- package/core.d.ts +10 -0
- package/core.d.ts.map +1 -0
- package/core.js +17 -0
- package/core.js.map +1 -0
- package/docs/sdks/account/README.md +97 -0
- package/docs/sdks/liveness/README.md +51 -0
- package/docs/sdks/steamsets/README.md +7 -0
- package/funcs/accountAccountV1Apps.d.ts +13 -0
- package/funcs/accountAccountV1Apps.d.ts.map +1 -0
- package/funcs/accountAccountV1Apps.js +82 -0
- package/funcs/accountAccountV1Apps.js.map +1 -0
- package/funcs/accountAccountV1Badge.d.ts +13 -0
- package/funcs/accountAccountV1Badge.d.ts.map +1 -0
- package/funcs/accountAccountV1Badge.js +82 -0
- package/funcs/accountAccountV1Badge.js.map +1 -0
- package/funcs/livenessLiveness.d.ts +16 -0
- package/funcs/livenessLiveness.d.ts.map +1 -0
- package/funcs/livenessLiveness.js +83 -0
- package/funcs/livenessLiveness.js.map +1 -0
- package/hooks/hooks.d.ts +24 -0
- package/hooks/hooks.d.ts.map +1 -0
- package/hooks/hooks.js +66 -0
- package/hooks/hooks.js.map +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/index.js +22 -0
- package/hooks/index.js.map +1 -0
- package/hooks/types.d.ts +72 -0
- package/hooks/types.d.ts.map +1 -0
- package/hooks/types.js +6 -0
- package/hooks/types.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +22 -0
- package/index.js.map +1 -0
- package/lib/base64.d.ts +10 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +61 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +36 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +34 -0
- package/lib/config.js.map +1 -0
- package/lib/dlv.d.ts +14 -0
- package/lib/dlv.d.ts.map +1 -0
- package/lib/dlv.js +49 -0
- package/lib/dlv.js.map +1 -0
- package/lib/encodings.d.ts +51 -0
- package/lib/encodings.d.ts.map +1 -0
- package/lib/encodings.js +343 -0
- package/lib/encodings.js.map +1 -0
- package/lib/http.d.ts +66 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +217 -0
- package/lib/http.js.map +1 -0
- package/lib/is-plain-object.d.ts +2 -0
- package/lib/is-plain-object.d.ts.map +1 -0
- package/lib/is-plain-object.js +41 -0
- package/lib/is-plain-object.js.map +1 -0
- package/lib/matchers.d.ts +64 -0
- package/lib/matchers.d.ts.map +1 -0
- package/lib/matchers.js +209 -0
- package/lib/matchers.js.map +1 -0
- package/lib/primitives.d.ts +16 -0
- package/lib/primitives.d.ts.map +1 -0
- package/lib/primitives.js +29 -0
- package/lib/primitives.js.map +1 -0
- package/lib/retries.d.ts +18 -0
- package/lib/retries.d.ts.map +1 -0
- package/lib/retries.js +130 -0
- package/lib/retries.js.map +1 -0
- package/lib/schemas.d.ts +19 -0
- package/lib/schemas.d.ts.map +1 -0
- package/lib/schemas.js +59 -0
- package/lib/schemas.js.map +1 -0
- package/lib/sdks.d.ts +57 -0
- package/lib/sdks.d.ts.map +1 -0
- package/lib/sdks.js +159 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.d.ts +60 -0
- package/lib/security.d.ts.map +1 -0
- package/lib/security.js +130 -0
- package/lib/security.js.map +1 -0
- package/lib/url.d.ts +5 -0
- package/lib/url.d.ts.map +1 -0
- package/lib/url.js +25 -0
- package/lib/url.js.map +1 -0
- package/models/components/errordetail.d.ts +38 -0
- package/models/components/errordetail.d.ts.map +1 -0
- package/models/components/errordetail.js +54 -0
- package/models/components/errordetail.js.map +1 -0
- package/models/components/index.d.ts +8 -0
- package/models/components/index.d.ts.map +1 -0
- package/models/components/index.js +27 -0
- package/models/components/index.js.map +1 -0
- package/models/components/security.d.ts +27 -0
- package/models/components/security.d.ts.map +1 -0
- package/models/components/security.js +52 -0
- package/models/components/security.js.map +1 -0
- package/models/components/v1accountsappsresponsebody.d.ts +31 -0
- package/models/components/v1accountsappsresponsebody.d.ts.map +1 -0
- package/models/components/v1accountsappsresponsebody.js +66 -0
- package/models/components/v1accountsappsresponsebody.js.map +1 -0
- package/models/components/v1app.d.ts +53 -0
- package/models/components/v1app.d.ts.map +1 -0
- package/models/components/v1app.js +60 -0
- package/models/components/v1app.js.map +1 -0
- package/models/components/v1badge.d.ts +51 -0
- package/models/components/v1badge.d.ts.map +1 -0
- package/models/components/v1badge.js +79 -0
- package/models/components/v1badge.js.map +1 -0
- package/models/components/v1badgesappsresponsebody.d.ts +31 -0
- package/models/components/v1badgesappsresponsebody.d.ts.map +1 -0
- package/models/components/v1badgesappsresponsebody.js +66 -0
- package/models/components/v1badgesappsresponsebody.js.map +1 -0
- package/models/components/v1livenessresponsebody.d.ts +33 -0
- package/models/components/v1livenessresponsebody.d.ts.map +1 -0
- package/models/components/v1livenessresponsebody.js +65 -0
- package/models/components/v1livenessresponsebody.js.map +1 -0
- package/models/errors/errormodel.d.ts +98 -0
- package/models/errors/errormodel.d.ts.map +1 -0
- package/models/errors/errormodel.js +113 -0
- package/models/errors/errormodel.js.map +1 -0
- package/models/errors/httpclienterrors.d.ts +44 -0
- package/models/errors/httpclienterrors.d.ts.map +1 -0
- package/models/errors/httpclienterrors.js +78 -0
- package/models/errors/httpclienterrors.js.map +1 -0
- package/models/errors/index.d.ts +4 -0
- package/models/errors/index.d.ts.map +1 -0
- package/models/errors/index.js +23 -0
- package/models/errors/index.js.map +1 -0
- package/models/errors/sdkerror.d.ts +8 -0
- package/models/errors/sdkerror.d.ts.map +1 -0
- package/models/errors/sdkerror.js +21 -0
- package/models/errors/sdkerror.js.map +1 -0
- package/models/errors/sdkvalidationerror.d.ts +17 -0
- package/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/models/errors/sdkvalidationerror.js +107 -0
- package/models/errors/sdkvalidationerror.js.map +1 -0
- package/ns/LICENSE +201 -0
- package/ns/README.md +1 -0
- package/package.json +31 -0
- package/sdk/account.d.ts +13 -0
- package/sdk/account.d.ts.map +1 -0
- package/sdk/account.js +26 -0
- package/sdk/account.js.map +1 -0
- package/sdk/index.d.ts +2 -0
- package/sdk/index.d.ts.map +1 -0
- package/sdk/index.js +21 -0
- package/sdk/index.js.map +1 -0
- package/sdk/liveness.d.ts +12 -0
- package/sdk/liveness.d.ts.map +1 -0
- package/sdk/liveness.js +22 -0
- package/sdk/liveness.js.map +1 -0
- package/sdk/sdk.d.ts +10 -0
- package/sdk/sdk.d.ts.map +1 -0
- package/sdk/sdk.js +21 -0
- package/sdk/sdk.js.map +1 -0
- package/src/core.ts +13 -0
- package/src/funcs/accountAccountV1Apps.ts +109 -0
- package/src/funcs/accountAccountV1Badge.ts +109 -0
- package/src/funcs/livenessLiveness.ts +110 -0
- package/src/hooks/hooks.ts +99 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/types.ts +89 -0
- package/src/index.ts +6 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +60 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +449 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/matchers.ts +308 -0
- package/src/lib/primitives.ts +40 -0
- package/src/lib/retries.ts +187 -0
- package/src/lib/schemas.ts +74 -0
- package/src/lib/sdks.ts +261 -0
- package/src/lib/security.ts +198 -0
- package/src/lib/url.ts +33 -0
- package/src/models/components/errordetail.ts +58 -0
- package/src/models/components/index.ts +11 -0
- package/src/models/components/security.ts +42 -0
- package/src/models/components/v1accountsappsresponsebody.ts +66 -0
- package/src/models/components/v1app.ts +75 -0
- package/src/models/components/v1badge.ts +92 -0
- package/src/models/components/v1badgesappsresponsebody.ts +71 -0
- package/src/models/components/v1livenessresponsebody.ts +68 -0
- package/src/models/errors/errormodel.ts +174 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +7 -0
- package/src/models/errors/sdkerror.ts +25 -0
- package/src/models/errors/sdkvalidationerror.ts +95 -0
- package/src/sdk/account.ts +25 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/liveness.ts +20 -0
- package/src/sdk/sdk.ts +19 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +99 -0
- package/src/types/rfcdate.ts +54 -0
- package/types/blobs.d.ts +4 -0
- package/types/blobs.d.ts.map +1 -0
- package/types/blobs.js +52 -0
- package/types/blobs.js.map +1 -0
- package/types/enums.d.ts +12 -0
- package/types/enums.d.ts.map +1 -0
- package/types/enums.js +10 -0
- package/types/enums.js.map +1 -0
- package/types/fp.d.ts +31 -0
- package/types/fp.d.ts.map +1 -0
- package/types/fp.js +37 -0
- package/types/fp.js.map +1 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +16 -0
- package/types/index.js.map +1 -0
- package/types/operations.d.ts +25 -0
- package/types/operations.d.ts.map +1 -0
- package/types/operations.js +80 -0
- package/types/operations.js.map +1 -0
- package/types/rfcdate.d.ts +21 -0
- package/types/rfcdate.d.ts.map +1 -0
- package/types/rfcdate.js +46 -0
- package/types/rfcdate.js.map +1 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as components from "../models/components/index.js";
|
|
6
|
+
|
|
7
|
+
export enum SecurityErrorCode {
|
|
8
|
+
Incomplete = "incomplete",
|
|
9
|
+
UnrecognisedSecurityType = "unrecognized_security_type",
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export class SecurityError extends Error {
|
|
13
|
+
constructor(public code: SecurityErrorCode, message: string) {
|
|
14
|
+
super(message);
|
|
15
|
+
this.name = "SecurityError";
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static incomplete(): SecurityError {
|
|
19
|
+
return new SecurityError(
|
|
20
|
+
SecurityErrorCode.Incomplete,
|
|
21
|
+
"Security requirements not met in order to perform the operation"
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
static unrecognizedType(type: string): SecurityError {
|
|
25
|
+
return new SecurityError(
|
|
26
|
+
SecurityErrorCode.UnrecognisedSecurityType,
|
|
27
|
+
`Unrecognised security type: ${type}`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type SecurityState = {
|
|
33
|
+
basic: { username?: string | undefined; password?: string | undefined };
|
|
34
|
+
headers: Record<string, string>;
|
|
35
|
+
queryParams: Record<string, string>;
|
|
36
|
+
cookies: Record<string, string>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
type SecurityInputBasic = {
|
|
40
|
+
type: "http:basic";
|
|
41
|
+
value: { username?: string | undefined; password?: string | undefined } | null | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
type SecurityInputBearer = {
|
|
45
|
+
type: "http:bearer";
|
|
46
|
+
value: string | null | undefined;
|
|
47
|
+
fieldName: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
type SecurityInputAPIKey = {
|
|
51
|
+
type: "apiKey:header" | "apiKey:query" | "apiKey:cookie";
|
|
52
|
+
value: string | null | undefined;
|
|
53
|
+
fieldName: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
type SecurityInputOIDC = {
|
|
57
|
+
type: "openIdConnect";
|
|
58
|
+
value: string | null | undefined;
|
|
59
|
+
fieldName: string;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
type SecurityInputOAuth2 = {
|
|
63
|
+
type: "oauth2";
|
|
64
|
+
value: string | null | undefined;
|
|
65
|
+
fieldName: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
type SecurityInputOAuth2ClientCredentials = {
|
|
69
|
+
type: "oauth2:client_credentials";
|
|
70
|
+
value: { clientID?: string | undefined; clientSecret?: string | undefined } | null | undefined;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type SecurityInput =
|
|
74
|
+
| SecurityInputBasic
|
|
75
|
+
| SecurityInputBearer
|
|
76
|
+
| SecurityInputAPIKey
|
|
77
|
+
| SecurityInputOAuth2
|
|
78
|
+
| SecurityInputOAuth2ClientCredentials
|
|
79
|
+
| SecurityInputOIDC;
|
|
80
|
+
|
|
81
|
+
export function resolveSecurity(...options: SecurityInput[][]): SecurityState | null {
|
|
82
|
+
const state: SecurityState = {
|
|
83
|
+
basic: { username: "", password: "" },
|
|
84
|
+
headers: {},
|
|
85
|
+
queryParams: {},
|
|
86
|
+
cookies: {},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const option = options.find((opts) => {
|
|
90
|
+
return opts.every((o) => {
|
|
91
|
+
if (o.value == null) {
|
|
92
|
+
return false;
|
|
93
|
+
} else if (o.type === "http:basic") {
|
|
94
|
+
return o.value.username != null || o.value.password != null;
|
|
95
|
+
} else if (o.type === "oauth2:client_credentials") {
|
|
96
|
+
return o.value.clientID != null || o.value.clientSecret != null;
|
|
97
|
+
} else if (typeof o.value === "string") {
|
|
98
|
+
return !!o.value;
|
|
99
|
+
} else {
|
|
100
|
+
throw new Error(
|
|
101
|
+
`Unrecognized security type: ${o.type} (value type: ${typeof o.value})`
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
if (option == null) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
option.forEach((spec) => {
|
|
111
|
+
if (spec.value == null) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const { type } = spec;
|
|
116
|
+
|
|
117
|
+
switch (type) {
|
|
118
|
+
case "apiKey:header":
|
|
119
|
+
state.headers[spec.fieldName] = spec.value;
|
|
120
|
+
break;
|
|
121
|
+
case "apiKey:query":
|
|
122
|
+
state.queryParams[spec.fieldName] = spec.value;
|
|
123
|
+
break;
|
|
124
|
+
case "apiKey:cookie":
|
|
125
|
+
state.cookies[spec.fieldName] = spec.value;
|
|
126
|
+
break;
|
|
127
|
+
case "http:basic":
|
|
128
|
+
applyBasic(state, spec);
|
|
129
|
+
break;
|
|
130
|
+
case "http:bearer":
|
|
131
|
+
applyBearer(state, spec);
|
|
132
|
+
break;
|
|
133
|
+
case "oauth2":
|
|
134
|
+
applyBearer(state, spec);
|
|
135
|
+
break;
|
|
136
|
+
case "oauth2:client_credentials":
|
|
137
|
+
break;
|
|
138
|
+
case "openIdConnect":
|
|
139
|
+
applyBearer(state, spec);
|
|
140
|
+
break;
|
|
141
|
+
default:
|
|
142
|
+
spec satisfies never;
|
|
143
|
+
throw SecurityError.unrecognizedType(type);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
return state;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function applyBasic(state: SecurityState, spec: SecurityInputBasic) {
|
|
151
|
+
if (spec.value == null) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
state.basic = spec.value;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function applyBearer(
|
|
159
|
+
state: SecurityState,
|
|
160
|
+
spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC
|
|
161
|
+
) {
|
|
162
|
+
if (spec.value == null) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
let value = spec.value;
|
|
167
|
+
if (value.slice(0, 7).toLowerCase() !== "bearer ") {
|
|
168
|
+
value = `Bearer ${value}`;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
state.headers[spec.fieldName] = value;
|
|
172
|
+
}
|
|
173
|
+
export function resolveGlobalSecurity(
|
|
174
|
+
security: Partial<components.Security> | null | undefined
|
|
175
|
+
): SecurityState | null {
|
|
176
|
+
return resolveSecurity([
|
|
177
|
+
{
|
|
178
|
+
fieldName: "api-key",
|
|
179
|
+
type: "apiKey:header",
|
|
180
|
+
value: security?.apiKey,
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
fieldName: "Authorization",
|
|
184
|
+
type: "http:bearer",
|
|
185
|
+
value: security?.session,
|
|
186
|
+
},
|
|
187
|
+
]);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export async function extractSecurity<T extends string | Record<string, unknown>>(
|
|
191
|
+
sec: T | (() => Promise<T>) | undefined
|
|
192
|
+
): Promise<T | undefined> {
|
|
193
|
+
if (sec == null) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return typeof sec === "function" ? sec() : sec;
|
|
198
|
+
}
|
package/src/lib/url.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const hasOwn = Object.prototype.hasOwnProperty;
|
|
6
|
+
|
|
7
|
+
export type Params = Partial<Record<string, string | number>>;
|
|
8
|
+
|
|
9
|
+
export function pathToFunc(
|
|
10
|
+
pathPattern: string,
|
|
11
|
+
options?: { charEncoding?: "percent" | "none" },
|
|
12
|
+
): (params?: Params) => string {
|
|
13
|
+
const paramRE = /\{([a-zA-Z0-9_]+?)\}/g;
|
|
14
|
+
|
|
15
|
+
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
|
+
return pathPattern.replace(paramRE, function (_, placeholder) {
|
|
17
|
+
if (!hasOwn.call(params, placeholder)) {
|
|
18
|
+
throw new Error(`Parameter '${placeholder}' is required`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const value = params[placeholder];
|
|
22
|
+
if (typeof value !== "string" && typeof value !== "number") {
|
|
23
|
+
throw new Error(
|
|
24
|
+
`Parameter '${placeholder}' must be a string or number`,
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return options?.charEncoding === "percent"
|
|
29
|
+
? encodeURIComponent(`${value}`)
|
|
30
|
+
: `${value}`;
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type ErrorDetail = {
|
|
8
|
+
/**
|
|
9
|
+
* Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
|
|
10
|
+
*/
|
|
11
|
+
location?: string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Error message text
|
|
14
|
+
*/
|
|
15
|
+
message?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The value at the given location
|
|
18
|
+
*/
|
|
19
|
+
value?: any | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const ErrorDetail$inboundSchema: z.ZodType<ErrorDetail, z.ZodTypeDef, unknown> = z.object({
|
|
24
|
+
location: z.string().optional(),
|
|
25
|
+
message: z.string().optional(),
|
|
26
|
+
value: z.any().optional(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export type ErrorDetail$Outbound = {
|
|
31
|
+
location?: string | undefined;
|
|
32
|
+
message?: string | undefined;
|
|
33
|
+
value?: any | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const ErrorDetail$outboundSchema: z.ZodType<
|
|
38
|
+
ErrorDetail$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
ErrorDetail
|
|
41
|
+
> = z.object({
|
|
42
|
+
location: z.string().optional(),
|
|
43
|
+
message: z.string().optional(),
|
|
44
|
+
value: z.any().optional(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace ErrorDetail$ {
|
|
52
|
+
/** @deprecated use `ErrorDetail$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = ErrorDetail$inboundSchema;
|
|
54
|
+
/** @deprecated use `ErrorDetail$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = ErrorDetail$outboundSchema;
|
|
56
|
+
/** @deprecated use `ErrorDetail$Outbound` instead. */
|
|
57
|
+
export type Outbound = ErrorDetail$Outbound;
|
|
58
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from "./errordetail.js";
|
|
6
|
+
export * from "./security.js";
|
|
7
|
+
export * from "./v1accountsappsresponsebody.js";
|
|
8
|
+
export * from "./v1app.js";
|
|
9
|
+
export * from "./v1badge.js";
|
|
10
|
+
export * from "./v1badgesappsresponsebody.js";
|
|
11
|
+
export * from "./v1livenessresponsebody.js";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type Security = {
|
|
8
|
+
apiKey: string;
|
|
9
|
+
session: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const Security$inboundSchema: z.ZodType<Security, z.ZodTypeDef, unknown> = z.object({
|
|
14
|
+
apiKey: z.string(),
|
|
15
|
+
session: z.string(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type Security$Outbound = {
|
|
20
|
+
apiKey: string;
|
|
21
|
+
session: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const Security$outboundSchema: z.ZodType<Security$Outbound, z.ZodTypeDef, Security> =
|
|
26
|
+
z.object({
|
|
27
|
+
apiKey: z.string(),
|
|
28
|
+
session: z.string(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
34
|
+
*/
|
|
35
|
+
export namespace Security$ {
|
|
36
|
+
/** @deprecated use `Security$inboundSchema` instead. */
|
|
37
|
+
export const inboundSchema = Security$inboundSchema;
|
|
38
|
+
/** @deprecated use `Security$outboundSchema` instead. */
|
|
39
|
+
export const outboundSchema = Security$outboundSchema;
|
|
40
|
+
/** @deprecated use `Security$Outbound` instead. */
|
|
41
|
+
export type Outbound = Security$Outbound;
|
|
42
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import { V1App, V1App$inboundSchema, V1App$Outbound, V1App$outboundSchema } from "./v1app.js";
|
|
7
|
+
import * as z from "zod";
|
|
8
|
+
|
|
9
|
+
export type V1AccountsAppsResponseBody = {
|
|
10
|
+
/**
|
|
11
|
+
* A URL to the JSON Schema for this object.
|
|
12
|
+
*/
|
|
13
|
+
dollarSchema?: string | undefined;
|
|
14
|
+
apps: Array<V1App> | null;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const V1AccountsAppsResponseBody$inboundSchema: z.ZodType<
|
|
19
|
+
V1AccountsAppsResponseBody,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z
|
|
23
|
+
.object({
|
|
24
|
+
$schema: z.string().optional(),
|
|
25
|
+
apps: z.nullable(z.array(V1App$inboundSchema)),
|
|
26
|
+
})
|
|
27
|
+
.transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
$schema: "dollarSchema",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type V1AccountsAppsResponseBody$Outbound = {
|
|
35
|
+
$schema?: string | undefined;
|
|
36
|
+
apps: Array<V1App$Outbound> | null;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const V1AccountsAppsResponseBody$outboundSchema: z.ZodType<
|
|
41
|
+
V1AccountsAppsResponseBody$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
V1AccountsAppsResponseBody
|
|
44
|
+
> = z
|
|
45
|
+
.object({
|
|
46
|
+
dollarSchema: z.string().optional(),
|
|
47
|
+
apps: z.nullable(z.array(V1App$outboundSchema)),
|
|
48
|
+
})
|
|
49
|
+
.transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
dollarSchema: "$schema",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
+
*/
|
|
59
|
+
export namespace V1AccountsAppsResponseBody$ {
|
|
60
|
+
/** @deprecated use `V1AccountsAppsResponseBody$inboundSchema` instead. */
|
|
61
|
+
export const inboundSchema = V1AccountsAppsResponseBody$inboundSchema;
|
|
62
|
+
/** @deprecated use `V1AccountsAppsResponseBody$outboundSchema` instead. */
|
|
63
|
+
export const outboundSchema = V1AccountsAppsResponseBody$outboundSchema;
|
|
64
|
+
/** @deprecated use `V1AccountsAppsResponseBody$Outbound` instead. */
|
|
65
|
+
export type Outbound = V1AccountsAppsResponseBody$Outbound;
|
|
66
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type V1App = {
|
|
8
|
+
/**
|
|
9
|
+
* The Steam App ID
|
|
10
|
+
*/
|
|
11
|
+
id: number;
|
|
12
|
+
/**
|
|
13
|
+
* The App's image URL
|
|
14
|
+
*/
|
|
15
|
+
image: string;
|
|
16
|
+
/**
|
|
17
|
+
* The App's name
|
|
18
|
+
*/
|
|
19
|
+
name: string;
|
|
20
|
+
/**
|
|
21
|
+
* The Account's playtime in the App
|
|
22
|
+
*/
|
|
23
|
+
playtime: number;
|
|
24
|
+
/**
|
|
25
|
+
* How much the app costs
|
|
26
|
+
*/
|
|
27
|
+
price: number;
|
|
28
|
+
/**
|
|
29
|
+
* The App's short name
|
|
30
|
+
*/
|
|
31
|
+
shortName: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const V1App$inboundSchema: z.ZodType<V1App, z.ZodTypeDef, unknown> = z.object({
|
|
36
|
+
id: z.number().int(),
|
|
37
|
+
image: z.string(),
|
|
38
|
+
name: z.string(),
|
|
39
|
+
playtime: z.number().int(),
|
|
40
|
+
price: z.number().int(),
|
|
41
|
+
shortName: z.string(),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type V1App$Outbound = {
|
|
46
|
+
id: number;
|
|
47
|
+
image: string;
|
|
48
|
+
name: string;
|
|
49
|
+
playtime: number;
|
|
50
|
+
price: number;
|
|
51
|
+
shortName: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const V1App$outboundSchema: z.ZodType<V1App$Outbound, z.ZodTypeDef, V1App> = z.object({
|
|
56
|
+
id: z.number().int(),
|
|
57
|
+
image: z.string(),
|
|
58
|
+
name: z.string(),
|
|
59
|
+
playtime: z.number().int(),
|
|
60
|
+
price: z.number().int(),
|
|
61
|
+
shortName: z.string(),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace V1App$ {
|
|
69
|
+
/** @deprecated use `V1App$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = V1App$inboundSchema;
|
|
71
|
+
/** @deprecated use `V1App$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = V1App$outboundSchema;
|
|
73
|
+
/** @deprecated use `V1App$Outbound` instead. */
|
|
74
|
+
export type Outbound = V1App$Outbound;
|
|
75
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
export type V1Badge = {
|
|
8
|
+
appId: number;
|
|
9
|
+
appImage: string;
|
|
10
|
+
appName: string;
|
|
11
|
+
appShortName: string;
|
|
12
|
+
badgeImage: string;
|
|
13
|
+
completedAt: Date;
|
|
14
|
+
isFoil: boolean;
|
|
15
|
+
level: number;
|
|
16
|
+
name: string;
|
|
17
|
+
price: number;
|
|
18
|
+
publicId: string;
|
|
19
|
+
scarcity: number;
|
|
20
|
+
steamId: number;
|
|
21
|
+
xp: number;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const V1Badge$inboundSchema: z.ZodType<V1Badge, z.ZodTypeDef, unknown> = z.object({
|
|
26
|
+
appId: z.number().int(),
|
|
27
|
+
appImage: z.string(),
|
|
28
|
+
appName: z.string(),
|
|
29
|
+
appShortName: z.string(),
|
|
30
|
+
badgeImage: z.string(),
|
|
31
|
+
completedAt: z
|
|
32
|
+
.string()
|
|
33
|
+
.datetime({ offset: true })
|
|
34
|
+
.transform((v) => new Date(v)),
|
|
35
|
+
isFoil: z.boolean(),
|
|
36
|
+
level: z.number().int(),
|
|
37
|
+
name: z.string(),
|
|
38
|
+
price: z.number().int(),
|
|
39
|
+
publicId: z.string(),
|
|
40
|
+
scarcity: z.number().int(),
|
|
41
|
+
steamId: z.number().int(),
|
|
42
|
+
xp: z.number().int(),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type V1Badge$Outbound = {
|
|
47
|
+
appId: number;
|
|
48
|
+
appImage: string;
|
|
49
|
+
appName: string;
|
|
50
|
+
appShortName: string;
|
|
51
|
+
badgeImage: string;
|
|
52
|
+
completedAt: string;
|
|
53
|
+
isFoil: boolean;
|
|
54
|
+
level: number;
|
|
55
|
+
name: string;
|
|
56
|
+
price: number;
|
|
57
|
+
publicId: string;
|
|
58
|
+
scarcity: number;
|
|
59
|
+
steamId: number;
|
|
60
|
+
xp: number;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const V1Badge$outboundSchema: z.ZodType<V1Badge$Outbound, z.ZodTypeDef, V1Badge> = z.object({
|
|
65
|
+
appId: z.number().int(),
|
|
66
|
+
appImage: z.string(),
|
|
67
|
+
appName: z.string(),
|
|
68
|
+
appShortName: z.string(),
|
|
69
|
+
badgeImage: z.string(),
|
|
70
|
+
completedAt: z.date().transform((v) => v.toISOString()),
|
|
71
|
+
isFoil: z.boolean(),
|
|
72
|
+
level: z.number().int(),
|
|
73
|
+
name: z.string(),
|
|
74
|
+
price: z.number().int(),
|
|
75
|
+
publicId: z.string(),
|
|
76
|
+
scarcity: z.number().int(),
|
|
77
|
+
steamId: z.number().int(),
|
|
78
|
+
xp: z.number().int(),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
84
|
+
*/
|
|
85
|
+
export namespace V1Badge$ {
|
|
86
|
+
/** @deprecated use `V1Badge$inboundSchema` instead. */
|
|
87
|
+
export const inboundSchema = V1Badge$inboundSchema;
|
|
88
|
+
/** @deprecated use `V1Badge$outboundSchema` instead. */
|
|
89
|
+
export const outboundSchema = V1Badge$outboundSchema;
|
|
90
|
+
/** @deprecated use `V1Badge$Outbound` instead. */
|
|
91
|
+
export type Outbound = V1Badge$Outbound;
|
|
92
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import {
|
|
7
|
+
V1Badge,
|
|
8
|
+
V1Badge$inboundSchema,
|
|
9
|
+
V1Badge$Outbound,
|
|
10
|
+
V1Badge$outboundSchema,
|
|
11
|
+
} from "./v1badge.js";
|
|
12
|
+
import * as z from "zod";
|
|
13
|
+
|
|
14
|
+
export type V1BadgesAppsResponseBody = {
|
|
15
|
+
/**
|
|
16
|
+
* A URL to the JSON Schema for this object.
|
|
17
|
+
*/
|
|
18
|
+
dollarSchema?: string | undefined;
|
|
19
|
+
badges: Array<V1Badge> | null;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const V1BadgesAppsResponseBody$inboundSchema: z.ZodType<
|
|
24
|
+
V1BadgesAppsResponseBody,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z
|
|
28
|
+
.object({
|
|
29
|
+
$schema: z.string().optional(),
|
|
30
|
+
badges: z.nullable(z.array(V1Badge$inboundSchema)),
|
|
31
|
+
})
|
|
32
|
+
.transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
$schema: "dollarSchema",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type V1BadgesAppsResponseBody$Outbound = {
|
|
40
|
+
$schema?: string | undefined;
|
|
41
|
+
badges: Array<V1Badge$Outbound> | null;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const V1BadgesAppsResponseBody$outboundSchema: z.ZodType<
|
|
46
|
+
V1BadgesAppsResponseBody$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
V1BadgesAppsResponseBody
|
|
49
|
+
> = z
|
|
50
|
+
.object({
|
|
51
|
+
dollarSchema: z.string().optional(),
|
|
52
|
+
badges: z.nullable(z.array(V1Badge$outboundSchema)),
|
|
53
|
+
})
|
|
54
|
+
.transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
dollarSchema: "$schema",
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace V1BadgesAppsResponseBody$ {
|
|
65
|
+
/** @deprecated use `V1BadgesAppsResponseBody$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = V1BadgesAppsResponseBody$inboundSchema;
|
|
67
|
+
/** @deprecated use `V1BadgesAppsResponseBody$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = V1BadgesAppsResponseBody$outboundSchema;
|
|
69
|
+
/** @deprecated use `V1BadgesAppsResponseBody$Outbound` instead. */
|
|
70
|
+
export type Outbound = V1BadgesAppsResponseBody$Outbound;
|
|
71
|
+
}
|