@moovio/sdk 26.4.0 → 26.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -59
- package/bin/mcp-server.js +1320 -514
- package/bin/mcp-server.js.map +50 -27
- package/funcs/googlePayLinkToken.d.ts +3 -1
- package/funcs/googlePayLinkToken.d.ts.map +1 -1
- package/funcs/googlePayLinkToken.js +3 -1
- package/funcs/googlePayLinkToken.js.map +1 -1
- package/funcs/transferConfigCreate.d.ts +15 -0
- package/funcs/transferConfigCreate.d.ts.map +1 -0
- package/funcs/transferConfigCreate.js +128 -0
- package/funcs/transferConfigCreate.js.map +1 -0
- package/funcs/transferConfigGet.d.ts +14 -0
- package/funcs/transferConfigGet.d.ts.map +1 -0
- package/funcs/transferConfigGet.js +122 -0
- package/funcs/transferConfigGet.js.map +1 -0
- package/funcs/transferConfigUpdate.d.ts +15 -0
- package/funcs/transferConfigUpdate.d.ts.map +1 -0
- package/funcs/transferConfigUpdate.js +126 -0
- package/funcs/transferConfigUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +7 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/googlePayLinkToken.d.ts.map +1 -1
- package/mcp-server/tools/googlePayLinkToken.js +3 -1
- package/mcp-server/tools/googlePayLinkToken.js.map +1 -1
- package/mcp-server/tools/transferConfigCreate.d.ts +8 -0
- package/mcp-server/tools/transferConfigCreate.d.ts.map +1 -0
- package/mcp-server/tools/transferConfigCreate.js +62 -0
- package/mcp-server/tools/transferConfigCreate.js.map +1 -0
- package/mcp-server/tools/transferConfigGet.d.ts +8 -0
- package/mcp-server/tools/transferConfigGet.d.ts.map +1 -0
- package/mcp-server/tools/transferConfigGet.js +62 -0
- package/mcp-server/tools/transferConfigGet.js.map +1 -0
- package/mcp-server/tools/transferConfigUpdate.d.ts +8 -0
- package/mcp-server/tools/transferConfigUpdate.d.ts.map +1 -0
- package/mcp-server/tools/transferConfigUpdate.js +62 -0
- package/mcp-server/tools/transferConfigUpdate.js.map +1 -0
- package/models/components/createdtransfer.d.ts +4 -1
- package/models/components/createdtransfer.d.ts.map +1 -1
- package/models/components/createdtransfer.js +3 -0
- package/models/components/createdtransfer.js.map +1 -1
- package/models/components/createpaymentlink.d.ts +13 -0
- package/models/components/createpaymentlink.d.ts.map +1 -1
- package/models/components/createpaymentlink.js.map +1 -1
- package/models/components/createtippresets.d.ts +36 -0
- package/models/components/createtippresets.d.ts.map +1 -0
- package/models/components/createtippresets.js +64 -0
- package/models/components/createtippresets.js.map +1 -0
- package/models/components/createtransfer.d.ts +3 -3
- package/models/components/createtransfer.d.ts.map +1 -1
- package/models/components/createtransfer.js +3 -0
- package/models/components/createtransfer.js.map +1 -1
- package/models/components/createtransferamountdetails.d.ts +21 -0
- package/models/components/createtransferamountdetails.d.ts.map +1 -0
- package/models/components/createtransferamountdetails.js +59 -0
- package/models/components/createtransferamountdetails.js.map +1 -0
- package/models/components/createtransferamountdetailsvalidationerror.d.ts +17 -0
- package/models/components/createtransferamountdetailsvalidationerror.d.ts.map +1 -0
- package/models/components/createtransferamountdetailsvalidationerror.js +58 -0
- package/models/components/createtransferamountdetailsvalidationerror.js.map +1 -0
- package/models/components/createtransferconfig.d.ts +18 -0
- package/models/components/createtransferconfig.d.ts.map +1 -0
- package/models/components/{googlepayintermediatesigningkey.js → createtransferconfig.js} +13 -14
- package/models/components/createtransferconfig.js.map +1 -0
- package/models/components/googlepayassurancedetails.d.ts +28 -0
- package/models/components/googlepayassurancedetails.d.ts.map +1 -0
- package/models/components/googlepayassurancedetails.js +60 -0
- package/models/components/googlepayassurancedetails.js.map +1 -0
- package/models/components/googlepaybillingaddress.d.ts +73 -0
- package/models/components/googlepaybillingaddress.d.ts.map +1 -0
- package/models/components/googlepaybillingaddress.js +76 -0
- package/models/components/googlepaybillingaddress.js.map +1 -0
- package/models/components/googlepaycardinfo.d.ts +91 -0
- package/models/components/googlepaycardinfo.d.ts.map +1 -0
- package/models/components/googlepaycardinfo.js +98 -0
- package/models/components/googlepaycardinfo.js.map +1 -0
- package/models/components/googlepaypaymentmethoddata.d.ts +65 -0
- package/models/components/googlepaypaymentmethoddata.d.ts.map +1 -0
- package/models/components/googlepaypaymentmethoddata.js +76 -0
- package/models/components/googlepaypaymentmethoddata.js.map +1 -0
- package/models/components/googlepaytokenizationdata.d.ts +47 -0
- package/models/components/googlepaytokenizationdata.d.ts.map +1 -0
- package/models/components/googlepaytokenizationdata.js +70 -0
- package/models/components/googlepaytokenizationdata.js.map +1 -0
- package/models/components/index.d.ts +15 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +15 -2
- package/models/components/index.js.map +1 -1
- package/models/components/linkedgooglepaypaymentmethod.d.ts +5 -10
- package/models/components/linkedgooglepaypaymentmethod.d.ts.map +1 -1
- package/models/components/linkedgooglepaypaymentmethod.js +4 -11
- package/models/components/linkedgooglepaypaymentmethod.js.map +1 -1
- package/models/components/linkgooglepay.d.ts +17 -9
- package/models/components/linkgooglepay.d.ts.map +1 -1
- package/models/components/linkgooglepay.js +5 -3
- package/models/components/linkgooglepay.js.map +1 -1
- package/models/components/paymentlink.d.ts +10 -0
- package/models/components/paymentlink.d.ts.map +1 -1
- package/models/components/paymentlink.js.map +1 -1
- package/models/components/paymentlinkcustomeroptions.d.ts +5 -0
- package/models/components/paymentlinkcustomeroptions.d.ts.map +1 -1
- package/models/components/paymentlinkcustomeroptions.js +2 -0
- package/models/components/paymentlinkcustomeroptions.js.map +1 -1
- package/models/components/puttippresets.d.ts +36 -0
- package/models/components/puttippresets.d.ts.map +1 -0
- package/models/components/puttippresets.js +64 -0
- package/models/components/puttippresets.js.map +1 -0
- package/models/components/puttransferconfig.d.ts +18 -0
- package/models/components/puttransferconfig.d.ts.map +1 -0
- package/models/components/puttransferconfig.js +59 -0
- package/models/components/puttransferconfig.js.map +1 -0
- package/models/components/tipcalculationbasis.d.ts +26 -0
- package/models/components/tipcalculationbasis.d.ts.map +1 -0
- package/models/components/tipcalculationbasis.js +56 -0
- package/models/components/tipcalculationbasis.js.map +1 -0
- package/models/components/tippresets.d.ts +39 -0
- package/models/components/tippresets.d.ts.map +1 -0
- package/models/components/tippresets.js +64 -0
- package/models/components/tippresets.js.map +1 -0
- package/models/components/transfer.d.ts +3 -3
- package/models/components/transfer.d.ts.map +1 -1
- package/models/components/transfer.js +3 -0
- package/models/components/transfer.js.map +1 -1
- package/models/components/transferamountdetails.d.ts +21 -0
- package/models/components/transferamountdetails.d.ts.map +1 -0
- package/models/components/transferamountdetails.js +59 -0
- package/models/components/transferamountdetails.js.map +1 -0
- package/models/components/transferconfig.d.ts +24 -0
- package/models/components/transferconfig.d.ts.map +1 -0
- package/models/components/{googlepaytoken.js → transferconfig.js} +13 -19
- package/models/components/transferconfig.js.map +1 -0
- package/models/components/transferdestination.d.ts +6 -0
- package/models/components/transferdestination.d.ts.map +1 -1
- package/models/components/transferdestination.js +3 -0
- package/models/components/transferdestination.js.map +1 -1
- package/models/components/transfersource.d.ts +6 -0
- package/models/components/transfersource.d.ts.map +1 -1
- package/models/components/transfersource.js +3 -0
- package/models/components/transfersource.js.map +1 -1
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/linkgooglepayerror.d.ts +14 -5
- package/models/errors/linkgooglepayerror.d.ts.map +1 -1
- package/models/errors/linkgooglepayerror.js +10 -4
- package/models/errors/linkgooglepayerror.js.map +1 -1
- package/models/errors/transfer.d.ts +3 -6
- package/models/errors/transfer.d.ts.map +1 -1
- package/models/errors/transfer.js +4 -0
- package/models/errors/transfer.js.map +1 -1
- package/models/errors/transferconfigvalidationerror.d.ts +43 -0
- package/models/errors/transferconfigvalidationerror.d.ts.map +1 -0
- package/models/errors/transferconfigvalidationerror.js +99 -0
- package/models/errors/transferconfigvalidationerror.js.map +1 -0
- package/models/errors/transfervalidationerror.d.ts +3 -0
- package/models/errors/transfervalidationerror.d.ts.map +1 -1
- package/models/errors/transfervalidationerror.js +6 -0
- package/models/errors/transfervalidationerror.js.map +1 -1
- package/models/operations/createtransferconfig.d.ts +42 -0
- package/models/operations/createtransferconfig.d.ts.map +1 -0
- package/models/operations/createtransferconfig.js +98 -0
- package/models/operations/createtransferconfig.js.map +1 -0
- package/models/operations/gettransferconfig.d.ts +37 -0
- package/models/operations/gettransferconfig.d.ts.map +1 -0
- package/models/operations/gettransferconfig.js +88 -0
- package/models/operations/gettransferconfig.js.map +1 -0
- package/models/operations/index.d.ts +3 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/updatetransferconfig.d.ts +39 -0
- package/models/operations/updatetransferconfig.d.ts.map +1 -0
- package/models/operations/updatetransferconfig.js +98 -0
- package/models/operations/updatetransferconfig.js.map +1 -0
- package/package.json +1 -1
- package/sdk/googlepay.d.ts +3 -1
- package/sdk/googlepay.d.ts.map +1 -1
- package/sdk/googlepay.js +3 -1
- package/sdk/googlepay.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/transferconfig.d.ts +17 -0
- package/sdk/transferconfig.d.ts.map +1 -0
- package/sdk/transferconfig.js +33 -0
- package/sdk/transferconfig.js.map +1 -0
- package/src/funcs/googlePayLinkToken.ts +3 -1
- package/src/funcs/transferConfigCreate.ts +187 -0
- package/src/funcs/transferConfigGet.ts +172 -0
- package/src/funcs/transferConfigUpdate.ts +185 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +7 -1
- package/src/mcp-server/tools/googlePayLinkToken.ts +3 -1
- package/src/mcp-server/tools/transferConfigCreate.ts +35 -0
- package/src/mcp-server/tools/transferConfigGet.ts +35 -0
- package/src/mcp-server/tools/transferConfigUpdate.ts +35 -0
- package/src/models/components/createdtransfer.ts +11 -1
- package/src/models/components/createpaymentlink.ts +13 -0
- package/src/models/components/createtippresets.ts +83 -0
- package/src/models/components/createtransfer.ts +10 -3
- package/src/models/components/createtransferamountdetails.ts +62 -0
- package/src/models/components/createtransferamountdetailsvalidationerror.ts +59 -0
- package/src/models/components/createtransferconfig.ts +57 -0
- package/src/models/components/googlepayassurancedetails.ts +64 -0
- package/src/models/components/googlepaybillingaddress.ts +125 -0
- package/src/models/components/googlepaycardinfo.ts +153 -0
- package/src/models/components/googlepaypaymentmethoddata.ts +120 -0
- package/src/models/components/googlepaytokenizationdata.ts +91 -0
- package/src/models/components/index.ts +15 -2
- package/src/models/components/linkedgooglepaypaymentmethod.ts +11 -22
- package/src/models/components/linkgooglepay.ts +25 -15
- package/src/models/components/paymentlink.ts +10 -0
- package/src/models/components/paymentlinkcustomeroptions.ts +7 -0
- package/src/models/components/puttippresets.ts +79 -0
- package/src/models/components/puttransferconfig.ts +57 -0
- package/src/models/components/tipcalculationbasis.ts +35 -0
- package/src/models/components/tippresets.ts +82 -0
- package/src/models/components/transfer.ts +10 -3
- package/src/models/components/transferamountdetails.ts +60 -0
- package/src/models/components/transferconfig.ts +59 -0
- package/src/models/components/transferdestination.ts +13 -0
- package/src/models/components/transfersource.ts +13 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/linkgooglepayerror.ts +24 -8
- package/src/models/errors/transfer.ts +6 -6
- package/src/models/errors/transferconfigvalidationerror.ts +110 -0
- package/src/models/errors/transfervalidationerror.ts +14 -0
- package/src/models/operations/createtransferconfig.ts +129 -0
- package/src/models/operations/gettransferconfig.ts +110 -0
- package/src/models/operations/index.ts +3 -0
- package/src/models/operations/updatetransferconfig.ts +126 -0
- package/src/sdk/googlepay.ts +3 -1
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/transferconfig.ts +54 -0
- package/models/components/googlepayintermediatesigningkey.d.ts +0 -28
- package/models/components/googlepayintermediatesigningkey.d.ts.map +0 -1
- package/models/components/googlepayintermediatesigningkey.js.map +0 -1
- package/models/components/googlepaytoken.d.ts +0 -44
- package/models/components/googlepaytoken.d.ts.map +0 -1
- package/models/components/googlepaytoken.js.map +0 -1
- package/src/models/components/googlepayintermediatesigningkey.ts +0 -66
- package/src/models/components/googlepaytoken.ts +0 -85
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MoovCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.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 { MoovError } from "../models/errors/mooverror.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Create a transfer config for an account.
|
|
31
|
+
*/
|
|
32
|
+
export function transferConfigCreate(
|
|
33
|
+
client: MoovCore,
|
|
34
|
+
request: operations.CreateTransferConfigRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
operations.CreateTransferConfigResponse,
|
|
39
|
+
| errors.GenericError
|
|
40
|
+
| errors.TransferConfigValidationError
|
|
41
|
+
| MoovError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: MoovCore,
|
|
60
|
+
request: operations.CreateTransferConfigRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.CreateTransferConfigResponse,
|
|
66
|
+
| errors.GenericError
|
|
67
|
+
| errors.TransferConfigValidationError
|
|
68
|
+
| MoovError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) =>
|
|
83
|
+
operations.CreateTransferConfigRequest$outboundSchema.parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = encodeJSON("body", payload.CreateTransferConfig, {
|
|
91
|
+
explode: true,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const pathParams = {
|
|
95
|
+
accountID: encodeSimple("accountID", payload.accountID, {
|
|
96
|
+
explode: false,
|
|
97
|
+
charEncoding: "percent",
|
|
98
|
+
}),
|
|
99
|
+
};
|
|
100
|
+
const path = pathToFunc("/accounts/{accountID}/transfer-config")(pathParams);
|
|
101
|
+
|
|
102
|
+
const headers = new Headers(compactMap({
|
|
103
|
+
"Content-Type": "application/json",
|
|
104
|
+
Accept: "application/json",
|
|
105
|
+
}));
|
|
106
|
+
|
|
107
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
options: client._options,
|
|
112
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
+
operationID: "createTransferConfig",
|
|
114
|
+
oAuth2Scopes: null,
|
|
115
|
+
|
|
116
|
+
resolvedSecurity: requestSecurity,
|
|
117
|
+
|
|
118
|
+
securitySource: client._options.security,
|
|
119
|
+
retryConfig: options?.retries
|
|
120
|
+
|| client._options.retryConfig
|
|
121
|
+
|| { strategy: "none" },
|
|
122
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const requestRes = client._createRequest(context, {
|
|
126
|
+
security: requestSecurity,
|
|
127
|
+
method: "POST",
|
|
128
|
+
baseURL: options?.serverURL,
|
|
129
|
+
path: path,
|
|
130
|
+
headers: headers,
|
|
131
|
+
body: body,
|
|
132
|
+
userAgent: client._options.userAgent,
|
|
133
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
134
|
+
}, options);
|
|
135
|
+
if (!requestRes.ok) {
|
|
136
|
+
return [requestRes, { status: "invalid" }];
|
|
137
|
+
}
|
|
138
|
+
const req = requestRes.value;
|
|
139
|
+
|
|
140
|
+
const doResult = await client._do(req, {
|
|
141
|
+
context,
|
|
142
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
143
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
144
|
+
retryConfig: context.retryConfig,
|
|
145
|
+
retryCodes: context.retryCodes,
|
|
146
|
+
});
|
|
147
|
+
if (!doResult.ok) {
|
|
148
|
+
return [doResult, { status: "request-error", request: req }];
|
|
149
|
+
}
|
|
150
|
+
const response = doResult.value;
|
|
151
|
+
|
|
152
|
+
const responseFields = {
|
|
153
|
+
HttpMeta: { Response: response, Request: req },
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const [result] = await M.match<
|
|
157
|
+
operations.CreateTransferConfigResponse,
|
|
158
|
+
| errors.GenericError
|
|
159
|
+
| errors.TransferConfigValidationError
|
|
160
|
+
| MoovError
|
|
161
|
+
| ResponseValidationError
|
|
162
|
+
| ConnectionError
|
|
163
|
+
| RequestAbortedError
|
|
164
|
+
| RequestTimeoutError
|
|
165
|
+
| InvalidRequestError
|
|
166
|
+
| UnexpectedClientError
|
|
167
|
+
| SDKValidationError
|
|
168
|
+
>(
|
|
169
|
+
M.json(201, operations.CreateTransferConfigResponse$inboundSchema, {
|
|
170
|
+
hdrs: true,
|
|
171
|
+
key: "Result",
|
|
172
|
+
}),
|
|
173
|
+
M.jsonErr(400, errors.GenericError$inboundSchema, { hdrs: true }),
|
|
174
|
+
M.jsonErr(422, errors.TransferConfigValidationError$inboundSchema, {
|
|
175
|
+
hdrs: true,
|
|
176
|
+
}),
|
|
177
|
+
M.fail([401, 403, 404, 429]),
|
|
178
|
+
M.fail([500, 504]),
|
|
179
|
+
M.fail("4XX"),
|
|
180
|
+
M.fail("5XX"),
|
|
181
|
+
)(response, req, { extraFields: responseFields });
|
|
182
|
+
if (!result.ok) {
|
|
183
|
+
return [result, { status: "complete", request: req, response }];
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return [result, { status: "complete", request: req, response }];
|
|
187
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MoovCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { MoovError } from "../models/errors/mooverror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get the transfer config for an account.
|
|
30
|
+
*/
|
|
31
|
+
export function transferConfigGet(
|
|
32
|
+
client: MoovCore,
|
|
33
|
+
request: operations.GetTransferConfigRequest,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): APIPromise<
|
|
36
|
+
Result<
|
|
37
|
+
operations.GetTransferConfigResponse,
|
|
38
|
+
| MoovError
|
|
39
|
+
| ResponseValidationError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
>
|
|
47
|
+
> {
|
|
48
|
+
return new APIPromise($do(
|
|
49
|
+
client,
|
|
50
|
+
request,
|
|
51
|
+
options,
|
|
52
|
+
));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
async function $do(
|
|
56
|
+
client: MoovCore,
|
|
57
|
+
request: operations.GetTransferConfigRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<
|
|
60
|
+
[
|
|
61
|
+
Result<
|
|
62
|
+
operations.GetTransferConfigResponse,
|
|
63
|
+
| MoovError
|
|
64
|
+
| ResponseValidationError
|
|
65
|
+
| ConnectionError
|
|
66
|
+
| RequestAbortedError
|
|
67
|
+
| RequestTimeoutError
|
|
68
|
+
| InvalidRequestError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| SDKValidationError
|
|
71
|
+
>,
|
|
72
|
+
APICall,
|
|
73
|
+
]
|
|
74
|
+
> {
|
|
75
|
+
const parsed = safeParse(
|
|
76
|
+
request,
|
|
77
|
+
(value) => operations.GetTransferConfigRequest$outboundSchema.parse(value),
|
|
78
|
+
"Input validation failed",
|
|
79
|
+
);
|
|
80
|
+
if (!parsed.ok) {
|
|
81
|
+
return [parsed, { status: "invalid" }];
|
|
82
|
+
}
|
|
83
|
+
const payload = parsed.value;
|
|
84
|
+
const body = null;
|
|
85
|
+
|
|
86
|
+
const pathParams = {
|
|
87
|
+
accountID: encodeSimple("accountID", payload.accountID, {
|
|
88
|
+
explode: false,
|
|
89
|
+
charEncoding: "percent",
|
|
90
|
+
}),
|
|
91
|
+
};
|
|
92
|
+
const path = pathToFunc("/accounts/{accountID}/transfer-config")(pathParams);
|
|
93
|
+
|
|
94
|
+
const headers = new Headers(compactMap({
|
|
95
|
+
Accept: "application/json",
|
|
96
|
+
}));
|
|
97
|
+
|
|
98
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
99
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
100
|
+
|
|
101
|
+
const context = {
|
|
102
|
+
options: client._options,
|
|
103
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
104
|
+
operationID: "getTransferConfig",
|
|
105
|
+
oAuth2Scopes: null,
|
|
106
|
+
|
|
107
|
+
resolvedSecurity: requestSecurity,
|
|
108
|
+
|
|
109
|
+
securitySource: client._options.security,
|
|
110
|
+
retryConfig: options?.retries
|
|
111
|
+
|| client._options.retryConfig
|
|
112
|
+
|| { strategy: "none" },
|
|
113
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const requestRes = client._createRequest(context, {
|
|
117
|
+
security: requestSecurity,
|
|
118
|
+
method: "GET",
|
|
119
|
+
baseURL: options?.serverURL,
|
|
120
|
+
path: path,
|
|
121
|
+
headers: headers,
|
|
122
|
+
body: body,
|
|
123
|
+
userAgent: client._options.userAgent,
|
|
124
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
125
|
+
}, options);
|
|
126
|
+
if (!requestRes.ok) {
|
|
127
|
+
return [requestRes, { status: "invalid" }];
|
|
128
|
+
}
|
|
129
|
+
const req = requestRes.value;
|
|
130
|
+
|
|
131
|
+
const doResult = await client._do(req, {
|
|
132
|
+
context,
|
|
133
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
134
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
135
|
+
retryConfig: context.retryConfig,
|
|
136
|
+
retryCodes: context.retryCodes,
|
|
137
|
+
});
|
|
138
|
+
if (!doResult.ok) {
|
|
139
|
+
return [doResult, { status: "request-error", request: req }];
|
|
140
|
+
}
|
|
141
|
+
const response = doResult.value;
|
|
142
|
+
|
|
143
|
+
const responseFields = {
|
|
144
|
+
HttpMeta: { Response: response, Request: req },
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
const [result] = await M.match<
|
|
148
|
+
operations.GetTransferConfigResponse,
|
|
149
|
+
| MoovError
|
|
150
|
+
| ResponseValidationError
|
|
151
|
+
| ConnectionError
|
|
152
|
+
| RequestAbortedError
|
|
153
|
+
| RequestTimeoutError
|
|
154
|
+
| InvalidRequestError
|
|
155
|
+
| UnexpectedClientError
|
|
156
|
+
| SDKValidationError
|
|
157
|
+
>(
|
|
158
|
+
M.json(200, operations.GetTransferConfigResponse$inboundSchema, {
|
|
159
|
+
hdrs: true,
|
|
160
|
+
key: "Result",
|
|
161
|
+
}),
|
|
162
|
+
M.fail([401, 403, 404, 429]),
|
|
163
|
+
M.fail([500, 504]),
|
|
164
|
+
M.fail("4XX"),
|
|
165
|
+
M.fail("5XX"),
|
|
166
|
+
)(response, req, { extraFields: responseFields });
|
|
167
|
+
if (!result.ok) {
|
|
168
|
+
return [result, { status: "complete", request: req, response }];
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
return [result, { status: "complete", request: req, response }];
|
|
172
|
+
}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { MoovCore } from "../core.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.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 { MoovError } from "../models/errors/mooverror.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Update the transfer config for an account.
|
|
31
|
+
*/
|
|
32
|
+
export function transferConfigUpdate(
|
|
33
|
+
client: MoovCore,
|
|
34
|
+
request: operations.UpdateTransferConfigRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
operations.UpdateTransferConfigResponse,
|
|
39
|
+
| errors.GenericError
|
|
40
|
+
| errors.TransferConfigValidationError
|
|
41
|
+
| MoovError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: MoovCore,
|
|
60
|
+
request: operations.UpdateTransferConfigRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.UpdateTransferConfigResponse,
|
|
66
|
+
| errors.GenericError
|
|
67
|
+
| errors.TransferConfigValidationError
|
|
68
|
+
| MoovError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) =>
|
|
83
|
+
operations.UpdateTransferConfigRequest$outboundSchema.parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = encodeJSON("body", payload.PutTransferConfig, { explode: true });
|
|
91
|
+
|
|
92
|
+
const pathParams = {
|
|
93
|
+
accountID: encodeSimple("accountID", payload.accountID, {
|
|
94
|
+
explode: false,
|
|
95
|
+
charEncoding: "percent",
|
|
96
|
+
}),
|
|
97
|
+
};
|
|
98
|
+
const path = pathToFunc("/accounts/{accountID}/transfer-config")(pathParams);
|
|
99
|
+
|
|
100
|
+
const headers = new Headers(compactMap({
|
|
101
|
+
"Content-Type": "application/json",
|
|
102
|
+
Accept: "application/json",
|
|
103
|
+
}));
|
|
104
|
+
|
|
105
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
106
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
107
|
+
|
|
108
|
+
const context = {
|
|
109
|
+
options: client._options,
|
|
110
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
111
|
+
operationID: "updateTransferConfig",
|
|
112
|
+
oAuth2Scopes: null,
|
|
113
|
+
|
|
114
|
+
resolvedSecurity: requestSecurity,
|
|
115
|
+
|
|
116
|
+
securitySource: client._options.security,
|
|
117
|
+
retryConfig: options?.retries
|
|
118
|
+
|| client._options.retryConfig
|
|
119
|
+
|| { strategy: "none" },
|
|
120
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const requestRes = client._createRequest(context, {
|
|
124
|
+
security: requestSecurity,
|
|
125
|
+
method: "PUT",
|
|
126
|
+
baseURL: options?.serverURL,
|
|
127
|
+
path: path,
|
|
128
|
+
headers: headers,
|
|
129
|
+
body: body,
|
|
130
|
+
userAgent: client._options.userAgent,
|
|
131
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
132
|
+
}, options);
|
|
133
|
+
if (!requestRes.ok) {
|
|
134
|
+
return [requestRes, { status: "invalid" }];
|
|
135
|
+
}
|
|
136
|
+
const req = requestRes.value;
|
|
137
|
+
|
|
138
|
+
const doResult = await client._do(req, {
|
|
139
|
+
context,
|
|
140
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
141
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
142
|
+
retryConfig: context.retryConfig,
|
|
143
|
+
retryCodes: context.retryCodes,
|
|
144
|
+
});
|
|
145
|
+
if (!doResult.ok) {
|
|
146
|
+
return [doResult, { status: "request-error", request: req }];
|
|
147
|
+
}
|
|
148
|
+
const response = doResult.value;
|
|
149
|
+
|
|
150
|
+
const responseFields = {
|
|
151
|
+
HttpMeta: { Response: response, Request: req },
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const [result] = await M.match<
|
|
155
|
+
operations.UpdateTransferConfigResponse,
|
|
156
|
+
| errors.GenericError
|
|
157
|
+
| errors.TransferConfigValidationError
|
|
158
|
+
| MoovError
|
|
159
|
+
| ResponseValidationError
|
|
160
|
+
| ConnectionError
|
|
161
|
+
| RequestAbortedError
|
|
162
|
+
| RequestTimeoutError
|
|
163
|
+
| InvalidRequestError
|
|
164
|
+
| UnexpectedClientError
|
|
165
|
+
| SDKValidationError
|
|
166
|
+
>(
|
|
167
|
+
M.json(200, operations.UpdateTransferConfigResponse$inboundSchema, {
|
|
168
|
+
hdrs: true,
|
|
169
|
+
key: "Result",
|
|
170
|
+
}),
|
|
171
|
+
M.jsonErr(400, errors.GenericError$inboundSchema, { hdrs: true }),
|
|
172
|
+
M.jsonErr(422, errors.TransferConfigValidationError$inboundSchema, {
|
|
173
|
+
hdrs: true,
|
|
174
|
+
}),
|
|
175
|
+
M.fail([401, 403, 404, 429]),
|
|
176
|
+
M.fail([500, 504]),
|
|
177
|
+
M.fail("4XX"),
|
|
178
|
+
M.fail("5XX"),
|
|
179
|
+
)(response, req, { extraFields: responseFields });
|
|
180
|
+
if (!result.ok) {
|
|
181
|
+
return [result, { status: "complete", request: req, response }];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return [result, { status: "complete", request: req, response }];
|
|
185
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
70
|
openapiDocVersion: "v2026.04.00",
|
|
71
|
-
sdkVersion: "26.4.
|
|
72
|
-
genVersion: "2.881.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 26.4.
|
|
71
|
+
sdkVersion: "26.4.1",
|
|
72
|
+
genVersion: "2.881.4",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 26.4.1 2.881.4 v2026.04.00 @moovio/sdk",
|
|
74
74
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -168,6 +168,9 @@ import { tool$terminalApplicationsCreateVersion } from "./tools/terminalApplicat
|
|
|
168
168
|
import { tool$terminalApplicationsDelete } from "./tools/terminalApplicationsDelete.js";
|
|
169
169
|
import { tool$terminalApplicationsGet } from "./tools/terminalApplicationsGet.js";
|
|
170
170
|
import { tool$terminalApplicationsList } from "./tools/terminalApplicationsList.js";
|
|
171
|
+
import { tool$transferConfigCreate } from "./tools/transferConfigCreate.js";
|
|
172
|
+
import { tool$transferConfigGet } from "./tools/transferConfigGet.js";
|
|
173
|
+
import { tool$transferConfigUpdate } from "./tools/transferConfigUpdate.js";
|
|
171
174
|
import { tool$transfersBatchGetTransfers } from "./tools/transfersBatchGetTransfers.js";
|
|
172
175
|
import { tool$transfersCreate } from "./tools/transfersCreate.js";
|
|
173
176
|
import { tool$transfersCreateCancellation } from "./tools/transfersCreateCancellation.js";
|
|
@@ -208,7 +211,7 @@ export function createMCPServer(deps: {
|
|
|
208
211
|
}) {
|
|
209
212
|
const server = new McpServer({
|
|
210
213
|
name: "Moov",
|
|
211
|
-
version: "26.4.
|
|
214
|
+
version: "26.4.1",
|
|
212
215
|
});
|
|
213
216
|
|
|
214
217
|
const client = new MoovCore({
|
|
@@ -361,6 +364,9 @@ export function createMCPServer(deps: {
|
|
|
361
364
|
tool(tool$supportGetTicket);
|
|
362
365
|
tool(tool$supportUpdateTicket);
|
|
363
366
|
tool(tool$supportListTicketMessages);
|
|
367
|
+
tool(tool$transferConfigCreate);
|
|
368
|
+
tool(tool$transferConfigGet);
|
|
369
|
+
tool(tool$transferConfigUpdate);
|
|
364
370
|
tool(tool$transfersGenerateOptions);
|
|
365
371
|
tool(tool$transfersCreate);
|
|
366
372
|
tool(tool$transfersList);
|
|
@@ -14,7 +14,9 @@ export const tool$googlePayLinkToken: ToolDefinition<typeof args> = {
|
|
|
14
14
|
name: "google-pay-link-token",
|
|
15
15
|
description: `Connect a Google Pay token to the specified account.
|
|
16
16
|
|
|
17
|
-
The \`
|
|
17
|
+
The \`paymentMethodData\` field should contain the \`paymentMethodData\` property from Google Pay's
|
|
18
|
+
[PaymentData](https://developers.google.com/pay/api/web/reference/response-objects#PaymentData) response,
|
|
19
|
+
passed through unmodified.
|
|
18
20
|
|
|
19
21
|
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
20
22
|
you'll need to specify the \`/accounts/{accountID}/cards.write\` scope.`,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { transferConfigCreate } from "../../funcs/transferConfigCreate.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.CreateTransferConfigRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$transferConfigCreate: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "transfer-config-create",
|
|
15
|
+
description: `Create a transfer config for an account.`,
|
|
16
|
+
args,
|
|
17
|
+
tool: async (client, args, ctx) => {
|
|
18
|
+
const [result, apiCall] = await transferConfigCreate(
|
|
19
|
+
client,
|
|
20
|
+
args.request,
|
|
21
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
22
|
+
).$inspect();
|
|
23
|
+
|
|
24
|
+
if (!result.ok) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: "text", text: result.error.message }],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const value = result.value.result;
|
|
32
|
+
|
|
33
|
+
return formatResult(value, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { transferConfigGet } from "../../funcs/transferConfigGet.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetTransferConfigRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$transferConfigGet: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "transfer-config-get",
|
|
15
|
+
description: `Get the transfer config for an account.`,
|
|
16
|
+
args,
|
|
17
|
+
tool: async (client, args, ctx) => {
|
|
18
|
+
const [result, apiCall] = await transferConfigGet(
|
|
19
|
+
client,
|
|
20
|
+
args.request,
|
|
21
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
22
|
+
).$inspect();
|
|
23
|
+
|
|
24
|
+
if (!result.ok) {
|
|
25
|
+
return {
|
|
26
|
+
content: [{ type: "text", text: result.error.message }],
|
|
27
|
+
isError: true,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const value = result.value.result;
|
|
32
|
+
|
|
33
|
+
return formatResult(value, apiCall);
|
|
34
|
+
},
|
|
35
|
+
};
|