@moovio/sdk 0.0.0-dev.25 → 0.0.0-dev.27

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 (224) hide show
  1. package/README.md +93 -61
  2. package/bin/mcp-server.js +1542 -997
  3. package/bin/mcp-server.js.map +51 -36
  4. package/funcs/bankAccountsLink.d.ts +1 -1
  5. package/funcs/bankAccountsLink.js +1 -1
  6. package/funcs/depositViewCreate.d.ts +22 -0
  7. package/funcs/depositViewCreate.d.ts.map +1 -0
  8. package/funcs/depositViewCreate.js +136 -0
  9. package/funcs/depositViewCreate.js.map +1 -0
  10. package/funcs/transfersGetRiskOutcomes.d.ts +19 -0
  11. package/funcs/transfersGetRiskOutcomes.d.ts.map +1 -0
  12. package/funcs/transfersGetRiskOutcomes.js +131 -0
  13. package/funcs/transfersGetRiskOutcomes.js.map +1 -0
  14. package/jsr.json +1 -1
  15. package/lib/config.d.ts +3 -3
  16. package/lib/config.js +3 -3
  17. package/lib/http.d.ts +1 -1
  18. package/lib/http.d.ts.map +1 -1
  19. package/lib/http.js +1 -1
  20. package/lib/http.js.map +1 -1
  21. package/lib/security.d.ts +5 -4
  22. package/lib/security.d.ts.map +1 -1
  23. package/lib/security.js +6 -7
  24. package/lib/security.js.map +1 -1
  25. package/mcp-server/mcp-server.js +1 -1
  26. package/mcp-server/server.d.ts.map +1 -1
  27. package/mcp-server/server.js +5 -1
  28. package/mcp-server/server.js.map +1 -1
  29. package/mcp-server/tools/bankAccountsLink.js +1 -1
  30. package/mcp-server/tools/depositViewCreate.d.ts +8 -0
  31. package/mcp-server/tools/depositViewCreate.d.ts.map +1 -0
  32. package/mcp-server/tools/depositViewCreate.js +69 -0
  33. package/mcp-server/tools/depositViewCreate.js.map +1 -0
  34. package/mcp-server/tools/transfersGetRiskOutcomes.d.ts +8 -0
  35. package/mcp-server/tools/transfersGetRiskOutcomes.d.ts.map +1 -0
  36. package/mcp-server/tools/transfersGetRiskOutcomes.js +67 -0
  37. package/mcp-server/tools/transfersGetRiskOutcomes.js.map +1 -0
  38. package/models/components/capabilityid.d.ts +1 -0
  39. package/models/components/capabilityid.d.ts.map +1 -1
  40. package/models/components/capabilityid.js +1 -0
  41. package/models/components/capabilityid.js.map +1 -1
  42. package/models/components/cardbrandfees.d.ts +5 -0
  43. package/models/components/cardbrandfees.d.ts.map +1 -1
  44. package/models/components/cardbrandfees.js +2 -0
  45. package/models/components/cardbrandfees.js.map +1 -1
  46. package/models/components/cardtransactiondetails.d.ts +3 -1
  47. package/models/components/cardtransactiondetails.d.ts.map +1 -1
  48. package/models/components/cardtransactiondetails.js +2 -0
  49. package/models/components/cardtransactiondetails.js.map +1 -1
  50. package/models/components/contributingrule.d.ts +23 -0
  51. package/models/components/contributingrule.d.ts.map +1 -0
  52. package/models/components/contributingrule.js +59 -0
  53. package/models/components/contributingrule.js.map +1 -0
  54. package/models/components/createtransferdestinationcard.d.ts +1 -1
  55. package/models/components/depositaccountingestedresponse.d.ts +39 -0
  56. package/models/components/depositaccountingestedresponse.d.ts.map +1 -0
  57. package/models/components/depositaccountingestedresponse.js +66 -0
  58. package/models/components/depositaccountingestedresponse.js.map +1 -0
  59. package/models/components/filedetails.d.ts +1 -1
  60. package/models/components/filepurpose.d.ts +2 -2
  61. package/models/components/filepurpose.js +1 -1
  62. package/models/components/fullissuedcard.d.ts +1 -3
  63. package/models/components/fullissuedcard.d.ts.map +1 -1
  64. package/models/components/fullissuedcard.js.map +1 -1
  65. package/models/components/index.d.ts +8 -0
  66. package/models/components/index.d.ts.map +1 -1
  67. package/models/components/index.js +8 -0
  68. package/models/components/index.js.map +1 -1
  69. package/models/components/invoice.d.ts +5 -0
  70. package/models/components/invoice.d.ts.map +1 -1
  71. package/models/components/invoice.js +2 -0
  72. package/models/components/invoice.js.map +1 -1
  73. package/models/components/issuedcard.d.ts +1 -3
  74. package/models/components/issuedcard.d.ts.map +1 -1
  75. package/models/components/issuedcard.js.map +1 -1
  76. package/models/components/issuedcardstate.d.ts +2 -8
  77. package/models/components/issuedcardstate.d.ts.map +1 -1
  78. package/models/components/issuedcardstate.js +1 -5
  79. package/models/components/issuedcardstate.js.map +1 -1
  80. package/models/components/manualtermsofservice.d.ts +1 -1
  81. package/models/components/manualtermsofserviceupdate.d.ts +1 -1
  82. package/models/components/onboardinginvite.d.ts +1 -1
  83. package/models/components/partnerriskoutcomesresponse.d.ts +33 -0
  84. package/models/components/partnerriskoutcomesresponse.d.ts.map +1 -0
  85. package/models/components/partnerriskoutcomesresponse.js +62 -0
  86. package/models/components/partnerriskoutcomesresponse.js.map +1 -0
  87. package/models/components/patchtransfer.d.ts +5 -2
  88. package/models/components/patchtransfer.d.ts.map +1 -1
  89. package/models/components/patchtransfer.js +2 -2
  90. package/models/components/patchtransfer.js.map +1 -1
  91. package/models/components/patchwallet.d.ts +4 -7
  92. package/models/components/patchwallet.d.ts.map +1 -1
  93. package/models/components/patchwallet.js +4 -4
  94. package/models/components/patchwallet.js.map +1 -1
  95. package/models/components/paymentlinkpayoutdetails.d.ts +11 -0
  96. package/models/components/paymentlinkpayoutdetails.d.ts.map +1 -1
  97. package/models/components/paymentlinkpayoutdetails.js +3 -0
  98. package/models/components/paymentlinkpayoutdetails.js.map +1 -1
  99. package/models/components/paymentlinkpayoutdetailsupdate.d.ts +11 -0
  100. package/models/components/paymentlinkpayoutdetailsupdate.d.ts.map +1 -1
  101. package/models/components/paymentlinkpayoutdetailsupdate.js +3 -0
  102. package/models/components/paymentlinkpayoutdetailsupdate.js.map +1 -1
  103. package/models/components/paymentmethodscard.d.ts +8 -0
  104. package/models/components/paymentmethodscard.d.ts.map +1 -1
  105. package/models/components/paymentmethodscard.js +2 -0
  106. package/models/components/paymentmethodscard.js.map +1 -1
  107. package/models/components/payoutdetailserror.d.ts +3 -0
  108. package/models/components/payoutdetailserror.d.ts.map +1 -1
  109. package/models/components/payoutdetailserror.js +3 -0
  110. package/models/components/payoutdetailserror.js.map +1 -1
  111. package/models/components/pushdeliveryspeed.d.ts +18 -0
  112. package/models/components/pushdeliveryspeed.d.ts.map +1 -0
  113. package/models/components/pushdeliveryspeed.js +52 -0
  114. package/models/components/pushdeliveryspeed.js.map +1 -0
  115. package/models/components/pushoptions.d.ts +35 -0
  116. package/models/components/pushoptions.d.ts.map +1 -0
  117. package/models/components/pushoptions.js +62 -0
  118. package/models/components/pushoptions.js.map +1 -0
  119. package/models/components/pushoptionserror.d.ts +19 -0
  120. package/models/components/pushoptionserror.d.ts.map +1 -0
  121. package/models/components/pushoptionserror.js +61 -0
  122. package/models/components/pushoptionserror.js.map +1 -0
  123. package/models/components/pushoptionsupdate.d.ts +35 -0
  124. package/models/components/pushoptionsupdate.d.ts.map +1 -0
  125. package/models/components/pushoptionsupdate.js +62 -0
  126. package/models/components/pushoptionsupdate.js.map +1 -0
  127. package/models/components/sourcesystem.d.ts +29 -0
  128. package/models/components/sourcesystem.d.ts.map +1 -0
  129. package/models/components/sourcesystem.js +58 -0
  130. package/models/components/sourcesystem.js.map +1 -0
  131. package/models/components/termsofservice.d.ts +1 -1
  132. package/models/components/updatepaymentlinkamountdetails.d.ts +60 -5
  133. package/models/components/updatepaymentlinkamountdetails.d.ts.map +1 -1
  134. package/models/components/updatepaymentlinkamountdetails.js +43 -6
  135. package/models/components/updatepaymentlinkamountdetails.js.map +1 -1
  136. package/models/errors/depositaccountvalidationerror.d.ts +41 -0
  137. package/models/errors/depositaccountvalidationerror.d.ts.map +1 -0
  138. package/models/errors/depositaccountvalidationerror.js +81 -0
  139. package/models/errors/depositaccountvalidationerror.js.map +1 -0
  140. package/models/errors/index.d.ts +1 -0
  141. package/models/errors/index.d.ts.map +1 -1
  142. package/models/errors/index.js +1 -0
  143. package/models/errors/index.js.map +1 -1
  144. package/models/operations/createdepositaccount.d.ts +44 -0
  145. package/models/operations/createdepositaccount.d.ts.map +1 -0
  146. package/models/operations/createdepositaccount.js +113 -0
  147. package/models/operations/createdepositaccount.js.map +1 -0
  148. package/models/operations/gettransferriskoutcomes.d.ts +48 -0
  149. package/models/operations/gettransferriskoutcomes.d.ts.map +1 -0
  150. package/models/operations/gettransferriskoutcomes.js +99 -0
  151. package/models/operations/gettransferriskoutcomes.js.map +1 -0
  152. package/models/operations/index.d.ts +2 -0
  153. package/models/operations/index.d.ts.map +1 -1
  154. package/models/operations/index.js +2 -0
  155. package/models/operations/index.js.map +1 -1
  156. package/models/operations/linkbankaccount.d.ts +1 -1
  157. package/models/operations/listissuedcards.d.ts +1 -1
  158. package/package.json +1 -1
  159. package/sdk/bankaccounts.d.ts +1 -1
  160. package/sdk/bankaccounts.js +1 -1
  161. package/sdk/depositview.d.ts +16 -0
  162. package/sdk/depositview.d.ts.map +1 -0
  163. package/sdk/depositview.js +26 -0
  164. package/sdk/depositview.js.map +1 -0
  165. package/sdk/sdk.d.ts +3 -0
  166. package/sdk/sdk.d.ts.map +1 -1
  167. package/sdk/sdk.js +4 -0
  168. package/sdk/sdk.js.map +1 -1
  169. package/sdk/transfers.d.ts +9 -0
  170. package/sdk/transfers.d.ts.map +1 -1
  171. package/sdk/transfers.js +12 -0
  172. package/sdk/transfers.js.map +1 -1
  173. package/src/funcs/bankAccountsLink.ts +1 -1
  174. package/src/funcs/depositViewCreate.ts +201 -0
  175. package/src/funcs/transfersGetRiskOutcomes.ts +182 -0
  176. package/src/lib/config.ts +3 -3
  177. package/src/lib/http.ts +3 -1
  178. package/src/lib/security.ts +10 -5
  179. package/src/mcp-server/mcp-server.ts +1 -1
  180. package/src/mcp-server/server.ts +5 -1
  181. package/src/mcp-server/tools/bankAccountsLink.ts +1 -1
  182. package/src/mcp-server/tools/depositViewCreate.ts +43 -0
  183. package/src/mcp-server/tools/transfersGetRiskOutcomes.ts +41 -0
  184. package/src/models/components/capabilityid.ts +1 -0
  185. package/src/models/components/cardbrandfees.ts +7 -0
  186. package/src/models/components/cardtransactiondetails.ts +5 -1
  187. package/src/models/components/contributingrule.ts +58 -0
  188. package/src/models/components/createtransferdestinationcard.ts +1 -1
  189. package/src/models/components/depositaccountingestedresponse.ts +86 -0
  190. package/src/models/components/filedetails.ts +1 -1
  191. package/src/models/components/filepurpose.ts +2 -2
  192. package/src/models/components/fullissuedcard.ts +1 -3
  193. package/src/models/components/index.ts +8 -0
  194. package/src/models/components/invoice.ts +7 -0
  195. package/src/models/components/issuedcard.ts +1 -3
  196. package/src/models/components/issuedcardstate.ts +2 -8
  197. package/src/models/components/manualtermsofservice.ts +1 -1
  198. package/src/models/components/manualtermsofserviceupdate.ts +1 -1
  199. package/src/models/components/onboardinginvite.ts +1 -1
  200. package/src/models/components/partnerriskoutcomesresponse.ts +77 -0
  201. package/src/models/components/patchtransfer.ts +7 -4
  202. package/src/models/components/patchwallet.ts +8 -11
  203. package/src/models/components/paymentlinkpayoutdetails.ts +18 -0
  204. package/src/models/components/paymentlinkpayoutdetailsupdate.ts +18 -0
  205. package/src/models/components/paymentmethodscard.ts +10 -0
  206. package/src/models/components/payoutdetailserror.ts +10 -0
  207. package/src/models/components/pushdeliveryspeed.ts +32 -0
  208. package/src/models/components/pushoptions.ts +72 -0
  209. package/src/models/components/pushoptionserror.ts +56 -0
  210. package/src/models/components/pushoptionsupdate.ts +76 -0
  211. package/src/models/components/sourcesystem.ts +43 -0
  212. package/src/models/components/termsofservice.ts +1 -1
  213. package/src/models/components/updatepaymentlinkamountdetails.ts +114 -14
  214. package/src/models/errors/depositaccountvalidationerror.ts +86 -0
  215. package/src/models/errors/index.ts +1 -0
  216. package/src/models/operations/createdepositaccount.ts +146 -0
  217. package/src/models/operations/gettransferriskoutcomes.ts +136 -0
  218. package/src/models/operations/index.ts +2 -0
  219. package/src/models/operations/linkbankaccount.ts +1 -1
  220. package/src/models/operations/listissuedcards.ts +1 -1
  221. package/src/sdk/bankaccounts.ts +1 -1
  222. package/src/sdk/depositview.ts +31 -0
  223. package/src/sdk/sdk.ts +6 -0
  224. package/src/sdk/transfers.ts +20 -0
@@ -18,6 +18,12 @@ import {
18
18
  PayoutRecipient$Outbound,
19
19
  PayoutRecipient$outboundSchema,
20
20
  } from "./payoutrecipient.js";
21
+ import {
22
+ PushOptionsUpdate,
23
+ PushOptionsUpdate$inboundSchema,
24
+ PushOptionsUpdate$Outbound,
25
+ PushOptionsUpdate$outboundSchema,
26
+ } from "./pushoptionsupdate.js";
21
27
 
22
28
  export type PaymentLinkPayoutDetailsUpdate = {
23
29
  /**
@@ -37,6 +43,15 @@ export type PaymentLinkPayoutDetailsUpdate = {
37
43
  * Optional free-form metadata for the transfer.
38
44
  */
39
45
  metadata?: { [k: string]: string } | undefined;
46
+ /**
47
+ * Delivery options for push-to-card payouts. Only applies when `allowedMethods` includes `push-to-card`.
48
+ *
49
+ * @remarks
50
+ *
51
+ * The `deferred` speed and `deferredBy` apply to `push-to-card` only. Other push methods
52
+ * (`push-to-apple-pay`, `push-to-google-pay`) are always delivered instantly regardless of these options.
53
+ */
54
+ pushOptions?: PushOptionsUpdate | undefined;
40
55
  };
41
56
 
42
57
  /** @internal */
@@ -50,12 +65,14 @@ export const PaymentLinkPayoutDetailsUpdate$inboundSchema: z.ZodType<
50
65
  ),
51
66
  recipient: types.optional(PayoutRecipient$inboundSchema),
52
67
  metadata: types.optional(z.record(types.string())),
68
+ pushOptions: types.optional(PushOptionsUpdate$inboundSchema),
53
69
  });
54
70
  /** @internal */
55
71
  export type PaymentLinkPayoutDetailsUpdate$Outbound = {
56
72
  allowedMethods?: Array<string> | undefined;
57
73
  recipient?: PayoutRecipient$Outbound | undefined;
58
74
  metadata?: { [k: string]: string } | undefined;
75
+ pushOptions?: PushOptionsUpdate$Outbound | undefined;
59
76
  };
60
77
 
61
78
  /** @internal */
@@ -68,6 +85,7 @@ export const PaymentLinkPayoutDetailsUpdate$outboundSchema: z.ZodType<
68
85
  .optional(),
69
86
  recipient: PayoutRecipient$outboundSchema.optional(),
70
87
  metadata: z.record(z.string()).optional(),
88
+ pushOptions: PushOptionsUpdate$outboundSchema.optional(),
71
89
  });
72
90
 
73
91
  export function paymentLinkPayoutDetailsUpdateToJSON(
@@ -131,6 +131,13 @@ export type PaymentMethodsCard = {
131
131
  * Indicates if the card supports domestic pull-from-card transfer.
132
132
  */
133
133
  domesticPullFromCard?: DomesticPullFromCard | undefined;
134
+ /**
135
+ * The category or level of the card defined by the issuer.
136
+ *
137
+ * @remarks
138
+ * Examples include, but not limited to, "REWARDS", "TRADITIONAL REWARDS", "CLASSIC", and "CORPORATE PURCHASING".
139
+ */
140
+ cardCategory?: string | undefined;
134
141
  };
135
142
 
136
143
  /** @internal */
@@ -156,6 +163,7 @@ export const PaymentMethodsCard$inboundSchema: z.ZodType<
156
163
  cardAccountUpdater: types.optional(CardAccountUpdater$inboundSchema),
157
164
  domesticPushToCard: types.optional(DomesticPushToCard$inboundSchema),
158
165
  domesticPullFromCard: types.optional(DomesticPullFromCard$inboundSchema),
166
+ cardCategory: types.optional(types.string()),
159
167
  });
160
168
  /** @internal */
161
169
  export type PaymentMethodsCard$Outbound = {
@@ -176,6 +184,7 @@ export type PaymentMethodsCard$Outbound = {
176
184
  cardAccountUpdater?: CardAccountUpdater$Outbound | undefined;
177
185
  domesticPushToCard?: string | undefined;
178
186
  domesticPullFromCard?: string | undefined;
187
+ cardCategory?: string | undefined;
179
188
  };
180
189
 
181
190
  /** @internal */
@@ -201,6 +210,7 @@ export const PaymentMethodsCard$outboundSchema: z.ZodType<
201
210
  cardAccountUpdater: CardAccountUpdater$outboundSchema.optional(),
202
211
  domesticPushToCard: DomesticPushToCard$outboundSchema.optional(),
203
212
  domesticPullFromCard: DomesticPullFromCard$outboundSchema.optional(),
213
+ cardCategory: z.string().optional(),
204
214
  });
205
215
 
206
216
  export function paymentMethodsCardToJSON(
@@ -13,11 +13,18 @@ import {
13
13
  PayoutRecipientError$Outbound,
14
14
  PayoutRecipientError$outboundSchema,
15
15
  } from "./payoutrecipienterror.js";
16
+ import {
17
+ PushOptionsError,
18
+ PushOptionsError$inboundSchema,
19
+ PushOptionsError$Outbound,
20
+ PushOptionsError$outboundSchema,
21
+ } from "./pushoptionserror.js";
16
22
 
17
23
  export type PayoutDetailsError = {
18
24
  allowedMethods?: string | undefined;
19
25
  recipient?: PayoutRecipientError | undefined;
20
26
  metadata?: string | undefined;
27
+ pushOptions?: PushOptionsError | undefined;
21
28
  };
22
29
 
23
30
  /** @internal */
@@ -29,12 +36,14 @@ export const PayoutDetailsError$inboundSchema: z.ZodType<
29
36
  allowedMethods: types.optional(types.string()),
30
37
  recipient: types.optional(PayoutRecipientError$inboundSchema),
31
38
  metadata: types.optional(types.string()),
39
+ pushOptions: types.optional(PushOptionsError$inboundSchema),
32
40
  });
33
41
  /** @internal */
34
42
  export type PayoutDetailsError$Outbound = {
35
43
  allowedMethods?: string | undefined;
36
44
  recipient?: PayoutRecipientError$Outbound | undefined;
37
45
  metadata?: string | undefined;
46
+ pushOptions?: PushOptionsError$Outbound | undefined;
38
47
  };
39
48
 
40
49
  /** @internal */
@@ -46,6 +55,7 @@ export const PayoutDetailsError$outboundSchema: z.ZodType<
46
55
  allowedMethods: z.string().optional(),
47
56
  recipient: PayoutRecipientError$outboundSchema.optional(),
48
57
  metadata: z.string().optional(),
58
+ pushOptions: PushOptionsError$outboundSchema.optional(),
49
59
  });
50
60
 
51
61
  export function payoutDetailsErrorToJSON(
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import * as openEnums from "../../types/enums.js";
7
+ import { OpenEnum } from "../../types/enums.js";
8
+
9
+ /**
10
+ * Delivery speed options for push-to-card payouts.
11
+ */
12
+ export const PushDeliverySpeed = {
13
+ Instant: "instant",
14
+ Deferred: "deferred",
15
+ } as const;
16
+ /**
17
+ * Delivery speed options for push-to-card payouts.
18
+ */
19
+ export type PushDeliverySpeed = OpenEnum<typeof PushDeliverySpeed>;
20
+
21
+ /** @internal */
22
+ export const PushDeliverySpeed$inboundSchema: z.ZodType<
23
+ PushDeliverySpeed,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = openEnums.inboundSchema(PushDeliverySpeed);
27
+ /** @internal */
28
+ export const PushDeliverySpeed$outboundSchema: z.ZodType<
29
+ string,
30
+ z.ZodTypeDef,
31
+ PushDeliverySpeed
32
+ > = openEnums.outboundSchema(PushDeliverySpeed);
@@ -0,0 +1,72 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ PushDeliverySpeed,
12
+ PushDeliverySpeed$inboundSchema,
13
+ PushDeliverySpeed$outboundSchema,
14
+ } from "./pushdeliveryspeed.js";
15
+
16
+ /**
17
+ * Delivery options for push-to-card payouts.
18
+ */
19
+ export type PushOptions = {
20
+ /**
21
+ * Delivery speeds the recipient may choose from for `push-to-card`. Include `instant` to allow immediate
22
+ *
23
+ * @remarks
24
+ * delivery, `deferred` to allow delayed delivery, or both to let the recipient choose at checkout.
25
+ */
26
+ allowedSpeeds: Array<PushDeliverySpeed>;
27
+ /**
28
+ * Delay before delivering a deferred `push-to-card` payout. Required when `allowedSpeeds` includes `deferred`.
29
+ *
30
+ * @remarks
31
+ * Accepted values are `24h` or `48h`.
32
+ */
33
+ deferredBy?: string | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const PushOptions$inboundSchema: z.ZodType<
38
+ PushOptions,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.object({
42
+ allowedSpeeds: z.array(PushDeliverySpeed$inboundSchema),
43
+ deferredBy: types.optional(types.string()),
44
+ });
45
+ /** @internal */
46
+ export type PushOptions$Outbound = {
47
+ allowedSpeeds: Array<string>;
48
+ deferredBy?: string | undefined;
49
+ };
50
+
51
+ /** @internal */
52
+ export const PushOptions$outboundSchema: z.ZodType<
53
+ PushOptions$Outbound,
54
+ z.ZodTypeDef,
55
+ PushOptions
56
+ > = z.object({
57
+ allowedSpeeds: z.array(PushDeliverySpeed$outboundSchema),
58
+ deferredBy: z.string().optional(),
59
+ });
60
+
61
+ export function pushOptionsToJSON(pushOptions: PushOptions): string {
62
+ return JSON.stringify(PushOptions$outboundSchema.parse(pushOptions));
63
+ }
64
+ export function pushOptionsFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<PushOptions, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => PushOptions$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'PushOptions' from JSON`,
71
+ );
72
+ }
@@ -0,0 +1,56 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type PushOptionsError = {
12
+ allowedSpeeds?: string | undefined;
13
+ deferredBy?: string | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export const PushOptionsError$inboundSchema: z.ZodType<
18
+ PushOptionsError,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ allowedSpeeds: types.optional(types.string()),
23
+ deferredBy: types.optional(types.string()),
24
+ });
25
+ /** @internal */
26
+ export type PushOptionsError$Outbound = {
27
+ allowedSpeeds?: string | undefined;
28
+ deferredBy?: string | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export const PushOptionsError$outboundSchema: z.ZodType<
33
+ PushOptionsError$Outbound,
34
+ z.ZodTypeDef,
35
+ PushOptionsError
36
+ > = z.object({
37
+ allowedSpeeds: z.string().optional(),
38
+ deferredBy: z.string().optional(),
39
+ });
40
+
41
+ export function pushOptionsErrorToJSON(
42
+ pushOptionsError: PushOptionsError,
43
+ ): string {
44
+ return JSON.stringify(
45
+ PushOptionsError$outboundSchema.parse(pushOptionsError),
46
+ );
47
+ }
48
+ export function pushOptionsErrorFromJSON(
49
+ jsonString: string,
50
+ ): SafeParseResult<PushOptionsError, SDKValidationError> {
51
+ return safeParse(
52
+ jsonString,
53
+ (x) => PushOptionsError$inboundSchema.parse(JSON.parse(x)),
54
+ `Failed to parse 'PushOptionsError' from JSON`,
55
+ );
56
+ }
@@ -0,0 +1,76 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ PushDeliverySpeed,
12
+ PushDeliverySpeed$inboundSchema,
13
+ PushDeliverySpeed$outboundSchema,
14
+ } from "./pushdeliveryspeed.js";
15
+
16
+ /**
17
+ * Delivery options for push-to-card payouts.
18
+ */
19
+ export type PushOptionsUpdate = {
20
+ /**
21
+ * Delivery speeds the recipient may choose from for `push-to-card`. Include `instant` to allow immediate
22
+ *
23
+ * @remarks
24
+ * delivery, `deferred` to allow delayed delivery, or both to let the recipient choose at checkout.
25
+ */
26
+ allowedSpeeds?: Array<PushDeliverySpeed> | undefined;
27
+ /**
28
+ * Delay before delivering a deferred `push-to-card` payout. Required when `allowedSpeeds` includes `deferred`.
29
+ *
30
+ * @remarks
31
+ * Accepted values are `24h` or `48h`.
32
+ */
33
+ deferredBy?: string | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const PushOptionsUpdate$inboundSchema: z.ZodType<
38
+ PushOptionsUpdate,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.object({
42
+ allowedSpeeds: types.optional(z.array(PushDeliverySpeed$inboundSchema)),
43
+ deferredBy: types.optional(types.string()),
44
+ });
45
+ /** @internal */
46
+ export type PushOptionsUpdate$Outbound = {
47
+ allowedSpeeds?: Array<string> | undefined;
48
+ deferredBy?: string | undefined;
49
+ };
50
+
51
+ /** @internal */
52
+ export const PushOptionsUpdate$outboundSchema: z.ZodType<
53
+ PushOptionsUpdate$Outbound,
54
+ z.ZodTypeDef,
55
+ PushOptionsUpdate
56
+ > = z.object({
57
+ allowedSpeeds: z.array(PushDeliverySpeed$outboundSchema).optional(),
58
+ deferredBy: z.string().optional(),
59
+ });
60
+
61
+ export function pushOptionsUpdateToJSON(
62
+ pushOptionsUpdate: PushOptionsUpdate,
63
+ ): string {
64
+ return JSON.stringify(
65
+ PushOptionsUpdate$outboundSchema.parse(pushOptionsUpdate),
66
+ );
67
+ }
68
+ export function pushOptionsUpdateFromJSON(
69
+ jsonString: string,
70
+ ): SafeParseResult<PushOptionsUpdate, SDKValidationError> {
71
+ return safeParse(
72
+ jsonString,
73
+ (x) => PushOptionsUpdate$inboundSchema.parse(JSON.parse(x)),
74
+ `Failed to parse 'PushOptionsUpdate' from JSON`,
75
+ );
76
+ }
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import * as openEnums from "../../types/enums.js";
7
+ import { OpenEnum } from "../../types/enums.js";
8
+
9
+ /**
10
+ * Identifies the core banking source system that produced the deposit account payload.
11
+ *
12
+ * @remarks
13
+ *
14
+ * The expected format of the request body depends on this value, so it must be supplied
15
+ * in the `X-Source-System` header on every request.
16
+ */
17
+ export const SourceSystem = {
18
+ JhSilverlake: "jh_silverlake",
19
+ JhCif2020: "jh_cif2020",
20
+ JhCoredirector: "jh_coredirector",
21
+ } as const;
22
+ /**
23
+ * Identifies the core banking source system that produced the deposit account payload.
24
+ *
25
+ * @remarks
26
+ *
27
+ * The expected format of the request body depends on this value, so it must be supplied
28
+ * in the `X-Source-System` header on every request.
29
+ */
30
+ export type SourceSystem = OpenEnum<typeof SourceSystem>;
31
+
32
+ /** @internal */
33
+ export const SourceSystem$inboundSchema: z.ZodType<
34
+ SourceSystem,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = openEnums.inboundSchema(SourceSystem);
38
+ /** @internal */
39
+ export const SourceSystem$outboundSchema: z.ZodType<
40
+ string,
41
+ z.ZodTypeDef,
42
+ SourceSystem
43
+ > = openEnums.outboundSchema(SourceSystem);
@@ -17,7 +17,7 @@ export type TermsOfService = {
17
17
  */
18
18
  acceptedDate: Date;
19
19
  /**
20
- * The IP address from which the terms of service were accepted.
20
+ * The IP address (IPv4 or IPv6) from which the terms of service were accepted.
21
21
  */
22
22
  acceptedIP: string;
23
23
  };
@@ -7,37 +7,137 @@ import { safeParse } from "../../lib/schemas.js";
7
7
  import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import * as types from "../../types/primitives.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- AmountDecimalUpdate,
12
- AmountDecimalUpdate$inboundSchema,
13
- AmountDecimalUpdate$Outbound,
14
- AmountDecimalUpdate$outboundSchema,
15
- } from "./amountdecimalupdate.js";
10
+
11
+ /**
12
+ * The amount of tax applied to the payment link.
13
+ */
14
+ export type Tax = {
15
+ /**
16
+ * A 3-letter ISO 4217 currency code.
17
+ */
18
+ currency?: string | undefined;
19
+ /**
20
+ * A decimal-formatted numerical string that represents up to 9 decimal place precision.
21
+ *
22
+ * @remarks
23
+ *
24
+ * For example, $12.987654321 is '12.987654321'.
25
+ */
26
+ valueDecimal?: string | undefined;
27
+ };
28
+
29
+ /**
30
+ * The amount of surcharge applied to the payment link.
31
+ */
32
+ export type Surcharge = {
33
+ /**
34
+ * A 3-letter ISO 4217 currency code.
35
+ */
36
+ currency?: string | undefined;
37
+ /**
38
+ * A decimal-formatted numerical string that represents up to 9 decimal place precision.
39
+ *
40
+ * @remarks
41
+ *
42
+ * For example, $12.987654321 is '12.987654321'.
43
+ */
44
+ valueDecimal?: string | undefined;
45
+ };
16
46
 
17
47
  export type UpdatePaymentLinkAmountDetails = {
18
48
  /**
19
49
  * The amount of tax applied to the payment link.
20
50
  */
21
- tax?: AmountDecimalUpdate | undefined;
51
+ tax?: Tax | null | undefined;
22
52
  /**
23
53
  * The amount of surcharge applied to the payment link.
24
54
  */
25
- surcharge?: AmountDecimalUpdate | undefined;
55
+ surcharge?: Surcharge | null | undefined;
56
+ };
57
+
58
+ /** @internal */
59
+ export const Tax$inboundSchema: z.ZodType<Tax, z.ZodTypeDef, unknown> = z
60
+ .object({
61
+ currency: types.optional(types.string()),
62
+ valueDecimal: types.optional(types.string()),
63
+ });
64
+ /** @internal */
65
+ export type Tax$Outbound = {
66
+ currency?: string | undefined;
67
+ valueDecimal?: string | undefined;
26
68
  };
27
69
 
70
+ /** @internal */
71
+ export const Tax$outboundSchema: z.ZodType<Tax$Outbound, z.ZodTypeDef, Tax> = z
72
+ .object({
73
+ currency: z.string().optional(),
74
+ valueDecimal: z.string().optional(),
75
+ });
76
+
77
+ export function taxToJSON(tax: Tax): string {
78
+ return JSON.stringify(Tax$outboundSchema.parse(tax));
79
+ }
80
+ export function taxFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<Tax, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => Tax$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'Tax' from JSON`,
87
+ );
88
+ }
89
+
90
+ /** @internal */
91
+ export const Surcharge$inboundSchema: z.ZodType<
92
+ Surcharge,
93
+ z.ZodTypeDef,
94
+ unknown
95
+ > = z.object({
96
+ currency: types.optional(types.string()),
97
+ valueDecimal: types.optional(types.string()),
98
+ });
99
+ /** @internal */
100
+ export type Surcharge$Outbound = {
101
+ currency?: string | undefined;
102
+ valueDecimal?: string | undefined;
103
+ };
104
+
105
+ /** @internal */
106
+ export const Surcharge$outboundSchema: z.ZodType<
107
+ Surcharge$Outbound,
108
+ z.ZodTypeDef,
109
+ Surcharge
110
+ > = z.object({
111
+ currency: z.string().optional(),
112
+ valueDecimal: z.string().optional(),
113
+ });
114
+
115
+ export function surchargeToJSON(surcharge: Surcharge): string {
116
+ return JSON.stringify(Surcharge$outboundSchema.parse(surcharge));
117
+ }
118
+ export function surchargeFromJSON(
119
+ jsonString: string,
120
+ ): SafeParseResult<Surcharge, SDKValidationError> {
121
+ return safeParse(
122
+ jsonString,
123
+ (x) => Surcharge$inboundSchema.parse(JSON.parse(x)),
124
+ `Failed to parse 'Surcharge' from JSON`,
125
+ );
126
+ }
127
+
28
128
  /** @internal */
29
129
  export const UpdatePaymentLinkAmountDetails$inboundSchema: z.ZodType<
30
130
  UpdatePaymentLinkAmountDetails,
31
131
  z.ZodTypeDef,
32
132
  unknown
33
133
  > = z.object({
34
- tax: types.optional(AmountDecimalUpdate$inboundSchema),
35
- surcharge: types.optional(AmountDecimalUpdate$inboundSchema),
134
+ tax: z.nullable(z.lazy(() => Tax$inboundSchema)).optional(),
135
+ surcharge: z.nullable(z.lazy(() => Surcharge$inboundSchema)).optional(),
36
136
  });
37
137
  /** @internal */
38
138
  export type UpdatePaymentLinkAmountDetails$Outbound = {
39
- tax?: AmountDecimalUpdate$Outbound | undefined;
40
- surcharge?: AmountDecimalUpdate$Outbound | undefined;
139
+ tax?: Tax$Outbound | null | undefined;
140
+ surcharge?: Surcharge$Outbound | null | undefined;
41
141
  };
42
142
 
43
143
  /** @internal */
@@ -46,8 +146,8 @@ export const UpdatePaymentLinkAmountDetails$outboundSchema: z.ZodType<
46
146
  z.ZodTypeDef,
47
147
  UpdatePaymentLinkAmountDetails
48
148
  > = z.object({
49
- tax: AmountDecimalUpdate$outboundSchema.optional(),
50
- surcharge: AmountDecimalUpdate$outboundSchema.optional(),
149
+ tax: z.nullable(z.lazy(() => Tax$outboundSchema)).optional(),
150
+ surcharge: z.nullable(z.lazy(() => Surcharge$outboundSchema)).optional(),
51
151
  });
52
152
 
53
153
  export function updatePaymentLinkAmountDetailsToJSON(
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import * as types from "../../types/primitives.js";
7
+ import { MoovError } from "./mooverror.js";
8
+
9
+ /**
10
+ * Descriptions of any field validations that failed while parsing the deposit account payload.
11
+ */
12
+ export type DepositAccountValidationErrorData = {
13
+ /**
14
+ * An error describing why the X-Source-System header was missing or unsupported.
15
+ */
16
+ sourceSystem?: string | undefined;
17
+ /**
18
+ * An error describing why the request body could not be parsed for the given source system.
19
+ */
20
+ body?: string | undefined;
21
+ };
22
+
23
+ /**
24
+ * Descriptions of any field validations that failed while parsing the deposit account payload.
25
+ */
26
+ export class DepositAccountValidationError extends MoovError {
27
+ /**
28
+ * An error describing why the X-Source-System header was missing or unsupported.
29
+ */
30
+ sourceSystem?: string | undefined;
31
+
32
+ /** The original data that was passed to this error instance. */
33
+ data$: DepositAccountValidationErrorData;
34
+
35
+ constructor(
36
+ err: DepositAccountValidationErrorData,
37
+ httpMeta: { response: Response; request: Request; body: string },
38
+ ) {
39
+ const message = "message" in err && typeof err.message === "string"
40
+ ? err.message
41
+ : `API error occurred: ${JSON.stringify(err)}`;
42
+ super(message, httpMeta);
43
+ this.data$ = err;
44
+ if (err.sourceSystem != null) this.sourceSystem = err.sourceSystem;
45
+
46
+ this.name = "DepositAccountValidationError";
47
+ }
48
+ }
49
+
50
+ /** @internal */
51
+ export const DepositAccountValidationError$inboundSchema: z.ZodType<
52
+ DepositAccountValidationError,
53
+ z.ZodTypeDef,
54
+ unknown
55
+ > = z.object({
56
+ sourceSystem: types.optional(types.string()),
57
+ body: types.optional(types.string()),
58
+ request$: z.instanceof(Request),
59
+ response$: z.instanceof(Response),
60
+ body$: z.string(),
61
+ })
62
+ .transform((v) => {
63
+ return new DepositAccountValidationError(v, {
64
+ request: v.request$,
65
+ response: v.response$,
66
+ body: v.body$,
67
+ });
68
+ });
69
+
70
+ /** @internal */
71
+ export type DepositAccountValidationError$Outbound = {
72
+ sourceSystem?: string | undefined;
73
+ body?: string | undefined;
74
+ };
75
+
76
+ /** @internal */
77
+ export const DepositAccountValidationError$outboundSchema: z.ZodType<
78
+ DepositAccountValidationError$Outbound,
79
+ z.ZodTypeDef,
80
+ DepositAccountValidationError
81
+ > = z.instanceof(DepositAccountValidationError)
82
+ .transform(v => v.data$)
83
+ .pipe(z.object({
84
+ sourceSystem: z.string().optional(),
85
+ body: z.string().optional(),
86
+ }));
@@ -21,6 +21,7 @@ export * from "./createsweepconfigerror.js";
21
21
  export * from "./createticketerror.js";
22
22
  export * from "./createwalletvalidationerror.js";
23
23
  export * from "./createwebhookvalidationerror.js";
24
+ export * from "./depositaccountvalidationerror.js";
24
25
  export * from "./duplicatecarderror.js";
25
26
  export * from "./feeplanagreementerror.js";
26
27
  export * from "./fileuploadvalidationerror.js";