@moovio/sdk 26.4.0-dev.16 → 26.4.0-dev.17
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 +77 -61
- package/bin/mcp-server.js +626 -238
- package/bin/mcp-server.js.map +38 -27
- package/funcs/cardIssuingUpdate.d.ts +1 -1
- package/funcs/cardIssuingUpdate.d.ts.map +1 -1
- package/funcs/cardIssuingUpdate.js +2 -1
- package/funcs/cardIssuingUpdate.js.map +1 -1
- package/funcs/disputesUploadEvidenceFile.js +4 -1
- package/funcs/disputesUploadEvidenceFile.js.map +1 -1
- package/funcs/filesUpload.js +4 -1
- package/funcs/filesUpload.js.map +1 -1
- package/funcs/imagesUpdate.d.ts.map +1 -1
- package/funcs/imagesUpdate.js +4 -1
- package/funcs/imagesUpdate.js.map +1 -1
- package/funcs/imagesUpload.d.ts.map +1 -1
- package/funcs/imagesUpload.js +4 -1
- package/funcs/imagesUpload.js.map +1 -1
- package/funcs/transfersBatchGetTransfers.d.ts +21 -0
- package/funcs/transfersBatchGetTransfers.d.ts.map +1 -0
- package/funcs/transfersBatchGetTransfers.js +131 -0
- package/funcs/transfersBatchGetTransfers.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/encodings.d.ts +1 -0
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +27 -5
- package/lib/encodings.js.map +1 -1
- package/lib/security.d.ts +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +18 -7
- package/lib/security.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/applePayLinkToken.js +3 -3
- package/mcp-server/tools/cardIssuingUpdate.d.ts.map +1 -1
- package/mcp-server/tools/cardIssuingUpdate.js +2 -1
- package/mcp-server/tools/cardIssuingUpdate.js.map +1 -1
- package/mcp-server/tools/transfersBatchGetTransfers.d.ts +8 -0
- package/mcp-server/tools/transfersBatchGetTransfers.d.ts.map +1 -0
- package/mcp-server/tools/transfersBatchGetTransfers.js +69 -0
- package/mcp-server/tools/transfersBatchGetTransfers.js.map +1 -0
- package/models/components/batchgettransfersrequest.d.ts +20 -0
- package/models/components/batchgettransfersrequest.d.ts.map +1 -0
- package/models/components/batchgettransfersrequest.js +58 -0
- package/models/components/batchgettransfersrequest.js.map +1 -0
- package/models/components/cardpayouttype.d.ts +17 -0
- package/models/components/cardpayouttype.d.ts.map +1 -0
- package/models/components/cardpayouttype.js +51 -0
- package/models/components/cardpayouttype.js.map +1 -0
- package/models/components/createtransferdestinationcard.d.ts +6 -0
- package/models/components/createtransferdestinationcard.d.ts.map +1 -1
- package/models/components/createtransferdestinationcard.js +3 -0
- package/models/components/createtransferdestinationcard.js.map +1 -1
- package/models/components/index.d.ts +8 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -0
- package/models/components/index.js.map +1 -1
- package/models/components/paymentmethod.d.ts +4 -2
- package/models/components/paymentmethod.d.ts.map +1 -1
- package/models/components/paymentmethod.js +6 -0
- package/models/components/paymentmethod.js.map +1 -1
- package/models/components/paymentmethodtype.d.ts +2 -0
- package/models/components/paymentmethodtype.d.ts.map +1 -1
- package/models/components/paymentmethodtype.js +2 -0
- package/models/components/paymentmethodtype.js.map +1 -1
- package/models/components/pullfromapplepaypaymentmethod.d.ts +28 -0
- package/models/components/pullfromapplepaypaymentmethod.d.ts.map +1 -0
- package/models/components/pullfromapplepaypaymentmethod.js +63 -0
- package/models/components/pullfromapplepaypaymentmethod.js.map +1 -0
- package/models/components/pullfromapplepaytransferpaymentmethod.d.ts +28 -0
- package/models/components/pullfromapplepaytransferpaymentmethod.d.ts.map +1 -0
- package/models/components/pullfromapplepaytransferpaymentmethod.js +63 -0
- package/models/components/pullfromapplepaytransferpaymentmethod.js.map +1 -0
- package/models/components/pushtoapplepaypaymentmethod.d.ts +28 -0
- package/models/components/pushtoapplepaypaymentmethod.d.ts.map +1 -0
- package/models/components/pushtoapplepaypaymentmethod.js +63 -0
- package/models/components/pushtoapplepaypaymentmethod.js.map +1 -0
- package/models/components/pushtoapplepaytransferpaymentmethod.d.ts +28 -0
- package/models/components/pushtoapplepaytransferpaymentmethod.d.ts.map +1 -0
- package/models/components/pushtoapplepaytransferpaymentmethod.js +63 -0
- package/models/components/pushtoapplepaytransferpaymentmethod.js.map +1 -0
- package/models/components/rtpfailurecode.d.ts +26 -0
- package/models/components/rtpfailurecode.d.ts.map +1 -0
- package/models/components/rtpfailurecode.js +60 -0
- package/models/components/rtpfailurecode.js.map +1 -0
- package/models/components/rtptransactionstatus.d.ts +20 -0
- package/models/components/rtptransactionstatus.d.ts.map +1 -0
- package/models/components/rtptransactionstatus.js +54 -0
- package/models/components/rtptransactionstatus.js.map +1 -0
- package/models/components/transferdestination.d.ts +46 -0
- package/models/components/transferdestination.d.ts.map +1 -1
- package/models/components/transferdestination.js +36 -1
- package/models/components/transferdestination.js.map +1 -1
- package/models/components/transferpaymentmethod.d.ts +4 -2
- package/models/components/transferpaymentmethod.d.ts.map +1 -1
- package/models/components/transferpaymentmethod.js +6 -0
- package/models/components/transferpaymentmethod.js.map +1 -1
- package/models/components/transferpaymentmethodtype.d.ts +2 -0
- package/models/components/transferpaymentmethodtype.d.ts.map +1 -1
- package/models/components/transferpaymentmethodtype.js +2 -0
- package/models/components/transferpaymentmethodtype.js.map +1 -1
- package/models/components/webhookbillingstatementcreated.d.ts +2 -0
- package/models/components/webhookbillingstatementcreated.d.ts.map +1 -1
- package/models/components/webhookbillingstatementcreated.js +2 -0
- package/models/components/webhookbillingstatementcreated.js.map +1 -1
- package/models/components/webhookdata.d.ts +2 -2
- package/models/components/webhookdata.d.ts.map +1 -1
- package/models/components/webhookdata.js +2 -2
- package/models/components/webhookdata.js.map +1 -1
- package/models/operations/batchgettransfers.d.ts +43 -0
- package/models/operations/batchgettransfers.d.ts.map +1 -0
- package/models/operations/batchgettransfers.js +98 -0
- package/models/operations/batchgettransfers.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/linkapplepaytoken.d.ts +2 -2
- package/models/operations/linkapplepaytoken.d.ts.map +1 -1
- package/models/operations/linkapplepaytoken.js +2 -2
- package/models/operations/linkapplepaytoken.js.map +1 -1
- package/models/operations/updateissuedcard.d.ts +2 -0
- package/models/operations/updateissuedcard.d.ts.map +1 -1
- package/models/operations/updateissuedcard.js +4 -0
- package/models/operations/updateissuedcard.js.map +1 -1
- package/package.json +1 -1
- package/sdk/cardissuing.d.ts +1 -1
- package/sdk/cardissuing.d.ts.map +1 -1
- package/sdk/transfers.d.ts +11 -0
- package/sdk/transfers.d.ts.map +1 -1
- package/sdk/transfers.js +14 -0
- package/sdk/transfers.js.map +1 -1
- package/src/funcs/cardIssuingUpdate.ts +5 -4
- package/src/funcs/disputesUploadEvidenceFile.ts +5 -2
- package/src/funcs/filesUpload.ts +5 -2
- package/src/funcs/imagesUpdate.ts +10 -2
- package/src/funcs/imagesUpload.ts +10 -2
- package/src/funcs/transfersBatchGetTransfers.ts +180 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +32 -4
- package/src/lib/security.ts +14 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/applePayLinkToken.ts +3 -3
- package/src/mcp-server/tools/cardIssuingUpdate.ts +3 -1
- package/src/mcp-server/tools/transfersBatchGetTransfers.ts +43 -0
- package/src/models/components/batchgettransfersrequest.ts +54 -0
- package/src/models/components/cardpayouttype.ts +26 -0
- package/src/models/components/createtransferdestinationcard.ts +12 -0
- package/src/models/components/index.ts +8 -0
- package/src/models/components/paymentmethod.ts +22 -2
- package/src/models/components/paymentmethodtype.ts +2 -0
- package/src/models/components/pullfromapplepaypaymentmethod.ts +73 -0
- package/src/models/components/pullfromapplepaytransferpaymentmethod.ts +74 -0
- package/src/models/components/pushtoapplepaypaymentmethod.ts +73 -0
- package/src/models/components/pushtoapplepaytransferpaymentmethod.ts +74 -0
- package/src/models/components/rtpfailurecode.ts +35 -0
- package/src/models/components/rtptransactionstatus.ts +29 -0
- package/src/models/components/transferdestination.ts +99 -0
- package/src/models/components/transferpaymentmethod.ts +22 -2
- package/src/models/components/transferpaymentmethodtype.ts +2 -0
- package/src/models/components/webhookbillingstatementcreated.ts +4 -0
- package/src/models/components/webhookdata.ts +6 -6
- package/src/models/operations/batchgettransfers.ts +122 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/linkapplepaytoken.ts +4 -4
- package/src/models/operations/updateissuedcard.ts +6 -0
- package/src/sdk/cardissuing.ts +1 -1
- package/src/sdk/transfers.ts +22 -0
|
@@ -0,0 +1,180 @@
|
|
|
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 * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import { MoovError } from "../models/errors/mooverror.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
25
|
+
import { Result } from "../types/fp.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve transfer details for multiple transfers in one request. The response is a map from each
|
|
29
|
+
* requested transfer ID to its full transfer details when available; IDs that are not found or not
|
|
30
|
+
* accessible under this account are omitted from the map.
|
|
31
|
+
*
|
|
32
|
+
* Read our [transfers overview guide](https://docs.moov.io/guides/money-movement/overview/) to learn more.
|
|
33
|
+
*
|
|
34
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
35
|
+
* you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
|
|
36
|
+
*/
|
|
37
|
+
export function transfersBatchGetTransfers(
|
|
38
|
+
client: MoovCore,
|
|
39
|
+
request: operations.BatchGetTransfersRequest,
|
|
40
|
+
options?: RequestOptions,
|
|
41
|
+
): APIPromise<
|
|
42
|
+
Result<
|
|
43
|
+
operations.BatchGetTransfersResponse,
|
|
44
|
+
| MoovError
|
|
45
|
+
| ResponseValidationError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
| RequestAbortedError
|
|
48
|
+
| RequestTimeoutError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| UnexpectedClientError
|
|
51
|
+
| SDKValidationError
|
|
52
|
+
>
|
|
53
|
+
> {
|
|
54
|
+
return new APIPromise($do(
|
|
55
|
+
client,
|
|
56
|
+
request,
|
|
57
|
+
options,
|
|
58
|
+
));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async function $do(
|
|
62
|
+
client: MoovCore,
|
|
63
|
+
request: operations.BatchGetTransfersRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<
|
|
66
|
+
[
|
|
67
|
+
Result<
|
|
68
|
+
operations.BatchGetTransfersResponse,
|
|
69
|
+
| MoovError
|
|
70
|
+
| ResponseValidationError
|
|
71
|
+
| ConnectionError
|
|
72
|
+
| RequestAbortedError
|
|
73
|
+
| RequestTimeoutError
|
|
74
|
+
| InvalidRequestError
|
|
75
|
+
| UnexpectedClientError
|
|
76
|
+
| SDKValidationError
|
|
77
|
+
>,
|
|
78
|
+
APICall,
|
|
79
|
+
]
|
|
80
|
+
> {
|
|
81
|
+
const parsed = safeParse(
|
|
82
|
+
request,
|
|
83
|
+
(value) => operations.BatchGetTransfersRequest$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.BatchGetTransfersRequest, {
|
|
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}/transfers/.fetch")(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: "batchGetTransfers",
|
|
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
|
+
errorCodes: ["401", "403", "429", "4XX", "500", "504", "5XX"],
|
|
143
|
+
retryConfig: context.retryConfig,
|
|
144
|
+
retryCodes: context.retryCodes,
|
|
145
|
+
});
|
|
146
|
+
if (!doResult.ok) {
|
|
147
|
+
return [doResult, { status: "request-error", request: req }];
|
|
148
|
+
}
|
|
149
|
+
const response = doResult.value;
|
|
150
|
+
|
|
151
|
+
const responseFields = {
|
|
152
|
+
HttpMeta: { Response: response, Request: req },
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const [result] = await M.match<
|
|
156
|
+
operations.BatchGetTransfersResponse,
|
|
157
|
+
| MoovError
|
|
158
|
+
| ResponseValidationError
|
|
159
|
+
| ConnectionError
|
|
160
|
+
| RequestAbortedError
|
|
161
|
+
| RequestTimeoutError
|
|
162
|
+
| InvalidRequestError
|
|
163
|
+
| UnexpectedClientError
|
|
164
|
+
| SDKValidationError
|
|
165
|
+
>(
|
|
166
|
+
M.json(200, operations.BatchGetTransfersResponse$inboundSchema, {
|
|
167
|
+
hdrs: true,
|
|
168
|
+
key: "Result",
|
|
169
|
+
}),
|
|
170
|
+
M.fail([401, 403, 429]),
|
|
171
|
+
M.fail([500, 504]),
|
|
172
|
+
M.fail("4XX"),
|
|
173
|
+
M.fail("5XX"),
|
|
174
|
+
)(response, req, { extraFields: responseFields });
|
|
175
|
+
if (!result.ok) {
|
|
176
|
+
return [result, { status: "complete", request: req, response }];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -68,8 +68,8 @@ 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.0-dev.
|
|
72
|
-
genVersion: "2.
|
|
71
|
+
sdkVersion: "26.4.0-dev.17",
|
|
72
|
+
genVersion: "2.879.13",
|
|
73
73
|
userAgent:
|
|
74
|
-
"speakeasy-sdk/typescript 26.4.0-dev.
|
|
74
|
+
"speakeasy-sdk/typescript 26.4.0-dev.17 2.879.13 v2026.04.00 @moovio/sdk",
|
|
75
75
|
} as const;
|
package/src/lib/encodings.ts
CHANGED
|
@@ -479,6 +479,23 @@ export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited);
|
|
|
479
479
|
export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited);
|
|
480
480
|
export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject);
|
|
481
481
|
|
|
482
|
+
function isBlobLike(val: unknown): val is Blob {
|
|
483
|
+
if (val instanceof Blob) {
|
|
484
|
+
return true;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
|
|
488
|
+
return false;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
const tag = val[Symbol.toStringTag];
|
|
492
|
+
if (tag !== "Blob" && tag !== "File") {
|
|
493
|
+
return false;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
return "stream" in val && typeof val.stream === "function";
|
|
497
|
+
}
|
|
498
|
+
|
|
482
499
|
export function appendForm(
|
|
483
500
|
fd: FormData,
|
|
484
501
|
key: string,
|
|
@@ -487,11 +504,22 @@ export function appendForm(
|
|
|
487
504
|
): void {
|
|
488
505
|
if (value == null) {
|
|
489
506
|
return;
|
|
490
|
-
} else if (value
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
507
|
+
} else if (isBlobLike(value)) {
|
|
508
|
+
if (fileName) {
|
|
509
|
+
fd.append(key, value as Blob, fileName);
|
|
510
|
+
} else {
|
|
511
|
+
fd.append(key, value as Blob);
|
|
512
|
+
}
|
|
494
513
|
} else {
|
|
495
514
|
fd.append(key, String(value));
|
|
496
515
|
}
|
|
497
516
|
}
|
|
517
|
+
|
|
518
|
+
export async function normalizeBlob(
|
|
519
|
+
value: Pick<Blob, "arrayBuffer" | "type">,
|
|
520
|
+
): Promise<Blob> {
|
|
521
|
+
if (value instanceof Blob) {
|
|
522
|
+
return value;
|
|
523
|
+
}
|
|
524
|
+
return new Blob([await value.arrayBuffer()], { type: value.type });
|
|
525
|
+
}
|
package/src/lib/security.ts
CHANGED
|
@@ -239,15 +239,27 @@ function applyBearer(
|
|
|
239
239
|
|
|
240
240
|
export function resolveGlobalSecurity(
|
|
241
241
|
security: Partial<components.Security> | null | undefined,
|
|
242
|
+
allowedFields?: number[],
|
|
242
243
|
): SecurityState | null {
|
|
243
|
-
|
|
244
|
+
let inputs: SecurityInput[][] = [
|
|
244
245
|
[
|
|
245
246
|
{
|
|
246
247
|
type: "http:basic",
|
|
247
248
|
value: { username: security?.username, password: security?.password },
|
|
248
249
|
},
|
|
249
250
|
],
|
|
250
|
-
|
|
251
|
+
];
|
|
252
|
+
|
|
253
|
+
if (allowedFields) {
|
|
254
|
+
inputs = allowedFields.map((i) => {
|
|
255
|
+
if (i < 0 || i >= inputs.length) {
|
|
256
|
+
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
257
|
+
}
|
|
258
|
+
return inputs[i]!;
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
return resolveSecurity(...inputs);
|
|
251
263
|
}
|
|
252
264
|
|
|
253
265
|
export async function extractSecurity<
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -167,6 +167,7 @@ import { tool$terminalApplicationsCreateVersion } from "./tools/terminalApplicat
|
|
|
167
167
|
import { tool$terminalApplicationsDelete } from "./tools/terminalApplicationsDelete.js";
|
|
168
168
|
import { tool$terminalApplicationsGet } from "./tools/terminalApplicationsGet.js";
|
|
169
169
|
import { tool$terminalApplicationsList } from "./tools/terminalApplicationsList.js";
|
|
170
|
+
import { tool$transfersBatchGetTransfers } from "./tools/transfersBatchGetTransfers.js";
|
|
170
171
|
import { tool$transfersCreate } from "./tools/transfersCreate.js";
|
|
171
172
|
import { tool$transfersCreateCancellation } from "./tools/transfersCreateCancellation.js";
|
|
172
173
|
import { tool$transfersCreateReversal } from "./tools/transfersCreateReversal.js";
|
|
@@ -206,7 +207,7 @@ export function createMCPServer(deps: {
|
|
|
206
207
|
}) {
|
|
207
208
|
const server = new McpServer({
|
|
208
209
|
name: "Moov",
|
|
209
|
-
version: "26.4.0-dev.
|
|
210
|
+
version: "26.4.0-dev.17",
|
|
210
211
|
});
|
|
211
212
|
|
|
212
213
|
const client = new MoovCore({
|
|
@@ -361,6 +362,7 @@ export function createMCPServer(deps: {
|
|
|
361
362
|
tool(tool$transfersGenerateOptions);
|
|
362
363
|
tool(tool$transfersCreate);
|
|
363
364
|
tool(tool$transfersList);
|
|
365
|
+
tool(tool$transfersBatchGetTransfers);
|
|
364
366
|
tool(tool$transfersGet);
|
|
365
367
|
tool(tool$transfersUpdate);
|
|
366
368
|
tool(tool$transfersCreateCancellation);
|
|
@@ -12,12 +12,12 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$applePayLinkToken: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "apple-pay-link-token",
|
|
15
|
-
description: `Connect an Apple Pay token to the specified account.
|
|
15
|
+
description: `Connect an Apple Pay token to the specified account.
|
|
16
16
|
|
|
17
|
-
Read our [Apple Pay tutorial](https://docs.moov.io/guides/sources/cards/apple-pay/#register-your-domains) to learn more.
|
|
17
|
+
Read our [Apple Pay tutorial](https://docs.moov.io/guides/sources/cards/apple-pay/#register-your-domains) to learn more.
|
|
18
18
|
The \`token\` data is defined by Apple Pay and should be passed through from Apple Pay's response unmodified.
|
|
19
19
|
|
|
20
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
20
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
21
21
|
you'll need to specify the \`/accounts/{accountID}/cards.write\` scope.`,
|
|
22
22
|
args,
|
|
23
23
|
tool: async (client, args, ctx) => {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { transfersBatchGetTransfers } from "../../funcs/transfersBatchGetTransfers.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.BatchGetTransfersRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$transfersBatchGetTransfers: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "transfers-batch-get-transfers",
|
|
15
|
+
description:
|
|
16
|
+
`Retrieve transfer details for multiple transfers in one request. The response is a map from each
|
|
17
|
+
requested transfer ID to its full transfer details when available; IDs that are not found or not
|
|
18
|
+
accessible under this account are omitted from the map.
|
|
19
|
+
|
|
20
|
+
Read our [transfers overview guide](https://docs.moov.io/guides/money-movement/overview/) to learn more.
|
|
21
|
+
|
|
22
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
23
|
+
you'll need to specify the \`/accounts/{accountID}/transfers.read\` scope.`,
|
|
24
|
+
args,
|
|
25
|
+
tool: async (client, args, ctx) => {
|
|
26
|
+
const [result, apiCall] = await transfersBatchGetTransfers(
|
|
27
|
+
client,
|
|
28
|
+
args.request,
|
|
29
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
30
|
+
).$inspect();
|
|
31
|
+
|
|
32
|
+
if (!result.ok) {
|
|
33
|
+
return {
|
|
34
|
+
content: [{ type: "text", text: result.error.message }],
|
|
35
|
+
isError: true,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const value = result.value.result;
|
|
40
|
+
|
|
41
|
+
return formatResult(value, apiCall);
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Array of transfer IDs to fetch.
|
|
12
|
+
*/
|
|
13
|
+
export type BatchGetTransfersRequest = {
|
|
14
|
+
transferIDs: Array<string>;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const BatchGetTransfersRequest$inboundSchema: z.ZodType<
|
|
19
|
+
BatchGetTransfersRequest,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
transferIDs: z.array(z.string()),
|
|
24
|
+
});
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type BatchGetTransfersRequest$Outbound = {
|
|
27
|
+
transferIDs: Array<string>;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const BatchGetTransfersRequest$outboundSchema: z.ZodType<
|
|
32
|
+
BatchGetTransfersRequest$Outbound,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
BatchGetTransfersRequest
|
|
35
|
+
> = z.object({
|
|
36
|
+
transferIDs: z.array(z.string()),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function batchGetTransfersRequestToJSON(
|
|
40
|
+
batchGetTransfersRequest: BatchGetTransfersRequest,
|
|
41
|
+
): string {
|
|
42
|
+
return JSON.stringify(
|
|
43
|
+
BatchGetTransfersRequest$outboundSchema.parse(batchGetTransfersRequest),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export function batchGetTransfersRequestFromJSON(
|
|
47
|
+
jsonString: string,
|
|
48
|
+
): SafeParseResult<BatchGetTransfersRequest, SDKValidationError> {
|
|
49
|
+
return safeParse(
|
|
50
|
+
jsonString,
|
|
51
|
+
(x) => BatchGetTransfersRequest$inboundSchema.parse(JSON.parse(x)),
|
|
52
|
+
`Failed to parse 'BatchGetTransfersRequest' from JSON`,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the type of card payout for push-to-card transfers, used to determine the business application identifier (BAI) sent to the card network.
|
|
10
|
+
*/
|
|
11
|
+
export const CardPayoutType = {
|
|
12
|
+
Loyalty: "loyalty",
|
|
13
|
+
} as const;
|
|
14
|
+
/**
|
|
15
|
+
* Specifies the type of card payout for push-to-card transfers, used to determine the business application identifier (BAI) sent to the card network.
|
|
16
|
+
*/
|
|
17
|
+
export type CardPayoutType = ClosedEnum<typeof CardPayoutType>;
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const CardPayoutType$inboundSchema: z.ZodNativeEnum<
|
|
21
|
+
typeof CardPayoutType
|
|
22
|
+
> = z.nativeEnum(CardPayoutType);
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const CardPayoutType$outboundSchema: z.ZodNativeEnum<
|
|
25
|
+
typeof CardPayoutType
|
|
26
|
+
> = CardPayoutType$inboundSchema;
|
|
@@ -6,12 +6,21 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
CardPayoutType,
|
|
11
|
+
CardPayoutType$inboundSchema,
|
|
12
|
+
CardPayoutType$outboundSchema,
|
|
13
|
+
} from "./cardpayouttype.js";
|
|
9
14
|
|
|
10
15
|
export type CreateTransferDestinationCard = {
|
|
11
16
|
/**
|
|
12
17
|
* An optional override of the default card statement descriptor for a transfer. Accounts must be enabled by Moov to set this field.
|
|
13
18
|
*/
|
|
14
19
|
dynamicDescriptor?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* An optional field to specify the type of card payout, used to route the transfer with the appropriate business application identifier (BAI).
|
|
22
|
+
*/
|
|
23
|
+
payoutType?: CardPayoutType | undefined;
|
|
15
24
|
};
|
|
16
25
|
|
|
17
26
|
/** @internal */
|
|
@@ -21,10 +30,12 @@ export const CreateTransferDestinationCard$inboundSchema: z.ZodType<
|
|
|
21
30
|
unknown
|
|
22
31
|
> = z.object({
|
|
23
32
|
dynamicDescriptor: z.string().optional(),
|
|
33
|
+
payoutType: CardPayoutType$inboundSchema.optional(),
|
|
24
34
|
});
|
|
25
35
|
/** @internal */
|
|
26
36
|
export type CreateTransferDestinationCard$Outbound = {
|
|
27
37
|
dynamicDescriptor?: string | undefined;
|
|
38
|
+
payoutType?: string | undefined;
|
|
28
39
|
};
|
|
29
40
|
|
|
30
41
|
/** @internal */
|
|
@@ -34,6 +45,7 @@ export const CreateTransferDestinationCard$outboundSchema: z.ZodType<
|
|
|
34
45
|
CreateTransferDestinationCard
|
|
35
46
|
> = z.object({
|
|
36
47
|
dynamicDescriptor: z.string().optional(),
|
|
48
|
+
payoutType: CardPayoutType$outboundSchema.optional(),
|
|
37
49
|
});
|
|
38
50
|
|
|
39
51
|
export function createTransferDestinationCardToJSON(
|
|
@@ -69,6 +69,7 @@ export * from "./bankaccountverificationmethod.js";
|
|
|
69
69
|
export * from "./bankaccountverificationstatus.js";
|
|
70
70
|
export * from "./bankaccountwaitfor.js";
|
|
71
71
|
export * from "./basicpaymentmethod.js";
|
|
72
|
+
export * from "./batchgettransfersrequest.js";
|
|
72
73
|
export * from "./billablefee.js";
|
|
73
74
|
export * from "./billingcountandamount.js";
|
|
74
75
|
export * from "./billinginterchangeprogramfee.js";
|
|
@@ -112,6 +113,7 @@ export * from "./cardpaymentdetailserror.js";
|
|
|
112
113
|
export * from "./cardpaymentpaymentmethod.js";
|
|
113
114
|
export * from "./cardpaymentsettings.js";
|
|
114
115
|
export * from "./cardpaymenttransferpaymentmethod.js";
|
|
116
|
+
export * from "./cardpayouttype.js";
|
|
115
117
|
export * from "./cardpresentpaymentpaymentmethod.js";
|
|
116
118
|
export * from "./cardpresentpaymenttransferpaymentmethod.js";
|
|
117
119
|
export * from "./cardtransactiondetails.js";
|
|
@@ -393,8 +395,12 @@ export * from "./productoptiongroupvalidationerror.js";
|
|
|
393
395
|
export * from "./productoptionvalidationerror.js";
|
|
394
396
|
export * from "./productrequest.js";
|
|
395
397
|
export * from "./profile.js";
|
|
398
|
+
export * from "./pullfromapplepaypaymentmethod.js";
|
|
399
|
+
export * from "./pullfromapplepaytransferpaymentmethod.js";
|
|
396
400
|
export * from "./pullfromcardpaymentmethod.js";
|
|
397
401
|
export * from "./pullfromcardtransferpaymentmethod.js";
|
|
402
|
+
export * from "./pushtoapplepaypaymentmethod.js";
|
|
403
|
+
export * from "./pushtoapplepaytransferpaymentmethod.js";
|
|
398
404
|
export * from "./pushtocardpaymentmethod.js";
|
|
399
405
|
export * from "./pushtocardtransferpaymentmethod.js";
|
|
400
406
|
export * from "./qrcode.js";
|
|
@@ -425,9 +431,11 @@ export * from "./reversedwithrefund.js";
|
|
|
425
431
|
export * from "./revoketokenrequest.js";
|
|
426
432
|
export * from "./rtpcreditpaymentmethod.js";
|
|
427
433
|
export * from "./rtpcredittransferpaymentmethod.js";
|
|
434
|
+
export * from "./rtpfailurecode.js";
|
|
428
435
|
export * from "./rtpinstitution.js";
|
|
429
436
|
export * from "./rtprejectioncode.js";
|
|
430
437
|
export * from "./rtpservices.js";
|
|
438
|
+
export * from "./rtptransactionstatus.js";
|
|
431
439
|
export * from "./runtransfer.js";
|
|
432
440
|
export * from "./scheduledtransferimagemetadata.js";
|
|
433
441
|
export * from "./scheduledtransferlineitem.js";
|
|
@@ -60,12 +60,24 @@ import {
|
|
|
60
60
|
MoovWalletPaymentMethod$Outbound,
|
|
61
61
|
MoovWalletPaymentMethod$outboundSchema,
|
|
62
62
|
} from "./moovwalletpaymentmethod.js";
|
|
63
|
+
import {
|
|
64
|
+
PullFromApplePayPaymentMethod,
|
|
65
|
+
PullFromApplePayPaymentMethod$inboundSchema,
|
|
66
|
+
PullFromApplePayPaymentMethod$Outbound,
|
|
67
|
+
PullFromApplePayPaymentMethod$outboundSchema,
|
|
68
|
+
} from "./pullfromapplepaypaymentmethod.js";
|
|
63
69
|
import {
|
|
64
70
|
PullFromCardPaymentMethod,
|
|
65
71
|
PullFromCardPaymentMethod$inboundSchema,
|
|
66
72
|
PullFromCardPaymentMethod$Outbound,
|
|
67
73
|
PullFromCardPaymentMethod$outboundSchema,
|
|
68
74
|
} from "./pullfromcardpaymentmethod.js";
|
|
75
|
+
import {
|
|
76
|
+
PushToApplePayPaymentMethod,
|
|
77
|
+
PushToApplePayPaymentMethod$inboundSchema,
|
|
78
|
+
PushToApplePayPaymentMethod$Outbound,
|
|
79
|
+
PushToApplePayPaymentMethod$outboundSchema,
|
|
80
|
+
} from "./pushtoapplepaypaymentmethod.js";
|
|
69
81
|
import {
|
|
70
82
|
PushToCardPaymentMethod,
|
|
71
83
|
PushToCardPaymentMethod$inboundSchema,
|
|
@@ -94,7 +106,9 @@ export type PaymentMethod =
|
|
|
94
106
|
| PullFromCardPaymentMethod
|
|
95
107
|
| ApplePayPaymentMethod
|
|
96
108
|
| CardPresentPaymentPaymentMethod
|
|
97
|
-
| InstantBankCreditPaymentMethod
|
|
109
|
+
| InstantBankCreditPaymentMethod
|
|
110
|
+
| PushToApplePayPaymentMethod
|
|
111
|
+
| PullFromApplePayPaymentMethod;
|
|
98
112
|
|
|
99
113
|
/** @internal */
|
|
100
114
|
export const PaymentMethod$inboundSchema: z.ZodType<
|
|
@@ -114,6 +128,8 @@ export const PaymentMethod$inboundSchema: z.ZodType<
|
|
|
114
128
|
ApplePayPaymentMethod$inboundSchema,
|
|
115
129
|
CardPresentPaymentPaymentMethod$inboundSchema,
|
|
116
130
|
InstantBankCreditPaymentMethod$inboundSchema,
|
|
131
|
+
PushToApplePayPaymentMethod$inboundSchema,
|
|
132
|
+
PullFromApplePayPaymentMethod$inboundSchema,
|
|
117
133
|
]);
|
|
118
134
|
/** @internal */
|
|
119
135
|
export type PaymentMethod$Outbound =
|
|
@@ -128,7 +144,9 @@ export type PaymentMethod$Outbound =
|
|
|
128
144
|
| PullFromCardPaymentMethod$Outbound
|
|
129
145
|
| ApplePayPaymentMethod$Outbound
|
|
130
146
|
| CardPresentPaymentPaymentMethod$Outbound
|
|
131
|
-
| InstantBankCreditPaymentMethod$Outbound
|
|
147
|
+
| InstantBankCreditPaymentMethod$Outbound
|
|
148
|
+
| PushToApplePayPaymentMethod$Outbound
|
|
149
|
+
| PullFromApplePayPaymentMethod$Outbound;
|
|
132
150
|
|
|
133
151
|
/** @internal */
|
|
134
152
|
export const PaymentMethod$outboundSchema: z.ZodType<
|
|
@@ -148,6 +166,8 @@ export const PaymentMethod$outboundSchema: z.ZodType<
|
|
|
148
166
|
ApplePayPaymentMethod$outboundSchema,
|
|
149
167
|
CardPresentPaymentPaymentMethod$outboundSchema,
|
|
150
168
|
InstantBankCreditPaymentMethod$outboundSchema,
|
|
169
|
+
PushToApplePayPaymentMethod$outboundSchema,
|
|
170
|
+
PullFromApplePayPaymentMethod$outboundSchema,
|
|
151
171
|
]);
|
|
152
172
|
|
|
153
173
|
export function paymentMethodToJSON(paymentMethod: PaymentMethod): string {
|
|
@@ -21,6 +21,8 @@ export const PaymentMethodType = {
|
|
|
21
21
|
ApplePay: "apple-pay",
|
|
22
22
|
CardPresentPayment: "card-present-payment",
|
|
23
23
|
InstantBankCredit: "instant-bank-credit",
|
|
24
|
+
PushToApplePay: "push-to-apple-pay",
|
|
25
|
+
PullFromApplePay: "pull-from-apple-pay",
|
|
24
26
|
} as const;
|
|
25
27
|
/**
|
|
26
28
|
* The payment method type that represents a payment rail and directionality
|