@gr4vy/sdk 1.5.1 → 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 (211) 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 +16 -12
  39. package/models/components/index.d.ts.map +1 -1
  40. package/models/components/index.js +16 -12
  41. package/models/components/index.js.map +1 -1
  42. package/models/components/integrationclient.d.ts +24 -0
  43. package/models/components/integrationclient.d.ts.map +1 -0
  44. package/models/components/integrationclient.js +70 -0
  45. package/models/components/integrationclient.js.map +1 -0
  46. package/models/components/paymentlink.d.ts +3 -3
  47. package/models/components/paymentlink.d.ts.map +1 -1
  48. package/models/components/paymentlink.js +3 -3
  49. package/models/components/paymentlink.js.map +1 -1
  50. package/models/components/paymentmethodsummaries.d.ts +3 -3
  51. package/models/components/paymentmethodsummaries.d.ts.map +1 -1
  52. package/models/components/paymentmethodsummaries.js +3 -3
  53. package/models/components/paymentmethodsummaries.js.map +1 -1
  54. package/models/components/{paymentmethodsummary.d.ts → paymentmethodsummaryoutput.d.ts} +14 -14
  55. package/models/components/paymentmethodsummaryoutput.d.ts.map +1 -0
  56. package/models/components/{paymentmethodsummary.js → paymentmethodsummaryoutput.js} +17 -17
  57. package/models/components/paymentmethodsummaryoutput.js.map +1 -0
  58. package/models/components/{paymentoption.d.ts → paymentoptionoutput.d.ts} +14 -14
  59. package/models/components/paymentoptionoutput.d.ts.map +1 -0
  60. package/models/components/{paymentoption.js → paymentoptionoutput.js} +17 -17
  61. package/models/components/paymentoptionoutput.js.map +1 -0
  62. package/models/components/paymentoptions.d.ts +3 -3
  63. package/models/components/paymentoptions.d.ts.map +1 -1
  64. package/models/components/paymentoptions.js +3 -3
  65. package/models/components/paymentoptions.js.map +1 -1
  66. package/models/components/paymentservicedefinition.d.ts +6 -0
  67. package/models/components/paymentservicedefinition.d.ts.map +1 -1
  68. package/models/components/paymentservicedefinition.js +5 -0
  69. package/models/components/paymentservicedefinition.js.map +1 -1
  70. package/models/components/payoutsummary.d.ts +6 -6
  71. package/models/components/payoutsummary.d.ts.map +1 -1
  72. package/models/components/payoutsummary.js +6 -6
  73. package/models/components/payoutsummary.js.map +1 -1
  74. package/models/components/paypaloptions.d.ts +6 -0
  75. package/models/components/paypaloptions.d.ts.map +1 -1
  76. package/models/components/paypaloptions.js +3 -0
  77. package/models/components/paypaloptions.js.map +1 -1
  78. package/models/components/paypalshippingoptions.d.ts +33 -0
  79. package/models/components/paypalshippingoptions.d.ts.map +1 -0
  80. package/models/components/paypalshippingoptions.js +72 -0
  81. package/models/components/paypalshippingoptions.js.map +1 -0
  82. package/models/components/paypalshippingoptionsitem.d.ts +75 -0
  83. package/models/components/paypalshippingoptionsitem.d.ts.map +1 -0
  84. package/models/components/paypalshippingoptionsitem.js +107 -0
  85. package/models/components/paypalshippingoptionsitem.js.map +1 -0
  86. package/models/components/paypalshippingoptionsitemamount.d.ts +37 -0
  87. package/models/components/paypalshippingoptionsitemamount.d.ts.map +1 -0
  88. package/models/components/paypalshippingoptionsitemamount.js +80 -0
  89. package/models/components/paypalshippingoptionsitemamount.js.map +1 -0
  90. package/models/components/{transactionbuyer.d.ts → transactionbuyeroutput.d.ts} +14 -14
  91. package/models/components/transactionbuyeroutput.d.ts.map +1 -0
  92. package/models/components/{transactionbuyer.js → transactionbuyeroutput.js} +17 -17
  93. package/models/components/transactionbuyeroutput.js.map +1 -0
  94. package/models/components/transactioncancel.d.ts +3 -3
  95. package/models/components/transactioncancel.d.ts.map +1 -1
  96. package/models/components/transactioncancel.js +3 -3
  97. package/models/components/transactioncancel.js.map +1 -1
  98. package/models/components/transactioncaptureoutput.d.ts +56 -0
  99. package/models/components/transactioncaptureoutput.d.ts.map +1 -0
  100. package/models/components/{transactioncapture.js → transactioncaptureoutput.js} +20 -20
  101. package/models/components/transactioncaptureoutput.js.map +1 -0
  102. package/models/components/transactioncreate.d.ts +6 -0
  103. package/models/components/transactioncreate.d.ts.map +1 -1
  104. package/models/components/transactioncreate.js +5 -0
  105. package/models/components/transactioncreate.js.map +1 -1
  106. package/models/components/{transactionevent.d.ts → transactioneventoutput.d.ts} +14 -14
  107. package/models/components/transactioneventoutput.d.ts.map +1 -0
  108. package/models/components/{transactionevent.js → transactioneventoutput.js} +17 -17
  109. package/models/components/transactioneventoutput.js.map +1 -0
  110. package/models/components/transactionevents.d.ts +3 -3
  111. package/models/components/transactionevents.d.ts.map +1 -1
  112. package/models/components/transactionevents.js +3 -3
  113. package/models/components/transactionevents.js.map +1 -1
  114. package/models/components/{transaction.d.ts → transactionoutput.d.ts} +28 -23
  115. package/models/components/transactionoutput.d.ts.map +1 -0
  116. package/models/components/{transaction.js → transactionoutput.js} +32 -26
  117. package/models/components/transactionoutput.js.map +1 -0
  118. package/models/components/{transactionpaymentmethod.d.ts → transactionpaymentmethodoutput.d.ts} +14 -14
  119. package/models/components/transactionpaymentmethodoutput.d.ts.map +1 -0
  120. package/models/components/{transactionpaymentmethod.js → transactionpaymentmethodoutput.js} +17 -17
  121. package/models/components/transactionpaymentmethodoutput.js.map +1 -0
  122. package/models/components/transactionsummaries.d.ts +3 -3
  123. package/models/components/transactionsummaries.d.ts.map +1 -1
  124. package/models/components/transactionsummaries.js +3 -3
  125. package/models/components/transactionsummaries.js.map +1 -1
  126. package/models/components/{transactionsummary.d.ts → transactionsummaryoutput.d.ts} +20 -20
  127. package/models/components/transactionsummaryoutput.d.ts.map +1 -0
  128. package/models/components/{transactionsummary.js → transactionsummaryoutput.js} +25 -23
  129. package/models/components/transactionsummaryoutput.js.map +1 -0
  130. package/models/components/{transactionthreedsecuresummary.d.ts → transactionthreedsecuresummaryoutput.d.ts} +14 -14
  131. package/models/components/transactionthreedsecuresummaryoutput.d.ts.map +1 -0
  132. package/models/components/{transactionthreedsecuresummary.js → transactionthreedsecuresummaryoutput.js} +17 -17
  133. package/models/components/transactionthreedsecuresummaryoutput.js.map +1 -0
  134. package/models/components/transactionvoidoutput.d.ts +56 -0
  135. package/models/components/transactionvoidoutput.d.ts.map +1 -0
  136. package/models/components/{transactionvoid.js → transactionvoidoutput.js} +20 -20
  137. package/models/components/transactionvoidoutput.js.map +1 -0
  138. package/models/operations/capturetransaction.d.ts +2 -2
  139. package/models/operations/capturetransaction.d.ts.map +1 -1
  140. package/models/operations/capturetransaction.js +4 -4
  141. package/models/operations/capturetransaction.js.map +1 -1
  142. package/models/operations/voidtransaction.d.ts +2 -2
  143. package/models/operations/voidtransaction.d.ts.map +1 -1
  144. package/models/operations/voidtransaction.js +4 -4
  145. package/models/operations/voidtransaction.js.map +1 -1
  146. package/package.json +1 -1
  147. package/sdk/transactions.d.ts +4 -4
  148. package/sdk/transactions.d.ts.map +1 -1
  149. package/src/funcs/transactionsCreate.ts +4 -4
  150. package/src/funcs/transactionsGet.ts +4 -4
  151. package/src/funcs/transactionsSync.ts +4 -4
  152. package/src/funcs/transactionsUpdate.ts +4 -4
  153. package/src/lib/config.ts +3 -3
  154. package/src/models/components/auditlogentries.ts +9 -9
  155. package/src/models/components/{auditlogentry.ts → auditlogentryoutput.ts} +24 -20
  156. package/src/models/components/checkoutsession.ts +12 -9
  157. package/src/models/components/{checkoutsessionpaymentmethod.ts → checkoutsessionpaymentmethodoutput.ts} +24 -22
  158. package/src/models/components/index.ts +16 -12
  159. package/src/models/components/integrationclient.ts +50 -0
  160. package/src/models/components/paymentlink.ts +9 -9
  161. package/src/models/components/paymentmethodsummaries.ts +9 -9
  162. package/src/models/components/{paymentmethodsummary.ts → paymentmethodsummaryoutput.ts} +21 -21
  163. package/src/models/components/{paymentoption.ts → paymentoptionoutput.ts} +24 -20
  164. package/src/models/components/paymentoptions.ts +9 -9
  165. package/src/models/components/paymentservicedefinition.ts +18 -0
  166. package/src/models/components/payoutsummary.ts +18 -18
  167. package/src/models/components/paypaloptions.ts +13 -0
  168. package/src/models/components/paypalshippingoptions.ts +77 -0
  169. package/src/models/components/paypalshippingoptionsitem.ts +150 -0
  170. package/src/models/components/paypalshippingoptionsitemamount.ts +87 -0
  171. package/src/models/components/{transactionbuyer.ts → transactionbuyeroutput.ts} +21 -21
  172. package/src/models/components/transactioncancel.ts +9 -9
  173. package/src/models/components/{transactioncapture.ts → transactioncaptureoutput.ts} +30 -30
  174. package/src/models/components/transactioncreate.ts +14 -0
  175. package/src/models/components/{transactionevent.ts → transactioneventoutput.ts} +21 -21
  176. package/src/models/components/transactionevents.ts +9 -9
  177. package/src/models/components/{transaction.ts → transactionoutput.ts} +65 -47
  178. package/src/models/components/{transactionpaymentmethod.ts → transactionpaymentmethodoutput.ts} +23 -21
  179. package/src/models/components/transactionsummaries.ts +9 -9
  180. package/src/models/components/{transactionsummary.ts → transactionsummaryoutput.ts} +41 -39
  181. package/src/models/components/{transactionthreedsecuresummary.ts → transactionthreedsecuresummaryoutput.ts} +25 -22
  182. package/src/models/components/{transactionvoid.ts → transactionvoidoutput.ts} +32 -30
  183. package/src/models/operations/capturetransaction.ts +8 -8
  184. package/src/models/operations/voidtransaction.ts +8 -8
  185. package/src/sdk/transactions.ts +4 -4
  186. package/models/components/auditlogentry.d.ts.map +0 -1
  187. package/models/components/auditlogentry.js.map +0 -1
  188. package/models/components/checkoutsessionpaymentmethod.d.ts.map +0 -1
  189. package/models/components/checkoutsessionpaymentmethod.js.map +0 -1
  190. package/models/components/paymentmethodsummary.d.ts.map +0 -1
  191. package/models/components/paymentmethodsummary.js.map +0 -1
  192. package/models/components/paymentoption.d.ts.map +0 -1
  193. package/models/components/paymentoption.js.map +0 -1
  194. package/models/components/transaction.d.ts.map +0 -1
  195. package/models/components/transaction.js.map +0 -1
  196. package/models/components/transactionbuyer.d.ts.map +0 -1
  197. package/models/components/transactionbuyer.js.map +0 -1
  198. package/models/components/transactioncapture.d.ts +0 -56
  199. package/models/components/transactioncapture.d.ts.map +0 -1
  200. package/models/components/transactioncapture.js.map +0 -1
  201. package/models/components/transactionevent.d.ts.map +0 -1
  202. package/models/components/transactionevent.js.map +0 -1
  203. package/models/components/transactionpaymentmethod.d.ts.map +0 -1
  204. package/models/components/transactionpaymentmethod.js.map +0 -1
  205. package/models/components/transactionsummary.d.ts.map +0 -1
  206. package/models/components/transactionsummary.js.map +0 -1
  207. package/models/components/transactionthreedsecuresummary.d.ts.map +0 -1
  208. package/models/components/transactionthreedsecuresummary.js.map +0 -1
  209. package/models/components/transactionvoid.d.ts +0 -56
  210. package/models/components/transactionvoid.d.ts.map +0 -1
  211. package/models/components/transactionvoid.js.map +0 -1
@@ -0,0 +1,150 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import {
8
+ catchUnrecognizedEnum,
9
+ OpenEnum,
10
+ Unrecognized,
11
+ } from "../../types/enums.js";
12
+ import { Result as SafeParseResult } from "../../types/fp.js";
13
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
14
+ import {
15
+ PaypalShippingOptionsItemAmount,
16
+ PaypalShippingOptionsItemAmount$inboundSchema,
17
+ PaypalShippingOptionsItemAmount$Outbound,
18
+ PaypalShippingOptionsItemAmount$outboundSchema,
19
+ } from "./paypalshippingoptionsitemamount.js";
20
+
21
+ export const PaypalShippingOptionsItemType = {
22
+ Shipping: "SHIPPING",
23
+ Pickup: "PICKUP",
24
+ PickupInStore: "PICKUP_IN_STORE",
25
+ PickupFromPerson: "PICKUP_FROM_PERSON",
26
+ } as const;
27
+ export type PaypalShippingOptionsItemType = OpenEnum<
28
+ typeof PaypalShippingOptionsItemType
29
+ >;
30
+
31
+ export type PaypalShippingOptionsItem = {
32
+ /**
33
+ * A unique ID that identifies a payer-selected shipping option.
34
+ */
35
+ id: string;
36
+ /**
37
+ * A description that the payer sees, which helps them choose an appropriate shipping option.
38
+ */
39
+ label: string;
40
+ /**
41
+ * If the API request sets selected = true, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the shipping.options in the PayPal Checkout experience. Only one shipping.option can be set to selected=true.
42
+ */
43
+ selected: boolean;
44
+ /**
45
+ * A classification for the method of purchase fulfillment.
46
+ */
47
+ type?: PaypalShippingOptionsItemType | null | undefined;
48
+ /**
49
+ * The shipping cost for the selected option.
50
+ */
51
+ amount?: PaypalShippingOptionsItemAmount | null | undefined;
52
+ };
53
+
54
+ /** @internal */
55
+ export const PaypalShippingOptionsItemType$inboundSchema: z.ZodType<
56
+ PaypalShippingOptionsItemType,
57
+ z.ZodTypeDef,
58
+ unknown
59
+ > = z
60
+ .union([
61
+ z.nativeEnum(PaypalShippingOptionsItemType),
62
+ z.string().transform(catchUnrecognizedEnum),
63
+ ]);
64
+
65
+ /** @internal */
66
+ export const PaypalShippingOptionsItemType$outboundSchema: z.ZodType<
67
+ PaypalShippingOptionsItemType,
68
+ z.ZodTypeDef,
69
+ PaypalShippingOptionsItemType
70
+ > = z.union([
71
+ z.nativeEnum(PaypalShippingOptionsItemType),
72
+ z.string().and(z.custom<Unrecognized<string>>()),
73
+ ]);
74
+
75
+ /**
76
+ * @internal
77
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
78
+ */
79
+ export namespace PaypalShippingOptionsItemType$ {
80
+ /** @deprecated use `PaypalShippingOptionsItemType$inboundSchema` instead. */
81
+ export const inboundSchema = PaypalShippingOptionsItemType$inboundSchema;
82
+ /** @deprecated use `PaypalShippingOptionsItemType$outboundSchema` instead. */
83
+ export const outboundSchema = PaypalShippingOptionsItemType$outboundSchema;
84
+ }
85
+
86
+ /** @internal */
87
+ export const PaypalShippingOptionsItem$inboundSchema: z.ZodType<
88
+ PaypalShippingOptionsItem,
89
+ z.ZodTypeDef,
90
+ unknown
91
+ > = z.object({
92
+ id: z.string(),
93
+ label: z.string(),
94
+ selected: z.boolean(),
95
+ type: z.nullable(PaypalShippingOptionsItemType$inboundSchema).optional(),
96
+ amount: z.nullable(PaypalShippingOptionsItemAmount$inboundSchema).optional(),
97
+ });
98
+
99
+ /** @internal */
100
+ export type PaypalShippingOptionsItem$Outbound = {
101
+ id: string;
102
+ label: string;
103
+ selected: boolean;
104
+ type?: string | null | undefined;
105
+ amount?: PaypalShippingOptionsItemAmount$Outbound | null | undefined;
106
+ };
107
+
108
+ /** @internal */
109
+ export const PaypalShippingOptionsItem$outboundSchema: z.ZodType<
110
+ PaypalShippingOptionsItem$Outbound,
111
+ z.ZodTypeDef,
112
+ PaypalShippingOptionsItem
113
+ > = z.object({
114
+ id: z.string(),
115
+ label: z.string(),
116
+ selected: z.boolean(),
117
+ type: z.nullable(PaypalShippingOptionsItemType$outboundSchema).optional(),
118
+ amount: z.nullable(PaypalShippingOptionsItemAmount$outboundSchema).optional(),
119
+ });
120
+
121
+ /**
122
+ * @internal
123
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
124
+ */
125
+ export namespace PaypalShippingOptionsItem$ {
126
+ /** @deprecated use `PaypalShippingOptionsItem$inboundSchema` instead. */
127
+ export const inboundSchema = PaypalShippingOptionsItem$inboundSchema;
128
+ /** @deprecated use `PaypalShippingOptionsItem$outboundSchema` instead. */
129
+ export const outboundSchema = PaypalShippingOptionsItem$outboundSchema;
130
+ /** @deprecated use `PaypalShippingOptionsItem$Outbound` instead. */
131
+ export type Outbound = PaypalShippingOptionsItem$Outbound;
132
+ }
133
+
134
+ export function paypalShippingOptionsItemToJSON(
135
+ paypalShippingOptionsItem: PaypalShippingOptionsItem,
136
+ ): string {
137
+ return JSON.stringify(
138
+ PaypalShippingOptionsItem$outboundSchema.parse(paypalShippingOptionsItem),
139
+ );
140
+ }
141
+
142
+ export function paypalShippingOptionsItemFromJSON(
143
+ jsonString: string,
144
+ ): SafeParseResult<PaypalShippingOptionsItem, SDKValidationError> {
145
+ return safeParse(
146
+ jsonString,
147
+ (x) => PaypalShippingOptionsItem$inboundSchema.parse(JSON.parse(x)),
148
+ `Failed to parse 'PaypalShippingOptionsItem' from JSON`,
149
+ );
150
+ }
@@ -0,0 +1,87 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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";
10
+
11
+ export type PaypalShippingOptionsItemAmount = {
12
+ /**
13
+ * The three-character ISO currency code.
14
+ */
15
+ currencyCode: string;
16
+ /**
17
+ * The amount value, which might include a decimal portion.
18
+ */
19
+ value: string;
20
+ };
21
+
22
+ /** @internal */
23
+ export const PaypalShippingOptionsItemAmount$inboundSchema: z.ZodType<
24
+ PaypalShippingOptionsItemAmount,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ currency_code: z.string(),
29
+ value: z.string(),
30
+ }).transform((v) => {
31
+ return remap$(v, {
32
+ "currency_code": "currencyCode",
33
+ });
34
+ });
35
+
36
+ /** @internal */
37
+ export type PaypalShippingOptionsItemAmount$Outbound = {
38
+ currency_code: string;
39
+ value: string;
40
+ };
41
+
42
+ /** @internal */
43
+ export const PaypalShippingOptionsItemAmount$outboundSchema: z.ZodType<
44
+ PaypalShippingOptionsItemAmount$Outbound,
45
+ z.ZodTypeDef,
46
+ PaypalShippingOptionsItemAmount
47
+ > = z.object({
48
+ currencyCode: z.string(),
49
+ value: z.string(),
50
+ }).transform((v) => {
51
+ return remap$(v, {
52
+ currencyCode: "currency_code",
53
+ });
54
+ });
55
+
56
+ /**
57
+ * @internal
58
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
59
+ */
60
+ export namespace PaypalShippingOptionsItemAmount$ {
61
+ /** @deprecated use `PaypalShippingOptionsItemAmount$inboundSchema` instead. */
62
+ export const inboundSchema = PaypalShippingOptionsItemAmount$inboundSchema;
63
+ /** @deprecated use `PaypalShippingOptionsItemAmount$outboundSchema` instead. */
64
+ export const outboundSchema = PaypalShippingOptionsItemAmount$outboundSchema;
65
+ /** @deprecated use `PaypalShippingOptionsItemAmount$Outbound` instead. */
66
+ export type Outbound = PaypalShippingOptionsItemAmount$Outbound;
67
+ }
68
+
69
+ export function paypalShippingOptionsItemAmountToJSON(
70
+ paypalShippingOptionsItemAmount: PaypalShippingOptionsItemAmount,
71
+ ): string {
72
+ return JSON.stringify(
73
+ PaypalShippingOptionsItemAmount$outboundSchema.parse(
74
+ paypalShippingOptionsItemAmount,
75
+ ),
76
+ );
77
+ }
78
+
79
+ export function paypalShippingOptionsItemAmountFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<PaypalShippingOptionsItemAmount, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => PaypalShippingOptionsItemAmount$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'PaypalShippingOptionsItemAmount' from JSON`,
86
+ );
87
+ }
@@ -14,7 +14,7 @@ import {
14
14
  BillingDetailsOutput$outboundSchema,
15
15
  } from "./billingdetailsoutput.js";
16
16
 
17
- export type TransactionBuyer = {
17
+ export type TransactionBuyerOutput = {
18
18
  /**
19
19
  * Always `buyer`.
20
20
  */
@@ -42,8 +42,8 @@ export type TransactionBuyer = {
42
42
  };
43
43
 
44
44
  /** @internal */
45
- export const TransactionBuyer$inboundSchema: z.ZodType<
46
- TransactionBuyer,
45
+ export const TransactionBuyerOutput$inboundSchema: z.ZodType<
46
+ TransactionBuyerOutput,
47
47
  z.ZodTypeDef,
48
48
  unknown
49
49
  > = z.object({
@@ -63,7 +63,7 @@ export const TransactionBuyer$inboundSchema: z.ZodType<
63
63
  });
64
64
 
65
65
  /** @internal */
66
- export type TransactionBuyer$Outbound = {
66
+ export type TransactionBuyerOutput$Outbound = {
67
67
  type: "buyer";
68
68
  id?: string | null | undefined;
69
69
  display_name?: string | null | undefined;
@@ -73,10 +73,10 @@ export type TransactionBuyer$Outbound = {
73
73
  };
74
74
 
75
75
  /** @internal */
76
- export const TransactionBuyer$outboundSchema: z.ZodType<
77
- TransactionBuyer$Outbound,
76
+ export const TransactionBuyerOutput$outboundSchema: z.ZodType<
77
+ TransactionBuyerOutput$Outbound,
78
78
  z.ZodTypeDef,
79
- TransactionBuyer
79
+ TransactionBuyerOutput
80
80
  > = z.object({
81
81
  type: z.literal("buyer").default("buyer" as const),
82
82
  id: z.nullable(z.string()).optional(),
@@ -97,29 +97,29 @@ export const TransactionBuyer$outboundSchema: z.ZodType<
97
97
  * @internal
98
98
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
99
99
  */
100
- export namespace TransactionBuyer$ {
101
- /** @deprecated use `TransactionBuyer$inboundSchema` instead. */
102
- export const inboundSchema = TransactionBuyer$inboundSchema;
103
- /** @deprecated use `TransactionBuyer$outboundSchema` instead. */
104
- export const outboundSchema = TransactionBuyer$outboundSchema;
105
- /** @deprecated use `TransactionBuyer$Outbound` instead. */
106
- export type Outbound = TransactionBuyer$Outbound;
100
+ export namespace TransactionBuyerOutput$ {
101
+ /** @deprecated use `TransactionBuyerOutput$inboundSchema` instead. */
102
+ export const inboundSchema = TransactionBuyerOutput$inboundSchema;
103
+ /** @deprecated use `TransactionBuyerOutput$outboundSchema` instead. */
104
+ export const outboundSchema = TransactionBuyerOutput$outboundSchema;
105
+ /** @deprecated use `TransactionBuyerOutput$Outbound` instead. */
106
+ export type Outbound = TransactionBuyerOutput$Outbound;
107
107
  }
108
108
 
109
- export function transactionBuyerToJSON(
110
- transactionBuyer: TransactionBuyer,
109
+ export function transactionBuyerOutputToJSON(
110
+ transactionBuyerOutput: TransactionBuyerOutput,
111
111
  ): string {
112
112
  return JSON.stringify(
113
- TransactionBuyer$outboundSchema.parse(transactionBuyer),
113
+ TransactionBuyerOutput$outboundSchema.parse(transactionBuyerOutput),
114
114
  );
115
115
  }
116
116
 
117
- export function transactionBuyerFromJSON(
117
+ export function transactionBuyerOutputFromJSON(
118
118
  jsonString: string,
119
- ): SafeParseResult<TransactionBuyer, SDKValidationError> {
119
+ ): SafeParseResult<TransactionBuyerOutput, SDKValidationError> {
120
120
  return safeParse(
121
121
  jsonString,
122
- (x) => TransactionBuyer$inboundSchema.parse(JSON.parse(x)),
123
- `Failed to parse 'TransactionBuyer' from JSON`,
122
+ (x) => TransactionBuyerOutput$inboundSchema.parse(JSON.parse(x)),
123
+ `Failed to parse 'TransactionBuyerOutput' from JSON`,
124
124
  );
125
125
  }
@@ -13,11 +13,11 @@ import {
13
13
  CancelStatus$outboundSchema,
14
14
  } from "./cancelstatus.js";
15
15
  import {
16
- Transaction,
17
- Transaction$inboundSchema,
18
- Transaction$Outbound,
19
- Transaction$outboundSchema,
20
- } from "./transaction.js";
16
+ TransactionOutput,
17
+ TransactionOutput$inboundSchema,
18
+ TransactionOutput$Outbound,
19
+ TransactionOutput$outboundSchema,
20
+ } from "./transactionoutput.js";
21
21
 
22
22
  export type TransactionCancel = {
23
23
  /**
@@ -40,7 +40,7 @@ export type TransactionCancel = {
40
40
  /**
41
41
  * A full transaction resource.
42
42
  */
43
- transaction: Transaction;
43
+ transaction: TransactionOutput;
44
44
  };
45
45
 
46
46
  /** @internal */
@@ -54,7 +54,7 @@ export const TransactionCancel$inboundSchema: z.ZodType<
54
54
  code: z.nullable(z.string()),
55
55
  raw_response_code: z.nullable(z.string()),
56
56
  raw_response_description: z.nullable(z.string()),
57
- transaction: Transaction$inboundSchema,
57
+ transaction: TransactionOutput$inboundSchema,
58
58
  }).transform((v) => {
59
59
  return remap$(v, {
60
60
  "raw_response_code": "rawResponseCode",
@@ -69,7 +69,7 @@ export type TransactionCancel$Outbound = {
69
69
  code: string | null;
70
70
  raw_response_code: string | null;
71
71
  raw_response_description: string | null;
72
- transaction: Transaction$Outbound;
72
+ transaction: TransactionOutput$Outbound;
73
73
  };
74
74
 
75
75
  /** @internal */
@@ -83,7 +83,7 @@ export const TransactionCancel$outboundSchema: z.ZodType<
83
83
  code: z.nullable(z.string()),
84
84
  rawResponseCode: z.nullable(z.string()),
85
85
  rawResponseDescription: z.nullable(z.string()),
86
- transaction: Transaction$outboundSchema,
86
+ transaction: TransactionOutput$outboundSchema,
87
87
  }).transform((v) => {
88
88
  return remap$(v, {
89
89
  rawResponseCode: "raw_response_code",
@@ -13,13 +13,13 @@ import {
13
13
  CaptureStatus$outboundSchema,
14
14
  } from "./capturestatus.js";
15
15
  import {
16
- Transaction,
17
- Transaction$inboundSchema,
18
- Transaction$Outbound,
19
- Transaction$outboundSchema,
20
- } from "./transaction.js";
16
+ TransactionOutput,
17
+ TransactionOutput$inboundSchema,
18
+ TransactionOutput$Outbound,
19
+ TransactionOutput$outboundSchema,
20
+ } from "./transactionoutput.js";
21
21
 
22
- export type TransactionCapture = {
22
+ export type TransactionCaptureOutput = {
23
23
  /**
24
24
  * Always `transaction-capture`.
25
25
  */
@@ -40,12 +40,12 @@ export type TransactionCapture = {
40
40
  /**
41
41
  * A full transaction resource.
42
42
  */
43
- transaction: Transaction;
43
+ transaction: TransactionOutput;
44
44
  };
45
45
 
46
46
  /** @internal */
47
- export const TransactionCapture$inboundSchema: z.ZodType<
48
- TransactionCapture,
47
+ export const TransactionCaptureOutput$inboundSchema: z.ZodType<
48
+ TransactionCaptureOutput,
49
49
  z.ZodTypeDef,
50
50
  unknown
51
51
  > = z.object({
@@ -54,7 +54,7 @@ export const TransactionCapture$inboundSchema: z.ZodType<
54
54
  code: z.nullable(z.string()),
55
55
  raw_response_code: z.nullable(z.string()),
56
56
  raw_response_description: z.nullable(z.string()),
57
- transaction: Transaction$inboundSchema,
57
+ transaction: TransactionOutput$inboundSchema,
58
58
  }).transform((v) => {
59
59
  return remap$(v, {
60
60
  "raw_response_code": "rawResponseCode",
@@ -63,20 +63,20 @@ export const TransactionCapture$inboundSchema: z.ZodType<
63
63
  });
64
64
 
65
65
  /** @internal */
66
- export type TransactionCapture$Outbound = {
66
+ export type TransactionCaptureOutput$Outbound = {
67
67
  type: "transaction-capture";
68
68
  status: string;
69
69
  code: string | null;
70
70
  raw_response_code: string | null;
71
71
  raw_response_description: string | null;
72
- transaction: Transaction$Outbound;
72
+ transaction: TransactionOutput$Outbound;
73
73
  };
74
74
 
75
75
  /** @internal */
76
- export const TransactionCapture$outboundSchema: z.ZodType<
77
- TransactionCapture$Outbound,
76
+ export const TransactionCaptureOutput$outboundSchema: z.ZodType<
77
+ TransactionCaptureOutput$Outbound,
78
78
  z.ZodTypeDef,
79
- TransactionCapture
79
+ TransactionCaptureOutput
80
80
  > = z.object({
81
81
  type: z.literal("transaction-capture").default(
82
82
  "transaction-capture" as const,
@@ -85,7 +85,7 @@ export const TransactionCapture$outboundSchema: z.ZodType<
85
85
  code: z.nullable(z.string()),
86
86
  rawResponseCode: z.nullable(z.string()),
87
87
  rawResponseDescription: z.nullable(z.string()),
88
- transaction: Transaction$outboundSchema,
88
+ transaction: TransactionOutput$outboundSchema,
89
89
  }).transform((v) => {
90
90
  return remap$(v, {
91
91
  rawResponseCode: "raw_response_code",
@@ -97,29 +97,29 @@ export const TransactionCapture$outboundSchema: z.ZodType<
97
97
  * @internal
98
98
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
99
99
  */
100
- export namespace TransactionCapture$ {
101
- /** @deprecated use `TransactionCapture$inboundSchema` instead. */
102
- export const inboundSchema = TransactionCapture$inboundSchema;
103
- /** @deprecated use `TransactionCapture$outboundSchema` instead. */
104
- export const outboundSchema = TransactionCapture$outboundSchema;
105
- /** @deprecated use `TransactionCapture$Outbound` instead. */
106
- export type Outbound = TransactionCapture$Outbound;
100
+ export namespace TransactionCaptureOutput$ {
101
+ /** @deprecated use `TransactionCaptureOutput$inboundSchema` instead. */
102
+ export const inboundSchema = TransactionCaptureOutput$inboundSchema;
103
+ /** @deprecated use `TransactionCaptureOutput$outboundSchema` instead. */
104
+ export const outboundSchema = TransactionCaptureOutput$outboundSchema;
105
+ /** @deprecated use `TransactionCaptureOutput$Outbound` instead. */
106
+ export type Outbound = TransactionCaptureOutput$Outbound;
107
107
  }
108
108
 
109
- export function transactionCaptureToJSON(
110
- transactionCapture: TransactionCapture,
109
+ export function transactionCaptureOutputToJSON(
110
+ transactionCaptureOutput: TransactionCaptureOutput,
111
111
  ): string {
112
112
  return JSON.stringify(
113
- TransactionCapture$outboundSchema.parse(transactionCapture),
113
+ TransactionCaptureOutput$outboundSchema.parse(transactionCaptureOutput),
114
114
  );
115
115
  }
116
116
 
117
- export function transactionCaptureFromJSON(
117
+ export function transactionCaptureOutputFromJSON(
118
118
  jsonString: string,
119
- ): SafeParseResult<TransactionCapture, SDKValidationError> {
119
+ ): SafeParseResult<TransactionCaptureOutput, SDKValidationError> {
120
120
  return safeParse(
121
121
  jsonString,
122
- (x) => TransactionCapture$inboundSchema.parse(JSON.parse(x)),
123
- `Failed to parse 'TransactionCapture' from JSON`,
122
+ (x) => TransactionCaptureOutput$inboundSchema.parse(JSON.parse(x)),
123
+ `Failed to parse 'TransactionCaptureOutput' from JSON`,
124
124
  );
125
125
  }
@@ -85,6 +85,11 @@ import {
85
85
  GuestBuyerInput$Outbound,
86
86
  GuestBuyerInput$outboundSchema,
87
87
  } from "./guestbuyerinput.js";
88
+ import {
89
+ IntegrationClient,
90
+ IntegrationClient$inboundSchema,
91
+ IntegrationClient$outboundSchema,
92
+ } from "./integrationclient.js";
88
93
  import {
89
94
  NetworkTokenPaymentMethodCreate,
90
95
  NetworkTokenPaymentMethodCreate$inboundSchema,
@@ -353,6 +358,10 @@ export type TransactionCreate = {
353
358
  * Total shipping amount.
354
359
  */
355
360
  shippingAmount?: number | null | undefined;
361
+ /**
362
+ * Defines the client where the session for this transaction is going to be used. Please refer to the connections documentation for more guidance.
363
+ */
364
+ integrationClient?: IntegrationClient | null | undefined;
356
365
  };
357
366
 
358
367
  /** @internal */
@@ -619,6 +628,7 @@ export const TransactionCreate$inboundSchema: z.ZodType<
619
628
  supplier_order_number: z.nullable(z.string()).optional(),
620
629
  duty_amount: z.nullable(z.number().int()).optional(),
621
630
  shipping_amount: z.nullable(z.number().int()).optional(),
631
+ integration_client: z.nullable(IntegrationClient$inboundSchema).optional(),
622
632
  }).transform((v) => {
623
633
  return remap$(v, {
624
634
  "payment_method": "paymentMethod",
@@ -649,6 +659,7 @@ export const TransactionCreate$inboundSchema: z.ZodType<
649
659
  "supplier_order_number": "supplierOrderNumber",
650
660
  "duty_amount": "dutyAmount",
651
661
  "shipping_amount": "shippingAmount",
662
+ "integration_client": "integrationClient",
652
663
  });
653
664
  });
654
665
 
@@ -713,6 +724,7 @@ export type TransactionCreate$Outbound = {
713
724
  supplier_order_number?: string | null | undefined;
714
725
  duty_amount?: number | null | undefined;
715
726
  shipping_amount?: number | null | undefined;
727
+ integration_client?: string | null | undefined;
716
728
  };
717
729
 
718
730
  /** @internal */
@@ -785,6 +797,7 @@ export const TransactionCreate$outboundSchema: z.ZodType<
785
797
  supplierOrderNumber: z.nullable(z.string()).optional(),
786
798
  dutyAmount: z.nullable(z.number().int()).optional(),
787
799
  shippingAmount: z.nullable(z.number().int()).optional(),
800
+ integrationClient: z.nullable(IntegrationClient$outboundSchema).optional(),
788
801
  }).transform((v) => {
789
802
  return remap$(v, {
790
803
  paymentMethod: "payment_method",
@@ -815,6 +828,7 @@ export const TransactionCreate$outboundSchema: z.ZodType<
815
828
  supplierOrderNumber: "supplier_order_number",
816
829
  dutyAmount: "duty_amount",
817
830
  shippingAmount: "shipping_amount",
831
+ integrationClient: "integration_client",
818
832
  });
819
833
  });
820
834
 
@@ -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
  }