@steamsets/client-ts 0.14.23 → 0.14.25
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/account/README.md +79 -0
- package/docs/sdks/connection/README.md +79 -0
- package/docs/sdks/connections/README.md +3 -3
- package/funcs/accountAccountV1ConnectionReconnect.d.ts +11 -0
- package/funcs/accountAccountV1ConnectionReconnect.d.ts.map +1 -0
- package/funcs/accountAccountV1ConnectionReconnect.js +113 -0
- package/funcs/accountAccountV1ConnectionReconnect.js.map +1 -0
- package/funcs/connectionAccountV1ConnectionReconnect.d.ts +11 -0
- package/funcs/connectionAccountV1ConnectionReconnect.d.ts.map +1 -0
- package/funcs/connectionAccountV1ConnectionReconnect.js +113 -0
- package/funcs/connectionAccountV1ConnectionReconnect.js.map +1 -0
- package/funcs/connectionsConnect.d.ts +1 -1
- package/funcs/connectionsConnect.d.ts.map +1 -1
- package/funcs/connectionsConnect.js +2 -2
- package/funcs/connectionsConnect.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/connection.d.ts +8 -8
- package/models/components/connection.d.ts.map +1 -1
- package/models/components/connection.js +13 -14
- package/models/components/connection.js.map +1 -1
- 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/v1badgesearchresponsebody.d.ts +2 -0
- package/models/components/v1badgesearchresponsebody.d.ts.map +1 -1
- package/models/components/v1badgesearchresponsebody.js +2 -0
- package/models/components/v1badgesearchresponsebody.js.map +1 -1
- package/models/components/v1connectrequestbody.d.ts +87 -0
- package/models/components/v1connectrequestbody.d.ts.map +1 -0
- package/models/components/v1connectrequestbody.js +90 -0
- package/models/components/v1connectrequestbody.js.map +1 -0
- package/models/components/v1connectresponsebody.d.ts +42 -0
- package/models/components/v1connectresponsebody.d.ts.map +1 -0
- package/models/components/v1connectresponsebody.js +72 -0
- package/models/components/v1connectresponsebody.js.map +1 -0
- package/models/components/v1searchrequest.d.ts +2 -0
- package/models/components/v1searchrequest.d.ts.map +1 -1
- package/models/components/v1searchrequest.js +2 -0
- package/models/components/v1searchrequest.js.map +1 -1
- package/models/operations/accountv1connectionconnect.d.ts +2 -2
- package/models/operations/accountv1connectionconnect.d.ts.map +1 -1
- package/models/operations/accountv1connectionconnect.js +4 -4
- package/models/operations/accountv1connectionconnect.js.map +1 -1
- package/models/operations/accountv1connectionreconnect.d.ts +35 -0
- package/models/operations/accountv1connectionreconnect.d.ts.map +1 -0
- package/models/operations/accountv1connectionreconnect.js +75 -0
- package/models/operations/accountv1connectionreconnect.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/account.d.ts +1 -0
- package/sdk/account.d.ts.map +1 -1
- package/sdk/account.js +4 -0
- package/sdk/account.js.map +1 -1
- package/sdk/connection.d.ts +1 -0
- package/sdk/connection.d.ts.map +1 -1
- package/sdk/connection.js +4 -0
- package/sdk/connection.js.map +1 -1
- package/sdk/connections.d.ts +1 -1
- package/sdk/connections.d.ts.map +1 -1
- package/sdk/connections.js.map +1 -1
- package/src/funcs/accountAccountV1ConnectionReconnect.ts +149 -0
- package/src/funcs/connectionAccountV1ConnectionReconnect.ts +149 -0
- package/src/funcs/connectionsConnect.ts +3 -3
- package/src/lib/config.ts +2 -2
- package/src/models/components/connection.ts +16 -14
- package/src/models/components/index.ts +2 -0
- package/src/models/components/v1badgesearchresponsebody.ts +4 -0
- package/src/models/components/v1connectrequestbody.ts +114 -0
- package/src/models/components/v1connectresponsebody.ts +92 -0
- package/src/models/components/v1searchrequest.ts +4 -0
- package/src/models/operations/accountv1connectionconnect.ts +6 -8
- package/src/models/operations/accountv1connectionreconnect.ts +94 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/account.ts +12 -0
- package/src/sdk/connection.ts +12 -0
- package/src/sdk/connections.ts +1 -1
|
@@ -0,0 +1,149 @@
|
|
|
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 { Result } from "../types/fp.js";
|
|
26
|
+
|
|
27
|
+
export async function connectionAccountV1ConnectionReconnect(
|
|
28
|
+
client: SteamSetsCore,
|
|
29
|
+
request: components.V1ReconnectRequestBody,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): Promise<
|
|
32
|
+
Result<
|
|
33
|
+
operations.AccountV1ConnectionReconnectResponse,
|
|
34
|
+
| errors.ErrorModel
|
|
35
|
+
| errors.ErrorModel
|
|
36
|
+
| SDKError
|
|
37
|
+
| SDKValidationError
|
|
38
|
+
| UnexpectedClientError
|
|
39
|
+
| InvalidRequestError
|
|
40
|
+
| RequestAbortedError
|
|
41
|
+
| RequestTimeoutError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
>
|
|
44
|
+
> {
|
|
45
|
+
const parsed = safeParse(
|
|
46
|
+
request,
|
|
47
|
+
(value) => components.V1ReconnectRequestBody$outboundSchema.parse(value),
|
|
48
|
+
"Input validation failed",
|
|
49
|
+
);
|
|
50
|
+
if (!parsed.ok) {
|
|
51
|
+
return parsed;
|
|
52
|
+
}
|
|
53
|
+
const payload = parsed.value;
|
|
54
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
55
|
+
|
|
56
|
+
const path = pathToFunc("/account.v1.AccountService/Reconnect")();
|
|
57
|
+
|
|
58
|
+
const headers = new Headers(compactMap({
|
|
59
|
+
"Content-Type": "application/json",
|
|
60
|
+
Accept: "application/json",
|
|
61
|
+
}));
|
|
62
|
+
|
|
63
|
+
const secConfig = await extractSecurity(client._options.token);
|
|
64
|
+
const securityInput = secConfig == null ? {} : { token: secConfig };
|
|
65
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
66
|
+
|
|
67
|
+
const context = {
|
|
68
|
+
operationID: "account.v1.connection.reconnect",
|
|
69
|
+
oAuth2Scopes: [],
|
|
70
|
+
|
|
71
|
+
resolvedSecurity: requestSecurity,
|
|
72
|
+
|
|
73
|
+
securitySource: client._options.token,
|
|
74
|
+
retryConfig: options?.retries
|
|
75
|
+
|| client._options.retryConfig
|
|
76
|
+
|| {
|
|
77
|
+
strategy: "backoff",
|
|
78
|
+
backoff: {
|
|
79
|
+
initialInterval: 500,
|
|
80
|
+
maxInterval: 5000,
|
|
81
|
+
exponent: 1.5,
|
|
82
|
+
maxElapsedTime: 60000,
|
|
83
|
+
},
|
|
84
|
+
retryConnectionErrors: true,
|
|
85
|
+
}
|
|
86
|
+
|| { strategy: "none" },
|
|
87
|
+
retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const requestRes = client._createRequest(context, {
|
|
91
|
+
security: requestSecurity,
|
|
92
|
+
method: "POST",
|
|
93
|
+
baseURL: options?.serverURL,
|
|
94
|
+
path: path,
|
|
95
|
+
headers: headers,
|
|
96
|
+
body: body,
|
|
97
|
+
uaHeader: "x-speakeasy-user-agent",
|
|
98
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
99
|
+
}, options);
|
|
100
|
+
if (!requestRes.ok) {
|
|
101
|
+
return requestRes;
|
|
102
|
+
}
|
|
103
|
+
const req = requestRes.value;
|
|
104
|
+
|
|
105
|
+
const doResult = await client._do(req, {
|
|
106
|
+
context,
|
|
107
|
+
errorCodes: ["400", "422", "4XX", "500", "5XX"],
|
|
108
|
+
retryConfig: context.retryConfig,
|
|
109
|
+
retryCodes: context.retryCodes,
|
|
110
|
+
});
|
|
111
|
+
if (!doResult.ok) {
|
|
112
|
+
return doResult;
|
|
113
|
+
}
|
|
114
|
+
const response = doResult.value;
|
|
115
|
+
|
|
116
|
+
const responseFields = {
|
|
117
|
+
HttpMeta: { Response: response, Request: req },
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const [result] = await M.match<
|
|
121
|
+
operations.AccountV1ConnectionReconnectResponse,
|
|
122
|
+
| errors.ErrorModel
|
|
123
|
+
| errors.ErrorModel
|
|
124
|
+
| SDKError
|
|
125
|
+
| SDKValidationError
|
|
126
|
+
| UnexpectedClientError
|
|
127
|
+
| InvalidRequestError
|
|
128
|
+
| RequestAbortedError
|
|
129
|
+
| RequestTimeoutError
|
|
130
|
+
| ConnectionError
|
|
131
|
+
>(
|
|
132
|
+
M.json(200, operations.AccountV1ConnectionReconnectResponse$inboundSchema, {
|
|
133
|
+
key: "V1ReconnectResponseBody",
|
|
134
|
+
}),
|
|
135
|
+
M.jsonErr([400, 422], errors.ErrorModel$inboundSchema, {
|
|
136
|
+
ctype: "application/problem+json",
|
|
137
|
+
}),
|
|
138
|
+
M.jsonErr(500, errors.ErrorModel$inboundSchema, {
|
|
139
|
+
ctype: "application/problem+json",
|
|
140
|
+
}),
|
|
141
|
+
M.fail("4XX"),
|
|
142
|
+
M.fail("5XX"),
|
|
143
|
+
)(response, req, { extraFields: responseFields });
|
|
144
|
+
if (!result.ok) {
|
|
145
|
+
return result;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
return result;
|
|
149
|
+
}
|
|
@@ -26,7 +26,7 @@ import { Result } from "../types/fp.js";
|
|
|
26
26
|
|
|
27
27
|
export async function connectionsConnect(
|
|
28
28
|
client: SteamSetsCore,
|
|
29
|
-
request: components.
|
|
29
|
+
request: components.V1ConnectRequestBody,
|
|
30
30
|
options?: RequestOptions,
|
|
31
31
|
): Promise<
|
|
32
32
|
Result<
|
|
@@ -44,7 +44,7 @@ export async function connectionsConnect(
|
|
|
44
44
|
> {
|
|
45
45
|
const parsed = safeParse(
|
|
46
46
|
request,
|
|
47
|
-
(value) => components.
|
|
47
|
+
(value) => components.V1ConnectRequestBody$outboundSchema.parse(value),
|
|
48
48
|
"Input validation failed",
|
|
49
49
|
);
|
|
50
50
|
if (!parsed.ok) {
|
|
@@ -130,7 +130,7 @@ export async function connectionsConnect(
|
|
|
130
130
|
| ConnectionError
|
|
131
131
|
>(
|
|
132
132
|
M.json(200, operations.AccountV1ConnectionConnectResponse$inboundSchema, {
|
|
133
|
-
key: "
|
|
133
|
+
key: "V1ConnectResponseBody",
|
|
134
134
|
}),
|
|
135
135
|
M.jsonErr([400, 422], errors.ErrorModel$inboundSchema, {
|
|
136
136
|
ctype: "application/problem+json",
|
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.14.
|
|
58
|
+
sdkVersion: "0.14.25",
|
|
59
59
|
genVersion: "2.495.1",
|
|
60
60
|
userAgent:
|
|
61
|
-
"speakeasy-sdk/typescript 0.14.
|
|
61
|
+
"speakeasy-sdk/typescript 0.14.25 2.495.1 1.0.0 @steamsets/client-ts",
|
|
62
62
|
} as const;
|
|
@@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
11
11
|
/**
|
|
12
12
|
* The provider to connect with
|
|
13
13
|
*/
|
|
14
|
-
export const
|
|
14
|
+
export const ConnectionProvider = {
|
|
15
15
|
Discord: "discord",
|
|
16
16
|
Patreon: "patreon",
|
|
17
17
|
Kick: "kick",
|
|
@@ -24,7 +24,7 @@ export const Provider = {
|
|
|
24
24
|
/**
|
|
25
25
|
* The provider to connect with
|
|
26
26
|
*/
|
|
27
|
-
export type
|
|
27
|
+
export type ConnectionProvider = ClosedEnum<typeof ConnectionProvider>;
|
|
28
28
|
|
|
29
29
|
export type Connection = {
|
|
30
30
|
/**
|
|
@@ -54,7 +54,7 @@ export type Connection = {
|
|
|
54
54
|
/**
|
|
55
55
|
* The provider to connect with
|
|
56
56
|
*/
|
|
57
|
-
provider:
|
|
57
|
+
provider: ConnectionProvider;
|
|
58
58
|
/**
|
|
59
59
|
* Whether the connection has been verified or not
|
|
60
60
|
*/
|
|
@@ -62,22 +62,24 @@ export type Connection = {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
/** @internal */
|
|
65
|
-
export const
|
|
66
|
-
|
|
65
|
+
export const ConnectionProvider$inboundSchema: z.ZodNativeEnum<
|
|
66
|
+
typeof ConnectionProvider
|
|
67
|
+
> = z.nativeEnum(ConnectionProvider);
|
|
67
68
|
|
|
68
69
|
/** @internal */
|
|
69
|
-
export const
|
|
70
|
-
|
|
70
|
+
export const ConnectionProvider$outboundSchema: z.ZodNativeEnum<
|
|
71
|
+
typeof ConnectionProvider
|
|
72
|
+
> = ConnectionProvider$inboundSchema;
|
|
71
73
|
|
|
72
74
|
/**
|
|
73
75
|
* @internal
|
|
74
76
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
77
|
*/
|
|
76
|
-
export namespace
|
|
77
|
-
/** @deprecated use `
|
|
78
|
-
export const inboundSchema =
|
|
79
|
-
/** @deprecated use `
|
|
80
|
-
export const outboundSchema =
|
|
78
|
+
export namespace ConnectionProvider$ {
|
|
79
|
+
/** @deprecated use `ConnectionProvider$inboundSchema` instead. */
|
|
80
|
+
export const inboundSchema = ConnectionProvider$inboundSchema;
|
|
81
|
+
/** @deprecated use `ConnectionProvider$outboundSchema` instead. */
|
|
82
|
+
export const outboundSchema = ConnectionProvider$outboundSchema;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
85
|
/** @internal */
|
|
@@ -92,7 +94,7 @@ export const Connection$inboundSchema: z.ZodType<
|
|
|
92
94
|
failed: z.boolean(),
|
|
93
95
|
hide: z.boolean(),
|
|
94
96
|
name: z.string(),
|
|
95
|
-
provider:
|
|
97
|
+
provider: ConnectionProvider$inboundSchema,
|
|
96
98
|
verified: z.boolean(),
|
|
97
99
|
});
|
|
98
100
|
|
|
@@ -120,7 +122,7 @@ export const Connection$outboundSchema: z.ZodType<
|
|
|
120
122
|
failed: z.boolean(),
|
|
121
123
|
hide: z.boolean(),
|
|
122
124
|
name: z.string(),
|
|
123
|
-
provider:
|
|
125
|
+
provider: ConnectionProvider$outboundSchema,
|
|
124
126
|
verified: z.boolean(),
|
|
125
127
|
});
|
|
126
128
|
|
|
@@ -80,6 +80,8 @@ export * from "./v1badgesresponsebody.js";
|
|
|
80
80
|
export * from "./v1badgetagrequestbody.js";
|
|
81
81
|
export * from "./v1badgetagresponsebody.js";
|
|
82
82
|
export * from "./v1badgetagsresponsebody.js";
|
|
83
|
+
export * from "./v1connectrequestbody.js";
|
|
84
|
+
export * from "./v1connectresponsebody.js";
|
|
83
85
|
export * from "./v1createsessionbody.js";
|
|
84
86
|
export * from "./v1deleteconnectionrequestbody.js";
|
|
85
87
|
export * from "./v1deleteconnectionresponsebody.js";
|
|
@@ -20,6 +20,7 @@ export type V1BadgeSearchResponseBody = {
|
|
|
20
20
|
*/
|
|
21
21
|
dollarSchema?: string | undefined;
|
|
22
22
|
badges: Array<Badge> | null;
|
|
23
|
+
facets?: any | undefined;
|
|
23
24
|
/**
|
|
24
25
|
* total number of pages
|
|
25
26
|
*/
|
|
@@ -38,6 +39,7 @@ export const V1BadgeSearchResponseBody$inboundSchema: z.ZodType<
|
|
|
38
39
|
> = z.object({
|
|
39
40
|
$schema: z.string().optional(),
|
|
40
41
|
badges: z.nullable(z.array(Badge$inboundSchema)),
|
|
42
|
+
facets: z.any().optional(),
|
|
41
43
|
pages: z.number().int(),
|
|
42
44
|
results: z.number().int(),
|
|
43
45
|
}).transform((v) => {
|
|
@@ -50,6 +52,7 @@ export const V1BadgeSearchResponseBody$inboundSchema: z.ZodType<
|
|
|
50
52
|
export type V1BadgeSearchResponseBody$Outbound = {
|
|
51
53
|
$schema?: string | undefined;
|
|
52
54
|
badges: Array<Badge$Outbound> | null;
|
|
55
|
+
facets?: any | undefined;
|
|
53
56
|
pages: number;
|
|
54
57
|
results: number;
|
|
55
58
|
};
|
|
@@ -62,6 +65,7 @@ export const V1BadgeSearchResponseBody$outboundSchema: z.ZodType<
|
|
|
62
65
|
> = z.object({
|
|
63
66
|
dollarSchema: z.string().optional(),
|
|
64
67
|
badges: z.nullable(z.array(Badge$outboundSchema)),
|
|
68
|
+
facets: z.any().optional(),
|
|
65
69
|
pages: z.number().int(),
|
|
66
70
|
results: z.number().int(),
|
|
67
71
|
}).transform((v) => {
|
|
@@ -0,0 +1,114 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The provider to connect with
|
|
13
|
+
*/
|
|
14
|
+
export const Provider = {
|
|
15
|
+
Discord: "discord",
|
|
16
|
+
Patreon: "patreon",
|
|
17
|
+
Kick: "kick",
|
|
18
|
+
Reddit: "reddit",
|
|
19
|
+
Twitch: "twitch",
|
|
20
|
+
Youtube: "youtube",
|
|
21
|
+
X: "x",
|
|
22
|
+
Domain: "domain",
|
|
23
|
+
} as const;
|
|
24
|
+
/**
|
|
25
|
+
* The provider to connect with
|
|
26
|
+
*/
|
|
27
|
+
export type Provider = ClosedEnum<typeof Provider>;
|
|
28
|
+
|
|
29
|
+
export type V1ConnectRequestBody = {
|
|
30
|
+
/**
|
|
31
|
+
* The code from the oauth2 provider to verify
|
|
32
|
+
*/
|
|
33
|
+
code: string;
|
|
34
|
+
/**
|
|
35
|
+
* The provider to connect with
|
|
36
|
+
*/
|
|
37
|
+
provider: Provider;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
|
|
42
|
+
.nativeEnum(Provider);
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
|
|
46
|
+
Provider$inboundSchema;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace Provider$ {
|
|
53
|
+
/** @deprecated use `Provider$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = Provider$inboundSchema;
|
|
55
|
+
/** @deprecated use `Provider$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema = Provider$outboundSchema;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const V1ConnectRequestBody$inboundSchema: z.ZodType<
|
|
61
|
+
V1ConnectRequestBody,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
unknown
|
|
64
|
+
> = z.object({
|
|
65
|
+
code: z.string(),
|
|
66
|
+
provider: Provider$inboundSchema,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export type V1ConnectRequestBody$Outbound = {
|
|
71
|
+
code: string;
|
|
72
|
+
provider: string;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const V1ConnectRequestBody$outboundSchema: z.ZodType<
|
|
77
|
+
V1ConnectRequestBody$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
V1ConnectRequestBody
|
|
80
|
+
> = z.object({
|
|
81
|
+
code: z.string(),
|
|
82
|
+
provider: Provider$outboundSchema,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
88
|
+
*/
|
|
89
|
+
export namespace V1ConnectRequestBody$ {
|
|
90
|
+
/** @deprecated use `V1ConnectRequestBody$inboundSchema` instead. */
|
|
91
|
+
export const inboundSchema = V1ConnectRequestBody$inboundSchema;
|
|
92
|
+
/** @deprecated use `V1ConnectRequestBody$outboundSchema` instead. */
|
|
93
|
+
export const outboundSchema = V1ConnectRequestBody$outboundSchema;
|
|
94
|
+
/** @deprecated use `V1ConnectRequestBody$Outbound` instead. */
|
|
95
|
+
export type Outbound = V1ConnectRequestBody$Outbound;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function v1ConnectRequestBodyToJSON(
|
|
99
|
+
v1ConnectRequestBody: V1ConnectRequestBody,
|
|
100
|
+
): string {
|
|
101
|
+
return JSON.stringify(
|
|
102
|
+
V1ConnectRequestBody$outboundSchema.parse(v1ConnectRequestBody),
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function v1ConnectRequestBodyFromJSON(
|
|
107
|
+
jsonString: string,
|
|
108
|
+
): SafeParseResult<V1ConnectRequestBody, SDKValidationError> {
|
|
109
|
+
return safeParse(
|
|
110
|
+
jsonString,
|
|
111
|
+
(x) => V1ConnectRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
112
|
+
`Failed to parse 'V1ConnectRequestBody' from JSON`,
|
|
113
|
+
);
|
|
114
|
+
}
|
|
@@ -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
|
+
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 V1ConnectResponseBody = {
|
|
12
|
+
/**
|
|
13
|
+
* A URL to the JSON Schema for this object.
|
|
14
|
+
*/
|
|
15
|
+
dollarSchema?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Code that has to be used to verify domain connections
|
|
18
|
+
*/
|
|
19
|
+
code: string;
|
|
20
|
+
/**
|
|
21
|
+
* Public ID of the connection only for domain connections
|
|
22
|
+
*/
|
|
23
|
+
connectionId?: string | null | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const V1ConnectResponseBody$inboundSchema: z.ZodType<
|
|
28
|
+
V1ConnectResponseBody,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
$schema: z.string().optional(),
|
|
33
|
+
code: z.string(),
|
|
34
|
+
connectionId: z.nullable(z.string()).optional(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"$schema": "dollarSchema",
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type V1ConnectResponseBody$Outbound = {
|
|
43
|
+
$schema?: string | undefined;
|
|
44
|
+
code: string;
|
|
45
|
+
connectionId?: string | null | undefined;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const V1ConnectResponseBody$outboundSchema: z.ZodType<
|
|
50
|
+
V1ConnectResponseBody$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
V1ConnectResponseBody
|
|
53
|
+
> = z.object({
|
|
54
|
+
dollarSchema: z.string().optional(),
|
|
55
|
+
code: z.string(),
|
|
56
|
+
connectionId: z.nullable(z.string()).optional(),
|
|
57
|
+
}).transform((v) => {
|
|
58
|
+
return remap$(v, {
|
|
59
|
+
dollarSchema: "$schema",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
+
*/
|
|
67
|
+
export namespace V1ConnectResponseBody$ {
|
|
68
|
+
/** @deprecated use `V1ConnectResponseBody$inboundSchema` instead. */
|
|
69
|
+
export const inboundSchema = V1ConnectResponseBody$inboundSchema;
|
|
70
|
+
/** @deprecated use `V1ConnectResponseBody$outboundSchema` instead. */
|
|
71
|
+
export const outboundSchema = V1ConnectResponseBody$outboundSchema;
|
|
72
|
+
/** @deprecated use `V1ConnectResponseBody$Outbound` instead. */
|
|
73
|
+
export type Outbound = V1ConnectResponseBody$Outbound;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function v1ConnectResponseBodyToJSON(
|
|
77
|
+
v1ConnectResponseBody: V1ConnectResponseBody,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
V1ConnectResponseBody$outboundSchema.parse(v1ConnectResponseBody),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function v1ConnectResponseBodyFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<V1ConnectResponseBody, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => V1ConnectResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'V1ConnectResponseBody' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -8,6 +8,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
10
|
export type V1SearchRequest = {
|
|
11
|
+
facets?: Array<string> | null | undefined;
|
|
11
12
|
/**
|
|
12
13
|
* The filter to apply to the search
|
|
13
14
|
*/
|
|
@@ -27,6 +28,7 @@ export const V1SearchRequest$inboundSchema: z.ZodType<
|
|
|
27
28
|
z.ZodTypeDef,
|
|
28
29
|
unknown
|
|
29
30
|
> = z.object({
|
|
31
|
+
facets: z.nullable(z.array(z.string())).optional(),
|
|
30
32
|
filter: z.string(),
|
|
31
33
|
limit: z.nullable(z.number().int()).optional(),
|
|
32
34
|
offset: z.nullable(z.number().int()).optional(),
|
|
@@ -36,6 +38,7 @@ export const V1SearchRequest$inboundSchema: z.ZodType<
|
|
|
36
38
|
|
|
37
39
|
/** @internal */
|
|
38
40
|
export type V1SearchRequest$Outbound = {
|
|
41
|
+
facets?: Array<string> | null | undefined;
|
|
39
42
|
filter: string;
|
|
40
43
|
limit?: number | null | undefined;
|
|
41
44
|
offset?: number | null | undefined;
|
|
@@ -49,6 +52,7 @@ export const V1SearchRequest$outboundSchema: z.ZodType<
|
|
|
49
52
|
z.ZodTypeDef,
|
|
50
53
|
V1SearchRequest
|
|
51
54
|
> = z.object({
|
|
55
|
+
facets: z.nullable(z.array(z.string())).optional(),
|
|
52
56
|
filter: z.string(),
|
|
53
57
|
limit: z.nullable(z.number().int()).optional(),
|
|
54
58
|
offset: z.nullable(z.number().int()).optional(),
|
|
@@ -14,7 +14,7 @@ export type AccountV1ConnectionConnectResponse = {
|
|
|
14
14
|
/**
|
|
15
15
|
* OK
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
v1ConnectResponseBody?: components.V1ConnectResponseBody | undefined;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/** @internal */
|
|
@@ -24,21 +24,19 @@ export const AccountV1ConnectionConnectResponse$inboundSchema: z.ZodType<
|
|
|
24
24
|
unknown
|
|
25
25
|
> = z.object({
|
|
26
26
|
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
27
|
-
|
|
27
|
+
V1ConnectResponseBody: components.V1ConnectResponseBody$inboundSchema
|
|
28
28
|
.optional(),
|
|
29
29
|
}).transform((v) => {
|
|
30
30
|
return remap$(v, {
|
|
31
31
|
"HttpMeta": "httpMeta",
|
|
32
|
-
"
|
|
32
|
+
"V1ConnectResponseBody": "v1ConnectResponseBody",
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
/** @internal */
|
|
37
37
|
export type AccountV1ConnectionConnectResponse$Outbound = {
|
|
38
38
|
HttpMeta: components.HTTPMetadata$Outbound;
|
|
39
|
-
|
|
40
|
-
| components.V1ReconnectResponseBody$Outbound
|
|
41
|
-
| undefined;
|
|
39
|
+
V1ConnectResponseBody?: components.V1ConnectResponseBody$Outbound | undefined;
|
|
42
40
|
};
|
|
43
41
|
|
|
44
42
|
/** @internal */
|
|
@@ -48,12 +46,12 @@ export const AccountV1ConnectionConnectResponse$outboundSchema: z.ZodType<
|
|
|
48
46
|
AccountV1ConnectionConnectResponse
|
|
49
47
|
> = z.object({
|
|
50
48
|
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
51
|
-
|
|
49
|
+
v1ConnectResponseBody: components.V1ConnectResponseBody$outboundSchema
|
|
52
50
|
.optional(),
|
|
53
51
|
}).transform((v) => {
|
|
54
52
|
return remap$(v, {
|
|
55
53
|
httpMeta: "HttpMeta",
|
|
56
|
-
|
|
54
|
+
v1ConnectResponseBody: "V1ConnectResponseBody",
|
|
57
55
|
});
|
|
58
56
|
});
|
|
59
57
|
|
|
@@ -0,0 +1,94 @@
|
|
|
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 AccountV1ConnectionReconnectResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
v1ReconnectResponseBody?: components.V1ReconnectResponseBody | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const AccountV1ConnectionReconnectResponse$inboundSchema: z.ZodType<
|
|
22
|
+
AccountV1ConnectionReconnectResponse,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
27
|
+
V1ReconnectResponseBody: components.V1ReconnectResponseBody$inboundSchema
|
|
28
|
+
.optional(),
|
|
29
|
+
}).transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
"HttpMeta": "httpMeta",
|
|
32
|
+
"V1ReconnectResponseBody": "v1ReconnectResponseBody",
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type AccountV1ConnectionReconnectResponse$Outbound = {
|
|
38
|
+
HttpMeta: components.HTTPMetadata$Outbound;
|
|
39
|
+
V1ReconnectResponseBody?:
|
|
40
|
+
| components.V1ReconnectResponseBody$Outbound
|
|
41
|
+
| undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const AccountV1ConnectionReconnectResponse$outboundSchema: z.ZodType<
|
|
46
|
+
AccountV1ConnectionReconnectResponse$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
AccountV1ConnectionReconnectResponse
|
|
49
|
+
> = z.object({
|
|
50
|
+
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
51
|
+
v1ReconnectResponseBody: components.V1ReconnectResponseBody$outboundSchema
|
|
52
|
+
.optional(),
|
|
53
|
+
}).transform((v) => {
|
|
54
|
+
return remap$(v, {
|
|
55
|
+
httpMeta: "HttpMeta",
|
|
56
|
+
v1ReconnectResponseBody: "V1ReconnectResponseBody",
|
|
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 AccountV1ConnectionReconnectResponse$ {
|
|
65
|
+
/** @deprecated use `AccountV1ConnectionReconnectResponse$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema =
|
|
67
|
+
AccountV1ConnectionReconnectResponse$inboundSchema;
|
|
68
|
+
/** @deprecated use `AccountV1ConnectionReconnectResponse$outboundSchema` instead. */
|
|
69
|
+
export const outboundSchema =
|
|
70
|
+
AccountV1ConnectionReconnectResponse$outboundSchema;
|
|
71
|
+
/** @deprecated use `AccountV1ConnectionReconnectResponse$Outbound` instead. */
|
|
72
|
+
export type Outbound = AccountV1ConnectionReconnectResponse$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function accountV1ConnectionReconnectResponseToJSON(
|
|
76
|
+
accountV1ConnectionReconnectResponse: AccountV1ConnectionReconnectResponse,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
AccountV1ConnectionReconnectResponse$outboundSchema.parse(
|
|
80
|
+
accountV1ConnectionReconnectResponse,
|
|
81
|
+
),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function accountV1ConnectionReconnectResponseFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<AccountV1ConnectionReconnectResponse, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) =>
|
|
91
|
+
AccountV1ConnectionReconnectResponse$inboundSchema.parse(JSON.parse(x)),
|
|
92
|
+
`Failed to parse 'AccountV1ConnectionReconnectResponse' from JSON`,
|
|
93
|
+
);
|
|
94
|
+
}
|