@gr4vy/sdk 1.5.2 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +15 -12
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +15 -12
- package/models/components/index.js.map +1 -1
- 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/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/{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} +23 -23
- package/models/components/transactionoutput.d.ts.map +1 -0
- package/models/components/{transaction.js → transactionoutput.js} +28 -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 +15 -12
- 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/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/{transactionevent.ts → transactioneventoutput.ts} +21 -21
- package/src/models/components/transactionevents.ts +9 -9
- package/src/models/components/{transaction.ts → transactionoutput.ts} +56 -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
|
@@ -96,7 +96,7 @@ export const Name = {
|
|
|
96
96
|
*/
|
|
97
97
|
export type Name = OpenEnum<typeof Name>;
|
|
98
98
|
|
|
99
|
-
export type
|
|
99
|
+
export type TransactionEventOutput = {
|
|
100
100
|
/**
|
|
101
101
|
* Always `transaction-event`.
|
|
102
102
|
*/
|
|
@@ -143,8 +143,8 @@ export namespace Name$ {
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
/** @internal */
|
|
146
|
-
export const
|
|
147
|
-
|
|
146
|
+
export const TransactionEventOutput$inboundSchema: z.ZodType<
|
|
147
|
+
TransactionEventOutput,
|
|
148
148
|
z.ZodTypeDef,
|
|
149
149
|
unknown
|
|
150
150
|
> = z.object({
|
|
@@ -160,7 +160,7 @@ export const TransactionEvent$inboundSchema: z.ZodType<
|
|
|
160
160
|
});
|
|
161
161
|
|
|
162
162
|
/** @internal */
|
|
163
|
-
export type
|
|
163
|
+
export type TransactionEventOutput$Outbound = {
|
|
164
164
|
type: "transaction-event";
|
|
165
165
|
id: string;
|
|
166
166
|
name: string;
|
|
@@ -169,10 +169,10 @@ export type TransactionEvent$Outbound = {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
/** @internal */
|
|
172
|
-
export const
|
|
173
|
-
|
|
172
|
+
export const TransactionEventOutput$outboundSchema: z.ZodType<
|
|
173
|
+
TransactionEventOutput$Outbound,
|
|
174
174
|
z.ZodTypeDef,
|
|
175
|
-
|
|
175
|
+
TransactionEventOutput
|
|
176
176
|
> = z.object({
|
|
177
177
|
type: z.literal("transaction-event").default("transaction-event" as const),
|
|
178
178
|
id: z.string(),
|
|
@@ -189,29 +189,29 @@ export const TransactionEvent$outboundSchema: z.ZodType<
|
|
|
189
189
|
* @internal
|
|
190
190
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
191
191
|
*/
|
|
192
|
-
export namespace
|
|
193
|
-
/** @deprecated use `
|
|
194
|
-
export const inboundSchema =
|
|
195
|
-
/** @deprecated use `
|
|
196
|
-
export const outboundSchema =
|
|
197
|
-
/** @deprecated use `
|
|
198
|
-
export type Outbound =
|
|
192
|
+
export namespace TransactionEventOutput$ {
|
|
193
|
+
/** @deprecated use `TransactionEventOutput$inboundSchema` instead. */
|
|
194
|
+
export const inboundSchema = TransactionEventOutput$inboundSchema;
|
|
195
|
+
/** @deprecated use `TransactionEventOutput$outboundSchema` instead. */
|
|
196
|
+
export const outboundSchema = TransactionEventOutput$outboundSchema;
|
|
197
|
+
/** @deprecated use `TransactionEventOutput$Outbound` instead. */
|
|
198
|
+
export type Outbound = TransactionEventOutput$Outbound;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
export function
|
|
202
|
-
|
|
201
|
+
export function transactionEventOutputToJSON(
|
|
202
|
+
transactionEventOutput: TransactionEventOutput,
|
|
203
203
|
): string {
|
|
204
204
|
return JSON.stringify(
|
|
205
|
-
|
|
205
|
+
TransactionEventOutput$outboundSchema.parse(transactionEventOutput),
|
|
206
206
|
);
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
export function
|
|
209
|
+
export function transactionEventOutputFromJSON(
|
|
210
210
|
jsonString: string,
|
|
211
|
-
): SafeParseResult<
|
|
211
|
+
): SafeParseResult<TransactionEventOutput, SDKValidationError> {
|
|
212
212
|
return safeParse(
|
|
213
213
|
jsonString,
|
|
214
|
-
(x) =>
|
|
215
|
-
`Failed to parse '
|
|
214
|
+
(x) => TransactionEventOutput$inboundSchema.parse(JSON.parse(x)),
|
|
215
|
+
`Failed to parse 'TransactionEventOutput' from JSON`,
|
|
216
216
|
);
|
|
217
217
|
}
|
|
@@ -8,17 +8,17 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import {
|
|
11
|
-
|
|
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
|
*/
|
|
@@ -385,8 +385,8 @@ export type Transaction = {
|
|
|
385
385
|
};
|
|
386
386
|
|
|
387
387
|
/** @internal */
|
|
388
|
-
export const
|
|
389
|
-
|
|
388
|
+
export const TransactionOutput$inboundSchema: z.ZodType<
|
|
389
|
+
TransactionOutput,
|
|
390
390
|
z.ZodTypeDef,
|
|
391
391
|
unknown
|
|
392
392
|
> = z.object({
|
|
@@ -406,14 +406,15 @@ export const Transaction$inboundSchema: z.ZodType<
|
|
|
406
406
|
country: z.nullable(z.string()).optional(),
|
|
407
407
|
external_identifier: z.nullable(z.string()).optional(),
|
|
408
408
|
intent: TransactionIntent$inboundSchema,
|
|
409
|
-
payment_method: z.nullable(
|
|
409
|
+
payment_method: z.nullable(TransactionPaymentMethodOutput$inboundSchema)
|
|
410
|
+
.optional(),
|
|
410
411
|
method: z.nullable(Method$inboundSchema).optional(),
|
|
411
412
|
instrument_type: z.nullable(InstrumentType$inboundSchema).optional(),
|
|
412
413
|
error_code: z.nullable(z.string()).optional(),
|
|
413
414
|
payment_service: z.nullable(TransactionPaymentService$inboundSchema)
|
|
414
415
|
.optional(),
|
|
415
416
|
pending_review: z.boolean().default(false),
|
|
416
|
-
buyer: z.nullable(
|
|
417
|
+
buyer: z.nullable(TransactionBuyerOutput$inboundSchema).optional(),
|
|
417
418
|
raw_response_code: z.nullable(z.string()).optional(),
|
|
418
419
|
raw_response_description: z.nullable(z.string()).optional(),
|
|
419
420
|
shipping_details: z.nullable(ShippingDetails$inboundSchema).optional(),
|
|
@@ -435,7 +436,7 @@ export const Transaction$inboundSchema: z.ZodType<
|
|
|
435
436
|
statement_descriptor: z.nullable(StatementDescriptor$inboundSchema)
|
|
436
437
|
.optional(),
|
|
437
438
|
scheme_transaction_id: z.nullable(z.string()).optional(),
|
|
438
|
-
three_d_secure: z.nullable(
|
|
439
|
+
three_d_secure: z.nullable(TransactionThreeDSecureSummaryOutput$inboundSchema)
|
|
439
440
|
.optional(),
|
|
440
441
|
payment_service_transaction_id: z.nullable(z.string()).optional(),
|
|
441
442
|
additional_identifiers: z.record(z.nullable(z.string())).optional(),
|
|
@@ -531,7 +532,7 @@ export const Transaction$inboundSchema: z.ZodType<
|
|
|
531
532
|
});
|
|
532
533
|
|
|
533
534
|
/** @internal */
|
|
534
|
-
export type
|
|
535
|
+
export type TransactionOutput$Outbound = {
|
|
535
536
|
type: "transaction";
|
|
536
537
|
id: string;
|
|
537
538
|
reconciliation_id: string;
|
|
@@ -548,13 +549,13 @@ export type Transaction$Outbound = {
|
|
|
548
549
|
country?: string | null | undefined;
|
|
549
550
|
external_identifier?: string | null | undefined;
|
|
550
551
|
intent: string;
|
|
551
|
-
payment_method?:
|
|
552
|
+
payment_method?: TransactionPaymentMethodOutput$Outbound | null | undefined;
|
|
552
553
|
method?: string | null | undefined;
|
|
553
554
|
instrument_type?: string | null | undefined;
|
|
554
555
|
error_code?: string | null | undefined;
|
|
555
556
|
payment_service?: TransactionPaymentService$Outbound | null | undefined;
|
|
556
557
|
pending_review: boolean;
|
|
557
|
-
buyer?:
|
|
558
|
+
buyer?: TransactionBuyerOutput$Outbound | null | undefined;
|
|
558
559
|
raw_response_code?: string | null | undefined;
|
|
559
560
|
raw_response_description?: string | null | undefined;
|
|
560
561
|
shipping_details?: ShippingDetails$Outbound | null | undefined;
|
|
@@ -575,7 +576,10 @@ export type Transaction$Outbound = {
|
|
|
575
576
|
cart_items?: Array<CartItem$Outbound> | null | undefined;
|
|
576
577
|
statement_descriptor?: StatementDescriptor$Outbound | null | undefined;
|
|
577
578
|
scheme_transaction_id?: string | null | undefined;
|
|
578
|
-
three_d_secure?:
|
|
579
|
+
three_d_secure?:
|
|
580
|
+
| TransactionThreeDSecureSummaryOutput$Outbound
|
|
581
|
+
| null
|
|
582
|
+
| undefined;
|
|
579
583
|
payment_service_transaction_id?: string | null | undefined;
|
|
580
584
|
additional_identifiers?: { [k: string]: string | null } | undefined;
|
|
581
585
|
metadata?: { [k: string]: string } | null | undefined;
|
|
@@ -602,10 +606,10 @@ export type Transaction$Outbound = {
|
|
|
602
606
|
};
|
|
603
607
|
|
|
604
608
|
/** @internal */
|
|
605
|
-
export const
|
|
606
|
-
|
|
609
|
+
export const TransactionOutput$outboundSchema: z.ZodType<
|
|
610
|
+
TransactionOutput$Outbound,
|
|
607
611
|
z.ZodTypeDef,
|
|
608
|
-
|
|
612
|
+
TransactionOutput
|
|
609
613
|
> = z.object({
|
|
610
614
|
type: z.literal("transaction").default("transaction" as const),
|
|
611
615
|
id: z.string(),
|
|
@@ -623,14 +627,15 @@ export const Transaction$outboundSchema: z.ZodType<
|
|
|
623
627
|
country: z.nullable(z.string()).optional(),
|
|
624
628
|
externalIdentifier: z.nullable(z.string()).optional(),
|
|
625
629
|
intent: TransactionIntent$outboundSchema,
|
|
626
|
-
paymentMethod: z.nullable(
|
|
630
|
+
paymentMethod: z.nullable(TransactionPaymentMethodOutput$outboundSchema)
|
|
631
|
+
.optional(),
|
|
627
632
|
method: z.nullable(Method$outboundSchema).optional(),
|
|
628
633
|
instrumentType: z.nullable(InstrumentType$outboundSchema).optional(),
|
|
629
634
|
errorCode: z.nullable(z.string()).optional(),
|
|
630
635
|
paymentService: z.nullable(TransactionPaymentService$outboundSchema)
|
|
631
636
|
.optional(),
|
|
632
637
|
pendingReview: z.boolean().default(false),
|
|
633
|
-
buyer: z.nullable(
|
|
638
|
+
buyer: z.nullable(TransactionBuyerOutput$outboundSchema).optional(),
|
|
634
639
|
rawResponseCode: z.nullable(z.string()).optional(),
|
|
635
640
|
rawResponseDescription: z.nullable(z.string()).optional(),
|
|
636
641
|
shippingDetails: z.nullable(ShippingDetails$outboundSchema).optional(),
|
|
@@ -652,7 +657,7 @@ export const Transaction$outboundSchema: z.ZodType<
|
|
|
652
657
|
statementDescriptor: z.nullable(StatementDescriptor$outboundSchema)
|
|
653
658
|
.optional(),
|
|
654
659
|
schemeTransactionId: z.nullable(z.string()).optional(),
|
|
655
|
-
threeDSecure: z.nullable(
|
|
660
|
+
threeDSecure: z.nullable(TransactionThreeDSecureSummaryOutput$outboundSchema)
|
|
656
661
|
.optional(),
|
|
657
662
|
paymentServiceTransactionId: z.nullable(z.string()).optional(),
|
|
658
663
|
additionalIdentifiers: z.record(z.nullable(z.string())).optional(),
|
|
@@ -741,25 +746,29 @@ export const Transaction$outboundSchema: z.ZodType<
|
|
|
741
746
|
* @internal
|
|
742
747
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
743
748
|
*/
|
|
744
|
-
export namespace
|
|
745
|
-
/** @deprecated use `
|
|
746
|
-
export const inboundSchema =
|
|
747
|
-
/** @deprecated use `
|
|
748
|
-
export const outboundSchema =
|
|
749
|
-
/** @deprecated use `
|
|
750
|
-
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;
|
|
751
756
|
}
|
|
752
757
|
|
|
753
|
-
export function
|
|
754
|
-
|
|
758
|
+
export function transactionOutputToJSON(
|
|
759
|
+
transactionOutput: TransactionOutput,
|
|
760
|
+
): string {
|
|
761
|
+
return JSON.stringify(
|
|
762
|
+
TransactionOutput$outboundSchema.parse(transactionOutput),
|
|
763
|
+
);
|
|
755
764
|
}
|
|
756
765
|
|
|
757
|
-
export function
|
|
766
|
+
export function transactionOutputFromJSON(
|
|
758
767
|
jsonString: string,
|
|
759
|
-
): SafeParseResult<
|
|
768
|
+
): SafeParseResult<TransactionOutput, SDKValidationError> {
|
|
760
769
|
return safeParse(
|
|
761
770
|
jsonString,
|
|
762
|
-
(x) =>
|
|
763
|
-
`Failed to parse '
|
|
771
|
+
(x) => TransactionOutput$inboundSchema.parse(JSON.parse(x)),
|
|
772
|
+
`Failed to parse 'TransactionOutput' from JSON`,
|
|
764
773
|
);
|
|
765
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(),
|