@gr4vy/sdk 2.0.51 → 2.0.52
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/digitalWalletsSessionsPazeMobileSessionReview.d.ts +18 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionReview.d.ts.map +1 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionReview.js +127 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionReview.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/index.d.ts +10 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +10 -0
- package/models/components/index.js.map +1 -1
- package/models/components/pazebillingaddress.d.ts +41 -0
- package/models/components/pazebillingaddress.d.ts.map +1 -0
- package/models/components/pazebillingaddress.js +57 -0
- package/models/components/pazebillingaddress.js.map +1 -0
- package/models/components/pazeconsumer.d.ts +35 -0
- package/models/components/pazeconsumer.d.ts.map +1 -0
- package/models/components/pazeconsumer.js +57 -0
- package/models/components/pazeconsumer.js.map +1 -0
- package/models/components/pazedeliverycontactdetails.d.ts +15 -0
- package/models/components/pazedeliverycontactdetails.d.ts.map +1 -0
- package/models/components/pazedeliverycontactdetails.js +52 -0
- package/models/components/pazedeliverycontactdetails.js.map +1 -0
- package/models/components/pazedigitalcarddata.d.ts +21 -0
- package/models/components/pazedigitalcarddata.d.ts.map +1 -0
- package/models/components/pazedigitalcarddata.js +52 -0
- package/models/components/pazedigitalcarddata.js.map +1 -0
- package/models/components/pazemaskedcard.d.ts +87 -0
- package/models/components/pazemaskedcard.d.ts.map +1 -0
- package/models/components/pazemaskedcard.js +91 -0
- package/models/components/pazemaskedcard.js.map +1 -0
- package/models/components/pazemobilenumber.d.ts +17 -0
- package/models/components/pazemobilenumber.d.ts.map +1 -0
- package/models/components/pazemobilenumber.js +51 -0
- package/models/components/pazemobilenumber.js.map +1 -0
- package/models/components/pazesessionreview.d.ts +21 -0
- package/models/components/pazesessionreview.d.ts.map +1 -0
- package/models/components/pazesessionreview.js +58 -0
- package/models/components/pazesessionreview.js.map +1 -0
- package/models/components/pazesessionreviewlinks.d.ts +17 -0
- package/models/components/pazesessionreviewlinks.d.ts.map +1 -0
- package/models/components/pazesessionreviewlinks.js +57 -0
- package/models/components/pazesessionreviewlinks.js.map +1 -0
- package/models/components/pazesessionreviewrequest.d.ts +25 -0
- package/models/components/pazesessionreviewrequest.d.ts.map +1 -0
- package/models/components/pazesessionreviewrequest.js +51 -0
- package/models/components/pazesessionreviewrequest.js.map +1 -0
- package/models/components/pazeshippingaddress.d.ts +39 -0
- package/models/components/pazeshippingaddress.d.ts.map +1 -0
- package/models/components/pazeshippingaddress.js +58 -0
- package/models/components/pazeshippingaddress.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/models/operations/reviewpazemobilesession.d.ts +21 -0
- package/models/operations/reviewpazemobilesession.d.ts.map +1 -0
- package/models/operations/reviewpazemobilesession.js +56 -0
- package/models/operations/reviewpazemobilesession.js.map +1 -0
- 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/digitalWalletsSessionsPazeMobileSessionReview.ts +232 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +10 -0
- package/src/models/components/pazebillingaddress.ts +69 -0
- package/src/models/components/pazeconsumer.ts +65 -0
- package/src/models/components/pazedeliverycontactdetails.ts +40 -0
- package/src/models/components/pazedigitalcarddata.ts +44 -0
- package/src/models/components/pazemaskedcard.ts +142 -0
- package/src/models/components/pazemobilenumber.ts +39 -0
- package/src/models/components/pazesessionreview.ts +55 -0
- package/src/models/components/pazesessionreviewlinks.ts +45 -0
- package/src/models/components/pazesessionreviewrequest.ts +46 -0
- package/src/models/components/pazeshippingaddress.ts +70 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/reviewpazemobilesession.ts +49 -0
- package/src/sdk/sessions.ts +20 -0
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
PazeMobileNumber,
|
|
11
|
+
PazeMobileNumber$inboundSchema,
|
|
12
|
+
} from "./pazemobilenumber.js";
|
|
13
|
+
|
|
14
|
+
export type PazeDeliveryContactDetails = {
|
|
15
|
+
/**
|
|
16
|
+
* Consumer-provided name of the contact person.
|
|
17
|
+
*/
|
|
18
|
+
contactFullName: string | null;
|
|
19
|
+
contactPhoneNumber: PazeMobileNumber | null;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const PazeDeliveryContactDetails$inboundSchema: z.ZodType<
|
|
24
|
+
PazeDeliveryContactDetails,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
contactFullName: z.nullable(z.string()),
|
|
29
|
+
contactPhoneNumber: z.nullable(PazeMobileNumber$inboundSchema),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export function pazeDeliveryContactDetailsFromJSON(
|
|
33
|
+
jsonString: string,
|
|
34
|
+
): SafeParseResult<PazeDeliveryContactDetails, SDKValidationError> {
|
|
35
|
+
return safeParse(
|
|
36
|
+
jsonString,
|
|
37
|
+
(x) => PazeDeliveryContactDetails$inboundSchema.parse(JSON.parse(x)),
|
|
38
|
+
`Failed to parse 'PazeDeliveryContactDetails' from JSON`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
|
|
10
|
+
export type PazeDigitalCardData = {
|
|
11
|
+
/**
|
|
12
|
+
* URI hosting the card art image.
|
|
13
|
+
*/
|
|
14
|
+
artUri: string;
|
|
15
|
+
/**
|
|
16
|
+
* Card art height in pixels.
|
|
17
|
+
*/
|
|
18
|
+
artHeight: number;
|
|
19
|
+
/**
|
|
20
|
+
* Card art width in pixels.
|
|
21
|
+
*/
|
|
22
|
+
artWidth: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const PazeDigitalCardData$inboundSchema: z.ZodType<
|
|
27
|
+
PazeDigitalCardData,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
artUri: z.string(),
|
|
32
|
+
artHeight: z.number().int(),
|
|
33
|
+
artWidth: z.number().int(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export function pazeDigitalCardDataFromJSON(
|
|
37
|
+
jsonString: string,
|
|
38
|
+
): SafeParseResult<PazeDigitalCardData, SDKValidationError> {
|
|
39
|
+
return safeParse(
|
|
40
|
+
jsonString,
|
|
41
|
+
(x) => PazeDigitalCardData$inboundSchema.parse(JSON.parse(x)),
|
|
42
|
+
`Failed to parse 'PazeDigitalCardData' from JSON`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
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 * as openEnums from "../../types/enums.js";
|
|
8
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
PazeBillingAddress,
|
|
13
|
+
PazeBillingAddress$inboundSchema,
|
|
14
|
+
} from "./pazebillingaddress.js";
|
|
15
|
+
import {
|
|
16
|
+
PazeDigitalCardData,
|
|
17
|
+
PazeDigitalCardData$inboundSchema,
|
|
18
|
+
} from "./pazedigitalcarddata.js";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Card type.
|
|
22
|
+
*/
|
|
23
|
+
export const Paymentcardtype = {
|
|
24
|
+
Credit: "CREDIT",
|
|
25
|
+
Debit: "DEBIT",
|
|
26
|
+
} as const;
|
|
27
|
+
/**
|
|
28
|
+
* Card type.
|
|
29
|
+
*/
|
|
30
|
+
export type Paymentcardtype = OpenEnum<typeof Paymentcardtype>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Card brand.
|
|
34
|
+
*/
|
|
35
|
+
export const Paymentcardbrand = {
|
|
36
|
+
Visa: "VISA",
|
|
37
|
+
Mastercard: "MASTERCARD",
|
|
38
|
+
Discover: "DISCOVER",
|
|
39
|
+
} as const;
|
|
40
|
+
/**
|
|
41
|
+
* Card brand.
|
|
42
|
+
*/
|
|
43
|
+
export type Paymentcardbrand = OpenEnum<typeof Paymentcardbrand>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Card network.
|
|
47
|
+
*/
|
|
48
|
+
export const Paymentcardnetwork = {
|
|
49
|
+
Visa: "VISA",
|
|
50
|
+
Mastercard: "MASTERCARD",
|
|
51
|
+
Discover: "DISCOVER",
|
|
52
|
+
} as const;
|
|
53
|
+
/**
|
|
54
|
+
* Card network.
|
|
55
|
+
*/
|
|
56
|
+
export type Paymentcardnetwork = OpenEnum<typeof Paymentcardnetwork>;
|
|
57
|
+
|
|
58
|
+
export type PazeMaskedCard = {
|
|
59
|
+
/**
|
|
60
|
+
* Last four digits of the PAN.
|
|
61
|
+
*/
|
|
62
|
+
panLastFour: string;
|
|
63
|
+
/**
|
|
64
|
+
* Payment Account Reference (PAR). A non-financial reference assigned to each unique PAN.
|
|
65
|
+
*/
|
|
66
|
+
paymentAccountReference: string;
|
|
67
|
+
/**
|
|
68
|
+
* 2-digit PAN expiration month.
|
|
69
|
+
*/
|
|
70
|
+
panExpirationMonth: string | null;
|
|
71
|
+
/**
|
|
72
|
+
* 4-digit PAN expiration year.
|
|
73
|
+
*/
|
|
74
|
+
panExpirationYear: string | null;
|
|
75
|
+
/**
|
|
76
|
+
* Free-form string used for card or program recognition.
|
|
77
|
+
*/
|
|
78
|
+
paymentCardDescriptor: string;
|
|
79
|
+
/**
|
|
80
|
+
* Card type.
|
|
81
|
+
*/
|
|
82
|
+
paymentCardType: Paymentcardtype;
|
|
83
|
+
/**
|
|
84
|
+
* Card brand.
|
|
85
|
+
*/
|
|
86
|
+
paymentCardBrand: Paymentcardbrand;
|
|
87
|
+
/**
|
|
88
|
+
* Card network.
|
|
89
|
+
*/
|
|
90
|
+
paymentCardNetwork: Paymentcardnetwork;
|
|
91
|
+
digitalCardData: PazeDigitalCardData;
|
|
92
|
+
billingAddress: PazeBillingAddress | null;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const Paymentcardtype$inboundSchema: z.ZodType<
|
|
97
|
+
Paymentcardtype,
|
|
98
|
+
z.ZodTypeDef,
|
|
99
|
+
unknown
|
|
100
|
+
> = openEnums.inboundSchema(Paymentcardtype);
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const Paymentcardbrand$inboundSchema: z.ZodType<
|
|
104
|
+
Paymentcardbrand,
|
|
105
|
+
z.ZodTypeDef,
|
|
106
|
+
unknown
|
|
107
|
+
> = openEnums.inboundSchema(Paymentcardbrand);
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const Paymentcardnetwork$inboundSchema: z.ZodType<
|
|
111
|
+
Paymentcardnetwork,
|
|
112
|
+
z.ZodTypeDef,
|
|
113
|
+
unknown
|
|
114
|
+
> = openEnums.inboundSchema(Paymentcardnetwork);
|
|
115
|
+
|
|
116
|
+
/** @internal */
|
|
117
|
+
export const PazeMaskedCard$inboundSchema: z.ZodType<
|
|
118
|
+
PazeMaskedCard,
|
|
119
|
+
z.ZodTypeDef,
|
|
120
|
+
unknown
|
|
121
|
+
> = z.object({
|
|
122
|
+
panLastFour: z.string(),
|
|
123
|
+
paymentAccountReference: z.string(),
|
|
124
|
+
panExpirationMonth: z.nullable(z.string()),
|
|
125
|
+
panExpirationYear: z.nullable(z.string()),
|
|
126
|
+
paymentCardDescriptor: z.string(),
|
|
127
|
+
paymentCardType: Paymentcardtype$inboundSchema,
|
|
128
|
+
paymentCardBrand: Paymentcardbrand$inboundSchema,
|
|
129
|
+
paymentCardNetwork: Paymentcardnetwork$inboundSchema,
|
|
130
|
+
digitalCardData: PazeDigitalCardData$inboundSchema,
|
|
131
|
+
billingAddress: z.nullable(PazeBillingAddress$inboundSchema),
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
export function pazeMaskedCardFromJSON(
|
|
135
|
+
jsonString: string,
|
|
136
|
+
): SafeParseResult<PazeMaskedCard, SDKValidationError> {
|
|
137
|
+
return safeParse(
|
|
138
|
+
jsonString,
|
|
139
|
+
(x) => PazeMaskedCard$inboundSchema.parse(JSON.parse(x)),
|
|
140
|
+
`Failed to parse 'PazeMaskedCard' from JSON`,
|
|
141
|
+
);
|
|
142
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
|
|
10
|
+
export type PazeMobileNumber = {
|
|
11
|
+
/**
|
|
12
|
+
* ITU country dialing code.
|
|
13
|
+
*/
|
|
14
|
+
countryCode: string;
|
|
15
|
+
/**
|
|
16
|
+
* Phone number without country code.
|
|
17
|
+
*/
|
|
18
|
+
phoneNumber: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const PazeMobileNumber$inboundSchema: z.ZodType<
|
|
23
|
+
PazeMobileNumber,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
countryCode: z.string(),
|
|
28
|
+
phoneNumber: z.string(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function pazeMobileNumberFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<PazeMobileNumber, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => PazeMobileNumber$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'PazeMobileNumber' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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 { PazeConsumer, PazeConsumer$inboundSchema } from "./pazeconsumer.js";
|
|
10
|
+
import {
|
|
11
|
+
PazeMaskedCard,
|
|
12
|
+
PazeMaskedCard$inboundSchema,
|
|
13
|
+
} from "./pazemaskedcard.js";
|
|
14
|
+
import {
|
|
15
|
+
PazeSessionReviewLinks,
|
|
16
|
+
PazeSessionReviewLinks$inboundSchema,
|
|
17
|
+
} from "./pazesessionreviewlinks.js";
|
|
18
|
+
import {
|
|
19
|
+
PazeShippingAddress,
|
|
20
|
+
PazeShippingAddress$inboundSchema,
|
|
21
|
+
} from "./pazeshippingaddress.js";
|
|
22
|
+
|
|
23
|
+
export type PazeSessionReview = {
|
|
24
|
+
consumer: PazeConsumer;
|
|
25
|
+
shippingAddress: PazeShippingAddress | null;
|
|
26
|
+
maskedCard: PazeMaskedCard;
|
|
27
|
+
links: PazeSessionReviewLinks;
|
|
28
|
+
/**
|
|
29
|
+
* Opaque token issued by the Paze service to be used in the next Paze interaction.
|
|
30
|
+
*/
|
|
31
|
+
code: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const PazeSessionReview$inboundSchema: z.ZodType<
|
|
36
|
+
PazeSessionReview,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
unknown
|
|
39
|
+
> = z.object({
|
|
40
|
+
consumer: PazeConsumer$inboundSchema,
|
|
41
|
+
shippingAddress: z.nullable(PazeShippingAddress$inboundSchema),
|
|
42
|
+
maskedCard: PazeMaskedCard$inboundSchema,
|
|
43
|
+
links: PazeSessionReviewLinks$inboundSchema,
|
|
44
|
+
code: z.string(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function pazeSessionReviewFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<PazeSessionReview, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => PazeSessionReview$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'PazeSessionReview' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type PazeSessionReviewLinks = {
|
|
12
|
+
/**
|
|
13
|
+
* Follow-up link to change the selected card.
|
|
14
|
+
*/
|
|
15
|
+
changeCard: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Follow-up link to change the shipping address.
|
|
18
|
+
*/
|
|
19
|
+
changeShippingAddress: string | null;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const PazeSessionReviewLinks$inboundSchema: z.ZodType<
|
|
24
|
+
PazeSessionReviewLinks,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
CHANGE_CARD: z.nullable(z.string()),
|
|
29
|
+
CHANGE_SHIPPING_ADDRESS: z.nullable(z.string()),
|
|
30
|
+
}).transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
"CHANGE_CARD": "changeCard",
|
|
33
|
+
"CHANGE_SHIPPING_ADDRESS": "changeShippingAddress",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function pazeSessionReviewLinksFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<PazeSessionReviewLinks, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => PazeSessionReviewLinks$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'PazeSessionReviewLinks' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type PazeSessionReviewRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* Session reference identifier generated by the merchant. Must match the value sent in the Paze session create call.
|
|
10
|
+
*/
|
|
11
|
+
sessionId: string;
|
|
12
|
+
/**
|
|
13
|
+
* Opaque token issued by the Paze service in the response from the most recent Paze UX interaction (checkout, change card, or change shipping address).
|
|
14
|
+
*/
|
|
15
|
+
code: string;
|
|
16
|
+
/**
|
|
17
|
+
* The Paze OAuth access token returned by the Paze mobile session create call. Used to authenticate the request to Paze.
|
|
18
|
+
*/
|
|
19
|
+
accessToken: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export type PazeSessionReviewRequest$Outbound = {
|
|
24
|
+
sessionId: string;
|
|
25
|
+
code: string;
|
|
26
|
+
accessToken: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const PazeSessionReviewRequest$outboundSchema: z.ZodType<
|
|
31
|
+
PazeSessionReviewRequest$Outbound,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
PazeSessionReviewRequest
|
|
34
|
+
> = z.object({
|
|
35
|
+
sessionId: z.string(),
|
|
36
|
+
code: z.string(),
|
|
37
|
+
accessToken: z.string(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function pazeSessionReviewRequestToJSON(
|
|
41
|
+
pazeSessionReviewRequest: PazeSessionReviewRequest,
|
|
42
|
+
): string {
|
|
43
|
+
return JSON.stringify(
|
|
44
|
+
PazeSessionReviewRequest$outboundSchema.parse(pazeSessionReviewRequest),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
PazeDeliveryContactDetails,
|
|
11
|
+
PazeDeliveryContactDetails$inboundSchema,
|
|
12
|
+
} from "./pazedeliverycontactdetails.js";
|
|
13
|
+
|
|
14
|
+
export type PazeShippingAddress = {
|
|
15
|
+
/**
|
|
16
|
+
* Line 1 of the address.
|
|
17
|
+
*/
|
|
18
|
+
line1: string;
|
|
19
|
+
/**
|
|
20
|
+
* Line 2 of the address.
|
|
21
|
+
*/
|
|
22
|
+
line2: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Line 3 of the address.
|
|
25
|
+
*/
|
|
26
|
+
line3: string | null;
|
|
27
|
+
/**
|
|
28
|
+
* City.
|
|
29
|
+
*/
|
|
30
|
+
city: string;
|
|
31
|
+
/**
|
|
32
|
+
* State or region.
|
|
33
|
+
*/
|
|
34
|
+
state: string;
|
|
35
|
+
/**
|
|
36
|
+
* Postal code.
|
|
37
|
+
*/
|
|
38
|
+
zip: string;
|
|
39
|
+
/**
|
|
40
|
+
* ISO 3166-1 alpha-2 country code.
|
|
41
|
+
*/
|
|
42
|
+
countryCode: string;
|
|
43
|
+
deliveryContactDetails: PazeDeliveryContactDetails | null;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const PazeShippingAddress$inboundSchema: z.ZodType<
|
|
48
|
+
PazeShippingAddress,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
line1: z.string(),
|
|
53
|
+
line2: z.nullable(z.string()),
|
|
54
|
+
line3: z.nullable(z.string()),
|
|
55
|
+
city: z.string(),
|
|
56
|
+
state: z.string(),
|
|
57
|
+
zip: z.string(),
|
|
58
|
+
countryCode: z.string(),
|
|
59
|
+
deliveryContactDetails: z.nullable(PazeDeliveryContactDetails$inboundSchema),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export function pazeShippingAddressFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<PazeShippingAddress, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => PazeShippingAddress$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'PazeShippingAddress' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -89,6 +89,7 @@ export * from "./listtransactions.js";
|
|
|
89
89
|
export * from "./listtransactionsettlements.js";
|
|
90
90
|
export * from "./registerdigitalwalletdomain.js";
|
|
91
91
|
export * from "./resumepaymentmethodnetworktoken.js";
|
|
92
|
+
export * from "./reviewpazemobilesession.js";
|
|
92
93
|
export * from "./suspendpaymentmethodnetworktoken.js";
|
|
93
94
|
export * from "./synctransaction.js";
|
|
94
95
|
export * from "./unregisterdigitalwalletdomain.js";
|
|
@@ -0,0 +1,49 @@
|
|
|
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 ReviewPazeMobileSessionGlobals = {
|
|
10
|
+
merchantAccountId?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type ReviewPazeMobileSessionRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the merchant account to use for this request.
|
|
16
|
+
*/
|
|
17
|
+
merchantAccountId?: string | null | undefined;
|
|
18
|
+
pazeSessionReviewRequest: components.PazeSessionReviewRequest;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type ReviewPazeMobileSessionRequest$Outbound = {
|
|
23
|
+
merchantAccountId?: string | null | undefined;
|
|
24
|
+
PazeSessionReviewRequest: components.PazeSessionReviewRequest$Outbound;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ReviewPazeMobileSessionRequest$outboundSchema: z.ZodType<
|
|
29
|
+
ReviewPazeMobileSessionRequest$Outbound,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
ReviewPazeMobileSessionRequest
|
|
32
|
+
> = z.object({
|
|
33
|
+
merchantAccountId: z.nullable(z.string()).optional(),
|
|
34
|
+
pazeSessionReviewRequest: components.PazeSessionReviewRequest$outboundSchema,
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
pazeSessionReviewRequest: "PazeSessionReviewRequest",
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export function reviewPazeMobileSessionRequestToJSON(
|
|
42
|
+
reviewPazeMobileSessionRequest: ReviewPazeMobileSessionRequest,
|
|
43
|
+
): string {
|
|
44
|
+
return JSON.stringify(
|
|
45
|
+
ReviewPazeMobileSessionRequest$outboundSchema.parse(
|
|
46
|
+
reviewPazeMobileSessionRequest,
|
|
47
|
+
),
|
|
48
|
+
);
|
|
49
|
+
}
|
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 { digitalWalletsSessionsPazeMobileSessionReview } from "../funcs/digitalWalletsSessionsPazeMobileSessionReview.js";
|
|
9
10
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
11
|
import * as components from "../models/components/index.js";
|
|
11
12
|
import * as operations from "../models/operations/index.js";
|
|
@@ -71,6 +72,25 @@ export class Sessions extends ClientSDK {
|
|
|
71
72
|
));
|
|
72
73
|
}
|
|
73
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Review a Paze session
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* Review a Paze checkout session and retrieve the selected card, consumer, and shipping address details.
|
|
80
|
+
*/
|
|
81
|
+
async pazeMobileSessionReview(
|
|
82
|
+
pazeSessionReviewRequest: components.PazeSessionReviewRequest,
|
|
83
|
+
merchantAccountId?: string | null | undefined,
|
|
84
|
+
options?: RequestOptions,
|
|
85
|
+
): Promise<components.PazeSessionReview> {
|
|
86
|
+
return unwrapAsync(digitalWalletsSessionsPazeMobileSessionReview(
|
|
87
|
+
this,
|
|
88
|
+
pazeSessionReviewRequest,
|
|
89
|
+
merchantAccountId,
|
|
90
|
+
options,
|
|
91
|
+
));
|
|
92
|
+
}
|
|
93
|
+
|
|
74
94
|
/**
|
|
75
95
|
* Create a Click to Pay session
|
|
76
96
|
*
|