@gr4vy/sdk 1.5.2 → 1.5.4

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 (196) hide show
  1. package/docs/sdks/transactions/README.md +4 -4
  2. package/examples/package-lock.json +1 -1
  3. package/funcs/transactionsCreate.d.ts +1 -1
  4. package/funcs/transactionsCreate.d.ts.map +1 -1
  5. package/funcs/transactionsCreate.js +1 -1
  6. package/funcs/transactionsCreate.js.map +1 -1
  7. package/funcs/transactionsGet.d.ts +1 -1
  8. package/funcs/transactionsGet.d.ts.map +1 -1
  9. package/funcs/transactionsGet.js +1 -1
  10. package/funcs/transactionsGet.js.map +1 -1
  11. package/funcs/transactionsSync.d.ts +1 -1
  12. package/funcs/transactionsSync.d.ts.map +1 -1
  13. package/funcs/transactionsSync.js +1 -1
  14. package/funcs/transactionsSync.js.map +1 -1
  15. package/funcs/transactionsUpdate.d.ts +1 -1
  16. package/funcs/transactionsUpdate.d.ts.map +1 -1
  17. package/funcs/transactionsUpdate.js +1 -1
  18. package/funcs/transactionsUpdate.js.map +1 -1
  19. package/jsr.json +1 -1
  20. package/lib/config.d.ts +3 -3
  21. package/lib/config.js +3 -3
  22. package/models/components/auditlogentries.d.ts +3 -3
  23. package/models/components/auditlogentries.d.ts.map +1 -1
  24. package/models/components/auditlogentries.js +3 -3
  25. package/models/components/auditlogentries.js.map +1 -1
  26. package/models/components/{auditlogentry.d.ts → auditlogentryoutput.d.ts} +14 -14
  27. package/models/components/auditlogentryoutput.d.ts.map +1 -0
  28. package/models/components/{auditlogentry.js → auditlogentryoutput.js} +17 -17
  29. package/models/components/auditlogentryoutput.js.map +1 -0
  30. package/models/components/checkoutsession.d.ts +3 -3
  31. package/models/components/checkoutsession.d.ts.map +1 -1
  32. package/models/components/checkoutsession.js +3 -3
  33. package/models/components/checkoutsession.js.map +1 -1
  34. package/models/components/{checkoutsessionpaymentmethod.d.ts → checkoutsessionpaymentmethodoutput.d.ts} +14 -14
  35. package/models/components/checkoutsessionpaymentmethodoutput.d.ts.map +1 -0
  36. package/models/components/{checkoutsessionpaymentmethod.js → checkoutsessionpaymentmethodoutput.js} +17 -17
  37. package/models/components/checkoutsessionpaymentmethodoutput.js.map +1 -0
  38. package/models/components/index.d.ts +15 -12
  39. package/models/components/index.d.ts.map +1 -1
  40. package/models/components/index.js +15 -12
  41. package/models/components/index.js.map +1 -1
  42. package/models/components/paymentlink.d.ts +3 -3
  43. package/models/components/paymentlink.d.ts.map +1 -1
  44. package/models/components/paymentlink.js +3 -3
  45. package/models/components/paymentlink.js.map +1 -1
  46. package/models/components/paymentmethodsummaries.d.ts +3 -3
  47. package/models/components/paymentmethodsummaries.d.ts.map +1 -1
  48. package/models/components/paymentmethodsummaries.js +3 -3
  49. package/models/components/paymentmethodsummaries.js.map +1 -1
  50. package/models/components/{paymentmethodsummary.d.ts → paymentmethodsummaryoutput.d.ts} +14 -14
  51. package/models/components/paymentmethodsummaryoutput.d.ts.map +1 -0
  52. package/models/components/{paymentmethodsummary.js → paymentmethodsummaryoutput.js} +17 -17
  53. package/models/components/paymentmethodsummaryoutput.js.map +1 -0
  54. package/models/components/{paymentoption.d.ts → paymentoptionoutput.d.ts} +14 -14
  55. package/models/components/paymentoptionoutput.d.ts.map +1 -0
  56. package/models/components/{paymentoption.js → paymentoptionoutput.js} +17 -17
  57. package/models/components/paymentoptionoutput.js.map +1 -0
  58. package/models/components/paymentoptions.d.ts +3 -3
  59. package/models/components/paymentoptions.d.ts.map +1 -1
  60. package/models/components/paymentoptions.js +3 -3
  61. package/models/components/paymentoptions.js.map +1 -1
  62. package/models/components/payoutsummary.d.ts +6 -6
  63. package/models/components/payoutsummary.d.ts.map +1 -1
  64. package/models/components/payoutsummary.js +6 -6
  65. package/models/components/payoutsummary.js.map +1 -1
  66. package/models/components/paypaloptions.d.ts +6 -0
  67. package/models/components/paypaloptions.d.ts.map +1 -1
  68. package/models/components/paypaloptions.js +3 -0
  69. package/models/components/paypaloptions.js.map +1 -1
  70. package/models/components/paypalshippingoptions.d.ts +33 -0
  71. package/models/components/paypalshippingoptions.d.ts.map +1 -0
  72. package/models/components/paypalshippingoptions.js +72 -0
  73. package/models/components/paypalshippingoptions.js.map +1 -0
  74. package/models/components/paypalshippingoptionsitem.d.ts +75 -0
  75. package/models/components/paypalshippingoptionsitem.d.ts.map +1 -0
  76. package/models/components/paypalshippingoptionsitem.js +107 -0
  77. package/models/components/paypalshippingoptionsitem.js.map +1 -0
  78. package/models/components/paypalshippingoptionsitemamount.d.ts +37 -0
  79. package/models/components/paypalshippingoptionsitemamount.d.ts.map +1 -0
  80. package/models/components/paypalshippingoptionsitemamount.js +80 -0
  81. package/models/components/paypalshippingoptionsitemamount.js.map +1 -0
  82. package/models/components/{transactionbuyer.d.ts → transactionbuyeroutput.d.ts} +14 -14
  83. package/models/components/transactionbuyeroutput.d.ts.map +1 -0
  84. package/models/components/{transactionbuyer.js → transactionbuyeroutput.js} +17 -17
  85. package/models/components/transactionbuyeroutput.js.map +1 -0
  86. package/models/components/transactioncancel.d.ts +3 -3
  87. package/models/components/transactioncancel.d.ts.map +1 -1
  88. package/models/components/transactioncancel.js +3 -3
  89. package/models/components/transactioncancel.js.map +1 -1
  90. package/models/components/transactioncaptureoutput.d.ts +56 -0
  91. package/models/components/transactioncaptureoutput.d.ts.map +1 -0
  92. package/models/components/{transactioncapture.js → transactioncaptureoutput.js} +20 -20
  93. package/models/components/transactioncaptureoutput.js.map +1 -0
  94. package/models/components/{transactionevent.d.ts → transactioneventoutput.d.ts} +14 -14
  95. package/models/components/transactioneventoutput.d.ts.map +1 -0
  96. package/models/components/{transactionevent.js → transactioneventoutput.js} +17 -17
  97. package/models/components/transactioneventoutput.js.map +1 -0
  98. package/models/components/transactionevents.d.ts +3 -3
  99. package/models/components/transactionevents.d.ts.map +1 -1
  100. package/models/components/transactionevents.js +3 -3
  101. package/models/components/transactionevents.js.map +1 -1
  102. package/models/components/{transaction.d.ts → transactionoutput.d.ts} +23 -23
  103. package/models/components/transactionoutput.d.ts.map +1 -0
  104. package/models/components/{transaction.js → transactionoutput.js} +28 -26
  105. package/models/components/transactionoutput.js.map +1 -0
  106. package/models/components/{transactionpaymentmethod.d.ts → transactionpaymentmethodoutput.d.ts} +14 -14
  107. package/models/components/transactionpaymentmethodoutput.d.ts.map +1 -0
  108. package/models/components/{transactionpaymentmethod.js → transactionpaymentmethodoutput.js} +17 -17
  109. package/models/components/transactionpaymentmethodoutput.js.map +1 -0
  110. package/models/components/transactionsummaries.d.ts +3 -3
  111. package/models/components/transactionsummaries.d.ts.map +1 -1
  112. package/models/components/transactionsummaries.js +3 -3
  113. package/models/components/transactionsummaries.js.map +1 -1
  114. package/models/components/{transactionsummary.d.ts → transactionsummaryoutput.d.ts} +20 -20
  115. package/models/components/transactionsummaryoutput.d.ts.map +1 -0
  116. package/models/components/{transactionsummary.js → transactionsummaryoutput.js} +25 -23
  117. package/models/components/transactionsummaryoutput.js.map +1 -0
  118. package/models/components/{transactionthreedsecuresummary.d.ts → transactionthreedsecuresummaryoutput.d.ts} +14 -14
  119. package/models/components/transactionthreedsecuresummaryoutput.d.ts.map +1 -0
  120. package/models/components/{transactionthreedsecuresummary.js → transactionthreedsecuresummaryoutput.js} +17 -17
  121. package/models/components/transactionthreedsecuresummaryoutput.js.map +1 -0
  122. package/models/components/transactionvoidoutput.d.ts +56 -0
  123. package/models/components/transactionvoidoutput.d.ts.map +1 -0
  124. package/models/components/{transactionvoid.js → transactionvoidoutput.js} +20 -20
  125. package/models/components/transactionvoidoutput.js.map +1 -0
  126. package/models/operations/capturetransaction.d.ts +2 -2
  127. package/models/operations/capturetransaction.d.ts.map +1 -1
  128. package/models/operations/capturetransaction.js +4 -4
  129. package/models/operations/capturetransaction.js.map +1 -1
  130. package/models/operations/voidtransaction.d.ts +2 -2
  131. package/models/operations/voidtransaction.d.ts.map +1 -1
  132. package/models/operations/voidtransaction.js +4 -4
  133. package/models/operations/voidtransaction.js.map +1 -1
  134. package/package.json +1 -1
  135. package/sdk/transactions.d.ts +4 -4
  136. package/sdk/transactions.d.ts.map +1 -1
  137. package/src/funcs/transactionsCreate.ts +4 -4
  138. package/src/funcs/transactionsGet.ts +4 -4
  139. package/src/funcs/transactionsSync.ts +4 -4
  140. package/src/funcs/transactionsUpdate.ts +4 -4
  141. package/src/lib/config.ts +3 -3
  142. package/src/models/components/auditlogentries.ts +9 -9
  143. package/src/models/components/{auditlogentry.ts → auditlogentryoutput.ts} +24 -20
  144. package/src/models/components/checkoutsession.ts +12 -9
  145. package/src/models/components/{checkoutsessionpaymentmethod.ts → checkoutsessionpaymentmethodoutput.ts} +24 -22
  146. package/src/models/components/index.ts +15 -12
  147. package/src/models/components/paymentlink.ts +9 -9
  148. package/src/models/components/paymentmethodsummaries.ts +9 -9
  149. package/src/models/components/{paymentmethodsummary.ts → paymentmethodsummaryoutput.ts} +21 -21
  150. package/src/models/components/{paymentoption.ts → paymentoptionoutput.ts} +24 -20
  151. package/src/models/components/paymentoptions.ts +9 -9
  152. package/src/models/components/payoutsummary.ts +18 -18
  153. package/src/models/components/paypaloptions.ts +13 -0
  154. package/src/models/components/paypalshippingoptions.ts +77 -0
  155. package/src/models/components/paypalshippingoptionsitem.ts +150 -0
  156. package/src/models/components/paypalshippingoptionsitemamount.ts +87 -0
  157. package/src/models/components/{transactionbuyer.ts → transactionbuyeroutput.ts} +21 -21
  158. package/src/models/components/transactioncancel.ts +9 -9
  159. package/src/models/components/{transactioncapture.ts → transactioncaptureoutput.ts} +30 -30
  160. package/src/models/components/{transactionevent.ts → transactioneventoutput.ts} +21 -21
  161. package/src/models/components/transactionevents.ts +9 -9
  162. package/src/models/components/{transaction.ts → transactionoutput.ts} +56 -47
  163. package/src/models/components/{transactionpaymentmethod.ts → transactionpaymentmethodoutput.ts} +23 -21
  164. package/src/models/components/transactionsummaries.ts +9 -9
  165. package/src/models/components/{transactionsummary.ts → transactionsummaryoutput.ts} +41 -39
  166. package/src/models/components/{transactionthreedsecuresummary.ts → transactionthreedsecuresummaryoutput.ts} +25 -22
  167. package/src/models/components/{transactionvoid.ts → transactionvoidoutput.ts} +32 -30
  168. package/src/models/operations/capturetransaction.ts +8 -8
  169. package/src/models/operations/voidtransaction.ts +8 -8
  170. package/src/sdk/transactions.ts +4 -4
  171. package/models/components/auditlogentry.d.ts.map +0 -1
  172. package/models/components/auditlogentry.js.map +0 -1
  173. package/models/components/checkoutsessionpaymentmethod.d.ts.map +0 -1
  174. package/models/components/checkoutsessionpaymentmethod.js.map +0 -1
  175. package/models/components/paymentmethodsummary.d.ts.map +0 -1
  176. package/models/components/paymentmethodsummary.js.map +0 -1
  177. package/models/components/paymentoption.d.ts.map +0 -1
  178. package/models/components/paymentoption.js.map +0 -1
  179. package/models/components/transaction.d.ts.map +0 -1
  180. package/models/components/transaction.js.map +0 -1
  181. package/models/components/transactionbuyer.d.ts.map +0 -1
  182. package/models/components/transactionbuyer.js.map +0 -1
  183. package/models/components/transactioncapture.d.ts +0 -56
  184. package/models/components/transactioncapture.d.ts.map +0 -1
  185. package/models/components/transactioncapture.js.map +0 -1
  186. package/models/components/transactionevent.d.ts.map +0 -1
  187. package/models/components/transactionevent.js.map +0 -1
  188. package/models/components/transactionpaymentmethod.d.ts.map +0 -1
  189. package/models/components/transactionpaymentmethod.js.map +0 -1
  190. package/models/components/transactionsummary.d.ts.map +0 -1
  191. package/models/components/transactionsummary.js.map +0 -1
  192. package/models/components/transactionthreedsecuresummary.d.ts.map +0 -1
  193. package/models/components/transactionthreedsecuresummary.js.map +0 -1
  194. package/models/components/transactionvoid.d.ts +0 -56
  195. package/models/components/transactionvoid.d.ts.map +0 -1
  196. package/models/components/transactionvoid.js.map +0 -1
@@ -96,7 +96,7 @@ export const Name = {
96
96
  */
97
97
  export type Name = OpenEnum<typeof Name>;
98
98
 
99
- export type TransactionEvent = {
99
+ export type TransactionEventOutput = {
100
100
  /**
101
101
  * Always `transaction-event`.
102
102
  */
@@ -143,8 +143,8 @@ export namespace Name$ {
143
143
  }
144
144
 
145
145
  /** @internal */
146
- export const TransactionEvent$inboundSchema: z.ZodType<
147
- TransactionEvent,
146
+ export const TransactionEventOutput$inboundSchema: z.ZodType<
147
+ TransactionEventOutput,
148
148
  z.ZodTypeDef,
149
149
  unknown
150
150
  > = z.object({
@@ -160,7 +160,7 @@ export const TransactionEvent$inboundSchema: z.ZodType<
160
160
  });
161
161
 
162
162
  /** @internal */
163
- export type TransactionEvent$Outbound = {
163
+ export type TransactionEventOutput$Outbound = {
164
164
  type: "transaction-event";
165
165
  id: string;
166
166
  name: string;
@@ -169,10 +169,10 @@ export type TransactionEvent$Outbound = {
169
169
  };
170
170
 
171
171
  /** @internal */
172
- export const TransactionEvent$outboundSchema: z.ZodType<
173
- TransactionEvent$Outbound,
172
+ export const TransactionEventOutput$outboundSchema: z.ZodType<
173
+ TransactionEventOutput$Outbound,
174
174
  z.ZodTypeDef,
175
- TransactionEvent
175
+ TransactionEventOutput
176
176
  > = z.object({
177
177
  type: z.literal("transaction-event").default("transaction-event" as const),
178
178
  id: z.string(),
@@ -189,29 +189,29 @@ export const TransactionEvent$outboundSchema: z.ZodType<
189
189
  * @internal
190
190
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
191
191
  */
192
- export namespace TransactionEvent$ {
193
- /** @deprecated use `TransactionEvent$inboundSchema` instead. */
194
- export const inboundSchema = TransactionEvent$inboundSchema;
195
- /** @deprecated use `TransactionEvent$outboundSchema` instead. */
196
- export const outboundSchema = TransactionEvent$outboundSchema;
197
- /** @deprecated use `TransactionEvent$Outbound` instead. */
198
- export type Outbound = TransactionEvent$Outbound;
192
+ export namespace TransactionEventOutput$ {
193
+ /** @deprecated use `TransactionEventOutput$inboundSchema` instead. */
194
+ export const inboundSchema = TransactionEventOutput$inboundSchema;
195
+ /** @deprecated use `TransactionEventOutput$outboundSchema` instead. */
196
+ export const outboundSchema = TransactionEventOutput$outboundSchema;
197
+ /** @deprecated use `TransactionEventOutput$Outbound` instead. */
198
+ export type Outbound = TransactionEventOutput$Outbound;
199
199
  }
200
200
 
201
- export function transactionEventToJSON(
202
- transactionEvent: TransactionEvent,
201
+ export function transactionEventOutputToJSON(
202
+ transactionEventOutput: TransactionEventOutput,
203
203
  ): string {
204
204
  return JSON.stringify(
205
- TransactionEvent$outboundSchema.parse(transactionEvent),
205
+ TransactionEventOutput$outboundSchema.parse(transactionEventOutput),
206
206
  );
207
207
  }
208
208
 
209
- export function transactionEventFromJSON(
209
+ export function transactionEventOutputFromJSON(
210
210
  jsonString: string,
211
- ): SafeParseResult<TransactionEvent, SDKValidationError> {
211
+ ): SafeParseResult<TransactionEventOutput, SDKValidationError> {
212
212
  return safeParse(
213
213
  jsonString,
214
- (x) => TransactionEvent$inboundSchema.parse(JSON.parse(x)),
215
- `Failed to parse 'TransactionEvent' from JSON`,
214
+ (x) => TransactionEventOutput$inboundSchema.parse(JSON.parse(x)),
215
+ `Failed to parse 'TransactionEventOutput' from JSON`,
216
216
  );
217
217
  }
@@ -8,17 +8,17 @@ 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
- TransactionEvent,
12
- TransactionEvent$inboundSchema,
13
- TransactionEvent$Outbound,
14
- TransactionEvent$outboundSchema,
15
- } from "./transactionevent.js";
11
+ TransactionEventOutput,
12
+ TransactionEventOutput$inboundSchema,
13
+ TransactionEventOutput$Outbound,
14
+ TransactionEventOutput$outboundSchema,
15
+ } from "./transactioneventoutput.js";
16
16
 
17
17
  export type TransactionEvents = {
18
18
  /**
19
19
  * A list of items returned for this request.
20
20
  */
21
- items: Array<TransactionEvent>;
21
+ items: Array<TransactionEventOutput>;
22
22
  /**
23
23
  * The number of items for this page.
24
24
  */
@@ -39,7 +39,7 @@ export const TransactionEvents$inboundSchema: z.ZodType<
39
39
  z.ZodTypeDef,
40
40
  unknown
41
41
  > = z.object({
42
- items: z.array(TransactionEvent$inboundSchema),
42
+ items: z.array(TransactionEventOutput$inboundSchema),
43
43
  limit: z.number().int().default(20),
44
44
  next_cursor: z.nullable(z.string()).optional(),
45
45
  previous_cursor: z.nullable(z.string()).optional(),
@@ -52,7 +52,7 @@ export const TransactionEvents$inboundSchema: z.ZodType<
52
52
 
53
53
  /** @internal */
54
54
  export type TransactionEvents$Outbound = {
55
- items: Array<TransactionEvent$Outbound>;
55
+ items: Array<TransactionEventOutput$Outbound>;
56
56
  limit: number;
57
57
  next_cursor?: string | null | undefined;
58
58
  previous_cursor?: string | null | undefined;
@@ -64,7 +64,7 @@ export const TransactionEvents$outboundSchema: z.ZodType<
64
64
  z.ZodTypeDef,
65
65
  TransactionEvents
66
66
  > = z.object({
67
- items: z.array(TransactionEvent$outboundSchema),
67
+ items: z.array(TransactionEventOutput$outboundSchema),
68
68
  limit: z.number().int().default(20),
69
69
  nextCursor: z.nullable(z.string()).optional(),
70
70
  previousCursor: z.nullable(z.string()).optional(),
@@ -75,11 +75,11 @@ import {
75
75
  StatementDescriptor$outboundSchema,
76
76
  } from "./statementdescriptor.js";
77
77
  import {
78
- TransactionBuyer,
79
- TransactionBuyer$inboundSchema,
80
- TransactionBuyer$Outbound,
81
- TransactionBuyer$outboundSchema,
82
- } from "./transactionbuyer.js";
78
+ TransactionBuyerOutput,
79
+ TransactionBuyerOutput$inboundSchema,
80
+ TransactionBuyerOutput$Outbound,
81
+ TransactionBuyerOutput$outboundSchema,
82
+ } from "./transactionbuyeroutput.js";
83
83
  import {
84
84
  TransactionIntent,
85
85
  TransactionIntent$inboundSchema,
@@ -91,11 +91,11 @@ import {
91
91
  TransactionIntentOutcome$outboundSchema,
92
92
  } from "./transactionintentoutcome.js";
93
93
  import {
94
- TransactionPaymentMethod,
95
- TransactionPaymentMethod$inboundSchema,
96
- TransactionPaymentMethod$Outbound,
97
- TransactionPaymentMethod$outboundSchema,
98
- } from "./transactionpaymentmethod.js";
94
+ TransactionPaymentMethodOutput,
95
+ TransactionPaymentMethodOutput$inboundSchema,
96
+ TransactionPaymentMethodOutput$Outbound,
97
+ TransactionPaymentMethodOutput$outboundSchema,
98
+ } from "./transactionpaymentmethodoutput.js";
99
99
  import {
100
100
  TransactionPaymentService,
101
101
  TransactionPaymentService$inboundSchema,
@@ -113,16 +113,16 @@ import {
113
113
  TransactionStatus$outboundSchema,
114
114
  } from "./transactionstatus.js";
115
115
  import {
116
- TransactionThreeDSecureSummary,
117
- TransactionThreeDSecureSummary$inboundSchema,
118
- TransactionThreeDSecureSummary$Outbound,
119
- TransactionThreeDSecureSummary$outboundSchema,
120
- } from "./transactionthreedsecuresummary.js";
116
+ TransactionThreeDSecureSummaryOutput,
117
+ TransactionThreeDSecureSummaryOutput$inboundSchema,
118
+ TransactionThreeDSecureSummaryOutput$Outbound,
119
+ TransactionThreeDSecureSummaryOutput$outboundSchema,
120
+ } from "./transactionthreedsecuresummaryoutput.js";
121
121
 
122
122
  /**
123
123
  * A full transaction resource.
124
124
  */
125
- export type Transaction = {
125
+ export type TransactionOutput = {
126
126
  /**
127
127
  * Always `transaction`.
128
128
  */
@@ -184,7 +184,7 @@ export type Transaction = {
184
184
  /**
185
185
  * The payment method used for this transaction.
186
186
  */
187
- paymentMethod?: TransactionPaymentMethod | null | undefined;
187
+ paymentMethod?: TransactionPaymentMethodOutput | null | undefined;
188
188
  /**
189
189
  * The method used for the transaction.
190
190
  */
@@ -208,7 +208,7 @@ export type Transaction = {
208
208
  /**
209
209
  * The buyer used for this transaction.
210
210
  */
211
- buyer?: TransactionBuyer | null | undefined;
211
+ buyer?: TransactionBuyerOutput | null | undefined;
212
212
  /**
213
213
  * This is the response code received from the payment service. This can be set to any value and is not standardized across different payment services.
214
214
  */
@@ -292,7 +292,7 @@ export type Transaction = {
292
292
  /**
293
293
  * The 3-D Secure data that was sent to the payment service for the transaction.
294
294
  */
295
- threeDSecure?: TransactionThreeDSecureSummary | null | undefined;
295
+ threeDSecure?: TransactionThreeDSecureSummaryOutput | null | undefined;
296
296
  /**
297
297
  * The payment service's unique ID for the transaction.
298
298
  */
@@ -385,8 +385,8 @@ export type Transaction = {
385
385
  };
386
386
 
387
387
  /** @internal */
388
- export const Transaction$inboundSchema: z.ZodType<
389
- Transaction,
388
+ export const TransactionOutput$inboundSchema: z.ZodType<
389
+ TransactionOutput,
390
390
  z.ZodTypeDef,
391
391
  unknown
392
392
  > = z.object({
@@ -406,14 +406,15 @@ export const Transaction$inboundSchema: z.ZodType<
406
406
  country: z.nullable(z.string()).optional(),
407
407
  external_identifier: z.nullable(z.string()).optional(),
408
408
  intent: TransactionIntent$inboundSchema,
409
- payment_method: z.nullable(TransactionPaymentMethod$inboundSchema).optional(),
409
+ payment_method: z.nullable(TransactionPaymentMethodOutput$inboundSchema)
410
+ .optional(),
410
411
  method: z.nullable(Method$inboundSchema).optional(),
411
412
  instrument_type: z.nullable(InstrumentType$inboundSchema).optional(),
412
413
  error_code: z.nullable(z.string()).optional(),
413
414
  payment_service: z.nullable(TransactionPaymentService$inboundSchema)
414
415
  .optional(),
415
416
  pending_review: z.boolean().default(false),
416
- buyer: z.nullable(TransactionBuyer$inboundSchema).optional(),
417
+ buyer: z.nullable(TransactionBuyerOutput$inboundSchema).optional(),
417
418
  raw_response_code: z.nullable(z.string()).optional(),
418
419
  raw_response_description: z.nullable(z.string()).optional(),
419
420
  shipping_details: z.nullable(ShippingDetails$inboundSchema).optional(),
@@ -435,7 +436,7 @@ export const Transaction$inboundSchema: z.ZodType<
435
436
  statement_descriptor: z.nullable(StatementDescriptor$inboundSchema)
436
437
  .optional(),
437
438
  scheme_transaction_id: z.nullable(z.string()).optional(),
438
- three_d_secure: z.nullable(TransactionThreeDSecureSummary$inboundSchema)
439
+ three_d_secure: z.nullable(TransactionThreeDSecureSummaryOutput$inboundSchema)
439
440
  .optional(),
440
441
  payment_service_transaction_id: z.nullable(z.string()).optional(),
441
442
  additional_identifiers: z.record(z.nullable(z.string())).optional(),
@@ -531,7 +532,7 @@ export const Transaction$inboundSchema: z.ZodType<
531
532
  });
532
533
 
533
534
  /** @internal */
534
- export type Transaction$Outbound = {
535
+ export type TransactionOutput$Outbound = {
535
536
  type: "transaction";
536
537
  id: string;
537
538
  reconciliation_id: string;
@@ -548,13 +549,13 @@ export type Transaction$Outbound = {
548
549
  country?: string | null | undefined;
549
550
  external_identifier?: string | null | undefined;
550
551
  intent: string;
551
- payment_method?: TransactionPaymentMethod$Outbound | null | undefined;
552
+ payment_method?: TransactionPaymentMethodOutput$Outbound | null | undefined;
552
553
  method?: string | null | undefined;
553
554
  instrument_type?: string | null | undefined;
554
555
  error_code?: string | null | undefined;
555
556
  payment_service?: TransactionPaymentService$Outbound | null | undefined;
556
557
  pending_review: boolean;
557
- buyer?: TransactionBuyer$Outbound | null | undefined;
558
+ buyer?: TransactionBuyerOutput$Outbound | null | undefined;
558
559
  raw_response_code?: string | null | undefined;
559
560
  raw_response_description?: string | null | undefined;
560
561
  shipping_details?: ShippingDetails$Outbound | null | undefined;
@@ -575,7 +576,10 @@ export type Transaction$Outbound = {
575
576
  cart_items?: Array<CartItem$Outbound> | null | undefined;
576
577
  statement_descriptor?: StatementDescriptor$Outbound | null | undefined;
577
578
  scheme_transaction_id?: string | null | undefined;
578
- three_d_secure?: TransactionThreeDSecureSummary$Outbound | null | undefined;
579
+ three_d_secure?:
580
+ | TransactionThreeDSecureSummaryOutput$Outbound
581
+ | null
582
+ | undefined;
579
583
  payment_service_transaction_id?: string | null | undefined;
580
584
  additional_identifiers?: { [k: string]: string | null } | undefined;
581
585
  metadata?: { [k: string]: string } | null | undefined;
@@ -602,10 +606,10 @@ export type Transaction$Outbound = {
602
606
  };
603
607
 
604
608
  /** @internal */
605
- export const Transaction$outboundSchema: z.ZodType<
606
- Transaction$Outbound,
609
+ export const TransactionOutput$outboundSchema: z.ZodType<
610
+ TransactionOutput$Outbound,
607
611
  z.ZodTypeDef,
608
- Transaction
612
+ TransactionOutput
609
613
  > = z.object({
610
614
  type: z.literal("transaction").default("transaction" as const),
611
615
  id: z.string(),
@@ -623,14 +627,15 @@ export const Transaction$outboundSchema: z.ZodType<
623
627
  country: z.nullable(z.string()).optional(),
624
628
  externalIdentifier: z.nullable(z.string()).optional(),
625
629
  intent: TransactionIntent$outboundSchema,
626
- paymentMethod: z.nullable(TransactionPaymentMethod$outboundSchema).optional(),
630
+ paymentMethod: z.nullable(TransactionPaymentMethodOutput$outboundSchema)
631
+ .optional(),
627
632
  method: z.nullable(Method$outboundSchema).optional(),
628
633
  instrumentType: z.nullable(InstrumentType$outboundSchema).optional(),
629
634
  errorCode: z.nullable(z.string()).optional(),
630
635
  paymentService: z.nullable(TransactionPaymentService$outboundSchema)
631
636
  .optional(),
632
637
  pendingReview: z.boolean().default(false),
633
- buyer: z.nullable(TransactionBuyer$outboundSchema).optional(),
638
+ buyer: z.nullable(TransactionBuyerOutput$outboundSchema).optional(),
634
639
  rawResponseCode: z.nullable(z.string()).optional(),
635
640
  rawResponseDescription: z.nullable(z.string()).optional(),
636
641
  shippingDetails: z.nullable(ShippingDetails$outboundSchema).optional(),
@@ -652,7 +657,7 @@ export const Transaction$outboundSchema: z.ZodType<
652
657
  statementDescriptor: z.nullable(StatementDescriptor$outboundSchema)
653
658
  .optional(),
654
659
  schemeTransactionId: z.nullable(z.string()).optional(),
655
- threeDSecure: z.nullable(TransactionThreeDSecureSummary$outboundSchema)
660
+ threeDSecure: z.nullable(TransactionThreeDSecureSummaryOutput$outboundSchema)
656
661
  .optional(),
657
662
  paymentServiceTransactionId: z.nullable(z.string()).optional(),
658
663
  additionalIdentifiers: z.record(z.nullable(z.string())).optional(),
@@ -741,25 +746,29 @@ export const Transaction$outboundSchema: z.ZodType<
741
746
  * @internal
742
747
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
743
748
  */
744
- export namespace Transaction$ {
745
- /** @deprecated use `Transaction$inboundSchema` instead. */
746
- export const inboundSchema = Transaction$inboundSchema;
747
- /** @deprecated use `Transaction$outboundSchema` instead. */
748
- export const outboundSchema = Transaction$outboundSchema;
749
- /** @deprecated use `Transaction$Outbound` instead. */
750
- export type Outbound = Transaction$Outbound;
749
+ export namespace TransactionOutput$ {
750
+ /** @deprecated use `TransactionOutput$inboundSchema` instead. */
751
+ export const inboundSchema = TransactionOutput$inboundSchema;
752
+ /** @deprecated use `TransactionOutput$outboundSchema` instead. */
753
+ export const outboundSchema = TransactionOutput$outboundSchema;
754
+ /** @deprecated use `TransactionOutput$Outbound` instead. */
755
+ export type Outbound = TransactionOutput$Outbound;
751
756
  }
752
757
 
753
- export function transactionToJSON(transaction: Transaction): string {
754
- return JSON.stringify(Transaction$outboundSchema.parse(transaction));
758
+ export function transactionOutputToJSON(
759
+ transactionOutput: TransactionOutput,
760
+ ): string {
761
+ return JSON.stringify(
762
+ TransactionOutput$outboundSchema.parse(transactionOutput),
763
+ );
755
764
  }
756
765
 
757
- export function transactionFromJSON(
766
+ export function transactionOutputFromJSON(
758
767
  jsonString: string,
759
- ): SafeParseResult<Transaction, SDKValidationError> {
768
+ ): SafeParseResult<TransactionOutput, SDKValidationError> {
760
769
  return safeParse(
761
770
  jsonString,
762
- (x) => Transaction$inboundSchema.parse(JSON.parse(x)),
763
- `Failed to parse 'Transaction' from JSON`,
771
+ (x) => TransactionOutput$inboundSchema.parse(JSON.parse(x)),
772
+ `Failed to parse 'TransactionOutput' from JSON`,
764
773
  );
765
774
  }
@@ -30,7 +30,7 @@ import {
30
30
  PaymentMethodDetailsCard$outboundSchema,
31
31
  } from "./paymentmethoddetailscard.js";
32
32
 
33
- export type TransactionPaymentMethod = {
33
+ export type TransactionPaymentMethodOutput = {
34
34
  /**
35
35
  * Always `payment-method`.
36
36
  */
@@ -95,8 +95,8 @@ export type TransactionPaymentMethod = {
95
95
  };
96
96
 
97
97
  /** @internal */
98
- export const TransactionPaymentMethod$inboundSchema: z.ZodType<
99
- TransactionPaymentMethod,
98
+ export const TransactionPaymentMethodOutput$inboundSchema: z.ZodType<
99
+ TransactionPaymentMethodOutput,
100
100
  z.ZodTypeDef,
101
101
  unknown
102
102
  > = z.object({
@@ -130,7 +130,7 @@ export const TransactionPaymentMethod$inboundSchema: z.ZodType<
130
130
  });
131
131
 
132
132
  /** @internal */
133
- export type TransactionPaymentMethod$Outbound = {
133
+ export type TransactionPaymentMethodOutput$Outbound = {
134
134
  type: "payment-method";
135
135
  approval_url?: string | null | undefined;
136
136
  country?: string | null | undefined;
@@ -150,10 +150,10 @@ export type TransactionPaymentMethod$Outbound = {
150
150
  };
151
151
 
152
152
  /** @internal */
153
- export const TransactionPaymentMethod$outboundSchema: z.ZodType<
154
- TransactionPaymentMethod$Outbound,
153
+ export const TransactionPaymentMethodOutput$outboundSchema: z.ZodType<
154
+ TransactionPaymentMethodOutput$Outbound,
155
155
  z.ZodTypeDef,
156
- TransactionPaymentMethod
156
+ TransactionPaymentMethodOutput
157
157
  > = z.object({
158
158
  type: z.literal("payment-method").default("payment-method" as const),
159
159
  approvalUrl: z.nullable(z.string()).optional(),
@@ -187,29 +187,31 @@ export const TransactionPaymentMethod$outboundSchema: z.ZodType<
187
187
  * @internal
188
188
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
189
189
  */
190
- export namespace TransactionPaymentMethod$ {
191
- /** @deprecated use `TransactionPaymentMethod$inboundSchema` instead. */
192
- export const inboundSchema = TransactionPaymentMethod$inboundSchema;
193
- /** @deprecated use `TransactionPaymentMethod$outboundSchema` instead. */
194
- export const outboundSchema = TransactionPaymentMethod$outboundSchema;
195
- /** @deprecated use `TransactionPaymentMethod$Outbound` instead. */
196
- export type Outbound = TransactionPaymentMethod$Outbound;
190
+ export namespace TransactionPaymentMethodOutput$ {
191
+ /** @deprecated use `TransactionPaymentMethodOutput$inboundSchema` instead. */
192
+ export const inboundSchema = TransactionPaymentMethodOutput$inboundSchema;
193
+ /** @deprecated use `TransactionPaymentMethodOutput$outboundSchema` instead. */
194
+ export const outboundSchema = TransactionPaymentMethodOutput$outboundSchema;
195
+ /** @deprecated use `TransactionPaymentMethodOutput$Outbound` instead. */
196
+ export type Outbound = TransactionPaymentMethodOutput$Outbound;
197
197
  }
198
198
 
199
- export function transactionPaymentMethodToJSON(
200
- transactionPaymentMethod: TransactionPaymentMethod,
199
+ export function transactionPaymentMethodOutputToJSON(
200
+ transactionPaymentMethodOutput: TransactionPaymentMethodOutput,
201
201
  ): string {
202
202
  return JSON.stringify(
203
- TransactionPaymentMethod$outboundSchema.parse(transactionPaymentMethod),
203
+ TransactionPaymentMethodOutput$outboundSchema.parse(
204
+ transactionPaymentMethodOutput,
205
+ ),
204
206
  );
205
207
  }
206
208
 
207
- export function transactionPaymentMethodFromJSON(
209
+ export function transactionPaymentMethodOutputFromJSON(
208
210
  jsonString: string,
209
- ): SafeParseResult<TransactionPaymentMethod, SDKValidationError> {
211
+ ): SafeParseResult<TransactionPaymentMethodOutput, SDKValidationError> {
210
212
  return safeParse(
211
213
  jsonString,
212
- (x) => TransactionPaymentMethod$inboundSchema.parse(JSON.parse(x)),
213
- `Failed to parse 'TransactionPaymentMethod' from JSON`,
214
+ (x) => TransactionPaymentMethodOutput$inboundSchema.parse(JSON.parse(x)),
215
+ `Failed to parse 'TransactionPaymentMethodOutput' from JSON`,
214
216
  );
215
217
  }
@@ -8,17 +8,17 @@ 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
- TransactionSummary,
12
- TransactionSummary$inboundSchema,
13
- TransactionSummary$Outbound,
14
- TransactionSummary$outboundSchema,
15
- } from "./transactionsummary.js";
11
+ TransactionSummaryOutput,
12
+ TransactionSummaryOutput$inboundSchema,
13
+ TransactionSummaryOutput$Outbound,
14
+ TransactionSummaryOutput$outboundSchema,
15
+ } from "./transactionsummaryoutput.js";
16
16
 
17
17
  export type TransactionSummaries = {
18
18
  /**
19
19
  * A list of items returned for this request.
20
20
  */
21
- items: Array<TransactionSummary>;
21
+ items: Array<TransactionSummaryOutput>;
22
22
  /**
23
23
  * The number of items for this page.
24
24
  */
@@ -39,7 +39,7 @@ export const TransactionSummaries$inboundSchema: z.ZodType<
39
39
  z.ZodTypeDef,
40
40
  unknown
41
41
  > = z.object({
42
- items: z.array(TransactionSummary$inboundSchema),
42
+ items: z.array(TransactionSummaryOutput$inboundSchema),
43
43
  limit: z.number().int().default(20),
44
44
  next_cursor: z.nullable(z.string()).optional(),
45
45
  previous_cursor: z.nullable(z.string()).optional(),
@@ -52,7 +52,7 @@ export const TransactionSummaries$inboundSchema: z.ZodType<
52
52
 
53
53
  /** @internal */
54
54
  export type TransactionSummaries$Outbound = {
55
- items: Array<TransactionSummary$Outbound>;
55
+ items: Array<TransactionSummaryOutput$Outbound>;
56
56
  limit: number;
57
57
  next_cursor?: string | null | undefined;
58
58
  previous_cursor?: string | null | undefined;
@@ -64,7 +64,7 @@ export const TransactionSummaries$outboundSchema: z.ZodType<
64
64
  z.ZodTypeDef,
65
65
  TransactionSummaries
66
66
  > = z.object({
67
- items: z.array(TransactionSummary$outboundSchema),
67
+ items: z.array(TransactionSummaryOutput$outboundSchema),
68
68
  limit: z.number().int().default(20),
69
69
  nextCursor: z.nullable(z.string()).optional(),
70
70
  previousCursor: z.nullable(z.string()).optional(),