@gr4vy/sdk 1.6.9 → 1.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 (251) hide show
  1. package/examples/package-lock.json +1 -1
  2. package/funcs/transactionsCreate.d.ts +1 -1
  3. package/funcs/transactionsCreate.d.ts.map +1 -1
  4. package/funcs/transactionsCreate.js +1 -1
  5. package/funcs/transactionsCreate.js.map +1 -1
  6. package/funcs/transactionsGet.d.ts +1 -1
  7. package/funcs/transactionsGet.d.ts.map +1 -1
  8. package/funcs/transactionsGet.js +1 -1
  9. package/funcs/transactionsGet.js.map +1 -1
  10. package/funcs/transactionsSync.d.ts +1 -1
  11. package/funcs/transactionsSync.d.ts.map +1 -1
  12. package/funcs/transactionsSync.js +1 -1
  13. package/funcs/transactionsSync.js.map +1 -1
  14. package/funcs/transactionsUpdate.d.ts +1 -1
  15. package/funcs/transactionsUpdate.d.ts.map +1 -1
  16. package/funcs/transactionsUpdate.js +1 -1
  17. package/funcs/transactionsUpdate.js.map +1 -1
  18. package/jsr.json +1 -1
  19. package/lib/config.d.ts +3 -3
  20. package/lib/config.js +3 -3
  21. package/lib/encodings.d.ts.map +1 -1
  22. package/lib/encodings.js +3 -1
  23. package/lib/encodings.js.map +1 -1
  24. package/models/components/auditlogentries.d.ts +2 -2
  25. package/models/components/auditlogentries.d.ts.map +1 -1
  26. package/models/components/auditlogentries.js +2 -2
  27. package/models/components/auditlogentries.js.map +1 -1
  28. package/models/components/{auditlogentryoutput.d.ts → auditlogentry.d.ts} +4 -4
  29. package/models/components/auditlogentry.d.ts.map +1 -0
  30. package/models/components/{auditlogentryoutput.js → auditlogentry.js} +6 -6
  31. package/models/components/auditlogentry.js.map +1 -0
  32. package/models/components/{billingdetailsinput.d.ts → billingdetails.d.ts} +10 -5
  33. package/models/components/billingdetails.d.ts.map +1 -0
  34. package/models/components/{billingdetailsoutput.js → billingdetails.js} +27 -6
  35. package/models/components/billingdetails.js.map +1 -0
  36. package/models/components/buyer.d.ts +2 -2
  37. package/models/components/buyer.d.ts.map +1 -1
  38. package/models/components/buyer.js +2 -2
  39. package/models/components/buyer.js.map +1 -1
  40. package/models/components/buyercreate.d.ts +3 -3
  41. package/models/components/buyercreate.d.ts.map +1 -1
  42. package/models/components/buyercreate.js +2 -2
  43. package/models/components/buyercreate.js.map +1 -1
  44. package/models/components/buyerupdate.d.ts +3 -3
  45. package/models/components/buyerupdate.d.ts.map +1 -1
  46. package/models/components/buyerupdate.js +2 -2
  47. package/models/components/buyerupdate.js.map +1 -1
  48. package/models/components/checkoutsession.d.ts +4 -4
  49. package/models/components/checkoutsession.d.ts.map +1 -1
  50. package/models/components/checkoutsession.js +4 -4
  51. package/models/components/checkoutsession.js.map +1 -1
  52. package/models/components/checkoutsessioncreate.d.ts +3 -3
  53. package/models/components/checkoutsessioncreate.d.ts.map +1 -1
  54. package/models/components/checkoutsessioncreate.js +2 -2
  55. package/models/components/checkoutsessioncreate.js.map +1 -1
  56. package/models/components/{checkoutsessionpaymentmethodoutput.d.ts → checkoutsessionpaymentmethod.d.ts} +4 -4
  57. package/models/components/checkoutsessionpaymentmethod.d.ts.map +1 -0
  58. package/models/components/{checkoutsessionpaymentmethodoutput.js → checkoutsessionpaymentmethod.js} +6 -6
  59. package/models/components/checkoutsessionpaymentmethod.js.map +1 -0
  60. package/models/components/cybersourceoptions.d.ts +5 -0
  61. package/models/components/cybersourceoptions.d.ts.map +1 -1
  62. package/models/components/cybersourceoptions.js +1 -0
  63. package/models/components/cybersourceoptions.js.map +1 -1
  64. package/models/components/{guestbuyerinput.d.ts → guestbuyer.d.ts} +13 -8
  65. package/models/components/guestbuyer.d.ts.map +1 -0
  66. package/models/components/{guestbuyeroutput.js → guestbuyer.js} +28 -8
  67. package/models/components/guestbuyer.js.map +1 -0
  68. package/models/components/index.d.ts +15 -16
  69. package/models/components/index.d.ts.map +1 -1
  70. package/models/components/index.js +15 -16
  71. package/models/components/index.js.map +1 -1
  72. package/models/components/paymentlink.d.ts +2 -2
  73. package/models/components/paymentlink.d.ts.map +1 -1
  74. package/models/components/paymentlink.js +2 -2
  75. package/models/components/paymentlink.js.map +1 -1
  76. package/models/components/paymentlinkcreate.d.ts +3 -3
  77. package/models/components/paymentlinkcreate.d.ts.map +1 -1
  78. package/models/components/paymentlinkcreate.js +2 -2
  79. package/models/components/paymentlinkcreate.js.map +1 -1
  80. package/models/components/paymentmethodsummaries.d.ts +2 -2
  81. package/models/components/paymentmethodsummaries.d.ts.map +1 -1
  82. package/models/components/paymentmethodsummaries.js +2 -2
  83. package/models/components/paymentmethodsummaries.js.map +1 -1
  84. package/models/components/{paymentmethodsummaryoutput.d.ts → paymentmethodsummary.d.ts} +4 -4
  85. package/models/components/paymentmethodsummary.d.ts.map +1 -0
  86. package/models/components/{paymentmethodsummaryoutput.js → paymentmethodsummary.js} +6 -6
  87. package/models/components/paymentmethodsummary.js.map +1 -0
  88. package/models/components/{paymentoptionoutput.d.ts → paymentoption.d.ts} +4 -4
  89. package/models/components/paymentoption.d.ts.map +1 -0
  90. package/models/components/{paymentoptionoutput.js → paymentoption.js} +6 -6
  91. package/models/components/paymentoption.js.map +1 -0
  92. package/models/components/paymentoptions.d.ts +2 -2
  93. package/models/components/paymentoptions.d.ts.map +1 -1
  94. package/models/components/paymentoptions.js +2 -2
  95. package/models/components/paymentoptions.js.map +1 -1
  96. package/models/components/payoutcreate.d.ts +3 -3
  97. package/models/components/payoutcreate.d.ts.map +1 -1
  98. package/models/components/payoutcreate.js +2 -2
  99. package/models/components/payoutcreate.js.map +1 -1
  100. package/models/components/payoutsummary.d.ts +4 -4
  101. package/models/components/payoutsummary.d.ts.map +1 -1
  102. package/models/components/payoutsummary.js +4 -4
  103. package/models/components/payoutsummary.js.map +1 -1
  104. package/models/components/reportcreate.d.ts.map +1 -1
  105. package/models/components/reportcreate.js +8 -24
  106. package/models/components/reportcreate.js.map +1 -1
  107. package/models/components/{transactionoutput.d.ts → transaction.d.ts} +10 -10
  108. package/models/components/transaction.d.ts.map +1 -0
  109. package/models/components/{transactionoutput.js → transaction.js} +12 -13
  110. package/models/components/transaction.js.map +1 -0
  111. package/models/components/{transactionbuyeroutput.d.ts → transactionbuyer.d.ts} +6 -6
  112. package/models/components/transactionbuyer.d.ts.map +1 -0
  113. package/models/components/{transactionbuyeroutput.js → transactionbuyer.js} +8 -8
  114. package/models/components/transactionbuyer.js.map +1 -0
  115. package/models/components/transactioncancel.d.ts +2 -2
  116. package/models/components/transactioncancel.d.ts.map +1 -1
  117. package/models/components/transactioncancel.js +2 -2
  118. package/models/components/transactioncancel.js.map +1 -1
  119. package/models/components/{transactioncaptureoutput.d.ts → transactioncapture.d.ts} +6 -6
  120. package/models/components/transactioncapture.d.ts.map +1 -0
  121. package/models/components/{transactioncaptureoutput.js → transactioncapture.js} +8 -8
  122. package/models/components/transactioncapture.js.map +1 -0
  123. package/models/components/transactioncreate.d.ts +3 -3
  124. package/models/components/transactioncreate.d.ts.map +1 -1
  125. package/models/components/transactioncreate.js +2 -2
  126. package/models/components/transactioncreate.js.map +1 -1
  127. package/models/components/{transactioneventoutput.d.ts → transactionevent.d.ts} +6 -7
  128. package/models/components/transactionevent.d.ts.map +1 -0
  129. package/models/components/{transactioneventoutput.js → transactionevent.js} +8 -7
  130. package/models/components/transactionevent.js.map +1 -0
  131. package/models/components/transactioneventcontext.d.ts +14 -0
  132. package/models/components/transactioneventcontext.d.ts.map +1 -0
  133. package/models/components/transactioneventcontext.js +57 -0
  134. package/models/components/transactioneventcontext.js.map +1 -0
  135. package/models/components/transactionevents.d.ts +2 -2
  136. package/models/components/transactionevents.d.ts.map +1 -1
  137. package/models/components/transactionevents.js +2 -2
  138. package/models/components/transactionevents.js.map +1 -1
  139. package/models/components/{transactionpaymentmethodoutput.d.ts → transactionpaymentmethod.d.ts} +4 -4
  140. package/models/components/transactionpaymentmethod.d.ts.map +1 -0
  141. package/models/components/{transactionpaymentmethodoutput.js → transactionpaymentmethod.js} +6 -6
  142. package/models/components/transactionpaymentmethod.js.map +1 -0
  143. package/models/components/transactionsummaries.d.ts +2 -2
  144. package/models/components/transactionsummaries.d.ts.map +1 -1
  145. package/models/components/transactionsummaries.js +2 -2
  146. package/models/components/transactionsummaries.js.map +1 -1
  147. package/models/components/{transactionsummaryoutput.d.ts → transactionsummary.d.ts} +8 -8
  148. package/models/components/transactionsummary.d.ts.map +1 -0
  149. package/models/components/{transactionsummaryoutput.js → transactionsummary.js} +10 -11
  150. package/models/components/transactionsummary.js.map +1 -0
  151. package/models/components/{transactionthreedsecuresummaryoutput.d.ts → transactionthreedsecuresummary.d.ts} +4 -4
  152. package/models/components/transactionthreedsecuresummary.d.ts.map +1 -0
  153. package/models/components/{transactionthreedsecuresummaryoutput.js → transactionthreedsecuresummary.js} +6 -6
  154. package/models/components/transactionthreedsecuresummary.js.map +1 -0
  155. package/models/components/{transactionvoidoutput.d.ts → transactionvoid.d.ts} +6 -6
  156. package/models/components/transactionvoid.d.ts.map +1 -0
  157. package/models/components/{transactionvoidoutput.js → transactionvoid.js} +8 -8
  158. package/models/components/transactionvoid.js.map +1 -0
  159. package/models/operations/capturetransaction.d.ts +27 -1
  160. package/models/operations/capturetransaction.d.ts.map +1 -1
  161. package/models/operations/capturetransaction.js +13 -2
  162. package/models/operations/capturetransaction.js.map +1 -1
  163. package/models/operations/voidtransaction.d.ts +27 -1
  164. package/models/operations/voidtransaction.d.ts.map +1 -1
  165. package/models/operations/voidtransaction.js +13 -2
  166. package/models/operations/voidtransaction.js.map +1 -1
  167. package/package.json +1 -1
  168. package/sdk/transactions.d.ts +4 -4
  169. package/sdk/transactions.d.ts.map +1 -1
  170. package/src/funcs/transactionsCreate.ts +4 -4
  171. package/src/funcs/transactionsGet.ts +4 -4
  172. package/src/funcs/transactionsSync.ts +4 -4
  173. package/src/funcs/transactionsUpdate.ts +4 -4
  174. package/src/lib/config.ts +3 -3
  175. package/src/lib/encodings.ts +4 -3
  176. package/src/models/components/auditlogentries.ts +3 -6
  177. package/src/models/components/{auditlogentryoutput.ts → auditlogentry.ts} +7 -7
  178. package/src/models/components/{billingdetailsinput.ts → billingdetails.ts} +46 -11
  179. package/src/models/components/buyer.ts +5 -5
  180. package/src/models/components/buyercreate.ts +7 -7
  181. package/src/models/components/buyerupdate.ts +7 -7
  182. package/src/models/components/checkoutsession.ts +8 -11
  183. package/src/models/components/checkoutsessioncreate.ts +7 -7
  184. package/src/models/components/{checkoutsessionpaymentmethodoutput.ts → checkoutsessionpaymentmethod.ts} +7 -8
  185. package/src/models/components/cybersourceoptions.ts +6 -0
  186. package/src/models/components/guestbuyer.ts +107 -0
  187. package/src/models/components/index.ts +15 -16
  188. package/src/models/components/paymentlink.ts +5 -5
  189. package/src/models/components/paymentlinkcreate.ts +7 -7
  190. package/src/models/components/paymentmethodsummaries.ts +5 -5
  191. package/src/models/components/{paymentmethodsummaryoutput.ts → paymentmethodsummary.ts} +7 -7
  192. package/src/models/components/{paymentoptionoutput.ts → paymentoption.ts} +7 -7
  193. package/src/models/components/paymentoptions.ts +3 -6
  194. package/src/models/components/payoutcreate.ts +7 -7
  195. package/src/models/components/payoutsummary.ts +10 -10
  196. package/src/models/components/reportcreate.ts +8 -24
  197. package/src/models/components/{transactionoutput.ts → transaction.ts} +22 -23
  198. package/src/models/components/{transactionbuyeroutput.ts → transactionbuyer.ts} +12 -12
  199. package/src/models/components/transactioncancel.ts +3 -6
  200. package/src/models/components/{transactioncaptureoutput.ts → transactioncapture.ts} +10 -13
  201. package/src/models/components/transactioncreate.ts +7 -7
  202. package/src/models/components/{transactioneventoutput.ts → transactionevent.ts} +13 -9
  203. package/src/models/components/transactioneventcontext.ts +47 -0
  204. package/src/models/components/transactionevents.ts +5 -5
  205. package/src/models/components/{transactionpaymentmethodoutput.ts → transactionpaymentmethod.ts} +7 -7
  206. package/src/models/components/transactionsummaries.ts +5 -5
  207. package/src/models/components/{transactionsummaryoutput.ts → transactionsummary.ts} +17 -18
  208. package/src/models/components/{transactionthreedsecuresummaryoutput.ts → transactionthreedsecuresummary.ts} +7 -8
  209. package/src/models/components/{transactionvoidoutput.ts → transactionvoid.ts} +10 -13
  210. package/src/models/operations/capturetransaction.ts +52 -4
  211. package/src/models/operations/voidtransaction.ts +52 -4
  212. package/src/sdk/transactions.ts +4 -4
  213. package/models/components/auditlogentryoutput.d.ts.map +0 -1
  214. package/models/components/auditlogentryoutput.js.map +0 -1
  215. package/models/components/billingdetailsinput.d.ts.map +0 -1
  216. package/models/components/billingdetailsinput.js +0 -65
  217. package/models/components/billingdetailsinput.js.map +0 -1
  218. package/models/components/billingdetailsoutput.d.ts +0 -35
  219. package/models/components/billingdetailsoutput.d.ts.map +0 -1
  220. package/models/components/billingdetailsoutput.js.map +0 -1
  221. package/models/components/checkoutsessionpaymentmethodoutput.d.ts.map +0 -1
  222. package/models/components/checkoutsessionpaymentmethodoutput.js.map +0 -1
  223. package/models/components/guestbuyerinput.d.ts.map +0 -1
  224. package/models/components/guestbuyerinput.js +0 -64
  225. package/models/components/guestbuyerinput.js.map +0 -1
  226. package/models/components/guestbuyeroutput.d.ts +0 -31
  227. package/models/components/guestbuyeroutput.d.ts.map +0 -1
  228. package/models/components/guestbuyeroutput.js.map +0 -1
  229. package/models/components/paymentmethodsummaryoutput.d.ts.map +0 -1
  230. package/models/components/paymentmethodsummaryoutput.js.map +0 -1
  231. package/models/components/paymentoptionoutput.d.ts.map +0 -1
  232. package/models/components/paymentoptionoutput.js.map +0 -1
  233. package/models/components/transactionbuyeroutput.d.ts.map +0 -1
  234. package/models/components/transactionbuyeroutput.js.map +0 -1
  235. package/models/components/transactioncaptureoutput.d.ts.map +0 -1
  236. package/models/components/transactioncaptureoutput.js.map +0 -1
  237. package/models/components/transactioneventoutput.d.ts.map +0 -1
  238. package/models/components/transactioneventoutput.js.map +0 -1
  239. package/models/components/transactionoutput.d.ts.map +0 -1
  240. package/models/components/transactionoutput.js.map +0 -1
  241. package/models/components/transactionpaymentmethodoutput.d.ts.map +0 -1
  242. package/models/components/transactionpaymentmethodoutput.js.map +0 -1
  243. package/models/components/transactionsummaryoutput.d.ts.map +0 -1
  244. package/models/components/transactionsummaryoutput.js.map +0 -1
  245. package/models/components/transactionthreedsecuresummaryoutput.d.ts.map +0 -1
  246. package/models/components/transactionthreedsecuresummaryoutput.js.map +0 -1
  247. package/models/components/transactionvoidoutput.d.ts.map +0 -1
  248. package/models/components/transactionvoidoutput.js.map +0 -1
  249. package/src/models/components/billingdetailsoutput.ts +0 -70
  250. package/src/models/components/guestbuyerinput.ts +0 -75
  251. package/src/models/components/guestbuyeroutput.ts +0 -71
@@ -36,28 +36,28 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.TransactionVoidOutput$inboundSchema = void 0;
40
- exports.transactionVoidOutputFromJSON = transactionVoidOutputFromJSON;
39
+ exports.TransactionVoid$inboundSchema = void 0;
40
+ exports.transactionVoidFromJSON = transactionVoidFromJSON;
41
41
  const z = __importStar(require("zod/v3"));
42
42
  const primitives_js_1 = require("../../lib/primitives.js");
43
43
  const schemas_js_1 = require("../../lib/schemas.js");
44
- const transactionoutput_js_1 = require("./transactionoutput.js");
44
+ const transaction_js_1 = require("./transaction.js");
45
45
  const voidstatus_js_1 = require("./voidstatus.js");
46
46
  /** @internal */
47
- exports.TransactionVoidOutput$inboundSchema = z.object({
47
+ exports.TransactionVoid$inboundSchema = z.object({
48
48
  type: z.literal("transaction-void").default("transaction-void"),
49
49
  status: voidstatus_js_1.VoidStatus$inboundSchema,
50
50
  code: z.nullable(z.string()),
51
51
  raw_response_code: z.nullable(z.string()),
52
52
  raw_response_description: z.nullable(z.string()),
53
- transaction: transactionoutput_js_1.TransactionOutput$inboundSchema,
53
+ transaction: transaction_js_1.Transaction$inboundSchema,
54
54
  }).transform((v) => {
55
55
  return (0, primitives_js_1.remap)(v, {
56
56
  "raw_response_code": "rawResponseCode",
57
57
  "raw_response_description": "rawResponseDescription",
58
58
  });
59
59
  });
60
- function transactionVoidOutputFromJSON(jsonString) {
61
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TransactionVoidOutput$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransactionVoidOutput' from JSON`);
60
+ function transactionVoidFromJSON(jsonString) {
61
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.TransactionVoid$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TransactionVoid' from JSON`);
62
62
  }
63
- //# sourceMappingURL=transactionvoidoutput.js.map
63
+ //# sourceMappingURL=transactionvoid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactionvoid.js","sourceRoot":"","sources":["../../src/models/components/transactionvoid.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDH,0DAQC;AA3DD,0CAA4B;AAC5B,2DAA0D;AAC1D,qDAAiD;AAGjD,qDAA0E;AAC1E,mDAAuE;AA0BvE,gBAAgB;AACH,QAAA,6BAA6B,GAItC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;IAC/D,MAAM,EAAE,wCAAwB;IAChC,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,iBAAiB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACzC,wBAAwB,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAChD,WAAW,EAAE,0CAAyB;CACvC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,mBAAmB,EAAE,iBAAiB;QACtC,0BAA0B,EAAE,wBAAwB;KACrD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,SAAgB,uBAAuB,CACrC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAA6B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzD,6CAA6C,CAC9C,CAAC;AACJ,CAAC"}
@@ -23,7 +23,33 @@ export type CaptureTransactionRequest = {
23
23
  /**
24
24
  * Successful Response
25
25
  */
26
- export type CaptureTransactionResponseCaptureTransaction = components.TransactionOutput | components.TransactionCaptureOutput;
26
+ export type CaptureTransactionResponseCaptureTransaction = (components.Transaction & {
27
+ status: "processing";
28
+ }) | (components.Transaction & {
29
+ status: "authorization_succeeded";
30
+ }) | (components.Transaction & {
31
+ status: "authorization_declined";
32
+ }) | (components.Transaction & {
33
+ status: "authorization_failed";
34
+ }) | (components.Transaction & {
35
+ status: "authorization_voided";
36
+ }) | (components.Transaction & {
37
+ status: "authorization_void_pending";
38
+ }) | (components.Transaction & {
39
+ status: "capture_succeeded";
40
+ }) | (components.Transaction & {
41
+ status: "capture_pending";
42
+ }) | (components.Transaction & {
43
+ status: "buyer_approval_pending";
44
+ }) | (components.TransactionCapture & {
45
+ status: "succeeded";
46
+ }) | (components.TransactionCapture & {
47
+ status: "pending";
48
+ }) | (components.TransactionCapture & {
49
+ status: "declined";
50
+ }) | (components.TransactionCapture & {
51
+ status: "failed";
52
+ });
27
53
  /** @internal */
28
54
  export type CaptureTransactionRequest$Outbound = {
29
55
  transaction_id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"capturetransaction.d.ts","sourceRoot":"","sources":["../../src/models/operations/capturetransaction.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAEr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CASA"}
@@ -60,8 +60,19 @@ function captureTransactionRequestToJSON(captureTransactionRequest) {
60
60
  }
61
61
  /** @internal */
62
62
  exports.CaptureTransactionResponseCaptureTransaction$inboundSchema = z.union([
63
- components.TransactionOutput$inboundSchema,
64
- components.TransactionCaptureOutput$inboundSchema,
63
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("processing") })),
64
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_succeeded") })),
65
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_declined") })),
66
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_failed") })),
67
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_voided") })),
68
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_void_pending") })),
69
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("capture_succeeded") })),
70
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("capture_pending") })),
71
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("buyer_approval_pending") })),
72
+ components.TransactionCapture$inboundSchema.and(z.object({ status: z.literal("succeeded") })),
73
+ components.TransactionCapture$inboundSchema.and(z.object({ status: z.literal("pending") })),
74
+ components.TransactionCapture$inboundSchema.and(z.object({ status: z.literal("declined") })),
75
+ components.TransactionCapture$inboundSchema.and(z.object({ status: z.literal("failed") })),
65
76
  ]);
66
77
  function captureTransactionResponseCaptureTransactionFromJSON(jsonString) {
67
78
  return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CaptureTransactionResponseCaptureTransaction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CaptureTransactionResponseCaptureTransaction' from JSON`);
@@ -1 +1 @@
1
- {"version":3,"file":"capturetransaction.js","sourceRoot":"","sources":["../../src/models/operations/capturetransaction.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DH,0EAMC;AAaD,oHAcC;AA5FD,0CAA4B;AAC5B,2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CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,CAC5C;IACD,UAAU,CAAC,gCAAgC,CAAC,GAAG,CAC7C,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAC1C;CACF,CAAC,CAAC;AAEL,SAAgB,oDAAoD,CAClE,UAAkB;IAKlB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,kEAA0D,CAAC,KAAK,CAC9D,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CACd,EACH,0EAA0E,CAC3E,CAAC;AACJ,CAAC"}
@@ -22,7 +22,33 @@ export type VoidTransactionRequest = {
22
22
  /**
23
23
  * Successful Response
24
24
  */
25
- export type VoidTransactionResponseVoidTransaction = components.TransactionOutput | components.TransactionVoidOutput;
25
+ export type VoidTransactionResponseVoidTransaction = (components.Transaction & {
26
+ status: "processing";
27
+ }) | (components.Transaction & {
28
+ status: "authorization_succeeded";
29
+ }) | (components.Transaction & {
30
+ status: "authorization_declined";
31
+ }) | (components.Transaction & {
32
+ status: "authorization_failed";
33
+ }) | (components.Transaction & {
34
+ status: "authorization_voided";
35
+ }) | (components.Transaction & {
36
+ status: "authorization_void_pending";
37
+ }) | (components.Transaction & {
38
+ status: "capture_succeeded";
39
+ }) | (components.Transaction & {
40
+ status: "capture_pending";
41
+ }) | (components.Transaction & {
42
+ status: "buyer_approval_pending";
43
+ }) | (components.TransactionVoid & {
44
+ status: "succeeded";
45
+ }) | (components.TransactionVoid & {
46
+ status: "pending";
47
+ }) | (components.TransactionVoid & {
48
+ status: "declined";
49
+ }) | (components.TransactionVoid & {
50
+ status: "failed";
51
+ });
26
52
  /** @internal */
27
53
  export type VoidTransactionRequest$Outbound = {
28
54
  transaction_id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"voidtransaction.d.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C,CAC5D,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,sCAAsC,EAAE,kBAAkB,CAAC,CAO7E"}
@@ -58,8 +58,19 @@ function voidTransactionRequestToJSON(voidTransactionRequest) {
58
58
  }
59
59
  /** @internal */
60
60
  exports.VoidTransactionResponseVoidTransaction$inboundSchema = z.union([
61
- components.TransactionOutput$inboundSchema,
62
- components.TransactionVoidOutput$inboundSchema,
61
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("processing") })),
62
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_succeeded") })),
63
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_declined") })),
64
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_failed") })),
65
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_voided") })),
66
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("authorization_void_pending") })),
67
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("capture_succeeded") })),
68
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("capture_pending") })),
69
+ components.Transaction$inboundSchema.and(z.object({ status: z.literal("buyer_approval_pending") })),
70
+ components.TransactionVoid$inboundSchema.and(z.object({ status: z.literal("succeeded") })),
71
+ components.TransactionVoid$inboundSchema.and(z.object({ status: z.literal("pending") })),
72
+ components.TransactionVoid$inboundSchema.and(z.object({ status: z.literal("declined") })),
73
+ components.TransactionVoid$inboundSchema.and(z.object({ status: z.literal("failed") })),
63
74
  ]);
64
75
  function voidTransactionResponseVoidTransactionFromJSON(jsonString) {
65
76
  return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.VoidTransactionResponseVoidTransaction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VoidTransactionResponseVoidTransaction' from JSON`);
@@ -1 +1 @@
1
- {"version":3,"file":"voidtransaction.js","sourceRoot":"","sources":["../../src/models/operations/voidtransaction.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;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AE,CAAC,CAC5C;IACD,UAAU,CAAC,6BAA6B,CAAC,GAAG,CAC1C,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAC1C;CACF,CAAC,CAAC;AAEH,SAAgB,8CAA8C,CAC5D,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,4DAAoD,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3E,oEAAoE,CACrE,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gr4vy/sdk",
3
- "version": "1.6.9",
3
+ "version": "1.7.0",
4
4
  "author": "Gr4vy",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
@@ -27,21 +27,21 @@ export declare class Transactions extends ClientSDK {
27
27
  * @remarks
28
28
  * Create a new transaction using a supported payment method. If additional buyer authorization is required, an approval URL will be returned. Duplicated gift card numbers are not supported.
29
29
  */
30
- create(transactionCreate: components.TransactionCreate, merchantAccountId?: string | null | undefined, idempotencyKey?: string | null | undefined, xForwardedFor?: string | undefined, options?: RequestOptions): Promise<components.TransactionOutput>;
30
+ create(transactionCreate: components.TransactionCreate, merchantAccountId?: string | null | undefined, idempotencyKey?: string | null | undefined, xForwardedFor?: string | undefined, options?: RequestOptions): Promise<components.Transaction>;
31
31
  /**
32
32
  * Get transaction
33
33
  *
34
34
  * @remarks
35
35
  * Retrieve the details of a transaction by its unique identifier.
36
36
  */
37
- get(transactionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions): Promise<components.TransactionOutput>;
37
+ get(transactionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions): Promise<components.Transaction>;
38
38
  /**
39
39
  * Manually update a transaction
40
40
  *
41
41
  * @remarks
42
42
  * Manually updates a transaction.
43
43
  */
44
- update(transactionUpdate: components.TransactionUpdate, transactionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions): Promise<components.TransactionOutput>;
44
+ update(transactionUpdate: components.TransactionUpdate, transactionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions): Promise<components.Transaction>;
45
45
  /**
46
46
  * Capture transaction
47
47
  *
@@ -69,6 +69,6 @@ export declare class Transactions extends ClientSDK {
69
69
  * @remarks
70
70
  * Synchronizes the status of a transaction with the underlying payment service provider. This is useful for transactions in a pending state to check if they've been completed or failed. Only available for some payment service providers.
71
71
  */
72
- sync(transactionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions): Promise<components.TransactionOutput>;
72
+ sync(transactionId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions): Promise<components.Transaction>;
73
73
  }
74
74
  //# sourceMappingURL=transactions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/sdk/transactions.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAwB,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,qBAAa,YAAa,SAAQ,SAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,CAAe;IAChC,IAAI,OAAO,IAAI,YAAY,CAE1B;IAED,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED;;;;;OAKG;IACG,IAAI,C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C,UAAU,CAAC,4CAA4C,CAAC;IAWnE;;;;;OAKG;IACG,IAAI,CACR,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,EACzC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,sCAAsC,CAAC;IAU7D;;;;;OAKG;IACG,MAAM,CACV,aAAa,EAAE,MAAM,EACrB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC;IASxC;;;;;OAKG;IACG,IAAI,CACR,aAAa,EAAE,MAAM,EACrB,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;CAQnC"}
@@ -41,7 +41,7 @@ export function transactionsCreate(
41
41
  options?: RequestOptions,
42
42
  ): APIPromise<
43
43
  Result<
44
- components.TransactionOutput,
44
+ components.Transaction,
45
45
  | errors.Error400
46
46
  | errors.Error401
47
47
  | errors.Error403
@@ -84,7 +84,7 @@ async function $do(
84
84
  ): Promise<
85
85
  [
86
86
  Result<
87
- components.TransactionOutput,
87
+ components.Transaction,
88
88
  | errors.Error400
89
89
  | errors.Error401
90
90
  | errors.Error403
@@ -214,7 +214,7 @@ async function $do(
214
214
  };
215
215
 
216
216
  const [result] = await M.match<
217
- components.TransactionOutput,
217
+ components.Transaction,
218
218
  | errors.Error400
219
219
  | errors.Error401
220
220
  | errors.Error403
@@ -236,7 +236,7 @@ async function $do(
236
236
  | UnexpectedClientError
237
237
  | SDKValidationError
238
238
  >(
239
- M.json(201, components.TransactionOutput$inboundSchema),
239
+ M.json(201, components.Transaction$inboundSchema),
240
240
  M.jsonErr(400, errors.Error400$inboundSchema),
241
241
  M.jsonErr(401, errors.Error401$inboundSchema),
242
242
  M.jsonErr(403, errors.Error403$inboundSchema),
@@ -39,7 +39,7 @@ export function transactionsGet(
39
39
  options?: RequestOptions,
40
40
  ): APIPromise<
41
41
  Result<
42
- components.TransactionOutput,
42
+ components.Transaction,
43
43
  | errors.Error400
44
44
  | errors.Error401
45
45
  | errors.Error403
@@ -78,7 +78,7 @@ async function $do(
78
78
  ): Promise<
79
79
  [
80
80
  Result<
81
- components.TransactionOutput,
81
+ components.Transaction,
82
82
  | errors.Error400
83
83
  | errors.Error401
84
84
  | errors.Error403
@@ -212,7 +212,7 @@ async function $do(
212
212
  };
213
213
 
214
214
  const [result] = await M.match<
215
- components.TransactionOutput,
215
+ components.Transaction,
216
216
  | errors.Error400
217
217
  | errors.Error401
218
218
  | errors.Error403
@@ -234,7 +234,7 @@ async function $do(
234
234
  | UnexpectedClientError
235
235
  | SDKValidationError
236
236
  >(
237
- M.json(200, components.TransactionOutput$inboundSchema),
237
+ M.json(200, components.Transaction$inboundSchema),
238
238
  M.jsonErr(400, errors.Error400$inboundSchema),
239
239
  M.jsonErr(401, errors.Error401$inboundSchema),
240
240
  M.jsonErr(403, errors.Error403$inboundSchema),
@@ -39,7 +39,7 @@ export function transactionsSync(
39
39
  options?: RequestOptions,
40
40
  ): APIPromise<
41
41
  Result<
42
- components.TransactionOutput,
42
+ components.Transaction,
43
43
  | errors.Error400
44
44
  | errors.Error401
45
45
  | errors.Error403
@@ -78,7 +78,7 @@ async function $do(
78
78
  ): Promise<
79
79
  [
80
80
  Result<
81
- components.TransactionOutput,
81
+ components.Transaction,
82
82
  | errors.Error400
83
83
  | errors.Error401
84
84
  | errors.Error403
@@ -202,7 +202,7 @@ async function $do(
202
202
  };
203
203
 
204
204
  const [result] = await M.match<
205
- components.TransactionOutput,
205
+ components.Transaction,
206
206
  | errors.Error400
207
207
  | errors.Error401
208
208
  | errors.Error403
@@ -224,7 +224,7 @@ async function $do(
224
224
  | UnexpectedClientError
225
225
  | SDKValidationError
226
226
  >(
227
- M.json(200, components.TransactionOutput$inboundSchema),
227
+ M.json(200, components.Transaction$inboundSchema),
228
228
  M.jsonErr(400, errors.Error400$inboundSchema),
229
229
  M.jsonErr(401, errors.Error401$inboundSchema),
230
230
  M.jsonErr(403, errors.Error403$inboundSchema),
@@ -40,7 +40,7 @@ export function transactionsUpdate(
40
40
  options?: RequestOptions,
41
41
  ): APIPromise<
42
42
  Result<
43
- components.TransactionOutput,
43
+ components.Transaction,
44
44
  | errors.Error400
45
45
  | errors.Error401
46
46
  | errors.Error403
@@ -81,7 +81,7 @@ async function $do(
81
81
  ): Promise<
82
82
  [
83
83
  Result<
84
- components.TransactionOutput,
84
+ components.Transaction,
85
85
  | errors.Error400
86
86
  | errors.Error401
87
87
  | errors.Error403
@@ -207,7 +207,7 @@ async function $do(
207
207
  };
208
208
 
209
209
  const [result] = await M.match<
210
- components.TransactionOutput,
210
+ components.Transaction,
211
211
  | errors.Error400
212
212
  | errors.Error401
213
213
  | errors.Error403
@@ -229,7 +229,7 @@ async function $do(
229
229
  | UnexpectedClientError
230
230
  | SDKValidationError
231
231
  >(
232
- M.json(200, components.TransactionOutput$inboundSchema),
232
+ M.json(200, components.Transaction$inboundSchema),
233
233
  M.jsonErr(400, errors.Error400$inboundSchema),
234
234
  M.jsonErr(401, errors.Error401$inboundSchema),
235
235
  M.jsonErr(403, errors.Error403$inboundSchema),
package/src/lib/config.ts CHANGED
@@ -77,7 +77,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
77
77
  export const SDK_METADATA = {
78
78
  language: "typescript",
79
79
  openapiDocVersion: "1.0.0",
80
- sdkVersion: "1.6.9",
81
- genVersion: "2.760.2",
82
- userAgent: "speakeasy-sdk/typescript 1.6.9 2.760.2 1.0.0 @gr4vy/sdk",
80
+ sdkVersion: "1.7.0",
81
+ genVersion: "2.763.3",
82
+ userAgent: "speakeasy-sdk/typescript 1.7.0 2.763.3 1.0.0 @gr4vy/sdk",
83
83
  } as const;
@@ -102,8 +102,9 @@ export function encodeLabel(
102
102
  });
103
103
  encValue = mapped?.join("").slice(1);
104
104
  } else {
105
- const k =
106
- options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : "";
105
+ const k = options?.explode && isPlainObject(value)
106
+ ? `${encodeString(pk)}=`
107
+ : "";
107
108
  encValue = `${k}${encodeValue(pv)}`;
108
109
  }
109
110
 
@@ -440,7 +441,7 @@ type BulkQueryEncoder = (
440
441
  ) => string;
441
442
 
442
443
  export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
443
- const bulkEncode = function (
444
+ const bulkEncode = function(
444
445
  values: Record<string, unknown>,
445
446
  options?: QueryEncoderOptions,
446
447
  ): string {
@@ -7,16 +7,13 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- AuditLogEntryOutput,
12
- AuditLogEntryOutput$inboundSchema,
13
- } from "./auditlogentryoutput.js";
10
+ import { AuditLogEntry, AuditLogEntry$inboundSchema } from "./auditlogentry.js";
14
11
 
15
12
  export type AuditLogEntries = {
16
13
  /**
17
14
  * A list of items returned for this request.
18
15
  */
19
- items: Array<AuditLogEntryOutput>;
16
+ items: Array<AuditLogEntry>;
20
17
  /**
21
18
  * The number of items for this page.
22
19
  */
@@ -37,7 +34,7 @@ export const AuditLogEntries$inboundSchema: z.ZodType<
37
34
  z.ZodTypeDef,
38
35
  unknown
39
36
  > = z.object({
40
- items: z.array(AuditLogEntryOutput$inboundSchema),
37
+ items: z.array(AuditLogEntry$inboundSchema),
41
38
  limit: z.number().int().default(20),
42
39
  next_cursor: z.nullable(z.string()).optional(),
43
40
  previous_cursor: z.nullable(z.string()).optional(),
@@ -20,7 +20,7 @@ import {
20
20
  AuditLogEntryUser$inboundSchema,
21
21
  } from "./auditlogentryuser.js";
22
22
 
23
- export type AuditLogEntryOutput = {
23
+ export type AuditLogEntry = {
24
24
  /**
25
25
  * Always `audit-log`.
26
26
  */
@@ -43,8 +43,8 @@ export type AuditLogEntryOutput = {
43
43
  };
44
44
 
45
45
  /** @internal */
46
- export const AuditLogEntryOutput$inboundSchema: z.ZodType<
47
- AuditLogEntryOutput,
46
+ export const AuditLogEntry$inboundSchema: z.ZodType<
47
+ AuditLogEntry,
48
48
  z.ZodTypeDef,
49
49
  unknown
50
50
  > = z.object({
@@ -61,12 +61,12 @@ export const AuditLogEntryOutput$inboundSchema: z.ZodType<
61
61
  });
62
62
  });
63
63
 
64
- export function auditLogEntryOutputFromJSON(
64
+ export function auditLogEntryFromJSON(
65
65
  jsonString: string,
66
- ): SafeParseResult<AuditLogEntryOutput, SDKValidationError> {
66
+ ): SafeParseResult<AuditLogEntry, SDKValidationError> {
67
67
  return safeParse(
68
68
  jsonString,
69
- (x) => AuditLogEntryOutput$inboundSchema.parse(JSON.parse(x)),
70
- `Failed to parse 'AuditLogEntryOutput' from JSON`,
69
+ (x) => AuditLogEntry$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'AuditLogEntry' from JSON`,
71
71
  );
72
72
  }
@@ -4,14 +4,23 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
7
10
  import {
8
11
  Address,
12
+ Address$inboundSchema,
9
13
  Address$Outbound,
10
14
  Address$outboundSchema,
11
15
  } from "./address.js";
12
- import { TaxId, TaxId$Outbound, TaxId$outboundSchema } from "./taxid.js";
16
+ import {
17
+ TaxId,
18
+ TaxId$inboundSchema,
19
+ TaxId$Outbound,
20
+ TaxId$outboundSchema,
21
+ } from "./taxid.js";
13
22
 
14
- export type BillingDetailsInput = {
23
+ export type BillingDetails = {
15
24
  /**
16
25
  * The first name(s) or given name for the buyer.
17
26
  */
@@ -39,7 +48,28 @@ export type BillingDetailsInput = {
39
48
  };
40
49
 
41
50
  /** @internal */
42
- export type BillingDetailsInput$Outbound = {
51
+ export const BillingDetails$inboundSchema: z.ZodType<
52
+ BillingDetails,
53
+ z.ZodTypeDef,
54
+ unknown
55
+ > = z.object({
56
+ first_name: z.nullable(z.string()).optional(),
57
+ last_name: z.nullable(z.string()).optional(),
58
+ email_address: z.nullable(z.string()).optional(),
59
+ phone_number: z.nullable(z.string()).optional(),
60
+ address: z.nullable(Address$inboundSchema).optional(),
61
+ tax_id: z.nullable(TaxId$inboundSchema).optional(),
62
+ }).transform((v) => {
63
+ return remap$(v, {
64
+ "first_name": "firstName",
65
+ "last_name": "lastName",
66
+ "email_address": "emailAddress",
67
+ "phone_number": "phoneNumber",
68
+ "tax_id": "taxId",
69
+ });
70
+ });
71
+ /** @internal */
72
+ export type BillingDetails$Outbound = {
43
73
  first_name?: string | null | undefined;
44
74
  last_name?: string | null | undefined;
45
75
  email_address?: string | null | undefined;
@@ -49,10 +79,10 @@ export type BillingDetailsInput$Outbound = {
49
79
  };
50
80
 
51
81
  /** @internal */
52
- export const BillingDetailsInput$outboundSchema: z.ZodType<
53
- BillingDetailsInput$Outbound,
82
+ export const BillingDetails$outboundSchema: z.ZodType<
83
+ BillingDetails$Outbound,
54
84
  z.ZodTypeDef,
55
- BillingDetailsInput
85
+ BillingDetails
56
86
  > = z.object({
57
87
  firstName: z.nullable(z.string()).optional(),
58
88
  lastName: z.nullable(z.string()).optional(),
@@ -70,10 +100,15 @@ export const BillingDetailsInput$outboundSchema: z.ZodType<
70
100
  });
71
101
  });
72
102
 
73
- export function billingDetailsInputToJSON(
74
- billingDetailsInput: BillingDetailsInput,
75
- ): string {
76
- return JSON.stringify(
77
- BillingDetailsInput$outboundSchema.parse(billingDetailsInput),
103
+ export function billingDetailsToJSON(billingDetails: BillingDetails): string {
104
+ return JSON.stringify(BillingDetails$outboundSchema.parse(billingDetails));
105
+ }
106
+ export function billingDetailsFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<BillingDetails, SDKValidationError> {
109
+ return safeParse(
110
+ jsonString,
111
+ (x) => BillingDetails$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'BillingDetails' from JSON`,
78
113
  );
79
114
  }
@@ -8,9 +8,9 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
  import {
11
- BillingDetailsOutput,
12
- BillingDetailsOutput$inboundSchema,
13
- } from "./billingdetailsoutput.js";
11
+ BillingDetails,
12
+ BillingDetails$inboundSchema,
13
+ } from "./billingdetails.js";
14
14
 
15
15
  export type Buyer = {
16
16
  /**
@@ -36,7 +36,7 @@ export type Buyer = {
36
36
  /**
37
37
  * The billing name, address, email, and other fields for this buyer.
38
38
  */
39
- billingDetails?: BillingDetailsOutput | null | undefined;
39
+ billingDetails?: BillingDetails | null | undefined;
40
40
  /**
41
41
  * The buyer account number
42
42
  */
@@ -59,7 +59,7 @@ export const Buyer$inboundSchema: z.ZodType<Buyer, z.ZodTypeDef, unknown> = z
59
59
  merchant_account_id: z.string(),
60
60
  display_name: z.nullable(z.string()).optional(),
61
61
  external_identifier: z.nullable(z.string()).optional(),
62
- billing_details: z.nullable(BillingDetailsOutput$inboundSchema).optional(),
62
+ billing_details: z.nullable(BillingDetails$inboundSchema).optional(),
63
63
  account_number: z.nullable(z.string()).optional(),
64
64
  created_at: z.string().datetime({ offset: true }).transform(v =>
65
65
  new Date(v)