@gr4vy/sdk 1.5.1 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/sdks/transactions/README.md +4 -4
- package/examples/package-lock.json +1 -1
- package/funcs/transactionsCreate.d.ts +1 -1
- package/funcs/transactionsCreate.d.ts.map +1 -1
- package/funcs/transactionsCreate.js +1 -1
- package/funcs/transactionsCreate.js.map +1 -1
- package/funcs/transactionsGet.d.ts +1 -1
- package/funcs/transactionsGet.d.ts.map +1 -1
- package/funcs/transactionsGet.js +1 -1
- package/funcs/transactionsGet.js.map +1 -1
- package/funcs/transactionsSync.d.ts +1 -1
- package/funcs/transactionsSync.d.ts.map +1 -1
- package/funcs/transactionsSync.js +1 -1
- package/funcs/transactionsSync.js.map +1 -1
- package/funcs/transactionsUpdate.d.ts +1 -1
- package/funcs/transactionsUpdate.d.ts.map +1 -1
- package/funcs/transactionsUpdate.js +1 -1
- package/funcs/transactionsUpdate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/auditlogentries.d.ts +3 -3
- package/models/components/auditlogentries.d.ts.map +1 -1
- package/models/components/auditlogentries.js +3 -3
- package/models/components/auditlogentries.js.map +1 -1
- package/models/components/{auditlogentry.d.ts → auditlogentryoutput.d.ts} +14 -14
- package/models/components/auditlogentryoutput.d.ts.map +1 -0
- package/models/components/{auditlogentry.js → auditlogentryoutput.js} +17 -17
- package/models/components/auditlogentryoutput.js.map +1 -0
- package/models/components/checkoutsession.d.ts +3 -3
- package/models/components/checkoutsession.d.ts.map +1 -1
- package/models/components/checkoutsession.js +3 -3
- package/models/components/checkoutsession.js.map +1 -1
- package/models/components/{checkoutsessionpaymentmethod.d.ts → checkoutsessionpaymentmethodoutput.d.ts} +14 -14
- package/models/components/checkoutsessionpaymentmethodoutput.d.ts.map +1 -0
- package/models/components/{checkoutsessionpaymentmethod.js → checkoutsessionpaymentmethodoutput.js} +17 -17
- package/models/components/checkoutsessionpaymentmethodoutput.js.map +1 -0
- package/models/components/index.d.ts +16 -12
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +16 -12
- package/models/components/index.js.map +1 -1
- package/models/components/integrationclient.d.ts +24 -0
- package/models/components/integrationclient.d.ts.map +1 -0
- package/models/components/integrationclient.js +70 -0
- package/models/components/integrationclient.js.map +1 -0
- package/models/components/paymentlink.d.ts +3 -3
- package/models/components/paymentlink.d.ts.map +1 -1
- package/models/components/paymentlink.js +3 -3
- package/models/components/paymentlink.js.map +1 -1
- package/models/components/paymentmethodsummaries.d.ts +3 -3
- package/models/components/paymentmethodsummaries.d.ts.map +1 -1
- package/models/components/paymentmethodsummaries.js +3 -3
- package/models/components/paymentmethodsummaries.js.map +1 -1
- package/models/components/{paymentmethodsummary.d.ts → paymentmethodsummaryoutput.d.ts} +14 -14
- package/models/components/paymentmethodsummaryoutput.d.ts.map +1 -0
- package/models/components/{paymentmethodsummary.js → paymentmethodsummaryoutput.js} +17 -17
- package/models/components/paymentmethodsummaryoutput.js.map +1 -0
- package/models/components/{paymentoption.d.ts → paymentoptionoutput.d.ts} +14 -14
- package/models/components/paymentoptionoutput.d.ts.map +1 -0
- package/models/components/{paymentoption.js → paymentoptionoutput.js} +17 -17
- package/models/components/paymentoptionoutput.js.map +1 -0
- package/models/components/paymentoptions.d.ts +3 -3
- package/models/components/paymentoptions.d.ts.map +1 -1
- package/models/components/paymentoptions.js +3 -3
- package/models/components/paymentoptions.js.map +1 -1
- package/models/components/paymentservicedefinition.d.ts +6 -0
- package/models/components/paymentservicedefinition.d.ts.map +1 -1
- package/models/components/paymentservicedefinition.js +5 -0
- package/models/components/paymentservicedefinition.js.map +1 -1
- package/models/components/payoutsummary.d.ts +6 -6
- package/models/components/payoutsummary.d.ts.map +1 -1
- package/models/components/payoutsummary.js +6 -6
- package/models/components/payoutsummary.js.map +1 -1
- package/models/components/paypaloptions.d.ts +6 -0
- package/models/components/paypaloptions.d.ts.map +1 -1
- package/models/components/paypaloptions.js +3 -0
- package/models/components/paypaloptions.js.map +1 -1
- package/models/components/paypalshippingoptions.d.ts +33 -0
- package/models/components/paypalshippingoptions.d.ts.map +1 -0
- package/models/components/paypalshippingoptions.js +72 -0
- package/models/components/paypalshippingoptions.js.map +1 -0
- package/models/components/paypalshippingoptionsitem.d.ts +75 -0
- package/models/components/paypalshippingoptionsitem.d.ts.map +1 -0
- package/models/components/paypalshippingoptionsitem.js +107 -0
- package/models/components/paypalshippingoptionsitem.js.map +1 -0
- package/models/components/paypalshippingoptionsitemamount.d.ts +37 -0
- package/models/components/paypalshippingoptionsitemamount.d.ts.map +1 -0
- package/models/components/paypalshippingoptionsitemamount.js +80 -0
- package/models/components/paypalshippingoptionsitemamount.js.map +1 -0
- package/models/components/{transactionbuyer.d.ts → transactionbuyeroutput.d.ts} +14 -14
- package/models/components/transactionbuyeroutput.d.ts.map +1 -0
- package/models/components/{transactionbuyer.js → transactionbuyeroutput.js} +17 -17
- package/models/components/transactionbuyeroutput.js.map +1 -0
- package/models/components/transactioncancel.d.ts +3 -3
- package/models/components/transactioncancel.d.ts.map +1 -1
- package/models/components/transactioncancel.js +3 -3
- package/models/components/transactioncancel.js.map +1 -1
- package/models/components/transactioncaptureoutput.d.ts +56 -0
- package/models/components/transactioncaptureoutput.d.ts.map +1 -0
- package/models/components/{transactioncapture.js → transactioncaptureoutput.js} +20 -20
- package/models/components/transactioncaptureoutput.js.map +1 -0
- package/models/components/transactioncreate.d.ts +6 -0
- package/models/components/transactioncreate.d.ts.map +1 -1
- package/models/components/transactioncreate.js +5 -0
- package/models/components/transactioncreate.js.map +1 -1
- package/models/components/{transactionevent.d.ts → transactioneventoutput.d.ts} +14 -14
- package/models/components/transactioneventoutput.d.ts.map +1 -0
- package/models/components/{transactionevent.js → transactioneventoutput.js} +17 -17
- package/models/components/transactioneventoutput.js.map +1 -0
- package/models/components/transactionevents.d.ts +3 -3
- package/models/components/transactionevents.d.ts.map +1 -1
- package/models/components/transactionevents.js +3 -3
- package/models/components/transactionevents.js.map +1 -1
- package/models/components/{transaction.d.ts → transactionoutput.d.ts} +28 -23
- package/models/components/transactionoutput.d.ts.map +1 -0
- package/models/components/{transaction.js → transactionoutput.js} +32 -26
- package/models/components/transactionoutput.js.map +1 -0
- package/models/components/{transactionpaymentmethod.d.ts → transactionpaymentmethodoutput.d.ts} +14 -14
- package/models/components/transactionpaymentmethodoutput.d.ts.map +1 -0
- package/models/components/{transactionpaymentmethod.js → transactionpaymentmethodoutput.js} +17 -17
- package/models/components/transactionpaymentmethodoutput.js.map +1 -0
- package/models/components/transactionsummaries.d.ts +3 -3
- package/models/components/transactionsummaries.d.ts.map +1 -1
- package/models/components/transactionsummaries.js +3 -3
- package/models/components/transactionsummaries.js.map +1 -1
- package/models/components/{transactionsummary.d.ts → transactionsummaryoutput.d.ts} +20 -20
- package/models/components/transactionsummaryoutput.d.ts.map +1 -0
- package/models/components/{transactionsummary.js → transactionsummaryoutput.js} +25 -23
- package/models/components/transactionsummaryoutput.js.map +1 -0
- package/models/components/{transactionthreedsecuresummary.d.ts → transactionthreedsecuresummaryoutput.d.ts} +14 -14
- package/models/components/transactionthreedsecuresummaryoutput.d.ts.map +1 -0
- package/models/components/{transactionthreedsecuresummary.js → transactionthreedsecuresummaryoutput.js} +17 -17
- package/models/components/transactionthreedsecuresummaryoutput.js.map +1 -0
- package/models/components/transactionvoidoutput.d.ts +56 -0
- package/models/components/transactionvoidoutput.d.ts.map +1 -0
- package/models/components/{transactionvoid.js → transactionvoidoutput.js} +20 -20
- package/models/components/transactionvoidoutput.js.map +1 -0
- package/models/operations/capturetransaction.d.ts +2 -2
- package/models/operations/capturetransaction.d.ts.map +1 -1
- package/models/operations/capturetransaction.js +4 -4
- package/models/operations/capturetransaction.js.map +1 -1
- package/models/operations/voidtransaction.d.ts +2 -2
- package/models/operations/voidtransaction.d.ts.map +1 -1
- package/models/operations/voidtransaction.js +4 -4
- package/models/operations/voidtransaction.js.map +1 -1
- package/package.json +1 -1
- package/sdk/transactions.d.ts +4 -4
- package/sdk/transactions.d.ts.map +1 -1
- package/src/funcs/transactionsCreate.ts +4 -4
- package/src/funcs/transactionsGet.ts +4 -4
- package/src/funcs/transactionsSync.ts +4 -4
- package/src/funcs/transactionsUpdate.ts +4 -4
- package/src/lib/config.ts +3 -3
- package/src/models/components/auditlogentries.ts +9 -9
- package/src/models/components/{auditlogentry.ts → auditlogentryoutput.ts} +24 -20
- package/src/models/components/checkoutsession.ts +12 -9
- package/src/models/components/{checkoutsessionpaymentmethod.ts → checkoutsessionpaymentmethodoutput.ts} +24 -22
- package/src/models/components/index.ts +16 -12
- package/src/models/components/integrationclient.ts +50 -0
- package/src/models/components/paymentlink.ts +9 -9
- package/src/models/components/paymentmethodsummaries.ts +9 -9
- package/src/models/components/{paymentmethodsummary.ts → paymentmethodsummaryoutput.ts} +21 -21
- package/src/models/components/{paymentoption.ts → paymentoptionoutput.ts} +24 -20
- package/src/models/components/paymentoptions.ts +9 -9
- package/src/models/components/paymentservicedefinition.ts +18 -0
- package/src/models/components/payoutsummary.ts +18 -18
- package/src/models/components/paypaloptions.ts +13 -0
- package/src/models/components/paypalshippingoptions.ts +77 -0
- package/src/models/components/paypalshippingoptionsitem.ts +150 -0
- package/src/models/components/paypalshippingoptionsitemamount.ts +87 -0
- package/src/models/components/{transactionbuyer.ts → transactionbuyeroutput.ts} +21 -21
- package/src/models/components/transactioncancel.ts +9 -9
- package/src/models/components/{transactioncapture.ts → transactioncaptureoutput.ts} +30 -30
- package/src/models/components/transactioncreate.ts +14 -0
- package/src/models/components/{transactionevent.ts → transactioneventoutput.ts} +21 -21
- package/src/models/components/transactionevents.ts +9 -9
- package/src/models/components/{transaction.ts → transactionoutput.ts} +65 -47
- package/src/models/components/{transactionpaymentmethod.ts → transactionpaymentmethodoutput.ts} +23 -21
- package/src/models/components/transactionsummaries.ts +9 -9
- package/src/models/components/{transactionsummary.ts → transactionsummaryoutput.ts} +41 -39
- package/src/models/components/{transactionthreedsecuresummary.ts → transactionthreedsecuresummaryoutput.ts} +25 -22
- package/src/models/components/{transactionvoid.ts → transactionvoidoutput.ts} +32 -30
- package/src/models/operations/capturetransaction.ts +8 -8
- package/src/models/operations/voidtransaction.ts +8 -8
- package/src/sdk/transactions.ts +4 -4
- package/models/components/auditlogentry.d.ts.map +0 -1
- package/models/components/auditlogentry.js.map +0 -1
- package/models/components/checkoutsessionpaymentmethod.d.ts.map +0 -1
- package/models/components/checkoutsessionpaymentmethod.js.map +0 -1
- package/models/components/paymentmethodsummary.d.ts.map +0 -1
- package/models/components/paymentmethodsummary.js.map +0 -1
- package/models/components/paymentoption.d.ts.map +0 -1
- package/models/components/paymentoption.js.map +0 -1
- package/models/components/transaction.d.ts.map +0 -1
- package/models/components/transaction.js.map +0 -1
- package/models/components/transactionbuyer.d.ts.map +0 -1
- package/models/components/transactionbuyer.js.map +0 -1
- package/models/components/transactioncapture.d.ts +0 -56
- package/models/components/transactioncapture.d.ts.map +0 -1
- package/models/components/transactioncapture.js.map +0 -1
- package/models/components/transactionevent.d.ts.map +0 -1
- package/models/components/transactionevent.js.map +0 -1
- package/models/components/transactionpaymentmethod.d.ts.map +0 -1
- package/models/components/transactionpaymentmethod.js.map +0 -1
- package/models/components/transactionsummary.d.ts.map +0 -1
- package/models/components/transactionsummary.js.map +0 -1
- package/models/components/transactionthreedsecuresummary.d.ts.map +0 -1
- package/models/components/transactionthreedsecuresummary.js.map +0 -1
- package/models/components/transactionvoid.d.ts +0 -56
- package/models/components/transactionvoid.d.ts.map +0 -1
- package/models/components/transactionvoid.js.map +0 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
catchUnrecognizedEnum,
|
|
8
|
+
OpenEnum,
|
|
9
|
+
Unrecognized,
|
|
10
|
+
} from "../../types/enums.js";
|
|
11
|
+
|
|
12
|
+
export const IntegrationClient = {
|
|
13
|
+
Redirect: "redirect",
|
|
14
|
+
Web: "web",
|
|
15
|
+
Android: "android",
|
|
16
|
+
Ios: "ios",
|
|
17
|
+
} as const;
|
|
18
|
+
export type IntegrationClient = OpenEnum<typeof IntegrationClient>;
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const IntegrationClient$inboundSchema: z.ZodType<
|
|
22
|
+
IntegrationClient,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z
|
|
26
|
+
.union([
|
|
27
|
+
z.nativeEnum(IntegrationClient),
|
|
28
|
+
z.string().transform(catchUnrecognizedEnum),
|
|
29
|
+
]);
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const IntegrationClient$outboundSchema: z.ZodType<
|
|
33
|
+
IntegrationClient,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
IntegrationClient
|
|
36
|
+
> = z.union([
|
|
37
|
+
z.nativeEnum(IntegrationClient),
|
|
38
|
+
z.string().and(z.custom<Unrecognized<string>>()),
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
+
*/
|
|
45
|
+
export namespace IntegrationClient$ {
|
|
46
|
+
/** @deprecated use `IntegrationClient$inboundSchema` instead. */
|
|
47
|
+
export const inboundSchema = IntegrationClient$inboundSchema;
|
|
48
|
+
/** @deprecated use `IntegrationClient$outboundSchema` instead. */
|
|
49
|
+
export const outboundSchema = IntegrationClient$outboundSchema;
|
|
50
|
+
}
|
|
@@ -31,11 +31,11 @@ import {
|
|
|
31
31
|
StatementDescriptor$outboundSchema,
|
|
32
32
|
} from "./statementdescriptor.js";
|
|
33
33
|
import {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
} from "./
|
|
34
|
+
TransactionBuyerOutput,
|
|
35
|
+
TransactionBuyerOutput$inboundSchema,
|
|
36
|
+
TransactionBuyerOutput$Outbound,
|
|
37
|
+
TransactionBuyerOutput$outboundSchema,
|
|
38
|
+
} from "./transactionbuyeroutput.js";
|
|
39
39
|
import {
|
|
40
40
|
TransactionIntent,
|
|
41
41
|
TransactionIntent$inboundSchema,
|
|
@@ -145,7 +145,7 @@ export type PaymentLink = {
|
|
|
145
145
|
/**
|
|
146
146
|
* The buyer associated with the payment link.
|
|
147
147
|
*/
|
|
148
|
-
buyer?:
|
|
148
|
+
buyer?: TransactionBuyerOutput | null | undefined;
|
|
149
149
|
/**
|
|
150
150
|
* The shipping details for the payment link.
|
|
151
151
|
*/
|
|
@@ -190,7 +190,7 @@ export const PaymentLink$inboundSchema: z.ZodType<
|
|
|
190
190
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
191
191
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
192
192
|
status: PaymentLinkStatus$inboundSchema,
|
|
193
|
-
buyer: z.nullable(
|
|
193
|
+
buyer: z.nullable(TransactionBuyerOutput$inboundSchema).optional(),
|
|
194
194
|
shipping_details: z.nullable(ShippingDetails$inboundSchema).optional(),
|
|
195
195
|
connection_options: z.nullable(z.record(z.record(z.any()))).optional(),
|
|
196
196
|
}).transform((v) => {
|
|
@@ -242,7 +242,7 @@ export type PaymentLink$Outbound = {
|
|
|
242
242
|
created_at: string;
|
|
243
243
|
updated_at: string;
|
|
244
244
|
status: string;
|
|
245
|
-
buyer?:
|
|
245
|
+
buyer?: TransactionBuyerOutput$Outbound | null | undefined;
|
|
246
246
|
shipping_details?: ShippingDetails$Outbound | null | undefined;
|
|
247
247
|
connection_options?: { [k: string]: { [k: string]: any } } | null | undefined;
|
|
248
248
|
};
|
|
@@ -279,7 +279,7 @@ export const PaymentLink$outboundSchema: z.ZodType<
|
|
|
279
279
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
280
280
|
updatedAt: z.date().transform(v => v.toISOString()),
|
|
281
281
|
status: PaymentLinkStatus$outboundSchema,
|
|
282
|
-
buyer: z.nullable(
|
|
282
|
+
buyer: z.nullable(TransactionBuyerOutput$outboundSchema).optional(),
|
|
283
283
|
shippingDetails: z.nullable(ShippingDetails$outboundSchema).optional(),
|
|
284
284
|
connectionOptions: z.nullable(z.record(z.record(z.any()))).optional(),
|
|
285
285
|
}).transform((v) => {
|
|
@@ -7,17 +7,17 @@ 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
|
-
|
|
13
|
-
|
|
14
|
-
} from "./
|
|
10
|
+
PaymentMethodSummaryOutput,
|
|
11
|
+
PaymentMethodSummaryOutput$inboundSchema,
|
|
12
|
+
PaymentMethodSummaryOutput$Outbound,
|
|
13
|
+
PaymentMethodSummaryOutput$outboundSchema,
|
|
14
|
+
} from "./paymentmethodsummaryoutput.js";
|
|
15
15
|
|
|
16
16
|
export type PaymentMethodSummaries = {
|
|
17
17
|
/**
|
|
18
18
|
* A list of items returned for this request.
|
|
19
19
|
*/
|
|
20
|
-
items: Array<
|
|
20
|
+
items: Array<PaymentMethodSummaryOutput>;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/** @internal */
|
|
@@ -26,12 +26,12 @@ export const PaymentMethodSummaries$inboundSchema: z.ZodType<
|
|
|
26
26
|
z.ZodTypeDef,
|
|
27
27
|
unknown
|
|
28
28
|
> = z.object({
|
|
29
|
-
items: z.array(
|
|
29
|
+
items: z.array(PaymentMethodSummaryOutput$inboundSchema),
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
/** @internal */
|
|
33
33
|
export type PaymentMethodSummaries$Outbound = {
|
|
34
|
-
items: Array<
|
|
34
|
+
items: Array<PaymentMethodSummaryOutput$Outbound>;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
/** @internal */
|
|
@@ -40,7 +40,7 @@ export const PaymentMethodSummaries$outboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
PaymentMethodSummaries
|
|
42
42
|
> = z.object({
|
|
43
|
-
items: z.array(
|
|
43
|
+
items: z.array(PaymentMethodSummaryOutput$outboundSchema),
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
*
|
|
33
33
|
* A summary of a payment method.
|
|
34
34
|
*/
|
|
35
|
-
export type
|
|
35
|
+
export type PaymentMethodSummaryOutput = {
|
|
36
36
|
/**
|
|
37
37
|
* Always `payment-method`.
|
|
38
38
|
*/
|
|
@@ -113,8 +113,8 @@ export type PaymentMethodSummary = {
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
/** @internal */
|
|
116
|
-
export const
|
|
117
|
-
|
|
116
|
+
export const PaymentMethodSummaryOutput$inboundSchema: z.ZodType<
|
|
117
|
+
PaymentMethodSummaryOutput,
|
|
118
118
|
z.ZodTypeDef,
|
|
119
119
|
unknown
|
|
120
120
|
> = z.object({
|
|
@@ -160,7 +160,7 @@ export const PaymentMethodSummary$inboundSchema: z.ZodType<
|
|
|
160
160
|
});
|
|
161
161
|
|
|
162
162
|
/** @internal */
|
|
163
|
-
export type
|
|
163
|
+
export type PaymentMethodSummaryOutput$Outbound = {
|
|
164
164
|
type: "payment-method";
|
|
165
165
|
approval_url?: string | null | undefined;
|
|
166
166
|
country?: string | null | undefined;
|
|
@@ -184,10 +184,10 @@ export type PaymentMethodSummary$Outbound = {
|
|
|
184
184
|
};
|
|
185
185
|
|
|
186
186
|
/** @internal */
|
|
187
|
-
export const
|
|
188
|
-
|
|
187
|
+
export const PaymentMethodSummaryOutput$outboundSchema: z.ZodType<
|
|
188
|
+
PaymentMethodSummaryOutput$Outbound,
|
|
189
189
|
z.ZodTypeDef,
|
|
190
|
-
|
|
190
|
+
PaymentMethodSummaryOutput
|
|
191
191
|
> = z.object({
|
|
192
192
|
type: z.literal("payment-method").default("payment-method" as const),
|
|
193
193
|
approvalUrl: z.nullable(z.string()).optional(),
|
|
@@ -230,29 +230,29 @@ export const PaymentMethodSummary$outboundSchema: z.ZodType<
|
|
|
230
230
|
* @internal
|
|
231
231
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
232
232
|
*/
|
|
233
|
-
export namespace
|
|
234
|
-
/** @deprecated use `
|
|
235
|
-
export const inboundSchema =
|
|
236
|
-
/** @deprecated use `
|
|
237
|
-
export const outboundSchema =
|
|
238
|
-
/** @deprecated use `
|
|
239
|
-
export type Outbound =
|
|
233
|
+
export namespace PaymentMethodSummaryOutput$ {
|
|
234
|
+
/** @deprecated use `PaymentMethodSummaryOutput$inboundSchema` instead. */
|
|
235
|
+
export const inboundSchema = PaymentMethodSummaryOutput$inboundSchema;
|
|
236
|
+
/** @deprecated use `PaymentMethodSummaryOutput$outboundSchema` instead. */
|
|
237
|
+
export const outboundSchema = PaymentMethodSummaryOutput$outboundSchema;
|
|
238
|
+
/** @deprecated use `PaymentMethodSummaryOutput$Outbound` instead. */
|
|
239
|
+
export type Outbound = PaymentMethodSummaryOutput$Outbound;
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
export function
|
|
243
|
-
|
|
242
|
+
export function paymentMethodSummaryOutputToJSON(
|
|
243
|
+
paymentMethodSummaryOutput: PaymentMethodSummaryOutput,
|
|
244
244
|
): string {
|
|
245
245
|
return JSON.stringify(
|
|
246
|
-
|
|
246
|
+
PaymentMethodSummaryOutput$outboundSchema.parse(paymentMethodSummaryOutput),
|
|
247
247
|
);
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
-
export function
|
|
250
|
+
export function paymentMethodSummaryOutputFromJSON(
|
|
251
251
|
jsonString: string,
|
|
252
|
-
): SafeParseResult<
|
|
252
|
+
): SafeParseResult<PaymentMethodSummaryOutput, SDKValidationError> {
|
|
253
253
|
return safeParse(
|
|
254
254
|
jsonString,
|
|
255
|
-
(x) =>
|
|
256
|
-
`Failed to parse '
|
|
255
|
+
(x) => PaymentMethodSummaryOutput$inboundSchema.parse(JSON.parse(x)),
|
|
256
|
+
`Failed to parse 'PaymentMethodSummaryOutput' from JSON`,
|
|
257
257
|
);
|
|
258
258
|
}
|
|
@@ -32,7 +32,7 @@ export type Context =
|
|
|
32
32
|
| WalletPaymentOptionContext
|
|
33
33
|
| PaymentOptionContext;
|
|
34
34
|
|
|
35
|
-
export type
|
|
35
|
+
export type PaymentOptionOutput = {
|
|
36
36
|
type?: "payment-option" | undefined;
|
|
37
37
|
method: string;
|
|
38
38
|
iconUrl?: string | null | undefined;
|
|
@@ -101,8 +101,8 @@ export function contextFromJSON(
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
/** @internal */
|
|
104
|
-
export const
|
|
105
|
-
|
|
104
|
+
export const PaymentOptionOutput$inboundSchema: z.ZodType<
|
|
105
|
+
PaymentOptionOutput,
|
|
106
106
|
z.ZodTypeDef,
|
|
107
107
|
unknown
|
|
108
108
|
> = z.object({
|
|
@@ -129,7 +129,7 @@ export const PaymentOption$inboundSchema: z.ZodType<
|
|
|
129
129
|
});
|
|
130
130
|
|
|
131
131
|
/** @internal */
|
|
132
|
-
export type
|
|
132
|
+
export type PaymentOptionOutput$Outbound = {
|
|
133
133
|
type: "payment-option";
|
|
134
134
|
method: string;
|
|
135
135
|
icon_url?: string | null | undefined;
|
|
@@ -146,10 +146,10 @@ export type PaymentOption$Outbound = {
|
|
|
146
146
|
};
|
|
147
147
|
|
|
148
148
|
/** @internal */
|
|
149
|
-
export const
|
|
150
|
-
|
|
149
|
+
export const PaymentOptionOutput$outboundSchema: z.ZodType<
|
|
150
|
+
PaymentOptionOutput$Outbound,
|
|
151
151
|
z.ZodTypeDef,
|
|
152
|
-
|
|
152
|
+
PaymentOptionOutput
|
|
153
153
|
> = z.object({
|
|
154
154
|
type: z.literal("payment-option").default("payment-option" as const),
|
|
155
155
|
method: z.string(),
|
|
@@ -177,25 +177,29 @@ export const PaymentOption$outboundSchema: z.ZodType<
|
|
|
177
177
|
* @internal
|
|
178
178
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
179
179
|
*/
|
|
180
|
-
export namespace
|
|
181
|
-
/** @deprecated use `
|
|
182
|
-
export const inboundSchema =
|
|
183
|
-
/** @deprecated use `
|
|
184
|
-
export const outboundSchema =
|
|
185
|
-
/** @deprecated use `
|
|
186
|
-
export type Outbound =
|
|
180
|
+
export namespace PaymentOptionOutput$ {
|
|
181
|
+
/** @deprecated use `PaymentOptionOutput$inboundSchema` instead. */
|
|
182
|
+
export const inboundSchema = PaymentOptionOutput$inboundSchema;
|
|
183
|
+
/** @deprecated use `PaymentOptionOutput$outboundSchema` instead. */
|
|
184
|
+
export const outboundSchema = PaymentOptionOutput$outboundSchema;
|
|
185
|
+
/** @deprecated use `PaymentOptionOutput$Outbound` instead. */
|
|
186
|
+
export type Outbound = PaymentOptionOutput$Outbound;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
export function
|
|
190
|
-
|
|
189
|
+
export function paymentOptionOutputToJSON(
|
|
190
|
+
paymentOptionOutput: PaymentOptionOutput,
|
|
191
|
+
): string {
|
|
192
|
+
return JSON.stringify(
|
|
193
|
+
PaymentOptionOutput$outboundSchema.parse(paymentOptionOutput),
|
|
194
|
+
);
|
|
191
195
|
}
|
|
192
196
|
|
|
193
|
-
export function
|
|
197
|
+
export function paymentOptionOutputFromJSON(
|
|
194
198
|
jsonString: string,
|
|
195
|
-
): SafeParseResult<
|
|
199
|
+
): SafeParseResult<PaymentOptionOutput, SDKValidationError> {
|
|
196
200
|
return safeParse(
|
|
197
201
|
jsonString,
|
|
198
|
-
(x) =>
|
|
199
|
-
`Failed to parse '
|
|
202
|
+
(x) => PaymentOptionOutput$inboundSchema.parse(JSON.parse(x)),
|
|
203
|
+
`Failed to parse 'PaymentOptionOutput' from JSON`,
|
|
200
204
|
);
|
|
201
205
|
}
|
|
@@ -7,17 +7,17 @@ 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
|
-
|
|
13
|
-
|
|
14
|
-
} from "./
|
|
10
|
+
PaymentOptionOutput,
|
|
11
|
+
PaymentOptionOutput$inboundSchema,
|
|
12
|
+
PaymentOptionOutput$Outbound,
|
|
13
|
+
PaymentOptionOutput$outboundSchema,
|
|
14
|
+
} from "./paymentoptionoutput.js";
|
|
15
15
|
|
|
16
16
|
export type PaymentOptions = {
|
|
17
17
|
/**
|
|
18
18
|
* A list of items returned for this request.
|
|
19
19
|
*/
|
|
20
|
-
items: Array<
|
|
20
|
+
items: Array<PaymentOptionOutput>;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/** @internal */
|
|
@@ -26,12 +26,12 @@ export const PaymentOptions$inboundSchema: z.ZodType<
|
|
|
26
26
|
z.ZodTypeDef,
|
|
27
27
|
unknown
|
|
28
28
|
> = z.object({
|
|
29
|
-
items: z.array(
|
|
29
|
+
items: z.array(PaymentOptionOutput$inboundSchema),
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
/** @internal */
|
|
33
33
|
export type PaymentOptions$Outbound = {
|
|
34
|
-
items: Array<
|
|
34
|
+
items: Array<PaymentOptionOutput$Outbound>;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
/** @internal */
|
|
@@ -40,7 +40,7 @@ export const PaymentOptions$outboundSchema: z.ZodType<
|
|
|
40
40
|
z.ZodTypeDef,
|
|
41
41
|
PaymentOptions
|
|
42
42
|
> = z.object({
|
|
43
|
-
items: z.array(
|
|
43
|
+
items: z.array(PaymentOptionOutput$outboundSchema),
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -13,6 +13,11 @@ import {
|
|
|
13
13
|
DefinitionField$Outbound,
|
|
14
14
|
DefinitionField$outboundSchema,
|
|
15
15
|
} from "./definitionfield.js";
|
|
16
|
+
import {
|
|
17
|
+
IntegrationClient,
|
|
18
|
+
IntegrationClient$inboundSchema,
|
|
19
|
+
IntegrationClient$outboundSchema,
|
|
20
|
+
} from "./integrationclient.js";
|
|
16
21
|
import {
|
|
17
22
|
Method,
|
|
18
23
|
Method$inboundSchema,
|
|
@@ -76,6 +81,10 @@ export type PaymentServiceDefinition = {
|
|
|
76
81
|
*/
|
|
77
82
|
requiredCheckoutFields: Array<RequiredCheckoutFields>;
|
|
78
83
|
configuration: PaymentServiceConfiguration;
|
|
84
|
+
/**
|
|
85
|
+
* List of supported integration clients. Defaults to redirect for most redirect connectors.
|
|
86
|
+
*/
|
|
87
|
+
supportedIntegrationClients: Array<IntegrationClient> | null;
|
|
79
88
|
};
|
|
80
89
|
|
|
81
90
|
/** @internal */
|
|
@@ -99,6 +108,9 @@ export const PaymentServiceDefinition$inboundSchema: z.ZodType<
|
|
|
99
108
|
supported_features: z.record(z.boolean()),
|
|
100
109
|
required_checkout_fields: z.array(RequiredCheckoutFields$inboundSchema),
|
|
101
110
|
configuration: PaymentServiceConfiguration$inboundSchema,
|
|
111
|
+
supported_integration_clients: z.nullable(
|
|
112
|
+
z.array(IntegrationClient$inboundSchema),
|
|
113
|
+
),
|
|
102
114
|
}).transform((v) => {
|
|
103
115
|
return remap$(v, {
|
|
104
116
|
"display_name": "displayName",
|
|
@@ -108,6 +120,7 @@ export const PaymentServiceDefinition$inboundSchema: z.ZodType<
|
|
|
108
120
|
"icon_url": "iconUrl",
|
|
109
121
|
"supported_features": "supportedFeatures",
|
|
110
122
|
"required_checkout_fields": "requiredCheckoutFields",
|
|
123
|
+
"supported_integration_clients": "supportedIntegrationClients",
|
|
111
124
|
});
|
|
112
125
|
});
|
|
113
126
|
|
|
@@ -126,6 +139,7 @@ export type PaymentServiceDefinition$Outbound = {
|
|
|
126
139
|
supported_features: { [k: string]: boolean };
|
|
127
140
|
required_checkout_fields: Array<RequiredCheckoutFields$Outbound>;
|
|
128
141
|
configuration: PaymentServiceConfiguration$Outbound;
|
|
142
|
+
supported_integration_clients: Array<string> | null;
|
|
129
143
|
};
|
|
130
144
|
|
|
131
145
|
/** @internal */
|
|
@@ -149,6 +163,9 @@ export const PaymentServiceDefinition$outboundSchema: z.ZodType<
|
|
|
149
163
|
supportedFeatures: z.record(z.boolean()),
|
|
150
164
|
requiredCheckoutFields: z.array(RequiredCheckoutFields$outboundSchema),
|
|
151
165
|
configuration: PaymentServiceConfiguration$outboundSchema,
|
|
166
|
+
supportedIntegrationClients: z.nullable(
|
|
167
|
+
z.array(IntegrationClient$outboundSchema),
|
|
168
|
+
),
|
|
152
169
|
}).transform((v) => {
|
|
153
170
|
return remap$(v, {
|
|
154
171
|
displayName: "display_name",
|
|
@@ -158,6 +175,7 @@ export const PaymentServiceDefinition$outboundSchema: z.ZodType<
|
|
|
158
175
|
iconUrl: "icon_url",
|
|
159
176
|
supportedFeatures: "supported_features",
|
|
160
177
|
requiredCheckoutFields: "required_checkout_fields",
|
|
178
|
+
supportedIntegrationClients: "supported_integration_clients",
|
|
161
179
|
});
|
|
162
180
|
});
|
|
163
181
|
|
|
@@ -30,17 +30,17 @@ import {
|
|
|
30
30
|
PayoutStatus$outboundSchema,
|
|
31
31
|
} from "./payoutstatus.js";
|
|
32
32
|
import {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} from "./
|
|
33
|
+
TransactionBuyerOutput,
|
|
34
|
+
TransactionBuyerOutput$inboundSchema,
|
|
35
|
+
TransactionBuyerOutput$Outbound,
|
|
36
|
+
TransactionBuyerOutput$outboundSchema,
|
|
37
|
+
} from "./transactionbuyeroutput.js";
|
|
38
38
|
import {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} from "./
|
|
39
|
+
TransactionPaymentMethodOutput,
|
|
40
|
+
TransactionPaymentMethodOutput$inboundSchema,
|
|
41
|
+
TransactionPaymentMethodOutput$Outbound,
|
|
42
|
+
TransactionPaymentMethodOutput$outboundSchema,
|
|
43
|
+
} from "./transactionpaymentmethodoutput.js";
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* PayoutSummary
|
|
@@ -65,7 +65,7 @@ export type PayoutSummary = {
|
|
|
65
65
|
/**
|
|
66
66
|
* The buyer used for this payout.
|
|
67
67
|
*/
|
|
68
|
-
buyer?:
|
|
68
|
+
buyer?: TransactionBuyerOutput | null | undefined;
|
|
69
69
|
/**
|
|
70
70
|
* The type of payout to process.
|
|
71
71
|
*/
|
|
@@ -90,7 +90,7 @@ export type PayoutSummary = {
|
|
|
90
90
|
* The ID of the merchant account this payout was created for.
|
|
91
91
|
*/
|
|
92
92
|
merchantAccountId?: string | null | undefined;
|
|
93
|
-
paymentMethod:
|
|
93
|
+
paymentMethod: TransactionPaymentMethodOutput;
|
|
94
94
|
paymentService: PayoutPaymentService;
|
|
95
95
|
/**
|
|
96
96
|
* The ID of the payout in the underlying payment service.
|
|
@@ -112,14 +112,14 @@ export const PayoutSummary$inboundSchema: z.ZodType<
|
|
|
112
112
|
type: z.literal("payout").default("payout"),
|
|
113
113
|
id: z.nullable(z.string()).optional(),
|
|
114
114
|
amount: z.number().int(),
|
|
115
|
-
buyer: z.nullable(
|
|
115
|
+
buyer: z.nullable(TransactionBuyerOutput$inboundSchema).optional(),
|
|
116
116
|
category: z.nullable(PayoutCategory$inboundSchema).optional(),
|
|
117
117
|
created_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
118
118
|
currency: z.string(),
|
|
119
119
|
external_identifier: z.nullable(z.string()).optional(),
|
|
120
120
|
merchant: z.nullable(PayoutMerchantSummary$inboundSchema).optional(),
|
|
121
121
|
merchant_account_id: z.nullable(z.string()).optional(),
|
|
122
|
-
payment_method:
|
|
122
|
+
payment_method: TransactionPaymentMethodOutput$inboundSchema,
|
|
123
123
|
payment_service: PayoutPaymentService$inboundSchema,
|
|
124
124
|
payment_service_payout_id: z.nullable(z.string()).optional(),
|
|
125
125
|
status: PayoutStatus$inboundSchema,
|
|
@@ -141,14 +141,14 @@ export type PayoutSummary$Outbound = {
|
|
|
141
141
|
type: "payout";
|
|
142
142
|
id?: string | null | undefined;
|
|
143
143
|
amount: number;
|
|
144
|
-
buyer?:
|
|
144
|
+
buyer?: TransactionBuyerOutput$Outbound | null | undefined;
|
|
145
145
|
category?: string | null | undefined;
|
|
146
146
|
created_at: string;
|
|
147
147
|
currency: string;
|
|
148
148
|
external_identifier?: string | null | undefined;
|
|
149
149
|
merchant?: PayoutMerchantSummary$Outbound | null | undefined;
|
|
150
150
|
merchant_account_id?: string | null | undefined;
|
|
151
|
-
payment_method:
|
|
151
|
+
payment_method: TransactionPaymentMethodOutput$Outbound;
|
|
152
152
|
payment_service: PayoutPaymentService$Outbound;
|
|
153
153
|
payment_service_payout_id?: string | null | undefined;
|
|
154
154
|
status: string;
|
|
@@ -164,14 +164,14 @@ export const PayoutSummary$outboundSchema: z.ZodType<
|
|
|
164
164
|
type: z.literal("payout").default("payout" as const),
|
|
165
165
|
id: z.nullable(z.string()).optional(),
|
|
166
166
|
amount: z.number().int(),
|
|
167
|
-
buyer: z.nullable(
|
|
167
|
+
buyer: z.nullable(TransactionBuyerOutput$outboundSchema).optional(),
|
|
168
168
|
category: z.nullable(PayoutCategory$outboundSchema).optional(),
|
|
169
169
|
createdAt: z.date().transform(v => v.toISOString()),
|
|
170
170
|
currency: z.string(),
|
|
171
171
|
externalIdentifier: z.nullable(z.string()).optional(),
|
|
172
172
|
merchant: z.nullable(PayoutMerchantSummary$outboundSchema).optional(),
|
|
173
173
|
merchantAccountId: z.nullable(z.string()).optional(),
|
|
174
|
-
paymentMethod:
|
|
174
|
+
paymentMethod: TransactionPaymentMethodOutput$outboundSchema,
|
|
175
175
|
paymentService: PayoutPaymentService$outboundSchema,
|
|
176
176
|
paymentServicePayoutId: z.nullable(z.string()).optional(),
|
|
177
177
|
status: PayoutStatus$outboundSchema,
|
|
@@ -7,12 +7,22 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
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
|
+
import {
|
|
11
|
+
PaypalShippingOptions,
|
|
12
|
+
PaypalShippingOptions$inboundSchema,
|
|
13
|
+
PaypalShippingOptions$Outbound,
|
|
14
|
+
PaypalShippingOptions$outboundSchema,
|
|
15
|
+
} from "./paypalshippingoptions.js";
|
|
10
16
|
|
|
11
17
|
export type PaypalOptions = {
|
|
12
18
|
/**
|
|
13
19
|
* Additional Set Transaction Context Values (STC) to be sent to PayPal as part of the transaction.
|
|
14
20
|
*/
|
|
15
21
|
additionalData?: Array<{ [k: string]: string }> | null | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Shipping information to be passed to the PayPal API.
|
|
24
|
+
*/
|
|
25
|
+
shipping?: PaypalShippingOptions | null | undefined;
|
|
16
26
|
};
|
|
17
27
|
|
|
18
28
|
/** @internal */
|
|
@@ -22,6 +32,7 @@ export const PaypalOptions$inboundSchema: z.ZodType<
|
|
|
22
32
|
unknown
|
|
23
33
|
> = z.object({
|
|
24
34
|
additional_data: z.nullable(z.array(z.record(z.string()))).optional(),
|
|
35
|
+
shipping: z.nullable(PaypalShippingOptions$inboundSchema).optional(),
|
|
25
36
|
}).transform((v) => {
|
|
26
37
|
return remap$(v, {
|
|
27
38
|
"additional_data": "additionalData",
|
|
@@ -31,6 +42,7 @@ export const PaypalOptions$inboundSchema: z.ZodType<
|
|
|
31
42
|
/** @internal */
|
|
32
43
|
export type PaypalOptions$Outbound = {
|
|
33
44
|
additional_data?: Array<{ [k: string]: string }> | null | undefined;
|
|
45
|
+
shipping?: PaypalShippingOptions$Outbound | null | undefined;
|
|
34
46
|
};
|
|
35
47
|
|
|
36
48
|
/** @internal */
|
|
@@ -40,6 +52,7 @@ export const PaypalOptions$outboundSchema: z.ZodType<
|
|
|
40
52
|
PaypalOptions
|
|
41
53
|
> = z.object({
|
|
42
54
|
additionalData: z.nullable(z.array(z.record(z.string()))).optional(),
|
|
55
|
+
shipping: z.nullable(PaypalShippingOptions$outboundSchema).optional(),
|
|
43
56
|
}).transform((v) => {
|
|
44
57
|
return remap$(v, {
|
|
45
58
|
additionalData: "additional_data",
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
PaypalShippingOptionsItem,
|
|
11
|
+
PaypalShippingOptionsItem$inboundSchema,
|
|
12
|
+
PaypalShippingOptionsItem$Outbound,
|
|
13
|
+
PaypalShippingOptionsItem$outboundSchema,
|
|
14
|
+
} from "./paypalshippingoptionsitem.js";
|
|
15
|
+
|
|
16
|
+
export type PaypalShippingOptions = {
|
|
17
|
+
/**
|
|
18
|
+
* Shipping options that the payee or merchant offers to the payer to ship or pick up their items.
|
|
19
|
+
*/
|
|
20
|
+
options?: Array<PaypalShippingOptionsItem> | null | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const PaypalShippingOptions$inboundSchema: z.ZodType<
|
|
25
|
+
PaypalShippingOptions,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
options: z.nullable(z.array(PaypalShippingOptionsItem$inboundSchema))
|
|
30
|
+
.optional(),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type PaypalShippingOptions$Outbound = {
|
|
35
|
+
options?: Array<PaypalShippingOptionsItem$Outbound> | null | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const PaypalShippingOptions$outboundSchema: z.ZodType<
|
|
40
|
+
PaypalShippingOptions$Outbound,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
PaypalShippingOptions
|
|
43
|
+
> = z.object({
|
|
44
|
+
options: z.nullable(z.array(PaypalShippingOptionsItem$outboundSchema))
|
|
45
|
+
.optional(),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace PaypalShippingOptions$ {
|
|
53
|
+
/** @deprecated use `PaypalShippingOptions$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = PaypalShippingOptions$inboundSchema;
|
|
55
|
+
/** @deprecated use `PaypalShippingOptions$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema = PaypalShippingOptions$outboundSchema;
|
|
57
|
+
/** @deprecated use `PaypalShippingOptions$Outbound` instead. */
|
|
58
|
+
export type Outbound = PaypalShippingOptions$Outbound;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function paypalShippingOptionsToJSON(
|
|
62
|
+
paypalShippingOptions: PaypalShippingOptions,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
PaypalShippingOptions$outboundSchema.parse(paypalShippingOptions),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function paypalShippingOptionsFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<PaypalShippingOptions, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => PaypalShippingOptions$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'PaypalShippingOptions' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|