@maesn/typescript-sdk 0.8.29 → 0.8.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -10
- package/esm/funcs/{events-handle-callback.d.ts → accounting-book-payment.d.ts} +3 -2
- package/esm/funcs/accounting-book-payment.d.ts.map +1 -0
- package/esm/funcs/{events-handle-callback.js → accounting-book-payment.js} +14 -8
- package/esm/funcs/accounting-book-payment.js.map +1 -0
- package/esm/funcs/{events-get-code.d.ts → auth-validate-connection.d.ts} +2 -2
- package/esm/funcs/auth-validate-connection.d.ts.map +1 -0
- package/esm/funcs/{events-get-code.js → auth-validate-connection.js} +8 -14
- package/esm/funcs/auth-validate-connection.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/env.d.ts.map +1 -1
- package/esm/lib/env.js +4 -1
- package/esm/lib/env.js.map +1 -1
- package/esm/models/connection-validation-response-dto.d.ts +17 -0
- package/esm/models/connection-validation-response-dto.d.ts.map +1 -0
- package/esm/models/connection-validation-response-dto.js +15 -0
- package/esm/models/connection-validation-response-dto.js.map +1 -0
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +2 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/invoice-response-dto.d.ts +1 -0
- package/esm/models/invoice-response-dto.d.ts.map +1 -1
- package/esm/models/invoice-response-dto.js +1 -0
- package/esm/models/invoice-response-dto.js.map +1 -1
- package/esm/models/operations/book-payment.d.ts +36 -0
- package/esm/models/operations/book-payment.d.ts.map +1 -0
- package/esm/models/operations/book-payment.js +16 -0
- package/esm/models/operations/book-payment.js.map +1 -0
- package/esm/models/operations/index.d.ts +2 -3
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +2 -3
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/validate-connection.d.ts +64 -0
- package/esm/models/operations/validate-connection.d.ts.map +1 -0
- package/esm/models/operations/validate-connection.js +55 -0
- package/esm/models/operations/validate-connection.js.map +1 -0
- package/esm/models/submission-page-input-texts-dto.d.ts +30 -0
- package/esm/models/submission-page-input-texts-dto.d.ts.map +1 -0
- package/esm/models/submission-page-input-texts-dto.js +21 -0
- package/esm/models/submission-page-input-texts-dto.js.map +1 -0
- package/esm/models/submission-page-localization-dto.d.ts +5 -0
- package/esm/models/submission-page-localization-dto.d.ts.map +1 -1
- package/esm/models/submission-page-localization-dto.js +3 -0
- package/esm/models/submission-page-localization-dto.js.map +1 -1
- package/esm/sdk/accounting.d.ts +1 -0
- package/esm/sdk/accounting.d.ts.map +1 -1
- package/esm/sdk/accounting.js +4 -0
- package/esm/sdk/accounting.js.map +1 -1
- package/esm/sdk/auth.d.ts +1 -0
- package/esm/sdk/auth.d.ts.map +1 -1
- package/esm/sdk/auth.js +4 -0
- package/esm/sdk/auth.js.map +1 -1
- package/esm/sdk/sdk.d.ts +0 -3
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +0 -5
- package/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +2 -2
- package/src/funcs/{events-handle-configuration-callback.ts → accounting-book-payment.ts} +19 -16
- package/src/funcs/{events-get-code.ts → auth-validate-connection.ts} +16 -18
- package/src/lib/config.ts +3 -3
- package/src/lib/env.ts +7 -1
- package/src/models/connection-validation-response-dto.ts +39 -0
- package/src/models/index.ts +2 -0
- package/src/models/invoice-response-dto.ts +2 -0
- package/src/models/operations/book-payment.ts +59 -0
- package/src/models/operations/index.ts +2 -3
- package/src/models/operations/validate-connection.ts +178 -0
- package/src/models/submission-page-input-texts-dto.ts +59 -0
- package/src/models/submission-page-localization-dto.ts +11 -0
- package/src/sdk/accounting.ts +12 -0
- package/src/sdk/auth.ts +12 -0
- package/src/sdk/sdk.ts +0 -6
- package/esm/funcs/events-get-code.d.ts.map +0 -1
- package/esm/funcs/events-get-code.js.map +0 -1
- package/esm/funcs/events-handle-callback.d.ts.map +0 -1
- package/esm/funcs/events-handle-callback.js.map +0 -1
- package/esm/funcs/events-handle-configuration-callback.d.ts +0 -11
- package/esm/funcs/events-handle-configuration-callback.d.ts.map +0 -1
- package/esm/funcs/events-handle-configuration-callback.js +0 -76
- package/esm/funcs/events-handle-configuration-callback.js.map +0 -1
- package/esm/models/operations/get-code.d.ts +0 -35
- package/esm/models/operations/get-code.d.ts.map +0 -1
- package/esm/models/operations/get-code.js +0 -20
- package/esm/models/operations/get-code.js.map +0 -1
- package/esm/models/operations/handle-callback.d.ts +0 -35
- package/esm/models/operations/handle-callback.d.ts.map +0 -1
- package/esm/models/operations/handle-callback.js +0 -20
- package/esm/models/operations/handle-callback.js.map +0 -1
- package/esm/models/operations/handle-configuration-callback.d.ts +0 -35
- package/esm/models/operations/handle-configuration-callback.d.ts.map +0 -1
- package/esm/models/operations/handle-configuration-callback.js +0 -20
- package/esm/models/operations/handle-configuration-callback.js.map +0 -1
- package/esm/sdk/events.d.ts +0 -8
- package/esm/sdk/events.d.ts.map +0 -1
- package/esm/sdk/events.js +0 -20
- package/esm/sdk/events.js.map +0 -1
- package/src/funcs/events-handle-callback.ts +0 -166
- package/src/models/operations/get-code.ts +0 -67
- package/src/models/operations/handle-callback.ts +0 -71
- package/src/models/operations/handle-configuration-callback.ts +0 -74
- package/src/sdk/events.ts +0 -45
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { MaesnCore } from "../core.js";
|
|
7
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
8
|
-
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
-
import * as M from "../lib/matchers.js";
|
|
10
|
-
import { compactMap } from "../lib/primitives.js";
|
|
11
|
-
import { safeParse } from "../lib/schemas.js";
|
|
12
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
-
import { pathToFunc } from "../lib/url.js";
|
|
14
|
-
import {
|
|
15
|
-
ConnectionError,
|
|
16
|
-
InvalidRequestError,
|
|
17
|
-
RequestAbortedError,
|
|
18
|
-
RequestTimeoutError,
|
|
19
|
-
UnexpectedClientError,
|
|
20
|
-
} from "../models/errors/http-client-errors.js";
|
|
21
|
-
import { MaesnError } from "../models/errors/maesn-error.js";
|
|
22
|
-
import { ResponseValidationError } from "../models/errors/response-validation-error.js";
|
|
23
|
-
import { SDKValidationError } from "../models/errors/sdk-validation-error.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 eventsHandleCallback(
|
|
29
|
-
client: MaesnCore,
|
|
30
|
-
request: operations.HandleCallbackRequest,
|
|
31
|
-
options?: RequestOptions,
|
|
32
|
-
): APIPromise<
|
|
33
|
-
Result<
|
|
34
|
-
operations.HandleCallbackResponse,
|
|
35
|
-
| MaesnError
|
|
36
|
-
| ResponseValidationError
|
|
37
|
-
| ConnectionError
|
|
38
|
-
| RequestAbortedError
|
|
39
|
-
| RequestTimeoutError
|
|
40
|
-
| InvalidRequestError
|
|
41
|
-
| UnexpectedClientError
|
|
42
|
-
| SDKValidationError
|
|
43
|
-
>
|
|
44
|
-
> {
|
|
45
|
-
return new APIPromise($do(
|
|
46
|
-
client,
|
|
47
|
-
request,
|
|
48
|
-
options,
|
|
49
|
-
));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
async function $do(
|
|
53
|
-
client: MaesnCore,
|
|
54
|
-
request: operations.HandleCallbackRequest,
|
|
55
|
-
options?: RequestOptions,
|
|
56
|
-
): Promise<
|
|
57
|
-
[
|
|
58
|
-
Result<
|
|
59
|
-
operations.HandleCallbackResponse,
|
|
60
|
-
| MaesnError
|
|
61
|
-
| ResponseValidationError
|
|
62
|
-
| ConnectionError
|
|
63
|
-
| RequestAbortedError
|
|
64
|
-
| RequestTimeoutError
|
|
65
|
-
| InvalidRequestError
|
|
66
|
-
| UnexpectedClientError
|
|
67
|
-
| SDKValidationError
|
|
68
|
-
>,
|
|
69
|
-
APICall,
|
|
70
|
-
]
|
|
71
|
-
> {
|
|
72
|
-
const parsed = safeParse(
|
|
73
|
-
request,
|
|
74
|
-
(value) => z.parse(operations.HandleCallbackRequest$outboundSchema, value),
|
|
75
|
-
"Input validation failed",
|
|
76
|
-
);
|
|
77
|
-
if (!parsed.ok) {
|
|
78
|
-
return [parsed, { status: "invalid" }];
|
|
79
|
-
}
|
|
80
|
-
const payload = parsed.value;
|
|
81
|
-
const body = null;
|
|
82
|
-
|
|
83
|
-
const pathParams = {
|
|
84
|
-
code: encodeSimple("code", payload.code, {
|
|
85
|
-
explode: false,
|
|
86
|
-
charEncoding: "percent",
|
|
87
|
-
}),
|
|
88
|
-
};
|
|
89
|
-
const path = pathToFunc("/events/callback/{code}")(pathParams);
|
|
90
|
-
|
|
91
|
-
const headers = new Headers(compactMap({
|
|
92
|
-
Accept: "application/json",
|
|
93
|
-
"X-ACCOUNT-KEY": encodeSimple(
|
|
94
|
-
"X-ACCOUNT-KEY",
|
|
95
|
-
payload.accountKey ?? client._options.accountKey,
|
|
96
|
-
{ explode: false, charEncoding: "none" },
|
|
97
|
-
),
|
|
98
|
-
"X-API-KEY": encodeSimple(
|
|
99
|
-
"X-API-KEY",
|
|
100
|
-
payload.apiKey ?? client._options.apiKey,
|
|
101
|
-
{ explode: false, charEncoding: "none" },
|
|
102
|
-
),
|
|
103
|
-
}));
|
|
104
|
-
|
|
105
|
-
const context = {
|
|
106
|
-
options: client._options,
|
|
107
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
108
|
-
operationID: "handleCallback",
|
|
109
|
-
oAuth2Scopes: null,
|
|
110
|
-
|
|
111
|
-
resolvedSecurity: null,
|
|
112
|
-
|
|
113
|
-
securitySource: null,
|
|
114
|
-
retryConfig: options?.retries
|
|
115
|
-
|| client._options.retryConfig
|
|
116
|
-
|| { strategy: "none" },
|
|
117
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const requestRes = client._createRequest(context, {
|
|
121
|
-
method: "POST",
|
|
122
|
-
baseURL: options?.serverURL,
|
|
123
|
-
path: path,
|
|
124
|
-
headers: headers,
|
|
125
|
-
body: body,
|
|
126
|
-
userAgent: client._options.userAgent,
|
|
127
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
128
|
-
}, options);
|
|
129
|
-
if (!requestRes.ok) {
|
|
130
|
-
return [requestRes, { status: "invalid" }];
|
|
131
|
-
}
|
|
132
|
-
const req = requestRes.value;
|
|
133
|
-
|
|
134
|
-
const doResult = await client._do(req, {
|
|
135
|
-
context,
|
|
136
|
-
isErrorStatusCode: (statusCode: number) =>
|
|
137
|
-
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
138
|
-
retryConfig: context.retryConfig,
|
|
139
|
-
retryCodes: context.retryCodes,
|
|
140
|
-
});
|
|
141
|
-
if (!doResult.ok) {
|
|
142
|
-
return [doResult, { status: "request-error", request: req }];
|
|
143
|
-
}
|
|
144
|
-
const response = doResult.value;
|
|
145
|
-
|
|
146
|
-
const [result] = await M.match<
|
|
147
|
-
operations.HandleCallbackResponse,
|
|
148
|
-
| MaesnError
|
|
149
|
-
| ResponseValidationError
|
|
150
|
-
| ConnectionError
|
|
151
|
-
| RequestAbortedError
|
|
152
|
-
| RequestTimeoutError
|
|
153
|
-
| InvalidRequestError
|
|
154
|
-
| UnexpectedClientError
|
|
155
|
-
| SDKValidationError
|
|
156
|
-
>(
|
|
157
|
-
M.json(202, operations.HandleCallbackResponse$inboundSchema),
|
|
158
|
-
M.fail("4XX"),
|
|
159
|
-
M.fail("5XX"),
|
|
160
|
-
)(response, req);
|
|
161
|
-
if (!result.ok) {
|
|
162
|
-
return [result, { status: "complete", request: req, response }];
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return [result, { status: "complete", request: req, response }];
|
|
166
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
9
|
-
|
|
10
|
-
export type GetCodeGlobals = {
|
|
11
|
-
apiKey?: string | undefined;
|
|
12
|
-
accountKey?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type GetCodeRequest = {
|
|
16
|
-
code: string;
|
|
17
|
-
/**
|
|
18
|
-
* API key
|
|
19
|
-
*/
|
|
20
|
-
apiKey?: string | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Account key
|
|
23
|
-
*/
|
|
24
|
-
accountKey?: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Authorization code saved successfully
|
|
29
|
-
*/
|
|
30
|
-
export type GetCodeResponse = {};
|
|
31
|
-
|
|
32
|
-
/** @internal */
|
|
33
|
-
export type GetCodeRequest$Outbound = {
|
|
34
|
-
code: string;
|
|
35
|
-
apiKey?: string | undefined;
|
|
36
|
-
accountKey?: string | undefined;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const GetCodeRequest$outboundSchema: z.ZodMiniType<
|
|
41
|
-
GetCodeRequest$Outbound,
|
|
42
|
-
GetCodeRequest
|
|
43
|
-
> = z.object({
|
|
44
|
-
code: z.string(),
|
|
45
|
-
apiKey: z.optional(z.string()),
|
|
46
|
-
accountKey: z.optional(z.string()),
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export function getCodeRequestToJSON(getCodeRequest: GetCodeRequest): string {
|
|
50
|
-
return JSON.stringify(GetCodeRequest$outboundSchema.parse(getCodeRequest));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** @internal */
|
|
54
|
-
export const GetCodeResponse$inboundSchema: z.ZodMiniType<
|
|
55
|
-
GetCodeResponse,
|
|
56
|
-
unknown
|
|
57
|
-
> = z.object({});
|
|
58
|
-
|
|
59
|
-
export function getCodeResponseFromJSON(
|
|
60
|
-
jsonString: string,
|
|
61
|
-
): SafeParseResult<GetCodeResponse, SDKValidationError> {
|
|
62
|
-
return safeParse(
|
|
63
|
-
jsonString,
|
|
64
|
-
(x) => GetCodeResponse$inboundSchema.parse(JSON.parse(x)),
|
|
65
|
-
`Failed to parse 'GetCodeResponse' from JSON`,
|
|
66
|
-
);
|
|
67
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
9
|
-
|
|
10
|
-
export type HandleCallbackGlobals = {
|
|
11
|
-
apiKey?: string | undefined;
|
|
12
|
-
accountKey?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type HandleCallbackRequest = {
|
|
16
|
-
code: string;
|
|
17
|
-
/**
|
|
18
|
-
* API key
|
|
19
|
-
*/
|
|
20
|
-
apiKey?: string | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Account key
|
|
23
|
-
*/
|
|
24
|
-
accountKey?: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Webhook event received and queued for processing
|
|
29
|
-
*/
|
|
30
|
-
export type HandleCallbackResponse = {};
|
|
31
|
-
|
|
32
|
-
/** @internal */
|
|
33
|
-
export type HandleCallbackRequest$Outbound = {
|
|
34
|
-
code: string;
|
|
35
|
-
apiKey?: string | undefined;
|
|
36
|
-
accountKey?: string | undefined;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const HandleCallbackRequest$outboundSchema: z.ZodMiniType<
|
|
41
|
-
HandleCallbackRequest$Outbound,
|
|
42
|
-
HandleCallbackRequest
|
|
43
|
-
> = z.object({
|
|
44
|
-
code: z.string(),
|
|
45
|
-
apiKey: z.optional(z.string()),
|
|
46
|
-
accountKey: z.optional(z.string()),
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export function handleCallbackRequestToJSON(
|
|
50
|
-
handleCallbackRequest: HandleCallbackRequest,
|
|
51
|
-
): string {
|
|
52
|
-
return JSON.stringify(
|
|
53
|
-
HandleCallbackRequest$outboundSchema.parse(handleCallbackRequest),
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/** @internal */
|
|
58
|
-
export const HandleCallbackResponse$inboundSchema: z.ZodMiniType<
|
|
59
|
-
HandleCallbackResponse,
|
|
60
|
-
unknown
|
|
61
|
-
> = z.object({});
|
|
62
|
-
|
|
63
|
-
export function handleCallbackResponseFromJSON(
|
|
64
|
-
jsonString: string,
|
|
65
|
-
): SafeParseResult<HandleCallbackResponse, SDKValidationError> {
|
|
66
|
-
return safeParse(
|
|
67
|
-
jsonString,
|
|
68
|
-
(x) => HandleCallbackResponse$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
-
`Failed to parse 'HandleCallbackResponse' from JSON`,
|
|
70
|
-
);
|
|
71
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v4-mini";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
9
|
-
|
|
10
|
-
export type HandleConfigurationCallbackGlobals = {
|
|
11
|
-
apiKey?: string | undefined;
|
|
12
|
-
accountKey?: string | undefined;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export type HandleConfigurationCallbackRequest = {
|
|
16
|
-
code: string;
|
|
17
|
-
/**
|
|
18
|
-
* API key
|
|
19
|
-
*/
|
|
20
|
-
apiKey?: string | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Account key
|
|
23
|
-
*/
|
|
24
|
-
accountKey?: string | undefined;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Configuration webhook event received and queued for processing
|
|
29
|
-
*/
|
|
30
|
-
export type HandleConfigurationCallbackResponse = {};
|
|
31
|
-
|
|
32
|
-
/** @internal */
|
|
33
|
-
export type HandleConfigurationCallbackRequest$Outbound = {
|
|
34
|
-
code: string;
|
|
35
|
-
apiKey?: string | undefined;
|
|
36
|
-
accountKey?: string | undefined;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const HandleConfigurationCallbackRequest$outboundSchema: z.ZodMiniType<
|
|
41
|
-
HandleConfigurationCallbackRequest$Outbound,
|
|
42
|
-
HandleConfigurationCallbackRequest
|
|
43
|
-
> = z.object({
|
|
44
|
-
code: z.string(),
|
|
45
|
-
apiKey: z.optional(z.string()),
|
|
46
|
-
accountKey: z.optional(z.string()),
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export function handleConfigurationCallbackRequestToJSON(
|
|
50
|
-
handleConfigurationCallbackRequest: HandleConfigurationCallbackRequest,
|
|
51
|
-
): string {
|
|
52
|
-
return JSON.stringify(
|
|
53
|
-
HandleConfigurationCallbackRequest$outboundSchema.parse(
|
|
54
|
-
handleConfigurationCallbackRequest,
|
|
55
|
-
),
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/** @internal */
|
|
60
|
-
export const HandleConfigurationCallbackResponse$inboundSchema: z.ZodMiniType<
|
|
61
|
-
HandleConfigurationCallbackResponse,
|
|
62
|
-
unknown
|
|
63
|
-
> = z.object({});
|
|
64
|
-
|
|
65
|
-
export function handleConfigurationCallbackResponseFromJSON(
|
|
66
|
-
jsonString: string,
|
|
67
|
-
): SafeParseResult<HandleConfigurationCallbackResponse, SDKValidationError> {
|
|
68
|
-
return safeParse(
|
|
69
|
-
jsonString,
|
|
70
|
-
(x) =>
|
|
71
|
-
HandleConfigurationCallbackResponse$inboundSchema.parse(JSON.parse(x)),
|
|
72
|
-
`Failed to parse 'HandleConfigurationCallbackResponse' from JSON`,
|
|
73
|
-
);
|
|
74
|
-
}
|
package/src/sdk/events.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { eventsGetCode } from "../funcs/events-get-code.js";
|
|
6
|
-
import { eventsHandleCallback } from "../funcs/events-handle-callback.js";
|
|
7
|
-
import { eventsHandleConfigurationCallback } from "../funcs/events-handle-configuration-callback.js";
|
|
8
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
-
import * as operations from "../models/operations/index.js";
|
|
10
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
11
|
-
|
|
12
|
-
export class Events extends ClientSDK {
|
|
13
|
-
async handleCallback(
|
|
14
|
-
request: operations.HandleCallbackRequest,
|
|
15
|
-
options?: RequestOptions,
|
|
16
|
-
): Promise<operations.HandleCallbackResponse> {
|
|
17
|
-
return unwrapAsync(eventsHandleCallback(
|
|
18
|
-
this,
|
|
19
|
-
request,
|
|
20
|
-
options,
|
|
21
|
-
));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async getCode(
|
|
25
|
-
request: operations.GetCodeRequest,
|
|
26
|
-
options?: RequestOptions,
|
|
27
|
-
): Promise<operations.GetCodeResponse> {
|
|
28
|
-
return unwrapAsync(eventsGetCode(
|
|
29
|
-
this,
|
|
30
|
-
request,
|
|
31
|
-
options,
|
|
32
|
-
));
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async handleConfigurationCallback(
|
|
36
|
-
request: operations.HandleConfigurationCallbackRequest,
|
|
37
|
-
options?: RequestOptions,
|
|
38
|
-
): Promise<operations.HandleConfigurationCallbackResponse> {
|
|
39
|
-
return unwrapAsync(eventsHandleConfigurationCallback(
|
|
40
|
-
this,
|
|
41
|
-
request,
|
|
42
|
-
options,
|
|
43
|
-
));
|
|
44
|
-
}
|
|
45
|
-
}
|