@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,191 +0,0 @@
|
|
|
1
|
-
# Authentication
|
|
2
|
-
(*authentication*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [revokeAccessToken](#revokeaccesstoken) - Revoke an auth token.
|
|
9
|
-
|
|
10
|
-
Allows clients to notify the authorization server that a previously obtained refresh or access token is no longer needed.
|
|
11
|
-
* [createAccessToken](#createaccesstoken) - Create or refresh an access token.
|
|
12
|
-
|
|
13
|
-
## revokeAccessToken
|
|
14
|
-
|
|
15
|
-
Revoke an auth token.
|
|
16
|
-
|
|
17
|
-
Allows clients to notify the authorization server that a previously obtained refresh or access token is no longer needed.
|
|
18
|
-
|
|
19
|
-
### Example Usage
|
|
20
|
-
|
|
21
|
-
<!-- UsageSnippet language="typescript" operationID="revokeAccessToken" method="post" path="/oauth2/revoke" -->
|
|
22
|
-
```typescript
|
|
23
|
-
import { Moov } from "@moovio/sdk";
|
|
24
|
-
|
|
25
|
-
const moov = new Moov({
|
|
26
|
-
xMoovVersion: "v2024.01.00",
|
|
27
|
-
security: {
|
|
28
|
-
username: "",
|
|
29
|
-
password: "",
|
|
30
|
-
},
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
async function run() {
|
|
34
|
-
const result = await moov.authentication.revokeAccessToken({
|
|
35
|
-
token: "<value>",
|
|
36
|
-
clientId: "5clTR_MdVrrkgxw2",
|
|
37
|
-
clientSecret: "dNC-hg7sVm22jc3g_Eogtyu0_1Mqh_4-",
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
console.log(result);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
run();
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
### Standalone function
|
|
47
|
-
|
|
48
|
-
The standalone function version of this method:
|
|
49
|
-
|
|
50
|
-
```typescript
|
|
51
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
52
|
-
import { authenticationRevokeAccessToken } from "@moovio/sdk/funcs/authenticationRevokeAccessToken.js";
|
|
53
|
-
|
|
54
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
55
|
-
// You can create one instance of it to use across an application.
|
|
56
|
-
const moov = new MoovCore({
|
|
57
|
-
xMoovVersion: "v2024.01.00",
|
|
58
|
-
security: {
|
|
59
|
-
username: "",
|
|
60
|
-
password: "",
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
async function run() {
|
|
65
|
-
const res = await authenticationRevokeAccessToken(moov, {
|
|
66
|
-
token: "<value>",
|
|
67
|
-
clientId: "5clTR_MdVrrkgxw2",
|
|
68
|
-
clientSecret: "dNC-hg7sVm22jc3g_Eogtyu0_1Mqh_4-",
|
|
69
|
-
});
|
|
70
|
-
if (res.ok) {
|
|
71
|
-
const { value: result } = res;
|
|
72
|
-
console.log(result);
|
|
73
|
-
} else {
|
|
74
|
-
console.log("authenticationRevokeAccessToken failed:", res.error);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
run();
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
### Parameters
|
|
82
|
-
|
|
83
|
-
| Parameter | Type | Required | Description |
|
|
84
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
85
|
-
| `request` | [components.RevokeTokenRequest](../../models/components/revoketokenrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
86
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
87
|
-
| `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. |
|
|
88
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
89
|
-
|
|
90
|
-
### Response
|
|
91
|
-
|
|
92
|
-
**Promise\<[operations.RevokeAccessTokenResponse](../../models/operations/revokeaccesstokenresponse.md)\>**
|
|
93
|
-
|
|
94
|
-
### Errors
|
|
95
|
-
|
|
96
|
-
| Error Type | Status Code | Content Type |
|
|
97
|
-
| ------------------------------ | ------------------------------ | ------------------------------ |
|
|
98
|
-
| errors.GenericError | 400 | application/json |
|
|
99
|
-
| errors.RevokeTokenRequestError | 422 | application/json |
|
|
100
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
101
|
-
|
|
102
|
-
## createAccessToken
|
|
103
|
-
|
|
104
|
-
Create or refresh an access token.
|
|
105
|
-
|
|
106
|
-
### Example Usage
|
|
107
|
-
|
|
108
|
-
<!-- UsageSnippet language="typescript" operationID="createAccessToken" method="post" path="/oauth2/token" -->
|
|
109
|
-
```typescript
|
|
110
|
-
import { Moov } from "@moovio/sdk";
|
|
111
|
-
|
|
112
|
-
const moov = new Moov({
|
|
113
|
-
xMoovVersion: "v2024.01.00",
|
|
114
|
-
security: {
|
|
115
|
-
username: "",
|
|
116
|
-
password: "",
|
|
117
|
-
},
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
async function run() {
|
|
121
|
-
const result = await moov.authentication.createAccessToken({
|
|
122
|
-
grantType: "client_credentials",
|
|
123
|
-
clientId: "5clTR_MdVrrkgxw2",
|
|
124
|
-
clientSecret: "dNC-hg7sVm22jc3g_Eogtyu0_1Mqh_4-",
|
|
125
|
-
scope: "/accounts.read /accounts.write",
|
|
126
|
-
refreshToken: "eyJhbGc0eSI6TQSIsImN0kpXVCIsImtp6IkpXVsImtpZC0a...",
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
console.log(result);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
run();
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Standalone function
|
|
136
|
-
|
|
137
|
-
The standalone function version of this method:
|
|
138
|
-
|
|
139
|
-
```typescript
|
|
140
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
141
|
-
import { authenticationCreateAccessToken } from "@moovio/sdk/funcs/authenticationCreateAccessToken.js";
|
|
142
|
-
|
|
143
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
144
|
-
// You can create one instance of it to use across an application.
|
|
145
|
-
const moov = new MoovCore({
|
|
146
|
-
xMoovVersion: "v2024.01.00",
|
|
147
|
-
security: {
|
|
148
|
-
username: "",
|
|
149
|
-
password: "",
|
|
150
|
-
},
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
async function run() {
|
|
154
|
-
const res = await authenticationCreateAccessToken(moov, {
|
|
155
|
-
grantType: "client_credentials",
|
|
156
|
-
clientId: "5clTR_MdVrrkgxw2",
|
|
157
|
-
clientSecret: "dNC-hg7sVm22jc3g_Eogtyu0_1Mqh_4-",
|
|
158
|
-
scope: "/accounts.read /accounts.write",
|
|
159
|
-
refreshToken: "eyJhbGc0eSI6TQSIsImN0kpXVCIsImtp6IkpXVsImtpZC0a...",
|
|
160
|
-
});
|
|
161
|
-
if (res.ok) {
|
|
162
|
-
const { value: result } = res;
|
|
163
|
-
console.log(result);
|
|
164
|
-
} else {
|
|
165
|
-
console.log("authenticationCreateAccessToken failed:", res.error);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
run();
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Parameters
|
|
173
|
-
|
|
174
|
-
| Parameter | Type | Required | Description |
|
|
175
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
176
|
-
| `request` | [components.AuthTokenRequest](../../models/components/authtokenrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
177
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
178
|
-
| `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. |
|
|
179
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
180
|
-
|
|
181
|
-
### Response
|
|
182
|
-
|
|
183
|
-
**Promise\<[operations.CreateAccessTokenResponse](../../models/operations/createaccesstokenresponse.md)\>**
|
|
184
|
-
|
|
185
|
-
### Errors
|
|
186
|
-
|
|
187
|
-
| Error Type | Status Code | Content Type |
|
|
188
|
-
| ---------------------------- | ---------------------------- | ---------------------------- |
|
|
189
|
-
| errors.GenericError | 400 | application/json |
|
|
190
|
-
| errors.AuthTokenRequestError | 422 | application/json |
|
|
191
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# Avatars
|
|
2
|
-
(*avatars*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [get](#get) - Get avatar image for an account using a unique ID.
|
|
9
|
-
|
|
10
|
-
To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
|
|
11
|
-
you'll need to specify the `/profile-enrichment.read` scope.
|
|
12
|
-
|
|
13
|
-
## get
|
|
14
|
-
|
|
15
|
-
Get avatar image for an account using a unique ID.
|
|
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 `/profile-enrichment.read` scope.
|
|
19
|
-
|
|
20
|
-
### Example Usage
|
|
21
|
-
|
|
22
|
-
<!-- UsageSnippet language="typescript" operationID="getAvatar" method="get" path="/avatars/{uniqueID}" -->
|
|
23
|
-
```typescript
|
|
24
|
-
import { Moov } from "@moovio/sdk";
|
|
25
|
-
|
|
26
|
-
const moov = new Moov({
|
|
27
|
-
xMoovVersion: "v2024.01.00",
|
|
28
|
-
security: {
|
|
29
|
-
username: "",
|
|
30
|
-
password: "",
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
async function run() {
|
|
35
|
-
const result = await moov.avatars.get({
|
|
36
|
-
uniqueID: "<id>",
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
console.log(result);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
run();
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Standalone function
|
|
46
|
-
|
|
47
|
-
The standalone function version of this method:
|
|
48
|
-
|
|
49
|
-
```typescript
|
|
50
|
-
import { MoovCore } from "@moovio/sdk/core.js";
|
|
51
|
-
import { avatarsGet } from "@moovio/sdk/funcs/avatarsGet.js";
|
|
52
|
-
|
|
53
|
-
// Use `MoovCore` for best tree-shaking performance.
|
|
54
|
-
// You can create one instance of it to use across an application.
|
|
55
|
-
const moov = new MoovCore({
|
|
56
|
-
xMoovVersion: "v2024.01.00",
|
|
57
|
-
security: {
|
|
58
|
-
username: "",
|
|
59
|
-
password: "",
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
async function run() {
|
|
64
|
-
const res = await avatarsGet(moov, {
|
|
65
|
-
uniqueID: "<id>",
|
|
66
|
-
});
|
|
67
|
-
if (res.ok) {
|
|
68
|
-
const { value: result } = res;
|
|
69
|
-
console.log(result);
|
|
70
|
-
} else {
|
|
71
|
-
console.log("avatarsGet failed:", res.error);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
run();
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Parameters
|
|
79
|
-
|
|
80
|
-
| Parameter | Type | Required | Description |
|
|
81
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
82
|
-
| `request` | [operations.GetAvatarRequest](../../models/operations/getavatarrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
83
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
84
|
-
| `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. |
|
|
85
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
86
|
-
|
|
87
|
-
### Response
|
|
88
|
-
|
|
89
|
-
**Promise\<[operations.GetAvatarResponse](../../models/operations/getavatarresponse.md)\>**
|
|
90
|
-
|
|
91
|
-
### Errors
|
|
92
|
-
|
|
93
|
-
| Error Type | Status Code | Content Type |
|
|
94
|
-
| --------------- | --------------- | --------------- |
|
|
95
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|