@gr4vy/sdk 1.6.10 → 1.7.1
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/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/lib/config.js.map +1 -1
- package/models/components/auditlogentries.d.ts +2 -2
- package/models/components/auditlogentries.d.ts.map +1 -1
- package/models/components/auditlogentries.js +2 -2
- package/models/components/auditlogentries.js.map +1 -1
- package/models/components/{auditlogentryoutput.d.ts → auditlogentry.d.ts} +4 -4
- package/models/components/auditlogentry.d.ts.map +1 -0
- package/models/components/{auditlogentryoutput.js → auditlogentry.js} +6 -6
- package/models/components/auditlogentry.js.map +1 -0
- package/models/components/{billingdetailsinput.d.ts → billingdetails.d.ts} +10 -5
- package/models/components/billingdetails.d.ts.map +1 -0
- package/models/components/{billingdetailsoutput.js → billingdetails.js} +27 -6
- package/models/components/billingdetails.js.map +1 -0
- package/models/components/buyer.d.ts +2 -2
- package/models/components/buyer.d.ts.map +1 -1
- package/models/components/buyer.js +2 -2
- package/models/components/buyer.js.map +1 -1
- package/models/components/buyercreate.d.ts +3 -3
- package/models/components/buyercreate.d.ts.map +1 -1
- package/models/components/buyercreate.js +2 -2
- package/models/components/buyercreate.js.map +1 -1
- package/models/components/buyerupdate.d.ts +3 -3
- package/models/components/buyerupdate.d.ts.map +1 -1
- package/models/components/buyerupdate.js +2 -2
- package/models/components/buyerupdate.js.map +1 -1
- package/models/components/checkoutsession.d.ts +4 -4
- package/models/components/checkoutsession.d.ts.map +1 -1
- package/models/components/checkoutsession.js +4 -4
- package/models/components/checkoutsession.js.map +1 -1
- package/models/components/checkoutsessioncreate.d.ts +3 -3
- package/models/components/checkoutsessioncreate.d.ts.map +1 -1
- package/models/components/checkoutsessioncreate.js +2 -2
- package/models/components/checkoutsessioncreate.js.map +1 -1
- package/models/components/{checkoutsessionpaymentmethodoutput.d.ts → checkoutsessionpaymentmethod.d.ts} +4 -4
- package/models/components/checkoutsessionpaymentmethod.d.ts.map +1 -0
- package/models/components/{checkoutsessionpaymentmethodoutput.js → checkoutsessionpaymentmethod.js} +6 -6
- package/models/components/checkoutsessionpaymentmethod.js.map +1 -0
- package/models/components/{guestbuyerinput.d.ts → guestbuyer.d.ts} +13 -8
- package/models/components/guestbuyer.d.ts.map +1 -0
- package/models/components/{guestbuyeroutput.js → guestbuyer.js} +28 -8
- package/models/components/guestbuyer.js.map +1 -0
- package/models/components/index.d.ts +15 -16
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +15 -16
- package/models/components/index.js.map +1 -1
- package/models/components/paymentlink.d.ts +2 -2
- package/models/components/paymentlink.d.ts.map +1 -1
- package/models/components/paymentlink.js +2 -2
- package/models/components/paymentlink.js.map +1 -1
- package/models/components/paymentlinkcreate.d.ts +3 -3
- package/models/components/paymentlinkcreate.d.ts.map +1 -1
- package/models/components/paymentlinkcreate.js +2 -2
- package/models/components/paymentlinkcreate.js.map +1 -1
- package/models/components/paymentmethodsummaries.d.ts +2 -2
- package/models/components/paymentmethodsummaries.d.ts.map +1 -1
- package/models/components/paymentmethodsummaries.js +2 -2
- package/models/components/paymentmethodsummaries.js.map +1 -1
- package/models/components/{paymentmethodsummaryoutput.d.ts → paymentmethodsummary.d.ts} +4 -4
- package/models/components/paymentmethodsummary.d.ts.map +1 -0
- package/models/components/{paymentmethodsummaryoutput.js → paymentmethodsummary.js} +6 -6
- package/models/components/paymentmethodsummary.js.map +1 -0
- package/models/components/{paymentoptionoutput.d.ts → paymentoption.d.ts} +4 -4
- package/models/components/paymentoption.d.ts.map +1 -0
- package/models/components/{paymentoptionoutput.js → paymentoption.js} +6 -6
- package/models/components/paymentoption.js.map +1 -0
- package/models/components/paymentoptions.d.ts +2 -2
- package/models/components/paymentoptions.d.ts.map +1 -1
- package/models/components/paymentoptions.js +2 -2
- package/models/components/paymentoptions.js.map +1 -1
- package/models/components/payoutcreate.d.ts +3 -3
- package/models/components/payoutcreate.d.ts.map +1 -1
- package/models/components/payoutcreate.js +2 -2
- package/models/components/payoutcreate.js.map +1 -1
- package/models/components/payoutsummary.d.ts +4 -4
- package/models/components/payoutsummary.d.ts.map +1 -1
- package/models/components/payoutsummary.js +4 -4
- package/models/components/payoutsummary.js.map +1 -1
- package/models/components/{transactionoutput.d.ts → transaction.d.ts} +10 -10
- package/models/components/transaction.d.ts.map +1 -0
- package/models/components/{transactionoutput.js → transaction.js} +12 -13
- package/models/components/transaction.js.map +1 -0
- package/models/components/{transactionbuyeroutput.d.ts → transactionbuyer.d.ts} +6 -6
- package/models/components/transactionbuyer.d.ts.map +1 -0
- package/models/components/{transactionbuyeroutput.js → transactionbuyer.js} +8 -8
- package/models/components/transactionbuyer.js.map +1 -0
- package/models/components/transactioncancel.d.ts +2 -2
- package/models/components/transactioncancel.d.ts.map +1 -1
- package/models/components/transactioncancel.js +2 -2
- package/models/components/transactioncancel.js.map +1 -1
- package/models/components/{transactioncaptureoutput.d.ts → transactioncapture.d.ts} +6 -6
- package/models/components/transactioncapture.d.ts.map +1 -0
- package/models/components/{transactioncaptureoutput.js → transactioncapture.js} +8 -8
- package/models/components/transactioncapture.js.map +1 -0
- package/models/components/transactioncreate.d.ts +3 -3
- package/models/components/transactioncreate.d.ts.map +1 -1
- package/models/components/transactioncreate.js +2 -2
- package/models/components/transactioncreate.js.map +1 -1
- package/models/components/{transactioneventoutput.d.ts → transactionevent.d.ts} +6 -7
- package/models/components/transactionevent.d.ts.map +1 -0
- package/models/components/{transactioneventoutput.js → transactionevent.js} +8 -7
- package/models/components/transactionevent.js.map +1 -0
- package/models/components/transactioneventcontext.d.ts +14 -0
- package/models/components/transactioneventcontext.d.ts.map +1 -0
- package/models/components/transactioneventcontext.js +57 -0
- package/models/components/transactioneventcontext.js.map +1 -0
- package/models/components/transactionevents.d.ts +2 -2
- package/models/components/transactionevents.d.ts.map +1 -1
- package/models/components/transactionevents.js +2 -2
- package/models/components/transactionevents.js.map +1 -1
- package/models/components/{transactionpaymentmethodoutput.d.ts → transactionpaymentmethod.d.ts} +4 -4
- package/models/components/transactionpaymentmethod.d.ts.map +1 -0
- package/models/components/{transactionpaymentmethodoutput.js → transactionpaymentmethod.js} +6 -6
- package/models/components/transactionpaymentmethod.js.map +1 -0
- package/models/components/transactionsummaries.d.ts +2 -2
- package/models/components/transactionsummaries.d.ts.map +1 -1
- package/models/components/transactionsummaries.js +2 -2
- package/models/components/transactionsummaries.js.map +1 -1
- package/models/components/{transactionsummaryoutput.d.ts → transactionsummary.d.ts} +8 -8
- package/models/components/transactionsummary.d.ts.map +1 -0
- package/models/components/{transactionsummaryoutput.js → transactionsummary.js} +10 -11
- package/models/components/transactionsummary.js.map +1 -0
- package/models/components/{transactionthreedsecuresummaryoutput.d.ts → transactionthreedsecuresummary.d.ts} +4 -4
- package/models/components/transactionthreedsecuresummary.d.ts.map +1 -0
- package/models/components/{transactionthreedsecuresummaryoutput.js → transactionthreedsecuresummary.js} +6 -6
- package/models/components/transactionthreedsecuresummary.js.map +1 -0
- package/models/components/{transactionvoidoutput.d.ts → transactionvoid.d.ts} +6 -6
- package/models/components/transactionvoid.d.ts.map +1 -0
- package/models/components/{transactionvoidoutput.js → transactionvoid.js} +8 -8
- package/models/components/transactionvoid.js.map +1 -0
- package/models/operations/capturetransaction.d.ts +13 -13
- package/models/operations/capturetransaction.d.ts.map +1 -1
- package/models/operations/capturetransaction.js +13 -13
- package/models/operations/capturetransaction.js.map +1 -1
- package/models/operations/voidtransaction.d.ts +13 -13
- package/models/operations/voidtransaction.d.ts.map +1 -1
- package/models/operations/voidtransaction.js +13 -13
- 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 +3 -6
- package/src/models/components/{auditlogentryoutput.ts → auditlogentry.ts} +7 -7
- package/src/models/components/{billingdetailsinput.ts → billingdetails.ts} +46 -11
- package/src/models/components/buyer.ts +5 -5
- package/src/models/components/buyercreate.ts +7 -7
- package/src/models/components/buyerupdate.ts +7 -7
- package/src/models/components/checkoutsession.ts +8 -11
- package/src/models/components/checkoutsessioncreate.ts +7 -7
- package/src/models/components/{checkoutsessionpaymentmethodoutput.ts → checkoutsessionpaymentmethod.ts} +7 -8
- package/src/models/components/guestbuyer.ts +107 -0
- package/src/models/components/index.ts +15 -16
- package/src/models/components/paymentlink.ts +5 -5
- package/src/models/components/paymentlinkcreate.ts +7 -7
- package/src/models/components/paymentmethodsummaries.ts +5 -5
- package/src/models/components/{paymentmethodsummaryoutput.ts → paymentmethodsummary.ts} +7 -7
- package/src/models/components/{paymentoptionoutput.ts → paymentoption.ts} +7 -7
- package/src/models/components/paymentoptions.ts +3 -6
- package/src/models/components/payoutcreate.ts +7 -7
- package/src/models/components/payoutsummary.ts +10 -10
- package/src/models/components/{transactionoutput.ts → transaction.ts} +22 -23
- package/src/models/components/{transactionbuyeroutput.ts → transactionbuyer.ts} +12 -12
- package/src/models/components/transactioncancel.ts +3 -6
- package/src/models/components/{transactioncaptureoutput.ts → transactioncapture.ts} +10 -13
- package/src/models/components/transactioncreate.ts +7 -7
- package/src/models/components/{transactioneventoutput.ts → transactionevent.ts} +13 -9
- package/src/models/components/transactioneventcontext.ts +47 -0
- package/src/models/components/transactionevents.ts +5 -5
- package/src/models/components/{transactionpaymentmethodoutput.ts → transactionpaymentmethod.ts} +7 -7
- package/src/models/components/transactionsummaries.ts +5 -5
- package/src/models/components/{transactionsummaryoutput.ts → transactionsummary.ts} +17 -18
- package/src/models/components/{transactionthreedsecuresummaryoutput.ts → transactionthreedsecuresummary.ts} +7 -8
- package/src/models/components/{transactionvoidoutput.ts → transactionvoid.ts} +10 -13
- package/src/models/operations/capturetransaction.ts +26 -26
- package/src/models/operations/voidtransaction.ts +26 -26
- package/src/sdk/transactions.ts +4 -4
- package/models/components/auditlogentryoutput.d.ts.map +0 -1
- package/models/components/auditlogentryoutput.js.map +0 -1
- package/models/components/billingdetailsinput.d.ts.map +0 -1
- package/models/components/billingdetailsinput.js +0 -65
- package/models/components/billingdetailsinput.js.map +0 -1
- package/models/components/billingdetailsoutput.d.ts +0 -35
- package/models/components/billingdetailsoutput.d.ts.map +0 -1
- package/models/components/billingdetailsoutput.js.map +0 -1
- package/models/components/checkoutsessionpaymentmethodoutput.d.ts.map +0 -1
- package/models/components/checkoutsessionpaymentmethodoutput.js.map +0 -1
- package/models/components/guestbuyerinput.d.ts.map +0 -1
- package/models/components/guestbuyerinput.js +0 -64
- package/models/components/guestbuyerinput.js.map +0 -1
- package/models/components/guestbuyeroutput.d.ts +0 -31
- package/models/components/guestbuyeroutput.d.ts.map +0 -1
- package/models/components/guestbuyeroutput.js.map +0 -1
- package/models/components/paymentmethodsummaryoutput.d.ts.map +0 -1
- package/models/components/paymentmethodsummaryoutput.js.map +0 -1
- package/models/components/paymentoptionoutput.d.ts.map +0 -1
- package/models/components/paymentoptionoutput.js.map +0 -1
- package/models/components/transactionbuyeroutput.d.ts.map +0 -1
- package/models/components/transactionbuyeroutput.js.map +0 -1
- package/models/components/transactioncaptureoutput.d.ts.map +0 -1
- package/models/components/transactioncaptureoutput.js.map +0 -1
- package/models/components/transactioneventoutput.d.ts.map +0 -1
- package/models/components/transactioneventoutput.js.map +0 -1
- package/models/components/transactionoutput.d.ts.map +0 -1
- package/models/components/transactionoutput.js.map +0 -1
- package/models/components/transactionpaymentmethodoutput.d.ts.map +0 -1
- package/models/components/transactionpaymentmethodoutput.js.map +0 -1
- package/models/components/transactionsummaryoutput.d.ts.map +0 -1
- package/models/components/transactionsummaryoutput.js.map +0 -1
- package/models/components/transactionthreedsecuresummaryoutput.d.ts.map +0 -1
- package/models/components/transactionthreedsecuresummaryoutput.js.map +0 -1
- package/models/components/transactionvoidoutput.d.ts.map +0 -1
- package/models/components/transactionvoidoutput.js.map +0 -1
- package/src/models/components/billingdetailsoutput.ts +0 -70
- package/src/models/components/guestbuyerinput.ts +0 -75
- package/src/models/components/guestbuyeroutput.ts +0 -71
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
CheckoutSessionPaymentMethodDetails$inboundSchema,
|
|
13
13
|
} from "./checkoutsessionpaymentmethoddetails.js";
|
|
14
14
|
|
|
15
|
-
export type
|
|
15
|
+
export type CheckoutSessionPaymentMethod = {
|
|
16
16
|
/**
|
|
17
17
|
* Always `payment-method`
|
|
18
18
|
*/
|
|
@@ -44,8 +44,8 @@ export type CheckoutSessionPaymentMethodOutput = {
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
/** @internal */
|
|
47
|
-
export const
|
|
48
|
-
|
|
47
|
+
export const CheckoutSessionPaymentMethod$inboundSchema: z.ZodType<
|
|
48
|
+
CheckoutSessionPaymentMethod,
|
|
49
49
|
z.ZodTypeDef,
|
|
50
50
|
unknown
|
|
51
51
|
> = z.object({
|
|
@@ -59,13 +59,12 @@ export const CheckoutSessionPaymentMethodOutput$inboundSchema: z.ZodType<
|
|
|
59
59
|
fingerprint: z.nullable(z.string()).optional(),
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
-
export function
|
|
62
|
+
export function checkoutSessionPaymentMethodFromJSON(
|
|
63
63
|
jsonString: string,
|
|
64
|
-
): SafeParseResult<
|
|
64
|
+
): SafeParseResult<CheckoutSessionPaymentMethod, SDKValidationError> {
|
|
65
65
|
return safeParse(
|
|
66
66
|
jsonString,
|
|
67
|
-
(x) =>
|
|
68
|
-
|
|
69
|
-
`Failed to parse 'CheckoutSessionPaymentMethodOutput' from JSON`,
|
|
67
|
+
(x) => CheckoutSessionPaymentMethod$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'CheckoutSessionPaymentMethod' from JSON`,
|
|
70
69
|
);
|
|
71
70
|
}
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
import {
|
|
11
|
+
BillingDetails,
|
|
12
|
+
BillingDetails$inboundSchema,
|
|
13
|
+
BillingDetails$Outbound,
|
|
14
|
+
BillingDetails$outboundSchema,
|
|
15
|
+
} from "./billingdetails.js";
|
|
16
|
+
import {
|
|
17
|
+
ShippingDetailsCreate,
|
|
18
|
+
ShippingDetailsCreate$inboundSchema,
|
|
19
|
+
ShippingDetailsCreate$Outbound,
|
|
20
|
+
ShippingDetailsCreate$outboundSchema,
|
|
21
|
+
} from "./shippingdetailscreate.js";
|
|
22
|
+
|
|
23
|
+
export type GuestBuyer = {
|
|
24
|
+
/**
|
|
25
|
+
* The display name for the buyer.
|
|
26
|
+
*/
|
|
27
|
+
displayName?: string | null | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The merchant identifier for this buyer.
|
|
30
|
+
*/
|
|
31
|
+
externalIdentifier?: string | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The billing name, address, email, and other fields for this buyer.
|
|
34
|
+
*/
|
|
35
|
+
billingDetails?: BillingDetails | null | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* The buyer account number
|
|
38
|
+
*/
|
|
39
|
+
accountNumber?: string | null | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* The optional shipping details for this buyer.
|
|
42
|
+
*/
|
|
43
|
+
shippingDetails?: ShippingDetailsCreate | null | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const GuestBuyer$inboundSchema: z.ZodType<
|
|
48
|
+
GuestBuyer,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
display_name: z.nullable(z.string()).optional(),
|
|
53
|
+
external_identifier: z.nullable(z.string()).optional(),
|
|
54
|
+
billing_details: z.nullable(BillingDetails$inboundSchema).optional(),
|
|
55
|
+
account_number: z.nullable(z.string()).optional(),
|
|
56
|
+
shipping_details: z.nullable(ShippingDetailsCreate$inboundSchema).optional(),
|
|
57
|
+
}).transform((v) => {
|
|
58
|
+
return remap$(v, {
|
|
59
|
+
"display_name": "displayName",
|
|
60
|
+
"external_identifier": "externalIdentifier",
|
|
61
|
+
"billing_details": "billingDetails",
|
|
62
|
+
"account_number": "accountNumber",
|
|
63
|
+
"shipping_details": "shippingDetails",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
/** @internal */
|
|
67
|
+
export type GuestBuyer$Outbound = {
|
|
68
|
+
display_name?: string | null | undefined;
|
|
69
|
+
external_identifier?: string | null | undefined;
|
|
70
|
+
billing_details?: BillingDetails$Outbound | null | undefined;
|
|
71
|
+
account_number?: string | null | undefined;
|
|
72
|
+
shipping_details?: ShippingDetailsCreate$Outbound | null | undefined;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const GuestBuyer$outboundSchema: z.ZodType<
|
|
77
|
+
GuestBuyer$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
GuestBuyer
|
|
80
|
+
> = z.object({
|
|
81
|
+
displayName: z.nullable(z.string()).optional(),
|
|
82
|
+
externalIdentifier: z.nullable(z.string()).optional(),
|
|
83
|
+
billingDetails: z.nullable(BillingDetails$outboundSchema).optional(),
|
|
84
|
+
accountNumber: z.nullable(z.string()).optional(),
|
|
85
|
+
shippingDetails: z.nullable(ShippingDetailsCreate$outboundSchema).optional(),
|
|
86
|
+
}).transform((v) => {
|
|
87
|
+
return remap$(v, {
|
|
88
|
+
displayName: "display_name",
|
|
89
|
+
externalIdentifier: "external_identifier",
|
|
90
|
+
billingDetails: "billing_details",
|
|
91
|
+
accountNumber: "account_number",
|
|
92
|
+
shippingDetails: "shipping_details",
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export function guestBuyerToJSON(guestBuyer: GuestBuyer): string {
|
|
97
|
+
return JSON.stringify(GuestBuyer$outboundSchema.parse(guestBuyer));
|
|
98
|
+
}
|
|
99
|
+
export function guestBuyerFromJSON(
|
|
100
|
+
jsonString: string,
|
|
101
|
+
): SafeParseResult<GuestBuyer, SDKValidationError> {
|
|
102
|
+
return safeParse(
|
|
103
|
+
jsonString,
|
|
104
|
+
(x) => GuestBuyer$inboundSchema.parse(JSON.parse(x)),
|
|
105
|
+
`Failed to parse 'GuestBuyer' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -25,12 +25,11 @@ export * from "./applepaysessionrequest.js";
|
|
|
25
25
|
export * from "./approvaltarget.js";
|
|
26
26
|
export * from "./auditlogaction.js";
|
|
27
27
|
export * from "./auditlogentries.js";
|
|
28
|
-
export * from "./
|
|
28
|
+
export * from "./auditlogentry.js";
|
|
29
29
|
export * from "./auditlogentryresource.js";
|
|
30
30
|
export * from "./auditlogentryuser.js";
|
|
31
31
|
export * from "./avsresponsecode.js";
|
|
32
|
-
export * from "./
|
|
33
|
-
export * from "./billingdetailsoutput.js";
|
|
32
|
+
export * from "./billingdetails.js";
|
|
34
33
|
export * from "./braintreedynamicdatafieldsoptions.js";
|
|
35
34
|
export * from "./braintreeoptions.js";
|
|
36
35
|
export * from "./browserinfo.js";
|
|
@@ -50,9 +49,9 @@ export * from "./cartitem.js";
|
|
|
50
49
|
export * from "./checkoutpayoutoptions.js";
|
|
51
50
|
export * from "./checkoutsession.js";
|
|
52
51
|
export * from "./checkoutsessioncreate.js";
|
|
52
|
+
export * from "./checkoutsessionpaymentmethod.js";
|
|
53
53
|
export * from "./checkoutsessionpaymentmethodcreate.js";
|
|
54
54
|
export * from "./checkoutsessionpaymentmethoddetails.js";
|
|
55
|
-
export * from "./checkoutsessionpaymentmethodoutput.js";
|
|
56
55
|
export * from "./checkoutsessionwithurlpaymentmethodcreate.js";
|
|
57
56
|
export * from "./clicktopayfpanpaymentmethodcreate.js";
|
|
58
57
|
export * from "./clicktopaypaymentmethodcreate.js";
|
|
@@ -118,8 +117,7 @@ export * from "./googlepaypaymentmethodcreate.js";
|
|
|
118
117
|
export * from "./googlepaypaymentoptioncontext.js";
|
|
119
118
|
export * from "./googlepaysession.js";
|
|
120
119
|
export * from "./googlepaysessionrequest.js";
|
|
121
|
-
export * from "./
|
|
122
|
-
export * from "./guestbuyeroutput.js";
|
|
120
|
+
export * from "./guestbuyer.js";
|
|
123
121
|
export * from "./instrumenttype.js";
|
|
124
122
|
export * from "./integrationclient.js";
|
|
125
123
|
export * from "./latitudeoptions.js";
|
|
@@ -156,10 +154,10 @@ export * from "./paymentmethods.js";
|
|
|
156
154
|
export * from "./paymentmethodstatus.js";
|
|
157
155
|
export * from "./paymentmethodstoredcard.js";
|
|
158
156
|
export * from "./paymentmethodsummaries.js";
|
|
159
|
-
export * from "./
|
|
157
|
+
export * from "./paymentmethodsummary.js";
|
|
158
|
+
export * from "./paymentoption.js";
|
|
160
159
|
export * from "./paymentoptioncontext.js";
|
|
161
160
|
export * from "./paymentoptioncontextapprovalui.js";
|
|
162
|
-
export * from "./paymentoptionoutput.js";
|
|
163
161
|
export * from "./paymentoptionrequest.js";
|
|
164
162
|
export * from "./paymentoptions.js";
|
|
165
163
|
export * from "./paymentservice.js";
|
|
@@ -231,19 +229,20 @@ export * from "./threedsecuremethod.js";
|
|
|
231
229
|
export * from "./threedsecurestatus.js";
|
|
232
230
|
export * from "./threedsecurev2.js";
|
|
233
231
|
export * from "./tokenpaymentmethodcreate.js";
|
|
234
|
-
export * from "./
|
|
232
|
+
export * from "./transaction.js";
|
|
233
|
+
export * from "./transactionbuyer.js";
|
|
235
234
|
export * from "./transactioncancel.js";
|
|
235
|
+
export * from "./transactioncapture.js";
|
|
236
236
|
export * from "./transactioncapturecreate.js";
|
|
237
|
-
export * from "./transactioncaptureoutput.js";
|
|
238
237
|
export * from "./transactionconnectionoptions.js";
|
|
239
238
|
export * from "./transactioncreate.js";
|
|
240
|
-
export * from "./
|
|
239
|
+
export * from "./transactionevent.js";
|
|
240
|
+
export * from "./transactioneventcontext.js";
|
|
241
241
|
export * from "./transactionevents.js";
|
|
242
242
|
export * from "./transactiongiftcard.js";
|
|
243
243
|
export * from "./transactionintent.js";
|
|
244
244
|
export * from "./transactionintentoutcome.js";
|
|
245
|
-
export * from "./
|
|
246
|
-
export * from "./transactionpaymentmethodoutput.js";
|
|
245
|
+
export * from "./transactionpaymentmethod.js";
|
|
247
246
|
export * from "./transactionpaymentservice.js";
|
|
248
247
|
export * from "./transactionpaymentsource.js";
|
|
249
248
|
export * from "./transactionrefundallcreate.js";
|
|
@@ -252,10 +251,10 @@ export * from "./transactionretriesreportspec.js";
|
|
|
252
251
|
export * from "./transactionsreportspec.js";
|
|
253
252
|
export * from "./transactionstatus.js";
|
|
254
253
|
export * from "./transactionsummaries.js";
|
|
255
|
-
export * from "./
|
|
256
|
-
export * from "./
|
|
254
|
+
export * from "./transactionsummary.js";
|
|
255
|
+
export * from "./transactionthreedsecuresummary.js";
|
|
257
256
|
export * from "./transactionupdate.js";
|
|
258
|
-
export * from "./
|
|
257
|
+
export * from "./transactionvoid.js";
|
|
259
258
|
export * from "./travelhubcustomdata.js";
|
|
260
259
|
export * from "./travelhuboptions.js";
|
|
261
260
|
export * from "./trustlyoptions.js";
|
|
@@ -21,9 +21,9 @@ import {
|
|
|
21
21
|
StatementDescriptor$inboundSchema,
|
|
22
22
|
} from "./statementdescriptor.js";
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} from "./
|
|
24
|
+
TransactionBuyer,
|
|
25
|
+
TransactionBuyer$inboundSchema,
|
|
26
|
+
} from "./transactionbuyer.js";
|
|
27
27
|
import {
|
|
28
28
|
TransactionIntent,
|
|
29
29
|
TransactionIntent$inboundSchema,
|
|
@@ -131,7 +131,7 @@ export type PaymentLink = {
|
|
|
131
131
|
/**
|
|
132
132
|
* The buyer associated with the payment link.
|
|
133
133
|
*/
|
|
134
|
-
buyer?:
|
|
134
|
+
buyer?: TransactionBuyer | null | undefined;
|
|
135
135
|
/**
|
|
136
136
|
* The shipping details for the payment link.
|
|
137
137
|
*/
|
|
@@ -176,7 +176,7 @@ export const PaymentLink$inboundSchema: z.ZodType<
|
|
|
176
176
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
177
177
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
178
178
|
status: PaymentLinkStatus$inboundSchema,
|
|
179
|
-
buyer: z.nullable(
|
|
179
|
+
buyer: z.nullable(TransactionBuyer$inboundSchema).optional(),
|
|
180
180
|
shipping_details: z.nullable(ShippingDetails$inboundSchema).optional(),
|
|
181
181
|
connection_options: z.nullable(z.record(z.record(z.any()))).optional(),
|
|
182
182
|
}).transform((v) => {
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
CartItem$outboundSchema,
|
|
11
11
|
} from "./cartitem.js";
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from "./
|
|
13
|
+
GuestBuyer,
|
|
14
|
+
GuestBuyer$Outbound,
|
|
15
|
+
GuestBuyer$outboundSchema,
|
|
16
|
+
} from "./guestbuyer.js";
|
|
17
17
|
import {
|
|
18
18
|
StatementDescriptor,
|
|
19
19
|
StatementDescriptor$Outbound,
|
|
@@ -37,7 +37,7 @@ export type PaymentLinkCreate = {
|
|
|
37
37
|
/**
|
|
38
38
|
* The guest buyer for the payment link.
|
|
39
39
|
*/
|
|
40
|
-
buyer?:
|
|
40
|
+
buyer?: GuestBuyer | null | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* The expiration date and time for the payment link.
|
|
43
43
|
*/
|
|
@@ -119,7 +119,7 @@ export type PaymentLinkCreate = {
|
|
|
119
119
|
|
|
120
120
|
/** @internal */
|
|
121
121
|
export type PaymentLinkCreate$Outbound = {
|
|
122
|
-
buyer?:
|
|
122
|
+
buyer?: GuestBuyer$Outbound | null | undefined;
|
|
123
123
|
expires_at?: string | null | undefined;
|
|
124
124
|
connection_options?: TransactionConnectionOptions$Outbound | null | undefined;
|
|
125
125
|
external_identifier?: string | null | undefined;
|
|
@@ -148,7 +148,7 @@ export const PaymentLinkCreate$outboundSchema: z.ZodType<
|
|
|
148
148
|
z.ZodTypeDef,
|
|
149
149
|
PaymentLinkCreate
|
|
150
150
|
> = z.object({
|
|
151
|
-
buyer: z.nullable(
|
|
151
|
+
buyer: z.nullable(GuestBuyer$outboundSchema).optional(),
|
|
152
152
|
expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
153
153
|
connectionOptions: z.nullable(TransactionConnectionOptions$outboundSchema)
|
|
154
154
|
.optional(),
|
|
@@ -7,15 +7,15 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from "./
|
|
10
|
+
PaymentMethodSummary,
|
|
11
|
+
PaymentMethodSummary$inboundSchema,
|
|
12
|
+
} from "./paymentmethodsummary.js";
|
|
13
13
|
|
|
14
14
|
export type PaymentMethodSummaries = {
|
|
15
15
|
/**
|
|
16
16
|
* A list of items returned for this request.
|
|
17
17
|
*/
|
|
18
|
-
items: Array<
|
|
18
|
+
items: Array<PaymentMethodSummary>;
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
@@ -24,7 +24,7 @@ export const PaymentMethodSummaries$inboundSchema: z.ZodType<
|
|
|
24
24
|
z.ZodTypeDef,
|
|
25
25
|
unknown
|
|
26
26
|
> = z.object({
|
|
27
|
-
items: z.array(
|
|
27
|
+
items: z.array(PaymentMethodSummary$inboundSchema),
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
export function paymentMethodSummariesFromJSON(
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
*
|
|
23
23
|
* A summary of a payment method.
|
|
24
24
|
*/
|
|
25
|
-
export type
|
|
25
|
+
export type PaymentMethodSummary = {
|
|
26
26
|
/**
|
|
27
27
|
* Always `payment-method`.
|
|
28
28
|
*/
|
|
@@ -103,8 +103,8 @@ export type PaymentMethodSummaryOutput = {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
/** @internal */
|
|
106
|
-
export const
|
|
107
|
-
|
|
106
|
+
export const PaymentMethodSummary$inboundSchema: z.ZodType<
|
|
107
|
+
PaymentMethodSummary,
|
|
108
108
|
z.ZodTypeDef,
|
|
109
109
|
unknown
|
|
110
110
|
> = z.object({
|
|
@@ -149,12 +149,12 @@ export const PaymentMethodSummaryOutput$inboundSchema: z.ZodType<
|
|
|
149
149
|
});
|
|
150
150
|
});
|
|
151
151
|
|
|
152
|
-
export function
|
|
152
|
+
export function paymentMethodSummaryFromJSON(
|
|
153
153
|
jsonString: string,
|
|
154
|
-
): SafeParseResult<
|
|
154
|
+
): SafeParseResult<PaymentMethodSummary, SDKValidationError> {
|
|
155
155
|
return safeParse(
|
|
156
156
|
jsonString,
|
|
157
|
-
(x) =>
|
|
158
|
-
`Failed to parse '
|
|
157
|
+
(x) => PaymentMethodSummary$inboundSchema.parse(JSON.parse(x)),
|
|
158
|
+
`Failed to parse 'PaymentMethodSummary' from JSON`,
|
|
159
159
|
);
|
|
160
160
|
}
|
|
@@ -26,7 +26,7 @@ export type Context =
|
|
|
26
26
|
| WalletPaymentOptionContext
|
|
27
27
|
| PaymentOptionContext;
|
|
28
28
|
|
|
29
|
-
export type
|
|
29
|
+
export type PaymentOption = {
|
|
30
30
|
type?: "payment-option" | undefined;
|
|
31
31
|
method: string;
|
|
32
32
|
iconUrl?: string | null | undefined;
|
|
@@ -61,8 +61,8 @@ export function contextFromJSON(
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
/** @internal */
|
|
64
|
-
export const
|
|
65
|
-
|
|
64
|
+
export const PaymentOption$inboundSchema: z.ZodType<
|
|
65
|
+
PaymentOption,
|
|
66
66
|
z.ZodTypeDef,
|
|
67
67
|
unknown
|
|
68
68
|
> = z.object({
|
|
@@ -88,12 +88,12 @@ export const PaymentOptionOutput$inboundSchema: z.ZodType<
|
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
|
|
91
|
-
export function
|
|
91
|
+
export function paymentOptionFromJSON(
|
|
92
92
|
jsonString: string,
|
|
93
|
-
): SafeParseResult<
|
|
93
|
+
): SafeParseResult<PaymentOption, SDKValidationError> {
|
|
94
94
|
return safeParse(
|
|
95
95
|
jsonString,
|
|
96
|
-
(x) =>
|
|
97
|
-
`Failed to parse '
|
|
96
|
+
(x) => PaymentOption$inboundSchema.parse(JSON.parse(x)),
|
|
97
|
+
`Failed to parse 'PaymentOption' from JSON`,
|
|
98
98
|
);
|
|
99
99
|
}
|
|
@@ -6,16 +6,13 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
import {
|
|
10
|
-
PaymentOptionOutput,
|
|
11
|
-
PaymentOptionOutput$inboundSchema,
|
|
12
|
-
} from "./paymentoptionoutput.js";
|
|
9
|
+
import { PaymentOption, PaymentOption$inboundSchema } from "./paymentoption.js";
|
|
13
10
|
|
|
14
11
|
export type PaymentOptions = {
|
|
15
12
|
/**
|
|
16
13
|
* A list of items returned for this request.
|
|
17
14
|
*/
|
|
18
|
-
items: Array<
|
|
15
|
+
items: Array<PaymentOption>;
|
|
19
16
|
};
|
|
20
17
|
|
|
21
18
|
/** @internal */
|
|
@@ -24,7 +21,7 @@ export const PaymentOptions$inboundSchema: z.ZodType<
|
|
|
24
21
|
z.ZodTypeDef,
|
|
25
22
|
unknown
|
|
26
23
|
> = z.object({
|
|
27
|
-
items: z.array(
|
|
24
|
+
items: z.array(PaymentOption$inboundSchema),
|
|
28
25
|
});
|
|
29
26
|
|
|
30
27
|
export function paymentOptionsFromJSON(
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from "./
|
|
8
|
+
GuestBuyer,
|
|
9
|
+
GuestBuyer$Outbound,
|
|
10
|
+
GuestBuyer$outboundSchema,
|
|
11
|
+
} from "./guestbuyer.js";
|
|
12
12
|
import {
|
|
13
13
|
PaymentMethodCard,
|
|
14
14
|
PaymentMethodCard$Outbound,
|
|
@@ -80,7 +80,7 @@ export type PayoutCreate = {
|
|
|
80
80
|
/**
|
|
81
81
|
* Inline buyer details for the payout. Use this instead of the `buyer_id` or `buyer_external_identifier`.
|
|
82
82
|
*/
|
|
83
|
-
buyer?:
|
|
83
|
+
buyer?: GuestBuyer | null | undefined;
|
|
84
84
|
/**
|
|
85
85
|
* The `external_identifier` of a stored buyer to use for this payout. Use this instead of the `buyer_id` or `buyer`.
|
|
86
86
|
*/
|
|
@@ -127,7 +127,7 @@ export type PayoutCreate$Outbound = {
|
|
|
127
127
|
category?: string | null | undefined;
|
|
128
128
|
external_identifier?: string | null | undefined;
|
|
129
129
|
buyer_id?: string | null | undefined;
|
|
130
|
-
buyer?:
|
|
130
|
+
buyer?: GuestBuyer$Outbound | null | undefined;
|
|
131
131
|
buyer_external_identifier?: string | null | undefined;
|
|
132
132
|
merchant?: PayoutMerchant$Outbound | null | undefined;
|
|
133
133
|
connection_options?: PayoutConnectionOptions$Outbound | null | undefined;
|
|
@@ -149,7 +149,7 @@ export const PayoutCreate$outboundSchema: z.ZodType<
|
|
|
149
149
|
category: z.nullable(PayoutCategory$outboundSchema).optional(),
|
|
150
150
|
externalIdentifier: z.nullable(z.string()).optional(),
|
|
151
151
|
buyerId: z.nullable(z.string()).optional(),
|
|
152
|
-
buyer: z.nullable(
|
|
152
|
+
buyer: z.nullable(GuestBuyer$outboundSchema).optional(),
|
|
153
153
|
buyerExternalIdentifier: z.nullable(z.string()).optional(),
|
|
154
154
|
merchant: z.nullable(PayoutMerchant$outboundSchema).optional(),
|
|
155
155
|
connectionOptions: z.nullable(PayoutConnectionOptions$outboundSchema)
|
|
@@ -21,13 +21,13 @@ import {
|
|
|
21
21
|
} from "./payoutpaymentservice.js";
|
|
22
22
|
import { PayoutStatus, PayoutStatus$inboundSchema } from "./payoutstatus.js";
|
|
23
23
|
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
} from "./
|
|
24
|
+
TransactionBuyer,
|
|
25
|
+
TransactionBuyer$inboundSchema,
|
|
26
|
+
} from "./transactionbuyer.js";
|
|
27
27
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} from "./
|
|
28
|
+
TransactionPaymentMethod,
|
|
29
|
+
TransactionPaymentMethod$inboundSchema,
|
|
30
|
+
} from "./transactionpaymentmethod.js";
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* PayoutSummary
|
|
@@ -52,7 +52,7 @@ export type PayoutSummary = {
|
|
|
52
52
|
/**
|
|
53
53
|
* The buyer used for this payout.
|
|
54
54
|
*/
|
|
55
|
-
buyer?:
|
|
55
|
+
buyer?: TransactionBuyer | null | undefined;
|
|
56
56
|
/**
|
|
57
57
|
* The type of payout to process.
|
|
58
58
|
*/
|
|
@@ -77,7 +77,7 @@ export type PayoutSummary = {
|
|
|
77
77
|
* The ID of the merchant account this payout was created for.
|
|
78
78
|
*/
|
|
79
79
|
merchantAccountId?: string | null | undefined;
|
|
80
|
-
paymentMethod:
|
|
80
|
+
paymentMethod: TransactionPaymentMethod;
|
|
81
81
|
paymentService: PayoutPaymentService;
|
|
82
82
|
/**
|
|
83
83
|
* The ID of the payout in the underlying payment service.
|
|
@@ -99,14 +99,14 @@ export const PayoutSummary$inboundSchema: z.ZodType<
|
|
|
99
99
|
type: z.literal("payout").default("payout"),
|
|
100
100
|
id: z.nullable(z.string()).optional(),
|
|
101
101
|
amount: z.number().int(),
|
|
102
|
-
buyer: z.nullable(
|
|
102
|
+
buyer: z.nullable(TransactionBuyer$inboundSchema).optional(),
|
|
103
103
|
category: z.nullable(PayoutCategory$inboundSchema).optional(),
|
|
104
104
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
105
105
|
currency: z.string(),
|
|
106
106
|
external_identifier: z.nullable(z.string()).optional(),
|
|
107
107
|
merchant: z.nullable(PayoutMerchantSummary$inboundSchema).optional(),
|
|
108
108
|
merchant_account_id: z.nullable(z.string()).optional(),
|
|
109
|
-
payment_method:
|
|
109
|
+
payment_method: TransactionPaymentMethod$inboundSchema,
|
|
110
110
|
payment_service: PayoutPaymentService$inboundSchema,
|
|
111
111
|
payment_service_payout_id: z.nullable(z.string()).optional(),
|
|
112
112
|
status: PayoutStatus$inboundSchema,
|
|
@@ -44,9 +44,9 @@ import {
|
|
|
44
44
|
StatementDescriptor$inboundSchema,
|
|
45
45
|
} from "./statementdescriptor.js";
|
|
46
46
|
import {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
} from "./
|
|
47
|
+
TransactionBuyer,
|
|
48
|
+
TransactionBuyer$inboundSchema,
|
|
49
|
+
} from "./transactionbuyer.js";
|
|
50
50
|
import {
|
|
51
51
|
TransactionIntent,
|
|
52
52
|
TransactionIntent$inboundSchema,
|
|
@@ -56,9 +56,9 @@ import {
|
|
|
56
56
|
TransactionIntentOutcome$inboundSchema,
|
|
57
57
|
} from "./transactionintentoutcome.js";
|
|
58
58
|
import {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} from "./
|
|
59
|
+
TransactionPaymentMethod,
|
|
60
|
+
TransactionPaymentMethod$inboundSchema,
|
|
61
|
+
} from "./transactionpaymentmethod.js";
|
|
62
62
|
import {
|
|
63
63
|
TransactionPaymentService,
|
|
64
64
|
TransactionPaymentService$inboundSchema,
|
|
@@ -72,14 +72,14 @@ import {
|
|
|
72
72
|
TransactionStatus$inboundSchema,
|
|
73
73
|
} from "./transactionstatus.js";
|
|
74
74
|
import {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
} from "./
|
|
75
|
+
TransactionThreeDSecureSummary,
|
|
76
|
+
TransactionThreeDSecureSummary$inboundSchema,
|
|
77
|
+
} from "./transactionthreedsecuresummary.js";
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* A full transaction resource.
|
|
81
81
|
*/
|
|
82
|
-
export type
|
|
82
|
+
export type Transaction = {
|
|
83
83
|
/**
|
|
84
84
|
* Always `transaction`.
|
|
85
85
|
*/
|
|
@@ -141,7 +141,7 @@ export type TransactionOutput = {
|
|
|
141
141
|
/**
|
|
142
142
|
* The payment method used for this transaction.
|
|
143
143
|
*/
|
|
144
|
-
paymentMethod?:
|
|
144
|
+
paymentMethod?: TransactionPaymentMethod | null | undefined;
|
|
145
145
|
/**
|
|
146
146
|
* The method used for the transaction.
|
|
147
147
|
*/
|
|
@@ -165,7 +165,7 @@ export type TransactionOutput = {
|
|
|
165
165
|
/**
|
|
166
166
|
* The buyer used for this transaction.
|
|
167
167
|
*/
|
|
168
|
-
buyer?:
|
|
168
|
+
buyer?: TransactionBuyer | null | undefined;
|
|
169
169
|
/**
|
|
170
170
|
* 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.
|
|
171
171
|
*/
|
|
@@ -249,7 +249,7 @@ export type TransactionOutput = {
|
|
|
249
249
|
/**
|
|
250
250
|
* The 3-D Secure data that was sent to the payment service for the transaction.
|
|
251
251
|
*/
|
|
252
|
-
threeDSecure?:
|
|
252
|
+
threeDSecure?: TransactionThreeDSecureSummary | null | undefined;
|
|
253
253
|
/**
|
|
254
254
|
* The payment service's unique ID for the transaction.
|
|
255
255
|
*/
|
|
@@ -346,8 +346,8 @@ export type TransactionOutput = {
|
|
|
346
346
|
};
|
|
347
347
|
|
|
348
348
|
/** @internal */
|
|
349
|
-
export const
|
|
350
|
-
|
|
349
|
+
export const Transaction$inboundSchema: z.ZodType<
|
|
350
|
+
Transaction,
|
|
351
351
|
z.ZodTypeDef,
|
|
352
352
|
unknown
|
|
353
353
|
> = z.object({
|
|
@@ -367,15 +367,14 @@ export const TransactionOutput$inboundSchema: z.ZodType<
|
|
|
367
367
|
country: z.nullable(z.string()).optional(),
|
|
368
368
|
external_identifier: z.nullable(z.string()).optional(),
|
|
369
369
|
intent: TransactionIntent$inboundSchema,
|
|
370
|
-
payment_method: z.nullable(
|
|
371
|
-
.optional(),
|
|
370
|
+
payment_method: z.nullable(TransactionPaymentMethod$inboundSchema).optional(),
|
|
372
371
|
method: z.nullable(Method$inboundSchema).optional(),
|
|
373
372
|
instrument_type: z.nullable(InstrumentType$inboundSchema).optional(),
|
|
374
373
|
error_code: z.nullable(z.string()).optional(),
|
|
375
374
|
payment_service: z.nullable(TransactionPaymentService$inboundSchema)
|
|
376
375
|
.optional(),
|
|
377
376
|
pending_review: z.boolean().default(false),
|
|
378
|
-
buyer: z.nullable(
|
|
377
|
+
buyer: z.nullable(TransactionBuyer$inboundSchema).optional(),
|
|
379
378
|
raw_response_code: z.nullable(z.string()).optional(),
|
|
380
379
|
raw_response_description: z.nullable(z.string()).optional(),
|
|
381
380
|
shipping_details: z.nullable(ShippingDetails$inboundSchema).optional(),
|
|
@@ -397,7 +396,7 @@ export const TransactionOutput$inboundSchema: z.ZodType<
|
|
|
397
396
|
statement_descriptor: z.nullable(StatementDescriptor$inboundSchema)
|
|
398
397
|
.optional(),
|
|
399
398
|
scheme_transaction_id: z.nullable(z.string()).optional(),
|
|
400
|
-
three_d_secure: z.nullable(
|
|
399
|
+
three_d_secure: z.nullable(TransactionThreeDSecureSummary$inboundSchema)
|
|
401
400
|
.optional(),
|
|
402
401
|
payment_service_transaction_id: z.nullable(z.string()).optional(),
|
|
403
402
|
additional_identifiers: z.record(z.nullable(z.string())).optional(),
|
|
@@ -494,12 +493,12 @@ export const TransactionOutput$inboundSchema: z.ZodType<
|
|
|
494
493
|
});
|
|
495
494
|
});
|
|
496
495
|
|
|
497
|
-
export function
|
|
496
|
+
export function transactionFromJSON(
|
|
498
497
|
jsonString: string,
|
|
499
|
-
): SafeParseResult<
|
|
498
|
+
): SafeParseResult<Transaction, SDKValidationError> {
|
|
500
499
|
return safeParse(
|
|
501
500
|
jsonString,
|
|
502
|
-
(x) =>
|
|
503
|
-
`Failed to parse '
|
|
501
|
+
(x) => Transaction$inboundSchema.parse(JSON.parse(x)),
|
|
502
|
+
`Failed to parse 'Transaction' from JSON`,
|
|
504
503
|
);
|
|
505
504
|
}
|