@moovio/sdk 26.4.0-dev.10 → 26.4.0-dev.11
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 +95 -55
- package/bin/mcp-server.js +1202 -423
- package/bin/mcp-server.js.map +27 -11
- package/funcs/resolutionLinksCreate.d.ts +20 -0
- package/funcs/resolutionLinksCreate.d.ts.map +1 -0
- package/funcs/resolutionLinksCreate.js +145 -0
- package/funcs/resolutionLinksCreate.js.map +1 -0
- package/funcs/resolutionLinksDisable.d.ts +18 -0
- package/funcs/resolutionLinksDisable.d.ts.map +1 -0
- package/funcs/resolutionLinksDisable.js +135 -0
- package/funcs/resolutionLinksDisable.js.map +1 -0
- package/funcs/resolutionLinksGet.d.ts +17 -0
- package/funcs/resolutionLinksGet.d.ts.map +1 -0
- package/funcs/resolutionLinksGet.js +126 -0
- package/funcs/resolutionLinksGet.js.map +1 -0
- package/funcs/resolutionLinksList.d.ts +17 -0
- package/funcs/resolutionLinksList.d.ts.map +1 -0
- package/funcs/resolutionLinksList.js +125 -0
- package/funcs/resolutionLinksList.js.map +1 -0
- package/hooks/moov-version-hook.d.ts +3 -4
- package/hooks/moov-version-hook.d.ts.map +1 -1
- package/hooks/moov-version-hook.js +5 -4
- package/hooks/moov-version-hook.js.map +1 -1
- package/hooks/registration.js +1 -1
- package/hooks/registration.js.map +1 -1
- 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 +9 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/resolutionLinksCreate.d.ts +8 -0
- package/mcp-server/tools/resolutionLinksCreate.d.ts.map +1 -0
- package/mcp-server/tools/resolutionLinksCreate.js +67 -0
- package/mcp-server/tools/resolutionLinksCreate.js.map +1 -0
- package/mcp-server/tools/resolutionLinksDisable.d.ts +8 -0
- package/mcp-server/tools/resolutionLinksDisable.d.ts.map +1 -0
- package/mcp-server/tools/resolutionLinksDisable.js +64 -0
- package/mcp-server/tools/resolutionLinksDisable.js.map +1 -0
- package/mcp-server/tools/resolutionLinksGet.d.ts +8 -0
- package/mcp-server/tools/resolutionLinksGet.d.ts.map +1 -0
- package/mcp-server/tools/resolutionLinksGet.js +65 -0
- package/mcp-server/tools/resolutionLinksGet.js.map +1 -0
- package/mcp-server/tools/resolutionLinksList.d.ts +8 -0
- package/mcp-server/tools/resolutionLinksList.d.ts.map +1 -0
- package/mcp-server/tools/resolutionLinksList.js +65 -0
- package/mcp-server/tools/resolutionLinksList.js.map +1 -0
- package/models/components/createresolutionlink.d.ts +24 -0
- package/models/components/createresolutionlink.d.ts.map +1 -0
- package/models/components/createresolutionlink.js +59 -0
- package/models/components/createresolutionlink.js.map +1 -0
- package/models/components/index.d.ts +3 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +3 -0
- package/models/components/index.js.map +1 -1
- package/models/components/resolutionlink.d.ts +63 -0
- package/models/components/resolutionlink.d.ts.map +1 -0
- package/models/components/resolutionlink.js +75 -0
- package/models/components/resolutionlink.js.map +1 -0
- package/models/components/resolutionlinkrecipient.d.ts +29 -0
- package/models/components/resolutionlinkrecipient.d.ts.map +1 -0
- package/models/components/resolutionlinkrecipient.js +61 -0
- package/models/components/resolutionlinkrecipient.js.map +1 -0
- package/models/errors/createresolutionlinkerror.d.ts +45 -0
- package/models/errors/createresolutionlinkerror.d.ts.map +1 -0
- package/models/errors/createresolutionlinkerror.js +82 -0
- package/models/errors/createresolutionlinkerror.js.map +1 -0
- 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/operations/createresolutionlink.d.ts +66 -0
- package/models/operations/createresolutionlink.d.ts.map +1 -0
- package/models/operations/createresolutionlink.js +122 -0
- package/models/operations/createresolutionlink.js.map +1 -0
- package/models/operations/disableresolutionlink.d.ts +63 -0
- package/models/operations/disableresolutionlink.d.ts.map +1 -0
- package/models/operations/disableresolutionlink.js +109 -0
- package/models/operations/disableresolutionlink.js.map +1 -0
- package/models/operations/getresolutionlink.d.ts +66 -0
- package/models/operations/getresolutionlink.d.ts.map +1 -0
- package/models/operations/getresolutionlink.js +114 -0
- package/models/operations/getresolutionlink.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listresolutionlinks.d.ts +64 -0
- package/models/operations/listresolutionlinks.d.ts.map +1 -0
- package/models/operations/listresolutionlinks.js +112 -0
- package/models/operations/listresolutionlinks.js.map +1 -0
- package/package.json +1 -1
- package/sdk/resolutionlinks.d.ts +35 -0
- package/sdk/resolutionlinks.d.ts.map +1 -0
- package/sdk/resolutionlinks.js +54 -0
- package/sdk/resolutionlinks.js.map +1 -0
- 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/src/funcs/resolutionLinksCreate.ts +208 -0
- package/src/funcs/resolutionLinksDisable.ts +204 -0
- package/src/funcs/resolutionLinksGet.ts +186 -0
- package/src/funcs/resolutionLinksList.ts +180 -0
- package/src/hooks/moov-version-hook.ts +10 -6
- package/src/hooks/registration.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/resolutionLinksCreate.ts +41 -0
- package/src/mcp-server/tools/resolutionLinksDisable.ts +37 -0
- package/src/mcp-server/tools/resolutionLinksGet.ts +38 -0
- package/src/mcp-server/tools/resolutionLinksList.ts +38 -0
- package/src/models/components/createresolutionlink.ts +63 -0
- package/src/models/components/index.ts +3 -0
- package/src/models/components/resolutionlink.ts +110 -0
- package/src/models/components/resolutionlinkrecipient.ts +70 -0
- package/src/models/errors/createresolutionlinkerror.ts +90 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/createresolutionlink.ts +193 -0
- package/src/models/operations/disableresolutionlink.ts +178 -0
- package/src/models/operations/getresolutionlink.ts +179 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listresolutionlinks.ts +177 -0
- package/src/sdk/resolutionlinks.ts +83 -0
- package/src/sdk/sdk.ts +6 -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 { 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
|
+
* List resolution links for the specified account.
|
|
29
|
+
*
|
|
30
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
31
|
+
* you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
32
|
+
*/
|
|
33
|
+
export function resolutionLinksList(
|
|
34
|
+
client: MoovCore,
|
|
35
|
+
request: operations.ListResolutionLinksRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<
|
|
38
|
+
Result<
|
|
39
|
+
operations.ListResolutionLinksResponse,
|
|
40
|
+
| MoovError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
request,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: MoovCore,
|
|
59
|
+
request: operations.ListResolutionLinksRequest,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
operations.ListResolutionLinksResponse,
|
|
65
|
+
| MoovError
|
|
66
|
+
| ResponseValidationError
|
|
67
|
+
| ConnectionError
|
|
68
|
+
| RequestAbortedError
|
|
69
|
+
| RequestTimeoutError
|
|
70
|
+
| InvalidRequestError
|
|
71
|
+
| UnexpectedClientError
|
|
72
|
+
| SDKValidationError
|
|
73
|
+
>,
|
|
74
|
+
APICall,
|
|
75
|
+
]
|
|
76
|
+
> {
|
|
77
|
+
const parsed = safeParse(
|
|
78
|
+
request,
|
|
79
|
+
(value) =>
|
|
80
|
+
operations.ListResolutionLinksRequest$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = null;
|
|
88
|
+
|
|
89
|
+
const pathParams = {
|
|
90
|
+
accountID: encodeSimple("accountID", payload.accountID, {
|
|
91
|
+
explode: false,
|
|
92
|
+
charEncoding: "percent",
|
|
93
|
+
}),
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const path = pathToFunc("/accounts/{accountID}/resolution-links")(pathParams);
|
|
97
|
+
|
|
98
|
+
const headers = new Headers(compactMap({
|
|
99
|
+
Accept: "application/json",
|
|
100
|
+
"X-Moov-Version": encodeSimple(
|
|
101
|
+
"X-Moov-Version",
|
|
102
|
+
client._options.xMoovVersion,
|
|
103
|
+
{ explode: false, charEncoding: "none" },
|
|
104
|
+
),
|
|
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: "listResolutionLinks",
|
|
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: "GET",
|
|
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.ListResolutionLinksResponse,
|
|
157
|
+
| MoovError
|
|
158
|
+
| ResponseValidationError
|
|
159
|
+
| ConnectionError
|
|
160
|
+
| RequestAbortedError
|
|
161
|
+
| RequestTimeoutError
|
|
162
|
+
| InvalidRequestError
|
|
163
|
+
| UnexpectedClientError
|
|
164
|
+
| SDKValidationError
|
|
165
|
+
>(
|
|
166
|
+
M.json(200, operations.ListResolutionLinksResponse$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
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { SDK_METADATA
|
|
2
|
-
import {
|
|
1
|
+
import { SDK_METADATA } from "../lib/config.js";
|
|
2
|
+
import { BeforeRequestContext, BeforeRequestHook } from "./types.js";
|
|
3
3
|
|
|
4
|
-
export class MoovVersionHook implements
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export class MoovVersionHook implements BeforeRequestHook {
|
|
5
|
+
beforeRequest(
|
|
6
|
+
_hookCtx: BeforeRequestContext,
|
|
7
|
+
request: Request,
|
|
8
|
+
): Request {
|
|
9
|
+
const newRequest = new Request(request);
|
|
10
|
+
newRequest.headers.set("X-Moov-Version", SDK_METADATA.openapiDocVersion);
|
|
11
|
+
return newRequest;
|
|
8
12
|
}
|
|
9
13
|
}
|
|
@@ -13,5 +13,5 @@ export function initHooks(hooks: Hooks) {
|
|
|
13
13
|
// Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
|
|
14
14
|
|
|
15
15
|
const versionHook = new MoovVersionHook();
|
|
16
|
-
hooks.
|
|
16
|
+
hooks.registerBeforeRequestHook(versionHook);
|
|
17
17
|
}
|
package/src/lib/config.ts
CHANGED
|
@@ -73,8 +73,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
73
73
|
export const SDK_METADATA = {
|
|
74
74
|
language: "typescript",
|
|
75
75
|
openapiDocVersion: "v2026.04.00",
|
|
76
|
-
sdkVersion: "26.4.0-dev.
|
|
77
|
-
genVersion: "2.
|
|
76
|
+
sdkVersion: "26.4.0-dev.11",
|
|
77
|
+
genVersion: "2.859.2",
|
|
78
78
|
userAgent:
|
|
79
|
-
"speakeasy-sdk/typescript 26.4.0-dev.
|
|
79
|
+
"speakeasy-sdk/typescript 26.4.0-dev.11 2.859.2 v2026.04.00 @moovio/sdk",
|
|
80
80
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -139,6 +139,10 @@ import { tool$representativesDelete } from "./tools/representativesDelete.js";
|
|
|
139
139
|
import { tool$representativesGet } from "./tools/representativesGet.js";
|
|
140
140
|
import { tool$representativesList } from "./tools/representativesList.js";
|
|
141
141
|
import { tool$representativesUpdate } from "./tools/representativesUpdate.js";
|
|
142
|
+
import { tool$resolutionLinksCreate } from "./tools/resolutionLinksCreate.js";
|
|
143
|
+
import { tool$resolutionLinksDisable } from "./tools/resolutionLinksDisable.js";
|
|
144
|
+
import { tool$resolutionLinksGet } from "./tools/resolutionLinksGet.js";
|
|
145
|
+
import { tool$resolutionLinksList } from "./tools/resolutionLinksList.js";
|
|
142
146
|
import { tool$schedulingCancel } from "./tools/schedulingCancel.js";
|
|
143
147
|
import { tool$schedulingCreate } from "./tools/schedulingCreate.js";
|
|
144
148
|
import { tool$schedulingGet } from "./tools/schedulingGet.js";
|
|
@@ -203,7 +207,7 @@ export function createMCPServer(deps: {
|
|
|
203
207
|
}) {
|
|
204
208
|
const server = new McpServer({
|
|
205
209
|
name: "Moov",
|
|
206
|
-
version: "26.4.0-dev.
|
|
210
|
+
version: "26.4.0-dev.11",
|
|
207
211
|
});
|
|
208
212
|
|
|
209
213
|
const client = new MoovCore({
|
|
@@ -329,6 +333,10 @@ export function createMCPServer(deps: {
|
|
|
329
333
|
tool(tool$representativesDelete);
|
|
330
334
|
tool(tool$representativesGet);
|
|
331
335
|
tool(tool$representativesUpdate);
|
|
336
|
+
tool(tool$resolutionLinksCreate);
|
|
337
|
+
tool(tool$resolutionLinksList);
|
|
338
|
+
tool(tool$resolutionLinksGet);
|
|
339
|
+
tool(tool$resolutionLinksDisable);
|
|
332
340
|
tool(tool$schedulingCreate);
|
|
333
341
|
tool(tool$schedulingList);
|
|
334
342
|
tool(tool$schedulingUpdate);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { resolutionLinksCreate } from "../../funcs/resolutionLinksCreate.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.CreateResolutionLinkRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$resolutionLinksCreate: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "resolution-links-create",
|
|
15
|
+
description:
|
|
16
|
+
`Create a resolution link for the specified account. Resolution links are temporary, secure links
|
|
17
|
+
sent to merchants to resolve account requirements such as KYC verification or document uploads. Only one active resolution link
|
|
18
|
+
is allowed per connected account.
|
|
19
|
+
|
|
20
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
21
|
+
you'll need to specify the \`/accounts/{accountID}/profile.write\`, \`/accounts/{accountID}/representatives.write\` and \`/accounts/{accountID}/files.write\` scopes.`,
|
|
22
|
+
args,
|
|
23
|
+
tool: async (client, args, ctx) => {
|
|
24
|
+
const [result, apiCall] = await resolutionLinksCreate(
|
|
25
|
+
client,
|
|
26
|
+
args.request,
|
|
27
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
28
|
+
).$inspect();
|
|
29
|
+
|
|
30
|
+
if (!result.ok) {
|
|
31
|
+
return {
|
|
32
|
+
content: [{ type: "text", text: result.error.message }],
|
|
33
|
+
isError: true,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const value = result.value.result;
|
|
38
|
+
|
|
39
|
+
return formatResult(value, apiCall);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { resolutionLinksDisable } from "../../funcs/resolutionLinksDisable.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.DisableResolutionLinkRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$resolutionLinksDisable: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "resolution-links-disable",
|
|
15
|
+
description:
|
|
16
|
+
`Disable a resolution link. Disabled resolution links can no longer be used by merchants.
|
|
17
|
+
|
|
18
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
19
|
+
you'll need to specify the \`/accounts/{accountID}/profile.write\` scope.`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await resolutionLinksDisable(
|
|
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
|
+
return formatResult(void 0, apiCall);
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { resolutionLinksGet } from "../../funcs/resolutionLinksGet.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.GetResolutionLinkRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$resolutionLinksGet: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "resolution-links-get",
|
|
15
|
+
description: `Get a resolution link by code.
|
|
16
|
+
|
|
17
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
18
|
+
you'll need to specify the \`/accounts/{accountID}/profile.read\` scope.`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await resolutionLinksGet(
|
|
22
|
+
client,
|
|
23
|
+
args.request,
|
|
24
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
25
|
+
).$inspect();
|
|
26
|
+
|
|
27
|
+
if (!result.ok) {
|
|
28
|
+
return {
|
|
29
|
+
content: [{ type: "text", text: result.error.message }],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const value = result.value.result;
|
|
35
|
+
|
|
36
|
+
return formatResult(value, apiCall);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { resolutionLinksList } from "../../funcs/resolutionLinksList.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ListResolutionLinksRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$resolutionLinksList: ToolDefinition<typeof args> = {
|
|
14
|
+
name: "resolution-links-list",
|
|
15
|
+
description: `List resolution links for the specified account.
|
|
16
|
+
|
|
17
|
+
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
18
|
+
you'll need to specify the \`/accounts/{accountID}/profile.read\` scope.`,
|
|
19
|
+
args,
|
|
20
|
+
tool: async (client, args, ctx) => {
|
|
21
|
+
const [result, apiCall] = await resolutionLinksList(
|
|
22
|
+
client,
|
|
23
|
+
args.request,
|
|
24
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
25
|
+
).$inspect();
|
|
26
|
+
|
|
27
|
+
if (!result.ok) {
|
|
28
|
+
return {
|
|
29
|
+
content: [{ type: "text", text: result.error.message }],
|
|
30
|
+
isError: true,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const value = result.value.result;
|
|
35
|
+
|
|
36
|
+
return formatResult(value, apiCall);
|
|
37
|
+
},
|
|
38
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
import {
|
|
10
|
+
ResolutionLinkRecipient,
|
|
11
|
+
ResolutionLinkRecipient$inboundSchema,
|
|
12
|
+
ResolutionLinkRecipient$Outbound,
|
|
13
|
+
ResolutionLinkRecipient$outboundSchema,
|
|
14
|
+
} from "./resolutionlinkrecipient.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Request body for creating a resolution link.
|
|
18
|
+
*/
|
|
19
|
+
export type CreateResolutionLink = {
|
|
20
|
+
/**
|
|
21
|
+
* The recipient contact information for the resolution link.
|
|
22
|
+
*/
|
|
23
|
+
recipient: ResolutionLinkRecipient;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const CreateResolutionLink$inboundSchema: z.ZodType<
|
|
28
|
+
CreateResolutionLink,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
recipient: ResolutionLinkRecipient$inboundSchema,
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type CreateResolutionLink$Outbound = {
|
|
36
|
+
recipient: ResolutionLinkRecipient$Outbound;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const CreateResolutionLink$outboundSchema: z.ZodType<
|
|
41
|
+
CreateResolutionLink$Outbound,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
CreateResolutionLink
|
|
44
|
+
> = z.object({
|
|
45
|
+
recipient: ResolutionLinkRecipient$outboundSchema,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
export function createResolutionLinkToJSON(
|
|
49
|
+
createResolutionLink: CreateResolutionLink,
|
|
50
|
+
): string {
|
|
51
|
+
return JSON.stringify(
|
|
52
|
+
CreateResolutionLink$outboundSchema.parse(createResolutionLink),
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
export function createResolutionLinkFromJSON(
|
|
56
|
+
jsonString: string,
|
|
57
|
+
): SafeParseResult<CreateResolutionLink, SDKValidationError> {
|
|
58
|
+
return safeParse(
|
|
59
|
+
jsonString,
|
|
60
|
+
(x) => CreateResolutionLink$inboundSchema.parse(JSON.parse(x)),
|
|
61
|
+
`Failed to parse 'CreateResolutionLink' from JSON`,
|
|
62
|
+
);
|
|
63
|
+
}
|
|
@@ -174,6 +174,7 @@ export * from "./createprofileerror.js";
|
|
|
174
174
|
export * from "./createrefund.js";
|
|
175
175
|
export * from "./createrefundresponse.js";
|
|
176
176
|
export * from "./createrepresentative.js";
|
|
177
|
+
export * from "./createresolutionlink.js";
|
|
177
178
|
export * from "./createreversal.js";
|
|
178
179
|
export * from "./createruntransfer.js";
|
|
179
180
|
export * from "./createscheduledtransferlineitem.js";
|
|
@@ -415,6 +416,8 @@ export * from "./requirementerror.js";
|
|
|
415
416
|
export * from "./requirementerrorcode.js";
|
|
416
417
|
export * from "./requirementid.js";
|
|
417
418
|
export * from "./residual.js";
|
|
419
|
+
export * from "./resolutionlink.js";
|
|
420
|
+
export * from "./resolutionlinkrecipient.js";
|
|
418
421
|
export * from "./returnpolicytype.js";
|
|
419
422
|
export * from "./reversal.js";
|
|
420
423
|
export * from "./reversedwithcancellation.js";
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
* A temporary, secure link sent to a merchant to resolve account requirements such as KYC verification or document uploads.
|
|
12
|
+
*/
|
|
13
|
+
export type ResolutionLink = {
|
|
14
|
+
/**
|
|
15
|
+
* A unique nanoid identifier for the resolution link.
|
|
16
|
+
*/
|
|
17
|
+
code: string;
|
|
18
|
+
/**
|
|
19
|
+
* The ID of the merchant account this resolution link is associated with.
|
|
20
|
+
*/
|
|
21
|
+
accountID: string;
|
|
22
|
+
/**
|
|
23
|
+
* The ID of the partner account this resolution link is associated with.
|
|
24
|
+
*/
|
|
25
|
+
partnerAccountID: string;
|
|
26
|
+
/**
|
|
27
|
+
* The recipient contact information for the resolution link.
|
|
28
|
+
*/
|
|
29
|
+
recipient: string;
|
|
30
|
+
/**
|
|
31
|
+
* The URL of the resolution link.
|
|
32
|
+
*/
|
|
33
|
+
url: string;
|
|
34
|
+
/**
|
|
35
|
+
* The date and time the resolution link was created.
|
|
36
|
+
*/
|
|
37
|
+
createdOn: Date;
|
|
38
|
+
/**
|
|
39
|
+
* The date and time the resolution link was last updated.
|
|
40
|
+
*/
|
|
41
|
+
updatedOn: Date;
|
|
42
|
+
/**
|
|
43
|
+
* The date and time the resolution link was disabled, if applicable.
|
|
44
|
+
*/
|
|
45
|
+
disabledOn?: Date | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The date and time the resolution link expires.
|
|
48
|
+
*/
|
|
49
|
+
expiresOn: Date;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const ResolutionLink$inboundSchema: z.ZodType<
|
|
54
|
+
ResolutionLink,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
unknown
|
|
57
|
+
> = z.object({
|
|
58
|
+
code: z.string(),
|
|
59
|
+
accountID: z.string(),
|
|
60
|
+
partnerAccountID: z.string(),
|
|
61
|
+
recipient: z.string(),
|
|
62
|
+
url: z.string(),
|
|
63
|
+
createdOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
64
|
+
updatedOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
65
|
+
disabledOn: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
66
|
+
.optional(),
|
|
67
|
+
expiresOn: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
68
|
+
});
|
|
69
|
+
/** @internal */
|
|
70
|
+
export type ResolutionLink$Outbound = {
|
|
71
|
+
code: string;
|
|
72
|
+
accountID: string;
|
|
73
|
+
partnerAccountID: string;
|
|
74
|
+
recipient: string;
|
|
75
|
+
url: string;
|
|
76
|
+
createdOn: string;
|
|
77
|
+
updatedOn: string;
|
|
78
|
+
disabledOn?: string | undefined;
|
|
79
|
+
expiresOn: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const ResolutionLink$outboundSchema: z.ZodType<
|
|
84
|
+
ResolutionLink$Outbound,
|
|
85
|
+
z.ZodTypeDef,
|
|
86
|
+
ResolutionLink
|
|
87
|
+
> = z.object({
|
|
88
|
+
code: z.string(),
|
|
89
|
+
accountID: z.string(),
|
|
90
|
+
partnerAccountID: z.string(),
|
|
91
|
+
recipient: z.string(),
|
|
92
|
+
url: z.string(),
|
|
93
|
+
createdOn: z.date().transform(v => v.toISOString()),
|
|
94
|
+
updatedOn: z.date().transform(v => v.toISOString()),
|
|
95
|
+
disabledOn: z.date().transform(v => v.toISOString()).optional(),
|
|
96
|
+
expiresOn: z.date().transform(v => v.toISOString()),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export function resolutionLinkToJSON(resolutionLink: ResolutionLink): string {
|
|
100
|
+
return JSON.stringify(ResolutionLink$outboundSchema.parse(resolutionLink));
|
|
101
|
+
}
|
|
102
|
+
export function resolutionLinkFromJSON(
|
|
103
|
+
jsonString: string,
|
|
104
|
+
): SafeParseResult<ResolutionLink, SDKValidationError> {
|
|
105
|
+
return safeParse(
|
|
106
|
+
jsonString,
|
|
107
|
+
(x) => ResolutionLink$inboundSchema.parse(JSON.parse(x)),
|
|
108
|
+
`Failed to parse 'ResolutionLink' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
import {
|
|
10
|
+
PhoneNumber,
|
|
11
|
+
PhoneNumber$inboundSchema,
|
|
12
|
+
PhoneNumber$Outbound,
|
|
13
|
+
PhoneNumber$outboundSchema,
|
|
14
|
+
} from "./phonenumber.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Contact information for the recipient of a resolution link. Provide either `email` or `phone`, but not both.
|
|
18
|
+
*/
|
|
19
|
+
export type ResolutionLinkRecipient = {
|
|
20
|
+
/**
|
|
21
|
+
* The email address of the recipient.
|
|
22
|
+
*/
|
|
23
|
+
email?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The phone number of the recipient.
|
|
26
|
+
*/
|
|
27
|
+
phone?: PhoneNumber | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ResolutionLinkRecipient$inboundSchema: z.ZodType<
|
|
32
|
+
ResolutionLinkRecipient,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
email: z.string().optional(),
|
|
37
|
+
phone: PhoneNumber$inboundSchema.optional(),
|
|
38
|
+
});
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type ResolutionLinkRecipient$Outbound = {
|
|
41
|
+
email?: string | undefined;
|
|
42
|
+
phone?: PhoneNumber$Outbound | undefined;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const ResolutionLinkRecipient$outboundSchema: z.ZodType<
|
|
47
|
+
ResolutionLinkRecipient$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
ResolutionLinkRecipient
|
|
50
|
+
> = z.object({
|
|
51
|
+
email: z.string().optional(),
|
|
52
|
+
phone: PhoneNumber$outboundSchema.optional(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function resolutionLinkRecipientToJSON(
|
|
56
|
+
resolutionLinkRecipient: ResolutionLinkRecipient,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
ResolutionLinkRecipient$outboundSchema.parse(resolutionLinkRecipient),
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
export function resolutionLinkRecipientFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<ResolutionLinkRecipient, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => ResolutionLinkRecipient$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'ResolutionLinkRecipient' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|