ce-storefront 0.18.2 → 0.18.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.
Files changed (70) hide show
  1. package/esm/lib/config.d.ts +3 -3
  2. package/esm/lib/config.js +3 -3
  3. package/esm/models/components/index.d.ts +3 -2
  4. package/esm/models/components/index.d.ts.map +1 -1
  5. package/esm/models/components/index.js +3 -2
  6. package/esm/models/components/index.js.map +1 -1
  7. package/esm/models/components/juspayexpresscheckout.d.ts +3 -3
  8. package/esm/models/components/juspayexpresscheckout.d.ts.map +1 -1
  9. package/esm/models/components/juspayexpresscheckout.js +3 -3
  10. package/esm/models/components/juspayexpresscheckout.js.map +1 -1
  11. package/esm/models/components/juspayexpresscheckoutresponse.d.ts +187 -0
  12. package/esm/models/components/juspayexpresscheckoutresponse.d.ts.map +1 -0
  13. package/esm/models/components/juspayexpresscheckoutresponse.js +237 -0
  14. package/esm/models/components/juspayexpresscheckoutresponse.js.map +1 -0
  15. package/esm/models/components/juspayhypercheckout.d.ts +2 -2
  16. package/esm/models/components/juspayhypercheckout.d.ts.map +1 -1
  17. package/esm/models/components/juspayhypercheckout.js +4 -4
  18. package/esm/models/components/juspayhypercheckout.js.map +1 -1
  19. package/esm/models/components/{juspaypaymentinfo.d.ts → juspayhypercheckoutresponse.d.ts} +17 -15
  20. package/esm/models/components/juspayhypercheckoutresponse.d.ts.map +1 -0
  21. package/esm/models/components/{juspaypaymentinfo.js → juspayhypercheckoutresponse.js} +18 -14
  22. package/esm/models/components/juspayhypercheckoutresponse.js.map +1 -0
  23. package/esm/models/components/juspaynetbanking.d.ts +6 -4
  24. package/esm/models/components/juspaynetbanking.d.ts.map +1 -1
  25. package/esm/models/components/juspaynetbanking.js +10 -6
  26. package/esm/models/components/juspaynetbanking.js.map +1 -1
  27. package/esm/models/components/{juspaycard.d.ts → juspaynewcard.d.ts} +21 -19
  28. package/esm/models/components/juspaynewcard.d.ts.map +1 -0
  29. package/esm/models/components/{juspaycard.js → juspaynewcard.js} +24 -20
  30. package/esm/models/components/juspaynewcard.js.map +1 -0
  31. package/esm/models/components/juspaysavedcardtoken.d.ts +6 -4
  32. package/esm/models/components/juspaysavedcardtoken.d.ts.map +1 -1
  33. package/esm/models/components/juspaysavedcardtoken.js +10 -6
  34. package/esm/models/components/juspaysavedcardtoken.js.map +1 -1
  35. package/esm/models/components/juspayupicollect.d.ts +6 -4
  36. package/esm/models/components/juspayupicollect.d.ts.map +1 -1
  37. package/esm/models/components/juspayupicollect.js +10 -6
  38. package/esm/models/components/juspayupicollect.js.map +1 -1
  39. package/esm/models/components/juspayupiintent.d.ts +6 -4
  40. package/esm/models/components/juspayupiintent.d.ts.map +1 -1
  41. package/esm/models/components/juspayupiintent.js +10 -6
  42. package/esm/models/components/juspayupiintent.js.map +1 -1
  43. package/esm/models/operations/createorder.d.ts +4 -4
  44. package/esm/models/operations/createorder.d.ts.map +1 -1
  45. package/esm/models/operations/createorder.js +8 -4
  46. package/esm/models/operations/createorder.js.map +1 -1
  47. package/esm/models/operations/retryorderpayment.d.ts +4 -4
  48. package/esm/models/operations/retryorderpayment.d.ts.map +1 -1
  49. package/esm/models/operations/retryorderpayment.js +8 -4
  50. package/esm/models/operations/retryorderpayment.js.map +1 -1
  51. package/examples/package-lock.json +1 -1
  52. package/jsr.json +1 -1
  53. package/package.json +1 -1
  54. package/src/lib/config.ts +3 -3
  55. package/src/models/components/index.ts +3 -2
  56. package/src/models/components/juspayexpresscheckout.ts +10 -10
  57. package/src/models/components/juspayexpresscheckoutresponse.ts +443 -0
  58. package/src/models/components/juspayhypercheckout.ts +6 -6
  59. package/src/models/components/{juspaypaymentinfo.ts → juspayhypercheckoutresponse.ts} +32 -22
  60. package/src/models/components/juspaynetbanking.ts +16 -10
  61. package/src/models/components/{juspaycard.ts → juspaynewcard.ts} +37 -31
  62. package/src/models/components/juspaysavedcardtoken.ts +16 -10
  63. package/src/models/components/juspayupicollect.ts +16 -10
  64. package/src/models/components/juspayupiintent.ts +16 -10
  65. package/src/models/operations/createorder.ts +21 -11
  66. package/src/models/operations/retryorderpayment.ts +21 -11
  67. package/esm/models/components/juspaycard.d.ts.map +0 -1
  68. package/esm/models/components/juspaycard.js.map +0 -1
  69. package/esm/models/components/juspaypaymentinfo.d.ts.map +0 -1
  70. package/esm/models/components/juspaypaymentinfo.js.map +0 -1
@@ -0,0 +1,443 @@
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 Juspay = {
12
+ clientAuthToken?: string | undefined;
13
+ clientAuthTokenExpiry?: string | undefined;
14
+ };
15
+
16
+ export type Offers = {};
17
+
18
+ export type OfferDetails = {
19
+ offers?: Array<Offers> | undefined;
20
+ };
21
+
22
+ export type SDKParams = {
23
+ mam?: string | undefined;
24
+ tr?: string | undefined;
25
+ merchantVpa?: string | undefined;
26
+ customerFirstName?: string | undefined;
27
+ customerLastName?: string | undefined;
28
+ tn?: string | undefined;
29
+ mcc?: string | undefined;
30
+ merchantName?: string | undefined;
31
+ currency?: string | undefined;
32
+ amount?: string | undefined;
33
+ };
34
+
35
+ export type Payment = {
36
+ sdkParams?: SDKParams | undefined;
37
+ };
38
+
39
+ /**
40
+ * @see {@link https://llm-docs.commercengine.io/storefront/schemas/JusPayExpressCheckoutResponse} - API reference for the JusPayExpressCheckoutResponse schema
41
+ */
42
+ export type JusPayExpressCheckoutResponse = {
43
+ txnId?: string | undefined;
44
+ txnUuid?: string | undefined;
45
+ status?: string | undefined;
46
+ orderId?: string | undefined;
47
+ juspay?: Juspay | undefined;
48
+ offerDetails?: OfferDetails | undefined;
49
+ payment?: Payment | null | undefined;
50
+ orderExpiry?: Date | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const Juspay$inboundSchema: z.ZodType<Juspay, z.ZodTypeDef, unknown> = z
55
+ .object({
56
+ client_auth_token: z.string().optional(),
57
+ client_auth_token_expiry: z.string().optional(),
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ "client_auth_token": "clientAuthToken",
61
+ "client_auth_token_expiry": "clientAuthTokenExpiry",
62
+ });
63
+ });
64
+
65
+ /** @internal */
66
+ export type Juspay$Outbound = {
67
+ client_auth_token?: string | undefined;
68
+ client_auth_token_expiry?: string | undefined;
69
+ };
70
+
71
+ /** @internal */
72
+ export const Juspay$outboundSchema: z.ZodType<
73
+ Juspay$Outbound,
74
+ z.ZodTypeDef,
75
+ Juspay
76
+ > = z.object({
77
+ clientAuthToken: z.string().optional(),
78
+ clientAuthTokenExpiry: z.string().optional(),
79
+ }).transform((v) => {
80
+ return remap$(v, {
81
+ clientAuthToken: "client_auth_token",
82
+ clientAuthTokenExpiry: "client_auth_token_expiry",
83
+ });
84
+ });
85
+
86
+ /**
87
+ * @internal
88
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
89
+ */
90
+ export namespace Juspay$ {
91
+ /** @deprecated use `Juspay$inboundSchema` instead. */
92
+ export const inboundSchema = Juspay$inboundSchema;
93
+ /** @deprecated use `Juspay$outboundSchema` instead. */
94
+ export const outboundSchema = Juspay$outboundSchema;
95
+ /** @deprecated use `Juspay$Outbound` instead. */
96
+ export type Outbound = Juspay$Outbound;
97
+ }
98
+
99
+ export function juspayToJSON(juspay: Juspay): string {
100
+ return JSON.stringify(Juspay$outboundSchema.parse(juspay));
101
+ }
102
+
103
+ export function juspayFromJSON(
104
+ jsonString: string,
105
+ ): SafeParseResult<Juspay, SDKValidationError> {
106
+ return safeParse(
107
+ jsonString,
108
+ (x) => Juspay$inboundSchema.parse(JSON.parse(x)),
109
+ `Failed to parse 'Juspay' from JSON`,
110
+ );
111
+ }
112
+
113
+ /** @internal */
114
+ export const Offers$inboundSchema: z.ZodType<Offers, z.ZodTypeDef, unknown> = z
115
+ .object({});
116
+
117
+ /** @internal */
118
+ export type Offers$Outbound = {};
119
+
120
+ /** @internal */
121
+ export const Offers$outboundSchema: z.ZodType<
122
+ Offers$Outbound,
123
+ z.ZodTypeDef,
124
+ Offers
125
+ > = z.object({});
126
+
127
+ /**
128
+ * @internal
129
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
130
+ */
131
+ export namespace Offers$ {
132
+ /** @deprecated use `Offers$inboundSchema` instead. */
133
+ export const inboundSchema = Offers$inboundSchema;
134
+ /** @deprecated use `Offers$outboundSchema` instead. */
135
+ export const outboundSchema = Offers$outboundSchema;
136
+ /** @deprecated use `Offers$Outbound` instead. */
137
+ export type Outbound = Offers$Outbound;
138
+ }
139
+
140
+ export function offersToJSON(offers: Offers): string {
141
+ return JSON.stringify(Offers$outboundSchema.parse(offers));
142
+ }
143
+
144
+ export function offersFromJSON(
145
+ jsonString: string,
146
+ ): SafeParseResult<Offers, SDKValidationError> {
147
+ return safeParse(
148
+ jsonString,
149
+ (x) => Offers$inboundSchema.parse(JSON.parse(x)),
150
+ `Failed to parse 'Offers' from JSON`,
151
+ );
152
+ }
153
+
154
+ /** @internal */
155
+ export const OfferDetails$inboundSchema: z.ZodType<
156
+ OfferDetails,
157
+ z.ZodTypeDef,
158
+ unknown
159
+ > = z.object({
160
+ offers: z.array(z.lazy(() => Offers$inboundSchema)).optional(),
161
+ });
162
+
163
+ /** @internal */
164
+ export type OfferDetails$Outbound = {
165
+ offers?: Array<Offers$Outbound> | undefined;
166
+ };
167
+
168
+ /** @internal */
169
+ export const OfferDetails$outboundSchema: z.ZodType<
170
+ OfferDetails$Outbound,
171
+ z.ZodTypeDef,
172
+ OfferDetails
173
+ > = z.object({
174
+ offers: z.array(z.lazy(() => Offers$outboundSchema)).optional(),
175
+ });
176
+
177
+ /**
178
+ * @internal
179
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
180
+ */
181
+ export namespace OfferDetails$ {
182
+ /** @deprecated use `OfferDetails$inboundSchema` instead. */
183
+ export const inboundSchema = OfferDetails$inboundSchema;
184
+ /** @deprecated use `OfferDetails$outboundSchema` instead. */
185
+ export const outboundSchema = OfferDetails$outboundSchema;
186
+ /** @deprecated use `OfferDetails$Outbound` instead. */
187
+ export type Outbound = OfferDetails$Outbound;
188
+ }
189
+
190
+ export function offerDetailsToJSON(offerDetails: OfferDetails): string {
191
+ return JSON.stringify(OfferDetails$outboundSchema.parse(offerDetails));
192
+ }
193
+
194
+ export function offerDetailsFromJSON(
195
+ jsonString: string,
196
+ ): SafeParseResult<OfferDetails, SDKValidationError> {
197
+ return safeParse(
198
+ jsonString,
199
+ (x) => OfferDetails$inboundSchema.parse(JSON.parse(x)),
200
+ `Failed to parse 'OfferDetails' from JSON`,
201
+ );
202
+ }
203
+
204
+ /** @internal */
205
+ export const SDKParams$inboundSchema: z.ZodType<
206
+ SDKParams,
207
+ z.ZodTypeDef,
208
+ unknown
209
+ > = z.object({
210
+ mam: z.string().optional(),
211
+ tr: z.string().optional(),
212
+ merchant_vpa: z.string().optional(),
213
+ customer_first_name: z.string().optional(),
214
+ customer_last_name: z.string().optional(),
215
+ tn: z.string().optional(),
216
+ mcc: z.string().optional(),
217
+ merchant_name: z.string().optional(),
218
+ currency: z.string().optional(),
219
+ amount: z.string().optional(),
220
+ }).transform((v) => {
221
+ return remap$(v, {
222
+ "merchant_vpa": "merchantVpa",
223
+ "customer_first_name": "customerFirstName",
224
+ "customer_last_name": "customerLastName",
225
+ "merchant_name": "merchantName",
226
+ });
227
+ });
228
+
229
+ /** @internal */
230
+ export type SDKParams$Outbound = {
231
+ mam?: string | undefined;
232
+ tr?: string | undefined;
233
+ merchant_vpa?: string | undefined;
234
+ customer_first_name?: string | undefined;
235
+ customer_last_name?: string | undefined;
236
+ tn?: string | undefined;
237
+ mcc?: string | undefined;
238
+ merchant_name?: string | undefined;
239
+ currency?: string | undefined;
240
+ amount?: string | undefined;
241
+ };
242
+
243
+ /** @internal */
244
+ export const SDKParams$outboundSchema: z.ZodType<
245
+ SDKParams$Outbound,
246
+ z.ZodTypeDef,
247
+ SDKParams
248
+ > = z.object({
249
+ mam: z.string().optional(),
250
+ tr: z.string().optional(),
251
+ merchantVpa: z.string().optional(),
252
+ customerFirstName: z.string().optional(),
253
+ customerLastName: z.string().optional(),
254
+ tn: z.string().optional(),
255
+ mcc: z.string().optional(),
256
+ merchantName: z.string().optional(),
257
+ currency: z.string().optional(),
258
+ amount: z.string().optional(),
259
+ }).transform((v) => {
260
+ return remap$(v, {
261
+ merchantVpa: "merchant_vpa",
262
+ customerFirstName: "customer_first_name",
263
+ customerLastName: "customer_last_name",
264
+ merchantName: "merchant_name",
265
+ });
266
+ });
267
+
268
+ /**
269
+ * @internal
270
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
271
+ */
272
+ export namespace SDKParams$ {
273
+ /** @deprecated use `SDKParams$inboundSchema` instead. */
274
+ export const inboundSchema = SDKParams$inboundSchema;
275
+ /** @deprecated use `SDKParams$outboundSchema` instead. */
276
+ export const outboundSchema = SDKParams$outboundSchema;
277
+ /** @deprecated use `SDKParams$Outbound` instead. */
278
+ export type Outbound = SDKParams$Outbound;
279
+ }
280
+
281
+ export function sdkParamsToJSON(sdkParams: SDKParams): string {
282
+ return JSON.stringify(SDKParams$outboundSchema.parse(sdkParams));
283
+ }
284
+
285
+ export function sdkParamsFromJSON(
286
+ jsonString: string,
287
+ ): SafeParseResult<SDKParams, SDKValidationError> {
288
+ return safeParse(
289
+ jsonString,
290
+ (x) => SDKParams$inboundSchema.parse(JSON.parse(x)),
291
+ `Failed to parse 'SDKParams' from JSON`,
292
+ );
293
+ }
294
+
295
+ /** @internal */
296
+ export const Payment$inboundSchema: z.ZodType<Payment, z.ZodTypeDef, unknown> =
297
+ z.object({
298
+ sdk_params: z.lazy(() => SDKParams$inboundSchema).optional(),
299
+ }).transform((v) => {
300
+ return remap$(v, {
301
+ "sdk_params": "sdkParams",
302
+ });
303
+ });
304
+
305
+ /** @internal */
306
+ export type Payment$Outbound = {
307
+ sdk_params?: SDKParams$Outbound | undefined;
308
+ };
309
+
310
+ /** @internal */
311
+ export const Payment$outboundSchema: z.ZodType<
312
+ Payment$Outbound,
313
+ z.ZodTypeDef,
314
+ Payment
315
+ > = z.object({
316
+ sdkParams: z.lazy(() => SDKParams$outboundSchema).optional(),
317
+ }).transform((v) => {
318
+ return remap$(v, {
319
+ sdkParams: "sdk_params",
320
+ });
321
+ });
322
+
323
+ /**
324
+ * @internal
325
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
326
+ */
327
+ export namespace Payment$ {
328
+ /** @deprecated use `Payment$inboundSchema` instead. */
329
+ export const inboundSchema = Payment$inboundSchema;
330
+ /** @deprecated use `Payment$outboundSchema` instead. */
331
+ export const outboundSchema = Payment$outboundSchema;
332
+ /** @deprecated use `Payment$Outbound` instead. */
333
+ export type Outbound = Payment$Outbound;
334
+ }
335
+
336
+ export function paymentToJSON(payment: Payment): string {
337
+ return JSON.stringify(Payment$outboundSchema.parse(payment));
338
+ }
339
+
340
+ export function paymentFromJSON(
341
+ jsonString: string,
342
+ ): SafeParseResult<Payment, SDKValidationError> {
343
+ return safeParse(
344
+ jsonString,
345
+ (x) => Payment$inboundSchema.parse(JSON.parse(x)),
346
+ `Failed to parse 'Payment' from JSON`,
347
+ );
348
+ }
349
+
350
+ /** @internal */
351
+ export const JusPayExpressCheckoutResponse$inboundSchema: z.ZodType<
352
+ JusPayExpressCheckoutResponse,
353
+ z.ZodTypeDef,
354
+ unknown
355
+ > = z.object({
356
+ txn_id: z.string().optional(),
357
+ txn_uuid: z.string().optional(),
358
+ status: z.string().optional(),
359
+ order_id: z.string().optional(),
360
+ juspay: z.lazy(() => Juspay$inboundSchema).optional(),
361
+ offer_details: z.lazy(() => OfferDetails$inboundSchema).optional(),
362
+ payment: z.nullable(z.lazy(() => Payment$inboundSchema)).optional(),
363
+ order_expiry: z.string().datetime({ offset: true }).transform(v =>
364
+ new Date(v)
365
+ ).optional(),
366
+ }).transform((v) => {
367
+ return remap$(v, {
368
+ "txn_id": "txnId",
369
+ "txn_uuid": "txnUuid",
370
+ "order_id": "orderId",
371
+ "offer_details": "offerDetails",
372
+ "order_expiry": "orderExpiry",
373
+ });
374
+ });
375
+
376
+ /** @internal */
377
+ export type JusPayExpressCheckoutResponse$Outbound = {
378
+ txn_id?: string | undefined;
379
+ txn_uuid?: string | undefined;
380
+ status?: string | undefined;
381
+ order_id?: string | undefined;
382
+ juspay?: Juspay$Outbound | undefined;
383
+ offer_details?: OfferDetails$Outbound | undefined;
384
+ payment?: Payment$Outbound | null | undefined;
385
+ order_expiry?: string | undefined;
386
+ };
387
+
388
+ /** @internal */
389
+ export const JusPayExpressCheckoutResponse$outboundSchema: z.ZodType<
390
+ JusPayExpressCheckoutResponse$Outbound,
391
+ z.ZodTypeDef,
392
+ JusPayExpressCheckoutResponse
393
+ > = z.object({
394
+ txnId: z.string().optional(),
395
+ txnUuid: z.string().optional(),
396
+ status: z.string().optional(),
397
+ orderId: z.string().optional(),
398
+ juspay: z.lazy(() => Juspay$outboundSchema).optional(),
399
+ offerDetails: z.lazy(() => OfferDetails$outboundSchema).optional(),
400
+ payment: z.nullable(z.lazy(() => Payment$outboundSchema)).optional(),
401
+ orderExpiry: z.date().transform(v => v.toISOString()).optional(),
402
+ }).transform((v) => {
403
+ return remap$(v, {
404
+ txnId: "txn_id",
405
+ txnUuid: "txn_uuid",
406
+ orderId: "order_id",
407
+ offerDetails: "offer_details",
408
+ orderExpiry: "order_expiry",
409
+ });
410
+ });
411
+
412
+ /**
413
+ * @internal
414
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
415
+ */
416
+ export namespace JusPayExpressCheckoutResponse$ {
417
+ /** @deprecated use `JusPayExpressCheckoutResponse$inboundSchema` instead. */
418
+ export const inboundSchema = JusPayExpressCheckoutResponse$inboundSchema;
419
+ /** @deprecated use `JusPayExpressCheckoutResponse$outboundSchema` instead. */
420
+ export const outboundSchema = JusPayExpressCheckoutResponse$outboundSchema;
421
+ /** @deprecated use `JusPayExpressCheckoutResponse$Outbound` instead. */
422
+ export type Outbound = JusPayExpressCheckoutResponse$Outbound;
423
+ }
424
+
425
+ export function jusPayExpressCheckoutResponseToJSON(
426
+ jusPayExpressCheckoutResponse: JusPayExpressCheckoutResponse,
427
+ ): string {
428
+ return JSON.stringify(
429
+ JusPayExpressCheckoutResponse$outboundSchema.parse(
430
+ jusPayExpressCheckoutResponse,
431
+ ),
432
+ );
433
+ }
434
+
435
+ export function jusPayExpressCheckoutResponseFromJSON(
436
+ jsonString: string,
437
+ ): SafeParseResult<JusPayExpressCheckoutResponse, SDKValidationError> {
438
+ return safeParse(
439
+ jsonString,
440
+ (x) => JusPayExpressCheckoutResponse$inboundSchema.parse(JSON.parse(x)),
441
+ `Failed to parse 'JusPayExpressCheckoutResponse' from JSON`,
442
+ );
443
+ }
@@ -18,7 +18,7 @@ export type Action = ClosedEnum<typeof Action>;
18
18
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/JusPayHyperCheckout} - API reference for the JusPayHyperCheckout schema
19
19
  */
20
20
  export type JusPayHyperCheckout = {
21
- paymentMethodSlug: string;
21
+ paymentProviderSlug: string;
22
22
  integrationType?: "hyper-checkout" | undefined;
23
23
  gatewayReferenceId: string;
24
24
  returnUrl: string;
@@ -50,7 +50,7 @@ export const JusPayHyperCheckout$inboundSchema: z.ZodType<
50
50
  z.ZodTypeDef,
51
51
  unknown
52
52
  > = z.object({
53
- payment_method_slug: z.string(),
53
+ payment_provider_slug: z.string(),
54
54
  integration_type: z.literal("hyper-checkout").default("hyper-checkout")
55
55
  .optional(),
56
56
  gateway_reference_id: z.string(),
@@ -58,7 +58,7 @@ export const JusPayHyperCheckout$inboundSchema: z.ZodType<
58
58
  action: Action$inboundSchema,
59
59
  }).transform((v) => {
60
60
  return remap$(v, {
61
- "payment_method_slug": "paymentMethodSlug",
61
+ "payment_provider_slug": "paymentProviderSlug",
62
62
  "integration_type": "integrationType",
63
63
  "gateway_reference_id": "gatewayReferenceId",
64
64
  "return_url": "returnUrl",
@@ -67,7 +67,7 @@ export const JusPayHyperCheckout$inboundSchema: z.ZodType<
67
67
 
68
68
  /** @internal */
69
69
  export type JusPayHyperCheckout$Outbound = {
70
- payment_method_slug: string;
70
+ payment_provider_slug: string;
71
71
  integration_type: "hyper-checkout";
72
72
  gateway_reference_id: string;
73
73
  return_url: string;
@@ -80,14 +80,14 @@ export const JusPayHyperCheckout$outboundSchema: z.ZodType<
80
80
  z.ZodTypeDef,
81
81
  JusPayHyperCheckout
82
82
  > = z.object({
83
- paymentMethodSlug: z.string(),
83
+ paymentProviderSlug: z.string(),
84
84
  integrationType: z.literal("hyper-checkout"),
85
85
  gatewayReferenceId: z.string(),
86
86
  returnUrl: z.string(),
87
87
  action: Action$outboundSchema,
88
88
  }).transform((v) => {
89
89
  return remap$(v, {
90
- paymentMethodSlug: "payment_method_slug",
90
+ paymentProviderSlug: "payment_provider_slug",
91
91
  integrationType: "integration_type",
92
92
  gatewayReferenceId: "gateway_reference_id",
93
93
  returnUrl: "return_url",
@@ -103,14 +103,15 @@ export type SDKPayload = {
103
103
  };
104
104
 
105
105
  /**
106
- * @see {@link https://llm-docs.commercengine.io/storefront/schemas/JuspayPaymentInfo} - API reference for the JuspayPaymentInfo schema
106
+ * @see {@link https://llm-docs.commercengine.io/storefront/schemas/JusPayHyperCheckoutResponse} - API reference for the JusPayHyperCheckoutResponse schema
107
107
  */
108
- export type JuspayPaymentInfo = {
108
+ export type JusPayHyperCheckoutResponse = {
109
109
  id?: string | undefined;
110
110
  status?: string | undefined;
111
111
  orderId?: string | undefined;
112
112
  paymentLinks?: PaymentLinks | undefined;
113
113
  sdkPayload?: SDKPayload | undefined;
114
+ orderExpiry?: Date | undefined;
114
115
  };
115
116
 
116
117
  /** @internal */
@@ -373,8 +374,8 @@ export function sdkPayloadFromJSON(
373
374
  }
374
375
 
375
376
  /** @internal */
376
- export const JuspayPaymentInfo$inboundSchema: z.ZodType<
377
- JuspayPaymentInfo,
377
+ export const JusPayHyperCheckoutResponse$inboundSchema: z.ZodType<
378
+ JusPayHyperCheckoutResponse,
378
379
  z.ZodTypeDef,
379
380
  unknown
380
381
  > = z.object({
@@ -383,39 +384,46 @@ export const JuspayPaymentInfo$inboundSchema: z.ZodType<
383
384
  order_id: z.string().optional(),
384
385
  payment_links: z.lazy(() => PaymentLinks$inboundSchema).optional(),
385
386
  sdk_payload: z.lazy(() => SDKPayload$inboundSchema).optional(),
387
+ order_expiry: z.string().datetime({ offset: true }).transform(v =>
388
+ new Date(v)
389
+ ).optional(),
386
390
  }).transform((v) => {
387
391
  return remap$(v, {
388
392
  "order_id": "orderId",
389
393
  "payment_links": "paymentLinks",
390
394
  "sdk_payload": "sdkPayload",
395
+ "order_expiry": "orderExpiry",
391
396
  });
392
397
  });
393
398
 
394
399
  /** @internal */
395
- export type JuspayPaymentInfo$Outbound = {
400
+ export type JusPayHyperCheckoutResponse$Outbound = {
396
401
  id?: string | undefined;
397
402
  status?: string | undefined;
398
403
  order_id?: string | undefined;
399
404
  payment_links?: PaymentLinks$Outbound | undefined;
400
405
  sdk_payload?: SDKPayload$Outbound | undefined;
406
+ order_expiry?: string | undefined;
401
407
  };
402
408
 
403
409
  /** @internal */
404
- export const JuspayPaymentInfo$outboundSchema: z.ZodType<
405
- JuspayPaymentInfo$Outbound,
410
+ export const JusPayHyperCheckoutResponse$outboundSchema: z.ZodType<
411
+ JusPayHyperCheckoutResponse$Outbound,
406
412
  z.ZodTypeDef,
407
- JuspayPaymentInfo
413
+ JusPayHyperCheckoutResponse
408
414
  > = z.object({
409
415
  id: z.string().optional(),
410
416
  status: z.string().optional(),
411
417
  orderId: z.string().optional(),
412
418
  paymentLinks: z.lazy(() => PaymentLinks$outboundSchema).optional(),
413
419
  sdkPayload: z.lazy(() => SDKPayload$outboundSchema).optional(),
420
+ orderExpiry: z.date().transform(v => v.toISOString()).optional(),
414
421
  }).transform((v) => {
415
422
  return remap$(v, {
416
423
  orderId: "order_id",
417
424
  paymentLinks: "payment_links",
418
425
  sdkPayload: "sdk_payload",
426
+ orderExpiry: "order_expiry",
419
427
  });
420
428
  });
421
429
 
@@ -423,29 +431,31 @@ export const JuspayPaymentInfo$outboundSchema: z.ZodType<
423
431
  * @internal
424
432
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
425
433
  */
426
- export namespace JuspayPaymentInfo$ {
427
- /** @deprecated use `JuspayPaymentInfo$inboundSchema` instead. */
428
- export const inboundSchema = JuspayPaymentInfo$inboundSchema;
429
- /** @deprecated use `JuspayPaymentInfo$outboundSchema` instead. */
430
- export const outboundSchema = JuspayPaymentInfo$outboundSchema;
431
- /** @deprecated use `JuspayPaymentInfo$Outbound` instead. */
432
- export type Outbound = JuspayPaymentInfo$Outbound;
434
+ export namespace JusPayHyperCheckoutResponse$ {
435
+ /** @deprecated use `JusPayHyperCheckoutResponse$inboundSchema` instead. */
436
+ export const inboundSchema = JusPayHyperCheckoutResponse$inboundSchema;
437
+ /** @deprecated use `JusPayHyperCheckoutResponse$outboundSchema` instead. */
438
+ export const outboundSchema = JusPayHyperCheckoutResponse$outboundSchema;
439
+ /** @deprecated use `JusPayHyperCheckoutResponse$Outbound` instead. */
440
+ export type Outbound = JusPayHyperCheckoutResponse$Outbound;
433
441
  }
434
442
 
435
- export function juspayPaymentInfoToJSON(
436
- juspayPaymentInfo: JuspayPaymentInfo,
443
+ export function jusPayHyperCheckoutResponseToJSON(
444
+ jusPayHyperCheckoutResponse: JusPayHyperCheckoutResponse,
437
445
  ): string {
438
446
  return JSON.stringify(
439
- JuspayPaymentInfo$outboundSchema.parse(juspayPaymentInfo),
447
+ JusPayHyperCheckoutResponse$outboundSchema.parse(
448
+ jusPayHyperCheckoutResponse,
449
+ ),
440
450
  );
441
451
  }
442
452
 
443
- export function juspayPaymentInfoFromJSON(
453
+ export function jusPayHyperCheckoutResponseFromJSON(
444
454
  jsonString: string,
445
- ): SafeParseResult<JuspayPaymentInfo, SDKValidationError> {
455
+ ): SafeParseResult<JusPayHyperCheckoutResponse, SDKValidationError> {
446
456
  return safeParse(
447
457
  jsonString,
448
- (x) => JuspayPaymentInfo$inboundSchema.parse(JSON.parse(x)),
449
- `Failed to parse 'JuspayPaymentInfo' from JSON`,
458
+ (x) => JusPayHyperCheckoutResponse$inboundSchema.parse(JSON.parse(x)),
459
+ `Failed to parse 'JusPayHyperCheckoutResponse' from JSON`,
450
460
  );
451
461
  }
@@ -12,11 +12,12 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
12
  * @see {@link https://llm-docs.commercengine.io/storefront/schemas/JuspayNetBanking} - API reference for the JuspayNetBanking schema
13
13
  */
14
14
  export type JuspayNetBanking = {
15
- paymentMethodSlug: string;
15
+ paymentProviderSlug: string;
16
16
  integrationType?: "express-checkout" | undefined;
17
17
  gatewayReferenceId: string;
18
18
  returnUrl?: string | undefined;
19
- redirectAfterPayment: boolean;
19
+ redirectAfterPayment?: boolean | undefined;
20
+ getClientAuthToken?: boolean | undefined;
20
21
  paymentMethodType?: "NB" | undefined;
21
22
  paymentMethod: string;
22
23
  };
@@ -27,21 +28,23 @@ export const JuspayNetBanking$inboundSchema: z.ZodType<
27
28
  z.ZodTypeDef,
28
29
  unknown
29
30
  > = z.object({
30
- payment_method_slug: z.string(),
31
+ payment_provider_slug: z.string(),
31
32
  integration_type: z.literal("express-checkout").default("express-checkout")
32
33
  .optional(),
33
34
  gateway_reference_id: z.string(),
34
35
  return_url: z.string().optional(),
35
- redirect_after_payment: z.boolean(),
36
+ redirect_after_payment: z.boolean().optional(),
37
+ get_client_auth_token: z.boolean().optional(),
36
38
  payment_method_type: z.literal("NB").default("NB").optional(),
37
39
  payment_method: z.string(),
38
40
  }).transform((v) => {
39
41
  return remap$(v, {
40
- "payment_method_slug": "paymentMethodSlug",
42
+ "payment_provider_slug": "paymentProviderSlug",
41
43
  "integration_type": "integrationType",
42
44
  "gateway_reference_id": "gatewayReferenceId",
43
45
  "return_url": "returnUrl",
44
46
  "redirect_after_payment": "redirectAfterPayment",
47
+ "get_client_auth_token": "getClientAuthToken",
45
48
  "payment_method_type": "paymentMethodType",
46
49
  "payment_method": "paymentMethod",
47
50
  });
@@ -49,11 +52,12 @@ export const JuspayNetBanking$inboundSchema: z.ZodType<
49
52
 
50
53
  /** @internal */
51
54
  export type JuspayNetBanking$Outbound = {
52
- payment_method_slug: string;
55
+ payment_provider_slug: string;
53
56
  integration_type: "express-checkout";
54
57
  gateway_reference_id: string;
55
58
  return_url?: string | undefined;
56
- redirect_after_payment: boolean;
59
+ redirect_after_payment?: boolean | undefined;
60
+ get_client_auth_token?: boolean | undefined;
57
61
  payment_method_type: "NB";
58
62
  payment_method: string;
59
63
  };
@@ -64,20 +68,22 @@ export const JuspayNetBanking$outboundSchema: z.ZodType<
64
68
  z.ZodTypeDef,
65
69
  JuspayNetBanking
66
70
  > = z.object({
67
- paymentMethodSlug: z.string(),
71
+ paymentProviderSlug: z.string(),
68
72
  integrationType: z.literal("express-checkout"),
69
73
  gatewayReferenceId: z.string(),
70
74
  returnUrl: z.string().optional(),
71
- redirectAfterPayment: z.boolean(),
75
+ redirectAfterPayment: z.boolean().optional(),
76
+ getClientAuthToken: z.boolean().optional(),
72
77
  paymentMethodType: z.literal("NB"),
73
78
  paymentMethod: z.string(),
74
79
  }).transform((v) => {
75
80
  return remap$(v, {
76
- paymentMethodSlug: "payment_method_slug",
81
+ paymentProviderSlug: "payment_provider_slug",
77
82
  integrationType: "integration_type",
78
83
  gatewayReferenceId: "gateway_reference_id",
79
84
  returnUrl: "return_url",
80
85
  redirectAfterPayment: "redirect_after_payment",
86
+ getClientAuthToken: "get_client_auth_token",
81
87
  paymentMethodType: "payment_method_type",
82
88
  paymentMethod: "payment_method",
83
89
  });