@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.
- package/docs/sdks/transactions/README.md +4 -4
- package/examples/package-lock.json +1 -1
- package/funcs/transactionsCreate.d.ts +1 -1
- package/funcs/transactionsCreate.d.ts.map +1 -1
- package/funcs/transactionsCreate.js +1 -1
- package/funcs/transactionsCreate.js.map +1 -1
- package/funcs/transactionsGet.d.ts +1 -1
- package/funcs/transactionsGet.d.ts.map +1 -1
- package/funcs/transactionsGet.js +1 -1
- package/funcs/transactionsGet.js.map +1 -1
- package/funcs/transactionsSync.d.ts +1 -1
- package/funcs/transactionsSync.d.ts.map +1 -1
- package/funcs/transactionsSync.js +1 -1
- package/funcs/transactionsSync.js.map +1 -1
- package/funcs/transactionsUpdate.d.ts +1 -1
- package/funcs/transactionsUpdate.d.ts.map +1 -1
- package/funcs/transactionsUpdate.js +1 -1
- package/funcs/transactionsUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/auditlogentries.d.ts +3 -3
- package/models/components/auditlogentries.d.ts.map +1 -1
- package/models/components/auditlogentries.js +3 -3
- package/models/components/auditlogentries.js.map +1 -1
- package/models/components/{auditlogentry.d.ts → auditlogentryoutput.d.ts} +14 -14
- package/models/components/auditlogentryoutput.d.ts.map +1 -0
- package/models/components/{auditlogentry.js → auditlogentryoutput.js} +17 -17
- package/models/components/auditlogentryoutput.js.map +1 -0
- package/models/components/checkoutsession.d.ts +3 -3
- package/models/components/checkoutsession.d.ts.map +1 -1
- package/models/components/checkoutsession.js +3 -3
- package/models/components/checkoutsession.js.map +1 -1
- package/models/components/{checkoutsessionpaymentmethod.d.ts → checkoutsessionpaymentmethodoutput.d.ts} +14 -14
- package/models/components/checkoutsessionpaymentmethodoutput.d.ts.map +1 -0
- package/models/components/{checkoutsessionpaymentmethod.js → checkoutsessionpaymentmethodoutput.js} +17 -17
- package/models/components/checkoutsessionpaymentmethodoutput.js.map +1 -0
- package/models/components/index.d.ts +16 -12
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +16 -12
- package/models/components/index.js.map +1 -1
- package/models/components/integrationclient.d.ts +24 -0
- package/models/components/integrationclient.d.ts.map +1 -0
- package/models/components/integrationclient.js +70 -0
- package/models/components/integrationclient.js.map +1 -0
- package/models/components/paymentlink.d.ts +3 -3
- package/models/components/paymentlink.d.ts.map +1 -1
- package/models/components/paymentlink.js +3 -3
- package/models/components/paymentlink.js.map +1 -1
- package/models/components/paymentmethodsummaries.d.ts +3 -3
- package/models/components/paymentmethodsummaries.d.ts.map +1 -1
- package/models/components/paymentmethodsummaries.js +3 -3
- package/models/components/paymentmethodsummaries.js.map +1 -1
- package/models/components/{paymentmethodsummary.d.ts → paymentmethodsummaryoutput.d.ts} +14 -14
- package/models/components/paymentmethodsummaryoutput.d.ts.map +1 -0
- package/models/components/{paymentmethodsummary.js → paymentmethodsummaryoutput.js} +17 -17
- package/models/components/paymentmethodsummaryoutput.js.map +1 -0
- package/models/components/{paymentoption.d.ts → paymentoptionoutput.d.ts} +14 -14
- package/models/components/paymentoptionoutput.d.ts.map +1 -0
- package/models/components/{paymentoption.js → paymentoptionoutput.js} +17 -17
- package/models/components/paymentoptionoutput.js.map +1 -0
- package/models/components/paymentoptions.d.ts +3 -3
- package/models/components/paymentoptions.d.ts.map +1 -1
- package/models/components/paymentoptions.js +3 -3
- package/models/components/paymentoptions.js.map +1 -1
- package/models/components/paymentservicedefinition.d.ts +6 -0
- package/models/components/paymentservicedefinition.d.ts.map +1 -1
- package/models/components/paymentservicedefinition.js +5 -0
- package/models/components/paymentservicedefinition.js.map +1 -1
- package/models/components/payoutsummary.d.ts +6 -6
- package/models/components/payoutsummary.d.ts.map +1 -1
- package/models/components/payoutsummary.js +6 -6
- package/models/components/payoutsummary.js.map +1 -1
- package/models/components/paypaloptions.d.ts +6 -0
- package/models/components/paypaloptions.d.ts.map +1 -1
- package/models/components/paypaloptions.js +3 -0
- package/models/components/paypaloptions.js.map +1 -1
- package/models/components/paypalshippingoptions.d.ts +33 -0
- package/models/components/paypalshippingoptions.d.ts.map +1 -0
- package/models/components/paypalshippingoptions.js +72 -0
- package/models/components/paypalshippingoptions.js.map +1 -0
- package/models/components/paypalshippingoptionsitem.d.ts +75 -0
- package/models/components/paypalshippingoptionsitem.d.ts.map +1 -0
- package/models/components/paypalshippingoptionsitem.js +107 -0
- package/models/components/paypalshippingoptionsitem.js.map +1 -0
- package/models/components/paypalshippingoptionsitemamount.d.ts +37 -0
- package/models/components/paypalshippingoptionsitemamount.d.ts.map +1 -0
- package/models/components/paypalshippingoptionsitemamount.js +80 -0
- package/models/components/paypalshippingoptionsitemamount.js.map +1 -0
- package/models/components/{transactionbuyer.d.ts → transactionbuyeroutput.d.ts} +14 -14
- package/models/components/transactionbuyeroutput.d.ts.map +1 -0
- package/models/components/{transactionbuyer.js → transactionbuyeroutput.js} +17 -17
- package/models/components/transactionbuyeroutput.js.map +1 -0
- package/models/components/transactioncancel.d.ts +3 -3
- package/models/components/transactioncancel.d.ts.map +1 -1
- package/models/components/transactioncancel.js +3 -3
- package/models/components/transactioncancel.js.map +1 -1
- package/models/components/transactioncaptureoutput.d.ts +56 -0
- package/models/components/transactioncaptureoutput.d.ts.map +1 -0
- package/models/components/{transactioncapture.js → transactioncaptureoutput.js} +20 -20
- package/models/components/transactioncaptureoutput.js.map +1 -0
- package/models/components/transactioncreate.d.ts +6 -0
- package/models/components/transactioncreate.d.ts.map +1 -1
- package/models/components/transactioncreate.js +5 -0
- package/models/components/transactioncreate.js.map +1 -1
- package/models/components/{transactionevent.d.ts → transactioneventoutput.d.ts} +14 -14
- package/models/components/transactioneventoutput.d.ts.map +1 -0
- package/models/components/{transactionevent.js → transactioneventoutput.js} +17 -17
- package/models/components/transactioneventoutput.js.map +1 -0
- package/models/components/transactionevents.d.ts +3 -3
- package/models/components/transactionevents.d.ts.map +1 -1
- package/models/components/transactionevents.js +3 -3
- package/models/components/transactionevents.js.map +1 -1
- package/models/components/{transaction.d.ts → transactionoutput.d.ts} +28 -23
- package/models/components/transactionoutput.d.ts.map +1 -0
- package/models/components/{transaction.js → transactionoutput.js} +32 -26
- package/models/components/transactionoutput.js.map +1 -0
- package/models/components/{transactionpaymentmethod.d.ts → transactionpaymentmethodoutput.d.ts} +14 -14
- package/models/components/transactionpaymentmethodoutput.d.ts.map +1 -0
- package/models/components/{transactionpaymentmethod.js → transactionpaymentmethodoutput.js} +17 -17
- package/models/components/transactionpaymentmethodoutput.js.map +1 -0
- package/models/components/transactionsummaries.d.ts +3 -3
- package/models/components/transactionsummaries.d.ts.map +1 -1
- package/models/components/transactionsummaries.js +3 -3
- package/models/components/transactionsummaries.js.map +1 -1
- package/models/components/{transactionsummary.d.ts → transactionsummaryoutput.d.ts} +20 -20
- package/models/components/transactionsummaryoutput.d.ts.map +1 -0
- package/models/components/{transactionsummary.js → transactionsummaryoutput.js} +25 -23
- package/models/components/transactionsummaryoutput.js.map +1 -0
- package/models/components/{transactionthreedsecuresummary.d.ts → transactionthreedsecuresummaryoutput.d.ts} +14 -14
- package/models/components/transactionthreedsecuresummaryoutput.d.ts.map +1 -0
- package/models/components/{transactionthreedsecuresummary.js → transactionthreedsecuresummaryoutput.js} +17 -17
- package/models/components/transactionthreedsecuresummaryoutput.js.map +1 -0
- package/models/components/transactionvoidoutput.d.ts +56 -0
- package/models/components/transactionvoidoutput.d.ts.map +1 -0
- package/models/components/{transactionvoid.js → transactionvoidoutput.js} +20 -20
- package/models/components/transactionvoidoutput.js.map +1 -0
- package/models/operations/capturetransaction.d.ts +2 -2
- package/models/operations/capturetransaction.d.ts.map +1 -1
- package/models/operations/capturetransaction.js +4 -4
- package/models/operations/capturetransaction.js.map +1 -1
- package/models/operations/voidtransaction.d.ts +2 -2
- package/models/operations/voidtransaction.d.ts.map +1 -1
- package/models/operations/voidtransaction.js +4 -4
- package/models/operations/voidtransaction.js.map +1 -1
- package/package.json +1 -1
- package/sdk/transactions.d.ts +4 -4
- package/sdk/transactions.d.ts.map +1 -1
- package/src/funcs/transactionsCreate.ts +4 -4
- package/src/funcs/transactionsGet.ts +4 -4
- package/src/funcs/transactionsSync.ts +4 -4
- package/src/funcs/transactionsUpdate.ts +4 -4
- package/src/lib/config.ts +3 -3
- package/src/models/components/auditlogentries.ts +9 -9
- package/src/models/components/{auditlogentry.ts → auditlogentryoutput.ts} +24 -20
- package/src/models/components/checkoutsession.ts +12 -9
- package/src/models/components/{checkoutsessionpaymentmethod.ts → checkoutsessionpaymentmethodoutput.ts} +24 -22
- package/src/models/components/index.ts +16 -12
- package/src/models/components/integrationclient.ts +50 -0
- package/src/models/components/paymentlink.ts +9 -9
- package/src/models/components/paymentmethodsummaries.ts +9 -9
- package/src/models/components/{paymentmethodsummary.ts → paymentmethodsummaryoutput.ts} +21 -21
- package/src/models/components/{paymentoption.ts → paymentoptionoutput.ts} +24 -20
- package/src/models/components/paymentoptions.ts +9 -9
- package/src/models/components/paymentservicedefinition.ts +18 -0
- package/src/models/components/payoutsummary.ts +18 -18
- package/src/models/components/paypaloptions.ts +13 -0
- package/src/models/components/paypalshippingoptions.ts +77 -0
- package/src/models/components/paypalshippingoptionsitem.ts +150 -0
- package/src/models/components/paypalshippingoptionsitemamount.ts +87 -0
- package/src/models/components/{transactionbuyer.ts → transactionbuyeroutput.ts} +21 -21
- package/src/models/components/transactioncancel.ts +9 -9
- package/src/models/components/{transactioncapture.ts → transactioncaptureoutput.ts} +30 -30
- package/src/models/components/transactioncreate.ts +14 -0
- package/src/models/components/{transactionevent.ts → transactioneventoutput.ts} +21 -21
- package/src/models/components/transactionevents.ts +9 -9
- package/src/models/components/{transaction.ts → transactionoutput.ts} +65 -47
- package/src/models/components/{transactionpaymentmethod.ts → transactionpaymentmethodoutput.ts} +23 -21
- package/src/models/components/transactionsummaries.ts +9 -9
- package/src/models/components/{transactionsummary.ts → transactionsummaryoutput.ts} +41 -39
- package/src/models/components/{transactionthreedsecuresummary.ts → transactionthreedsecuresummaryoutput.ts} +25 -22
- package/src/models/components/{transactionvoid.ts → transactionvoidoutput.ts} +32 -30
- package/src/models/operations/capturetransaction.ts +8 -8
- package/src/models/operations/voidtransaction.ts +8 -8
- package/src/sdk/transactions.ts +4 -4
- package/models/components/auditlogentry.d.ts.map +0 -1
- package/models/components/auditlogentry.js.map +0 -1
- package/models/components/checkoutsessionpaymentmethod.d.ts.map +0 -1
- package/models/components/checkoutsessionpaymentmethod.js.map +0 -1
- package/models/components/paymentmethodsummary.d.ts.map +0 -1
- package/models/components/paymentmethodsummary.js.map +0 -1
- package/models/components/paymentoption.d.ts.map +0 -1
- package/models/components/paymentoption.js.map +0 -1
- package/models/components/transaction.d.ts.map +0 -1
- package/models/components/transaction.js.map +0 -1
- package/models/components/transactionbuyer.d.ts.map +0 -1
- package/models/components/transactionbuyer.js.map +0 -1
- package/models/components/transactioncapture.d.ts +0 -56
- package/models/components/transactioncapture.d.ts.map +0 -1
- package/models/components/transactioncapture.js.map +0 -1
- package/models/components/transactionevent.d.ts.map +0 -1
- package/models/components/transactionevent.js.map +0 -1
- package/models/components/transactionpaymentmethod.d.ts.map +0 -1
- package/models/components/transactionpaymentmethod.js.map +0 -1
- package/models/components/transactionsummary.d.ts.map +0 -1
- package/models/components/transactionsummary.js.map +0 -1
- package/models/components/transactionthreedsecuresummary.d.ts.map +0 -1
- package/models/components/transactionthreedsecuresummary.js.map +0 -1
- package/models/components/transactionvoid.d.ts +0 -56
- package/models/components/transactionvoid.d.ts.map +0 -1
- package/models/components/transactionvoid.js.map +0 -1
|
@@ -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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
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<
|
|
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(
|
|
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<
|
|
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(
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
} from "./
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
} from "./
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
} from "./
|
|
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
|
|
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?:
|
|
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?:
|
|
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?:
|
|
295
|
+
threeDSecure?: TransactionThreeDSecureSummaryOutput | null | undefined;
|
|
296
296
|
/**
|
|
297
297
|
* The payment service's unique ID for the transaction.
|
|
298
298
|
*/
|
|
@@ -350,6 +350,10 @@ export type Transaction = {
|
|
|
350
350
|
* The number of installments for this transaction, if applicable.
|
|
351
351
|
*/
|
|
352
352
|
installmentCount?: number | null | undefined;
|
|
353
|
+
/**
|
|
354
|
+
* A session token that can be used to fetch session data for direct client integrations.
|
|
355
|
+
*/
|
|
356
|
+
sessionToken?: string | null | undefined;
|
|
353
357
|
/**
|
|
354
358
|
* The sales tax amount for this transaction, represented as a monetary amount in the smallest currency unit for the given currency, for example `1299` cents to create an authorization for `$12.99`
|
|
355
359
|
*/
|
|
@@ -381,8 +385,8 @@ export type Transaction = {
|
|
|
381
385
|
};
|
|
382
386
|
|
|
383
387
|
/** @internal */
|
|
384
|
-
export const
|
|
385
|
-
|
|
388
|
+
export const TransactionOutput$inboundSchema: z.ZodType<
|
|
389
|
+
TransactionOutput,
|
|
386
390
|
z.ZodTypeDef,
|
|
387
391
|
unknown
|
|
388
392
|
> = z.object({
|
|
@@ -402,14 +406,15 @@ export const Transaction$inboundSchema: z.ZodType<
|
|
|
402
406
|
country: z.nullable(z.string()).optional(),
|
|
403
407
|
external_identifier: z.nullable(z.string()).optional(),
|
|
404
408
|
intent: TransactionIntent$inboundSchema,
|
|
405
|
-
payment_method: z.nullable(
|
|
409
|
+
payment_method: z.nullable(TransactionPaymentMethodOutput$inboundSchema)
|
|
410
|
+
.optional(),
|
|
406
411
|
method: z.nullable(Method$inboundSchema).optional(),
|
|
407
412
|
instrument_type: z.nullable(InstrumentType$inboundSchema).optional(),
|
|
408
413
|
error_code: z.nullable(z.string()).optional(),
|
|
409
414
|
payment_service: z.nullable(TransactionPaymentService$inboundSchema)
|
|
410
415
|
.optional(),
|
|
411
416
|
pending_review: z.boolean().default(false),
|
|
412
|
-
buyer: z.nullable(
|
|
417
|
+
buyer: z.nullable(TransactionBuyerOutput$inboundSchema).optional(),
|
|
413
418
|
raw_response_code: z.nullable(z.string()).optional(),
|
|
414
419
|
raw_response_description: z.nullable(z.string()).optional(),
|
|
415
420
|
shipping_details: z.nullable(ShippingDetails$inboundSchema).optional(),
|
|
@@ -431,7 +436,7 @@ export const Transaction$inboundSchema: z.ZodType<
|
|
|
431
436
|
statement_descriptor: z.nullable(StatementDescriptor$inboundSchema)
|
|
432
437
|
.optional(),
|
|
433
438
|
scheme_transaction_id: z.nullable(z.string()).optional(),
|
|
434
|
-
three_d_secure: z.nullable(
|
|
439
|
+
three_d_secure: z.nullable(TransactionThreeDSecureSummaryOutput$inboundSchema)
|
|
435
440
|
.optional(),
|
|
436
441
|
payment_service_transaction_id: z.nullable(z.string()).optional(),
|
|
437
442
|
additional_identifiers: z.record(z.nullable(z.string())).optional(),
|
|
@@ -460,6 +465,7 @@ export const Transaction$inboundSchema: z.ZodType<
|
|
|
460
465
|
recipient: z.nullable(Recipient$inboundSchema).optional(),
|
|
461
466
|
merchant_advice_code: z.nullable(z.string()).optional(),
|
|
462
467
|
installment_count: z.nullable(z.number().int()).optional(),
|
|
468
|
+
session_token: z.nullable(z.string()).optional(),
|
|
463
469
|
tax_amount: z.nullable(z.number().int()).optional(),
|
|
464
470
|
merchant_tax_id: z.nullable(z.string()).optional(),
|
|
465
471
|
customer_reference_number: z.nullable(z.string()).optional(),
|
|
@@ -514,6 +520,7 @@ export const Transaction$inboundSchema: z.ZodType<
|
|
|
514
520
|
"account_funding_transaction": "accountFundingTransaction",
|
|
515
521
|
"merchant_advice_code": "merchantAdviceCode",
|
|
516
522
|
"installment_count": "installmentCount",
|
|
523
|
+
"session_token": "sessionToken",
|
|
517
524
|
"tax_amount": "taxAmount",
|
|
518
525
|
"merchant_tax_id": "merchantTaxId",
|
|
519
526
|
"customer_reference_number": "customerReferenceNumber",
|
|
@@ -525,7 +532,7 @@ export const Transaction$inboundSchema: z.ZodType<
|
|
|
525
532
|
});
|
|
526
533
|
|
|
527
534
|
/** @internal */
|
|
528
|
-
export type
|
|
535
|
+
export type TransactionOutput$Outbound = {
|
|
529
536
|
type: "transaction";
|
|
530
537
|
id: string;
|
|
531
538
|
reconciliation_id: string;
|
|
@@ -542,13 +549,13 @@ export type Transaction$Outbound = {
|
|
|
542
549
|
country?: string | null | undefined;
|
|
543
550
|
external_identifier?: string | null | undefined;
|
|
544
551
|
intent: string;
|
|
545
|
-
payment_method?:
|
|
552
|
+
payment_method?: TransactionPaymentMethodOutput$Outbound | null | undefined;
|
|
546
553
|
method?: string | null | undefined;
|
|
547
554
|
instrument_type?: string | null | undefined;
|
|
548
555
|
error_code?: string | null | undefined;
|
|
549
556
|
payment_service?: TransactionPaymentService$Outbound | null | undefined;
|
|
550
557
|
pending_review: boolean;
|
|
551
|
-
buyer?:
|
|
558
|
+
buyer?: TransactionBuyerOutput$Outbound | null | undefined;
|
|
552
559
|
raw_response_code?: string | null | undefined;
|
|
553
560
|
raw_response_description?: string | null | undefined;
|
|
554
561
|
shipping_details?: ShippingDetails$Outbound | null | undefined;
|
|
@@ -569,7 +576,10 @@ export type Transaction$Outbound = {
|
|
|
569
576
|
cart_items?: Array<CartItem$Outbound> | null | undefined;
|
|
570
577
|
statement_descriptor?: StatementDescriptor$Outbound | null | undefined;
|
|
571
578
|
scheme_transaction_id?: string | null | undefined;
|
|
572
|
-
three_d_secure?:
|
|
579
|
+
three_d_secure?:
|
|
580
|
+
| TransactionThreeDSecureSummaryOutput$Outbound
|
|
581
|
+
| null
|
|
582
|
+
| undefined;
|
|
573
583
|
payment_service_transaction_id?: string | null | undefined;
|
|
574
584
|
additional_identifiers?: { [k: string]: string | null } | undefined;
|
|
575
585
|
metadata?: { [k: string]: string } | null | undefined;
|
|
@@ -585,6 +595,7 @@ export type Transaction$Outbound = {
|
|
|
585
595
|
recipient?: Recipient$Outbound | null | undefined;
|
|
586
596
|
merchant_advice_code?: string | null | undefined;
|
|
587
597
|
installment_count?: number | null | undefined;
|
|
598
|
+
session_token?: string | null | undefined;
|
|
588
599
|
tax_amount?: number | null | undefined;
|
|
589
600
|
merchant_tax_id?: string | null | undefined;
|
|
590
601
|
customer_reference_number?: string | null | undefined;
|
|
@@ -595,10 +606,10 @@ export type Transaction$Outbound = {
|
|
|
595
606
|
};
|
|
596
607
|
|
|
597
608
|
/** @internal */
|
|
598
|
-
export const
|
|
599
|
-
|
|
609
|
+
export const TransactionOutput$outboundSchema: z.ZodType<
|
|
610
|
+
TransactionOutput$Outbound,
|
|
600
611
|
z.ZodTypeDef,
|
|
601
|
-
|
|
612
|
+
TransactionOutput
|
|
602
613
|
> = z.object({
|
|
603
614
|
type: z.literal("transaction").default("transaction" as const),
|
|
604
615
|
id: z.string(),
|
|
@@ -616,14 +627,15 @@ export const Transaction$outboundSchema: z.ZodType<
|
|
|
616
627
|
country: z.nullable(z.string()).optional(),
|
|
617
628
|
externalIdentifier: z.nullable(z.string()).optional(),
|
|
618
629
|
intent: TransactionIntent$outboundSchema,
|
|
619
|
-
paymentMethod: z.nullable(
|
|
630
|
+
paymentMethod: z.nullable(TransactionPaymentMethodOutput$outboundSchema)
|
|
631
|
+
.optional(),
|
|
620
632
|
method: z.nullable(Method$outboundSchema).optional(),
|
|
621
633
|
instrumentType: z.nullable(InstrumentType$outboundSchema).optional(),
|
|
622
634
|
errorCode: z.nullable(z.string()).optional(),
|
|
623
635
|
paymentService: z.nullable(TransactionPaymentService$outboundSchema)
|
|
624
636
|
.optional(),
|
|
625
637
|
pendingReview: z.boolean().default(false),
|
|
626
|
-
buyer: z.nullable(
|
|
638
|
+
buyer: z.nullable(TransactionBuyerOutput$outboundSchema).optional(),
|
|
627
639
|
rawResponseCode: z.nullable(z.string()).optional(),
|
|
628
640
|
rawResponseDescription: z.nullable(z.string()).optional(),
|
|
629
641
|
shippingDetails: z.nullable(ShippingDetails$outboundSchema).optional(),
|
|
@@ -645,7 +657,7 @@ export const Transaction$outboundSchema: z.ZodType<
|
|
|
645
657
|
statementDescriptor: z.nullable(StatementDescriptor$outboundSchema)
|
|
646
658
|
.optional(),
|
|
647
659
|
schemeTransactionId: z.nullable(z.string()).optional(),
|
|
648
|
-
threeDSecure: z.nullable(
|
|
660
|
+
threeDSecure: z.nullable(TransactionThreeDSecureSummaryOutput$outboundSchema)
|
|
649
661
|
.optional(),
|
|
650
662
|
paymentServiceTransactionId: z.nullable(z.string()).optional(),
|
|
651
663
|
additionalIdentifiers: z.record(z.nullable(z.string())).optional(),
|
|
@@ -664,6 +676,7 @@ export const Transaction$outboundSchema: z.ZodType<
|
|
|
664
676
|
recipient: z.nullable(Recipient$outboundSchema).optional(),
|
|
665
677
|
merchantAdviceCode: z.nullable(z.string()).optional(),
|
|
666
678
|
installmentCount: z.nullable(z.number().int()).optional(),
|
|
679
|
+
sessionToken: z.nullable(z.string()).optional(),
|
|
667
680
|
taxAmount: z.nullable(z.number().int()).optional(),
|
|
668
681
|
merchantTaxId: z.nullable(z.string()).optional(),
|
|
669
682
|
customerReferenceNumber: z.nullable(z.string()).optional(),
|
|
@@ -718,6 +731,7 @@ export const Transaction$outboundSchema: z.ZodType<
|
|
|
718
731
|
accountFundingTransaction: "account_funding_transaction",
|
|
719
732
|
merchantAdviceCode: "merchant_advice_code",
|
|
720
733
|
installmentCount: "installment_count",
|
|
734
|
+
sessionToken: "session_token",
|
|
721
735
|
taxAmount: "tax_amount",
|
|
722
736
|
merchantTaxId: "merchant_tax_id",
|
|
723
737
|
customerReferenceNumber: "customer_reference_number",
|
|
@@ -732,25 +746,29 @@ export const Transaction$outboundSchema: z.ZodType<
|
|
|
732
746
|
* @internal
|
|
733
747
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
734
748
|
*/
|
|
735
|
-
export namespace
|
|
736
|
-
/** @deprecated use `
|
|
737
|
-
export const inboundSchema =
|
|
738
|
-
/** @deprecated use `
|
|
739
|
-
export const outboundSchema =
|
|
740
|
-
/** @deprecated use `
|
|
741
|
-
export type 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;
|
|
742
756
|
}
|
|
743
757
|
|
|
744
|
-
export function
|
|
745
|
-
|
|
758
|
+
export function transactionOutputToJSON(
|
|
759
|
+
transactionOutput: TransactionOutput,
|
|
760
|
+
): string {
|
|
761
|
+
return JSON.stringify(
|
|
762
|
+
TransactionOutput$outboundSchema.parse(transactionOutput),
|
|
763
|
+
);
|
|
746
764
|
}
|
|
747
765
|
|
|
748
|
-
export function
|
|
766
|
+
export function transactionOutputFromJSON(
|
|
749
767
|
jsonString: string,
|
|
750
|
-
): SafeParseResult<
|
|
768
|
+
): SafeParseResult<TransactionOutput, SDKValidationError> {
|
|
751
769
|
return safeParse(
|
|
752
770
|
jsonString,
|
|
753
|
-
(x) =>
|
|
754
|
-
`Failed to parse '
|
|
771
|
+
(x) => TransactionOutput$inboundSchema.parse(JSON.parse(x)),
|
|
772
|
+
`Failed to parse 'TransactionOutput' from JSON`,
|
|
755
773
|
);
|
|
756
774
|
}
|
package/src/models/components/{transactionpaymentmethod.ts → transactionpaymentmethodoutput.ts}
RENAMED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
PaymentMethodDetailsCard$outboundSchema,
|
|
31
31
|
} from "./paymentmethoddetailscard.js";
|
|
32
32
|
|
|
33
|
-
export type
|
|
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
|
|
99
|
-
|
|
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
|
|
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
|
|
154
|
-
|
|
153
|
+
export const TransactionPaymentMethodOutput$outboundSchema: z.ZodType<
|
|
154
|
+
TransactionPaymentMethodOutput$Outbound,
|
|
155
155
|
z.ZodTypeDef,
|
|
156
|
-
|
|
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
|
|
191
|
-
/** @deprecated use `
|
|
192
|
-
export const inboundSchema =
|
|
193
|
-
/** @deprecated use `
|
|
194
|
-
export const outboundSchema =
|
|
195
|
-
/** @deprecated use `
|
|
196
|
-
export type 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
|
|
200
|
-
|
|
199
|
+
export function transactionPaymentMethodOutputToJSON(
|
|
200
|
+
transactionPaymentMethodOutput: TransactionPaymentMethodOutput,
|
|
201
201
|
): string {
|
|
202
202
|
return JSON.stringify(
|
|
203
|
-
|
|
203
|
+
TransactionPaymentMethodOutput$outboundSchema.parse(
|
|
204
|
+
transactionPaymentMethodOutput,
|
|
205
|
+
),
|
|
204
206
|
);
|
|
205
207
|
}
|
|
206
208
|
|
|
207
|
-
export function
|
|
209
|
+
export function transactionPaymentMethodOutputFromJSON(
|
|
208
210
|
jsonString: string,
|
|
209
|
-
): SafeParseResult<
|
|
211
|
+
): SafeParseResult<TransactionPaymentMethodOutput, SDKValidationError> {
|
|
210
212
|
return safeParse(
|
|
211
213
|
jsonString,
|
|
212
|
-
(x) =>
|
|
213
|
-
`Failed to parse '
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./
|
|
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<
|
|
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(
|
|
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<
|
|
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(
|
|
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(),
|
|
@@ -36,22 +36,22 @@ import {
|
|
|
36
36
|
ShippingDetails$outboundSchema,
|
|
37
37
|
} from "./shippingdetails.js";
|
|
38
38
|
import {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} from "./
|
|
39
|
+
TransactionBuyerOutput,
|
|
40
|
+
TransactionBuyerOutput$inboundSchema,
|
|
41
|
+
TransactionBuyerOutput$Outbound,
|
|
42
|
+
TransactionBuyerOutput$outboundSchema,
|
|
43
|
+
} from "./transactionbuyeroutput.js";
|
|
44
44
|
import {
|
|
45
45
|
TransactionIntent,
|
|
46
46
|
TransactionIntent$inboundSchema,
|
|
47
47
|
TransactionIntent$outboundSchema,
|
|
48
48
|
} from "./transactionintent.js";
|
|
49
49
|
import {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
} from "./
|
|
50
|
+
TransactionPaymentMethodOutput,
|
|
51
|
+
TransactionPaymentMethodOutput$inboundSchema,
|
|
52
|
+
TransactionPaymentMethodOutput$Outbound,
|
|
53
|
+
TransactionPaymentMethodOutput$outboundSchema,
|
|
54
|
+
} from "./transactionpaymentmethodoutput.js";
|
|
55
55
|
import {
|
|
56
56
|
TransactionPaymentService,
|
|
57
57
|
TransactionPaymentService$inboundSchema,
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
/**
|
|
68
68
|
* A transaction, summarised
|
|
69
69
|
*/
|
|
70
|
-
export type
|
|
70
|
+
export type TransactionSummaryOutput = {
|
|
71
71
|
/**
|
|
72
72
|
* Always `transaction`.
|
|
73
73
|
*/
|
|
@@ -129,7 +129,7 @@ export type TransactionSummary = {
|
|
|
129
129
|
/**
|
|
130
130
|
* The payment method used for this transaction.
|
|
131
131
|
*/
|
|
132
|
-
paymentMethod?:
|
|
132
|
+
paymentMethod?: TransactionPaymentMethodOutput | null | undefined;
|
|
133
133
|
/**
|
|
134
134
|
* The method used for the transaction.
|
|
135
135
|
*/
|
|
@@ -153,7 +153,7 @@ export type TransactionSummary = {
|
|
|
153
153
|
/**
|
|
154
154
|
* The buyer used for this transaction.
|
|
155
155
|
*/
|
|
156
|
-
buyer?:
|
|
156
|
+
buyer?: TransactionBuyerOutput | null | undefined;
|
|
157
157
|
/**
|
|
158
158
|
* 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.
|
|
159
159
|
*/
|
|
@@ -193,8 +193,8 @@ export type TransactionSummary = {
|
|
|
193
193
|
};
|
|
194
194
|
|
|
195
195
|
/** @internal */
|
|
196
|
-
export const
|
|
197
|
-
|
|
196
|
+
export const TransactionSummaryOutput$inboundSchema: z.ZodType<
|
|
197
|
+
TransactionSummaryOutput,
|
|
198
198
|
z.ZodTypeDef,
|
|
199
199
|
unknown
|
|
200
200
|
> = z.object({
|
|
@@ -214,14 +214,15 @@ export const TransactionSummary$inboundSchema: z.ZodType<
|
|
|
214
214
|
country: z.nullable(z.string()).optional(),
|
|
215
215
|
external_identifier: z.nullable(z.string()).optional(),
|
|
216
216
|
intent: TransactionIntent$inboundSchema,
|
|
217
|
-
payment_method: z.nullable(
|
|
217
|
+
payment_method: z.nullable(TransactionPaymentMethodOutput$inboundSchema)
|
|
218
|
+
.optional(),
|
|
218
219
|
method: z.nullable(Method$inboundSchema).optional(),
|
|
219
220
|
instrument_type: z.nullable(InstrumentType$inboundSchema).optional(),
|
|
220
221
|
error_code: z.nullable(z.string()).optional(),
|
|
221
222
|
payment_service: z.nullable(TransactionPaymentService$inboundSchema)
|
|
222
223
|
.optional(),
|
|
223
224
|
pending_review: z.boolean().default(false),
|
|
224
|
-
buyer: z.nullable(
|
|
225
|
+
buyer: z.nullable(TransactionBuyerOutput$inboundSchema).optional(),
|
|
225
226
|
raw_response_code: z.nullable(z.string()).optional(),
|
|
226
227
|
raw_response_description: z.nullable(z.string()).optional(),
|
|
227
228
|
shipping_details: z.nullable(ShippingDetails$inboundSchema).optional(),
|
|
@@ -258,7 +259,7 @@ export const TransactionSummary$inboundSchema: z.ZodType<
|
|
|
258
259
|
});
|
|
259
260
|
|
|
260
261
|
/** @internal */
|
|
261
|
-
export type
|
|
262
|
+
export type TransactionSummaryOutput$Outbound = {
|
|
262
263
|
type: "transaction";
|
|
263
264
|
id: string;
|
|
264
265
|
reconciliation_id: string;
|
|
@@ -275,13 +276,13 @@ export type TransactionSummary$Outbound = {
|
|
|
275
276
|
country?: string | null | undefined;
|
|
276
277
|
external_identifier?: string | null | undefined;
|
|
277
278
|
intent: string;
|
|
278
|
-
payment_method?:
|
|
279
|
+
payment_method?: TransactionPaymentMethodOutput$Outbound | null | undefined;
|
|
279
280
|
method?: string | null | undefined;
|
|
280
281
|
instrument_type?: string | null | undefined;
|
|
281
282
|
error_code?: string | null | undefined;
|
|
282
283
|
payment_service?: TransactionPaymentService$Outbound | null | undefined;
|
|
283
284
|
pending_review: boolean;
|
|
284
|
-
buyer?:
|
|
285
|
+
buyer?: TransactionBuyerOutput$Outbound | null | undefined;
|
|
285
286
|
raw_response_code?: string | null | undefined;
|
|
286
287
|
raw_response_description?: string | null | undefined;
|
|
287
288
|
shipping_details?: ShippingDetails$Outbound | null | undefined;
|
|
@@ -294,10 +295,10 @@ export type TransactionSummary$Outbound = {
|
|
|
294
295
|
};
|
|
295
296
|
|
|
296
297
|
/** @internal */
|
|
297
|
-
export const
|
|
298
|
-
|
|
298
|
+
export const TransactionSummaryOutput$outboundSchema: z.ZodType<
|
|
299
|
+
TransactionSummaryOutput$Outbound,
|
|
299
300
|
z.ZodTypeDef,
|
|
300
|
-
|
|
301
|
+
TransactionSummaryOutput
|
|
301
302
|
> = z.object({
|
|
302
303
|
type: z.literal("transaction").default("transaction" as const),
|
|
303
304
|
id: z.string(),
|
|
@@ -315,14 +316,15 @@ export const TransactionSummary$outboundSchema: z.ZodType<
|
|
|
315
316
|
country: z.nullable(z.string()).optional(),
|
|
316
317
|
externalIdentifier: z.nullable(z.string()).optional(),
|
|
317
318
|
intent: TransactionIntent$outboundSchema,
|
|
318
|
-
paymentMethod: z.nullable(
|
|
319
|
+
paymentMethod: z.nullable(TransactionPaymentMethodOutput$outboundSchema)
|
|
320
|
+
.optional(),
|
|
319
321
|
method: z.nullable(Method$outboundSchema).optional(),
|
|
320
322
|
instrumentType: z.nullable(InstrumentType$outboundSchema).optional(),
|
|
321
323
|
errorCode: z.nullable(z.string()).optional(),
|
|
322
324
|
paymentService: z.nullable(TransactionPaymentService$outboundSchema)
|
|
323
325
|
.optional(),
|
|
324
326
|
pendingReview: z.boolean().default(false),
|
|
325
|
-
buyer: z.nullable(
|
|
327
|
+
buyer: z.nullable(TransactionBuyerOutput$outboundSchema).optional(),
|
|
326
328
|
rawResponseCode: z.nullable(z.string()).optional(),
|
|
327
329
|
rawResponseDescription: z.nullable(z.string()).optional(),
|
|
328
330
|
shippingDetails: z.nullable(ShippingDetails$outboundSchema).optional(),
|
|
@@ -362,29 +364,29 @@ export const TransactionSummary$outboundSchema: z.ZodType<
|
|
|
362
364
|
* @internal
|
|
363
365
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
364
366
|
*/
|
|
365
|
-
export namespace
|
|
366
|
-
/** @deprecated use `
|
|
367
|
-
export const inboundSchema =
|
|
368
|
-
/** @deprecated use `
|
|
369
|
-
export const outboundSchema =
|
|
370
|
-
/** @deprecated use `
|
|
371
|
-
export type Outbound =
|
|
367
|
+
export namespace TransactionSummaryOutput$ {
|
|
368
|
+
/** @deprecated use `TransactionSummaryOutput$inboundSchema` instead. */
|
|
369
|
+
export const inboundSchema = TransactionSummaryOutput$inboundSchema;
|
|
370
|
+
/** @deprecated use `TransactionSummaryOutput$outboundSchema` instead. */
|
|
371
|
+
export const outboundSchema = TransactionSummaryOutput$outboundSchema;
|
|
372
|
+
/** @deprecated use `TransactionSummaryOutput$Outbound` instead. */
|
|
373
|
+
export type Outbound = TransactionSummaryOutput$Outbound;
|
|
372
374
|
}
|
|
373
375
|
|
|
374
|
-
export function
|
|
375
|
-
|
|
376
|
+
export function transactionSummaryOutputToJSON(
|
|
377
|
+
transactionSummaryOutput: TransactionSummaryOutput,
|
|
376
378
|
): string {
|
|
377
379
|
return JSON.stringify(
|
|
378
|
-
|
|
380
|
+
TransactionSummaryOutput$outboundSchema.parse(transactionSummaryOutput),
|
|
379
381
|
);
|
|
380
382
|
}
|
|
381
383
|
|
|
382
|
-
export function
|
|
384
|
+
export function transactionSummaryOutputFromJSON(
|
|
383
385
|
jsonString: string,
|
|
384
|
-
): SafeParseResult<
|
|
386
|
+
): SafeParseResult<TransactionSummaryOutput, SDKValidationError> {
|
|
385
387
|
return safeParse(
|
|
386
388
|
jsonString,
|
|
387
|
-
(x) =>
|
|
388
|
-
`Failed to parse '
|
|
389
|
+
(x) => TransactionSummaryOutput$inboundSchema.parse(JSON.parse(x)),
|
|
390
|
+
`Failed to parse 'TransactionSummaryOutput' from JSON`,
|
|
389
391
|
);
|
|
390
392
|
}
|