@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.
Files changed (71) hide show
  1. package/bin/mcp-server.js +79 -61
  2. package/bin/mcp-server.js.map +11 -10
  3. package/examples/package-lock.json +1 -1
  4. package/hooks/hooks.d.ts +3 -2
  5. package/hooks/hooks.d.ts.map +1 -1
  6. package/hooks/hooks.js.map +1 -1
  7. package/hooks/moov-version-hook.d.ts +6 -0
  8. package/hooks/moov-version-hook.d.ts.map +1 -0
  9. package/hooks/moov-version-hook.js +12 -0
  10. package/hooks/moov-version-hook.js.map +1 -0
  11. package/hooks/registration.d.ts.map +1 -1
  12. package/hooks/registration.js +3 -1
  13. package/hooks/registration.js.map +1 -1
  14. package/hooks/types.d.ts +2 -6
  15. package/hooks/types.d.ts.map +1 -1
  16. package/jsr.json +1 -1
  17. package/lib/config.d.ts +3 -3
  18. package/lib/config.js +3 -3
  19. package/lib/sdks.d.ts.map +1 -1
  20. package/lib/sdks.js +5 -6
  21. package/lib/sdks.js.map +1 -1
  22. package/mcp-server/mcp-server.js +1 -1
  23. package/mcp-server/server.js +1 -1
  24. package/package.json +1 -1
  25. package/src/hooks/hooks.ts +2 -2
  26. package/src/hooks/moov-version-hook.ts +9 -0
  27. package/src/hooks/registration.ts +4 -1
  28. package/src/hooks/types.ts +2 -7
  29. package/src/lib/config.ts +3 -3
  30. package/src/lib/sdks.ts +6 -7
  31. package/src/mcp-server/mcp-server.ts +1 -1
  32. package/src/mcp-server/server.ts +1 -1
  33. package/docs/sdks/accounts/README.md +0 -1038
  34. package/docs/sdks/accountterminalapplications/README.md +0 -371
  35. package/docs/sdks/adjustments/README.md +0 -185
  36. package/docs/sdks/applepay/README.md +0 -572
  37. package/docs/sdks/authentication/README.md +0 -191
  38. package/docs/sdks/avatars/README.md +0 -95
  39. package/docs/sdks/bankaccounts/README.md +0 -951
  40. package/docs/sdks/branding/README.md +0 -407
  41. package/docs/sdks/capabilities/README.md +0 -380
  42. package/docs/sdks/cardissuing/README.md +0 -533
  43. package/docs/sdks/cards/README.md +0 -544
  44. package/docs/sdks/disputes/README.md +0 -1085
  45. package/docs/sdks/endtoendencryption/README.md +0 -174
  46. package/docs/sdks/enrichedaddress/README.md +0 -95
  47. package/docs/sdks/enrichedprofile/README.md +0 -95
  48. package/docs/sdks/feeplans/README.md +0 -921
  49. package/docs/sdks/files/README.md +0 -293
  50. package/docs/sdks/images/README.md +0 -616
  51. package/docs/sdks/industries/README.md +0 -91
  52. package/docs/sdks/institutions/README.md +0 -184
  53. package/docs/sdks/issuingtransactions/README.md +0 -465
  54. package/docs/sdks/onboarding/README.md +0 -389
  55. package/docs/sdks/paymentlinks/README.md +0 -615
  56. package/docs/sdks/paymentmethods/README.md +0 -187
  57. package/docs/sdks/ping/README.md +0 -91
  58. package/docs/sdks/products/README.md +0 -616
  59. package/docs/sdks/receipts/README.md +0 -180
  60. package/docs/sdks/representatives/README.md +0 -603
  61. package/docs/sdks/scheduling/README.md +0 -1018
  62. package/docs/sdks/statements/README.md +0 -194
  63. package/docs/sdks/support/README.md +0 -505
  64. package/docs/sdks/sweeps/README.md +0 -571
  65. package/docs/sdks/terminalapplications/README.md +0 -460
  66. package/docs/sdks/transfers/README.md +0 -1136
  67. package/docs/sdks/underwriting/README.md +0 -331
  68. package/docs/sdks/wallets/README.md +0 -416
  69. package/docs/sdks/wallettransactions/README.md +0 -202
  70. package/examples/README.md +0 -31
  71. package/test/README.md +0 -14
@@ -1,331 +0,0 @@
1
- # Underwriting
2
- (*underwriting*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [get](#get) - Retrieve underwriting associated with a given Moov account.
9
-
10
- Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
11
-
12
- To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
13
- you'll need to specify the `/accounts/{accountID}/profile.read` scope.
14
- * [save](#save) - Create or update the account's underwriting.
15
-
16
- Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
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
- * [upsert](#upsert) - Create or update the account's underwriting.
21
-
22
- Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
23
-
24
- To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
25
- you'll need to specify the `/accounts/{accountID}/profile.write` scope.
26
-
27
- ## get
28
-
29
- Retrieve underwriting associated with a given Moov account.
30
-
31
- Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
32
-
33
- To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
34
- you'll need to specify the `/accounts/{accountID}/profile.read` scope.
35
-
36
- ### Example Usage
37
-
38
- <!-- UsageSnippet language="typescript" operationID="getUnderwriting" method="get" path="/accounts/{accountID}/underwriting" -->
39
- ```typescript
40
- import { Moov } from "@moovio/sdk";
41
-
42
- const moov = new Moov({
43
- xMoovVersion: "v2024.01.00",
44
- security: {
45
- username: "",
46
- password: "",
47
- },
48
- });
49
-
50
- async function run() {
51
- const result = await moov.underwriting.get({
52
- accountID: "efe07546-f697-4da5-bf73-d9987efd4cdd",
53
- });
54
-
55
- console.log(result);
56
- }
57
-
58
- run();
59
- ```
60
-
61
- ### Standalone function
62
-
63
- The standalone function version of this method:
64
-
65
- ```typescript
66
- import { MoovCore } from "@moovio/sdk/core.js";
67
- import { underwritingGet } from "@moovio/sdk/funcs/underwritingGet.js";
68
-
69
- // Use `MoovCore` for best tree-shaking performance.
70
- // You can create one instance of it to use across an application.
71
- const moov = new MoovCore({
72
- xMoovVersion: "v2024.01.00",
73
- security: {
74
- username: "",
75
- password: "",
76
- },
77
- });
78
-
79
- async function run() {
80
- const res = await underwritingGet(moov, {
81
- accountID: "efe07546-f697-4da5-bf73-d9987efd4cdd",
82
- });
83
- if (res.ok) {
84
- const { value: result } = res;
85
- console.log(result);
86
- } else {
87
- console.log("underwritingGet failed:", res.error);
88
- }
89
- }
90
-
91
- run();
92
- ```
93
-
94
- ### Parameters
95
-
96
- | Parameter | Type | Required | Description |
97
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
98
- | `request` | [operations.GetUnderwritingRequest](../../models/operations/getunderwritingrequest.md) | :heavy_check_mark: | The request object to use for the request. |
99
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
100
- | `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. |
101
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
102
-
103
- ### Response
104
-
105
- **Promise\<[operations.GetUnderwritingResponse](../../models/operations/getunderwritingresponse.md)\>**
106
-
107
- ### Errors
108
-
109
- | Error Type | Status Code | Content Type |
110
- | --------------- | --------------- | --------------- |
111
- | errors.APIError | 4XX, 5XX | \*/\* |
112
-
113
- ## save
114
-
115
- Create or update the account's underwriting.
116
-
117
- Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
118
-
119
- To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
120
- you'll need to specify the `/accounts/{accountID}/profile.write` scope.
121
-
122
- ### Example Usage
123
-
124
- <!-- UsageSnippet language="typescript" operationID="saveUnderwriting" method="post" path="/accounts/{accountID}/underwriting" -->
125
- ```typescript
126
- import { Moov } from "@moovio/sdk";
127
-
128
- const moov = new Moov({
129
- xMoovVersion: "v2024.01.00",
130
- security: {
131
- username: "",
132
- password: "",
133
- },
134
- });
135
-
136
- async function run() {
137
- const result = await moov.underwriting.save({
138
- accountID: "ffe3ca1b-de3f-4305-8d8c-cfd28f279cad",
139
- upsertUnderwriting: {},
140
- });
141
-
142
- console.log(result);
143
- }
144
-
145
- run();
146
- ```
147
-
148
- ### Standalone function
149
-
150
- The standalone function version of this method:
151
-
152
- ```typescript
153
- import { MoovCore } from "@moovio/sdk/core.js";
154
- import { underwritingSave } from "@moovio/sdk/funcs/underwritingSave.js";
155
-
156
- // Use `MoovCore` for best tree-shaking performance.
157
- // You can create one instance of it to use across an application.
158
- const moov = new MoovCore({
159
- xMoovVersion: "v2024.01.00",
160
- security: {
161
- username: "",
162
- password: "",
163
- },
164
- });
165
-
166
- async function run() {
167
- const res = await underwritingSave(moov, {
168
- accountID: "ffe3ca1b-de3f-4305-8d8c-cfd28f279cad",
169
- upsertUnderwriting: {},
170
- });
171
- if (res.ok) {
172
- const { value: result } = res;
173
- console.log(result);
174
- } else {
175
- console.log("underwritingSave failed:", res.error);
176
- }
177
- }
178
-
179
- run();
180
- ```
181
-
182
- ### Parameters
183
-
184
- | Parameter | Type | Required | Description |
185
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
186
- | `request` | [operations.SaveUnderwritingRequest](../../models/operations/saveunderwritingrequest.md) | :heavy_check_mark: | The request object to use for the request. |
187
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
188
- | `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. |
189
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
190
-
191
- ### Response
192
-
193
- **Promise\<[operations.SaveUnderwritingResponse](../../models/operations/saveunderwritingresponse.md)\>**
194
-
195
- ### Errors
196
-
197
- | Error Type | Status Code | Content Type |
198
- | ------------------------------ | ------------------------------ | ------------------------------ |
199
- | errors.GenericError | 400, 409 | application/json |
200
- | errors.UpsertUnderwritingError | 422 | application/json |
201
- | errors.APIError | 4XX, 5XX | \*/\* |
202
-
203
- ## upsert
204
-
205
- Create or update the account's underwriting.
206
-
207
- Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
208
-
209
- To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
210
- you'll need to specify the `/accounts/{accountID}/profile.write` scope.
211
-
212
- ### Example Usage
213
-
214
- <!-- UsageSnippet language="typescript" operationID="upsertUnderwriting" method="put" path="/accounts/{accountID}/underwriting" -->
215
- ```typescript
216
- import { Moov } from "@moovio/sdk";
217
-
218
- const moov = new Moov({
219
- xMoovVersion: "v2024.01.00",
220
- security: {
221
- username: "",
222
- password: "",
223
- },
224
- });
225
-
226
- async function run() {
227
- const result = await moov.underwriting.upsert({
228
- accountID: "371bf394-45df-4ba8-a615-ad5483b1f963",
229
- updateUnderwriting: {
230
- averageTransactionSize: 622191,
231
- maxTransactionSize: 123692,
232
- averageMonthlyTransactionVolume: 438164,
233
- volumeByCustomerType: {
234
- businessToBusinessPercentage: 671399,
235
- consumerToBusinessPercentage: 482010,
236
- },
237
- cardVolumeDistribution: {
238
- ecommercePercentage: 47450,
239
- cardPresentPercentage: 146275,
240
- mailOrPhonePercentage: 309315,
241
- debtRepaymentPercentage: 990303,
242
- },
243
- fulfillment: {
244
- hasPhysicalGoods: true,
245
- isShippingProduct: true,
246
- shipmentDurationDays: 388451,
247
- returnPolicy: "other",
248
- },
249
- },
250
- });
251
-
252
- console.log(result);
253
- }
254
-
255
- run();
256
- ```
257
-
258
- ### Standalone function
259
-
260
- The standalone function version of this method:
261
-
262
- ```typescript
263
- import { MoovCore } from "@moovio/sdk/core.js";
264
- import { underwritingUpsert } from "@moovio/sdk/funcs/underwritingUpsert.js";
265
-
266
- // Use `MoovCore` for best tree-shaking performance.
267
- // You can create one instance of it to use across an application.
268
- const moov = new MoovCore({
269
- xMoovVersion: "v2024.01.00",
270
- security: {
271
- username: "",
272
- password: "",
273
- },
274
- });
275
-
276
- async function run() {
277
- const res = await underwritingUpsert(moov, {
278
- accountID: "371bf394-45df-4ba8-a615-ad5483b1f963",
279
- updateUnderwriting: {
280
- averageTransactionSize: 622191,
281
- maxTransactionSize: 123692,
282
- averageMonthlyTransactionVolume: 438164,
283
- volumeByCustomerType: {
284
- businessToBusinessPercentage: 671399,
285
- consumerToBusinessPercentage: 482010,
286
- },
287
- cardVolumeDistribution: {
288
- ecommercePercentage: 47450,
289
- cardPresentPercentage: 146275,
290
- mailOrPhonePercentage: 309315,
291
- debtRepaymentPercentage: 990303,
292
- },
293
- fulfillment: {
294
- hasPhysicalGoods: true,
295
- isShippingProduct: true,
296
- shipmentDurationDays: 388451,
297
- returnPolicy: "other",
298
- },
299
- },
300
- });
301
- if (res.ok) {
302
- const { value: result } = res;
303
- console.log(result);
304
- } else {
305
- console.log("underwritingUpsert failed:", res.error);
306
- }
307
- }
308
-
309
- run();
310
- ```
311
-
312
- ### Parameters
313
-
314
- | Parameter | Type | Required | Description |
315
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
316
- | `request` | [operations.UpsertUnderwritingRequest](../../models/operations/upsertunderwritingrequest.md) | :heavy_check_mark: | The request object to use for the request. |
317
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
318
- | `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. |
319
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
320
-
321
- ### Response
322
-
323
- **Promise\<[operations.UpsertUnderwritingResponse](../../models/operations/upsertunderwritingresponse.md)\>**
324
-
325
- ### Errors
326
-
327
- | Error Type | Status Code | Content Type |
328
- | ------------------------------ | ------------------------------ | ------------------------------ |
329
- | errors.GenericError | 400, 409 | application/json |
330
- | errors.UpdateUnderwritingError | 422 | application/json |
331
- | errors.APIError | 4XX, 5XX | \*/\* |