mollie-api-typescript 1.3.5 → 1.3.7
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 +11 -0
- package/bin/mcp-server.js +1716 -768
- package/bin/mcp-server.js.map +32 -12
- package/dist/commonjs/funcs/accountsGet.d.ts +22 -0
- package/dist/commonjs/funcs/accountsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountsGet.js +147 -0
- package/dist/commonjs/funcs/accountsGet.js.map +1 -0
- package/dist/commonjs/funcs/accountsGetAccount.d.ts +22 -0
- package/dist/commonjs/funcs/accountsGetAccount.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountsGetAccount.js +143 -0
- package/dist/commonjs/funcs/accountsGetAccount.js.map +1 -0
- package/dist/commonjs/funcs/accountsList.d.ts +27 -0
- package/dist/commonjs/funcs/accountsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountsList.js +178 -0
- package/dist/commonjs/funcs/accountsList.js.map +1 -0
- package/dist/commonjs/funcs/accountsListAccounts.d.ts +27 -0
- package/dist/commonjs/funcs/accountsListAccounts.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountsListAccounts.js +178 -0
- package/dist/commonjs/funcs/accountsListAccounts.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +9 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/accountsGet.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/accountsGet.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsGet.js +66 -0
- package/dist/commonjs/mcp-server/tools/accountsGet.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsGetAccount.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/accountsGetAccount.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsGetAccount.js +66 -0
- package/dist/commonjs/mcp-server/tools/accountsGetAccount.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsList.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/accountsList.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsList.js +67 -0
- package/dist/commonjs/mcp-server/tools/accountsList.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsListAccounts.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/accountsListAccounts.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/accountsListAccounts.js +67 -0
- package/dist/commonjs/mcp-server/tools/accountsListAccounts.js.map +1 -0
- package/dist/commonjs/models/accountdetails.d.ts +43 -0
- package/dist/commonjs/models/accountdetails.d.ts.map +1 -0
- package/dist/commonjs/models/accountdetails.js +67 -0
- package/dist/commonjs/models/accountdetails.js.map +1 -0
- package/dist/commonjs/models/accountstatus.d.ts +19 -0
- package/dist/commonjs/models/accountstatus.d.ts.map +1 -0
- package/dist/commonjs/models/accountstatus.js +54 -0
- package/dist/commonjs/models/accountstatus.js.map +1 -0
- package/dist/commonjs/models/afterbalance.d.ts +24 -0
- package/dist/commonjs/models/afterbalance.d.ts.map +1 -0
- package/dist/commonjs/models/afterbalance.js +60 -0
- package/dist/commonjs/models/afterbalance.js.map +1 -0
- package/dist/commonjs/models/balance.d.ts +24 -0
- package/dist/commonjs/models/balance.d.ts.map +1 -0
- package/dist/commonjs/models/balance.js +60 -0
- package/dist/commonjs/models/balance.js.map +1 -0
- package/dist/commonjs/models/businessaccountresponse.d.ts +60 -0
- package/dist/commonjs/models/businessaccountresponse.d.ts.map +1 -0
- package/dist/commonjs/models/businessaccountresponse.js +75 -0
- package/dist/commonjs/models/businessaccountresponse.js.map +1 -0
- package/dist/commonjs/models/counterparty.d.ts +28 -0
- package/dist/commonjs/models/counterparty.d.ts.map +1 -0
- package/dist/commonjs/models/counterparty.js +61 -0
- package/dist/commonjs/models/counterparty.js.map +1 -0
- package/dist/commonjs/models/creditdebitindicator.d.ts +2 -2
- package/dist/commonjs/models/creditdebitindicator.js +1 -1
- package/dist/commonjs/models/index.d.ts +8 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +8 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/operations/getbusinessaccount.d.ts +58 -0
- package/dist/commonjs/models/operations/getbusinessaccount.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getbusinessaccount.js +88 -0
- package/dist/commonjs/models/operations/getbusinessaccount.js.map +1 -0
- package/dist/commonjs/models/operations/getbusinessaccounttransaction.d.ts +63 -0
- package/dist/commonjs/models/operations/getbusinessaccounttransaction.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getbusinessaccounttransaction.js +90 -0
- package/dist/commonjs/models/operations/getbusinessaccounttransaction.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listbusinessaccounts.d.ts +131 -0
- package/dist/commonjs/models/operations/listbusinessaccounts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listbusinessaccounts.js +161 -0
- package/dist/commonjs/models/operations/listbusinessaccounts.js.map +1 -0
- package/dist/commonjs/models/operations/listbusinessaccounttransactions.d.ts +136 -0
- package/dist/commonjs/models/operations/listbusinessaccounttransactions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listbusinessaccounttransactions.js +161 -0
- package/dist/commonjs/models/operations/listbusinessaccounttransactions.js.map +1 -0
- package/dist/commonjs/models/transactionresponse.d.ts +92 -0
- package/dist/commonjs/models/transactionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/transactionresponse.js +87 -0
- package/dist/commonjs/models/transactionresponse.js.map +1 -0
- package/dist/commonjs/models/transactiontype.d.ts +35 -0
- package/dist/commonjs/models/transactiontype.d.ts.map +1 -0
- package/dist/commonjs/models/transactiontype.js +65 -0
- package/dist/commonjs/models/transactiontype.js.map +1 -0
- package/dist/commonjs/models/transferresponse.d.ts +1 -1
- package/dist/commonjs/sdk/accounts.d.ts +45 -0
- package/dist/commonjs/sdk/accounts.d.ts.map +1 -0
- package/dist/commonjs/sdk/accounts.js +60 -0
- package/dist/commonjs/sdk/accounts.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/accountsGet.d.ts +22 -0
- package/dist/esm/funcs/accountsGet.d.ts.map +1 -0
- package/dist/esm/funcs/accountsGet.js +111 -0
- package/dist/esm/funcs/accountsGet.js.map +1 -0
- package/dist/esm/funcs/accountsGetAccount.d.ts +22 -0
- package/dist/esm/funcs/accountsGetAccount.d.ts.map +1 -0
- package/dist/esm/funcs/accountsGetAccount.js +107 -0
- package/dist/esm/funcs/accountsGetAccount.js.map +1 -0
- package/dist/esm/funcs/accountsList.d.ts +27 -0
- package/dist/esm/funcs/accountsList.d.ts.map +1 -0
- package/dist/esm/funcs/accountsList.js +142 -0
- package/dist/esm/funcs/accountsList.js.map +1 -0
- package/dist/esm/funcs/accountsListAccounts.d.ts +27 -0
- package/dist/esm/funcs/accountsListAccounts.d.ts.map +1 -0
- package/dist/esm/funcs/accountsListAccounts.js +142 -0
- package/dist/esm/funcs/accountsListAccounts.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +9 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/accountsGet.d.ts +8 -0
- package/dist/esm/mcp-server/tools/accountsGet.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/accountsGet.js +30 -0
- package/dist/esm/mcp-server/tools/accountsGet.js.map +1 -0
- package/dist/esm/mcp-server/tools/accountsGetAccount.d.ts +8 -0
- package/dist/esm/mcp-server/tools/accountsGetAccount.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/accountsGetAccount.js +30 -0
- package/dist/esm/mcp-server/tools/accountsGetAccount.js.map +1 -0
- package/dist/esm/mcp-server/tools/accountsList.d.ts +8 -0
- package/dist/esm/mcp-server/tools/accountsList.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/accountsList.js +31 -0
- package/dist/esm/mcp-server/tools/accountsList.js.map +1 -0
- package/dist/esm/mcp-server/tools/accountsListAccounts.d.ts +8 -0
- package/dist/esm/mcp-server/tools/accountsListAccounts.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/accountsListAccounts.js +31 -0
- package/dist/esm/mcp-server/tools/accountsListAccounts.js.map +1 -0
- package/dist/esm/models/accountdetails.d.ts +43 -0
- package/dist/esm/models/accountdetails.d.ts.map +1 -0
- package/dist/esm/models/accountdetails.js +29 -0
- package/dist/esm/models/accountdetails.js.map +1 -0
- package/dist/esm/models/accountstatus.d.ts +19 -0
- package/dist/esm/models/accountstatus.d.ts.map +1 -0
- package/dist/esm/models/accountstatus.js +18 -0
- package/dist/esm/models/accountstatus.js.map +1 -0
- package/dist/esm/models/afterbalance.d.ts +24 -0
- package/dist/esm/models/afterbalance.d.ts.map +1 -0
- package/dist/esm/models/afterbalance.js +22 -0
- package/dist/esm/models/afterbalance.js.map +1 -0
- package/dist/esm/models/balance.d.ts +24 -0
- package/dist/esm/models/balance.d.ts.map +1 -0
- package/dist/esm/models/balance.js +22 -0
- package/dist/esm/models/balance.js.map +1 -0
- package/dist/esm/models/businessaccountresponse.d.ts +60 -0
- package/dist/esm/models/businessaccountresponse.d.ts.map +1 -0
- package/dist/esm/models/businessaccountresponse.js +37 -0
- package/dist/esm/models/businessaccountresponse.js.map +1 -0
- package/dist/esm/models/counterparty.d.ts +28 -0
- package/dist/esm/models/counterparty.d.ts.map +1 -0
- package/dist/esm/models/counterparty.js +23 -0
- package/dist/esm/models/counterparty.js.map +1 -0
- package/dist/esm/models/creditdebitindicator.d.ts +2 -2
- package/dist/esm/models/creditdebitindicator.js +1 -1
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +8 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/operations/getbusinessaccount.d.ts +58 -0
- package/dist/esm/models/operations/getbusinessaccount.d.ts.map +1 -0
- package/dist/esm/models/operations/getbusinessaccount.js +48 -0
- package/dist/esm/models/operations/getbusinessaccount.js.map +1 -0
- package/dist/esm/models/operations/getbusinessaccounttransaction.d.ts +63 -0
- package/dist/esm/models/operations/getbusinessaccounttransaction.d.ts.map +1 -0
- package/dist/esm/models/operations/getbusinessaccounttransaction.js +50 -0
- package/dist/esm/models/operations/getbusinessaccounttransaction.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listbusinessaccounts.d.ts +131 -0
- package/dist/esm/models/operations/listbusinessaccounts.d.ts.map +1 -0
- package/dist/esm/models/operations/listbusinessaccounts.js +115 -0
- package/dist/esm/models/operations/listbusinessaccounts.js.map +1 -0
- package/dist/esm/models/operations/listbusinessaccounttransactions.d.ts +136 -0
- package/dist/esm/models/operations/listbusinessaccounttransactions.d.ts.map +1 -0
- package/dist/esm/models/operations/listbusinessaccounttransactions.js +115 -0
- package/dist/esm/models/operations/listbusinessaccounttransactions.js.map +1 -0
- package/dist/esm/models/transactionresponse.d.ts +92 -0
- package/dist/esm/models/transactionresponse.d.ts.map +1 -0
- package/dist/esm/models/transactionresponse.js +49 -0
- package/dist/esm/models/transactionresponse.js.map +1 -0
- package/dist/esm/models/transactiontype.d.ts +35 -0
- package/dist/esm/models/transactiontype.d.ts.map +1 -0
- package/dist/esm/models/transactiontype.js +29 -0
- package/dist/esm/models/transactiontype.js.map +1 -0
- package/dist/esm/models/transferresponse.d.ts +1 -1
- package/dist/esm/sdk/accounts.d.ts +45 -0
- package/dist/esm/sdk/accounts.d.ts.map +1 -0
- package/dist/esm/sdk/accounts.js +56 -0
- package/dist/esm/sdk/accounts.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/accountsGet.ts +212 -0
- package/src/funcs/accountsGetAccount.ts +205 -0
- package/src/funcs/accountsList.ts +285 -0
- package/src/funcs/accountsListAccounts.ts +275 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/accountsGet.ts +39 -0
- package/src/mcp-server/tools/accountsGetAccount.ts +39 -0
- package/src/mcp-server/tools/accountsList.ts +40 -0
- package/src/mcp-server/tools/accountsListAccounts.ts +40 -0
- package/src/models/accountdetails.ts +82 -0
- package/src/models/accountstatus.ts +34 -0
- package/src/models/afterbalance.ts +60 -0
- package/src/models/balance.ts +57 -0
- package/src/models/businessaccountresponse.ts +121 -0
- package/src/models/counterparty.ts +61 -0
- package/src/models/creditdebitindicator.ts +2 -2
- package/src/models/index.ts +8 -0
- package/src/models/operations/getbusinessaccount.ts +136 -0
- package/src/models/operations/getbusinessaccounttransaction.ts +149 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listbusinessaccounts.ts +333 -0
- package/src/models/operations/listbusinessaccounttransactions.ts +373 -0
- package/src/models/transactionresponse.ts +172 -0
- package/src/models/transactiontype.ts +50 -0
- package/src/models/transferresponse.ts +1 -1
- package/src/sdk/accounts.ts +97 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 3152dffe957e
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { ClientCore } from "../core.js";
|
|
7
|
+
import { dlv } from "../lib/dlv.js";
|
|
8
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.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 { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import { ClientError } from "../models/errors/clienterror.js";
|
|
16
|
+
import {
|
|
17
|
+
ConnectionError,
|
|
18
|
+
InvalidRequestError,
|
|
19
|
+
RequestAbortedError,
|
|
20
|
+
RequestTimeoutError,
|
|
21
|
+
UnexpectedClientError,
|
|
22
|
+
} from "../models/errors/httpclienterrors.js";
|
|
23
|
+
import * as errors from "../models/errors/index.js";
|
|
24
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
28
|
+
import { Result } from "../types/fp.js";
|
|
29
|
+
import {
|
|
30
|
+
createPageIterator,
|
|
31
|
+
haltIterator,
|
|
32
|
+
PageIterator,
|
|
33
|
+
Paginator,
|
|
34
|
+
URL_OVERRIDE,
|
|
35
|
+
} from "../types/operations.js";
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* List business accounts
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Retrieve all business accounts for the authenticated organization.
|
|
42
|
+
*
|
|
43
|
+
* The results are paginated.
|
|
44
|
+
*
|
|
45
|
+
* If set, this operation will use {@link Security.oAuth} from the global security.
|
|
46
|
+
*/
|
|
47
|
+
export function accountsListAccounts(
|
|
48
|
+
client: ClientCore,
|
|
49
|
+
request?: operations.ListBusinessAccountsRequest | undefined,
|
|
50
|
+
options?: RequestOptions & { [URL_OVERRIDE]?: URL },
|
|
51
|
+
): APIPromise<
|
|
52
|
+
PageIterator<
|
|
53
|
+
Result<
|
|
54
|
+
operations.ListBusinessAccountsResponse,
|
|
55
|
+
| errors.ErrorResponse
|
|
56
|
+
| ClientError
|
|
57
|
+
| ResponseValidationError
|
|
58
|
+
| ConnectionError
|
|
59
|
+
| RequestAbortedError
|
|
60
|
+
| RequestTimeoutError
|
|
61
|
+
| InvalidRequestError
|
|
62
|
+
| UnexpectedClientError
|
|
63
|
+
| SDKValidationError
|
|
64
|
+
>,
|
|
65
|
+
{ url: string }
|
|
66
|
+
>
|
|
67
|
+
> {
|
|
68
|
+
return new APIPromise($do(
|
|
69
|
+
client,
|
|
70
|
+
request,
|
|
71
|
+
options,
|
|
72
|
+
));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function $do(
|
|
76
|
+
client: ClientCore,
|
|
77
|
+
request?: operations.ListBusinessAccountsRequest | undefined,
|
|
78
|
+
options?: RequestOptions & { [URL_OVERRIDE]?: URL },
|
|
79
|
+
): Promise<
|
|
80
|
+
[
|
|
81
|
+
PageIterator<
|
|
82
|
+
Result<
|
|
83
|
+
operations.ListBusinessAccountsResponse,
|
|
84
|
+
| errors.ErrorResponse
|
|
85
|
+
| ClientError
|
|
86
|
+
| ResponseValidationError
|
|
87
|
+
| ConnectionError
|
|
88
|
+
| RequestAbortedError
|
|
89
|
+
| RequestTimeoutError
|
|
90
|
+
| InvalidRequestError
|
|
91
|
+
| UnexpectedClientError
|
|
92
|
+
| SDKValidationError
|
|
93
|
+
>,
|
|
94
|
+
{ url: string }
|
|
95
|
+
>,
|
|
96
|
+
APICall,
|
|
97
|
+
]
|
|
98
|
+
> {
|
|
99
|
+
const parsed = safeParse(
|
|
100
|
+
request,
|
|
101
|
+
(value) =>
|
|
102
|
+
operations.ListBusinessAccountsRequest$outboundSchema.optional().parse(
|
|
103
|
+
value,
|
|
104
|
+
),
|
|
105
|
+
"Input validation failed",
|
|
106
|
+
);
|
|
107
|
+
if (!parsed.ok) {
|
|
108
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
109
|
+
}
|
|
110
|
+
const payload = parsed.value;
|
|
111
|
+
const body = null;
|
|
112
|
+
|
|
113
|
+
const path = options?.[URL_OVERRIDE]
|
|
114
|
+
? ""
|
|
115
|
+
: pathToFunc("/business-accounts/accounts")();
|
|
116
|
+
|
|
117
|
+
const query = options?.[URL_OVERRIDE]
|
|
118
|
+
? options[URL_OVERRIDE].search.substring(1)
|
|
119
|
+
: encodeFormQuery({
|
|
120
|
+
"from": payload?.from,
|
|
121
|
+
"limit": payload?.limit,
|
|
122
|
+
"sort": payload?.sort,
|
|
123
|
+
"testmode": payload?.testmode ?? client._options.testmode,
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
const headers = new Headers(compactMap({
|
|
127
|
+
Accept: "application/hal+json",
|
|
128
|
+
"idempotency-key": encodeSimple(
|
|
129
|
+
"idempotency-key",
|
|
130
|
+
payload?.["idempotency-key"],
|
|
131
|
+
{ explode: false, charEncoding: "none" },
|
|
132
|
+
),
|
|
133
|
+
}));
|
|
134
|
+
|
|
135
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
136
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [2]);
|
|
137
|
+
|
|
138
|
+
const context = {
|
|
139
|
+
options: client._options,
|
|
140
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
141
|
+
operationID: "list-business-accounts",
|
|
142
|
+
oAuth2Scopes: null,
|
|
143
|
+
|
|
144
|
+
resolvedSecurity: requestSecurity,
|
|
145
|
+
|
|
146
|
+
securitySource: client._options.security,
|
|
147
|
+
retryConfig: options?.retries
|
|
148
|
+
|| client._options.retryConfig
|
|
149
|
+
|| {
|
|
150
|
+
strategy: "backoff",
|
|
151
|
+
backoff: {
|
|
152
|
+
initialInterval: 500,
|
|
153
|
+
maxInterval: 5000,
|
|
154
|
+
exponent: 2,
|
|
155
|
+
maxElapsedTime: 7500,
|
|
156
|
+
},
|
|
157
|
+
retryConnectionErrors: true,
|
|
158
|
+
}
|
|
159
|
+
|| { strategy: "none" },
|
|
160
|
+
retryCodes: options?.retryCodes || ["5xx"],
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const requestRes = client._createRequest(context, {
|
|
164
|
+
security: requestSecurity,
|
|
165
|
+
method: "GET",
|
|
166
|
+
baseURL: options?.[URL_OVERRIDE]?.href || options?.serverURL,
|
|
167
|
+
path: path,
|
|
168
|
+
headers: headers,
|
|
169
|
+
query: query,
|
|
170
|
+
body: body,
|
|
171
|
+
userAgent: client._options.userAgent,
|
|
172
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
173
|
+
}, options);
|
|
174
|
+
if (!requestRes.ok) {
|
|
175
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
176
|
+
}
|
|
177
|
+
const req = requestRes.value;
|
|
178
|
+
|
|
179
|
+
const doResult = await client._do(req, {
|
|
180
|
+
context,
|
|
181
|
+
errorCodes: ["400", "4XX", "5XX"],
|
|
182
|
+
retryConfig: context.retryConfig,
|
|
183
|
+
retryCodes: context.retryCodes,
|
|
184
|
+
});
|
|
185
|
+
if (!doResult.ok) {
|
|
186
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
187
|
+
}
|
|
188
|
+
const response = doResult.value;
|
|
189
|
+
|
|
190
|
+
const responseFields = {
|
|
191
|
+
HttpMeta: { Response: response, Request: req },
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const [result, raw] = await M.match<
|
|
195
|
+
operations.ListBusinessAccountsResponse,
|
|
196
|
+
| errors.ErrorResponse
|
|
197
|
+
| ClientError
|
|
198
|
+
| ResponseValidationError
|
|
199
|
+
| ConnectionError
|
|
200
|
+
| RequestAbortedError
|
|
201
|
+
| RequestTimeoutError
|
|
202
|
+
| InvalidRequestError
|
|
203
|
+
| UnexpectedClientError
|
|
204
|
+
| SDKValidationError
|
|
205
|
+
>(
|
|
206
|
+
M.json(200, operations.ListBusinessAccountsResponse$inboundSchema, {
|
|
207
|
+
ctype: "application/hal+json",
|
|
208
|
+
key: "Result",
|
|
209
|
+
}),
|
|
210
|
+
M.jsonErr(400, errors.ErrorResponse$inboundSchema, {
|
|
211
|
+
ctype: "application/hal+json",
|
|
212
|
+
}),
|
|
213
|
+
M.fail("4XX"),
|
|
214
|
+
M.fail("5XX"),
|
|
215
|
+
)(response, req, { extraFields: responseFields });
|
|
216
|
+
if (!result.ok) {
|
|
217
|
+
return [haltIterator(result), {
|
|
218
|
+
status: "complete",
|
|
219
|
+
request: req,
|
|
220
|
+
response,
|
|
221
|
+
}];
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const nextFunc = (
|
|
225
|
+
responseData: unknown,
|
|
226
|
+
): {
|
|
227
|
+
next: Paginator<
|
|
228
|
+
Result<
|
|
229
|
+
operations.ListBusinessAccountsResponse,
|
|
230
|
+
| errors.ErrorResponse
|
|
231
|
+
| ClientError
|
|
232
|
+
| ResponseValidationError
|
|
233
|
+
| ConnectionError
|
|
234
|
+
| RequestAbortedError
|
|
235
|
+
| RequestTimeoutError
|
|
236
|
+
| InvalidRequestError
|
|
237
|
+
| UnexpectedClientError
|
|
238
|
+
| SDKValidationError
|
|
239
|
+
>
|
|
240
|
+
>;
|
|
241
|
+
"~next"?: { url: string };
|
|
242
|
+
} => {
|
|
243
|
+
let nextURL = dlv(responseData, "_links.next.href");
|
|
244
|
+
if (typeof nextURL !== "string") {
|
|
245
|
+
return { next: () => null };
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
try {
|
|
249
|
+
if (nextURL.startsWith("/")) {
|
|
250
|
+
nextURL = new URL(nextURL, client._baseURL ?? "").href;
|
|
251
|
+
}
|
|
252
|
+
new URL(nextURL);
|
|
253
|
+
} catch (_error) {
|
|
254
|
+
return { next: () => null };
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
const nextVal = () =>
|
|
258
|
+
accountsListAccounts(
|
|
259
|
+
client,
|
|
260
|
+
{
|
|
261
|
+
...request!,
|
|
262
|
+
},
|
|
263
|
+
{ ...options, [URL_OVERRIDE]: new URL(nextURL) },
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
return { next: nextVal, "~next": { url: nextURL } };
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
270
|
+
return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
|
|
271
|
+
status: "complete",
|
|
272
|
+
request: req,
|
|
273
|
+
response,
|
|
274
|
+
}];
|
|
275
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -78,8 +78,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
78
78
|
export const SDK_METADATA = {
|
|
79
79
|
language: "typescript",
|
|
80
80
|
openapiDocVersion: "1.0.0",
|
|
81
|
-
sdkVersion: "1.3.
|
|
81
|
+
sdkVersion: "1.3.7",
|
|
82
82
|
genVersion: "2.879.1",
|
|
83
83
|
userAgent:
|
|
84
|
-
"speakeasy-sdk/typescript 1.3.
|
|
84
|
+
"speakeasy-sdk/typescript 1.3.7 2.879.1 1.0.0 mollie-api-typescript",
|
|
85
85
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -14,6 +14,10 @@ import {
|
|
|
14
14
|
} from "./resources.js";
|
|
15
15
|
import { MCPScope } from "./scopes.js";
|
|
16
16
|
import { createRegisterTool } from "./tools.js";
|
|
17
|
+
import { tool$accountsGet } from "./tools/accountsGet.js";
|
|
18
|
+
import { tool$accountsGetAccount } from "./tools/accountsGetAccount.js";
|
|
19
|
+
import { tool$accountsList } from "./tools/accountsList.js";
|
|
20
|
+
import { tool$accountsListAccounts } from "./tools/accountsListAccounts.js";
|
|
17
21
|
import { tool$balancesGet } from "./tools/balancesGet.js";
|
|
18
22
|
import { tool$balancesGetPrimary } from "./tools/balancesGetPrimary.js";
|
|
19
23
|
import { tool$balancesGetReport } from "./tools/balancesGetReport.js";
|
|
@@ -130,7 +134,7 @@ export function createMCPServer(deps: {
|
|
|
130
134
|
}) {
|
|
131
135
|
const server = new McpServer({
|
|
132
136
|
name: "Client",
|
|
133
|
-
version: "1.3.
|
|
137
|
+
version: "1.3.7",
|
|
134
138
|
});
|
|
135
139
|
|
|
136
140
|
const client = new ClientCore({
|
|
@@ -262,6 +266,10 @@ export function createMCPServer(deps: {
|
|
|
262
266
|
tool(tool$salesInvoicesGet);
|
|
263
267
|
tool(tool$salesInvoicesUpdate);
|
|
264
268
|
tool(tool$salesInvoicesDelete);
|
|
269
|
+
tool(tool$accountsListAccounts);
|
|
270
|
+
tool(tool$accountsGetAccount);
|
|
271
|
+
tool(tool$accountsList);
|
|
272
|
+
tool(tool$accountsGet);
|
|
265
273
|
tool(tool$transfersCreate);
|
|
266
274
|
tool(tool$transfersGet);
|
|
267
275
|
tool(tool$verifyPayeesCreate);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2ab8577922e3
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { accountsGet } from "../../funcs/accountsGet.js";
|
|
7
|
+
import * as operations from "../../models/operations/index.js";
|
|
8
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
9
|
+
|
|
10
|
+
const args = {
|
|
11
|
+
request: operations.GetBusinessAccountTransactionRequest$inboundSchema,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const tool$accountsGet: ToolDefinition<typeof args> = {
|
|
15
|
+
name: "accounts-get",
|
|
16
|
+
description: `Get transaction
|
|
17
|
+
|
|
18
|
+
Retrieve a single transaction object by its transaction ID. This allows you to check the details,
|
|
19
|
+
amount, counterparty, and balance impact of a specific transaction.`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await accountsGet(
|
|
23
|
+
client,
|
|
24
|
+
args.request,
|
|
25
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
+
).$inspect();
|
|
27
|
+
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return {
|
|
30
|
+
content: [{ type: "text", text: result.error.message }],
|
|
31
|
+
isError: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const value = result.value;
|
|
36
|
+
|
|
37
|
+
return formatResult(value, apiCall);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: a51d0b6181e7
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { accountsGetAccount } from "../../funcs/accountsGetAccount.js";
|
|
7
|
+
import * as operations from "../../models/operations/index.js";
|
|
8
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
9
|
+
|
|
10
|
+
const args = {
|
|
11
|
+
request: operations.GetBusinessAccountRequest$inboundSchema,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const tool$accountsGetAccount: ToolDefinition<typeof args> = {
|
|
15
|
+
name: "accounts-get-account",
|
|
16
|
+
description: `Get business account
|
|
17
|
+
|
|
18
|
+
Retrieve a single business account object by its account ID. This allows you to check the current status,
|
|
19
|
+
balance, and account details.`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await accountsGetAccount(
|
|
23
|
+
client,
|
|
24
|
+
args.request,
|
|
25
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
+
).$inspect();
|
|
27
|
+
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return {
|
|
30
|
+
content: [{ type: "text", text: result.error.message }],
|
|
31
|
+
isError: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const value = result.value;
|
|
36
|
+
|
|
37
|
+
return formatResult(value, apiCall);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 9ff942e2a41a
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { accountsList } from "../../funcs/accountsList.js";
|
|
7
|
+
import * as operations from "../../models/operations/index.js";
|
|
8
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
9
|
+
|
|
10
|
+
const args = {
|
|
11
|
+
request: operations.ListBusinessAccountTransactionsRequest$inboundSchema,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const tool$accountsList: ToolDefinition<typeof args> = {
|
|
15
|
+
name: "accounts-list",
|
|
16
|
+
description: `List transactions
|
|
17
|
+
|
|
18
|
+
Retrieve all transactions for a specific business account.
|
|
19
|
+
|
|
20
|
+
The results are paginated.`,
|
|
21
|
+
args,
|
|
22
|
+
tool: async (client, args, ctx) => {
|
|
23
|
+
const [result, apiCall] = await accountsList(
|
|
24
|
+
client,
|
|
25
|
+
args.request,
|
|
26
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
27
|
+
).$inspect();
|
|
28
|
+
|
|
29
|
+
if (!result.ok) {
|
|
30
|
+
return {
|
|
31
|
+
content: [{ type: "text", text: result.error.message }],
|
|
32
|
+
isError: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const value = result.value.result;
|
|
37
|
+
|
|
38
|
+
return formatResult(value, apiCall);
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: ac4b5e79e0c6
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { accountsListAccounts } from "../../funcs/accountsListAccounts.js";
|
|
7
|
+
import * as operations from "../../models/operations/index.js";
|
|
8
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
9
|
+
|
|
10
|
+
const args = {
|
|
11
|
+
request: operations.ListBusinessAccountsRequest$inboundSchema.optional(),
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const tool$accountsListAccounts: ToolDefinition<typeof args> = {
|
|
15
|
+
name: "accounts-list-accounts",
|
|
16
|
+
description: `List business accounts
|
|
17
|
+
|
|
18
|
+
Retrieve all business accounts for the authenticated organization.
|
|
19
|
+
|
|
20
|
+
The results are paginated.`,
|
|
21
|
+
args,
|
|
22
|
+
tool: async (client, args, ctx) => {
|
|
23
|
+
const [result, apiCall] = await accountsListAccounts(
|
|
24
|
+
client,
|
|
25
|
+
args.request,
|
|
26
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
27
|
+
).$inspect();
|
|
28
|
+
|
|
29
|
+
if (!result.ok) {
|
|
30
|
+
return {
|
|
31
|
+
content: [{ type: "text", text: result.error.message }],
|
|
32
|
+
isError: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const value = result.value.result;
|
|
37
|
+
|
|
38
|
+
return formatResult(value, apiCall);
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 2517099beaa4
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
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
|
+
/**
|
|
12
|
+
* The account holder details and bank account information for the business account.
|
|
13
|
+
*/
|
|
14
|
+
export type AccountDetails = {
|
|
15
|
+
/**
|
|
16
|
+
* The name of the account holder.
|
|
17
|
+
*/
|
|
18
|
+
accountHolderName: string;
|
|
19
|
+
/**
|
|
20
|
+
* A name of the account.
|
|
21
|
+
*/
|
|
22
|
+
name?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* The currency of the account in ISO 4217 format.
|
|
25
|
+
*/
|
|
26
|
+
currency: string;
|
|
27
|
+
/**
|
|
28
|
+
* The IBAN (International Bank Account Number) of the account.
|
|
29
|
+
*/
|
|
30
|
+
iban: string;
|
|
31
|
+
/**
|
|
32
|
+
* The BIC (Bank Identifier Code) of the account.
|
|
33
|
+
*/
|
|
34
|
+
bic?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const AccountDetails$inboundSchema: z.ZodType<
|
|
39
|
+
AccountDetails,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
accountHolderName: z.string(),
|
|
44
|
+
name: z.string().optional(),
|
|
45
|
+
currency: z.string(),
|
|
46
|
+
iban: z.string(),
|
|
47
|
+
bic: z.string().optional(),
|
|
48
|
+
});
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type AccountDetails$Outbound = {
|
|
51
|
+
accountHolderName: string;
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
currency: string;
|
|
54
|
+
iban: string;
|
|
55
|
+
bic?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const AccountDetails$outboundSchema: z.ZodType<
|
|
60
|
+
AccountDetails$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
AccountDetails
|
|
63
|
+
> = z.object({
|
|
64
|
+
accountHolderName: z.string(),
|
|
65
|
+
name: z.string().optional(),
|
|
66
|
+
currency: z.string(),
|
|
67
|
+
iban: z.string(),
|
|
68
|
+
bic: z.string().optional(),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export function accountDetailsToJSON(accountDetails: AccountDetails): string {
|
|
72
|
+
return JSON.stringify(AccountDetails$outboundSchema.parse(accountDetails));
|
|
73
|
+
}
|
|
74
|
+
export function accountDetailsFromJSON(
|
|
75
|
+
jsonString: string,
|
|
76
|
+
): SafeParseResult<AccountDetails, SDKValidationError> {
|
|
77
|
+
return safeParse(
|
|
78
|
+
jsonString,
|
|
79
|
+
(x) => AccountDetails$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
+
`Failed to parse 'AccountDetails' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 7123d83ecb5d
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../types/enums.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The status of the business account.
|
|
12
|
+
*/
|
|
13
|
+
export const AccountStatus = {
|
|
14
|
+
Active: "active",
|
|
15
|
+
Blocked: "blocked",
|
|
16
|
+
Closed: "closed",
|
|
17
|
+
} as const;
|
|
18
|
+
/**
|
|
19
|
+
* The status of the business account.
|
|
20
|
+
*/
|
|
21
|
+
export type AccountStatus = OpenEnum<typeof AccountStatus>;
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const AccountStatus$inboundSchema: z.ZodType<
|
|
25
|
+
AccountStatus,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = openEnums.inboundSchema(AccountStatus);
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const AccountStatus$outboundSchema: z.ZodType<
|
|
31
|
+
string,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
AccountStatus
|
|
34
|
+
> = openEnums.outboundSchema(AccountStatus);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 358a6fc12256
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as z from "zod/v3";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import {
|
|
10
|
+
Amount,
|
|
11
|
+
Amount$inboundSchema,
|
|
12
|
+
Amount$Outbound,
|
|
13
|
+
Amount$outboundSchema,
|
|
14
|
+
} from "./amount.js";
|
|
15
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The balance of the business account after this transaction was processed.
|
|
19
|
+
*/
|
|
20
|
+
export type AfterBalance = {
|
|
21
|
+
/**
|
|
22
|
+
* In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
|
|
23
|
+
*/
|
|
24
|
+
total: Amount;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const AfterBalance$inboundSchema: z.ZodType<
|
|
29
|
+
AfterBalance,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.object({
|
|
33
|
+
total: Amount$inboundSchema,
|
|
34
|
+
});
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type AfterBalance$Outbound = {
|
|
37
|
+
total: Amount$Outbound;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const AfterBalance$outboundSchema: z.ZodType<
|
|
42
|
+
AfterBalance$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
AfterBalance
|
|
45
|
+
> = z.object({
|
|
46
|
+
total: Amount$outboundSchema,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function afterBalanceToJSON(afterBalance: AfterBalance): string {
|
|
50
|
+
return JSON.stringify(AfterBalance$outboundSchema.parse(afterBalance));
|
|
51
|
+
}
|
|
52
|
+
export function afterBalanceFromJSON(
|
|
53
|
+
jsonString: string,
|
|
54
|
+
): SafeParseResult<AfterBalance, SDKValidationError> {
|
|
55
|
+
return safeParse(
|
|
56
|
+
jsonString,
|
|
57
|
+
(x) => AfterBalance$inboundSchema.parse(JSON.parse(x)),
|
|
58
|
+
`Failed to parse 'AfterBalance' from JSON`,
|
|
59
|
+
);
|
|
60
|
+
}
|