@moovio/sdk 0.12.0 → 0.12.1

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 (118) hide show
  1. package/FUNCTIONS.md +6 -22
  2. package/README.md +97 -55
  3. package/bin/mcp-server.js +749 -415
  4. package/bin/mcp-server.js.map +19 -9
  5. package/docs/sdks/accounts/README.md +63 -81
  6. package/docs/sdks/accountterminalapplications/README.md +28 -36
  7. package/docs/sdks/adjustments/README.md +14 -18
  8. package/docs/sdks/applepay/README.md +35 -45
  9. package/docs/sdks/authentication/README.md +14 -18
  10. package/docs/sdks/avatars/README.md +7 -9
  11. package/docs/sdks/bankaccounts/README.md +63 -81
  12. package/docs/sdks/branding/README.md +28 -36
  13. package/docs/sdks/capabilities/README.md +28 -36
  14. package/docs/sdks/cardissuing/README.md +35 -45
  15. package/docs/sdks/cards/README.md +35 -45
  16. package/docs/sdks/disputes/README.md +77 -99
  17. package/docs/sdks/endtoendencryption/README.md +14 -18
  18. package/docs/sdks/enrichedaddress/README.md +7 -9
  19. package/docs/sdks/enrichedprofile/README.md +7 -9
  20. package/docs/sdks/feeplans/README.md +49 -63
  21. package/docs/sdks/files/README.md +21 -27
  22. package/docs/sdks/industries/README.md +7 -9
  23. package/docs/sdks/institutions/README.md +98 -9
  24. package/docs/sdks/issuingtransactions/README.md +35 -45
  25. package/docs/sdks/onboarding/README.md +28 -36
  26. package/docs/sdks/paymentlinks/README.md +42 -54
  27. package/docs/sdks/paymentmethods/README.md +14 -18
  28. package/docs/sdks/ping/README.md +7 -9
  29. package/docs/sdks/receipts/README.md +14 -18
  30. package/docs/sdks/representatives/README.md +35 -45
  31. package/docs/sdks/scheduling/README.md +42 -54
  32. package/docs/sdks/sweeps/README.md +42 -54
  33. package/docs/sdks/terminalapplications/README.md +28 -36
  34. package/docs/sdks/transfers/README.md +77 -99
  35. package/docs/sdks/underwriting/README.md +14 -18
  36. package/docs/sdks/wallets/README.md +14 -18
  37. package/docs/sdks/wallettransactions/README.md +14 -18
  38. package/funcs/institutionsSearchInstitutions.d.ts +20 -0
  39. package/funcs/institutionsSearchInstitutions.d.ts.map +1 -0
  40. package/funcs/institutionsSearchInstitutions.js +129 -0
  41. package/funcs/institutionsSearchInstitutions.js.map +1 -0
  42. package/jsr.json +1 -1
  43. package/lib/config.d.ts +3 -3
  44. package/lib/config.js +3 -3
  45. package/mcp-server/mcp-server.js +1 -1
  46. package/mcp-server/server.d.ts.map +1 -1
  47. package/mcp-server/server.js +3 -1
  48. package/mcp-server/server.js.map +1 -1
  49. package/mcp-server/tools/institutionsSearchInstitutions.d.ts +8 -0
  50. package/mcp-server/tools/institutionsSearchInstitutions.d.ts.map +1 -0
  51. package/mcp-server/tools/institutionsSearchInstitutions.js +69 -0
  52. package/mcp-server/tools/institutionsSearchInstitutions.js.map +1 -0
  53. package/models/components/achinstitution.d.ts +40 -0
  54. package/models/components/achinstitution.d.ts.map +1 -0
  55. package/models/components/achinstitution.js +77 -0
  56. package/models/components/achinstitution.js.map +1 -0
  57. package/models/components/contact.d.ts +30 -0
  58. package/models/components/contact.d.ts.map +1 -0
  59. package/models/components/contact.js +70 -0
  60. package/models/components/contact.js.map +1 -0
  61. package/models/components/index.d.ts +7 -0
  62. package/models/components/index.d.ts.map +1 -1
  63. package/models/components/index.js +7 -0
  64. package/models/components/index.js.map +1 -1
  65. package/models/components/institutionssearchresponse.d.ts +36 -0
  66. package/models/components/institutionssearchresponse.d.ts.map +1 -0
  67. package/models/components/institutionssearchresponse.js +76 -0
  68. package/models/components/institutionssearchresponse.js.map +1 -0
  69. package/models/components/rtpinstitution.d.ts +37 -0
  70. package/models/components/rtpinstitution.d.ts.map +1 -0
  71. package/models/components/rtpinstitution.js +74 -0
  72. package/models/components/rtpinstitution.js.map +1 -0
  73. package/models/components/rtpservices.d.ts +37 -0
  74. package/models/components/rtpservices.d.ts.map +1 -0
  75. package/models/components/rtpservices.js +71 -0
  76. package/models/components/rtpservices.js.map +1 -0
  77. package/models/components/wireinstitution.d.ts +40 -0
  78. package/models/components/wireinstitution.d.ts.map +1 -0
  79. package/models/components/wireinstitution.js +77 -0
  80. package/models/components/wireinstitution.js.map +1 -0
  81. package/models/components/wireservices.d.ts +42 -0
  82. package/models/components/wireservices.d.ts.map +1 -0
  83. package/models/components/wireservices.js +73 -0
  84. package/models/components/wireservices.js.map +1 -0
  85. package/models/errors/apierror.d.ts +14 -2
  86. package/models/errors/apierror.d.ts.map +1 -1
  87. package/models/errors/apierror.js +1 -1
  88. package/models/errors/apierror.js.map +1 -1
  89. package/models/operations/index.d.ts +1 -0
  90. package/models/operations/index.d.ts.map +1 -1
  91. package/models/operations/index.js +1 -0
  92. package/models/operations/index.js.map +1 -1
  93. package/models/operations/searchinstitutions.d.ts +112 -0
  94. package/models/operations/searchinstitutions.d.ts.map +1 -0
  95. package/models/operations/searchinstitutions.js +149 -0
  96. package/models/operations/searchinstitutions.js.map +1 -0
  97. package/package.json +1 -1
  98. package/sdk/institutions.d.ts +11 -0
  99. package/sdk/institutions.d.ts.map +1 -1
  100. package/sdk/institutions.js +14 -0
  101. package/sdk/institutions.js.map +1 -1
  102. package/src/funcs/institutionsSearchInstitutions.ts +179 -0
  103. package/src/lib/config.ts +3 -3
  104. package/src/mcp-server/mcp-server.ts +1 -1
  105. package/src/mcp-server/server.ts +3 -1
  106. package/src/mcp-server/tools/institutionsSearchInstitutions.ts +43 -0
  107. package/src/models/components/achinstitution.ts +89 -0
  108. package/src/models/components/contact.ts +65 -0
  109. package/src/models/components/index.ts +7 -0
  110. package/src/models/components/institutionssearchresponse.ts +92 -0
  111. package/src/models/components/rtpinstitution.ts +79 -0
  112. package/src/models/components/rtpservices.ts +72 -0
  113. package/src/models/components/wireinstitution.ts +91 -0
  114. package/src/models/components/wireservices.ts +79 -0
  115. package/src/models/errors/apierror.ts +18 -3
  116. package/src/models/operations/index.ts +1 -0
  117. package/src/models/operations/searchinstitutions.ts +236 -0
  118. package/src/sdk/institutions.ts +22 -0
@@ -87,6 +87,7 @@ you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
87
87
  import { Moov } from "@moovio/sdk";
88
88
 
89
89
  const moov = new Moov({
90
+ xMoovVersion: "v2024.01.00",
90
91
  security: {
91
92
  username: "",
92
93
  password: "",
@@ -115,7 +116,6 @@ async function run() {
115
116
  },
116
117
  });
117
118
 
118
- // Handle the result
119
119
  console.log(result);
120
120
  }
121
121
 
@@ -133,6 +133,7 @@ import { transfersCreate } from "@moovio/sdk/funcs/transfersCreate.js";
133
133
  // Use `MoovCore` for best tree-shaking performance.
134
134
  // You can create one instance of it to use across an application.
135
135
  const moov = new MoovCore({
136
+ xMoovVersion: "v2024.01.00",
136
137
  security: {
137
138
  username: "",
138
139
  password: "",
@@ -160,15 +161,12 @@ async function run() {
160
161
  },
161
162
  },
162
163
  });
163
-
164
- if (!res.ok) {
165
- throw res.error;
164
+ if (res.ok) {
165
+ const { value: result } = res;
166
+ console.log(result);
167
+ } else {
168
+ console.log("transfersCreate failed:", res.error);
166
169
  }
167
-
168
- const { value: result } = res;
169
-
170
- // Handle the result
171
- console.log(result);
172
170
  }
173
171
 
174
172
  run();
@@ -216,6 +214,7 @@ you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
216
214
  import { Moov } from "@moovio/sdk";
217
215
 
218
216
  const moov = new Moov({
217
+ xMoovVersion: "v2024.01.00",
219
218
  security: {
220
219
  username: "",
221
220
  password: "",
@@ -229,7 +228,6 @@ async function run() {
229
228
  accountID: "0579c895-4d2b-4024-8092-f71b80ab5d00",
230
229
  });
231
230
 
232
- // Handle the result
233
231
  console.log(result);
234
232
  }
235
233
 
@@ -247,6 +245,7 @@ import { transfersList } from "@moovio/sdk/funcs/transfersList.js";
247
245
  // Use `MoovCore` for best tree-shaking performance.
248
246
  // You can create one instance of it to use across an application.
249
247
  const moov = new MoovCore({
248
+ xMoovVersion: "v2024.01.00",
250
249
  security: {
251
250
  username: "",
252
251
  password: "",
@@ -259,15 +258,12 @@ async function run() {
259
258
  count: 20,
260
259
  accountID: "0579c895-4d2b-4024-8092-f71b80ab5d00",
261
260
  });
262
-
263
- if (!res.ok) {
264
- throw res.error;
261
+ if (res.ok) {
262
+ const { value: result } = res;
263
+ console.log(result);
264
+ } else {
265
+ console.log("transfersList failed:", res.error);
265
266
  }
266
-
267
- const { value: result } = res;
268
-
269
- // Handle the result
270
- console.log(result);
271
267
  }
272
268
 
273
269
  run();
@@ -308,6 +304,7 @@ you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
308
304
  import { Moov } from "@moovio/sdk";
309
305
 
310
306
  const moov = new Moov({
307
+ xMoovVersion: "v2024.01.00",
311
308
  security: {
312
309
  username: "",
313
310
  password: "",
@@ -320,7 +317,6 @@ async function run() {
320
317
  accountID: "31113f7b-9f68-44e9-9338-6d8e655c7c96",
321
318
  });
322
319
 
323
- // Handle the result
324
320
  console.log(result);
325
321
  }
326
322
 
@@ -338,6 +334,7 @@ import { transfersGet } from "@moovio/sdk/funcs/transfersGet.js";
338
334
  // Use `MoovCore` for best tree-shaking performance.
339
335
  // You can create one instance of it to use across an application.
340
336
  const moov = new MoovCore({
337
+ xMoovVersion: "v2024.01.00",
341
338
  security: {
342
339
  username: "",
343
340
  password: "",
@@ -349,15 +346,12 @@ async function run() {
349
346
  transferID: "960cf5a2-50a3-4914-ad86-d54c022bf5df",
350
347
  accountID: "31113f7b-9f68-44e9-9338-6d8e655c7c96",
351
348
  });
352
-
353
- if (!res.ok) {
354
- throw res.error;
349
+ if (res.ok) {
350
+ const { value: result } = res;
351
+ console.log(result);
352
+ } else {
353
+ console.log("transfersGet failed:", res.error);
355
354
  }
356
-
357
- const { value: result } = res;
358
-
359
- // Handle the result
360
- console.log(result);
361
355
  }
362
356
 
363
357
  run();
@@ -397,6 +391,7 @@ you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
397
391
  import { Moov } from "@moovio/sdk";
398
392
 
399
393
  const moov = new Moov({
394
+ xMoovVersion: "v2024.01.00",
400
395
  security: {
401
396
  username: "",
402
397
  password: "",
@@ -414,7 +409,6 @@ async function run() {
414
409
  },
415
410
  });
416
411
 
417
- // Handle the result
418
412
  console.log(result);
419
413
  }
420
414
 
@@ -432,6 +426,7 @@ import { transfersUpdate } from "@moovio/sdk/funcs/transfersUpdate.js";
432
426
  // Use `MoovCore` for best tree-shaking performance.
433
427
  // You can create one instance of it to use across an application.
434
428
  const moov = new MoovCore({
429
+ xMoovVersion: "v2024.01.00",
435
430
  security: {
436
431
  username: "",
437
432
  password: "",
@@ -448,15 +443,12 @@ async function run() {
448
443
  },
449
444
  },
450
445
  });
451
-
452
- if (!res.ok) {
453
- throw res.error;
446
+ if (res.ok) {
447
+ const { value: result } = res;
448
+ console.log(result);
449
+ } else {
450
+ console.log("transfersUpdate failed:", res.error);
454
451
  }
455
-
456
- const { value: result } = res;
457
-
458
- // Handle the result
459
- console.log(result);
460
452
  }
461
453
 
462
454
  run();
@@ -494,6 +486,7 @@ run();
494
486
  import { Moov } from "@moovio/sdk";
495
487
 
496
488
  const moov = new Moov({
489
+ xMoovVersion: "v2024.01.00",
497
490
  security: {
498
491
  username: "",
499
492
  password: "",
@@ -506,7 +499,6 @@ async function run() {
506
499
  transferID: "36c80a6c-ceb2-4e5d-a437-8a39afdfdc58",
507
500
  });
508
501
 
509
- // Handle the result
510
502
  console.log(result);
511
503
  }
512
504
 
@@ -524,6 +516,7 @@ import { transfersCreateCancellation } from "@moovio/sdk/funcs/transfersCreateCa
524
516
  // Use `MoovCore` for best tree-shaking performance.
525
517
  // You can create one instance of it to use across an application.
526
518
  const moov = new MoovCore({
519
+ xMoovVersion: "v2024.01.00",
527
520
  security: {
528
521
  username: "",
529
522
  password: "",
@@ -535,15 +528,12 @@ async function run() {
535
528
  accountID: "10ae862c-6658-4f87-967d-46e995737204",
536
529
  transferID: "36c80a6c-ceb2-4e5d-a437-8a39afdfdc58",
537
530
  });
538
-
539
- if (!res.ok) {
540
- throw res.error;
531
+ if (res.ok) {
532
+ const { value: result } = res;
533
+ console.log(result);
534
+ } else {
535
+ console.log("transfersCreateCancellation failed:", res.error);
541
536
  }
542
-
543
- const { value: result } = res;
544
-
545
- // Handle the result
546
- console.log(result);
547
537
  }
548
538
 
549
539
  run();
@@ -582,6 +572,7 @@ run();
582
572
  import { Moov } from "@moovio/sdk";
583
573
 
584
574
  const moov = new Moov({
575
+ xMoovVersion: "v2024.01.00",
585
576
  security: {
586
577
  username: "",
587
578
  password: "",
@@ -595,7 +586,6 @@ async function run() {
595
586
  cancellationID: "770cb4b5-d5b0-4e8b-995b-86b790296ba5",
596
587
  });
597
588
 
598
- // Handle the result
599
589
  console.log(result);
600
590
  }
601
591
 
@@ -613,6 +603,7 @@ import { transfersGetCancellation } from "@moovio/sdk/funcs/transfersGetCancella
613
603
  // Use `MoovCore` for best tree-shaking performance.
614
604
  // You can create one instance of it to use across an application.
615
605
  const moov = new MoovCore({
606
+ xMoovVersion: "v2024.01.00",
616
607
  security: {
617
608
  username: "",
618
609
  password: "",
@@ -625,15 +616,12 @@ async function run() {
625
616
  transferID: "bc13b680-bac3-432e-bf44-e9aa6426cbb2",
626
617
  cancellationID: "770cb4b5-d5b0-4e8b-995b-86b790296ba5",
627
618
  });
628
-
629
- if (!res.ok) {
630
- throw res.error;
619
+ if (res.ok) {
620
+ const { value: result } = res;
621
+ console.log(result);
622
+ } else {
623
+ console.log("transfersGetCancellation failed:", res.error);
631
624
  }
632
-
633
- const { value: result } = res;
634
-
635
- // Handle the result
636
- console.log(result);
637
625
  }
638
626
 
639
627
  run();
@@ -674,6 +662,7 @@ you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
674
662
  import { Moov } from "@moovio/sdk";
675
663
 
676
664
  const moov = new Moov({
665
+ xMoovVersion: "v2024.01.00",
677
666
  security: {
678
667
  username: "",
679
668
  password: "",
@@ -690,7 +679,6 @@ async function run() {
690
679
  },
691
680
  });
692
681
 
693
- // Handle the result
694
682
  console.log(result);
695
683
  }
696
684
 
@@ -708,6 +696,7 @@ import { transfersInitiateRefund } from "@moovio/sdk/funcs/transfersInitiateRefu
708
696
  // Use `MoovCore` for best tree-shaking performance.
709
697
  // You can create one instance of it to use across an application.
710
698
  const moov = new MoovCore({
699
+ xMoovVersion: "v2024.01.00",
711
700
  security: {
712
701
  username: "",
713
702
  password: "",
@@ -723,15 +712,12 @@ async function run() {
723
712
  amount: 1000,
724
713
  },
725
714
  });
726
-
727
- if (!res.ok) {
728
- throw res.error;
715
+ if (res.ok) {
716
+ const { value: result } = res;
717
+ console.log(result);
718
+ } else {
719
+ console.log("transfersInitiateRefund failed:", res.error);
729
720
  }
730
-
731
- const { value: result } = res;
732
-
733
- // Handle the result
734
- console.log(result);
735
721
  }
736
722
 
737
723
  run();
@@ -772,6 +758,7 @@ you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
772
758
  import { Moov } from "@moovio/sdk";
773
759
 
774
760
  const moov = new Moov({
761
+ xMoovVersion: "v2024.01.00",
775
762
  security: {
776
763
  username: "",
777
764
  password: "",
@@ -784,7 +771,6 @@ async function run() {
784
771
  transferID: "6b1aa1a1-bff1-43b9-9126-2806fdc9c732",
785
772
  });
786
773
 
787
- // Handle the result
788
774
  console.log(result);
789
775
  }
790
776
 
@@ -802,6 +788,7 @@ import { transfersListRefunds } from "@moovio/sdk/funcs/transfersListRefunds.js"
802
788
  // Use `MoovCore` for best tree-shaking performance.
803
789
  // You can create one instance of it to use across an application.
804
790
  const moov = new MoovCore({
791
+ xMoovVersion: "v2024.01.00",
805
792
  security: {
806
793
  username: "",
807
794
  password: "",
@@ -813,15 +800,12 @@ async function run() {
813
800
  accountID: "03f5baaa-f5d8-44bd-90db-868745fe66e8",
814
801
  transferID: "6b1aa1a1-bff1-43b9-9126-2806fdc9c732",
815
802
  });
816
-
817
- if (!res.ok) {
818
- throw res.error;
803
+ if (res.ok) {
804
+ const { value: result } = res;
805
+ console.log(result);
806
+ } else {
807
+ console.log("transfersListRefunds failed:", res.error);
819
808
  }
820
-
821
- const { value: result } = res;
822
-
823
- // Handle the result
824
- console.log(result);
825
809
  }
826
810
 
827
811
  run();
@@ -859,6 +843,7 @@ you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
859
843
  import { Moov } from "@moovio/sdk";
860
844
 
861
845
  const moov = new Moov({
846
+ xMoovVersion: "v2024.01.00",
862
847
  security: {
863
848
  username: "",
864
849
  password: "",
@@ -872,7 +857,6 @@ async function run() {
872
857
  refundID: "8e12687e-a4e8-46c9-9e11-a57bbd781e44",
873
858
  });
874
859
 
875
- // Handle the result
876
860
  console.log(result);
877
861
  }
878
862
 
@@ -890,6 +874,7 @@ import { transfersGetRefund } from "@moovio/sdk/funcs/transfersGetRefund.js";
890
874
  // Use `MoovCore` for best tree-shaking performance.
891
875
  // You can create one instance of it to use across an application.
892
876
  const moov = new MoovCore({
877
+ xMoovVersion: "v2024.01.00",
893
878
  security: {
894
879
  username: "",
895
880
  password: "",
@@ -902,15 +887,12 @@ async function run() {
902
887
  accountID: "bbb69538-edaa-4a0b-b107-f46f2da89864",
903
888
  refundID: "8e12687e-a4e8-46c9-9e11-a57bbd781e44",
904
889
  });
905
-
906
- if (!res.ok) {
907
- throw res.error;
890
+ if (res.ok) {
891
+ const { value: result } = res;
892
+ console.log(result);
893
+ } else {
894
+ console.log("transfersGetRefund failed:", res.error);
908
895
  }
909
-
910
- const { value: result } = res;
911
-
912
- // Handle the result
913
- console.log(result);
914
896
  }
915
897
 
916
898
  run();
@@ -950,6 +932,7 @@ to specify the `/accounts/{accountID}/transfers.write` scope.
950
932
  import { Moov } from "@moovio/sdk";
951
933
 
952
934
  const moov = new Moov({
935
+ xMoovVersion: "v2024.01.00",
953
936
  security: {
954
937
  username: "",
955
938
  password: "",
@@ -966,7 +949,6 @@ async function run() {
966
949
  },
967
950
  });
968
951
 
969
- // Handle the result
970
952
  console.log(result);
971
953
  }
972
954
 
@@ -984,6 +966,7 @@ import { transfersCreateReversal } from "@moovio/sdk/funcs/transfersCreateRevers
984
966
  // Use `MoovCore` for best tree-shaking performance.
985
967
  // You can create one instance of it to use across an application.
986
968
  const moov = new MoovCore({
969
+ xMoovVersion: "v2024.01.00",
987
970
  security: {
988
971
  username: "",
989
972
  password: "",
@@ -999,15 +982,12 @@ async function run() {
999
982
  amount: 1000,
1000
983
  },
1001
984
  });
1002
-
1003
- if (!res.ok) {
1004
- throw res.error;
985
+ if (res.ok) {
986
+ const { value: result } = res;
987
+ console.log(result);
988
+ } else {
989
+ console.log("transfersCreateReversal failed:", res.error);
1005
990
  }
1006
-
1007
- const { value: result } = res;
1008
-
1009
- // Handle the result
1010
- console.log(result);
1011
991
  }
1012
992
 
1013
993
  run();
@@ -1050,6 +1030,7 @@ you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
1050
1030
  import { Moov } from "@moovio/sdk";
1051
1031
 
1052
1032
  const moov = new Moov({
1033
+ xMoovVersion: "v2024.01.00",
1053
1034
  security: {
1054
1035
  username: "",
1055
1036
  password: "",
@@ -1066,7 +1047,6 @@ async function run() {
1066
1047
  },
1067
1048
  });
1068
1049
 
1069
- // Handle the result
1070
1050
  console.log(result);
1071
1051
  }
1072
1052
 
@@ -1084,6 +1064,7 @@ import { transfersGenerateOptions } from "@moovio/sdk/funcs/transfersGenerateOpt
1084
1064
  // Use `MoovCore` for best tree-shaking performance.
1085
1065
  // You can create one instance of it to use across an application.
1086
1066
  const moov = new MoovCore({
1067
+ xMoovVersion: "v2024.01.00",
1087
1068
  security: {
1088
1069
  username: "",
1089
1070
  password: "",
@@ -1099,15 +1080,12 @@ async function run() {
1099
1080
  value: 1204,
1100
1081
  },
1101
1082
  });
1102
-
1103
- if (!res.ok) {
1104
- throw res.error;
1083
+ if (res.ok) {
1084
+ const { value: result } = res;
1085
+ console.log(result);
1086
+ } else {
1087
+ console.log("transfersGenerateOptions failed:", res.error);
1105
1088
  }
1106
-
1107
- const { value: result } = res;
1108
-
1109
- // Handle the result
1110
- console.log(result);
1111
1089
  }
1112
1090
 
1113
1091
  run();
@@ -33,6 +33,7 @@ you'll need to specify the `/accounts/{accountID}/profile.read` scope.
33
33
  import { Moov } from "@moovio/sdk";
34
34
 
35
35
  const moov = new Moov({
36
+ xMoovVersion: "v2024.01.00",
36
37
  security: {
37
38
  username: "",
38
39
  password: "",
@@ -44,7 +45,6 @@ async function run() {
44
45
  accountID: "efe07546-f697-4da5-bf73-d9987efd4cdd",
45
46
  });
46
47
 
47
- // Handle the result
48
48
  console.log(result);
49
49
  }
50
50
 
@@ -62,6 +62,7 @@ import { underwritingGet } from "@moovio/sdk/funcs/underwritingGet.js";
62
62
  // Use `MoovCore` for best tree-shaking performance.
63
63
  // You can create one instance of it to use across an application.
64
64
  const moov = new MoovCore({
65
+ xMoovVersion: "v2024.01.00",
65
66
  security: {
66
67
  username: "",
67
68
  password: "",
@@ -72,15 +73,12 @@ async function run() {
72
73
  const res = await underwritingGet(moov, {
73
74
  accountID: "efe07546-f697-4da5-bf73-d9987efd4cdd",
74
75
  });
75
-
76
- if (!res.ok) {
77
- throw res.error;
76
+ if (res.ok) {
77
+ const { value: result } = res;
78
+ console.log(result);
79
+ } else {
80
+ console.log("underwritingGet failed:", res.error);
78
81
  }
79
-
80
- const { value: result } = res;
81
-
82
- // Handle the result
83
- console.log(result);
84
82
  }
85
83
 
86
84
  run();
@@ -120,6 +118,7 @@ you'll need to specify the `/accounts/{accountID}/profile.write` scope.
120
118
  import { Moov } from "@moovio/sdk";
121
119
 
122
120
  const moov = new Moov({
121
+ xMoovVersion: "v2024.01.00",
123
122
  security: {
124
123
  username: "",
125
124
  password: "",
@@ -152,7 +151,6 @@ async function run() {
152
151
  },
153
152
  });
154
153
 
155
- // Handle the result
156
154
  console.log(result);
157
155
  }
158
156
 
@@ -170,6 +168,7 @@ import { underwritingUpsert } from "@moovio/sdk/funcs/underwritingUpsert.js";
170
168
  // Use `MoovCore` for best tree-shaking performance.
171
169
  // You can create one instance of it to use across an application.
172
170
  const moov = new MoovCore({
171
+ xMoovVersion: "v2024.01.00",
173
172
  security: {
174
173
  username: "",
175
174
  password: "",
@@ -201,15 +200,12 @@ async function run() {
201
200
  },
202
201
  },
203
202
  });
204
-
205
- if (!res.ok) {
206
- throw res.error;
203
+ if (res.ok) {
204
+ const { value: result } = res;
205
+ console.log(result);
206
+ } else {
207
+ console.log("underwritingUpsert failed:", res.error);
207
208
  }
208
-
209
- const { value: result } = res;
210
-
211
- // Handle the result
212
- console.log(result);
213
209
  }
214
210
 
215
211
  run();
@@ -33,6 +33,7 @@ you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
33
33
  import { Moov } from "@moovio/sdk";
34
34
 
35
35
  const moov = new Moov({
36
+ xMoovVersion: "v2024.01.00",
36
37
  security: {
37
38
  username: "",
38
39
  password: "",
@@ -44,7 +45,6 @@ async function run() {
44
45
  accountID: "25221c3c-8e3f-40db-8570-66d17b51014d",
45
46
  });
46
47
 
47
- // Handle the result
48
48
  console.log(result);
49
49
  }
50
50
 
@@ -62,6 +62,7 @@ import { walletsList } from "@moovio/sdk/funcs/walletsList.js";
62
62
  // Use `MoovCore` for best tree-shaking performance.
63
63
  // You can create one instance of it to use across an application.
64
64
  const moov = new MoovCore({
65
+ xMoovVersion: "v2024.01.00",
65
66
  security: {
66
67
  username: "",
67
68
  password: "",
@@ -72,15 +73,12 @@ async function run() {
72
73
  const res = await walletsList(moov, {
73
74
  accountID: "25221c3c-8e3f-40db-8570-66d17b51014d",
74
75
  });
75
-
76
- if (!res.ok) {
77
- throw res.error;
76
+ if (res.ok) {
77
+ const { value: result } = res;
78
+ console.log(result);
79
+ } else {
80
+ console.log("walletsList failed:", res.error);
78
81
  }
79
-
80
- const { value: result } = res;
81
-
82
- // Handle the result
83
- console.log(result);
84
82
  }
85
83
 
86
84
  run();
@@ -120,6 +118,7 @@ you'll need to specify the `/accounts/{accountID}/wallets.read` scope.
120
118
  import { Moov } from "@moovio/sdk";
121
119
 
122
120
  const moov = new Moov({
121
+ xMoovVersion: "v2024.01.00",
123
122
  security: {
124
123
  username: "",
125
124
  password: "",
@@ -132,7 +131,6 @@ async function run() {
132
131
  walletID: "10a6bc37-8eeb-41c8-bf5f-77b40955542a",
133
132
  });
134
133
 
135
- // Handle the result
136
134
  console.log(result);
137
135
  }
138
136
 
@@ -150,6 +148,7 @@ import { walletsGet } from "@moovio/sdk/funcs/walletsGet.js";
150
148
  // Use `MoovCore` for best tree-shaking performance.
151
149
  // You can create one instance of it to use across an application.
152
150
  const moov = new MoovCore({
151
+ xMoovVersion: "v2024.01.00",
153
152
  security: {
154
153
  username: "",
155
154
  password: "",
@@ -161,15 +160,12 @@ async function run() {
161
160
  accountID: "d04dfd44-8194-422f-a666-08d30c183f9a",
162
161
  walletID: "10a6bc37-8eeb-41c8-bf5f-77b40955542a",
163
162
  });
164
-
165
- if (!res.ok) {
166
- throw res.error;
163
+ if (res.ok) {
164
+ const { value: result } = res;
165
+ console.log(result);
166
+ } else {
167
+ console.log("walletsGet failed:", res.error);
167
168
  }
168
-
169
- const { value: result } = res;
170
-
171
- // Handle the result
172
- console.log(result);
173
169
  }
174
170
 
175
171
  run();