ce-storefront 0.3.1 → 0.3.3
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/orders/README.md +15 -3
- package/esm/funcs/ordersRetryPayment.d.ts +1 -1
- package/esm/funcs/ordersRetryPayment.js +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/components/juspaypaymentgatewayparams.d.ts +2 -2
- package/esm/models/components/juspaypaymentgatewayparams.d.ts.map +1 -1
- package/esm/models/components/juspaypaymentgatewayparams.js +2 -2
- package/esm/models/components/juspaypaymentgatewayparams.js.map +1 -1
- package/esm/models/components/juspaypaymentinfo.d.ts +33 -0
- package/esm/models/components/juspaypaymentinfo.d.ts.map +1 -1
- package/esm/models/components/juspaypaymentinfo.js +8 -0
- package/esm/models/components/juspaypaymentinfo.js.map +1 -1
- package/esm/models/components/payupaymentinfo.d.ts +46 -3
- package/esm/models/components/payupaymentinfo.d.ts.map +1 -1
- package/esm/models/components/payupaymentinfo.js +7 -1
- package/esm/models/components/payupaymentinfo.js.map +1 -1
- package/esm/models/operations/postorder.d.ts +2 -8
- package/esm/models/operations/postorder.d.ts.map +1 -1
- package/esm/models/operations/postretrypaymentorderid.d.ts +53 -140
- package/esm/models/operations/postretrypaymentorderid.d.ts.map +1 -1
- package/esm/models/operations/postretrypaymentorderid.js +83 -134
- package/esm/models/operations/postretrypaymentorderid.js.map +1 -1
- package/esm/sdk/orders.d.ts +1 -1
- package/esm/sdk/orders.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/ordersRetryPayment.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/juspaypaymentgatewayparams.ts +4 -4
- package/src/models/components/juspaypaymentinfo.ts +33 -0
- package/src/models/components/payupaymentinfo.ts +46 -3
- package/src/models/operations/postretrypaymentorderid.ts +179 -226
- package/src/sdk/orders.ts +1 -1
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ import { Result } from "../types/fp.js";
|
|
|
27
27
|
* Retry payment
|
|
28
28
|
*
|
|
29
29
|
* @remarks
|
|
30
|
-
*
|
|
30
|
+
* To generate new payment request if first payment request is failed or expired. Retry payment request can be made after 15 mins of last request or immediately after last payment request is marked as failed.
|
|
31
31
|
*/
|
|
32
32
|
export async function ordersRetryPayment(
|
|
33
33
|
client: CeStorefrontCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -74,7 +74,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
74
74
|
export const SDK_METADATA = {
|
|
75
75
|
language: "typescript",
|
|
76
76
|
openapiDocVersion: "1.0",
|
|
77
|
-
sdkVersion: "0.3.
|
|
77
|
+
sdkVersion: "0.3.3",
|
|
78
78
|
genVersion: "2.493.34",
|
|
79
|
-
userAgent: "speakeasy-sdk/typescript 0.3.
|
|
79
|
+
userAgent: "speakeasy-sdk/typescript 0.3.3 2.493.34 1.0 ce-storefront",
|
|
80
80
|
} as const;
|
|
@@ -22,7 +22,7 @@ export const IntegrationType = {
|
|
|
22
22
|
export type IntegrationType = ClosedEnum<typeof IntegrationType>;
|
|
23
23
|
|
|
24
24
|
export type JuspayPaymentGatewayParams = {
|
|
25
|
-
paymentGateway?: "
|
|
25
|
+
paymentGateway?: "JUSPAY" | undefined;
|
|
26
26
|
action: Action;
|
|
27
27
|
integrationType: IntegrationType;
|
|
28
28
|
returnUrl: string;
|
|
@@ -75,7 +75,7 @@ export const JuspayPaymentGatewayParams$inboundSchema: z.ZodType<
|
|
|
75
75
|
z.ZodTypeDef,
|
|
76
76
|
unknown
|
|
77
77
|
> = z.object({
|
|
78
|
-
payment_gateway: z.literal("
|
|
78
|
+
payment_gateway: z.literal("JUSPAY").optional(),
|
|
79
79
|
action: Action$inboundSchema,
|
|
80
80
|
integration_type: IntegrationType$inboundSchema,
|
|
81
81
|
return_url: z.string(),
|
|
@@ -91,7 +91,7 @@ export const JuspayPaymentGatewayParams$inboundSchema: z.ZodType<
|
|
|
91
91
|
|
|
92
92
|
/** @internal */
|
|
93
93
|
export type JuspayPaymentGatewayParams$Outbound = {
|
|
94
|
-
payment_gateway: "
|
|
94
|
+
payment_gateway: "JUSPAY";
|
|
95
95
|
action: string;
|
|
96
96
|
integration_type: string;
|
|
97
97
|
return_url: string;
|
|
@@ -104,7 +104,7 @@ export const JuspayPaymentGatewayParams$outboundSchema: z.ZodType<
|
|
|
104
104
|
z.ZodTypeDef,
|
|
105
105
|
JuspayPaymentGatewayParams
|
|
106
106
|
> = z.object({
|
|
107
|
-
paymentGateway: z.literal("
|
|
107
|
+
paymentGateway: z.literal("JUSPAY").default("JUSPAY" as const),
|
|
108
108
|
action: Action$outboundSchema,
|
|
109
109
|
integrationType: IntegrationType$outboundSchema,
|
|
110
110
|
returnUrl: z.string(),
|
|
@@ -13,14 +13,30 @@ export type PaymentLinks = {
|
|
|
13
13
|
web?: string | undefined;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Use for taking consent of subscription payments. If this key is used it will ask user to give consent for subscription payment.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
*/
|
|
16
21
|
export const OptionsCreateMandate = {
|
|
17
22
|
Required: "REQUIRED",
|
|
18
23
|
} as const;
|
|
24
|
+
/**
|
|
25
|
+
* Use for taking consent of subscription payments. If this key is used it will ask user to give consent for subscription payment.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
*/
|
|
19
29
|
export type OptionsCreateMandate = ClosedEnum<typeof OptionsCreateMandate>;
|
|
20
30
|
|
|
31
|
+
/**
|
|
32
|
+
* subscription frequency
|
|
33
|
+
*/
|
|
21
34
|
export const MandateFrequency = {
|
|
22
35
|
Monthly: "MONTHLY",
|
|
23
36
|
} as const;
|
|
37
|
+
/**
|
|
38
|
+
* subscription frequency
|
|
39
|
+
*/
|
|
24
40
|
export type MandateFrequency = ClosedEnum<typeof MandateFrequency>;
|
|
25
41
|
|
|
26
42
|
/**
|
|
@@ -69,10 +85,27 @@ export type Payload = {
|
|
|
69
85
|
customerEmail?: string | undefined;
|
|
70
86
|
currency?: string | undefined;
|
|
71
87
|
description?: string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Use for taking consent of subscription payments. If this key is used it will ask user to give consent for subscription payment.
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
*/
|
|
72
93
|
optionsCreateMandate?: OptionsCreateMandate | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Maximum amount that can be charged in recurring payment.
|
|
96
|
+
*/
|
|
73
97
|
mandateMaxAmount?: string | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* subscription start time
|
|
100
|
+
*/
|
|
74
101
|
mandateStartDate?: string | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* subscription end time
|
|
104
|
+
*/
|
|
75
105
|
mandateEndDate?: string | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* subscription frequency
|
|
108
|
+
*/
|
|
76
109
|
mandateFrequency?: MandateFrequency | undefined;
|
|
77
110
|
/**
|
|
78
111
|
* When frequency is passed as WEEKLY, FORTNIGHTLY, MONTHLY, BIMONTHLY, QUARTERLY, HALFYEARLY, or YEARLY then is it required that the exact day of the period should be passed.
|
|
@@ -11,13 +11,19 @@ import { RFCDate } from "../../types/rfcdate.js";
|
|
|
11
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* To be used in case we want to take consent for subscription payment.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* To create consent for subscription, value of this parameter must be 1.
|
|
15
18
|
*/
|
|
16
19
|
export const Si = {
|
|
17
20
|
One: "1",
|
|
18
21
|
} as const;
|
|
19
22
|
/**
|
|
20
|
-
*
|
|
23
|
+
* To be used in case we want to take consent for subscription payment.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* To create consent for subscription, value of this parameter must be 1.
|
|
21
27
|
*/
|
|
22
28
|
export type Si = ClosedEnum<typeof Si>;
|
|
23
29
|
|
|
@@ -26,17 +32,48 @@ export const BillingCurrency = {
|
|
|
26
32
|
} as const;
|
|
27
33
|
export type BillingCurrency = ClosedEnum<typeof BillingCurrency>;
|
|
28
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Subscription frequency.
|
|
37
|
+
*/
|
|
29
38
|
export const BillingCycle = {
|
|
30
39
|
Monthly: "MONTHLY",
|
|
31
40
|
} as const;
|
|
41
|
+
/**
|
|
42
|
+
* Subscription frequency.
|
|
43
|
+
*/
|
|
32
44
|
export type BillingCycle = ClosedEnum<typeof BillingCycle>;
|
|
33
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Send this json object for creating subscription consent.
|
|
48
|
+
*/
|
|
34
49
|
export type SiDetails = {
|
|
50
|
+
/**
|
|
51
|
+
* Maximum amount that can be charged in recurring payment.
|
|
52
|
+
*/
|
|
35
53
|
billingAmount?: number | undefined;
|
|
36
54
|
billingCurrency?: BillingCurrency | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Subscription frequency.
|
|
57
|
+
*/
|
|
37
58
|
billingCycle?: BillingCycle | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Billing Interval is closely coupled with the billingCycle field and denotes at what frequency, the subscription plan needs to be executed. For monthly subscriptions, parameter values need to be sent in the request are:
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
* billingCycle = MONTHLY
|
|
64
|
+
* billingInterval = 1
|
|
65
|
+
* Similarly, by keeping the following values, customer will be charged once in every 3 days:
|
|
66
|
+
* billingCycle = DAILY
|
|
67
|
+
* billingInterval = 3
|
|
68
|
+
*/
|
|
38
69
|
billingInterval?: number | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* subscription start date
|
|
72
|
+
*/
|
|
39
73
|
paymentStartDate?: RFCDate | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* subscription end date
|
|
76
|
+
*/
|
|
40
77
|
paymentEndDate?: RFCDate | undefined;
|
|
41
78
|
};
|
|
42
79
|
|
|
@@ -51,9 +88,15 @@ export type PayuPaymentInfo = {
|
|
|
51
88
|
email?: string | undefined;
|
|
52
89
|
phone?: string | undefined;
|
|
53
90
|
/**
|
|
54
|
-
*
|
|
91
|
+
* To be used in case we want to take consent for subscription payment.
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
* To create consent for subscription, value of this parameter must be 1.
|
|
55
95
|
*/
|
|
56
96
|
si?: Si | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Send this json object for creating subscription consent.
|
|
99
|
+
*/
|
|
57
100
|
siDetails?: SiDetails | undefined;
|
|
58
101
|
/**
|
|
59
102
|
* return url in case of payment failure.
|