@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,616 +0,0 @@
1
- # Images
2
- (*images*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [list](#list) - List metadata for all images in the specified account.
9
- * [upload](#upload) - Upload a new PNG, JPEG, or WebP image with optional metadata.
10
- Duplicate images, and requests larger than 16MB will be rejected.
11
- * [getMetadata](#getmetadata) - Retrieve metadata for a specific image by its ID.
12
- * [update](#update) - Replace an existing image and, optionally, its metadata.
13
-
14
- This endpoint replaces the existing image with the new PNG, JPEG, or WebP. Omit
15
- the metadata form section to keep existing metadata, or send `null` to clear it.
16
- Duplicate images, and requests larger than 16MB will be rejected.
17
- * [delete](#delete) - Permanently delete an image by its ID.
18
- * [updateMetadata](#updatemetadata) - Replace the metadata for an existing image.
19
- * [getPublic](#getpublic) - Get an image by its public ID.
20
-
21
- ## list
22
-
23
- List metadata for all images in the specified account.
24
-
25
- ### Example Usage
26
-
27
- <!-- UsageSnippet language="typescript" operationID="listImageMetadata" method="get" path="/accounts/{accountID}/images" -->
28
- ```typescript
29
- import { Moov } from "@moovio/sdk";
30
-
31
- const moov = new Moov({
32
- xMoovVersion: "v2024.01.00",
33
- security: {
34
- username: "",
35
- password: "",
36
- },
37
- });
38
-
39
- async function run() {
40
- const result = await moov.images.list({
41
- accountID: "3a4ed2d9-03e1-4b0e-b45f-2a9ca72f8adb",
42
- skip: 60,
43
- count: 20,
44
- });
45
-
46
- console.log(result);
47
- }
48
-
49
- run();
50
- ```
51
-
52
- ### Standalone function
53
-
54
- The standalone function version of this method:
55
-
56
- ```typescript
57
- import { MoovCore } from "@moovio/sdk/core.js";
58
- import { imagesList } from "@moovio/sdk/funcs/imagesList.js";
59
-
60
- // Use `MoovCore` for best tree-shaking performance.
61
- // You can create one instance of it to use across an application.
62
- const moov = new MoovCore({
63
- xMoovVersion: "v2024.01.00",
64
- security: {
65
- username: "",
66
- password: "",
67
- },
68
- });
69
-
70
- async function run() {
71
- const res = await imagesList(moov, {
72
- accountID: "3a4ed2d9-03e1-4b0e-b45f-2a9ca72f8adb",
73
- skip: 60,
74
- count: 20,
75
- });
76
- if (res.ok) {
77
- const { value: result } = res;
78
- console.log(result);
79
- } else {
80
- console.log("imagesList failed:", res.error);
81
- }
82
- }
83
-
84
- run();
85
- ```
86
-
87
- ### Parameters
88
-
89
- | Parameter | Type | Required | Description |
90
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
91
- | `request` | [operations.ListImageMetadataRequest](../../models/operations/listimagemetadatarequest.md) | :heavy_check_mark: | The request object to use for the request. |
92
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
93
- | `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. |
94
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
95
-
96
- ### Response
97
-
98
- **Promise\<[operations.ListImageMetadataResponse](../../models/operations/listimagemetadataresponse.md)\>**
99
-
100
- ### Errors
101
-
102
- | Error Type | Status Code | Content Type |
103
- | --------------- | --------------- | --------------- |
104
- | errors.APIError | 4XX, 5XX | \*/\* |
105
-
106
- ## upload
107
-
108
- Upload a new PNG, JPEG, or WebP image with optional metadata.
109
- Duplicate images, and requests larger than 16MB will be rejected.
110
-
111
- ### Example Usage
112
-
113
- <!-- UsageSnippet language="typescript" operationID="uploadImage" method="post" path="/accounts/{accountID}/images" -->
114
- ```typescript
115
- import { Moov } from "@moovio/sdk";
116
- import { openAsBlob } from "node:fs";
117
-
118
- const moov = new Moov({
119
- xMoovVersion: "v2024.01.00",
120
- security: {
121
- username: "",
122
- password: "",
123
- },
124
- });
125
-
126
- async function run() {
127
- const result = await moov.images.upload({
128
- accountID: "c0971a52-1f1c-4511-876a-f45c4cfd6154",
129
- imageUploadRequestMultiPart: {
130
- image: await openAsBlob("example.file"),
131
- },
132
- });
133
-
134
- console.log(result);
135
- }
136
-
137
- run();
138
- ```
139
-
140
- ### Standalone function
141
-
142
- The standalone function version of this method:
143
-
144
- ```typescript
145
- import { MoovCore } from "@moovio/sdk/core.js";
146
- import { imagesUpload } from "@moovio/sdk/funcs/imagesUpload.js";
147
- import { openAsBlob } from "node:fs";
148
-
149
- // Use `MoovCore` for best tree-shaking performance.
150
- // You can create one instance of it to use across an application.
151
- const moov = new MoovCore({
152
- xMoovVersion: "v2024.01.00",
153
- security: {
154
- username: "",
155
- password: "",
156
- },
157
- });
158
-
159
- async function run() {
160
- const res = await imagesUpload(moov, {
161
- accountID: "c0971a52-1f1c-4511-876a-f45c4cfd6154",
162
- imageUploadRequestMultiPart: {
163
- image: await openAsBlob("example.file"),
164
- },
165
- });
166
- if (res.ok) {
167
- const { value: result } = res;
168
- console.log(result);
169
- } else {
170
- console.log("imagesUpload failed:", res.error);
171
- }
172
- }
173
-
174
- run();
175
- ```
176
-
177
- ### Parameters
178
-
179
- | Parameter | Type | Required | Description |
180
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
181
- | `request` | [operations.UploadImageRequest](../../models/operations/uploadimagerequest.md) | :heavy_check_mark: | The request object to use for the request. |
182
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
183
- | `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. |
184
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
185
-
186
- ### Response
187
-
188
- **Promise\<[operations.UploadImageResponse](../../models/operations/uploadimageresponse.md)\>**
189
-
190
- ### Errors
191
-
192
- | Error Type | Status Code | Content Type |
193
- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
194
- | errors.GenericError | 400, 409 | application/json |
195
- | errors.ImageRequestValidationError | 422 | application/json |
196
- | errors.APIError | 4XX, 5XX | \*/\* |
197
-
198
- ## getMetadata
199
-
200
- Retrieve metadata for a specific image by its ID.
201
-
202
- ### Example Usage
203
-
204
- <!-- UsageSnippet language="typescript" operationID="getImageMetadata" method="get" path="/accounts/{accountID}/images/{imageID}" -->
205
- ```typescript
206
- import { Moov } from "@moovio/sdk";
207
-
208
- const moov = new Moov({
209
- xMoovVersion: "v2024.01.00",
210
- security: {
211
- username: "",
212
- password: "",
213
- },
214
- });
215
-
216
- async function run() {
217
- const result = await moov.images.getMetadata({
218
- accountID: "6cf66a43-31ce-4d27-8dd4-130fa57f0a6f",
219
- imageID: "7cec5bd3-6340-4de4-a923-bf6ec0f7e921",
220
- });
221
-
222
- console.log(result);
223
- }
224
-
225
- run();
226
- ```
227
-
228
- ### Standalone function
229
-
230
- The standalone function version of this method:
231
-
232
- ```typescript
233
- import { MoovCore } from "@moovio/sdk/core.js";
234
- import { imagesGetMetadata } from "@moovio/sdk/funcs/imagesGetMetadata.js";
235
-
236
- // Use `MoovCore` for best tree-shaking performance.
237
- // You can create one instance of it to use across an application.
238
- const moov = new MoovCore({
239
- xMoovVersion: "v2024.01.00",
240
- security: {
241
- username: "",
242
- password: "",
243
- },
244
- });
245
-
246
- async function run() {
247
- const res = await imagesGetMetadata(moov, {
248
- accountID: "6cf66a43-31ce-4d27-8dd4-130fa57f0a6f",
249
- imageID: "7cec5bd3-6340-4de4-a923-bf6ec0f7e921",
250
- });
251
- if (res.ok) {
252
- const { value: result } = res;
253
- console.log(result);
254
- } else {
255
- console.log("imagesGetMetadata failed:", res.error);
256
- }
257
- }
258
-
259
- run();
260
- ```
261
-
262
- ### Parameters
263
-
264
- | Parameter | Type | Required | Description |
265
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
266
- | `request` | [operations.GetImageMetadataRequest](../../models/operations/getimagemetadatarequest.md) | :heavy_check_mark: | The request object to use for the request. |
267
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
268
- | `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. |
269
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
270
-
271
- ### Response
272
-
273
- **Promise\<[operations.GetImageMetadataResponse](../../models/operations/getimagemetadataresponse.md)\>**
274
-
275
- ### Errors
276
-
277
- | Error Type | Status Code | Content Type |
278
- | --------------- | --------------- | --------------- |
279
- | errors.APIError | 4XX, 5XX | \*/\* |
280
-
281
- ## update
282
-
283
- Replace an existing image and, optionally, its metadata.
284
-
285
- This endpoint replaces the existing image with the new PNG, JPEG, or WebP. Omit
286
- the metadata form section to keep existing metadata, or send `null` to clear it.
287
- Duplicate images, and requests larger than 16MB will be rejected.
288
-
289
- ### Example Usage
290
-
291
- <!-- UsageSnippet language="typescript" operationID="updateImage" method="put" path="/accounts/{accountID}/images/{imageID}" -->
292
- ```typescript
293
- import { Moov } from "@moovio/sdk";
294
- import { openAsBlob } from "node:fs";
295
-
296
- const moov = new Moov({
297
- xMoovVersion: "v2024.01.00",
298
- security: {
299
- username: "",
300
- password: "",
301
- },
302
- });
303
-
304
- async function run() {
305
- const result = await moov.images.update({
306
- accountID: "310f4f19-45cf-4429-9aae-8e93827ecb0d",
307
- imageID: "8ef109f8-5a61-4355-b2e4-b8ac2f6f6f47",
308
- imageUpdateRequestMultiPart: {
309
- image: await openAsBlob("example.file"),
310
- },
311
- });
312
-
313
- console.log(result);
314
- }
315
-
316
- run();
317
- ```
318
-
319
- ### Standalone function
320
-
321
- The standalone function version of this method:
322
-
323
- ```typescript
324
- import { MoovCore } from "@moovio/sdk/core.js";
325
- import { imagesUpdate } from "@moovio/sdk/funcs/imagesUpdate.js";
326
- import { openAsBlob } from "node:fs";
327
-
328
- // Use `MoovCore` for best tree-shaking performance.
329
- // You can create one instance of it to use across an application.
330
- const moov = new MoovCore({
331
- xMoovVersion: "v2024.01.00",
332
- security: {
333
- username: "",
334
- password: "",
335
- },
336
- });
337
-
338
- async function run() {
339
- const res = await imagesUpdate(moov, {
340
- accountID: "310f4f19-45cf-4429-9aae-8e93827ecb0d",
341
- imageID: "8ef109f8-5a61-4355-b2e4-b8ac2f6f6f47",
342
- imageUpdateRequestMultiPart: {
343
- image: await openAsBlob("example.file"),
344
- },
345
- });
346
- if (res.ok) {
347
- const { value: result } = res;
348
- console.log(result);
349
- } else {
350
- console.log("imagesUpdate failed:", res.error);
351
- }
352
- }
353
-
354
- run();
355
- ```
356
-
357
- ### Parameters
358
-
359
- | Parameter | Type | Required | Description |
360
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
361
- | `request` | [operations.UpdateImageRequest](../../models/operations/updateimagerequest.md) | :heavy_check_mark: | The request object to use for the request. |
362
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
363
- | `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. |
364
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
365
-
366
- ### Response
367
-
368
- **Promise\<[operations.UpdateImageResponse](../../models/operations/updateimageresponse.md)\>**
369
-
370
- ### Errors
371
-
372
- | Error Type | Status Code | Content Type |
373
- | ---------------------------------- | ---------------------------------- | ---------------------------------- |
374
- | errors.GenericError | 400, 409 | application/json |
375
- | errors.ImageRequestValidationError | 422 | application/json |
376
- | errors.APIError | 4XX, 5XX | \*/\* |
377
-
378
- ## delete
379
-
380
- Permanently delete an image by its ID.
381
-
382
- ### Example Usage
383
-
384
- <!-- UsageSnippet language="typescript" operationID="deleteImage" method="delete" path="/accounts/{accountID}/images/{imageID}" -->
385
- ```typescript
386
- import { Moov } from "@moovio/sdk";
387
-
388
- const moov = new Moov({
389
- xMoovVersion: "v2024.01.00",
390
- security: {
391
- username: "",
392
- password: "",
393
- },
394
- });
395
-
396
- async function run() {
397
- const result = await moov.images.delete({
398
- accountID: "866c32ce-2536-4b21-8e12-f8c474fb2a9b",
399
- imageID: "ca048253-31d2-4bfb-9077-1f07a2a09f26",
400
- });
401
-
402
- console.log(result);
403
- }
404
-
405
- run();
406
- ```
407
-
408
- ### Standalone function
409
-
410
- The standalone function version of this method:
411
-
412
- ```typescript
413
- import { MoovCore } from "@moovio/sdk/core.js";
414
- import { imagesDelete } from "@moovio/sdk/funcs/imagesDelete.js";
415
-
416
- // Use `MoovCore` for best tree-shaking performance.
417
- // You can create one instance of it to use across an application.
418
- const moov = new MoovCore({
419
- xMoovVersion: "v2024.01.00",
420
- security: {
421
- username: "",
422
- password: "",
423
- },
424
- });
425
-
426
- async function run() {
427
- const res = await imagesDelete(moov, {
428
- accountID: "866c32ce-2536-4b21-8e12-f8c474fb2a9b",
429
- imageID: "ca048253-31d2-4bfb-9077-1f07a2a09f26",
430
- });
431
- if (res.ok) {
432
- const { value: result } = res;
433
- console.log(result);
434
- } else {
435
- console.log("imagesDelete failed:", res.error);
436
- }
437
- }
438
-
439
- run();
440
- ```
441
-
442
- ### Parameters
443
-
444
- | Parameter | Type | Required | Description |
445
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
446
- | `request` | [operations.DeleteImageRequest](../../models/operations/deleteimagerequest.md) | :heavy_check_mark: | The request object to use for the request. |
447
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
448
- | `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. |
449
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
450
-
451
- ### Response
452
-
453
- **Promise\<[operations.DeleteImageResponse](../../models/operations/deleteimageresponse.md)\>**
454
-
455
- ### Errors
456
-
457
- | Error Type | Status Code | Content Type |
458
- | ------------------- | ------------------- | ------------------- |
459
- | errors.GenericError | 400, 409 | application/json |
460
- | errors.APIError | 4XX, 5XX | \*/\* |
461
-
462
- ## updateMetadata
463
-
464
- Replace the metadata for an existing image.
465
-
466
- ### Example Usage
467
-
468
- <!-- UsageSnippet language="typescript" operationID="updateImageMetadata" method="put" path="/accounts/{accountID}/images/{imageID}/metadata" -->
469
- ```typescript
470
- import { Moov } from "@moovio/sdk";
471
-
472
- const moov = new Moov({
473
- xMoovVersion: "v2024.01.00",
474
- security: {
475
- username: "",
476
- password: "",
477
- },
478
- });
479
-
480
- async function run() {
481
- const result = await moov.images.updateMetadata({
482
- accountID: "58c3c937-e648-49c5-88be-6225cca35af1",
483
- imageID: "d957e703-ecd4-48ac-9c14-c0ecf1b496f0",
484
- imageMetadataRequest: {},
485
- });
486
-
487
- console.log(result);
488
- }
489
-
490
- run();
491
- ```
492
-
493
- ### Standalone function
494
-
495
- The standalone function version of this method:
496
-
497
- ```typescript
498
- import { MoovCore } from "@moovio/sdk/core.js";
499
- import { imagesUpdateMetadata } from "@moovio/sdk/funcs/imagesUpdateMetadata.js";
500
-
501
- // Use `MoovCore` for best tree-shaking performance.
502
- // You can create one instance of it to use across an application.
503
- const moov = new MoovCore({
504
- xMoovVersion: "v2024.01.00",
505
- security: {
506
- username: "",
507
- password: "",
508
- },
509
- });
510
-
511
- async function run() {
512
- const res = await imagesUpdateMetadata(moov, {
513
- accountID: "58c3c937-e648-49c5-88be-6225cca35af1",
514
- imageID: "d957e703-ecd4-48ac-9c14-c0ecf1b496f0",
515
- imageMetadataRequest: {},
516
- });
517
- if (res.ok) {
518
- const { value: result } = res;
519
- console.log(result);
520
- } else {
521
- console.log("imagesUpdateMetadata failed:", res.error);
522
- }
523
- }
524
-
525
- run();
526
- ```
527
-
528
- ### Parameters
529
-
530
- | Parameter | Type | Required | Description |
531
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
532
- | `request` | [operations.UpdateImageMetadataRequest](../../models/operations/updateimagemetadatarequest.md) | :heavy_check_mark: | The request object to use for the request. |
533
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
534
- | `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. |
535
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
536
-
537
- ### Response
538
-
539
- **Promise\<[operations.UpdateImageMetadataResponse](../../models/operations/updateimagemetadataresponse.md)\>**
540
-
541
- ### Errors
542
-
543
- | Error Type | Status Code | Content Type |
544
- | ----------------------------------- | ----------------------------------- | ----------------------------------- |
545
- | errors.GenericError | 400, 409 | application/json |
546
- | errors.ImageMetadataValidationError | 422 | application/json |
547
- | errors.APIError | 4XX, 5XX | \*/\* |
548
-
549
- ## getPublic
550
-
551
- Get an image by its public ID.
552
-
553
- ### Example Usage
554
-
555
- <!-- UsageSnippet language="typescript" operationID="getPublicImage" method="get" path="/images/{publicID}" -->
556
- ```typescript
557
- import { Moov } from "@moovio/sdk";
558
-
559
- const moov = new Moov();
560
-
561
- async function run() {
562
- const result = await moov.images.getPublic({
563
- publicID: "<id>",
564
- });
565
-
566
- console.log(result);
567
- }
568
-
569
- run();
570
- ```
571
-
572
- ### Standalone function
573
-
574
- The standalone function version of this method:
575
-
576
- ```typescript
577
- import { MoovCore } from "@moovio/sdk/core.js";
578
- import { imagesGetPublic } from "@moovio/sdk/funcs/imagesGetPublic.js";
579
-
580
- // Use `MoovCore` for best tree-shaking performance.
581
- // You can create one instance of it to use across an application.
582
- const moov = new MoovCore();
583
-
584
- async function run() {
585
- const res = await imagesGetPublic(moov, {
586
- publicID: "<id>",
587
- });
588
- if (res.ok) {
589
- const { value: result } = res;
590
- console.log(result);
591
- } else {
592
- console.log("imagesGetPublic failed:", res.error);
593
- }
594
- }
595
-
596
- run();
597
- ```
598
-
599
- ### Parameters
600
-
601
- | Parameter | Type | Required | Description |
602
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
603
- | `request` | [operations.GetPublicImageRequest](../../models/operations/getpublicimagerequest.md) | :heavy_check_mark: | The request object to use for the request. |
604
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
605
- | `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. |
606
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
607
-
608
- ### Response
609
-
610
- **Promise\<[operations.GetPublicImageResponse](../../models/operations/getpublicimageresponse.md)\>**
611
-
612
- ### Errors
613
-
614
- | Error Type | Status Code | Content Type |
615
- | --------------- | --------------- | --------------- |
616
- | errors.APIError | 4XX, 5XX | \*/\* |