@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,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type ListResolutionLinksGlobals = {
|
|
13
|
+
/**
|
|
14
|
+
* Specify an API version.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
*
|
|
18
|
+
* API versioning follows the format `vYYYY.QQ.BB`, where
|
|
19
|
+
* - `YYYY` is the year
|
|
20
|
+
* - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
|
|
21
|
+
* - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
|
|
22
|
+
* - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
|
|
23
|
+
*
|
|
24
|
+
* The `dev` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
|
|
25
|
+
* When no version is specified, the API defaults to `v2024.01.00`.
|
|
26
|
+
*/
|
|
27
|
+
xMoovVersion?: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export type ListResolutionLinksRequest = {
|
|
31
|
+
accountID: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type ListResolutionLinksResponse = {
|
|
35
|
+
headers: { [k: string]: Array<string> };
|
|
36
|
+
result: Array<components.ResolutionLink>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const ListResolutionLinksGlobals$inboundSchema: z.ZodType<
|
|
41
|
+
ListResolutionLinksGlobals,
|
|
42
|
+
z.ZodTypeDef,
|
|
43
|
+
unknown
|
|
44
|
+
> = z.object({
|
|
45
|
+
"X-Moov-Version": z.string().optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"X-Moov-Version": "xMoovVersion",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type ListResolutionLinksGlobals$Outbound = {
|
|
53
|
+
"X-Moov-Version"?: string | undefined;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const ListResolutionLinksGlobals$outboundSchema: z.ZodType<
|
|
58
|
+
ListResolutionLinksGlobals$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
ListResolutionLinksGlobals
|
|
61
|
+
> = z.object({
|
|
62
|
+
xMoovVersion: z.string().optional(),
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
xMoovVersion: "X-Moov-Version",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export function listResolutionLinksGlobalsToJSON(
|
|
70
|
+
listResolutionLinksGlobals: ListResolutionLinksGlobals,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
ListResolutionLinksGlobals$outboundSchema.parse(listResolutionLinksGlobals),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export function listResolutionLinksGlobalsFromJSON(
|
|
77
|
+
jsonString: string,
|
|
78
|
+
): SafeParseResult<ListResolutionLinksGlobals, SDKValidationError> {
|
|
79
|
+
return safeParse(
|
|
80
|
+
jsonString,
|
|
81
|
+
(x) => ListResolutionLinksGlobals$inboundSchema.parse(JSON.parse(x)),
|
|
82
|
+
`Failed to parse 'ListResolutionLinksGlobals' from JSON`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const ListResolutionLinksRequest$inboundSchema: z.ZodType<
|
|
88
|
+
ListResolutionLinksRequest,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.object({
|
|
92
|
+
accountID: z.string(),
|
|
93
|
+
});
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type ListResolutionLinksRequest$Outbound = {
|
|
96
|
+
accountID: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const ListResolutionLinksRequest$outboundSchema: z.ZodType<
|
|
101
|
+
ListResolutionLinksRequest$Outbound,
|
|
102
|
+
z.ZodTypeDef,
|
|
103
|
+
ListResolutionLinksRequest
|
|
104
|
+
> = z.object({
|
|
105
|
+
accountID: z.string(),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export function listResolutionLinksRequestToJSON(
|
|
109
|
+
listResolutionLinksRequest: ListResolutionLinksRequest,
|
|
110
|
+
): string {
|
|
111
|
+
return JSON.stringify(
|
|
112
|
+
ListResolutionLinksRequest$outboundSchema.parse(listResolutionLinksRequest),
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
export function listResolutionLinksRequestFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<ListResolutionLinksRequest, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => ListResolutionLinksRequest$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'ListResolutionLinksRequest' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const ListResolutionLinksResponse$inboundSchema: z.ZodType<
|
|
127
|
+
ListResolutionLinksResponse,
|
|
128
|
+
z.ZodTypeDef,
|
|
129
|
+
unknown
|
|
130
|
+
> = z.object({
|
|
131
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
132
|
+
Result: z.array(components.ResolutionLink$inboundSchema),
|
|
133
|
+
}).transform((v) => {
|
|
134
|
+
return remap$(v, {
|
|
135
|
+
"Headers": "headers",
|
|
136
|
+
"Result": "result",
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
/** @internal */
|
|
140
|
+
export type ListResolutionLinksResponse$Outbound = {
|
|
141
|
+
Headers: { [k: string]: Array<string> };
|
|
142
|
+
Result: Array<components.ResolutionLink$Outbound>;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/** @internal */
|
|
146
|
+
export const ListResolutionLinksResponse$outboundSchema: z.ZodType<
|
|
147
|
+
ListResolutionLinksResponse$Outbound,
|
|
148
|
+
z.ZodTypeDef,
|
|
149
|
+
ListResolutionLinksResponse
|
|
150
|
+
> = z.object({
|
|
151
|
+
headers: z.record(z.array(z.string())),
|
|
152
|
+
result: z.array(components.ResolutionLink$outboundSchema),
|
|
153
|
+
}).transform((v) => {
|
|
154
|
+
return remap$(v, {
|
|
155
|
+
headers: "Headers",
|
|
156
|
+
result: "Result",
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
export function listResolutionLinksResponseToJSON(
|
|
161
|
+
listResolutionLinksResponse: ListResolutionLinksResponse,
|
|
162
|
+
): string {
|
|
163
|
+
return JSON.stringify(
|
|
164
|
+
ListResolutionLinksResponse$outboundSchema.parse(
|
|
165
|
+
listResolutionLinksResponse,
|
|
166
|
+
),
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
export function listResolutionLinksResponseFromJSON(
|
|
170
|
+
jsonString: string,
|
|
171
|
+
): SafeParseResult<ListResolutionLinksResponse, SDKValidationError> {
|
|
172
|
+
return safeParse(
|
|
173
|
+
jsonString,
|
|
174
|
+
(x) => ListResolutionLinksResponse$inboundSchema.parse(JSON.parse(x)),
|
|
175
|
+
`Failed to parse 'ListResolutionLinksResponse' from JSON`,
|
|
176
|
+
);
|
|
177
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { resolutionLinksCreate } from "../funcs/resolutionLinksCreate.js";
|
|
6
|
+
import { resolutionLinksDisable } from "../funcs/resolutionLinksDisable.js";
|
|
7
|
+
import { resolutionLinksGet } from "../funcs/resolutionLinksGet.js";
|
|
8
|
+
import { resolutionLinksList } from "../funcs/resolutionLinksList.js";
|
|
9
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import * as operations from "../models/operations/index.js";
|
|
11
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
12
|
+
|
|
13
|
+
export class ResolutionLinks extends ClientSDK {
|
|
14
|
+
/**
|
|
15
|
+
* Create a resolution link for the specified account. Resolution links are temporary, secure links
|
|
16
|
+
* sent to merchants to resolve account requirements such as KYC verification or document uploads. Only one active resolution link
|
|
17
|
+
* is allowed per connected account.
|
|
18
|
+
*
|
|
19
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
20
|
+
* you'll need to specify the `/accounts/{accountID}/profile.write`, `/accounts/{accountID}/representatives.write` and `/accounts/{accountID}/files.write` scopes.
|
|
21
|
+
*/
|
|
22
|
+
async create(
|
|
23
|
+
request: operations.CreateResolutionLinkRequest,
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): Promise<operations.CreateResolutionLinkResponse> {
|
|
26
|
+
return unwrapAsync(resolutionLinksCreate(
|
|
27
|
+
this,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* List resolution links for the specified account.
|
|
35
|
+
*
|
|
36
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
37
|
+
* you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
38
|
+
*/
|
|
39
|
+
async list(
|
|
40
|
+
request: operations.ListResolutionLinksRequest,
|
|
41
|
+
options?: RequestOptions,
|
|
42
|
+
): Promise<operations.ListResolutionLinksResponse> {
|
|
43
|
+
return unwrapAsync(resolutionLinksList(
|
|
44
|
+
this,
|
|
45
|
+
request,
|
|
46
|
+
options,
|
|
47
|
+
));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Get a resolution link by code.
|
|
52
|
+
*
|
|
53
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
54
|
+
* you'll need to specify the `/accounts/{accountID}/profile.read` scope.
|
|
55
|
+
*/
|
|
56
|
+
async get(
|
|
57
|
+
request: operations.GetResolutionLinkRequest,
|
|
58
|
+
options?: RequestOptions,
|
|
59
|
+
): Promise<operations.GetResolutionLinkResponse> {
|
|
60
|
+
return unwrapAsync(resolutionLinksGet(
|
|
61
|
+
this,
|
|
62
|
+
request,
|
|
63
|
+
options,
|
|
64
|
+
));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Disable a resolution link. Disabled resolution links can no longer be used by merchants.
|
|
69
|
+
*
|
|
70
|
+
* To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
71
|
+
* you'll need to specify the `/accounts/{accountID}/profile.write` scope.
|
|
72
|
+
*/
|
|
73
|
+
async disable(
|
|
74
|
+
request: operations.DisableResolutionLinkRequest,
|
|
75
|
+
options?: RequestOptions,
|
|
76
|
+
): Promise<operations.DisableResolutionLinkResponse | undefined> {
|
|
77
|
+
return unwrapAsync(resolutionLinksDisable(
|
|
78
|
+
this,
|
|
79
|
+
request,
|
|
80
|
+
options,
|
|
81
|
+
));
|
|
82
|
+
}
|
|
83
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -32,6 +32,7 @@ import { Ping } from "./ping.js";
|
|
|
32
32
|
import { Products } from "./products.js";
|
|
33
33
|
import { Receipts } from "./receipts.js";
|
|
34
34
|
import { Representatives } from "./representatives.js";
|
|
35
|
+
import { ResolutionLinks } from "./resolutionlinks.js";
|
|
35
36
|
import { Scheduling } from "./scheduling.js";
|
|
36
37
|
import { Statements } from "./statements.js";
|
|
37
38
|
import { Support } from "./support.js";
|
|
@@ -124,6 +125,11 @@ export class Moov extends ClientSDK {
|
|
|
124
125
|
return (this._representatives ??= new Representatives(this._options));
|
|
125
126
|
}
|
|
126
127
|
|
|
128
|
+
private _resolutionLinks?: ResolutionLinks;
|
|
129
|
+
get resolutionLinks(): ResolutionLinks {
|
|
130
|
+
return (this._resolutionLinks ??= new ResolutionLinks(this._options));
|
|
131
|
+
}
|
|
132
|
+
|
|
127
133
|
private _scheduling?: Scheduling;
|
|
128
134
|
get scheduling(): Scheduling {
|
|
129
135
|
return (this._scheduling ??= new Scheduling(this._options));
|