@moovio/sdk 0.21.15 → 0.21.17

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 (218) hide show
  1. package/README.md +44 -46
  2. package/bin/mcp-server.js +302 -289
  3. package/bin/mcp-server.js.map +50 -47
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/imagesUpdate.d.ts +1 -2
  6. package/funcs/imagesUpdate.d.ts.map +1 -1
  7. package/funcs/imagesUpdate.js +12 -13
  8. package/funcs/imagesUpdate.js.map +1 -1
  9. package/jsr.json +1 -1
  10. package/lib/config.d.ts +3 -3
  11. package/lib/config.js +3 -3
  12. package/lib/encodings.d.ts.map +1 -1
  13. package/lib/encodings.js +3 -1
  14. package/lib/encodings.js.map +1 -1
  15. package/mcp-server/mcp-server.js +1 -1
  16. package/mcp-server/server.js +1 -1
  17. package/mcp-server/tools/accountsUpdate.js +1 -1
  18. package/mcp-server/tools/applePayUpdateMerchantDomains.js +3 -3
  19. package/mcp-server/tools/brandingUpdate.js +1 -1
  20. package/mcp-server/tools/cardIssuingUpdate.js +1 -1
  21. package/mcp-server/tools/cardsUpdate.js +6 -6
  22. package/mcp-server/tools/imagesUpdate.d.ts.map +1 -1
  23. package/mcp-server/tools/imagesUpdate.js +1 -2
  24. package/mcp-server/tools/imagesUpdate.js.map +1 -1
  25. package/mcp-server/tools/paymentLinksUpdate.js +1 -1
  26. package/mcp-server/tools/representativesUpdate.js +2 -2
  27. package/mcp-server/tools/supportUpdateTicket.js +1 -1
  28. package/mcp-server/tools/sweepsUpdateConfig.js +1 -1
  29. package/mcp-server/tools/transfersUpdate.js +3 -3
  30. package/mcp-server/tools/walletsUpdate.js +1 -1
  31. package/models/components/createevidencefilemultipart.d.ts +1 -1
  32. package/models/components/createpaymentlink.d.ts +3 -5
  33. package/models/components/createpaymentlink.d.ts.map +1 -1
  34. package/models/components/createpaymentlink.js +3 -3
  35. package/models/components/createpaymentlink.js.map +1 -1
  36. package/models/components/createpaymentlinklineitem.d.ts +50 -0
  37. package/models/components/createpaymentlinklineitem.d.ts.map +1 -0
  38. package/models/components/createpaymentlinklineitem.js +70 -0
  39. package/models/components/createpaymentlinklineitem.js.map +1 -0
  40. package/models/components/createpaymentlinklineitemoption.d.ts +44 -0
  41. package/models/components/createpaymentlinklineitemoption.d.ts.map +1 -0
  42. package/models/components/createpaymentlinklineitemoption.js +67 -0
  43. package/models/components/createpaymentlinklineitemoption.js.map +1 -0
  44. package/models/components/createpaymentlinklineitemoptionvalidationerror.d.ts +24 -0
  45. package/models/components/createpaymentlinklineitemoptionvalidationerror.d.ts.map +1 -0
  46. package/models/components/{paymentlinklineitemoptionvalidationerror.js → createpaymentlinklineitemoptionvalidationerror.js} +10 -10
  47. package/models/components/createpaymentlinklineitemoptionvalidationerror.js.map +1 -0
  48. package/models/components/createpaymentlinklineitems.d.ts +27 -0
  49. package/models/components/createpaymentlinklineitems.d.ts.map +1 -0
  50. package/models/components/{paymentlinklineitemsupdate.js → createpaymentlinklineitems.js} +13 -13
  51. package/models/components/createpaymentlinklineitems.js.map +1 -0
  52. package/models/components/createpaymentlinklineitemsupdate.d.ts +27 -0
  53. package/models/components/createpaymentlinklineitemsupdate.d.ts.map +1 -0
  54. package/models/components/{paymentlinklineitemsvalidationerror.js → createpaymentlinklineitemsupdate.js} +13 -13
  55. package/models/components/createpaymentlinklineitemsupdate.js.map +1 -0
  56. package/models/components/createpaymentlinklineitemsvalidationerror.d.ts +22 -0
  57. package/models/components/createpaymentlinklineitemsvalidationerror.d.ts.map +1 -0
  58. package/models/components/createpaymentlinklineitemsvalidationerror.js +61 -0
  59. package/models/components/createpaymentlinklineitemsvalidationerror.js.map +1 -0
  60. package/models/components/createpaymentlinklineitemvalidationerror.d.ts +31 -0
  61. package/models/components/createpaymentlinklineitemvalidationerror.d.ts.map +1 -0
  62. package/models/components/{paymentlinklineitemvalidationerror.js → createpaymentlinklineitemvalidationerror.js} +13 -15
  63. package/models/components/createpaymentlinklineitemvalidationerror.js.map +1 -0
  64. package/models/components/fileuploadrequestmultipart.d.ts +1 -4
  65. package/models/components/fileuploadrequestmultipart.d.ts.map +1 -1
  66. package/models/components/fileuploadrequestmultipart.js.map +1 -1
  67. package/models/components/imageuploadrequestmultipart.d.ts +3 -3
  68. package/models/components/imageuploadrequestmultipart.d.ts.map +1 -1
  69. package/models/components/index.d.ts +8 -5
  70. package/models/components/index.d.ts.map +1 -1
  71. package/models/components/index.js +8 -5
  72. package/models/components/index.js.map +1 -1
  73. package/models/components/invoicepayment.d.ts.map +1 -1
  74. package/models/components/invoicepayment.js +4 -12
  75. package/models/components/invoicepayment.js.map +1 -1
  76. package/models/components/patchsweepconfig.d.ts +6 -60
  77. package/models/components/patchsweepconfig.d.ts.map +1 -1
  78. package/models/components/patchsweepconfig.js +7 -79
  79. package/models/components/patchsweepconfig.js.map +1 -1
  80. package/models/components/paymentlinklineitem.d.ts +6 -0
  81. package/models/components/paymentlinklineitem.d.ts.map +1 -1
  82. package/models/components/paymentlinklineitem.js +3 -0
  83. package/models/components/paymentlinklineitem.js.map +1 -1
  84. package/models/components/paymentlinklineitemimagemetadata.d.ts +35 -0
  85. package/models/components/paymentlinklineitemimagemetadata.d.ts.map +1 -0
  86. package/models/components/paymentlinklineitemimagemetadata.js +64 -0
  87. package/models/components/paymentlinklineitemimagemetadata.js.map +1 -0
  88. package/models/components/paymentlinklineitemoption.d.ts +6 -0
  89. package/models/components/paymentlinklineitemoption.d.ts.map +1 -1
  90. package/models/components/paymentlinklineitemoption.js +3 -0
  91. package/models/components/paymentlinklineitemoption.js.map +1 -1
  92. package/models/components/paymentmethod.d.ts.map +1 -1
  93. package/models/components/paymentmethod.js +24 -34
  94. package/models/components/paymentmethod.js.map +1 -1
  95. package/models/components/updatepaymentlink.d.ts +3 -3
  96. package/models/components/updatepaymentlink.d.ts.map +1 -1
  97. package/models/components/updatepaymentlink.js +3 -3
  98. package/models/components/updatepaymentlink.js.map +1 -1
  99. package/models/components/updaterepresentative.d.ts +2 -20
  100. package/models/components/updaterepresentative.d.ts.map +1 -1
  101. package/models/components/updaterepresentative.js +3 -32
  102. package/models/components/updaterepresentative.js.map +1 -1
  103. package/models/errors/createpaymentlinkerror.d.ts +3 -3
  104. package/models/errors/createpaymentlinkerror.d.ts.map +1 -1
  105. package/models/errors/createpaymentlinkerror.js +3 -3
  106. package/models/errors/createpaymentlinkerror.js.map +1 -1
  107. package/models/errors/updatepaymentlinkerror.d.ts +3 -3
  108. package/models/errors/updatepaymentlinkerror.d.ts.map +1 -1
  109. package/models/errors/updatepaymentlinkerror.js +3 -3
  110. package/models/errors/updatepaymentlinkerror.js.map +1 -1
  111. package/models/operations/createpaymentlink.d.ts +3 -0
  112. package/models/operations/createpaymentlink.d.ts.map +1 -1
  113. package/models/operations/createpaymentlink.js.map +1 -1
  114. package/models/operations/disablepaymentlink.d.ts +3 -0
  115. package/models/operations/disablepaymentlink.d.ts.map +1 -1
  116. package/models/operations/disablepaymentlink.js.map +1 -1
  117. package/models/operations/getpaymentlink.d.ts +3 -0
  118. package/models/operations/getpaymentlink.d.ts.map +1 -1
  119. package/models/operations/getpaymentlink.js.map +1 -1
  120. package/models/operations/getpaymentlinkqrcode.d.ts +3 -0
  121. package/models/operations/getpaymentlinkqrcode.d.ts.map +1 -1
  122. package/models/operations/getpaymentlinkqrcode.js.map +1 -1
  123. package/models/operations/listpaymentlinks.d.ts +3 -0
  124. package/models/operations/listpaymentlinks.d.ts.map +1 -1
  125. package/models/operations/listpaymentlinks.js.map +1 -1
  126. package/models/operations/updateimage.d.ts +2 -2
  127. package/models/operations/updateimage.js +4 -4
  128. package/models/operations/updatepaymentlink.d.ts +3 -0
  129. package/models/operations/updatepaymentlink.d.ts.map +1 -1
  130. package/models/operations/updatepaymentlink.js.map +1 -1
  131. package/package.json +1 -1
  132. package/sdk/images.d.ts +1 -2
  133. package/sdk/images.d.ts.map +1 -1
  134. package/sdk/images.js +1 -2
  135. package/sdk/images.js.map +1 -1
  136. package/src/funcs/imagesUpdate.ts +12 -13
  137. package/src/lib/config.ts +3 -3
  138. package/src/lib/encodings.ts +4 -3
  139. package/src/mcp-server/mcp-server.ts +1 -1
  140. package/src/mcp-server/server.ts +1 -1
  141. package/src/mcp-server/tools/accountsUpdate.ts +1 -1
  142. package/src/mcp-server/tools/applePayUpdateMerchantDomains.ts +3 -3
  143. package/src/mcp-server/tools/brandingUpdate.ts +1 -1
  144. package/src/mcp-server/tools/cardIssuingUpdate.ts +1 -1
  145. package/src/mcp-server/tools/cardsUpdate.ts +6 -6
  146. package/src/mcp-server/tools/imagesUpdate.ts +1 -2
  147. package/src/mcp-server/tools/paymentLinksUpdate.ts +1 -1
  148. package/src/mcp-server/tools/representativesUpdate.ts +2 -2
  149. package/src/mcp-server/tools/supportUpdateTicket.ts +1 -1
  150. package/src/mcp-server/tools/sweepsUpdateConfig.ts +1 -1
  151. package/src/mcp-server/tools/transfersUpdate.ts +3 -3
  152. package/src/mcp-server/tools/walletsUpdate.ts +1 -1
  153. package/src/models/components/createevidencefilemultipart.ts +1 -1
  154. package/src/models/components/createpaymentlink.ts +10 -12
  155. package/src/models/components/createpaymentlinklineitem.ts +104 -0
  156. package/src/models/components/createpaymentlinklineitemoption.ts +93 -0
  157. package/src/models/components/createpaymentlinklineitemoptionvalidationerror.ts +80 -0
  158. package/src/models/components/createpaymentlinklineitems.ts +66 -0
  159. package/src/models/components/createpaymentlinklineitemsupdate.ts +68 -0
  160. package/src/models/components/createpaymentlinklineitemsvalidationerror.ts +71 -0
  161. package/src/models/components/createpaymentlinklineitemvalidationerror.ts +96 -0
  162. package/src/models/components/fileuploadrequestmultipart.ts +1 -4
  163. package/src/models/components/imageuploadrequestmultipart.ts +3 -3
  164. package/src/models/components/index.ts +8 -5
  165. package/src/models/components/invoicepayment.ts +4 -12
  166. package/src/models/components/patchsweepconfig.ts +12 -252
  167. package/src/models/components/paymentlinklineitem.ts +13 -0
  168. package/src/models/components/paymentlinklineitemimagemetadata.ts +77 -0
  169. package/src/models/components/paymentlinklineitemoption.ts +13 -0
  170. package/src/models/components/paymentmethod.ts +24 -70
  171. package/src/models/components/updatepaymentlink.ts +10 -10
  172. package/src/models/components/updaterepresentative.ts +4 -59
  173. package/src/models/errors/createpaymentlinkerror.ts +6 -6
  174. package/src/models/errors/updatepaymentlinkerror.ts +6 -6
  175. package/src/models/operations/createpaymentlink.ts +3 -0
  176. package/src/models/operations/disablepaymentlink.ts +3 -0
  177. package/src/models/operations/getpaymentlink.ts +3 -0
  178. package/src/models/operations/getpaymentlinkqrcode.ts +3 -0
  179. package/src/models/operations/listpaymentlinks.ts +3 -0
  180. package/src/models/operations/updateimage.ts +8 -8
  181. package/src/models/operations/updatepaymentlink.ts +3 -0
  182. package/src/sdk/images.ts +1 -2
  183. package/src/types/enums.ts +1 -21
  184. package/src/types/index.ts +2 -1
  185. package/src/types/unrecognized.ts +27 -0
  186. package/types/enums.d.ts +1 -8
  187. package/types/enums.d.ts.map +1 -1
  188. package/types/enums.js +3 -21
  189. package/types/enums.js.map +1 -1
  190. package/types/index.d.ts +2 -1
  191. package/types/index.d.ts.map +1 -1
  192. package/types/index.js +15 -0
  193. package/types/index.js.map +1 -1
  194. package/types/unrecognized.d.ts +10 -0
  195. package/types/unrecognized.d.ts.map +1 -0
  196. package/types/unrecognized.js +26 -0
  197. package/types/unrecognized.js.map +1 -0
  198. package/models/components/imageupdaterequestmultipart.d.ts +0 -67
  199. package/models/components/imageupdaterequestmultipart.d.ts.map +0 -1
  200. package/models/components/imageupdaterequestmultipart.js +0 -105
  201. package/models/components/imageupdaterequestmultipart.js.map +0 -1
  202. package/models/components/paymentlinklineitemoptionvalidationerror.d.ts +0 -24
  203. package/models/components/paymentlinklineitemoptionvalidationerror.d.ts.map +0 -1
  204. package/models/components/paymentlinklineitemoptionvalidationerror.js.map +0 -1
  205. package/models/components/paymentlinklineitemsupdate.d.ts +0 -27
  206. package/models/components/paymentlinklineitemsupdate.d.ts.map +0 -1
  207. package/models/components/paymentlinklineitemsupdate.js.map +0 -1
  208. package/models/components/paymentlinklineitemsvalidationerror.d.ts +0 -22
  209. package/models/components/paymentlinklineitemsvalidationerror.d.ts.map +0 -1
  210. package/models/components/paymentlinklineitemsvalidationerror.js.map +0 -1
  211. package/models/components/paymentlinklineitemvalidationerror.d.ts +0 -31
  212. package/models/components/paymentlinklineitemvalidationerror.d.ts.map +0 -1
  213. package/models/components/paymentlinklineitemvalidationerror.js.map +0 -1
  214. package/src/models/components/imageupdaterequestmultipart.ts +0 -178
  215. package/src/models/components/paymentlinklineitemoptionvalidationerror.ts +0 -78
  216. package/src/models/components/paymentlinklineitemsupdate.ts +0 -66
  217. package/src/models/components/paymentlinklineitemsvalidationerror.ts +0 -62
  218. package/src/models/components/paymentlinklineitemvalidationerror.ts +0 -88
@@ -12,6 +12,12 @@ import {
12
12
  AmountDecimal$Outbound,
13
13
  AmountDecimal$outboundSchema,
14
14
  } from "./amountdecimal.js";
15
+ import {
16
+ PaymentLinkLineItemImageMetadata,
17
+ PaymentLinkLineItemImageMetadata$inboundSchema,
18
+ PaymentLinkLineItemImageMetadata$Outbound,
19
+ PaymentLinkLineItemImageMetadata$outboundSchema,
20
+ } from "./paymentlinklineitemimagemetadata.js";
15
21
 
16
22
  /**
17
23
  * Represents a modifier or option applied to a line item.
@@ -29,6 +35,10 @@ export type PaymentLinkLineItemOption = {
29
35
  * Optional price modification applied by this option. Can be positive, negative, or zero.
30
36
  */
31
37
  priceModifier?: AmountDecimal | undefined;
38
+ /**
39
+ * Optional list of images associated with this line item option.
40
+ */
41
+ images?: Array<PaymentLinkLineItemImageMetadata> | undefined;
32
42
  /**
33
43
  * Optional group identifier to categorize related options (e.g., 'toppings').
34
44
  */
@@ -44,6 +54,7 @@ export const PaymentLinkLineItemOption$inboundSchema: z.ZodType<
44
54
  name: z.string(),
45
55
  quantity: z.number().int(),
46
56
  priceModifier: AmountDecimal$inboundSchema.optional(),
57
+ images: z.array(PaymentLinkLineItemImageMetadata$inboundSchema).optional(),
47
58
  group: z.string().optional(),
48
59
  });
49
60
  /** @internal */
@@ -51,6 +62,7 @@ export type PaymentLinkLineItemOption$Outbound = {
51
62
  name: string;
52
63
  quantity: number;
53
64
  priceModifier?: AmountDecimal$Outbound | undefined;
65
+ images?: Array<PaymentLinkLineItemImageMetadata$Outbound> | undefined;
54
66
  group?: string | undefined;
55
67
  };
56
68
 
@@ -63,6 +75,7 @@ export const PaymentLinkLineItemOption$outboundSchema: z.ZodType<
63
75
  name: z.string(),
64
76
  quantity: z.number().int(),
65
77
  priceModifier: AmountDecimal$outboundSchema.optional(),
78
+ images: z.array(PaymentLinkLineItemImageMetadata$outboundSchema).optional(),
66
79
  group: z.string().optional(),
67
80
  });
68
81
 
@@ -111,63 +111,40 @@ export const PaymentMethod$inboundSchema: z.ZodType<
111
111
  unknown
112
112
  > = z.union([
113
113
  MoovWalletPaymentMethod$inboundSchema.and(
114
- z.object({ paymentMethodType: z.literal("moov-wallet") }).transform((
115
- v,
116
- ) => ({ paymentMethodType: v.paymentMethodType })),
114
+ z.object({ paymentMethodType: z.literal("moov-wallet") }),
117
115
  ),
118
116
  AchDebitFundPaymentMethod$inboundSchema.and(
119
- z.object({ paymentMethodType: z.literal("ach-debit-fund") }).transform((
120
- v,
121
- ) => ({ paymentMethodType: v.paymentMethodType })),
117
+ z.object({ paymentMethodType: z.literal("ach-debit-fund") }),
122
118
  ),
123
119
  AchDebitCollectPaymentMethod$inboundSchema.and(
124
- z.object({ paymentMethodType: z.literal("ach-debit-collect") }).transform((
125
- v,
126
- ) => ({ paymentMethodType: v.paymentMethodType })),
120
+ z.object({ paymentMethodType: z.literal("ach-debit-collect") }),
127
121
  ),
128
122
  AchCreditStandardPaymentMethod$inboundSchema.and(
129
- z.object({ paymentMethodType: z.literal("ach-credit-standard") }).transform(
130
- (v) => ({ paymentMethodType: v.paymentMethodType })
131
- ),
123
+ z.object({ paymentMethodType: z.literal("ach-credit-standard") }),
132
124
  ),
133
125
  AchCreditSameDayPaymentMethod$inboundSchema.and(
134
- z.object({ paymentMethodType: z.literal("ach-credit-same-day") }).transform(
135
- (v) => ({ paymentMethodType: v.paymentMethodType })
136
- ),
126
+ z.object({ paymentMethodType: z.literal("ach-credit-same-day") }),
137
127
  ),
138
128
  RtpCreditPaymentMethod$inboundSchema.and(
139
- z.object({ paymentMethodType: z.literal("rtp-credit") }).transform((v) => ({
140
- paymentMethodType: v.paymentMethodType,
141
- })),
129
+ z.object({ paymentMethodType: z.literal("rtp-credit") }),
142
130
  ),
143
131
  CardPaymentPaymentMethod$inboundSchema.and(
144
- z.object({ paymentMethodType: z.literal("card-payment") }).transform((
145
- v,
146
- ) => ({ paymentMethodType: v.paymentMethodType })),
132
+ z.object({ paymentMethodType: z.literal("card-payment") }),
147
133
  ),
148
134
  PushToCardPaymentMethod$inboundSchema.and(
149
- z.object({ paymentMethodType: z.literal("push-to-card") }).transform((
150
- v,
151
- ) => ({ paymentMethodType: v.paymentMethodType })),
135
+ z.object({ paymentMethodType: z.literal("push-to-card") }),
152
136
  ),
153
137
  PullFromCardPaymentMethod$inboundSchema.and(
154
- z.object({ paymentMethodType: z.literal("pull-from-card") }).transform((
155
- v,
156
- ) => ({ paymentMethodType: v.paymentMethodType })),
138
+ z.object({ paymentMethodType: z.literal("pull-from-card") }),
157
139
  ),
158
140
  ApplePayPaymentMethod$inboundSchema.and(
159
- z.object({ paymentMethodType: z.literal("apple-pay") }).transform((v) => ({
160
- paymentMethodType: v.paymentMethodType,
161
- })),
141
+ z.object({ paymentMethodType: z.literal("apple-pay") }),
162
142
  ),
163
143
  InstantBankCreditPaymentMethod$inboundSchema.and(
164
- z.object({ paymentMethodType: z.literal("instant-bank-credit") }).transform(
165
- (v) => ({ paymentMethodType: v.paymentMethodType })
166
- ),
144
+ z.object({ paymentMethodType: z.literal("instant-bank-credit") }),
167
145
  ),
168
146
  CardPresentPaymentPaymentMethod$inboundSchema.and(
169
- z.object({ paymentMethodType: z.literal("card-present-payment") })
170
- .transform((v) => ({ paymentMethodType: v.paymentMethodType })),
147
+ z.object({ paymentMethodType: z.literal("card-present-payment") }),
171
148
  ),
172
149
  ]);
173
150
  /** @internal */
@@ -206,63 +183,40 @@ export const PaymentMethod$outboundSchema: z.ZodType<
206
183
  PaymentMethod
207
184
  > = z.union([
208
185
  MoovWalletPaymentMethod$outboundSchema.and(
209
- z.object({ paymentMethodType: z.literal("moov-wallet") }).transform((
210
- v,
211
- ) => ({ paymentMethodType: v.paymentMethodType })),
186
+ z.object({ paymentMethodType: z.literal("moov-wallet") }),
212
187
  ),
213
188
  AchDebitFundPaymentMethod$outboundSchema.and(
214
- z.object({ paymentMethodType: z.literal("ach-debit-fund") }).transform((
215
- v,
216
- ) => ({ paymentMethodType: v.paymentMethodType })),
189
+ z.object({ paymentMethodType: z.literal("ach-debit-fund") }),
217
190
  ),
218
191
  AchDebitCollectPaymentMethod$outboundSchema.and(
219
- z.object({ paymentMethodType: z.literal("ach-debit-collect") }).transform((
220
- v,
221
- ) => ({ paymentMethodType: v.paymentMethodType })),
192
+ z.object({ paymentMethodType: z.literal("ach-debit-collect") }),
222
193
  ),
223
194
  AchCreditStandardPaymentMethod$outboundSchema.and(
224
- z.object({ paymentMethodType: z.literal("ach-credit-standard") }).transform(
225
- (v) => ({ paymentMethodType: v.paymentMethodType })
226
- ),
195
+ z.object({ paymentMethodType: z.literal("ach-credit-standard") }),
227
196
  ),
228
197
  AchCreditSameDayPaymentMethod$outboundSchema.and(
229
- z.object({ paymentMethodType: z.literal("ach-credit-same-day") }).transform(
230
- (v) => ({ paymentMethodType: v.paymentMethodType })
231
- ),
198
+ z.object({ paymentMethodType: z.literal("ach-credit-same-day") }),
232
199
  ),
233
200
  RtpCreditPaymentMethod$outboundSchema.and(
234
- z.object({ paymentMethodType: z.literal("rtp-credit") }).transform((v) => ({
235
- paymentMethodType: v.paymentMethodType,
236
- })),
201
+ z.object({ paymentMethodType: z.literal("rtp-credit") }),
237
202
  ),
238
203
  CardPaymentPaymentMethod$outboundSchema.and(
239
- z.object({ paymentMethodType: z.literal("card-payment") }).transform((
240
- v,
241
- ) => ({ paymentMethodType: v.paymentMethodType })),
204
+ z.object({ paymentMethodType: z.literal("card-payment") }),
242
205
  ),
243
206
  PushToCardPaymentMethod$outboundSchema.and(
244
- z.object({ paymentMethodType: z.literal("push-to-card") }).transform((
245
- v,
246
- ) => ({ paymentMethodType: v.paymentMethodType })),
207
+ z.object({ paymentMethodType: z.literal("push-to-card") }),
247
208
  ),
248
209
  PullFromCardPaymentMethod$outboundSchema.and(
249
- z.object({ paymentMethodType: z.literal("pull-from-card") }).transform((
250
- v,
251
- ) => ({ paymentMethodType: v.paymentMethodType })),
210
+ z.object({ paymentMethodType: z.literal("pull-from-card") }),
252
211
  ),
253
212
  ApplePayPaymentMethod$outboundSchema.and(
254
- z.object({ paymentMethodType: z.literal("apple-pay") }).transform((v) => ({
255
- paymentMethodType: v.paymentMethodType,
256
- })),
213
+ z.object({ paymentMethodType: z.literal("apple-pay") }),
257
214
  ),
258
215
  InstantBankCreditPaymentMethod$outboundSchema.and(
259
- z.object({ paymentMethodType: z.literal("instant-bank-credit") }).transform(
260
- (v) => ({ paymentMethodType: v.paymentMethodType })
261
- ),
216
+ z.object({ paymentMethodType: z.literal("instant-bank-credit") }),
262
217
  ),
263
218
  CardPresentPaymentPaymentMethod$outboundSchema.and(
264
- z.object({ paymentMethodType: z.literal("card-present-payment") })
265
- .transform((v) => ({ paymentMethodType: v.paymentMethodType })),
219
+ z.object({ paymentMethodType: z.literal("card-present-payment") }),
266
220
  ),
267
221
  ]);
268
222
 
@@ -12,6 +12,12 @@ import {
12
12
  AmountUpdate$Outbound,
13
13
  AmountUpdate$outboundSchema,
14
14
  } from "./amountupdate.js";
15
+ import {
16
+ CreatePaymentLinkLineItemsUpdate,
17
+ CreatePaymentLinkLineItemsUpdate$inboundSchema,
18
+ CreatePaymentLinkLineItemsUpdate$Outbound,
19
+ CreatePaymentLinkLineItemsUpdate$outboundSchema,
20
+ } from "./createpaymentlinklineitemsupdate.js";
15
21
  import {
16
22
  PaymentLinkCustomerOptions,
17
23
  PaymentLinkCustomerOptions$inboundSchema,
@@ -24,12 +30,6 @@ import {
24
30
  PaymentLinkDisplayOptionsUpdate$Outbound,
25
31
  PaymentLinkDisplayOptionsUpdate$outboundSchema,
26
32
  } from "./paymentlinkdisplayoptionsupdate.js";
27
- import {
28
- PaymentLinkLineItemsUpdate,
29
- PaymentLinkLineItemsUpdate$inboundSchema,
30
- PaymentLinkLineItemsUpdate$Outbound,
31
- PaymentLinkLineItemsUpdate$outboundSchema,
32
- } from "./paymentlinklineitemsupdate.js";
33
33
  import {
34
34
  PaymentLinkPaymentDetailsUpdate,
35
35
  PaymentLinkPaymentDetailsUpdate$inboundSchema,
@@ -62,7 +62,7 @@ export type UpdatePaymentLink = {
62
62
  * @remarks
63
63
  * When line items are provided, their total plus sales tax must equal the payment link amount.
64
64
  */
65
- lineItems?: PaymentLinkLineItemsUpdate | undefined;
65
+ lineItems?: CreatePaymentLinkLineItemsUpdate | undefined;
66
66
  };
67
67
 
68
68
  /** @internal */
@@ -79,7 +79,7 @@ export const UpdatePaymentLink$inboundSchema: z.ZodType<
79
79
  customer: PaymentLinkCustomerOptions$inboundSchema.optional(),
80
80
  payment: PaymentLinkPaymentDetailsUpdate$inboundSchema.optional(),
81
81
  payout: PaymentLinkPayoutDetailsUpdate$inboundSchema.optional(),
82
- lineItems: PaymentLinkLineItemsUpdate$inboundSchema.optional(),
82
+ lineItems: CreatePaymentLinkLineItemsUpdate$inboundSchema.optional(),
83
83
  });
84
84
  /** @internal */
85
85
  export type UpdatePaymentLink$Outbound = {
@@ -89,7 +89,7 @@ export type UpdatePaymentLink$Outbound = {
89
89
  customer?: PaymentLinkCustomerOptions$Outbound | undefined;
90
90
  payment?: PaymentLinkPaymentDetailsUpdate$Outbound | undefined;
91
91
  payout?: PaymentLinkPayoutDetailsUpdate$Outbound | undefined;
92
- lineItems?: PaymentLinkLineItemsUpdate$Outbound | undefined;
92
+ lineItems?: CreatePaymentLinkLineItemsUpdate$Outbound | undefined;
93
93
  };
94
94
 
95
95
  /** @internal */
@@ -104,7 +104,7 @@ export const UpdatePaymentLink$outboundSchema: z.ZodType<
104
104
  customer: PaymentLinkCustomerOptions$outboundSchema.optional(),
105
105
  payment: PaymentLinkPaymentDetailsUpdate$outboundSchema.optional(),
106
106
  payout: PaymentLinkPayoutDetailsUpdate$outboundSchema.optional(),
107
- lineItems: PaymentLinkLineItemsUpdate$outboundSchema.optional(),
107
+ lineItems: CreatePaymentLinkLineItemsUpdate$outboundSchema.optional(),
108
108
  });
109
109
 
110
110
  export function updatePaymentLinkToJSON(
@@ -18,10 +18,6 @@ export type Phone = {
18
18
  countryCode?: string | undefined;
19
19
  };
20
20
 
21
- export type Two = {};
22
-
23
- export type Email = string | Two;
24
-
25
21
  export type UpdateRepresentativeAddress = {
26
22
  addressLine1?: string | undefined;
27
23
  addressLine2?: string | undefined;
@@ -77,7 +73,7 @@ export type Responsibilities = {
77
73
  export type UpdateRepresentative = {
78
74
  name?: IndividualNameUpdate | undefined;
79
75
  phone?: Phone | null | undefined;
80
- email?: string | Two | null | undefined;
76
+ email?: string | null | undefined;
81
77
  address?: UpdateRepresentativeAddress | null | undefined;
82
78
  birthDate?: UpdateRepresentativeBirthDate | null | undefined;
83
79
  governmentID?: UpdateRepresentativeGovernmentID | null | undefined;
@@ -119,55 +115,6 @@ export function phoneFromJSON(
119
115
  );
120
116
  }
121
117
 
122
- /** @internal */
123
- export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
124
- .object({});
125
- /** @internal */
126
- export type Two$Outbound = {};
127
-
128
- /** @internal */
129
- export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
130
- .object({});
131
-
132
- export function twoToJSON(two: Two): string {
133
- return JSON.stringify(Two$outboundSchema.parse(two));
134
- }
135
- export function twoFromJSON(
136
- jsonString: string,
137
- ): SafeParseResult<Two, SDKValidationError> {
138
- return safeParse(
139
- jsonString,
140
- (x) => Two$inboundSchema.parse(JSON.parse(x)),
141
- `Failed to parse 'Two' from JSON`,
142
- );
143
- }
144
-
145
- /** @internal */
146
- export const Email$inboundSchema: z.ZodType<Email, z.ZodTypeDef, unknown> = z
147
- .union([z.string(), z.lazy(() => Two$inboundSchema)]);
148
- /** @internal */
149
- export type Email$Outbound = string | Two$Outbound;
150
-
151
- /** @internal */
152
- export const Email$outboundSchema: z.ZodType<
153
- Email$Outbound,
154
- z.ZodTypeDef,
155
- Email
156
- > = z.union([z.string(), z.lazy(() => Two$outboundSchema)]);
157
-
158
- export function emailToJSON(email: Email): string {
159
- return JSON.stringify(Email$outboundSchema.parse(email));
160
- }
161
- export function emailFromJSON(
162
- jsonString: string,
163
- ): SafeParseResult<Email, SDKValidationError> {
164
- return safeParse(
165
- jsonString,
166
- (x) => Email$inboundSchema.parse(JSON.parse(x)),
167
- `Failed to parse 'Email' from JSON`,
168
- );
169
- }
170
-
171
118
  /** @internal */
172
119
  export const UpdateRepresentativeAddress$inboundSchema: z.ZodType<
173
120
  UpdateRepresentativeAddress,
@@ -455,8 +402,7 @@ export const UpdateRepresentative$inboundSchema: z.ZodType<
455
402
  > = z.object({
456
403
  name: IndividualNameUpdate$inboundSchema.optional(),
457
404
  phone: z.nullable(z.lazy(() => Phone$inboundSchema)).optional(),
458
- email: z.nullable(z.union([z.string(), z.lazy(() => Two$inboundSchema)]))
459
- .optional(),
405
+ email: z.nullable(z.string()).optional(),
460
406
  address: z.nullable(z.lazy(() => UpdateRepresentativeAddress$inboundSchema))
461
407
  .optional(),
462
408
  birthDate: z.nullable(
@@ -472,7 +418,7 @@ export const UpdateRepresentative$inboundSchema: z.ZodType<
472
418
  export type UpdateRepresentative$Outbound = {
473
419
  name?: IndividualNameUpdate$Outbound | undefined;
474
420
  phone?: Phone$Outbound | null | undefined;
475
- email?: string | Two$Outbound | null | undefined;
421
+ email?: string | null | undefined;
476
422
  address?: UpdateRepresentativeAddress$Outbound | null | undefined;
477
423
  birthDate?: UpdateRepresentativeBirthDate$Outbound | null | undefined;
478
424
  governmentID?: UpdateRepresentativeGovernmentID$Outbound | null | undefined;
@@ -487,8 +433,7 @@ export const UpdateRepresentative$outboundSchema: z.ZodType<
487
433
  > = z.object({
488
434
  name: IndividualNameUpdate$outboundSchema.optional(),
489
435
  phone: z.nullable(z.lazy(() => Phone$outboundSchema)).optional(),
490
- email: z.nullable(z.union([z.string(), z.lazy(() => Two$outboundSchema)]))
491
- .optional(),
436
+ email: z.nullable(z.string()).optional(),
492
437
  address: z.nullable(z.lazy(() => UpdateRepresentativeAddress$outboundSchema))
493
438
  .optional(),
494
439
  birthDate: z.nullable(
@@ -15,7 +15,7 @@ export type CreatePaymentLinkErrorData = {
15
15
  display?: components.DisplayOptionsError | undefined;
16
16
  payment?: components.PaymentDetailsError | undefined;
17
17
  payout?: components.PayoutDetailsError | undefined;
18
- lineItems?: components.PaymentLinkLineItemsValidationError | undefined;
18
+ lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
19
19
  };
20
20
 
21
21
  export class CreatePaymentLinkError extends MoovError {
@@ -27,7 +27,7 @@ export class CreatePaymentLinkError extends MoovError {
27
27
  display?: components.DisplayOptionsError | undefined;
28
28
  payment?: components.PaymentDetailsError | undefined;
29
29
  payout?: components.PayoutDetailsError | undefined;
30
- lineItems?: components.PaymentLinkLineItemsValidationError | undefined;
30
+ lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
31
31
 
32
32
  /** The original data that was passed to this error instance. */
33
33
  data$: CreatePaymentLinkErrorData;
@@ -73,7 +73,7 @@ export const CreatePaymentLinkError$inboundSchema: z.ZodType<
73
73
  display: components.DisplayOptionsError$inboundSchema.optional(),
74
74
  payment: components.PaymentDetailsError$inboundSchema.optional(),
75
75
  payout: components.PayoutDetailsError$inboundSchema.optional(),
76
- lineItems: components.PaymentLinkLineItemsValidationError$inboundSchema
76
+ lineItems: components.CreatePaymentLinkLineItemsValidationError$inboundSchema
77
77
  .optional(),
78
78
  request$: z.instanceof(Request),
79
79
  response$: z.instanceof(Response),
@@ -98,7 +98,7 @@ export type CreatePaymentLinkError$Outbound = {
98
98
  payment?: components.PaymentDetailsError$Outbound | undefined;
99
99
  payout?: components.PayoutDetailsError$Outbound | undefined;
100
100
  lineItems?:
101
- | components.PaymentLinkLineItemsValidationError$Outbound
101
+ | components.CreatePaymentLinkLineItemsValidationError$Outbound
102
102
  | undefined;
103
103
  };
104
104
 
@@ -118,6 +118,6 @@ export const CreatePaymentLinkError$outboundSchema: z.ZodType<
118
118
  display: components.DisplayOptionsError$outboundSchema.optional(),
119
119
  payment: components.PaymentDetailsError$outboundSchema.optional(),
120
120
  payout: components.PayoutDetailsError$outboundSchema.optional(),
121
- lineItems: components.PaymentLinkLineItemsValidationError$outboundSchema
122
- .optional(),
121
+ lineItems: components
122
+ .CreatePaymentLinkLineItemsValidationError$outboundSchema.optional(),
123
123
  }));
@@ -12,7 +12,7 @@ export type UpdatePaymentLinkErrorData = {
12
12
  display?: components.DisplayOptionsError | undefined;
13
13
  payment?: components.PaymentDetailsError | undefined;
14
14
  payout?: components.PayoutDetailsError | undefined;
15
- lineItems?: components.PaymentLinkLineItemsValidationError | undefined;
15
+ lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
16
16
  };
17
17
 
18
18
  export class UpdatePaymentLinkError extends MoovError {
@@ -21,7 +21,7 @@ export class UpdatePaymentLinkError extends MoovError {
21
21
  display?: components.DisplayOptionsError | undefined;
22
22
  payment?: components.PaymentDetailsError | undefined;
23
23
  payout?: components.PayoutDetailsError | undefined;
24
- lineItems?: components.PaymentLinkLineItemsValidationError | undefined;
24
+ lineItems?: components.CreatePaymentLinkLineItemsValidationError | undefined;
25
25
 
26
26
  /** The original data that was passed to this error instance. */
27
27
  data$: UpdatePaymentLinkErrorData;
@@ -57,7 +57,7 @@ export const UpdatePaymentLinkError$inboundSchema: z.ZodType<
57
57
  display: components.DisplayOptionsError$inboundSchema.optional(),
58
58
  payment: components.PaymentDetailsError$inboundSchema.optional(),
59
59
  payout: components.PayoutDetailsError$inboundSchema.optional(),
60
- lineItems: components.PaymentLinkLineItemsValidationError$inboundSchema
60
+ lineItems: components.CreatePaymentLinkLineItemsValidationError$inboundSchema
61
61
  .optional(),
62
62
  request$: z.instanceof(Request),
63
63
  response$: z.instanceof(Response),
@@ -79,7 +79,7 @@ export type UpdatePaymentLinkError$Outbound = {
79
79
  payment?: components.PaymentDetailsError$Outbound | undefined;
80
80
  payout?: components.PayoutDetailsError$Outbound | undefined;
81
81
  lineItems?:
82
- | components.PaymentLinkLineItemsValidationError$Outbound
82
+ | components.CreatePaymentLinkLineItemsValidationError$Outbound
83
83
  | undefined;
84
84
  };
85
85
 
@@ -96,6 +96,6 @@ export const UpdatePaymentLinkError$outboundSchema: z.ZodType<
96
96
  display: components.DisplayOptionsError$outboundSchema.optional(),
97
97
  payment: components.PaymentDetailsError$outboundSchema.optional(),
98
98
  payout: components.PayoutDetailsError$outboundSchema.optional(),
99
- lineItems: components.PaymentLinkLineItemsValidationError$outboundSchema
100
- .optional(),
99
+ lineItems: components
100
+ .CreatePaymentLinkLineItemsValidationError$outboundSchema.optional(),
101
101
  }));
@@ -28,6 +28,9 @@ export type CreatePaymentLinkGlobals = {
28
28
  };
29
29
 
30
30
  export type CreatePaymentLinkRequest = {
31
+ /**
32
+ * The merchant account ID.
33
+ */
31
34
  accountID: string;
32
35
  createPaymentLink: components.CreatePaymentLink;
33
36
  };
@@ -27,6 +27,9 @@ export type DisablePaymentLinkGlobals = {
27
27
  };
28
28
 
29
29
  export type DisablePaymentLinkRequest = {
30
+ /**
31
+ * The merchant account ID.
32
+ */
30
33
  accountID: string;
31
34
  paymentLinkCode: string;
32
35
  };
@@ -28,6 +28,9 @@ export type GetPaymentLinkGlobals = {
28
28
  };
29
29
 
30
30
  export type GetPaymentLinkRequest = {
31
+ /**
32
+ * The merchant account ID.
33
+ */
31
34
  accountID: string;
32
35
  paymentLinkCode: string;
33
36
  };
@@ -28,6 +28,9 @@ export type GetPaymentLinkQRCodeGlobals = {
28
28
  };
29
29
 
30
30
  export type GetPaymentLinkQRCodeRequest = {
31
+ /**
32
+ * The merchant account ID.
33
+ */
31
34
  accountID: string;
32
35
  paymentLinkCode: string;
33
36
  };
@@ -32,6 +32,9 @@ export type ListPaymentLinksRequest = {
32
32
  count?: number | undefined;
33
33
  type?: components.PaymentLinkType | undefined;
34
34
  status?: components.PaymentLinkStatus | undefined;
35
+ /**
36
+ * The merchant account ID.
37
+ */
35
38
  accountID: string;
36
39
  };
37
40
 
@@ -30,7 +30,7 @@ export type UpdateImageGlobals = {
30
30
  export type UpdateImageRequest = {
31
31
  accountID: string;
32
32
  imageID: string;
33
- imageUpdateRequestMultiPart: components.ImageUpdateRequestMultiPart;
33
+ imageUploadRequestMultiPart: components.ImageUploadRequestMultiPart;
34
34
  };
35
35
 
36
36
  export type UpdateImageResponse = {
@@ -93,18 +93,18 @@ export const UpdateImageRequest$inboundSchema: z.ZodType<
93
93
  > = z.object({
94
94
  accountID: z.string(),
95
95
  imageID: z.string(),
96
- ImageUpdateRequestMultiPart:
97
- components.ImageUpdateRequestMultiPart$inboundSchema,
96
+ ImageUploadRequestMultiPart:
97
+ components.ImageUploadRequestMultiPart$inboundSchema,
98
98
  }).transform((v) => {
99
99
  return remap$(v, {
100
- "ImageUpdateRequestMultiPart": "imageUpdateRequestMultiPart",
100
+ "ImageUploadRequestMultiPart": "imageUploadRequestMultiPart",
101
101
  });
102
102
  });
103
103
  /** @internal */
104
104
  export type UpdateImageRequest$Outbound = {
105
105
  accountID: string;
106
106
  imageID: string;
107
- ImageUpdateRequestMultiPart: components.ImageUpdateRequestMultiPart$Outbound;
107
+ ImageUploadRequestMultiPart: components.ImageUploadRequestMultiPart$Outbound;
108
108
  };
109
109
 
110
110
  /** @internal */
@@ -115,11 +115,11 @@ export const UpdateImageRequest$outboundSchema: z.ZodType<
115
115
  > = z.object({
116
116
  accountID: z.string(),
117
117
  imageID: z.string(),
118
- imageUpdateRequestMultiPart:
119
- components.ImageUpdateRequestMultiPart$outboundSchema,
118
+ imageUploadRequestMultiPart:
119
+ components.ImageUploadRequestMultiPart$outboundSchema,
120
120
  }).transform((v) => {
121
121
  return remap$(v, {
122
- imageUpdateRequestMultiPart: "ImageUpdateRequestMultiPart",
122
+ imageUploadRequestMultiPart: "ImageUploadRequestMultiPart",
123
123
  });
124
124
  });
125
125
 
@@ -28,6 +28,9 @@ export type UpdatePaymentLinkGlobals = {
28
28
  };
29
29
 
30
30
  export type UpdatePaymentLinkRequest = {
31
+ /**
32
+ * The merchant account ID.
33
+ */
31
34
  accountID: string;
32
35
  paymentLinkCode: string;
33
36
  updatePaymentLink: components.UpdatePaymentLink;
package/src/sdk/images.ts CHANGED
@@ -66,8 +66,7 @@ export class Images extends ClientSDK {
66
66
  * Replace an existing image and, optionally, its metadata.
67
67
  *
68
68
  * This endpoint replaces the existing image with the new PNG, JPEG, or WebP. Omit
69
- * the metadata form section to keep existing metadata, or send `null` to clear it.
70
- * Duplicate images, and requests larger than 16MB will be rejected.
69
+ * the metadata form section to keep existing metadata. Duplicate images, and requests larger than 16MB will be rejected.
71
70
  */
72
71
  async update(
73
72
  request: operations.UpdateImageRequest,
@@ -3,34 +3,14 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod/v3";
6
+ import { Unrecognized, unrecognized } from "./unrecognized.js";
6
7
 
7
- declare const __brand: unique symbol;
8
- export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
9
8
  export type ClosedEnum<T extends Readonly<Record<string, string | number>>> =
10
9
  T[keyof T];
11
10
  export type OpenEnum<T extends Readonly<Record<string, string | number>>> =
12
11
  | T[keyof T]
13
12
  | Unrecognized<T[keyof T] extends number ? number : string>;
14
13
 
15
- function unrecognized<T>(value: T): Unrecognized<T> {
16
- unrecognizedCount++;
17
- return value as Unrecognized<T>;
18
- }
19
-
20
- let unrecognizedCount = 0;
21
- let refCount = 0;
22
- export function unrecognizedCounter() {
23
- refCount++;
24
- const start = unrecognizedCount;
25
- return {
26
- count: () => {
27
- const count = unrecognizedCount - start;
28
- if (--refCount === 0) unrecognizedCount = 0;
29
- return count;
30
- },
31
- };
32
- }
33
-
34
14
  export function inboundSchema<T extends Record<string, string>>(
35
15
  enumObj: T,
36
16
  ): z.ZodType<OpenEnum<T>, z.ZodTypeDef, unknown> {
@@ -4,8 +4,9 @@
4
4
 
5
5
  export { blobLikeSchema, isBlobLike } from "./blobs.js";
6
6
  export { Decimal } from "./decimal.js";
7
- export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
7
+ export type { ClosedEnum, OpenEnum } from "./enums.js";
8
8
  export type { Result } from "./fp.js";
9
9
  export type { PageIterator, Paginator } from "./operations.js";
10
10
  export { createPageIterator } from "./operations.js";
11
11
  export { RFCDate } from "./rfcdate.js";
12
+ export * from "./unrecognized.js";
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ declare const __brand: unique symbol;
6
+ export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
7
+
8
+ function unrecognized<T>(value: T): Unrecognized<T> {
9
+ globalCount++;
10
+ return value as Unrecognized<T>;
11
+ }
12
+
13
+ let globalCount = 0;
14
+ let refCount = 0;
15
+ export function startCountingUnrecognized() {
16
+ refCount++;
17
+ const start = globalCount;
18
+ return {
19
+ end: () => {
20
+ const count = globalCount - start;
21
+ if (--refCount === 0) globalCount = 0;
22
+ return count;
23
+ },
24
+ };
25
+ }
26
+
27
+ export { unrecognized };