@moovio/sdk 26.7.0-dev.5 → 26.7.0

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 (182) hide show
  1. package/README.md +121 -59
  2. package/bin/mcp-server.js +520 -187
  3. package/bin/mcp-server.js.map +38 -28
  4. package/funcs/avatarsDelete.d.ts +23 -0
  5. package/funcs/avatarsDelete.d.ts.map +1 -0
  6. package/funcs/avatarsDelete.js +135 -0
  7. package/funcs/avatarsDelete.js.map +1 -0
  8. package/funcs/avatarsUpload.d.ts +23 -0
  9. package/funcs/avatarsUpload.d.ts.map +1 -0
  10. package/funcs/avatarsUpload.js +155 -0
  11. package/funcs/avatarsUpload.js.map +1 -0
  12. package/funcs/productsList.js +1 -0
  13. package/funcs/productsList.js.map +1 -1
  14. package/funcs/productsListCategories.d.ts +14 -0
  15. package/funcs/productsListCategories.d.ts.map +1 -0
  16. package/funcs/productsListCategories.js +107 -0
  17. package/funcs/productsListCategories.js.map +1 -0
  18. package/hooks/oauth2scopes.d.ts +5 -0
  19. package/hooks/oauth2scopes.d.ts.map +1 -0
  20. package/hooks/oauth2scopes.js +6 -0
  21. package/hooks/oauth2scopes.js.map +1 -0
  22. package/jsr.json +1 -1
  23. package/lib/config.d.ts +3 -3
  24. package/lib/config.d.ts.map +1 -1
  25. package/lib/config.js +3 -3
  26. package/lib/config.js.map +1 -1
  27. package/lib/http.d.ts +1 -1
  28. package/lib/http.d.ts.map +1 -1
  29. package/lib/http.js +1 -1
  30. package/lib/http.js.map +1 -1
  31. package/lib/security.d.ts +5 -4
  32. package/lib/security.d.ts.map +1 -1
  33. package/lib/security.js +6 -7
  34. package/lib/security.js.map +1 -1
  35. package/mcp-server/mcp-server.js +1 -1
  36. package/mcp-server/mcp-server.js.map +1 -1
  37. package/mcp-server/server.d.ts.map +1 -1
  38. package/mcp-server/server.js +3 -1
  39. package/mcp-server/server.js.map +1 -1
  40. package/mcp-server/tools/productsListCategories.d.ts +3 -0
  41. package/mcp-server/tools/productsListCategories.d.ts.map +1 -0
  42. package/mcp-server/tools/productsListCategories.js +24 -0
  43. package/mcp-server/tools/productsListCategories.js.map +1 -0
  44. package/models/components/avataruploadrequest.d.ts +35 -0
  45. package/models/components/avataruploadrequest.d.ts.map +1 -0
  46. package/models/components/avataruploadrequest.js +88 -0
  47. package/models/components/avataruploadrequest.js.map +1 -0
  48. package/models/components/capabilityid.d.ts +1 -0
  49. package/models/components/capabilityid.d.ts.map +1 -1
  50. package/models/components/capabilityid.js +1 -0
  51. package/models/components/capabilityid.js.map +1 -1
  52. package/models/components/cardbrandfees.d.ts +5 -0
  53. package/models/components/cardbrandfees.d.ts.map +1 -1
  54. package/models/components/cardbrandfees.js +2 -0
  55. package/models/components/cardbrandfees.js.map +1 -1
  56. package/models/components/createtransfer.d.ts +6 -0
  57. package/models/components/createtransfer.d.ts.map +1 -1
  58. package/models/components/createtransfer.js +3 -0
  59. package/models/components/createtransfer.js.map +1 -1
  60. package/models/components/feepaidby.d.ts +18 -0
  61. package/models/components/feepaidby.d.ts.map +1 -0
  62. package/models/components/feepaidby.js +52 -0
  63. package/models/components/feepaidby.js.map +1 -0
  64. package/models/components/filedetails.d.ts +1 -1
  65. package/models/components/filepurpose.d.ts +2 -2
  66. package/models/components/filepurpose.js +1 -1
  67. package/models/components/incurredfee.d.ts +6 -0
  68. package/models/components/incurredfee.d.ts.map +1 -1
  69. package/models/components/incurredfee.js +3 -0
  70. package/models/components/incurredfee.js.map +1 -1
  71. package/models/components/index.d.ts +5 -0
  72. package/models/components/index.d.ts.map +1 -1
  73. package/models/components/index.js +5 -0
  74. package/models/components/index.js.map +1 -1
  75. package/models/components/issuingintervallimit.d.ts +2 -2
  76. package/models/components/issuingintervallimit.js +1 -1
  77. package/models/components/issuingvelocitylimit.d.ts +1 -1
  78. package/models/components/onboardinginvite.d.ts +1 -1
  79. package/models/components/paymentlinkpayoutdetails.d.ts +14 -0
  80. package/models/components/paymentlinkpayoutdetails.d.ts.map +1 -1
  81. package/models/components/paymentlinkpayoutdetails.js +3 -0
  82. package/models/components/paymentlinkpayoutdetails.js.map +1 -1
  83. package/models/components/paymentlinkpayoutdetailsupdate.d.ts +14 -0
  84. package/models/components/paymentlinkpayoutdetailsupdate.d.ts.map +1 -1
  85. package/models/components/paymentlinkpayoutdetailsupdate.js +3 -0
  86. package/models/components/paymentlinkpayoutdetailsupdate.js.map +1 -1
  87. package/models/components/payoutdetailserror.d.ts +2 -0
  88. package/models/components/payoutdetailserror.d.ts.map +1 -1
  89. package/models/components/payoutdetailserror.js +2 -0
  90. package/models/components/payoutdetailserror.js.map +1 -1
  91. package/models/components/product.d.ts +6 -0
  92. package/models/components/product.d.ts.map +1 -1
  93. package/models/components/product.js +3 -0
  94. package/models/components/product.js.map +1 -1
  95. package/models/components/productcategories.d.ts +21 -0
  96. package/models/components/productcategories.d.ts.map +1 -0
  97. package/models/components/productcategories.js +59 -0
  98. package/models/components/productcategories.js.map +1 -0
  99. package/models/components/productcategory.d.ts +43 -0
  100. package/models/components/productcategory.d.ts.map +1 -0
  101. package/models/components/productcategory.js +67 -0
  102. package/models/components/productcategory.js.map +1 -0
  103. package/models/components/productrequest.d.ts +5 -0
  104. package/models/components/productrequest.d.ts.map +1 -1
  105. package/models/components/productrequest.js +2 -0
  106. package/models/components/productrequest.js.map +1 -1
  107. package/models/components/transferfeepaidby.d.ts +24 -0
  108. package/models/components/transferfeepaidby.d.ts.map +1 -0
  109. package/models/components/transferfeepaidby.js +60 -0
  110. package/models/components/transferfeepaidby.js.map +1 -0
  111. package/models/errors/productrequestvalidationerror.d.ts +3 -0
  112. package/models/errors/productrequestvalidationerror.d.ts.map +1 -1
  113. package/models/errors/productrequestvalidationerror.js +4 -0
  114. package/models/errors/productrequestvalidationerror.js.map +1 -1
  115. package/models/operations/deleteavatar.d.ts +52 -0
  116. package/models/operations/deleteavatar.d.ts.map +1 -0
  117. package/models/operations/deleteavatar.js +102 -0
  118. package/models/operations/deleteavatar.js.map +1 -0
  119. package/models/operations/index.d.ts +3 -0
  120. package/models/operations/index.d.ts.map +1 -1
  121. package/models/operations/index.js +3 -0
  122. package/models/operations/index.js.map +1 -1
  123. package/models/operations/listproductcategories.d.ts +24 -0
  124. package/models/operations/listproductcategories.d.ts.map +1 -0
  125. package/models/operations/listproductcategories.js +72 -0
  126. package/models/operations/listproductcategories.js.map +1 -0
  127. package/models/operations/listproducts.d.ts +9 -0
  128. package/models/operations/listproducts.d.ts.map +1 -1
  129. package/models/operations/listproducts.js +2 -0
  130. package/models/operations/listproducts.js.map +1 -1
  131. package/models/operations/uploadavatar.d.ts +55 -0
  132. package/models/operations/uploadavatar.d.ts.map +1 -0
  133. package/models/operations/uploadavatar.js +113 -0
  134. package/models/operations/uploadavatar.js.map +1 -0
  135. package/package.json +1 -1
  136. package/sdk/avatars.d.ts +24 -0
  137. package/sdk/avatars.d.ts.map +1 -1
  138. package/sdk/avatars.js +30 -0
  139. package/sdk/avatars.js.map +1 -1
  140. package/sdk/products.d.ts +4 -0
  141. package/sdk/products.d.ts.map +1 -1
  142. package/sdk/products.js +7 -0
  143. package/sdk/products.js.map +1 -1
  144. package/src/funcs/avatarsDelete.ts +194 -0
  145. package/src/funcs/avatarsUpload.ts +231 -0
  146. package/src/funcs/productsList.ts +1 -0
  147. package/src/funcs/productsListCategories.ts +149 -0
  148. package/src/hooks/oauth2scopes.ts +8 -0
  149. package/src/lib/config.ts +3 -4
  150. package/src/lib/http.ts +3 -1
  151. package/src/lib/security.ts +10 -5
  152. package/src/mcp-server/mcp-server.ts +1 -1
  153. package/src/mcp-server/server.ts +3 -1
  154. package/src/mcp-server/tools/productsListCategories.ts +29 -0
  155. package/src/models/components/avataruploadrequest.ts +113 -0
  156. package/src/models/components/capabilityid.ts +1 -0
  157. package/src/models/components/cardbrandfees.ts +7 -0
  158. package/src/models/components/createtransfer.ts +13 -0
  159. package/src/models/components/feepaidby.ts +32 -0
  160. package/src/models/components/filedetails.ts +1 -1
  161. package/src/models/components/filepurpose.ts +2 -2
  162. package/src/models/components/incurredfee.ts +12 -0
  163. package/src/models/components/index.ts +5 -0
  164. package/src/models/components/issuingintervallimit.ts +2 -2
  165. package/src/models/components/issuingvelocitylimit.ts +1 -1
  166. package/src/models/components/onboardinginvite.ts +1 -1
  167. package/src/models/components/paymentlinkpayoutdetails.ts +16 -0
  168. package/src/models/components/paymentlinkpayoutdetailsupdate.ts +16 -0
  169. package/src/models/components/payoutdetailserror.ts +4 -0
  170. package/src/models/components/product.ts +13 -0
  171. package/src/models/components/productcategories.ts +60 -0
  172. package/src/models/components/productcategory.ts +84 -0
  173. package/src/models/components/productrequest.ts +7 -0
  174. package/src/models/components/transferfeepaidby.ts +63 -0
  175. package/src/models/errors/productrequestvalidationerror.ts +6 -0
  176. package/src/models/operations/deleteavatar.ts +154 -0
  177. package/src/models/operations/index.ts +3 -0
  178. package/src/models/operations/listproductcategories.ts +69 -0
  179. package/src/models/operations/listproducts.ts +11 -0
  180. package/src/models/operations/uploadavatar.ts +167 -0
  181. package/src/sdk/avatars.ts +50 -0
  182. package/src/sdk/products.ts +13 -0
package/sdk/avatars.js CHANGED
@@ -4,7 +4,9 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Avatars = void 0;
7
+ const avatarsDelete_js_1 = require("../funcs/avatarsDelete.js");
7
8
  const avatarsGet_js_1 = require("../funcs/avatarsGet.js");
9
+ const avatarsUpload_js_1 = require("../funcs/avatarsUpload.js");
8
10
  const sdks_js_1 = require("../lib/sdks.js");
9
11
  const fp_js_1 = require("../types/fp.js");
10
12
  class Avatars extends sdks_js_1.ClientSDK {
@@ -17,6 +19,34 @@ class Avatars extends sdks_js_1.ClientSDK {
17
19
  async get(request, options) {
18
20
  return (0, fp_js_1.unwrapAsync)((0, avatarsGet_js_1.avatarsGet)(this, request, options));
19
21
  }
22
+ /**
23
+ * Upload a user avatar image for an account.
24
+ *
25
+ * The image will be normalized to 512x512 PNG format and stored separately from
26
+ * automatically discovered logos. User-uploaded avatars take precedence over enriched avatars at read time.
27
+ *
28
+ * This endpoint only accepts accountID values for the uniqueID parameter.
29
+ *
30
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
31
+ * you'll need to specify the `/accounts.write` scope.
32
+ */
33
+ async upload(security, request, options) {
34
+ return (0, fp_js_1.unwrapAsync)((0, avatarsUpload_js_1.avatarsUpload)(this, security, request, options));
35
+ }
36
+ /**
37
+ * Delete a user-uploaded avatar for an account.
38
+ *
39
+ * After deletion, the avatar endpoint will fall back to the enriched avatar
40
+ * or an account-type-aware fallback icon.
41
+ *
42
+ * This endpoint only accepts accountID values for the uniqueID parameter.
43
+ *
44
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
45
+ * you'll need to specify the `/accounts.write` scope.
46
+ */
47
+ async delete(security, request, options) {
48
+ return (0, fp_js_1.unwrapAsync)((0, avatarsDelete_js_1.avatarsDelete)(this, security, request, options));
49
+ }
20
50
  }
21
51
  exports.Avatars = Avatars;
22
52
  //# sourceMappingURL=avatars.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatars.js","sourceRoot":"","sources":["../src/sdk/avatars.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0DAAoD;AACpD,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,OAAQ,SAAQ,mBAAS;IACpC;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAoC,EACpC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0BAAU,EAC3B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAjBD,0BAiBC"}
1
+ {"version":3,"file":"avatars.js","sourceRoot":"","sources":["../src/sdk/avatars.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gEAA0D;AAC1D,0DAAoD;AACpD,gEAA0D;AAC1D,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,OAAQ,SAAQ,mBAAS;IACpC;;;;;OAKG;IACH,KAAK,CAAC,GAAG,CACP,OAAoC,EACpC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0BAAU,EAC3B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,MAAM,CACV,QAAyC,EACzC,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,MAAM,CACV,QAAyC,EACzC,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gCAAa,EAC9B,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAjED,0BAiEC"}
package/sdk/products.d.ts CHANGED
@@ -23,5 +23,9 @@ export declare class Products extends ClientSDK {
23
23
  * The product will no longer be available, but will remain in the system for historical and reporting purposes.
24
24
  */
25
25
  disable(request: operations.DisableProductRequest, options?: RequestOptions): Promise<operations.DisableProductResponse | undefined>;
26
+ /**
27
+ * Returns the full, read-only list of product categories from the product taxonomy.
28
+ */
29
+ listCategories(options?: RequestOptions): Promise<operations.ListProductCategoriesResponse>;
26
30
  }
27
31
  //# sourceMappingURL=products.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../src/sdk/products.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,QAAS,SAAQ,SAAS;IACrC;;OAEG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAQ3C;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;OAEG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAQzC;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;OAIG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,GAAG,SAAS,CAAC;CAO1D"}
1
+ {"version":3,"file":"products.d.ts","sourceRoot":"","sources":["../src/sdk/products.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,QAAS,SAAQ,SAAS;IACrC;;OAEG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAQ3C;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;OAEG;IACG,GAAG,CACP,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAQzC;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;OAIG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAQzD;;OAEG;IACG,cAAc,CAClB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC;CAMrD"}
package/sdk/products.js CHANGED
@@ -8,6 +8,7 @@ const productsCreate_js_1 = require("../funcs/productsCreate.js");
8
8
  const productsDisable_js_1 = require("../funcs/productsDisable.js");
9
9
  const productsGet_js_1 = require("../funcs/productsGet.js");
10
10
  const productsList_js_1 = require("../funcs/productsList.js");
11
+ const productsListCategories_js_1 = require("../funcs/productsListCategories.js");
11
12
  const productsUpdate_js_1 = require("../funcs/productsUpdate.js");
12
13
  const sdks_js_1 = require("../lib/sdks.js");
13
14
  const fp_js_1 = require("../types/fp.js");
@@ -44,6 +45,12 @@ class Products extends sdks_js_1.ClientSDK {
44
45
  async disable(request, options) {
45
46
  return (0, fp_js_1.unwrapAsync)((0, productsDisable_js_1.productsDisable)(this, request, options));
46
47
  }
48
+ /**
49
+ * Returns the full, read-only list of product categories from the product taxonomy.
50
+ */
51
+ async listCategories(options) {
52
+ return (0, fp_js_1.unwrapAsync)((0, productsListCategories_js_1.productsListCategories)(this, options));
53
+ }
47
54
  }
48
55
  exports.Products = Products;
49
56
  //# sourceMappingURL=products.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"products.js","sourceRoot":"","sources":["../src/sdk/products.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,oEAA8D;AAC9D,4DAAsD;AACtD,8DAAwD;AACxD,kEAA4D;AAC5D,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC;;OAEG;IACH,KAAK,CAAC,IAAI,CACR,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CACP,OAAqC,EACrC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4BAAW,EAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CACX,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAxED,4BAwEC"}
1
+ {"version":3,"file":"products.js","sourceRoot":"","sources":["../src/sdk/products.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,oEAA8D;AAC9D,4DAAsD;AACtD,8DAAwD;AACxD,kFAA4E;AAC5E,kEAA4D;AAC5D,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,QAAS,SAAQ,mBAAS;IACrC;;OAEG;IACH,KAAK,CAAC,IAAI,CACR,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,GAAG,CACP,OAAqC,EACrC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,4BAAW,EAC5B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,OAAwC,EACxC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CACX,OAAyC,EACzC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,oCAAe,EAChC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,cAAc,CAClB,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kDAAsB,EACvC,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AApFD,4BAoFC"}
@@ -0,0 +1,194 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { MoovCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { resolveSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { MoovError } from "../models/errors/mooverror.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+ import * as types$ from "../types/primitives.js";
29
+
30
+ /**
31
+ * Delete a user-uploaded avatar for an account.
32
+ *
33
+ * After deletion, the avatar endpoint will fall back to the enriched avatar
34
+ * or an account-type-aware fallback icon.
35
+ *
36
+ * This endpoint only accepts accountID values for the uniqueID parameter.
37
+ *
38
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
39
+ * you'll need to specify the `/accounts.write` scope.
40
+ */
41
+ export function avatarsDelete(
42
+ client: MoovCore,
43
+ security: operations.DeleteAvatarSecurity,
44
+ request: operations.DeleteAvatarRequest,
45
+ options?: RequestOptions,
46
+ ): APIPromise<
47
+ Result<
48
+ operations.DeleteAvatarResponse | undefined,
49
+ | errors.GenericError
50
+ | MoovError
51
+ | ResponseValidationError
52
+ | ConnectionError
53
+ | RequestAbortedError
54
+ | RequestTimeoutError
55
+ | InvalidRequestError
56
+ | UnexpectedClientError
57
+ | SDKValidationError
58
+ >
59
+ > {
60
+ return new APIPromise($do(
61
+ client,
62
+ security,
63
+ request,
64
+ options,
65
+ ));
66
+ }
67
+
68
+ async function $do(
69
+ client: MoovCore,
70
+ security: operations.DeleteAvatarSecurity,
71
+ request: operations.DeleteAvatarRequest,
72
+ options?: RequestOptions,
73
+ ): Promise<
74
+ [
75
+ Result<
76
+ operations.DeleteAvatarResponse | undefined,
77
+ | errors.GenericError
78
+ | MoovError
79
+ | ResponseValidationError
80
+ | ConnectionError
81
+ | RequestAbortedError
82
+ | RequestTimeoutError
83
+ | InvalidRequestError
84
+ | UnexpectedClientError
85
+ | SDKValidationError
86
+ >,
87
+ APICall,
88
+ ]
89
+ > {
90
+ const parsed = safeParse(
91
+ request,
92
+ (value) => operations.DeleteAvatarRequest$outboundSchema.parse(value),
93
+ "Input validation failed",
94
+ );
95
+ if (!parsed.ok) {
96
+ return [parsed, { status: "invalid" }];
97
+ }
98
+ const payload = parsed.value;
99
+ const body = null;
100
+
101
+ const pathParams = {
102
+ uniqueID: encodeSimple("uniqueID", payload.uniqueID, {
103
+ explode: false,
104
+ charEncoding: "percent",
105
+ }),
106
+ };
107
+ const path = pathToFunc("/avatars/{uniqueID}")(pathParams);
108
+
109
+ const headers = new Headers(compactMap({
110
+ Accept: "application/json",
111
+ }));
112
+
113
+ const requestSecurity = resolveSecurity(
114
+ [
115
+ {
116
+ type: "http:basic",
117
+ value: { username: security?.username, password: security?.password },
118
+ },
119
+ ],
120
+ );
121
+
122
+ const context = {
123
+ options: client._options,
124
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
125
+ operationID: "deleteAvatar",
126
+ oAuth2Scopes: ["/accounts.write"],
127
+
128
+ resolvedSecurity: requestSecurity,
129
+
130
+ securitySource: security,
131
+ retryConfig: options?.retries
132
+ || client._options.retryConfig
133
+ || { strategy: "none" },
134
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
135
+ };
136
+
137
+ const requestRes = client._createRequest(context, {
138
+ security: requestSecurity,
139
+ method: "DELETE",
140
+ baseURL: options?.serverURL,
141
+ path: path,
142
+ headers: headers,
143
+ body: body,
144
+ userAgent: client._options.userAgent,
145
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
146
+ }, options);
147
+ if (!requestRes.ok) {
148
+ return [requestRes, { status: "invalid" }];
149
+ }
150
+ const req = requestRes.value;
151
+
152
+ const doResult = await client._do(req, {
153
+ context,
154
+ isErrorStatusCode: (statusCode: number) =>
155
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
156
+ retryConfig: context.retryConfig,
157
+ retryCodes: context.retryCodes,
158
+ });
159
+ if (!doResult.ok) {
160
+ return [doResult, { status: "request-error", request: req }];
161
+ }
162
+ const response = doResult.value;
163
+
164
+ const responseFields = {
165
+ HttpMeta: { Response: response, Request: req },
166
+ };
167
+
168
+ const [result] = await M.match<
169
+ operations.DeleteAvatarResponse | undefined,
170
+ | errors.GenericError
171
+ | MoovError
172
+ | ResponseValidationError
173
+ | ConnectionError
174
+ | RequestAbortedError
175
+ | RequestTimeoutError
176
+ | InvalidRequestError
177
+ | UnexpectedClientError
178
+ | SDKValidationError
179
+ >(
180
+ M.nil(204, types$.optional(operations.DeleteAvatarResponse$inboundSchema), {
181
+ hdrs: true,
182
+ }),
183
+ M.jsonErr(400, errors.GenericError$inboundSchema, { hdrs: true }),
184
+ M.fail([401, 403, 404, 429]),
185
+ M.fail([500, 504]),
186
+ M.fail("4XX"),
187
+ M.fail("5XX"),
188
+ )(response, req, { extraFields: responseFields });
189
+ if (!result.ok) {
190
+ return [result, { status: "complete", request: req, response }];
191
+ }
192
+
193
+ return [result, { status: "complete", request: req, response }];
194
+ }
@@ -0,0 +1,231 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { MoovCore } from "../core.js";
6
+ import { appendForm, encodeSimple, normalizeBlob } from "../lib/encodings.js";
7
+ import {
8
+ bytesToBlob,
9
+ getContentTypeFromFileName,
10
+ readableStreamToArrayBuffer,
11
+ } from "../lib/files.js";
12
+ import { matchStatusCode } from "../lib/http.js";
13
+ import * as M from "../lib/matchers.js";
14
+ import { compactMap } from "../lib/primitives.js";
15
+ import { safeParse } from "../lib/schemas.js";
16
+ import { RequestOptions } from "../lib/sdks.js";
17
+ import { resolveSecurity } from "../lib/security.js";
18
+ import { pathToFunc } from "../lib/url.js";
19
+ import {
20
+ ConnectionError,
21
+ InvalidRequestError,
22
+ RequestAbortedError,
23
+ RequestTimeoutError,
24
+ UnexpectedClientError,
25
+ } from "../models/errors/httpclienterrors.js";
26
+ import * as errors from "../models/errors/index.js";
27
+ import { MoovError } from "../models/errors/mooverror.js";
28
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
29
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
30
+ import * as operations from "../models/operations/index.js";
31
+ import { APICall, APIPromise } from "../types/async.js";
32
+ import { isBlobLike } from "../types/blobs.js";
33
+ import { Result } from "../types/fp.js";
34
+ import * as types$ from "../types/primitives.js";
35
+ import { isReadableStream } from "../types/streams.js";
36
+
37
+ /**
38
+ * Upload a user avatar image for an account.
39
+ *
40
+ * The image will be normalized to 512x512 PNG format and stored separately from
41
+ * automatically discovered logos. User-uploaded avatars take precedence over enriched avatars at read time.
42
+ *
43
+ * This endpoint only accepts accountID values for the uniqueID parameter.
44
+ *
45
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
46
+ * you'll need to specify the `/accounts.write` scope.
47
+ */
48
+ export function avatarsUpload(
49
+ client: MoovCore,
50
+ security: operations.UploadAvatarSecurity,
51
+ request: operations.UploadAvatarRequest,
52
+ options?: RequestOptions,
53
+ ): APIPromise<
54
+ Result<
55
+ operations.UploadAvatarResponse | undefined,
56
+ | errors.GenericError
57
+ | MoovError
58
+ | ResponseValidationError
59
+ | ConnectionError
60
+ | RequestAbortedError
61
+ | RequestTimeoutError
62
+ | InvalidRequestError
63
+ | UnexpectedClientError
64
+ | SDKValidationError
65
+ >
66
+ > {
67
+ return new APIPromise($do(
68
+ client,
69
+ security,
70
+ request,
71
+ options,
72
+ ));
73
+ }
74
+
75
+ async function $do(
76
+ client: MoovCore,
77
+ security: operations.UploadAvatarSecurity,
78
+ request: operations.UploadAvatarRequest,
79
+ options?: RequestOptions,
80
+ ): Promise<
81
+ [
82
+ Result<
83
+ operations.UploadAvatarResponse | undefined,
84
+ | errors.GenericError
85
+ | MoovError
86
+ | ResponseValidationError
87
+ | ConnectionError
88
+ | RequestAbortedError
89
+ | RequestTimeoutError
90
+ | InvalidRequestError
91
+ | UnexpectedClientError
92
+ | SDKValidationError
93
+ >,
94
+ APICall,
95
+ ]
96
+ > {
97
+ const parsed = safeParse(
98
+ request,
99
+ (value) => operations.UploadAvatarRequest$outboundSchema.parse(value),
100
+ "Input validation failed",
101
+ );
102
+ if (!parsed.ok) {
103
+ return [parsed, { status: "invalid" }];
104
+ }
105
+ const payload = parsed.value;
106
+ const body = new FormData();
107
+
108
+ if (isBlobLike(payload.AvatarUploadRequest.file)) {
109
+ const file = payload.AvatarUploadRequest.file;
110
+ const blob = await normalizeBlob(file);
111
+ const name = "name" in file ? (file.name as string) : undefined;
112
+ appendForm(body, "file", blob, name);
113
+ } else if (isReadableStream(payload.AvatarUploadRequest.file.content)) {
114
+ const buffer = await readableStreamToArrayBuffer(
115
+ payload.AvatarUploadRequest.file.content,
116
+ );
117
+ const contentType =
118
+ getContentTypeFromFileName(payload.AvatarUploadRequest.file.fileName)
119
+ || "application/octet-stream";
120
+ appendForm(
121
+ body,
122
+ "file",
123
+ bytesToBlob(buffer, contentType),
124
+ payload.AvatarUploadRequest.file.fileName,
125
+ );
126
+ } else {
127
+ const contentType =
128
+ getContentTypeFromFileName(payload.AvatarUploadRequest.file.fileName)
129
+ || "application/octet-stream";
130
+ appendForm(
131
+ body,
132
+ "file",
133
+ bytesToBlob(payload.AvatarUploadRequest.file.content, contentType),
134
+ payload.AvatarUploadRequest.file.fileName,
135
+ );
136
+ }
137
+
138
+ const pathParams = {
139
+ uniqueID: encodeSimple("uniqueID", payload.uniqueID, {
140
+ explode: false,
141
+ charEncoding: "percent",
142
+ }),
143
+ };
144
+ const path = pathToFunc("/avatars/{uniqueID}")(pathParams);
145
+
146
+ const headers = new Headers(compactMap({
147
+ Accept: "application/json",
148
+ }));
149
+
150
+ const requestSecurity = resolveSecurity(
151
+ [
152
+ {
153
+ type: "http:basic",
154
+ value: { username: security?.username, password: security?.password },
155
+ },
156
+ ],
157
+ );
158
+
159
+ const context = {
160
+ options: client._options,
161
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
162
+ operationID: "uploadAvatar",
163
+ oAuth2Scopes: ["/accounts.write"],
164
+
165
+ resolvedSecurity: requestSecurity,
166
+
167
+ securitySource: security,
168
+ retryConfig: options?.retries
169
+ || client._options.retryConfig
170
+ || { strategy: "none" },
171
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
172
+ };
173
+
174
+ const requestRes = client._createRequest(context, {
175
+ security: requestSecurity,
176
+ method: "PUT",
177
+ baseURL: options?.serverURL,
178
+ path: path,
179
+ headers: headers,
180
+ body: body,
181
+ userAgent: client._options.userAgent,
182
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
183
+ }, options);
184
+ if (!requestRes.ok) {
185
+ return [requestRes, { status: "invalid" }];
186
+ }
187
+ const req = requestRes.value;
188
+
189
+ const doResult = await client._do(req, {
190
+ context,
191
+ isErrorStatusCode: (statusCode: number) =>
192
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
193
+ retryConfig: context.retryConfig,
194
+ retryCodes: context.retryCodes,
195
+ });
196
+ if (!doResult.ok) {
197
+ return [doResult, { status: "request-error", request: req }];
198
+ }
199
+ const response = doResult.value;
200
+
201
+ const responseFields = {
202
+ HttpMeta: { Response: response, Request: req },
203
+ };
204
+
205
+ const [result] = await M.match<
206
+ operations.UploadAvatarResponse | undefined,
207
+ | errors.GenericError
208
+ | MoovError
209
+ | ResponseValidationError
210
+ | ConnectionError
211
+ | RequestAbortedError
212
+ | RequestTimeoutError
213
+ | InvalidRequestError
214
+ | UnexpectedClientError
215
+ | SDKValidationError
216
+ >(
217
+ M.nil(204, types$.optional(operations.UploadAvatarResponse$inboundSchema), {
218
+ hdrs: true,
219
+ }),
220
+ M.jsonErr(400, errors.GenericError$inboundSchema, { hdrs: true }),
221
+ M.fail([401, 403, 404, 413, 415, 429]),
222
+ M.fail([500, 504]),
223
+ M.fail("4XX"),
224
+ M.fail("5XX"),
225
+ )(response, req, { extraFields: responseFields });
226
+ if (!result.ok) {
227
+ return [result, { status: "complete", request: req, response }];
228
+ }
229
+
230
+ return [result, { status: "complete", request: req, response }];
231
+ }
@@ -92,6 +92,7 @@ async function $do(
92
92
  const path = pathToFunc("/accounts/{accountID}/products")(pathParams);
93
93
 
94
94
  const query = encodeFormQuery({
95
+ "category": payload.category,
95
96
  "count": payload.count,
96
97
  "skip": payload.skip,
97
98
  "title": payload.title,
@@ -0,0 +1,149 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { MoovCore } from "../core.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import {
13
+ ConnectionError,
14
+ InvalidRequestError,
15
+ RequestAbortedError,
16
+ RequestTimeoutError,
17
+ UnexpectedClientError,
18
+ } from "../models/errors/httpclienterrors.js";
19
+ import { MoovError } from "../models/errors/mooverror.js";
20
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { APICall, APIPromise } from "../types/async.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Returns the full, read-only list of product categories from the product taxonomy.
28
+ */
29
+ export function productsListCategories(
30
+ client: MoovCore,
31
+ options?: RequestOptions,
32
+ ): APIPromise<
33
+ Result<
34
+ operations.ListProductCategoriesResponse,
35
+ | MoovError
36
+ | ResponseValidationError
37
+ | ConnectionError
38
+ | RequestAbortedError
39
+ | RequestTimeoutError
40
+ | InvalidRequestError
41
+ | UnexpectedClientError
42
+ | SDKValidationError
43
+ >
44
+ > {
45
+ return new APIPromise($do(
46
+ client,
47
+ options,
48
+ ));
49
+ }
50
+
51
+ async function $do(
52
+ client: MoovCore,
53
+ options?: RequestOptions,
54
+ ): Promise<
55
+ [
56
+ Result<
57
+ operations.ListProductCategoriesResponse,
58
+ | MoovError
59
+ | ResponseValidationError
60
+ | ConnectionError
61
+ | RequestAbortedError
62
+ | RequestTimeoutError
63
+ | InvalidRequestError
64
+ | UnexpectedClientError
65
+ | SDKValidationError
66
+ >,
67
+ APICall,
68
+ ]
69
+ > {
70
+ const path = pathToFunc("/product-categories")();
71
+
72
+ const headers = new Headers(compactMap({
73
+ Accept: "application/json",
74
+ }));
75
+
76
+ const securityInput = await extractSecurity(client._options.security);
77
+ const requestSecurity = resolveGlobalSecurity(securityInput);
78
+
79
+ const context = {
80
+ options: client._options,
81
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
82
+ operationID: "listProductCategories",
83
+ oAuth2Scopes: null,
84
+
85
+ resolvedSecurity: requestSecurity,
86
+
87
+ securitySource: client._options.security,
88
+ retryConfig: options?.retries
89
+ || client._options.retryConfig
90
+ || { strategy: "none" },
91
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
92
+ };
93
+
94
+ const requestRes = client._createRequest(context, {
95
+ security: requestSecurity,
96
+ method: "GET",
97
+ baseURL: options?.serverURL,
98
+ path: path,
99
+ headers: headers,
100
+ userAgent: client._options.userAgent,
101
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
102
+ }, options);
103
+ if (!requestRes.ok) {
104
+ return [requestRes, { status: "invalid" }];
105
+ }
106
+ const req = requestRes.value;
107
+
108
+ const doResult = await client._do(req, {
109
+ context,
110
+ isErrorStatusCode: (statusCode: number) =>
111
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
112
+ retryConfig: context.retryConfig,
113
+ retryCodes: context.retryCodes,
114
+ });
115
+ if (!doResult.ok) {
116
+ return [doResult, { status: "request-error", request: req }];
117
+ }
118
+ const response = doResult.value;
119
+
120
+ const responseFields = {
121
+ HttpMeta: { Response: response, Request: req },
122
+ };
123
+
124
+ const [result] = await M.match<
125
+ operations.ListProductCategoriesResponse,
126
+ | MoovError
127
+ | ResponseValidationError
128
+ | ConnectionError
129
+ | RequestAbortedError
130
+ | RequestTimeoutError
131
+ | InvalidRequestError
132
+ | UnexpectedClientError
133
+ | SDKValidationError
134
+ >(
135
+ M.json(200, operations.ListProductCategoriesResponse$inboundSchema, {
136
+ hdrs: true,
137
+ key: "Result",
138
+ }),
139
+ M.fail([401, 403, 429]),
140
+ M.fail([500, 504]),
141
+ M.fail("4XX"),
142
+ M.fail("5XX"),
143
+ )(response, req, { extraFields: responseFields });
144
+ if (!result.ok) {
145
+ return [result, { status: "complete", request: req, response }];
146
+ }
147
+
148
+ return [result, { status: "complete", request: req, response }];
149
+ }
@@ -0,0 +1,8 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ /**
6
+ * Available scopes for the OAuth2Auth OAuth 2.0 scheme (clientCredentials flow).
7
+ */
8
+ export type OAuth2AuthOAuth2Scope = "/accounts.write";