ce-storefront 0.18.1 → 0.18.2
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 +0 -16
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/components/index.d.ts +8 -1
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +8 -1
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/juspaycard.d.ts +86 -0
- package/esm/models/components/juspaycard.d.ts.map +1 -0
- package/esm/models/components/juspaycard.js +114 -0
- package/esm/models/components/juspaycard.js.map +1 -0
- package/esm/models/components/juspayexpresscheckout.d.ts +33 -0
- package/esm/models/components/juspayexpresscheckout.d.ts.map +1 -0
- package/esm/models/components/juspayexpresscheckout.js +44 -0
- package/esm/models/components/juspayexpresscheckout.js.map +1 -0
- package/esm/models/components/juspayhypercheckout.d.ts +63 -0
- package/esm/models/components/juspayhypercheckout.d.ts.map +1 -0
- package/esm/models/components/juspayhypercheckout.js +74 -0
- package/esm/models/components/juspayhypercheckout.js.map +1 -0
- package/esm/models/components/juspaynetbanking.d.ts +44 -0
- package/esm/models/components/juspaynetbanking.d.ts.map +1 -0
- package/esm/models/components/juspaynetbanking.js +65 -0
- package/esm/models/components/juspaynetbanking.js.map +1 -0
- package/esm/models/components/juspaypaymentgatewayparams.d.ts +8 -8
- package/esm/models/components/juspaypaymentgatewayparams.d.ts.map +1 -1
- package/esm/models/components/juspaypaymentgatewayparams.js +12 -13
- package/esm/models/components/juspaypaymentgatewayparams.js.map +1 -1
- package/esm/models/components/juspaysavedcardtoken.d.ts +80 -0
- package/esm/models/components/juspaysavedcardtoken.d.ts.map +1 -0
- package/esm/models/components/juspaysavedcardtoken.js +102 -0
- package/esm/models/components/juspaysavedcardtoken.js.map +1 -0
- package/esm/models/components/juspayupicollect.d.ts +46 -0
- package/esm/models/components/juspayupicollect.d.ts.map +1 -0
- package/esm/models/components/juspayupicollect.js +69 -0
- package/esm/models/components/juspayupicollect.js.map +1 -0
- package/esm/models/components/juspayupiintent.d.ts +48 -0
- package/esm/models/components/juspayupiintent.d.ts.map +1 -0
- package/esm/models/components/juspayupiintent.js +73 -0
- package/esm/models/components/juspayupiintent.js.map +1 -0
- package/esm/models/components/paymentmethodpayload.d.ts +30 -0
- package/esm/models/components/paymentmethodpayload.d.ts.map +1 -0
- package/esm/models/components/paymentmethodpayload.js +35 -0
- package/esm/models/components/paymentmethodpayload.js.map +1 -0
- package/esm/models/operations/createorder.d.ts +2 -4
- package/esm/models/operations/createorder.d.ts.map +1 -1
- package/esm/models/operations/createorder.js +4 -8
- package/esm/models/operations/createorder.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +8 -1
- package/src/models/components/juspaycard.ts +185 -0
- package/src/models/components/juspayexpresscheckout.ts +113 -0
- package/src/models/components/juspayhypercheckout.ts +126 -0
- package/src/models/components/juspaynetbanking.ts +115 -0
- package/src/models/components/juspaypaymentgatewayparams.ts +18 -14
- package/src/models/components/juspaysavedcardtoken.ts +174 -0
- package/src/models/components/juspayupicollect.ts +121 -0
- package/src/models/components/juspayupiintent.ts +125 -0
- package/src/models/components/paymentmethodpayload.ts +81 -0
- package/src/models/operations/createorder.ts +6 -12
- package/esm/models/components/paymentgateway.d.ts +0 -34
- package/esm/models/components/paymentgateway.d.ts.map +0 -1
- package/esm/models/components/paymentgateway.js +0 -27
- package/esm/models/components/paymentgateway.js.map +0 -1
- package/src/models/components/paymentgateway.ts +0 -39
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const JuspayUpiIntent$inboundSchema = z.object({
|
|
9
|
+
payment_method_slug: z.string(),
|
|
10
|
+
integration_type: z.literal("express-checkout").default("express-checkout")
|
|
11
|
+
.optional(),
|
|
12
|
+
gateway_reference_id: z.string(),
|
|
13
|
+
return_url: z.string().optional(),
|
|
14
|
+
redirect_after_payment: z.boolean(),
|
|
15
|
+
payment_method_type: z.literal("UPI").default("UPI").optional(),
|
|
16
|
+
payment_method: z.literal("UPI_PAY").default("UPI_PAY").optional(),
|
|
17
|
+
sdk_params: z.boolean(),
|
|
18
|
+
upi_app: z.string(),
|
|
19
|
+
}).transform((v) => {
|
|
20
|
+
return remap$(v, {
|
|
21
|
+
"payment_method_slug": "paymentMethodSlug",
|
|
22
|
+
"integration_type": "integrationType",
|
|
23
|
+
"gateway_reference_id": "gatewayReferenceId",
|
|
24
|
+
"return_url": "returnUrl",
|
|
25
|
+
"redirect_after_payment": "redirectAfterPayment",
|
|
26
|
+
"payment_method_type": "paymentMethodType",
|
|
27
|
+
"payment_method": "paymentMethod",
|
|
28
|
+
"sdk_params": "sdkParams",
|
|
29
|
+
"upi_app": "upiApp",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const JuspayUpiIntent$outboundSchema = z.object({
|
|
34
|
+
paymentMethodSlug: z.string(),
|
|
35
|
+
integrationType: z.literal("express-checkout"),
|
|
36
|
+
gatewayReferenceId: z.string(),
|
|
37
|
+
returnUrl: z.string().optional(),
|
|
38
|
+
redirectAfterPayment: z.boolean(),
|
|
39
|
+
paymentMethodType: z.literal("UPI"),
|
|
40
|
+
paymentMethod: z.literal("UPI_PAY"),
|
|
41
|
+
sdkParams: z.boolean(),
|
|
42
|
+
upiApp: z.string(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
paymentMethodSlug: "payment_method_slug",
|
|
46
|
+
integrationType: "integration_type",
|
|
47
|
+
gatewayReferenceId: "gateway_reference_id",
|
|
48
|
+
returnUrl: "return_url",
|
|
49
|
+
redirectAfterPayment: "redirect_after_payment",
|
|
50
|
+
paymentMethodType: "payment_method_type",
|
|
51
|
+
paymentMethod: "payment_method",
|
|
52
|
+
sdkParams: "sdk_params",
|
|
53
|
+
upiApp: "upi_app",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* @internal
|
|
58
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
59
|
+
*/
|
|
60
|
+
export var JuspayUpiIntent$;
|
|
61
|
+
(function (JuspayUpiIntent$) {
|
|
62
|
+
/** @deprecated use `JuspayUpiIntent$inboundSchema` instead. */
|
|
63
|
+
JuspayUpiIntent$.inboundSchema = JuspayUpiIntent$inboundSchema;
|
|
64
|
+
/** @deprecated use `JuspayUpiIntent$outboundSchema` instead. */
|
|
65
|
+
JuspayUpiIntent$.outboundSchema = JuspayUpiIntent$outboundSchema;
|
|
66
|
+
})(JuspayUpiIntent$ || (JuspayUpiIntent$ = {}));
|
|
67
|
+
export function juspayUpiIntentToJSON(juspayUpiIntent) {
|
|
68
|
+
return JSON.stringify(JuspayUpiIntent$outboundSchema.parse(juspayUpiIntent));
|
|
69
|
+
}
|
|
70
|
+
export function juspayUpiIntentFromJSON(jsonString) {
|
|
71
|
+
return safeParse(jsonString, (x) => JuspayUpiIntent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JuspayUpiIntent' from JSON`);
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=juspayupiintent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"juspayupiintent.js","sourceRoot":"","sources":["../../../src/models/components/juspayupiintent.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE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C,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzD,6CAA6C,CAC9C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as z from "zod/v3";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
import { JusPayExpressCheckout, JusPayExpressCheckout$Outbound } from "./juspayexpresscheckout.js";
|
|
5
|
+
import { JusPayHyperCheckout, JusPayHyperCheckout$Outbound } from "./juspayhypercheckout.js";
|
|
6
|
+
/**
|
|
7
|
+
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/PaymentMethodPayload} - API reference for the PaymentMethodPayload schema
|
|
8
|
+
*/
|
|
9
|
+
export type PaymentMethodPayload = JusPayHyperCheckout | JusPayExpressCheckout;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const PaymentMethodPayload$inboundSchema: z.ZodType<PaymentMethodPayload, z.ZodTypeDef, unknown>;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type PaymentMethodPayload$Outbound = JusPayHyperCheckout$Outbound | JusPayExpressCheckout$Outbound;
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const PaymentMethodPayload$outboundSchema: z.ZodType<PaymentMethodPayload$Outbound, z.ZodTypeDef, PaymentMethodPayload>;
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
19
|
+
*/
|
|
20
|
+
export declare namespace PaymentMethodPayload$ {
|
|
21
|
+
/** @deprecated use `PaymentMethodPayload$inboundSchema` instead. */
|
|
22
|
+
const inboundSchema: z.ZodType<PaymentMethodPayload, z.ZodTypeDef, unknown>;
|
|
23
|
+
/** @deprecated use `PaymentMethodPayload$outboundSchema` instead. */
|
|
24
|
+
const outboundSchema: z.ZodType<PaymentMethodPayload$Outbound, z.ZodTypeDef, PaymentMethodPayload>;
|
|
25
|
+
/** @deprecated use `PaymentMethodPayload$Outbound` instead. */
|
|
26
|
+
type Outbound = PaymentMethodPayload$Outbound;
|
|
27
|
+
}
|
|
28
|
+
export declare function paymentMethodPayloadToJSON(paymentMethodPayload: PaymentMethodPayload): string;
|
|
29
|
+
export declare function paymentMethodPayloadFromJSON(jsonString: string): SafeParseResult<PaymentMethodPayload, SDKValidationError>;
|
|
30
|
+
//# sourceMappingURL=paymentmethodpayload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymentmethodpayload.d.ts","sourceRoot":"","sources":["../../../src/models/components/paymentmethodpayload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,qBAAqB,EAErB,8BAA8B,EAE/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,mBAAmB,EAEnB,4BAA4B,EAE7B,MAAM,0BAA0B,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG,qBAAqB,CAAC;AAE/E,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,oBAAoB,EACpB,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,6BAA6B,GACrC,4BAA4B,GAC5B,8BAA8B,CAAC;AAEnC,gBAAgB;AAChB,eAAO,MAAM,mCAAmC,EAAE,CAAC,CAAC,OAAO,CACzD,6BAA6B,EAC7B,CAAC,CAAC,UAAU,EACZ,oBAAoB,CAIpB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,qBAAqB,CAAC;IACrC,oEAAoE;IAC7D,MAAM,aAAa,wDAAqC,CAAC;IAChE,qEAAqE;IAC9D,MAAM,cAAc,8EAAsC,CAAC;IAClE,+DAA+D;IAC/D,KAAY,QAAQ,GAAG,6BAA6B,CAAC;CACtD;AAED,wBAAgB,0BAA0B,CACxC,oBAAoB,EAAE,oBAAoB,GACzC,MAAM,CAIR;AAED,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAM3D"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v3";
|
|
5
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
+
import { JusPayExpressCheckout$inboundSchema, JusPayExpressCheckout$outboundSchema, } from "./juspayexpresscheckout.js";
|
|
7
|
+
import { JusPayHyperCheckout$inboundSchema, JusPayHyperCheckout$outboundSchema, } from "./juspayhypercheckout.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const PaymentMethodPayload$inboundSchema = z.union([
|
|
10
|
+
JusPayHyperCheckout$inboundSchema,
|
|
11
|
+
JusPayExpressCheckout$inboundSchema,
|
|
12
|
+
]);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const PaymentMethodPayload$outboundSchema = z.union([
|
|
15
|
+
JusPayHyperCheckout$outboundSchema,
|
|
16
|
+
JusPayExpressCheckout$outboundSchema,
|
|
17
|
+
]);
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
+
*/
|
|
22
|
+
export var PaymentMethodPayload$;
|
|
23
|
+
(function (PaymentMethodPayload$) {
|
|
24
|
+
/** @deprecated use `PaymentMethodPayload$inboundSchema` instead. */
|
|
25
|
+
PaymentMethodPayload$.inboundSchema = PaymentMethodPayload$inboundSchema;
|
|
26
|
+
/** @deprecated use `PaymentMethodPayload$outboundSchema` instead. */
|
|
27
|
+
PaymentMethodPayload$.outboundSchema = PaymentMethodPayload$outboundSchema;
|
|
28
|
+
})(PaymentMethodPayload$ || (PaymentMethodPayload$ = {}));
|
|
29
|
+
export function paymentMethodPayloadToJSON(paymentMethodPayload) {
|
|
30
|
+
return JSON.stringify(PaymentMethodPayload$outboundSchema.parse(paymentMethodPayload));
|
|
31
|
+
}
|
|
32
|
+
export function paymentMethodPayloadFromJSON(jsonString) {
|
|
33
|
+
return safeParse(jsonString, (x) => PaymentMethodPayload$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PaymentMethodPayload' from JSON`);
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=paymentmethodpayload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paymentmethodpayload.js","sourceRoot":"","sources":["../../../src/models/components/paymentmethodpayload.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAEL,mCAAmC,EAEnC,oCAAoC,GACrC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,iCAAiC,EAEjC,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAOlC,gBAAgB;AAChB,MAAM,CAAC,MAAM,kCAAkC,GAI3C,CAAC,CAAC,KAAK,CAAC;IACV,iCAAiC;IACjC,mCAAmC;CACpC,CAAC,CAAC;AAOH,gBAAgB;AAChB,MAAM,CAAC,MAAM,mCAAmC,GAI5C,CAAC,CAAC,KAAK,CAAC;IACV,kCAAkC;IAClC,oCAAoC;CACrC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,qBAAqB,CAOrC;AAPD,WAAiB,qBAAqB;IACpC,oEAAoE;IACvD,mCAAa,GAAG,kCAAkC,CAAC;IAChE,qEAAqE;IACxD,oCAAc,GAAG,mCAAmC,CAAC;AAGpE,CAAC,EAPgB,qBAAqB,KAArB,qBAAqB,QAOrC;AAED,MAAM,UAAU,0BAA0B,CACxC,oBAA0C;IAE1C,OAAO,IAAI,CAAC,SAAS,CACnB,mCAAmC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAChE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,kCAAkC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC9D,kDAAkD,CACnD,CAAC;AACJ,CAAC"}
|
|
@@ -7,8 +7,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
7
7
|
*/
|
|
8
8
|
export type CreateOrderRequestBody = {
|
|
9
9
|
cartId: string;
|
|
10
|
-
|
|
11
|
-
paymentGatewayParams: components.PaymentGatewayParams;
|
|
10
|
+
paymentMethod?: components.PaymentMethodPayload | undefined;
|
|
12
11
|
};
|
|
13
12
|
export type PaymentInfo = components.PayuPaymentInfo | components.JuspayPaymentInfo;
|
|
14
13
|
export type CreateOrderContent = {
|
|
@@ -29,8 +28,7 @@ export declare const CreateOrderRequestBody$inboundSchema: z.ZodType<CreateOrder
|
|
|
29
28
|
/** @internal */
|
|
30
29
|
export type CreateOrderRequestBody$Outbound = {
|
|
31
30
|
cart_id: string;
|
|
32
|
-
|
|
33
|
-
payment_gateway_params: components.PaymentGatewayParams$Outbound;
|
|
31
|
+
payment_method?: components.PaymentMethodPayload$Outbound | undefined;
|
|
34
32
|
};
|
|
35
33
|
/** @internal */
|
|
36
34
|
export declare const CreateOrderRequestBody$outboundSchema: z.ZodType<CreateOrderRequestBody$Outbound, z.ZodTypeDef, CreateOrderRequestBody>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createorder.d.ts","sourceRoot":"","sources":["../../../src/models/operations/createorder.ts"],"names":[],"mappings":"AAIA,OAAO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;IACjB,OAAO,EAAE,2BAA2B,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,gCAAgC,EAChC,CAAC,CAAC,UAAU,EACZ,uBAAuB,CAKvB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,wBAAwB,CAAC;IACxC,uEAAuE;IAChE,MAAM,aAAa,2DAAwC,CAAC;IACnE,wEAAwE;IACjE,MAAM,cAAc,oFAAyC,CAAC;IACrE,kEAAkE;IAClE,KAAY,QAAQ,GAAG,gCAAgC,CAAC;CACzD;AAED,wBAAgB,6BAA6B,CAC3C,uBAAuB,EAAE,uBAAuB,GAC/C,MAAM,CAIR;AAED,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAM9D"}
|
|
@@ -8,25 +8,21 @@ import * as components from "../components/index.js";
|
|
|
8
8
|
/** @internal */
|
|
9
9
|
export const CreateOrderRequestBody$inboundSchema = z.object({
|
|
10
10
|
cart_id: z.string(),
|
|
11
|
-
|
|
12
|
-
payment_gateway_params: components.PaymentGatewayParams$inboundSchema,
|
|
11
|
+
payment_method: components.PaymentMethodPayload$inboundSchema.optional(),
|
|
13
12
|
}).transform((v) => {
|
|
14
13
|
return remap$(v, {
|
|
15
14
|
"cart_id": "cartId",
|
|
16
|
-
"
|
|
17
|
-
"payment_gateway_params": "paymentGatewayParams",
|
|
15
|
+
"payment_method": "paymentMethod",
|
|
18
16
|
});
|
|
19
17
|
});
|
|
20
18
|
/** @internal */
|
|
21
19
|
export const CreateOrderRequestBody$outboundSchema = z.object({
|
|
22
20
|
cartId: z.string(),
|
|
23
|
-
|
|
24
|
-
paymentGatewayParams: components.PaymentGatewayParams$outboundSchema,
|
|
21
|
+
paymentMethod: components.PaymentMethodPayload$outboundSchema.optional(),
|
|
25
22
|
}).transform((v) => {
|
|
26
23
|
return remap$(v, {
|
|
27
24
|
cartId: "cart_id",
|
|
28
|
-
|
|
29
|
-
paymentGatewayParams: "payment_gateway_params",
|
|
25
|
+
paymentMethod: "payment_method",
|
|
30
26
|
});
|
|
31
27
|
});
|
|
32
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createorder.js","sourceRoot":"","sources":["../../../src/models/operations/createorder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"createorder.js","sourceRoot":"","sources":["../../../src/models/operations/createorder.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AA8BrD,gBAAgB;AAChB,MAAM,CAAC,MAAM,oCAAoC,GAI7C,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,cAAc,EAAE,UAAU,CAAC,kCAAkC,CAAC,QAAQ,EAAE;CACzE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,SAAS,EAAE,QAAQ;QACnB,gBAAgB,EAAE,eAAe;KAClC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAQH,gBAAgB;AAChB,MAAM,CAAC,MAAM,qCAAqC,GAI9C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,EAAE,CAAC,CAAC,MAAM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PD,WAAiB,wBAAwB;IACvC,uEAAuE;IAC1D,sCAAa,GAAG,qCAAqC,CAAC;IACnE,wEAAwE;IAC3D,uCAAc,GAAG,sCAAsC,CAAC;AAGvE,CAAC,EAPgB,wBAAwB,KAAxB,wBAAwB,QAOxC;AAED,MAAM,UAAU,6BAA6B,CAC3C,uBAAgD;IAEhD,OAAO,IAAI,CAAC,SAAS,CACnB,sCAAsC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACtE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -80,7 +80,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
80
80
|
export const SDK_METADATA = {
|
|
81
81
|
language: "typescript",
|
|
82
82
|
openapiDocVersion: "1.0",
|
|
83
|
-
sdkVersion: "0.18.
|
|
84
|
-
genVersion: "2.
|
|
85
|
-
userAgent: "speakeasy-sdk/typescript 0.18.
|
|
83
|
+
sdkVersion: "0.18.2",
|
|
84
|
+
genVersion: "2.731.6",
|
|
85
|
+
userAgent: "speakeasy-sdk/typescript 0.18.2 2.731.6 1.0 ce-storefront",
|
|
86
86
|
} as const;
|
|
@@ -37,8 +37,15 @@ export * from "./fulfillmentpreferenceinput.js";
|
|
|
37
37
|
export * from "./generateotpwithemail.js";
|
|
38
38
|
export * from "./generateotpwithphone.js";
|
|
39
39
|
export * from "./item.js";
|
|
40
|
+
export * from "./juspaycard.js";
|
|
41
|
+
export * from "./juspayexpresscheckout.js";
|
|
42
|
+
export * from "./juspayhypercheckout.js";
|
|
43
|
+
export * from "./juspaynetbanking.js";
|
|
40
44
|
export * from "./juspaypaymentgatewayparams.js";
|
|
41
45
|
export * from "./juspaypaymentinfo.js";
|
|
46
|
+
export * from "./juspaysavedcardtoken.js";
|
|
47
|
+
export * from "./juspayupicollect.js";
|
|
48
|
+
export * from "./juspayupiintent.js";
|
|
42
49
|
export * from "./lotbatchdetail.js";
|
|
43
50
|
export * from "./multiselectattribute.js";
|
|
44
51
|
export * from "./netbankingpayment.js";
|
|
@@ -54,8 +61,8 @@ export * from "./ordershipment.js";
|
|
|
54
61
|
export * from "./pagination.js";
|
|
55
62
|
export * from "./partialcollectanddelivery.js";
|
|
56
63
|
export * from "./partialcollectanddeliveryinput.js";
|
|
57
|
-
export * from "./paymentgateway.js";
|
|
58
64
|
export * from "./paymentgatewayparams.js";
|
|
65
|
+
export * from "./paymentmethodpayload.js";
|
|
59
66
|
export * from "./payupaymentgatewayparams.js";
|
|
60
67
|
export * from "./payupaymentinfo.js";
|
|
61
68
|
export * from "./pincode.js";
|
|
@@ -0,0 +1,185 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const PaymentMethod = {
|
|
13
|
+
Visa: "VISA",
|
|
14
|
+
Master: "MASTER",
|
|
15
|
+
} as const;
|
|
16
|
+
export type PaymentMethod = ClosedEnum<typeof PaymentMethod>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/JusPayCard} - API reference for the JusPayCard schema
|
|
20
|
+
*/
|
|
21
|
+
export type JusPayCard = {
|
|
22
|
+
paymentMethodSlug: string;
|
|
23
|
+
integrationType?: "express-checkout" | undefined;
|
|
24
|
+
gatewayReferenceId: string;
|
|
25
|
+
returnUrl?: string | undefined;
|
|
26
|
+
redirectAfterPayment: boolean;
|
|
27
|
+
authType?: "OTP" | undefined;
|
|
28
|
+
tokenize: boolean;
|
|
29
|
+
saveToLocker: boolean;
|
|
30
|
+
paymentMethodType?: "CARD" | undefined;
|
|
31
|
+
paymentMethod: PaymentMethod;
|
|
32
|
+
cardNumber: string;
|
|
33
|
+
cardExpMonth: string;
|
|
34
|
+
cardExpYear: string;
|
|
35
|
+
nameOnCard: string;
|
|
36
|
+
cardSecurityCode: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const PaymentMethod$inboundSchema: z.ZodNativeEnum<
|
|
41
|
+
typeof PaymentMethod
|
|
42
|
+
> = z.nativeEnum(PaymentMethod);
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const PaymentMethod$outboundSchema: z.ZodNativeEnum<
|
|
46
|
+
typeof PaymentMethod
|
|
47
|
+
> = PaymentMethod$inboundSchema;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
+
*/
|
|
53
|
+
export namespace PaymentMethod$ {
|
|
54
|
+
/** @deprecated use `PaymentMethod$inboundSchema` instead. */
|
|
55
|
+
export const inboundSchema = PaymentMethod$inboundSchema;
|
|
56
|
+
/** @deprecated use `PaymentMethod$outboundSchema` instead. */
|
|
57
|
+
export const outboundSchema = PaymentMethod$outboundSchema;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const JusPayCard$inboundSchema: z.ZodType<
|
|
62
|
+
JusPayCard,
|
|
63
|
+
z.ZodTypeDef,
|
|
64
|
+
unknown
|
|
65
|
+
> = z.object({
|
|
66
|
+
payment_method_slug: z.string(),
|
|
67
|
+
integration_type: z.literal("express-checkout").default("express-checkout")
|
|
68
|
+
.optional(),
|
|
69
|
+
gateway_reference_id: z.string(),
|
|
70
|
+
return_url: z.string().optional(),
|
|
71
|
+
redirect_after_payment: z.boolean(),
|
|
72
|
+
auth_type: z.literal("OTP").default("OTP").optional(),
|
|
73
|
+
tokenize: z.boolean(),
|
|
74
|
+
save_to_locker: z.boolean(),
|
|
75
|
+
payment_method_type: z.literal("CARD").default("CARD").optional(),
|
|
76
|
+
payment_method: PaymentMethod$inboundSchema,
|
|
77
|
+
card_number: z.string(),
|
|
78
|
+
card_exp_month: z.string(),
|
|
79
|
+
card_exp_year: z.string(),
|
|
80
|
+
name_on_card: z.string(),
|
|
81
|
+
card_security_code: z.string(),
|
|
82
|
+
}).transform((v) => {
|
|
83
|
+
return remap$(v, {
|
|
84
|
+
"payment_method_slug": "paymentMethodSlug",
|
|
85
|
+
"integration_type": "integrationType",
|
|
86
|
+
"gateway_reference_id": "gatewayReferenceId",
|
|
87
|
+
"return_url": "returnUrl",
|
|
88
|
+
"redirect_after_payment": "redirectAfterPayment",
|
|
89
|
+
"auth_type": "authType",
|
|
90
|
+
"save_to_locker": "saveToLocker",
|
|
91
|
+
"payment_method_type": "paymentMethodType",
|
|
92
|
+
"payment_method": "paymentMethod",
|
|
93
|
+
"card_number": "cardNumber",
|
|
94
|
+
"card_exp_month": "cardExpMonth",
|
|
95
|
+
"card_exp_year": "cardExpYear",
|
|
96
|
+
"name_on_card": "nameOnCard",
|
|
97
|
+
"card_security_code": "cardSecurityCode",
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export type JusPayCard$Outbound = {
|
|
103
|
+
payment_method_slug: string;
|
|
104
|
+
integration_type: "express-checkout";
|
|
105
|
+
gateway_reference_id: string;
|
|
106
|
+
return_url?: string | undefined;
|
|
107
|
+
redirect_after_payment: boolean;
|
|
108
|
+
auth_type: "OTP";
|
|
109
|
+
tokenize: boolean;
|
|
110
|
+
save_to_locker: boolean;
|
|
111
|
+
payment_method_type: "CARD";
|
|
112
|
+
payment_method: string;
|
|
113
|
+
card_number: string;
|
|
114
|
+
card_exp_month: string;
|
|
115
|
+
card_exp_year: string;
|
|
116
|
+
name_on_card: string;
|
|
117
|
+
card_security_code: string;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/** @internal */
|
|
121
|
+
export const JusPayCard$outboundSchema: z.ZodType<
|
|
122
|
+
JusPayCard$Outbound,
|
|
123
|
+
z.ZodTypeDef,
|
|
124
|
+
JusPayCard
|
|
125
|
+
> = z.object({
|
|
126
|
+
paymentMethodSlug: z.string(),
|
|
127
|
+
integrationType: z.literal("express-checkout"),
|
|
128
|
+
gatewayReferenceId: z.string(),
|
|
129
|
+
returnUrl: z.string().optional(),
|
|
130
|
+
redirectAfterPayment: z.boolean(),
|
|
131
|
+
authType: z.literal("OTP"),
|
|
132
|
+
tokenize: z.boolean(),
|
|
133
|
+
saveToLocker: z.boolean(),
|
|
134
|
+
paymentMethodType: z.literal("CARD"),
|
|
135
|
+
paymentMethod: PaymentMethod$outboundSchema,
|
|
136
|
+
cardNumber: z.string(),
|
|
137
|
+
cardExpMonth: z.string(),
|
|
138
|
+
cardExpYear: z.string(),
|
|
139
|
+
nameOnCard: z.string(),
|
|
140
|
+
cardSecurityCode: z.string(),
|
|
141
|
+
}).transform((v) => {
|
|
142
|
+
return remap$(v, {
|
|
143
|
+
paymentMethodSlug: "payment_method_slug",
|
|
144
|
+
integrationType: "integration_type",
|
|
145
|
+
gatewayReferenceId: "gateway_reference_id",
|
|
146
|
+
returnUrl: "return_url",
|
|
147
|
+
redirectAfterPayment: "redirect_after_payment",
|
|
148
|
+
authType: "auth_type",
|
|
149
|
+
saveToLocker: "save_to_locker",
|
|
150
|
+
paymentMethodType: "payment_method_type",
|
|
151
|
+
paymentMethod: "payment_method",
|
|
152
|
+
cardNumber: "card_number",
|
|
153
|
+
cardExpMonth: "card_exp_month",
|
|
154
|
+
cardExpYear: "card_exp_year",
|
|
155
|
+
nameOnCard: "name_on_card",
|
|
156
|
+
cardSecurityCode: "card_security_code",
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* @internal
|
|
162
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
163
|
+
*/
|
|
164
|
+
export namespace JusPayCard$ {
|
|
165
|
+
/** @deprecated use `JusPayCard$inboundSchema` instead. */
|
|
166
|
+
export const inboundSchema = JusPayCard$inboundSchema;
|
|
167
|
+
/** @deprecated use `JusPayCard$outboundSchema` instead. */
|
|
168
|
+
export const outboundSchema = JusPayCard$outboundSchema;
|
|
169
|
+
/** @deprecated use `JusPayCard$Outbound` instead. */
|
|
170
|
+
export type Outbound = JusPayCard$Outbound;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function jusPayCardToJSON(jusPayCard: JusPayCard): string {
|
|
174
|
+
return JSON.stringify(JusPayCard$outboundSchema.parse(jusPayCard));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export function jusPayCardFromJSON(
|
|
178
|
+
jsonString: string,
|
|
179
|
+
): SafeParseResult<JusPayCard, SDKValidationError> {
|
|
180
|
+
return safeParse(
|
|
181
|
+
jsonString,
|
|
182
|
+
(x) => JusPayCard$inboundSchema.parse(JSON.parse(x)),
|
|
183
|
+
`Failed to parse 'JusPayCard' from JSON`,
|
|
184
|
+
);
|
|
185
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
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
|
+
JusPayCard,
|
|
11
|
+
JusPayCard$inboundSchema,
|
|
12
|
+
JusPayCard$Outbound,
|
|
13
|
+
JusPayCard$outboundSchema,
|
|
14
|
+
} from "./juspaycard.js";
|
|
15
|
+
import {
|
|
16
|
+
JuspayNetBanking,
|
|
17
|
+
JuspayNetBanking$inboundSchema,
|
|
18
|
+
JuspayNetBanking$Outbound,
|
|
19
|
+
JuspayNetBanking$outboundSchema,
|
|
20
|
+
} from "./juspaynetbanking.js";
|
|
21
|
+
import {
|
|
22
|
+
JusPaySavedCardToken,
|
|
23
|
+
JusPaySavedCardToken$inboundSchema,
|
|
24
|
+
JusPaySavedCardToken$Outbound,
|
|
25
|
+
JusPaySavedCardToken$outboundSchema,
|
|
26
|
+
} from "./juspaysavedcardtoken.js";
|
|
27
|
+
import {
|
|
28
|
+
JuspayUpiCollect,
|
|
29
|
+
JuspayUpiCollect$inboundSchema,
|
|
30
|
+
JuspayUpiCollect$Outbound,
|
|
31
|
+
JuspayUpiCollect$outboundSchema,
|
|
32
|
+
} from "./juspayupicollect.js";
|
|
33
|
+
import {
|
|
34
|
+
JuspayUpiIntent,
|
|
35
|
+
JuspayUpiIntent$inboundSchema,
|
|
36
|
+
JuspayUpiIntent$Outbound,
|
|
37
|
+
JuspayUpiIntent$outboundSchema,
|
|
38
|
+
} from "./juspayupiintent.js";
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/JusPayExpressCheckout} - API reference for the JusPayExpressCheckout schema
|
|
42
|
+
*/
|
|
43
|
+
export type JusPayExpressCheckout =
|
|
44
|
+
| JusPayCard
|
|
45
|
+
| JusPaySavedCardToken
|
|
46
|
+
| JuspayUpiIntent
|
|
47
|
+
| JuspayUpiCollect
|
|
48
|
+
| JuspayNetBanking;
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const JusPayExpressCheckout$inboundSchema: z.ZodType<
|
|
52
|
+
JusPayExpressCheckout,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
unknown
|
|
55
|
+
> = z.union([
|
|
56
|
+
JusPayCard$inboundSchema,
|
|
57
|
+
JusPaySavedCardToken$inboundSchema,
|
|
58
|
+
JuspayUpiIntent$inboundSchema,
|
|
59
|
+
JuspayUpiCollect$inboundSchema,
|
|
60
|
+
JuspayNetBanking$inboundSchema,
|
|
61
|
+
]);
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type JusPayExpressCheckout$Outbound =
|
|
65
|
+
| JusPayCard$Outbound
|
|
66
|
+
| JusPaySavedCardToken$Outbound
|
|
67
|
+
| JuspayUpiIntent$Outbound
|
|
68
|
+
| JuspayUpiCollect$Outbound
|
|
69
|
+
| JuspayNetBanking$Outbound;
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const JusPayExpressCheckout$outboundSchema: z.ZodType<
|
|
73
|
+
JusPayExpressCheckout$Outbound,
|
|
74
|
+
z.ZodTypeDef,
|
|
75
|
+
JusPayExpressCheckout
|
|
76
|
+
> = z.union([
|
|
77
|
+
JusPayCard$outboundSchema,
|
|
78
|
+
JusPaySavedCardToken$outboundSchema,
|
|
79
|
+
JuspayUpiIntent$outboundSchema,
|
|
80
|
+
JuspayUpiCollect$outboundSchema,
|
|
81
|
+
JuspayNetBanking$outboundSchema,
|
|
82
|
+
]);
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @internal
|
|
86
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
87
|
+
*/
|
|
88
|
+
export namespace JusPayExpressCheckout$ {
|
|
89
|
+
/** @deprecated use `JusPayExpressCheckout$inboundSchema` instead. */
|
|
90
|
+
export const inboundSchema = JusPayExpressCheckout$inboundSchema;
|
|
91
|
+
/** @deprecated use `JusPayExpressCheckout$outboundSchema` instead. */
|
|
92
|
+
export const outboundSchema = JusPayExpressCheckout$outboundSchema;
|
|
93
|
+
/** @deprecated use `JusPayExpressCheckout$Outbound` instead. */
|
|
94
|
+
export type Outbound = JusPayExpressCheckout$Outbound;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function jusPayExpressCheckoutToJSON(
|
|
98
|
+
jusPayExpressCheckout: JusPayExpressCheckout,
|
|
99
|
+
): string {
|
|
100
|
+
return JSON.stringify(
|
|
101
|
+
JusPayExpressCheckout$outboundSchema.parse(jusPayExpressCheckout),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function jusPayExpressCheckoutFromJSON(
|
|
106
|
+
jsonString: string,
|
|
107
|
+
): SafeParseResult<JusPayExpressCheckout, SDKValidationError> {
|
|
108
|
+
return safeParse(
|
|
109
|
+
jsonString,
|
|
110
|
+
(x) => JusPayExpressCheckout$inboundSchema.parse(JSON.parse(x)),
|
|
111
|
+
`Failed to parse 'JusPayExpressCheckout' from JSON`,
|
|
112
|
+
);
|
|
113
|
+
}
|