@gr4vy/sdk 2.0.54 → 2.1.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/README.md +2 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionComplete.d.ts +18 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionComplete.d.ts.map +1 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionComplete.js +127 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionComplete.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/index.d.ts +7 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -0
- package/models/components/index.js.map +1 -1
- package/models/components/pazebillingaddress.d.ts +4 -4
- package/models/components/pazebillingaddress.d.ts.map +1 -1
- package/models/components/pazebillingaddress.js +4 -4
- package/models/components/pazebillingaddress.js.map +1 -1
- package/models/components/pazedeliverycontactdetails.d.ts +9 -1
- package/models/components/pazedeliverycontactdetails.d.ts.map +1 -1
- package/models/components/pazedeliverycontactdetails.js +10 -1
- package/models/components/pazedeliverycontactdetails.js.map +1 -1
- package/models/components/pazeecomdata.d.ts +36 -0
- package/models/components/pazeecomdata.d.ts.map +1 -0
- package/models/components/pazeecomdata.js +55 -0
- package/models/components/pazeecomdata.js.map +1 -0
- package/models/components/pazeenhancedtransactiondata.d.ts +22 -0
- package/models/components/pazeenhancedtransactiondata.d.ts.map +1 -0
- package/models/components/pazeenhancedtransactiondata.js +52 -0
- package/models/components/pazeenhancedtransactiondata.js.map +1 -0
- package/models/components/pazelocationaddress.d.ts +50 -0
- package/models/components/pazelocationaddress.d.ts.map +1 -0
- package/models/components/pazelocationaddress.js +56 -0
- package/models/components/pazelocationaddress.js.map +1 -0
- package/models/components/pazemobilenumber.d.ts +8 -0
- package/models/components/pazemobilenumber.d.ts.map +1 -1
- package/models/components/pazemobilenumber.js +10 -1
- package/models/components/pazemobilenumber.js.map +1 -1
- package/models/components/pazesessioncomplete.d.ts +33 -0
- package/models/components/pazesessioncomplete.d.ts.map +1 -0
- package/models/components/pazesessioncomplete.js +60 -0
- package/models/components/pazesessioncomplete.js.map +1 -0
- package/models/components/pazesessioncompleterequest.d.ts +76 -0
- package/models/components/pazesessioncompleterequest.d.ts.map +1 -0
- package/models/components/pazesessioncompleterequest.js +78 -0
- package/models/components/pazesessioncompleterequest.js.map +1 -0
- package/models/components/pazeshippingaddress.d.ts +17 -3
- package/models/components/pazeshippingaddress.d.ts.map +1 -1
- package/models/components/pazeshippingaddress.js +18 -3
- package/models/components/pazeshippingaddress.js.map +1 -1
- package/models/components/pazetransactionoptions.d.ts +40 -0
- package/models/components/pazetransactionoptions.d.ts.map +1 -0
- package/models/components/pazetransactionoptions.js +65 -0
- package/models/components/pazetransactionoptions.js.map +1 -0
- package/models/components/pazetraveldata.d.ts +41 -0
- package/models/components/pazetraveldata.d.ts.map +1 -0
- package/models/components/pazetraveldata.js +55 -0
- package/models/components/pazetraveldata.js.map +1 -0
- package/models/components/transactioncapturecreate.d.ts +6 -0
- package/models/components/transactioncapturecreate.d.ts.map +1 -1
- package/models/components/transactioncapturecreate.js +7 -0
- package/models/components/transactioncapturecreate.js.map +1 -1
- package/models/operations/completepazemobilesession.d.ts +21 -0
- package/models/operations/completepazemobilesession.d.ts.map +1 -0
- package/models/operations/completepazemobilesession.js +56 -0
- package/models/operations/completepazemobilesession.js.map +1 -0
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/sessions.d.ts +7 -0
- package/sdk/sessions.d.ts.map +1 -1
- package/sdk/sessions.js +10 -0
- package/sdk/sessions.js.map +1 -1
- package/src/funcs/digitalWalletsSessionsPazeMobileSessionComplete.ts +232 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +7 -0
- package/src/models/components/pazebillingaddress.ts +8 -8
- package/src/models/components/pazedeliverycontactdetails.ts +24 -0
- package/src/models/components/pazeecomdata.ts +60 -0
- package/src/models/components/pazeenhancedtransactiondata.ts +52 -0
- package/src/models/components/pazelocationaddress.ts +76 -0
- package/src/models/components/pazemobilenumber.ts +22 -0
- package/src/models/components/pazesessioncomplete.ts +64 -0
- package/src/models/components/pazesessioncompleterequest.ts +133 -0
- package/src/models/components/pazeshippingaddress.ts +40 -4
- package/src/models/components/pazetransactionoptions.ts +82 -0
- package/src/models/components/pazetraveldata.ts +65 -0
- package/src/models/components/transactioncapturecreate.ts +16 -0
- package/src/models/operations/completepazemobilesession.ts +50 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/sessions.ts +20 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as openEnums from "../../types/enums.js";
|
|
7
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
8
|
+
import {
|
|
9
|
+
PazeEnhancedTransactionData,
|
|
10
|
+
PazeEnhancedTransactionData$Outbound,
|
|
11
|
+
PazeEnhancedTransactionData$outboundSchema,
|
|
12
|
+
} from "./pazeenhancedtransactiondata.js";
|
|
13
|
+
import {
|
|
14
|
+
PazeTransactionOptions,
|
|
15
|
+
PazeTransactionOptions$Outbound,
|
|
16
|
+
PazeTransactionOptions$outboundSchema,
|
|
17
|
+
} from "./pazetransactionoptions.js";
|
|
18
|
+
import {
|
|
19
|
+
PazeTransactionValue,
|
|
20
|
+
PazeTransactionValue$Outbound,
|
|
21
|
+
PazeTransactionValue$outboundSchema,
|
|
22
|
+
} from "./pazetransactionvalue.js";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH.
|
|
26
|
+
*/
|
|
27
|
+
export const PazeSessionCompleteRequestTransactiontype = {
|
|
28
|
+
Purchase: "PURCHASE",
|
|
29
|
+
CardOnFile: "CARD_ON_FILE",
|
|
30
|
+
Both: "BOTH",
|
|
31
|
+
} as const;
|
|
32
|
+
/**
|
|
33
|
+
* The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH.
|
|
34
|
+
*/
|
|
35
|
+
export type PazeSessionCompleteRequestTransactiontype = OpenEnum<
|
|
36
|
+
typeof PazeSessionCompleteRequestTransactiontype
|
|
37
|
+
>;
|
|
38
|
+
|
|
39
|
+
export const ProcessingNetwork = {
|
|
40
|
+
Visa: "VISA",
|
|
41
|
+
Mastercard: "MASTERCARD",
|
|
42
|
+
Discover: "DISCOVER",
|
|
43
|
+
} as const;
|
|
44
|
+
export type ProcessingNetwork = OpenEnum<typeof ProcessingNetwork>;
|
|
45
|
+
|
|
46
|
+
export type PazeSessionCompleteRequest = {
|
|
47
|
+
/**
|
|
48
|
+
* Session reference identifier generated by the merchant. Must match the value sent in the Paze session create call.
|
|
49
|
+
*/
|
|
50
|
+
sessionId: string;
|
|
51
|
+
/**
|
|
52
|
+
* Opaque token issued by the Paze service in the response from the most recent Paze UX interaction.
|
|
53
|
+
*/
|
|
54
|
+
code: string;
|
|
55
|
+
/**
|
|
56
|
+
* The Paze OAuth access token returned by the Paze mobile session create call. Used to authenticate the request to Paze.
|
|
57
|
+
*/
|
|
58
|
+
accessToken: string;
|
|
59
|
+
/**
|
|
60
|
+
* The type of transaction being completed. PURCHASE for a one-off checkout, CARD_ON_FILE to retain the card for future use, or BOTH.
|
|
61
|
+
*/
|
|
62
|
+
transactionType: PazeSessionCompleteRequestTransactiontype;
|
|
63
|
+
/**
|
|
64
|
+
* Client configuration data overriding values configured during merchant onboarding.
|
|
65
|
+
*/
|
|
66
|
+
transactionOptions?: PazeTransactionOptions | null | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Required when `transactionType` is PURCHASE or BOTH. Must be omitted when `transactionType` is CARD_ON_FILE.
|
|
69
|
+
*/
|
|
70
|
+
transactionValue?: PazeTransactionValue | null | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Card network to process the transaction on. If not provided, Paze defaults to the network on the front of the card.
|
|
73
|
+
*/
|
|
74
|
+
processingNetwork?: ProcessingNetwork | null | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Additional purchase context used by Paze for risk scoring.
|
|
77
|
+
*/
|
|
78
|
+
enhancedTransactionData?: PazeEnhancedTransactionData | null | undefined;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const PazeSessionCompleteRequestTransactiontype$outboundSchema:
|
|
83
|
+
z.ZodType<string, z.ZodTypeDef, PazeSessionCompleteRequestTransactiontype> =
|
|
84
|
+
openEnums.outboundSchema(PazeSessionCompleteRequestTransactiontype);
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const ProcessingNetwork$outboundSchema: z.ZodType<
|
|
88
|
+
string,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
ProcessingNetwork
|
|
91
|
+
> = openEnums.outboundSchema(ProcessingNetwork);
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export type PazeSessionCompleteRequest$Outbound = {
|
|
95
|
+
sessionId: string;
|
|
96
|
+
code: string;
|
|
97
|
+
accessToken: string;
|
|
98
|
+
transactionType: string;
|
|
99
|
+
transactionOptions?: PazeTransactionOptions$Outbound | null | undefined;
|
|
100
|
+
transactionValue?: PazeTransactionValue$Outbound | null | undefined;
|
|
101
|
+
processingNetwork?: string | null | undefined;
|
|
102
|
+
enhancedTransactionData?:
|
|
103
|
+
| PazeEnhancedTransactionData$Outbound
|
|
104
|
+
| null
|
|
105
|
+
| undefined;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const PazeSessionCompleteRequest$outboundSchema: z.ZodType<
|
|
110
|
+
PazeSessionCompleteRequest$Outbound,
|
|
111
|
+
z.ZodTypeDef,
|
|
112
|
+
PazeSessionCompleteRequest
|
|
113
|
+
> = z.object({
|
|
114
|
+
sessionId: z.string(),
|
|
115
|
+
code: z.string(),
|
|
116
|
+
accessToken: z.string(),
|
|
117
|
+
transactionType: PazeSessionCompleteRequestTransactiontype$outboundSchema,
|
|
118
|
+
transactionOptions: z.nullable(PazeTransactionOptions$outboundSchema)
|
|
119
|
+
.optional(),
|
|
120
|
+
transactionValue: z.nullable(PazeTransactionValue$outboundSchema).optional(),
|
|
121
|
+
processingNetwork: z.nullable(ProcessingNetwork$outboundSchema).optional(),
|
|
122
|
+
enhancedTransactionData: z.nullable(
|
|
123
|
+
PazeEnhancedTransactionData$outboundSchema,
|
|
124
|
+
).optional(),
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
export function pazeSessionCompleteRequestToJSON(
|
|
128
|
+
pazeSessionCompleteRequest: PazeSessionCompleteRequest,
|
|
129
|
+
): string {
|
|
130
|
+
return JSON.stringify(
|
|
131
|
+
PazeSessionCompleteRequest$outboundSchema.parse(pazeSessionCompleteRequest),
|
|
132
|
+
);
|
|
133
|
+
}
|
|
@@ -9,6 +9,8 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
9
9
|
import {
|
|
10
10
|
PazeDeliveryContactDetails,
|
|
11
11
|
PazeDeliveryContactDetails$inboundSchema,
|
|
12
|
+
PazeDeliveryContactDetails$Outbound,
|
|
13
|
+
PazeDeliveryContactDetails$outboundSchema,
|
|
12
14
|
} from "./pazedeliverycontactdetails.js";
|
|
13
15
|
|
|
14
16
|
export type PazeShippingAddress = {
|
|
@@ -19,11 +21,11 @@ export type PazeShippingAddress = {
|
|
|
19
21
|
/**
|
|
20
22
|
* Line 2 of the address.
|
|
21
23
|
*/
|
|
22
|
-
line2
|
|
24
|
+
line2?: string | null | undefined;
|
|
23
25
|
/**
|
|
24
26
|
* Line 3 of the address.
|
|
25
27
|
*/
|
|
26
|
-
line3
|
|
28
|
+
line3?: string | null | undefined;
|
|
27
29
|
/**
|
|
28
30
|
* City.
|
|
29
31
|
*/
|
|
@@ -50,15 +52,49 @@ export const PazeShippingAddress$inboundSchema: z.ZodType<
|
|
|
50
52
|
unknown
|
|
51
53
|
> = z.object({
|
|
52
54
|
line1: z.string(),
|
|
53
|
-
line2: z.nullable(z.string()),
|
|
54
|
-
line3: z.nullable(z.string()),
|
|
55
|
+
line2: z.nullable(z.string()).optional(),
|
|
56
|
+
line3: z.nullable(z.string()).optional(),
|
|
55
57
|
city: z.string(),
|
|
56
58
|
state: z.string(),
|
|
57
59
|
zip: z.string(),
|
|
58
60
|
countryCode: z.string(),
|
|
59
61
|
deliveryContactDetails: z.nullable(PazeDeliveryContactDetails$inboundSchema),
|
|
60
62
|
});
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type PazeShippingAddress$Outbound = {
|
|
65
|
+
line1: string;
|
|
66
|
+
line2?: string | null | undefined;
|
|
67
|
+
line3?: string | null | undefined;
|
|
68
|
+
city: string;
|
|
69
|
+
state: string;
|
|
70
|
+
zip: string;
|
|
71
|
+
countryCode: string;
|
|
72
|
+
deliveryContactDetails: PazeDeliveryContactDetails$Outbound | null;
|
|
73
|
+
};
|
|
61
74
|
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const PazeShippingAddress$outboundSchema: z.ZodType<
|
|
77
|
+
PazeShippingAddress$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
PazeShippingAddress
|
|
80
|
+
> = z.object({
|
|
81
|
+
line1: z.string(),
|
|
82
|
+
line2: z.nullable(z.string()).optional(),
|
|
83
|
+
line3: z.nullable(z.string()).optional(),
|
|
84
|
+
city: z.string(),
|
|
85
|
+
state: z.string(),
|
|
86
|
+
zip: z.string(),
|
|
87
|
+
countryCode: z.string(),
|
|
88
|
+
deliveryContactDetails: z.nullable(PazeDeliveryContactDetails$outboundSchema),
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export function pazeShippingAddressToJSON(
|
|
92
|
+
pazeShippingAddress: PazeShippingAddress,
|
|
93
|
+
): string {
|
|
94
|
+
return JSON.stringify(
|
|
95
|
+
PazeShippingAddress$outboundSchema.parse(pazeShippingAddress),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
62
98
|
export function pazeShippingAddressFromJSON(
|
|
63
99
|
jsonString: string,
|
|
64
100
|
): SafeParseResult<PazeShippingAddress, SDKValidationError> {
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as openEnums from "../../types/enums.js";
|
|
7
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const PazeTransactionOptionsBillingPreference = {
|
|
10
|
+
All: "ALL",
|
|
11
|
+
None: "NONE",
|
|
12
|
+
} as const;
|
|
13
|
+
export type PazeTransactionOptionsBillingPreference = OpenEnum<
|
|
14
|
+
typeof PazeTransactionOptionsBillingPreference
|
|
15
|
+
>;
|
|
16
|
+
|
|
17
|
+
export const PayloadTypeIndicator = {
|
|
18
|
+
Id: "ID",
|
|
19
|
+
Payment: "PAYMENT",
|
|
20
|
+
} as const;
|
|
21
|
+
export type PayloadTypeIndicator = OpenEnum<typeof PayloadTypeIndicator>;
|
|
22
|
+
|
|
23
|
+
export type PazeTransactionOptions = {
|
|
24
|
+
/**
|
|
25
|
+
* Merchant Category Code (MCC) of the merchant.
|
|
26
|
+
*/
|
|
27
|
+
merchantCategoryCode?: string | null | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Verbosity of the billing address required by the merchant.
|
|
30
|
+
*/
|
|
31
|
+
billingPreference?:
|
|
32
|
+
| PazeTransactionOptionsBillingPreference
|
|
33
|
+
| null
|
|
34
|
+
| undefined;
|
|
35
|
+
/**
|
|
36
|
+
* ID returns `payloadId` only (default). PAYMENT returns `payloadId` and `securePayload`.
|
|
37
|
+
*/
|
|
38
|
+
payloadTypeIndicator?: PayloadTypeIndicator | null | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const PazeTransactionOptionsBillingPreference$outboundSchema: z.ZodType<
|
|
43
|
+
string,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
PazeTransactionOptionsBillingPreference
|
|
46
|
+
> = openEnums.outboundSchema(PazeTransactionOptionsBillingPreference);
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const PayloadTypeIndicator$outboundSchema: z.ZodType<
|
|
50
|
+
string,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
PayloadTypeIndicator
|
|
53
|
+
> = openEnums.outboundSchema(PayloadTypeIndicator);
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export type PazeTransactionOptions$Outbound = {
|
|
57
|
+
merchantCategoryCode?: string | null | undefined;
|
|
58
|
+
billingPreference?: string | null | undefined;
|
|
59
|
+
payloadTypeIndicator?: string | null | undefined;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const PazeTransactionOptions$outboundSchema: z.ZodType<
|
|
64
|
+
PazeTransactionOptions$Outbound,
|
|
65
|
+
z.ZodTypeDef,
|
|
66
|
+
PazeTransactionOptions
|
|
67
|
+
> = z.object({
|
|
68
|
+
merchantCategoryCode: z.nullable(z.string()).optional(),
|
|
69
|
+
billingPreference: z.nullable(
|
|
70
|
+
PazeTransactionOptionsBillingPreference$outboundSchema,
|
|
71
|
+
).optional(),
|
|
72
|
+
payloadTypeIndicator: z.nullable(PayloadTypeIndicator$outboundSchema)
|
|
73
|
+
.optional(),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function pazeTransactionOptionsToJSON(
|
|
77
|
+
pazeTransactionOptions: PazeTransactionOptions,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
PazeTransactionOptions$outboundSchema.parse(pazeTransactionOptions),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
PazeLocationAddress,
|
|
8
|
+
PazeLocationAddress$Outbound,
|
|
9
|
+
PazeLocationAddress$outboundSchema,
|
|
10
|
+
} from "./pazelocationaddress.js";
|
|
11
|
+
|
|
12
|
+
export type PazeTravelData = {
|
|
13
|
+
/**
|
|
14
|
+
* Traveler name.
|
|
15
|
+
*/
|
|
16
|
+
passengerName?: string | null | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Whether departure and return trips are being purchased in the same transaction.
|
|
19
|
+
*/
|
|
20
|
+
roundTrip?: boolean | null | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Date and time of departure in ISO 8601 format.
|
|
23
|
+
*/
|
|
24
|
+
departureDate?: string | null | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Date and time of return in ISO 8601 format.
|
|
27
|
+
*/
|
|
28
|
+
returnDate?: string | null | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Location from which the traveler departs.
|
|
31
|
+
*/
|
|
32
|
+
departureLocation?: PazeLocationAddress | null | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Location to which the traveler returns.
|
|
35
|
+
*/
|
|
36
|
+
returnLocation?: PazeLocationAddress | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type PazeTravelData$Outbound = {
|
|
41
|
+
passengerName?: string | null | undefined;
|
|
42
|
+
roundTrip?: boolean | null | undefined;
|
|
43
|
+
departureDate?: string | null | undefined;
|
|
44
|
+
returnDate?: string | null | undefined;
|
|
45
|
+
departureLocation?: PazeLocationAddress$Outbound | null | undefined;
|
|
46
|
+
returnLocation?: PazeLocationAddress$Outbound | null | undefined;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const PazeTravelData$outboundSchema: z.ZodType<
|
|
51
|
+
PazeTravelData$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
PazeTravelData
|
|
54
|
+
> = z.object({
|
|
55
|
+
passengerName: z.nullable(z.string()).optional(),
|
|
56
|
+
roundTrip: z.nullable(z.boolean()).optional(),
|
|
57
|
+
departureDate: z.nullable(z.string()).optional(),
|
|
58
|
+
returnDate: z.nullable(z.string()).optional(),
|
|
59
|
+
departureLocation: z.nullable(PazeLocationAddress$outboundSchema).optional(),
|
|
60
|
+
returnLocation: z.nullable(PazeLocationAddress$outboundSchema).optional(),
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export function pazeTravelDataToJSON(pazeTravelData: PazeTravelData): string {
|
|
64
|
+
return JSON.stringify(PazeTravelData$outboundSchema.parse(pazeTravelData));
|
|
65
|
+
}
|
|
@@ -3,11 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import {
|
|
7
8
|
Airline,
|
|
8
9
|
Airline$Outbound,
|
|
9
10
|
Airline$outboundSchema,
|
|
10
11
|
} from "./airline.js";
|
|
12
|
+
import {
|
|
13
|
+
CartItem,
|
|
14
|
+
CartItem$Outbound,
|
|
15
|
+
CartItem$outboundSchema,
|
|
16
|
+
} from "./cartitem.js";
|
|
11
17
|
|
|
12
18
|
/**
|
|
13
19
|
* Request body for capturing an authorized transaction.
|
|
@@ -21,12 +27,17 @@ export type TransactionCaptureCreate = {
|
|
|
21
27
|
* The airline data to submit to the payment service during the capture call.
|
|
22
28
|
*/
|
|
23
29
|
airline?: Airline | null | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* An array of cart items that represents the line items of this capture.
|
|
32
|
+
*/
|
|
33
|
+
cartItems?: Array<CartItem> | null | undefined;
|
|
24
34
|
};
|
|
25
35
|
|
|
26
36
|
/** @internal */
|
|
27
37
|
export type TransactionCaptureCreate$Outbound = {
|
|
28
38
|
amount?: number | null | undefined;
|
|
29
39
|
airline?: Airline$Outbound | null | undefined;
|
|
40
|
+
cart_items?: Array<CartItem$Outbound> | null | undefined;
|
|
30
41
|
};
|
|
31
42
|
|
|
32
43
|
/** @internal */
|
|
@@ -37,6 +48,11 @@ export const TransactionCaptureCreate$outboundSchema: z.ZodType<
|
|
|
37
48
|
> = z.object({
|
|
38
49
|
amount: z.nullable(z.number().int()).optional(),
|
|
39
50
|
airline: z.nullable(Airline$outboundSchema).optional(),
|
|
51
|
+
cartItems: z.nullable(z.array(CartItem$outboundSchema)).optional(),
|
|
52
|
+
}).transform((v) => {
|
|
53
|
+
return remap$(v, {
|
|
54
|
+
cartItems: "cart_items",
|
|
55
|
+
});
|
|
40
56
|
});
|
|
41
57
|
|
|
42
58
|
export function transactionCaptureCreateToJSON(
|
|
@@ -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 { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as components from "../components/index.js";
|
|
8
|
+
|
|
9
|
+
export type CompletePazeMobileSessionGlobals = {
|
|
10
|
+
merchantAccountId?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type CompletePazeMobileSessionRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the merchant account to use for this request.
|
|
16
|
+
*/
|
|
17
|
+
merchantAccountId?: string | null | undefined;
|
|
18
|
+
pazeSessionCompleteRequest: components.PazeSessionCompleteRequest;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type CompletePazeMobileSessionRequest$Outbound = {
|
|
23
|
+
merchantAccountId?: string | null | undefined;
|
|
24
|
+
PazeSessionCompleteRequest: components.PazeSessionCompleteRequest$Outbound;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const CompletePazeMobileSessionRequest$outboundSchema: z.ZodType<
|
|
29
|
+
CompletePazeMobileSessionRequest$Outbound,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
CompletePazeMobileSessionRequest
|
|
32
|
+
> = z.object({
|
|
33
|
+
merchantAccountId: z.nullable(z.string()).optional(),
|
|
34
|
+
pazeSessionCompleteRequest:
|
|
35
|
+
components.PazeSessionCompleteRequest$outboundSchema,
|
|
36
|
+
}).transform((v) => {
|
|
37
|
+
return remap$(v, {
|
|
38
|
+
pazeSessionCompleteRequest: "PazeSessionCompleteRequest",
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export function completePazeMobileSessionRequestToJSON(
|
|
43
|
+
completePazeMobileSessionRequest: CompletePazeMobileSessionRequest,
|
|
44
|
+
): string {
|
|
45
|
+
return JSON.stringify(
|
|
46
|
+
CompletePazeMobileSessionRequest$outboundSchema.parse(
|
|
47
|
+
completePazeMobileSessionRequest,
|
|
48
|
+
),
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -8,6 +8,7 @@ export * from "./addpaymentlink.js";
|
|
|
8
8
|
export * from "./addreport.js";
|
|
9
9
|
export * from "./canceltransaction.js";
|
|
10
10
|
export * from "./capturetransaction.js";
|
|
11
|
+
export * from "./completepazemobilesession.js";
|
|
11
12
|
export * from "./configuredigitalwallet.js";
|
|
12
13
|
export * from "./createaccountupdaterjob.js";
|
|
13
14
|
export * from "./createapplepaydigitalwalletsession.js";
|
package/src/sdk/sessions.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { digitalWalletsSessionsApplePay } from "../funcs/digitalWalletsSessionsA
|
|
|
6
6
|
import { digitalWalletsSessionsClickToPay } from "../funcs/digitalWalletsSessionsClickToPay.js";
|
|
7
7
|
import { digitalWalletsSessionsGooglePay } from "../funcs/digitalWalletsSessionsGooglePay.js";
|
|
8
8
|
import { digitalWalletsSessionsPaze } from "../funcs/digitalWalletsSessionsPaze.js";
|
|
9
|
+
import { digitalWalletsSessionsPazeMobileSessionComplete } from "../funcs/digitalWalletsSessionsPazeMobileSessionComplete.js";
|
|
9
10
|
import { digitalWalletsSessionsPazeMobileSessionCreate } from "../funcs/digitalWalletsSessionsPazeMobileSessionCreate.js";
|
|
10
11
|
import { digitalWalletsSessionsPazeMobileSessionReview } from "../funcs/digitalWalletsSessionsPazeMobileSessionReview.js";
|
|
11
12
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -111,6 +112,25 @@ export class Sessions extends ClientSDK {
|
|
|
111
112
|
));
|
|
112
113
|
}
|
|
113
114
|
|
|
115
|
+
/**
|
|
116
|
+
* Complete a Paze session
|
|
117
|
+
*
|
|
118
|
+
* @remarks
|
|
119
|
+
* Complete a Paze checkout session and retrieve the secure payload required to settle the payment.
|
|
120
|
+
*/
|
|
121
|
+
async pazeMobileSessionComplete(
|
|
122
|
+
pazeSessionCompleteRequest: components.PazeSessionCompleteRequest,
|
|
123
|
+
merchantAccountId?: string | null | undefined,
|
|
124
|
+
options?: RequestOptions,
|
|
125
|
+
): Promise<components.PazeSessionComplete> {
|
|
126
|
+
return unwrapAsync(digitalWalletsSessionsPazeMobileSessionComplete(
|
|
127
|
+
this,
|
|
128
|
+
pazeSessionCompleteRequest,
|
|
129
|
+
merchantAccountId,
|
|
130
|
+
options,
|
|
131
|
+
));
|
|
132
|
+
}
|
|
133
|
+
|
|
114
134
|
/**
|
|
115
135
|
* Create a Click to Pay session
|
|
116
136
|
*
|