@gr4vy/sdk 1.6.9 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/encodings.d.ts.map +1 -1
- package/lib/encodings.js +3 -1
- package/lib/encodings.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/cybersourceoptions.d.ts +5 -0
- package/models/components/cybersourceoptions.d.ts.map +1 -1
- package/models/components/cybersourceoptions.js +1 -0
- package/models/components/cybersourceoptions.js.map +1 -1
- 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/reportcreate.d.ts.map +1 -1
- package/models/components/reportcreate.js +8 -24
- package/models/components/reportcreate.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 +27 -1
- package/models/operations/capturetransaction.d.ts.map +1 -1
- package/models/operations/capturetransaction.js +13 -2
- package/models/operations/capturetransaction.js.map +1 -1
- package/models/operations/voidtransaction.d.ts +27 -1
- package/models/operations/voidtransaction.d.ts.map +1 -1
- package/models/operations/voidtransaction.js +13 -2
- 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/lib/encodings.ts +4 -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/cybersourceoptions.ts +6 -0
- 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/reportcreate.ts +8 -24
- 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 +52 -4
- package/src/models/operations/voidtransaction.ts +52 -4
- 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
|
@@ -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,
|
|
@@ -77,24 +77,16 @@ export type Spec$Outbound =
|
|
|
77
77
|
export const Spec$outboundSchema: z.ZodType<Spec$Outbound, z.ZodTypeDef, Spec> =
|
|
78
78
|
z.union([
|
|
79
79
|
AccountsReceivablesReportSpec$outboundSchema.and(
|
|
80
|
-
z.object({ model: z.literal("accounts_receivables") })
|
|
81
|
-
model: v.model,
|
|
82
|
-
})),
|
|
80
|
+
z.object({ model: z.literal("accounts_receivables") }),
|
|
83
81
|
),
|
|
84
82
|
DetailedSettlementReportSpec$outboundSchema.and(
|
|
85
|
-
z.object({ model: z.literal("detailed_settlement") })
|
|
86
|
-
model: v.model,
|
|
87
|
-
})),
|
|
83
|
+
z.object({ model: z.literal("detailed_settlement") }),
|
|
88
84
|
),
|
|
89
85
|
TransactionRetriesReportSpec$outboundSchema.and(
|
|
90
|
-
z.object({ model: z.literal("transaction_retries") })
|
|
91
|
-
model: v.model,
|
|
92
|
-
})),
|
|
86
|
+
z.object({ model: z.literal("transaction_retries") }),
|
|
93
87
|
),
|
|
94
88
|
TransactionsReportSpec$outboundSchema.and(
|
|
95
|
-
z.object({ model: z.literal("transactions") })
|
|
96
|
-
model: v.model,
|
|
97
|
-
})),
|
|
89
|
+
z.object({ model: z.literal("transactions") }),
|
|
98
90
|
),
|
|
99
91
|
]);
|
|
100
92
|
|
|
@@ -131,24 +123,16 @@ export const ReportCreate$outboundSchema: z.ZodType<
|
|
|
131
123
|
scheduleTimezone: z.string().default("Etc/UTC"),
|
|
132
124
|
spec: z.union([
|
|
133
125
|
AccountsReceivablesReportSpec$outboundSchema.and(
|
|
134
|
-
z.object({ model: z.literal("accounts_receivables") })
|
|
135
|
-
model: v.model,
|
|
136
|
-
})),
|
|
126
|
+
z.object({ model: z.literal("accounts_receivables") }),
|
|
137
127
|
),
|
|
138
128
|
DetailedSettlementReportSpec$outboundSchema.and(
|
|
139
|
-
z.object({ model: z.literal("detailed_settlement") })
|
|
140
|
-
model: v.model,
|
|
141
|
-
})),
|
|
129
|
+
z.object({ model: z.literal("detailed_settlement") }),
|
|
142
130
|
),
|
|
143
131
|
TransactionRetriesReportSpec$outboundSchema.and(
|
|
144
|
-
z.object({ model: z.literal("transaction_retries") })
|
|
145
|
-
model: v.model,
|
|
146
|
-
})),
|
|
132
|
+
z.object({ model: z.literal("transaction_retries") }),
|
|
147
133
|
),
|
|
148
134
|
TransactionsReportSpec$outboundSchema.and(
|
|
149
|
-
z.object({ model: z.literal("transactions") })
|
|
150
|
-
model: v.model,
|
|
151
|
-
})),
|
|
135
|
+
z.object({ model: z.literal("transactions") }),
|
|
152
136
|
),
|
|
153
137
|
]),
|
|
154
138
|
}).transform((v) => {
|
|
@@ -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
|
}
|
|
@@ -8,11 +8,11 @@ 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
|
-
} from "./
|
|
11
|
+
BillingDetails,
|
|
12
|
+
BillingDetails$inboundSchema,
|
|
13
|
+
} from "./billingdetails.js";
|
|
14
14
|
|
|
15
|
-
export type
|
|
15
|
+
export type TransactionBuyer = {
|
|
16
16
|
/**
|
|
17
17
|
* Always `buyer`.
|
|
18
18
|
*/
|
|
@@ -32,7 +32,7 @@ export type TransactionBuyerOutput = {
|
|
|
32
32
|
/**
|
|
33
33
|
* The billing name, address, email, and other fields for this buyer.
|
|
34
34
|
*/
|
|
35
|
-
billingDetails?:
|
|
35
|
+
billingDetails?: BillingDetails | null | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* The buyer account number.
|
|
38
38
|
*/
|
|
@@ -40,8 +40,8 @@ export type TransactionBuyerOutput = {
|
|
|
40
40
|
};
|
|
41
41
|
|
|
42
42
|
/** @internal */
|
|
43
|
-
export const
|
|
44
|
-
|
|
43
|
+
export const TransactionBuyer$inboundSchema: z.ZodType<
|
|
44
|
+
TransactionBuyer,
|
|
45
45
|
z.ZodTypeDef,
|
|
46
46
|
unknown
|
|
47
47
|
> = z.object({
|
|
@@ -49,7 +49,7 @@ export const TransactionBuyerOutput$inboundSchema: z.ZodType<
|
|
|
49
49
|
id: z.nullable(z.string()).optional(),
|
|
50
50
|
display_name: z.nullable(z.string()).optional(),
|
|
51
51
|
external_identifier: z.nullable(z.string()).optional(),
|
|
52
|
-
billing_details: z.nullable(
|
|
52
|
+
billing_details: z.nullable(BillingDetails$inboundSchema).optional(),
|
|
53
53
|
account_number: z.nullable(z.string()).optional(),
|
|
54
54
|
}).transform((v) => {
|
|
55
55
|
return remap$(v, {
|
|
@@ -60,12 +60,12 @@ export const TransactionBuyerOutput$inboundSchema: z.ZodType<
|
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
export function
|
|
63
|
+
export function transactionBuyerFromJSON(
|
|
64
64
|
jsonString: string,
|
|
65
|
-
): SafeParseResult<
|
|
65
|
+
): SafeParseResult<TransactionBuyer, SDKValidationError> {
|
|
66
66
|
return safeParse(
|
|
67
67
|
jsonString,
|
|
68
|
-
(x) =>
|
|
69
|
-
`Failed to parse '
|
|
68
|
+
(x) => TransactionBuyer$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
+
`Failed to parse 'TransactionBuyer' from JSON`,
|
|
70
70
|
);
|
|
71
71
|
}
|
|
@@ -8,10 +8,7 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import { CancelStatus, CancelStatus$inboundSchema } from "./cancelstatus.js";
|
|
11
|
-
import {
|
|
12
|
-
TransactionOutput,
|
|
13
|
-
TransactionOutput$inboundSchema,
|
|
14
|
-
} from "./transactionoutput.js";
|
|
11
|
+
import { Transaction, Transaction$inboundSchema } from "./transaction.js";
|
|
15
12
|
|
|
16
13
|
export type TransactionCancel = {
|
|
17
14
|
/**
|
|
@@ -34,7 +31,7 @@ export type TransactionCancel = {
|
|
|
34
31
|
/**
|
|
35
32
|
* A full transaction resource.
|
|
36
33
|
*/
|
|
37
|
-
transaction:
|
|
34
|
+
transaction: Transaction;
|
|
38
35
|
};
|
|
39
36
|
|
|
40
37
|
/** @internal */
|
|
@@ -48,7 +45,7 @@ export const TransactionCancel$inboundSchema: z.ZodType<
|
|
|
48
45
|
code: z.nullable(z.string()),
|
|
49
46
|
raw_response_code: z.nullable(z.string()),
|
|
50
47
|
raw_response_description: z.nullable(z.string()),
|
|
51
|
-
transaction:
|
|
48
|
+
transaction: Transaction$inboundSchema,
|
|
52
49
|
}).transform((v) => {
|
|
53
50
|
return remap$(v, {
|
|
54
51
|
"raw_response_code": "rawResponseCode",
|
|
@@ -8,12 +8,9 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import { CaptureStatus, CaptureStatus$inboundSchema } from "./capturestatus.js";
|
|
11
|
-
import {
|
|
12
|
-
TransactionOutput,
|
|
13
|
-
TransactionOutput$inboundSchema,
|
|
14
|
-
} from "./transactionoutput.js";
|
|
11
|
+
import { Transaction, Transaction$inboundSchema } from "./transaction.js";
|
|
15
12
|
|
|
16
|
-
export type
|
|
13
|
+
export type TransactionCapture = {
|
|
17
14
|
/**
|
|
18
15
|
* Always `transaction-capture`.
|
|
19
16
|
*/
|
|
@@ -34,12 +31,12 @@ export type TransactionCaptureOutput = {
|
|
|
34
31
|
/**
|
|
35
32
|
* A full transaction resource.
|
|
36
33
|
*/
|
|
37
|
-
transaction:
|
|
34
|
+
transaction: Transaction;
|
|
38
35
|
};
|
|
39
36
|
|
|
40
37
|
/** @internal */
|
|
41
|
-
export const
|
|
42
|
-
|
|
38
|
+
export const TransactionCapture$inboundSchema: z.ZodType<
|
|
39
|
+
TransactionCapture,
|
|
43
40
|
z.ZodTypeDef,
|
|
44
41
|
unknown
|
|
45
42
|
> = z.object({
|
|
@@ -48,7 +45,7 @@ export const TransactionCaptureOutput$inboundSchema: z.ZodType<
|
|
|
48
45
|
code: z.nullable(z.string()),
|
|
49
46
|
raw_response_code: z.nullable(z.string()),
|
|
50
47
|
raw_response_description: z.nullable(z.string()),
|
|
51
|
-
transaction:
|
|
48
|
+
transaction: Transaction$inboundSchema,
|
|
52
49
|
}).transform((v) => {
|
|
53
50
|
return remap$(v, {
|
|
54
51
|
"raw_response_code": "rawResponseCode",
|
|
@@ -56,12 +53,12 @@ export const TransactionCaptureOutput$inboundSchema: z.ZodType<
|
|
|
56
53
|
});
|
|
57
54
|
});
|
|
58
55
|
|
|
59
|
-
export function
|
|
56
|
+
export function transactionCaptureFromJSON(
|
|
60
57
|
jsonString: string,
|
|
61
|
-
): SafeParseResult<
|
|
58
|
+
): SafeParseResult<TransactionCapture, SDKValidationError> {
|
|
62
59
|
return safeParse(
|
|
63
60
|
jsonString,
|
|
64
|
-
(x) =>
|
|
65
|
-
`Failed to parse '
|
|
61
|
+
(x) => TransactionCapture$inboundSchema.parse(JSON.parse(x)),
|
|
62
|
+
`Failed to parse 'TransactionCapture' from JSON`,
|
|
66
63
|
);
|
|
67
64
|
}
|
|
@@ -65,10 +65,10 @@ import {
|
|
|
65
65
|
GooglePayPaymentMethodCreate$outboundSchema,
|
|
66
66
|
} from "./googlepaypaymentmethodcreate.js";
|
|
67
67
|
import {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
} from "./
|
|
68
|
+
GuestBuyer,
|
|
69
|
+
GuestBuyer$Outbound,
|
|
70
|
+
GuestBuyer$outboundSchema,
|
|
71
|
+
} from "./guestbuyer.js";
|
|
72
72
|
import {
|
|
73
73
|
IntegrationClient,
|
|
74
74
|
IntegrationClient$outboundSchema,
|
|
@@ -185,7 +185,7 @@ export type TransactionCreate = {
|
|
|
185
185
|
/**
|
|
186
186
|
* Guest buyer details provided inline rather than creating a buyer resource beforehand and using the `buyer_id` or `buyer_external_identifier` keys. No buyer resource will be created on Gr4vy when used.
|
|
187
187
|
*/
|
|
188
|
-
buyer?:
|
|
188
|
+
buyer?: GuestBuyer | null | undefined;
|
|
189
189
|
/**
|
|
190
190
|
* The ID of the buyer to associate this payment method to. If this field is provided then the `buyer_external_identifier` field needs to be unset. If a stored payment method or gift card is provided, then the buyer for that payment method needs to match the buyer for this field.
|
|
191
191
|
*/
|
|
@@ -456,7 +456,7 @@ export type TransactionCreate$Outbound = {
|
|
|
456
456
|
| CheckoutSessionWithUrlPaymentMethodCreate$Outbound
|
|
457
457
|
| null
|
|
458
458
|
| undefined;
|
|
459
|
-
buyer?:
|
|
459
|
+
buyer?: GuestBuyer$Outbound | null | undefined;
|
|
460
460
|
buyer_id?: string | null | undefined;
|
|
461
461
|
buyer_external_identifier?: string | null | undefined;
|
|
462
462
|
gift_cards?:
|
|
@@ -527,7 +527,7 @@ export const TransactionCreate$outboundSchema: z.ZodType<
|
|
|
527
527
|
CheckoutSessionWithUrlPaymentMethodCreate$outboundSchema,
|
|
528
528
|
]),
|
|
529
529
|
).optional(),
|
|
530
|
-
buyer: z.nullable(
|
|
530
|
+
buyer: z.nullable(GuestBuyer$outboundSchema).optional(),
|
|
531
531
|
buyerId: z.nullable(z.string()).optional(),
|
|
532
532
|
buyerExternalIdentifier: z.nullable(z.string()).optional(),
|
|
533
533
|
giftCards: z.nullable(
|
|
@@ -9,6 +9,10 @@ import * as openEnums from "../../types/enums.js";
|
|
|
9
9
|
import { OpenEnum } from "../../types/enums.js";
|
|
10
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
import {
|
|
13
|
+
TransactionEventContext,
|
|
14
|
+
TransactionEventContext$inboundSchema,
|
|
15
|
+
} from "./transactioneventcontext.js";
|
|
12
16
|
|
|
13
17
|
/**
|
|
14
18
|
* The specific event name.
|
|
@@ -94,7 +98,7 @@ export const Name = {
|
|
|
94
98
|
*/
|
|
95
99
|
export type Name = OpenEnum<typeof Name>;
|
|
96
100
|
|
|
97
|
-
export type
|
|
101
|
+
export type TransactionEvent = {
|
|
98
102
|
/**
|
|
99
103
|
* Always `transaction-event`.
|
|
100
104
|
*/
|
|
@@ -111,7 +115,7 @@ export type TransactionEventOutput = {
|
|
|
111
115
|
* The date this event was created at.
|
|
112
116
|
*/
|
|
113
117
|
createdAt: Date;
|
|
114
|
-
context:
|
|
118
|
+
context: TransactionEventContext;
|
|
115
119
|
};
|
|
116
120
|
|
|
117
121
|
/** @internal */
|
|
@@ -119,8 +123,8 @@ export const Name$inboundSchema: z.ZodType<Name, z.ZodTypeDef, unknown> =
|
|
|
119
123
|
openEnums.inboundSchema(Name);
|
|
120
124
|
|
|
121
125
|
/** @internal */
|
|
122
|
-
export const
|
|
123
|
-
|
|
126
|
+
export const TransactionEvent$inboundSchema: z.ZodType<
|
|
127
|
+
TransactionEvent,
|
|
124
128
|
z.ZodTypeDef,
|
|
125
129
|
unknown
|
|
126
130
|
> = z.object({
|
|
@@ -128,19 +132,19 @@ export const TransactionEventOutput$inboundSchema: z.ZodType<
|
|
|
128
132
|
id: z.string(),
|
|
129
133
|
name: Name$inboundSchema,
|
|
130
134
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
131
|
-
context:
|
|
135
|
+
context: TransactionEventContext$inboundSchema,
|
|
132
136
|
}).transform((v) => {
|
|
133
137
|
return remap$(v, {
|
|
134
138
|
"created_at": "createdAt",
|
|
135
139
|
});
|
|
136
140
|
});
|
|
137
141
|
|
|
138
|
-
export function
|
|
142
|
+
export function transactionEventFromJSON(
|
|
139
143
|
jsonString: string,
|
|
140
|
-
): SafeParseResult<
|
|
144
|
+
): SafeParseResult<TransactionEvent, SDKValidationError> {
|
|
141
145
|
return safeParse(
|
|
142
146
|
jsonString,
|
|
143
|
-
(x) =>
|
|
144
|
-
`Failed to parse '
|
|
147
|
+
(x) => TransactionEvent$inboundSchema.parse(JSON.parse(x)),
|
|
148
|
+
`Failed to parse 'TransactionEvent' from JSON`,
|
|
145
149
|
);
|
|
146
150
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 {
|
|
8
|
+
collectExtraKeys as collectExtraKeys$,
|
|
9
|
+
safeParse,
|
|
10
|
+
} from "../../lib/schemas.js";
|
|
11
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
|
+
|
|
14
|
+
export type TransactionEventContext = {
|
|
15
|
+
transactionId?: any | undefined;
|
|
16
|
+
createdAt?: any | undefined;
|
|
17
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const TransactionEventContext$inboundSchema: z.ZodType<
|
|
22
|
+
TransactionEventContext,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = collectExtraKeys$(
|
|
26
|
+
z.object({
|
|
27
|
+
transaction_id: z.any().optional(),
|
|
28
|
+
created_at: z.any().optional(),
|
|
29
|
+
}).catchall(z.any()),
|
|
30
|
+
"additionalProperties",
|
|
31
|
+
true,
|
|
32
|
+
).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"transaction_id": "transactionId",
|
|
35
|
+
"created_at": "createdAt",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function transactionEventContextFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<TransactionEventContext, SDKValidationError> {
|
|
42
|
+
return safeParse(
|
|
43
|
+
jsonString,
|
|
44
|
+
(x) => TransactionEventContext$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'TransactionEventContext' from JSON`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -8,15 +8,15 @@ 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
|
-
} from "./
|
|
11
|
+
TransactionEvent,
|
|
12
|
+
TransactionEvent$inboundSchema,
|
|
13
|
+
} from "./transactionevent.js";
|
|
14
14
|
|
|
15
15
|
export type TransactionEvents = {
|
|
16
16
|
/**
|
|
17
17
|
* A list of items returned for this request.
|
|
18
18
|
*/
|
|
19
|
-
items: Array<
|
|
19
|
+
items: Array<TransactionEvent>;
|
|
20
20
|
/**
|
|
21
21
|
* The number of items for this page.
|
|
22
22
|
*/
|
|
@@ -37,7 +37,7 @@ export const TransactionEvents$inboundSchema: z.ZodType<
|
|
|
37
37
|
z.ZodTypeDef,
|
|
38
38
|
unknown
|
|
39
39
|
> = z.object({
|
|
40
|
-
items: z.array(
|
|
40
|
+
items: z.array(TransactionEvent$inboundSchema),
|
|
41
41
|
limit: z.number().int().default(20),
|
|
42
42
|
next_cursor: z.nullable(z.string()).optional(),
|
|
43
43
|
previous_cursor: z.nullable(z.string()).optional(),
|
package/src/models/components/{transactionpaymentmethodoutput.ts → transactionpaymentmethod.ts}
RENAMED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
PaymentMethodDetailsCard$inboundSchema,
|
|
20
20
|
} from "./paymentmethoddetailscard.js";
|
|
21
21
|
|
|
22
|
-
export type
|
|
22
|
+
export type TransactionPaymentMethod = {
|
|
23
23
|
/**
|
|
24
24
|
* Always `payment-method`.
|
|
25
25
|
*/
|
|
@@ -84,8 +84,8 @@ export type TransactionPaymentMethodOutput = {
|
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
/** @internal */
|
|
87
|
-
export const
|
|
88
|
-
|
|
87
|
+
export const TransactionPaymentMethod$inboundSchema: z.ZodType<
|
|
88
|
+
TransactionPaymentMethod,
|
|
89
89
|
z.ZodTypeDef,
|
|
90
90
|
unknown
|
|
91
91
|
> = z.object({
|
|
@@ -118,12 +118,12 @@ export const TransactionPaymentMethodOutput$inboundSchema: z.ZodType<
|
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
120
|
|
|
121
|
-
export function
|
|
121
|
+
export function transactionPaymentMethodFromJSON(
|
|
122
122
|
jsonString: string,
|
|
123
|
-
): SafeParseResult<
|
|
123
|
+
): SafeParseResult<TransactionPaymentMethod, SDKValidationError> {
|
|
124
124
|
return safeParse(
|
|
125
125
|
jsonString,
|
|
126
|
-
(x) =>
|
|
127
|
-
`Failed to parse '
|
|
126
|
+
(x) => TransactionPaymentMethod$inboundSchema.parse(JSON.parse(x)),
|
|
127
|
+
`Failed to parse 'TransactionPaymentMethod' from JSON`,
|
|
128
128
|
);
|
|
129
129
|
}
|