@gr4vy/sdk 2.0.51 → 2.0.53
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 +4 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionCreate.d.ts +18 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionCreate.d.ts.map +1 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionCreate.js +127 -0
- package/funcs/digitalWalletsSessionsPazeMobileSessionCreate.js.map +1 -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 +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/index.d.ts +15 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +15 -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/pazeclient.d.ts +25 -0
- package/models/components/pazeclient.d.ts.map +1 -0
- package/models/components/pazeclient.js +51 -0
- package/models/components/pazeclient.js.map +1 -0
- package/models/components/pazecobranditem.d.ts +20 -0
- package/models/components/pazecobranditem.d.ts.map +1 -0
- package/models/components/pazecobranditem.js +50 -0
- package/models/components/pazecobranditem.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/pazemobilesessioncreate.d.ts +25 -0
- package/models/components/pazemobilesessioncreate.d.ts.map +1 -0
- package/models/components/pazemobilesessioncreate.js +58 -0
- package/models/components/pazemobilesessioncreate.js.map +1 -0
- package/models/components/pazemobilesessioncreaterequest.d.ts +130 -0
- package/models/components/pazemobilesessioncreaterequest.d.ts.map +1 -0
- package/models/components/pazemobilesessioncreaterequest.js +103 -0
- package/models/components/pazemobilesessioncreaterequest.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/components/pazetransactionvalue.d.ts +20 -0
- package/models/components/pazetransactionvalue.d.ts.map +1 -0
- package/models/components/pazetransactionvalue.js +50 -0
- package/models/components/pazetransactionvalue.js.map +1 -0
- package/models/operations/createpazemobilesession.d.ts +21 -0
- package/models/operations/createpazemobilesession.d.ts.map +1 -0
- package/models/operations/createpazemobilesession.js +56 -0
- package/models/operations/createpazemobilesession.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -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 +14 -0
- package/sdk/sessions.d.ts.map +1 -1
- package/sdk/sessions.js +20 -0
- package/sdk/sessions.js.map +1 -1
- package/src/funcs/digitalWalletsSessionsPazeMobileSessionCreate.ts +232 -0
- package/src/funcs/digitalWalletsSessionsPazeMobileSessionReview.ts +232 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +15 -0
- package/src/models/components/pazebillingaddress.ts +69 -0
- package/src/models/components/pazeclient.ts +42 -0
- package/src/models/components/pazecobranditem.ts +38 -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/pazemobilesessioncreate.ts +54 -0
- package/src/models/components/pazemobilesessioncreaterequest.ts +212 -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/components/pazetransactionvalue.ts +40 -0
- package/src/models/operations/createpazemobilesession.ts +51 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/reviewpazemobilesession.ts +49 -0
- package/src/sdk/sessions.ts +40 -0
- package/src/types/async.ts +8 -7
- package/types/async.d.ts.map +1 -1
- package/types/async.js +8 -7
- package/types/async.js.map +1 -1
|
@@ -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
|
+
}
|
|
@@ -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
|
+
|
|
7
|
+
export type PazeTransactionValue = {
|
|
8
|
+
/**
|
|
9
|
+
* ISO 4217 currency code of the transaction.
|
|
10
|
+
*/
|
|
11
|
+
transactionCurrency: string;
|
|
12
|
+
/**
|
|
13
|
+
* Amount of the transaction including dollar and cents, e.g. '99.95'.
|
|
14
|
+
*/
|
|
15
|
+
transactionAmount: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type PazeTransactionValue$Outbound = {
|
|
20
|
+
transactionCurrency: string;
|
|
21
|
+
transactionAmount: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const PazeTransactionValue$outboundSchema: z.ZodType<
|
|
26
|
+
PazeTransactionValue$Outbound,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
PazeTransactionValue
|
|
29
|
+
> = z.object({
|
|
30
|
+
transactionCurrency: z.string(),
|
|
31
|
+
transactionAmount: z.string(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function pazeTransactionValueToJSON(
|
|
35
|
+
pazeTransactionValue: PazeTransactionValue,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
PazeTransactionValue$outboundSchema.parse(pazeTransactionValue),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 CreatePazeMobileSessionGlobals = {
|
|
10
|
+
merchantAccountId?: string | undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type CreatePazeMobileSessionRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the merchant account to use for this request.
|
|
16
|
+
*/
|
|
17
|
+
merchantAccountId?: string | null | undefined;
|
|
18
|
+
pazeMobileSessionCreateRequest: components.PazeMobileSessionCreateRequest;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export type CreatePazeMobileSessionRequest$Outbound = {
|
|
23
|
+
merchantAccountId?: string | null | undefined;
|
|
24
|
+
PazeMobileSessionCreateRequest:
|
|
25
|
+
components.PazeMobileSessionCreateRequest$Outbound;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const CreatePazeMobileSessionRequest$outboundSchema: z.ZodType<
|
|
30
|
+
CreatePazeMobileSessionRequest$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
CreatePazeMobileSessionRequest
|
|
33
|
+
> = z.object({
|
|
34
|
+
merchantAccountId: z.nullable(z.string()).optional(),
|
|
35
|
+
pazeMobileSessionCreateRequest:
|
|
36
|
+
components.PazeMobileSessionCreateRequest$outboundSchema,
|
|
37
|
+
}).transform((v) => {
|
|
38
|
+
return remap$(v, {
|
|
39
|
+
pazeMobileSessionCreateRequest: "PazeMobileSessionCreateRequest",
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export function createPazeMobileSessionRequestToJSON(
|
|
44
|
+
createPazeMobileSessionRequest: CreatePazeMobileSessionRequest,
|
|
45
|
+
): string {
|
|
46
|
+
return JSON.stringify(
|
|
47
|
+
CreatePazeMobileSessionRequest$outboundSchema.parse(
|
|
48
|
+
createPazeMobileSessionRequest,
|
|
49
|
+
),
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -24,6 +24,7 @@ export * from "./createpaymentservicedefinitionsession.js";
|
|
|
24
24
|
export * from "./createpaymentservicesession.js";
|
|
25
25
|
export * from "./createpayout.js";
|
|
26
26
|
export * from "./createpazedigitalwalletsession.js";
|
|
27
|
+
export * from "./createpazemobilesession.js";
|
|
27
28
|
export * from "./createreportexecutionurl.js";
|
|
28
29
|
export * from "./createthreedsconfiguration.js";
|
|
29
30
|
export * from "./createthreedsscenario.js";
|
|
@@ -89,6 +90,7 @@ export * from "./listtransactions.js";
|
|
|
89
90
|
export * from "./listtransactionsettlements.js";
|
|
90
91
|
export * from "./registerdigitalwalletdomain.js";
|
|
91
92
|
export * from "./resumepaymentmethodnetworktoken.js";
|
|
93
|
+
export * from "./reviewpazemobilesession.js";
|
|
92
94
|
export * from "./suspendpaymentmethodnetworktoken.js";
|
|
93
95
|
export * from "./synctransaction.js";
|
|
94
96
|
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,8 @@ 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 { digitalWalletsSessionsPazeMobileSessionCreate } from "../funcs/digitalWalletsSessionsPazeMobileSessionCreate.js";
|
|
10
|
+
import { digitalWalletsSessionsPazeMobileSessionReview } from "../funcs/digitalWalletsSessionsPazeMobileSessionReview.js";
|
|
9
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
12
|
import * as components from "../models/components/index.js";
|
|
11
13
|
import * as operations from "../models/operations/index.js";
|
|
@@ -50,6 +52,25 @@ export class Sessions extends ClientSDK {
|
|
|
50
52
|
));
|
|
51
53
|
}
|
|
52
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Create a Paze mobile session
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* Create a mobile session for use with Paze.
|
|
60
|
+
*/
|
|
61
|
+
async pazeMobileSessionCreate(
|
|
62
|
+
pazeMobileSessionCreateRequest: components.PazeMobileSessionCreateRequest,
|
|
63
|
+
merchantAccountId?: string | null | undefined,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<components.PazeMobileSessionCreate> {
|
|
66
|
+
return unwrapAsync(digitalWalletsSessionsPazeMobileSessionCreate(
|
|
67
|
+
this,
|
|
68
|
+
pazeMobileSessionCreateRequest,
|
|
69
|
+
merchantAccountId,
|
|
70
|
+
options,
|
|
71
|
+
));
|
|
72
|
+
}
|
|
73
|
+
|
|
53
74
|
/**
|
|
54
75
|
* Create a Paze session
|
|
55
76
|
*
|
|
@@ -71,6 +92,25 @@ export class Sessions extends ClientSDK {
|
|
|
71
92
|
));
|
|
72
93
|
}
|
|
73
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Review a Paze session
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* Review a Paze checkout session and retrieve the selected card, consumer, and shipping address details.
|
|
100
|
+
*/
|
|
101
|
+
async pazeMobileSessionReview(
|
|
102
|
+
pazeSessionReviewRequest: components.PazeSessionReviewRequest,
|
|
103
|
+
merchantAccountId?: string | null | undefined,
|
|
104
|
+
options?: RequestOptions,
|
|
105
|
+
): Promise<components.PazeSessionReview> {
|
|
106
|
+
return unwrapAsync(digitalWalletsSessionsPazeMobileSessionReview(
|
|
107
|
+
this,
|
|
108
|
+
pazeSessionReviewRequest,
|
|
109
|
+
merchantAccountId,
|
|
110
|
+
options,
|
|
111
|
+
));
|
|
112
|
+
}
|
|
113
|
+
|
|
74
114
|
/**
|
|
75
115
|
* Create a Click to Pay session
|
|
76
116
|
*
|
package/src/types/async.ts
CHANGED
|
@@ -21,16 +21,17 @@ export type APICall =
|
|
|
21
21
|
|
|
22
22
|
export class APIPromise<T> implements Promise<T> {
|
|
23
23
|
readonly #promise: Promise<[T, APICall]>;
|
|
24
|
-
|
|
24
|
+
#unwrapped: Promise<T> | null;
|
|
25
25
|
|
|
26
26
|
readonly [Symbol.toStringTag] = "APIPromise";
|
|
27
27
|
|
|
28
28
|
constructor(p: [T, APICall] | Promise<[T, APICall]>) {
|
|
29
29
|
this.#promise = p instanceof Promise ? p : Promise.resolve(p);
|
|
30
|
-
this.#unwrapped =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
this.#unwrapped = p instanceof Promise ? null : Promise.resolve(p[0]);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#getUnwrapped(): Promise<T> {
|
|
34
|
+
return (this.#unwrapped ??= this.#promise.then(([value]) => value));
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
then<TResult1 = T, TResult2 = never>(
|
|
@@ -55,11 +56,11 @@ export class APIPromise<T> implements Promise<T> {
|
|
|
55
56
|
| null
|
|
56
57
|
| undefined,
|
|
57
58
|
): Promise<T | TResult> {
|
|
58
|
-
return this.#
|
|
59
|
+
return this.#getUnwrapped().catch(onrejected);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
finally(onfinally?: (() => void) | null | undefined): Promise<T> {
|
|
62
|
-
return this.#
|
|
63
|
+
return this.#getUnwrapped().finally(onfinally);
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
$inspect(): Promise<[T, APICall]> {
|
package/types/async.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GACf;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB,GACD;IACE,MAAM,EAAE,eAAe,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GACD;IACE,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEN,qBAAa,UAAU,CAAC,CAAC,CAAE,YAAW,OAAO,CAAC,CAAC,CAAC;;IAI9C,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,gBAAgB;gBAEjC,CAAC,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":"AAIA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AAG,OAAO,CAAC,CAAC,CAAC;IAIhE,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;CAGlC"}
|
package/types/async.js
CHANGED
|
@@ -13,32 +13,33 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
13
13
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14
14
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15
15
|
};
|
|
16
|
-
var _APIPromise_promise, _APIPromise_unwrapped, _a;
|
|
16
|
+
var _APIPromise_instances, _APIPromise_promise, _APIPromise_unwrapped, _APIPromise_getUnwrapped, _a;
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.APIPromise = void 0;
|
|
19
19
|
class APIPromise {
|
|
20
20
|
constructor(p) {
|
|
21
|
+
_APIPromise_instances.add(this);
|
|
21
22
|
_APIPromise_promise.set(this, void 0);
|
|
22
23
|
_APIPromise_unwrapped.set(this, void 0);
|
|
23
24
|
this[_a] = "APIPromise";
|
|
24
25
|
__classPrivateFieldSet(this, _APIPromise_promise, p instanceof Promise ? p : Promise.resolve(p), "f");
|
|
25
|
-
__classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise
|
|
26
|
-
? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value)
|
|
27
|
-
: Promise.resolve(p[0]), "f");
|
|
26
|
+
__classPrivateFieldSet(this, _APIPromise_unwrapped, p instanceof Promise ? null : Promise.resolve(p[0]), "f");
|
|
28
27
|
}
|
|
29
28
|
then(onfulfilled, onrejected) {
|
|
30
29
|
return __classPrivateFieldGet(this, _APIPromise_promise, "f").then(onfulfilled ? ([value]) => onfulfilled(value) : void 0, onrejected);
|
|
31
30
|
}
|
|
32
31
|
catch(onrejected) {
|
|
33
|
-
return __classPrivateFieldGet(this,
|
|
32
|
+
return __classPrivateFieldGet(this, _APIPromise_instances, "m", _APIPromise_getUnwrapped).call(this).catch(onrejected);
|
|
34
33
|
}
|
|
35
34
|
finally(onfinally) {
|
|
36
|
-
return __classPrivateFieldGet(this,
|
|
35
|
+
return __classPrivateFieldGet(this, _APIPromise_instances, "m", _APIPromise_getUnwrapped).call(this).finally(onfinally);
|
|
37
36
|
}
|
|
38
37
|
$inspect() {
|
|
39
38
|
return __classPrivateFieldGet(this, _APIPromise_promise, "f");
|
|
40
39
|
}
|
|
41
40
|
}
|
|
42
41
|
exports.APIPromise = APIPromise;
|
|
43
|
-
_APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _a = Symbol.toStringTag
|
|
42
|
+
_APIPromise_promise = new WeakMap(), _APIPromise_unwrapped = new WeakMap(), _APIPromise_instances = new WeakSet(), _a = Symbol.toStringTag, _APIPromise_getUnwrapped = function _APIPromise_getUnwrapped() {
|
|
43
|
+
return (__classPrivateFieldSet(this, _APIPromise_unwrapped, __classPrivateFieldGet(this, _APIPromise_unwrapped, "f") ?? __classPrivateFieldGet(this, _APIPromise_promise, "f").then(([value]) => value), "f"));
|
|
44
|
+
};
|
|
44
45
|
//# sourceMappingURL=async.js.map
|
package/types/async.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async.js","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;AAmBH,MAAa,UAAU;IAMrB,YAAY,CAAuC
|
|
1
|
+
{"version":3,"file":"async.js","sourceRoot":"","sources":["../src/types/async.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;AAmBH,MAAa,UAAU;IAMrB,YAAY,CAAuC;;QAL1C,sCAAgC;QACzC,wCAA8B;QAErB,QAAoB,GAAG,YAAY,CAAC;QAG3C,uBAAA,IAAI,uBAAY,CAAC,YAAY,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,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