@moovio/sdk 0.21.0 → 0.21.2
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/bin/mcp-server.js +79 -61
- package/bin/mcp-server.js.map +11 -10
- package/examples/package-lock.json +1 -1
- package/hooks/hooks.d.ts +3 -2
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js.map +1 -1
- package/hooks/moov-version-hook.d.ts +6 -0
- package/hooks/moov-version-hook.d.ts.map +1 -0
- package/hooks/moov-version-hook.js +12 -0
- package/hooks/moov-version-hook.js.map +1 -0
- package/hooks/registration.d.ts.map +1 -1
- package/hooks/registration.js +3 -1
- package/hooks/registration.js.map +1 -1
- package/hooks/types.d.ts +2 -6
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +5 -6
- package/lib/sdks.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/package.json +1 -1
- package/src/hooks/hooks.ts +2 -2
- package/src/hooks/moov-version-hook.ts +9 -0
- package/src/hooks/registration.ts +4 -1
- package/src/hooks/types.ts +2 -7
- package/src/lib/config.ts +3 -3
- package/src/lib/sdks.ts +6 -7
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/docs/sdks/accounts/README.md +0 -1038
- package/docs/sdks/accountterminalapplications/README.md +0 -371
- package/docs/sdks/adjustments/README.md +0 -185
- package/docs/sdks/applepay/README.md +0 -572
- package/docs/sdks/authentication/README.md +0 -191
- package/docs/sdks/avatars/README.md +0 -95
- package/docs/sdks/bankaccounts/README.md +0 -951
- package/docs/sdks/branding/README.md +0 -407
- package/docs/sdks/capabilities/README.md +0 -380
- package/docs/sdks/cardissuing/README.md +0 -533
- package/docs/sdks/cards/README.md +0 -544
- package/docs/sdks/disputes/README.md +0 -1085
- package/docs/sdks/endtoendencryption/README.md +0 -174
- package/docs/sdks/enrichedaddress/README.md +0 -95
- package/docs/sdks/enrichedprofile/README.md +0 -95
- package/docs/sdks/feeplans/README.md +0 -921
- package/docs/sdks/files/README.md +0 -293
- package/docs/sdks/images/README.md +0 -616
- package/docs/sdks/industries/README.md +0 -91
- package/docs/sdks/institutions/README.md +0 -184
- package/docs/sdks/issuingtransactions/README.md +0 -465
- package/docs/sdks/onboarding/README.md +0 -389
- package/docs/sdks/paymentlinks/README.md +0 -615
- package/docs/sdks/paymentmethods/README.md +0 -187
- package/docs/sdks/ping/README.md +0 -91
- package/docs/sdks/products/README.md +0 -616
- package/docs/sdks/receipts/README.md +0 -180
- package/docs/sdks/representatives/README.md +0 -603
- package/docs/sdks/scheduling/README.md +0 -1018
- package/docs/sdks/statements/README.md +0 -194
- package/docs/sdks/support/README.md +0 -505
- package/docs/sdks/sweeps/README.md +0 -571
- package/docs/sdks/terminalapplications/README.md +0 -460
- package/docs/sdks/transfers/README.md +0 -1136
- package/docs/sdks/underwriting/README.md +0 -331
- package/docs/sdks/wallets/README.md +0 -416
- package/docs/sdks/wallettransactions/README.md +0 -202
- package/examples/README.md +0 -31
- package/test/README.md +0 -14
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
# Files
|
|
2
|
-
(*files*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [upload](#upload) - Upload a file and link it to the specified Moov account.
|
|
9
|
-
|
|
10
|
-
The maximum file size is 20MB. Each account is allowed a maximum of 50 files. Acceptable file types include csv, jpg, pdf,
|
|
11
|
-
and png.
|
|
12
|
-
|
|
13
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
14
|
-
you'll need to specify the `/accounts/{accountID}/files.write` scope.
|
|
15
|
-
* [list](#list) - List all the files associated with a particular Moov 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}/files.read` scope.
|
|
19
|
-
* [get](#get) - Retrieve file details associated with a specific Moov account.
|
|
20
|
-
|
|
21
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
22
|
-
you'll need to specify the `/accounts/{accountID}/files.read` scope.
|
|
23
|
-
|
|
24
|
-
## upload
|
|
25
|
-
|
|
26
|
-
Upload a file and link it to the specified Moov account.
|
|
27
|
-
|
|
28
|
-
The maximum file size is 20MB. Each account is allowed a maximum of 50 files. Acceptable file types include csv, jpg, pdf,
|
|
29
|
-
and png.
|
|
30
|
-
|
|
31
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
32
|
-
you'll need to specify the `/accounts/{accountID}/files.write` scope.
|
|
33
|
-
|
|
34
|
-
### Example Usage
|
|
35
|
-
|
|
36
|
-
<!-- UsageSnippet language="typescript" operationID="uploadFile" method="post" path="/accounts/{accountID}/files" -->
|
|
37
|
-
```typescript
|
|
38
|
-
import { Moov } from "@moovio/sdk";
|
|
39
|
-
import { openAsBlob } from "node:fs";
|
|
40
|
-
|
|
41
|
-
const moov = new Moov({
|
|
42
|
-
xMoovVersion: "v2024.01.00",
|
|
43
|
-
security: {
|
|
44
|
-
username: "",
|
|
45
|
-
password: "",
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
async function run() {
|
|
50
|
-
const result = await moov.files.upload({
|
|
51
|
-
accountID: "221c30bd-2551-4ae4-9a14-07bf6599b728",
|
|
52
|
-
fileUploadRequestMultiPart: {
|
|
53
|
-
file: await openAsBlob("example.file"),
|
|
54
|
-
filePurpose: "representative_verification",
|
|
55
|
-
metadata: "{\"requirement_id\": \"document.individual.verification\"}",
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
console.log(result);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
run();
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Standalone function
|
|
66
|
-
|
|
67
|
-
The standalone function version of this method:
|
|
68
|
-
|
|
69
|
-
```typescript
|
|
70
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
71
|
-
import { filesUpload } from "@moovio/sdk/funcs/filesUpload.js";
|
|
72
|
-
import { openAsBlob } from "node:fs";
|
|
73
|
-
|
|
74
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
75
|
-
// You can create one instance of it to use across an application.
|
|
76
|
-
const moov = new MoovCore({
|
|
77
|
-
xMoovVersion: "v2024.01.00",
|
|
78
|
-
security: {
|
|
79
|
-
username: "",
|
|
80
|
-
password: "",
|
|
81
|
-
},
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
async function run() {
|
|
85
|
-
const res = await filesUpload(moov, {
|
|
86
|
-
accountID: "221c30bd-2551-4ae4-9a14-07bf6599b728",
|
|
87
|
-
fileUploadRequestMultiPart: {
|
|
88
|
-
file: await openAsBlob("example.file"),
|
|
89
|
-
filePurpose: "representative_verification",
|
|
90
|
-
metadata: "{\"requirement_id\": \"document.individual.verification\"}",
|
|
91
|
-
},
|
|
92
|
-
});
|
|
93
|
-
if (res.ok) {
|
|
94
|
-
const { value: result } = res;
|
|
95
|
-
console.log(result);
|
|
96
|
-
} else {
|
|
97
|
-
console.log("filesUpload failed:", res.error);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
run();
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Parameters
|
|
105
|
-
|
|
106
|
-
| Parameter | Type | Required | Description |
|
|
107
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
108
|
-
| `request` | [operations.UploadFileRequest](../../models/operations/uploadfilerequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
109
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
110
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
111
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
112
|
-
|
|
113
|
-
### Response
|
|
114
|
-
|
|
115
|
-
**Promise\<[operations.UploadFileResponse](../../models/operations/uploadfileresponse.md)\>**
|
|
116
|
-
|
|
117
|
-
### Errors
|
|
118
|
-
|
|
119
|
-
| Error Type | Status Code | Content Type |
|
|
120
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
121
|
-
| errors.GenericError | 400, 409 | application/json |
|
|
122
|
-
| errors.FileValidationError | 422 | application/json |
|
|
123
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
124
|
-
|
|
125
|
-
## list
|
|
126
|
-
|
|
127
|
-
List all the files associated with a particular Moov account.
|
|
128
|
-
|
|
129
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
130
|
-
you'll need to specify the `/accounts/{accountID}/files.read` scope.
|
|
131
|
-
|
|
132
|
-
### Example Usage
|
|
133
|
-
|
|
134
|
-
<!-- UsageSnippet language="typescript" operationID="listFiles" method="get" path="/accounts/{accountID}/files" -->
|
|
135
|
-
```typescript
|
|
136
|
-
import { Moov } from "@moovio/sdk";
|
|
137
|
-
|
|
138
|
-
const moov = new Moov({
|
|
139
|
-
xMoovVersion: "v2024.01.00",
|
|
140
|
-
security: {
|
|
141
|
-
username: "",
|
|
142
|
-
password: "",
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
async function run() {
|
|
147
|
-
const result = await moov.files.list({
|
|
148
|
-
accountID: "d1133bf2-4853-4436-9a03-23739895ab98",
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
console.log(result);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
run();
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
### Standalone function
|
|
158
|
-
|
|
159
|
-
The standalone function version of this method:
|
|
160
|
-
|
|
161
|
-
```typescript
|
|
162
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
163
|
-
import { filesList } from "@moovio/sdk/funcs/filesList.js";
|
|
164
|
-
|
|
165
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
166
|
-
// You can create one instance of it to use across an application.
|
|
167
|
-
const moov = new MoovCore({
|
|
168
|
-
xMoovVersion: "v2024.01.00",
|
|
169
|
-
security: {
|
|
170
|
-
username: "",
|
|
171
|
-
password: "",
|
|
172
|
-
},
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
async function run() {
|
|
176
|
-
const res = await filesList(moov, {
|
|
177
|
-
accountID: "d1133bf2-4853-4436-9a03-23739895ab98",
|
|
178
|
-
});
|
|
179
|
-
if (res.ok) {
|
|
180
|
-
const { value: result } = res;
|
|
181
|
-
console.log(result);
|
|
182
|
-
} else {
|
|
183
|
-
console.log("filesList failed:", res.error);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
run();
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
### Parameters
|
|
191
|
-
|
|
192
|
-
| Parameter | Type | Required | Description |
|
|
193
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
194
|
-
| `request` | [operations.ListFilesRequest](../../models/operations/listfilesrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
195
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
196
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
197
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
198
|
-
|
|
199
|
-
### Response
|
|
200
|
-
|
|
201
|
-
**Promise\<[operations.ListFilesResponse](../../models/operations/listfilesresponse.md)\>**
|
|
202
|
-
|
|
203
|
-
### Errors
|
|
204
|
-
|
|
205
|
-
| Error Type | Status Code | Content Type |
|
|
206
|
-
| --------------- | --------------- | --------------- |
|
|
207
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
208
|
-
|
|
209
|
-
## get
|
|
210
|
-
|
|
211
|
-
Retrieve file details associated with a specific Moov account.
|
|
212
|
-
|
|
213
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
214
|
-
you'll need to specify the `/accounts/{accountID}/files.read` scope.
|
|
215
|
-
|
|
216
|
-
### Example Usage
|
|
217
|
-
|
|
218
|
-
<!-- UsageSnippet language="typescript" operationID="getFileDetails" method="get" path="/accounts/{accountID}/files/{fileID}" -->
|
|
219
|
-
```typescript
|
|
220
|
-
import { Moov } from "@moovio/sdk";
|
|
221
|
-
|
|
222
|
-
const moov = new Moov({
|
|
223
|
-
xMoovVersion: "v2024.01.00",
|
|
224
|
-
security: {
|
|
225
|
-
username: "",
|
|
226
|
-
password: "",
|
|
227
|
-
},
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
async function run() {
|
|
231
|
-
const result = await moov.files.get({
|
|
232
|
-
accountID: "7f888113-d35a-4536-b9bc-c55076736ab6",
|
|
233
|
-
fileID: "af170db9-0d17-4a9f-ade6-5dd2f1b3412d",
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
console.log(result);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
run();
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
### Standalone function
|
|
243
|
-
|
|
244
|
-
The standalone function version of this method:
|
|
245
|
-
|
|
246
|
-
```typescript
|
|
247
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
248
|
-
import { filesGet } from "@moovio/sdk/funcs/filesGet.js";
|
|
249
|
-
|
|
250
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
251
|
-
// You can create one instance of it to use across an application.
|
|
252
|
-
const moov = new MoovCore({
|
|
253
|
-
xMoovVersion: "v2024.01.00",
|
|
254
|
-
security: {
|
|
255
|
-
username: "",
|
|
256
|
-
password: "",
|
|
257
|
-
},
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
async function run() {
|
|
261
|
-
const res = await filesGet(moov, {
|
|
262
|
-
accountID: "7f888113-d35a-4536-b9bc-c55076736ab6",
|
|
263
|
-
fileID: "af170db9-0d17-4a9f-ade6-5dd2f1b3412d",
|
|
264
|
-
});
|
|
265
|
-
if (res.ok) {
|
|
266
|
-
const { value: result } = res;
|
|
267
|
-
console.log(result);
|
|
268
|
-
} else {
|
|
269
|
-
console.log("filesGet failed:", res.error);
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
run();
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
### Parameters
|
|
277
|
-
|
|
278
|
-
| Parameter | Type | Required | Description |
|
|
279
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
280
|
-
| `request` | [operations.GetFileDetailsRequest](../../models/operations/getfiledetailsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
281
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
282
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
283
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
284
|
-
|
|
285
|
-
### Response
|
|
286
|
-
|
|
287
|
-
**Promise\<[operations.GetFileDetailsResponse](../../models/operations/getfiledetailsresponse.md)\>**
|
|
288
|
-
|
|
289
|
-
### Errors
|
|
290
|
-
|
|
291
|
-
| Error Type | Status Code | Content Type |
|
|
292
|
-
| --------------- | --------------- | --------------- |
|
|
293
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|