ce-storefront 0.3.4 → 0.3.5

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 (233) hide show
  1. package/README.md +26 -37
  2. package/docs/sdks/{cestorefrontpayments → cestorefrontorderspayments}/README.md +1 -1
  3. package/docs/sdks/customers/README.md +236 -0
  4. package/docs/sdks/{paymentsapijuspay → juspay}/README.md +12 -12
  5. package/docs/sdks/orders/README.md +80 -1
  6. package/docs/sdks/payments/README.md +242 -2
  7. package/docs/sdks/products/README.md +1 -1
  8. package/esm/funcs/catalogProductsGet.d.ts +1 -1
  9. package/esm/funcs/catalogProductsGet.js +1 -1
  10. package/esm/funcs/{customersAPIGetCustomersId.d.ts → customersGetCustomersId.d.ts} +2 -2
  11. package/esm/funcs/customersGetCustomersId.d.ts.map +1 -0
  12. package/esm/funcs/{customersAPIGetCustomersId.js → customersGetCustomersId.js} +2 -2
  13. package/esm/funcs/customersGetCustomersId.js.map +1 -0
  14. package/esm/funcs/{customersAPIPostCustomers.d.ts → customersPostCustomers.d.ts} +2 -2
  15. package/esm/funcs/customersPostCustomers.d.ts.map +1 -0
  16. package/esm/funcs/{customersAPIPostCustomers.js → customersPostCustomers.js} +2 -2
  17. package/esm/funcs/customersPostCustomers.js.map +1 -0
  18. package/esm/funcs/{customersAPIPutCustomersId.d.ts → customersPutCustomersId.d.ts} +2 -2
  19. package/esm/funcs/customersPutCustomersId.d.ts.map +1 -0
  20. package/esm/funcs/{customersAPIPutCustomersId.js → customersPutCustomersId.js} +2 -2
  21. package/esm/funcs/{customersAPIPostCustomers.js.map → customersPutCustomersId.js.map} +1 -1
  22. package/esm/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.d.ts → juspayGetPaymentsJuspayCustomer.d.ts} +2 -2
  23. package/esm/funcs/juspayGetPaymentsJuspayCustomer.d.ts.map +1 -0
  24. package/esm/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.js → juspayGetPaymentsJuspayCustomer.js} +2 -2
  25. package/esm/funcs/juspayGetPaymentsJuspayCustomer.js.map +1 -0
  26. package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.d.ts → juspayPostPaymentsJuspayCreateCustomer.d.ts} +2 -2
  27. package/esm/funcs/juspayPostPaymentsJuspayCreateCustomer.d.ts.map +1 -0
  28. package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.js → juspayPostPaymentsJuspayCreateCustomer.js} +2 -2
  29. package/esm/funcs/juspayPostPaymentsJuspayCreateCustomer.js.map +1 -0
  30. package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.d.ts → juspayPostPaymentsJuspayCreateOrder.d.ts} +2 -2
  31. package/esm/funcs/juspayPostPaymentsJuspayCreateOrder.d.ts.map +1 -0
  32. package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.js → juspayPostPaymentsJuspayCreateOrder.js} +2 -2
  33. package/esm/funcs/juspayPostPaymentsJuspayCreateOrder.js.map +1 -0
  34. package/esm/funcs/{ordersAPIGetOrdersIdPaymentStatus.d.ts → ordersGetOrdersIdPaymentStatus.d.ts} +2 -2
  35. package/esm/funcs/ordersGetOrdersIdPaymentStatus.d.ts.map +1 -0
  36. package/esm/funcs/{ordersAPIGetOrdersIdPaymentStatus.js → ordersGetOrdersIdPaymentStatus.js} +2 -2
  37. package/esm/funcs/ordersGetOrdersIdPaymentStatus.js.map +1 -0
  38. package/esm/funcs/paymentsGetMethods.d.ts +1 -1
  39. package/esm/funcs/paymentsGetMethods.d.ts.map +1 -1
  40. package/esm/funcs/paymentsGetMethods.js +3 -3
  41. package/esm/funcs/paymentsGetMethods.js.map +1 -1
  42. package/esm/funcs/{paymentsAPIGetPaymentsCards.d.ts → paymentsGetPaymentsCards.d.ts} +2 -2
  43. package/esm/funcs/paymentsGetPaymentsCards.d.ts.map +1 -0
  44. package/esm/funcs/{paymentsAPIGetPaymentsCards.js → paymentsGetPaymentsCards.js} +2 -2
  45. package/esm/funcs/paymentsGetPaymentsCards.js.map +1 -0
  46. package/esm/funcs/{paymentsAPIGetPaymentsVerifyVpa.d.ts → paymentsGetPaymentsVerifyVpa.d.ts} +2 -2
  47. package/esm/funcs/paymentsGetPaymentsVerifyVpa.d.ts.map +1 -0
  48. package/esm/funcs/{paymentsAPIGetPaymentsVerifyVpa.js → paymentsGetPaymentsVerifyVpa.js} +2 -2
  49. package/esm/funcs/paymentsGetPaymentsVerifyVpa.js.map +1 -0
  50. package/esm/funcs/{paymentsAPIPostPaymentsCards.d.ts → paymentsPostPaymentsCards.d.ts} +2 -2
  51. package/esm/funcs/paymentsPostPaymentsCards.d.ts.map +1 -0
  52. package/esm/funcs/{paymentsAPIPostPaymentsCards.js → paymentsPostPaymentsCards.js} +2 -2
  53. package/esm/funcs/paymentsPostPaymentsCards.js.map +1 -0
  54. package/esm/lib/config.d.ts +2 -2
  55. package/esm/lib/config.js +2 -2
  56. package/esm/models/components/cart.d.ts +1 -1
  57. package/esm/models/components/cart.d.ts.map +1 -1
  58. package/esm/models/components/cart.js +1 -1
  59. package/esm/models/components/cart.js.map +1 -1
  60. package/esm/models/components/createcustomer.d.ts +1 -1
  61. package/esm/models/components/createcustomer.d.ts.map +1 -1
  62. package/esm/models/components/createcustomer.js +1 -1
  63. package/esm/models/components/createcustomer.js.map +1 -1
  64. package/esm/models/components/{customeraddressinput.d.ts → customeraddress.d.ts} +33 -33
  65. package/esm/models/components/customeraddress.d.ts.map +1 -0
  66. package/esm/models/components/{customeraddressinput.js → customeraddress.js} +37 -37
  67. package/esm/models/components/customeraddress.js.map +1 -0
  68. package/esm/models/components/freegoodspromotion.d.ts +2 -2
  69. package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
  70. package/esm/models/components/freegoodspromotion.js +2 -2
  71. package/esm/models/components/freegoodspromotion.js.map +1 -1
  72. package/esm/models/components/index.d.ts +2 -3
  73. package/esm/models/components/index.d.ts.map +1 -1
  74. package/esm/models/components/index.js +2 -3
  75. package/esm/models/components/index.js.map +1 -1
  76. package/esm/models/components/orderdetail.d.ts +1 -1
  77. package/esm/models/components/orderdetail.d.ts.map +1 -1
  78. package/esm/models/components/orderdetail.js +1 -1
  79. package/esm/models/components/orderdetail.js.map +1 -1
  80. package/esm/models/components/{productlist.d.ts → product.d.ts} +14 -16
  81. package/esm/models/components/product.d.ts.map +1 -0
  82. package/esm/models/components/{productlist.js → product.js} +16 -20
  83. package/esm/models/components/product.js.map +1 -0
  84. package/esm/models/components/productdetail.d.ts +4 -4
  85. package/esm/models/components/productdetail.d.ts.map +1 -1
  86. package/esm/models/components/productdetail.js +4 -4
  87. package/esm/models/components/productdetail.js.map +1 -1
  88. package/esm/models/components/productlistresponse.d.ts +3 -3
  89. package/esm/models/components/productlistresponse.d.ts.map +1 -1
  90. package/esm/models/components/productlistresponse.js +3 -3
  91. package/esm/models/components/productlistresponse.js.map +1 -1
  92. package/esm/models/components/productpromotion.d.ts +11 -5
  93. package/esm/models/components/productpromotion.d.ts.map +1 -1
  94. package/esm/models/operations/getpaymentmethods.d.ts +143 -0
  95. package/esm/models/operations/getpaymentmethods.d.ts.map +1 -0
  96. package/esm/models/operations/{getpaymentspaymentmethods.js → getpaymentmethods.js} +42 -44
  97. package/esm/models/operations/getpaymentmethods.js.map +1 -0
  98. package/esm/models/operations/getsimilar.d.ts +2 -27
  99. package/esm/models/operations/getsimilar.d.ts.map +1 -1
  100. package/esm/models/operations/getsimilar.js +2 -27
  101. package/esm/models/operations/getsimilar.js.map +1 -1
  102. package/esm/models/operations/index.d.ts +1 -2
  103. package/esm/models/operations/index.d.ts.map +1 -1
  104. package/esm/models/operations/index.js +1 -2
  105. package/esm/models/operations/index.js.map +1 -1
  106. package/esm/models/operations/postcartitemid.d.ts +15 -15
  107. package/esm/models/operations/postcartitemid.d.ts.map +1 -1
  108. package/esm/models/operations/postcartitemid.js +15 -15
  109. package/esm/models/operations/postcartitemid.js.map +1 -1
  110. package/esm/sdk/{cestorefrontpayments.d.ts → cestorefrontorderspayments.d.ts} +2 -2
  111. package/esm/sdk/cestorefrontorderspayments.d.ts.map +1 -0
  112. package/esm/sdk/{cestorefrontpayments.js → cestorefrontorderspayments.js} +2 -2
  113. package/esm/sdk/cestorefrontorderspayments.js.map +1 -0
  114. package/esm/sdk/customers.d.ts +24 -1
  115. package/esm/sdk/customers.d.ts.map +1 -1
  116. package/esm/sdk/customers.js +31 -0
  117. package/esm/sdk/customers.js.map +1 -1
  118. package/esm/sdk/{paymentsapijuspay.d.ts → juspay.d.ts} +2 -2
  119. package/esm/sdk/juspay.d.ts.map +1 -0
  120. package/esm/sdk/{paymentsapijuspay.js → juspay.js} +8 -8
  121. package/esm/sdk/juspay.js.map +1 -0
  122. package/esm/sdk/orders.d.ts +9 -2
  123. package/esm/sdk/orders.d.ts.map +1 -1
  124. package/esm/sdk/orders.js +12 -2
  125. package/esm/sdk/orders.js.map +1 -1
  126. package/esm/sdk/payments.d.ts +23 -1
  127. package/esm/sdk/payments.d.ts.map +1 -1
  128. package/esm/sdk/payments.js +31 -0
  129. package/esm/sdk/payments.js.map +1 -1
  130. package/esm/sdk/products.d.ts +1 -1
  131. package/esm/sdk/products.js +1 -1
  132. package/esm/sdk/sdk.d.ts +3 -12
  133. package/esm/sdk/sdk.d.ts.map +1 -1
  134. package/esm/sdk/sdk.js +3 -15
  135. package/esm/sdk/sdk.js.map +1 -1
  136. package/jsr.json +1 -1
  137. package/package.json +1 -1
  138. package/src/funcs/catalogProductsGet.ts +1 -1
  139. package/src/funcs/{customersAPIGetCustomersId.ts → customersGetCustomersId.ts} +1 -1
  140. package/src/funcs/{customersAPIPostCustomers.ts → customersPostCustomers.ts} +1 -1
  141. package/src/funcs/{customersAPIPutCustomersId.ts → customersPutCustomersId.ts} +1 -1
  142. package/src/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.ts → juspayGetPaymentsJuspayCustomer.ts} +1 -1
  143. package/src/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.ts → juspayPostPaymentsJuspayCreateCustomer.ts} +1 -1
  144. package/src/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.ts → juspayPostPaymentsJuspayCreateOrder.ts} +1 -1
  145. package/src/funcs/{ordersAPIGetOrdersIdPaymentStatus.ts → ordersGetOrdersIdPaymentStatus.ts} +1 -1
  146. package/src/funcs/paymentsGetMethods.ts +6 -7
  147. package/src/funcs/{paymentsAPIGetPaymentsCards.ts → paymentsGetPaymentsCards.ts} +1 -1
  148. package/src/funcs/{paymentsAPIGetPaymentsVerifyVpa.ts → paymentsGetPaymentsVerifyVpa.ts} +1 -1
  149. package/src/funcs/{paymentsAPIPostPaymentsCards.ts → paymentsPostPaymentsCards.ts} +1 -1
  150. package/src/lib/config.ts +2 -2
  151. package/src/models/components/cart.ts +1 -1
  152. package/src/models/components/createcustomer.ts +1 -1
  153. package/src/models/components/freegoodspromotion.ts +4 -4
  154. package/src/models/components/index.ts +2 -3
  155. package/src/models/components/orderdetail.ts +1 -1
  156. package/src/models/components/{productlist.ts → product.ts} +73 -78
  157. package/src/models/components/productdetail.ts +8 -8
  158. package/src/models/components/productlistresponse.ts +9 -9
  159. package/src/models/operations/{getpaymentspaymentmethods.ts → getpaymentmethods.ts} +68 -77
  160. package/src/models/operations/getsimilar.ts +4 -62
  161. package/src/models/operations/index.ts +1 -2
  162. package/src/models/operations/postcartitemid.ts +27 -25
  163. package/src/sdk/{cestorefrontpayments.ts → cestorefrontorderspayments.ts} +1 -1
  164. package/src/sdk/customers.ts +58 -1
  165. package/src/sdk/{paymentsapijuspay.ts → juspay.ts} +7 -7
  166. package/src/sdk/orders.ts +22 -4
  167. package/src/sdk/payments.ts +57 -2
  168. package/src/sdk/products.ts +1 -1
  169. package/src/sdk/sdk.ts +4 -22
  170. package/docs/sdks/customersapi/README.md +0 -321
  171. package/docs/sdks/ordersapi/README.md +0 -86
  172. package/docs/sdks/paymentsapi/README.md +0 -247
  173. package/esm/funcs/customersAPIGetCustomersId.d.ts.map +0 -1
  174. package/esm/funcs/customersAPIGetCustomersId.js.map +0 -1
  175. package/esm/funcs/customersAPIGetRecommendedProducts.d.ts +0 -16
  176. package/esm/funcs/customersAPIGetRecommendedProducts.d.ts.map +0 -1
  177. package/esm/funcs/customersAPIGetRecommendedProducts.js +0 -80
  178. package/esm/funcs/customersAPIGetRecommendedProducts.js.map +0 -1
  179. package/esm/funcs/customersAPIPostCustomers.d.ts.map +0 -1
  180. package/esm/funcs/customersAPIPutCustomersId.d.ts.map +0 -1
  181. package/esm/funcs/customersAPIPutCustomersId.js.map +0 -1
  182. package/esm/funcs/ordersAPIGetOrdersIdPaymentStatus.d.ts.map +0 -1
  183. package/esm/funcs/ordersAPIGetOrdersIdPaymentStatus.js.map +0 -1
  184. package/esm/funcs/paymentsAPIGetPaymentsCards.d.ts.map +0 -1
  185. package/esm/funcs/paymentsAPIGetPaymentsCards.js.map +0 -1
  186. package/esm/funcs/paymentsAPIGetPaymentsVerifyVpa.d.ts.map +0 -1
  187. package/esm/funcs/paymentsAPIGetPaymentsVerifyVpa.js.map +0 -1
  188. package/esm/funcs/paymentsAPIJuspayGetPaymentsJuspayCustomer.d.ts.map +0 -1
  189. package/esm/funcs/paymentsAPIJuspayGetPaymentsJuspayCustomer.js.map +0 -1
  190. package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.d.ts.map +0 -1
  191. package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.js.map +0 -1
  192. package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateOrder.d.ts.map +0 -1
  193. package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateOrder.js.map +0 -1
  194. package/esm/funcs/paymentsAPIPostPaymentsCards.d.ts.map +0 -1
  195. package/esm/funcs/paymentsAPIPostPaymentsCards.js.map +0 -1
  196. package/esm/models/components/customeraddressinput.d.ts.map +0 -1
  197. package/esm/models/components/customeraddressinput.js.map +0 -1
  198. package/esm/models/components/productlist.d.ts.map +0 -1
  199. package/esm/models/components/productlist.js.map +0 -1
  200. package/esm/models/components/recommendedproduct.d.ts +0 -155
  201. package/esm/models/components/recommendedproduct.d.ts.map +0 -1
  202. package/esm/models/components/recommendedproduct.js +0 -193
  203. package/esm/models/components/recommendedproduct.js.map +0 -1
  204. package/esm/models/operations/getpaymentspaymentmethods.d.ts +0 -143
  205. package/esm/models/operations/getpaymentspaymentmethods.d.ts.map +0 -1
  206. package/esm/models/operations/getpaymentspaymentmethods.js.map +0 -1
  207. package/esm/models/operations/getrecommendedproducts.d.ts +0 -90
  208. package/esm/models/operations/getrecommendedproducts.d.ts.map +0 -1
  209. package/esm/models/operations/getrecommendedproducts.js +0 -87
  210. package/esm/models/operations/getrecommendedproducts.js.map +0 -1
  211. package/esm/sdk/cestorefrontpayments.d.ts.map +0 -1
  212. package/esm/sdk/cestorefrontpayments.js.map +0 -1
  213. package/esm/sdk/customersapi.d.ts +0 -34
  214. package/esm/sdk/customersapi.d.ts.map +0 -1
  215. package/esm/sdk/customersapi.js +0 -48
  216. package/esm/sdk/customersapi.js.map +0 -1
  217. package/esm/sdk/ordersapi.d.ts +0 -12
  218. package/esm/sdk/ordersapi.d.ts.map +0 -1
  219. package/esm/sdk/ordersapi.js +0 -18
  220. package/esm/sdk/ordersapi.js.map +0 -1
  221. package/esm/sdk/paymentsapi.d.ts +0 -27
  222. package/esm/sdk/paymentsapi.d.ts.map +0 -1
  223. package/esm/sdk/paymentsapi.js +0 -39
  224. package/esm/sdk/paymentsapi.js.map +0 -1
  225. package/esm/sdk/paymentsapijuspay.d.ts.map +0 -1
  226. package/esm/sdk/paymentsapijuspay.js.map +0 -1
  227. package/src/funcs/customersAPIGetRecommendedProducts.ts +0 -144
  228. package/src/models/components/recommendedproduct.ts +0 -385
  229. package/src/models/operations/getrecommendedproducts.ts +0 -206
  230. package/src/sdk/customersapi.ts +0 -82
  231. package/src/sdk/ordersapi.ts +0 -27
  232. package/src/sdk/paymentsapi.ts +0 -64
  233. package/src/models/components/{customeraddressinput.ts → customeraddress.ts} +60 -60
@@ -28,17 +28,13 @@ export type GetSimilarRequest = {
28
28
  sortBy?: string | undefined;
29
29
  };
30
30
 
31
- export type GetSimilarContent = {
32
- products?: Array<components.ProductList> | undefined;
33
- };
34
-
35
31
  /**
36
32
  * Success response
37
33
  */
38
34
  export type GetSimilarResponseBody = {
39
35
  message?: string | undefined;
40
36
  success?: boolean | undefined;
41
- content?: GetSimilarContent | undefined;
37
+ content?: components.ProductListResponse | undefined;
42
38
  };
43
39
 
44
40
  /** @internal */
@@ -114,60 +110,6 @@ export function getSimilarRequestFromJSON(
114
110
  );
115
111
  }
116
112
 
117
- /** @internal */
118
- export const GetSimilarContent$inboundSchema: z.ZodType<
119
- GetSimilarContent,
120
- z.ZodTypeDef,
121
- unknown
122
- > = z.object({
123
- products: z.array(components.ProductList$inboundSchema).optional(),
124
- });
125
-
126
- /** @internal */
127
- export type GetSimilarContent$Outbound = {
128
- products?: Array<components.ProductList$Outbound> | undefined;
129
- };
130
-
131
- /** @internal */
132
- export const GetSimilarContent$outboundSchema: z.ZodType<
133
- GetSimilarContent$Outbound,
134
- z.ZodTypeDef,
135
- GetSimilarContent
136
- > = z.object({
137
- products: z.array(components.ProductList$outboundSchema).optional(),
138
- });
139
-
140
- /**
141
- * @internal
142
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
143
- */
144
- export namespace GetSimilarContent$ {
145
- /** @deprecated use `GetSimilarContent$inboundSchema` instead. */
146
- export const inboundSchema = GetSimilarContent$inboundSchema;
147
- /** @deprecated use `GetSimilarContent$outboundSchema` instead. */
148
- export const outboundSchema = GetSimilarContent$outboundSchema;
149
- /** @deprecated use `GetSimilarContent$Outbound` instead. */
150
- export type Outbound = GetSimilarContent$Outbound;
151
- }
152
-
153
- export function getSimilarContentToJSON(
154
- getSimilarContent: GetSimilarContent,
155
- ): string {
156
- return JSON.stringify(
157
- GetSimilarContent$outboundSchema.parse(getSimilarContent),
158
- );
159
- }
160
-
161
- export function getSimilarContentFromJSON(
162
- jsonString: string,
163
- ): SafeParseResult<GetSimilarContent, SDKValidationError> {
164
- return safeParse(
165
- jsonString,
166
- (x) => GetSimilarContent$inboundSchema.parse(JSON.parse(x)),
167
- `Failed to parse 'GetSimilarContent' from JSON`,
168
- );
169
- }
170
-
171
113
  /** @internal */
172
114
  export const GetSimilarResponseBody$inboundSchema: z.ZodType<
173
115
  GetSimilarResponseBody,
@@ -176,14 +118,14 @@ export const GetSimilarResponseBody$inboundSchema: z.ZodType<
176
118
  > = z.object({
177
119
  message: z.string().optional(),
178
120
  success: z.boolean().optional(),
179
- content: z.lazy(() => GetSimilarContent$inboundSchema).optional(),
121
+ content: components.ProductListResponse$inboundSchema.optional(),
180
122
  });
181
123
 
182
124
  /** @internal */
183
125
  export type GetSimilarResponseBody$Outbound = {
184
126
  message?: string | undefined;
185
127
  success?: boolean | undefined;
186
- content?: GetSimilarContent$Outbound | undefined;
128
+ content?: components.ProductListResponse$Outbound | undefined;
187
129
  };
188
130
 
189
131
  /** @internal */
@@ -194,7 +136,7 @@ export const GetSimilarResponseBody$outboundSchema: z.ZodType<
194
136
  > = z.object({
195
137
  message: z.string().optional(),
196
138
  success: z.boolean().optional(),
197
- content: z.lazy(() => GetSimilarContent$outboundSchema).optional(),
139
+ content: components.ProductListResponse$outboundSchema.optional(),
198
140
  });
199
141
 
200
142
  /**
@@ -31,9 +31,9 @@ export * from "./getordersidpayments.js";
31
31
  export * from "./getordersidpaymentstatus.js";
32
32
  export * from "./getordersidrefunds.js";
33
33
  export * from "./getordersidshipments.js";
34
+ export * from "./getpaymentmethods.js";
34
35
  export * from "./getpaymentscards.js";
35
36
  export * from "./getpaymentsjuspaycustomer.js";
36
- export * from "./getpaymentspaymentmethods.js";
37
37
  export * from "./getpaymentsverifyvpa.js";
38
38
  export * from "./getproductdetails.js";
39
39
  export * from "./getproducts.js";
@@ -42,7 +42,6 @@ export * from "./getproductsidreviews.js";
42
42
  export * from "./getproductvariantdetail.js";
43
43
  export * from "./getproductvariants.js";
44
44
  export * from "./getpromotions.js";
45
- export * from "./getrecommendedproducts.js";
46
45
  export * from "./getshipmentpincodeserviceability.js";
47
46
  export * from "./getsimilar.js";
48
47
  export * from "./getskus.js";
@@ -9,7 +9,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import * as components from "../components/index.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
- export type PostCartItemIdRequestBody = {
12
+ export type PostCartItemIdAddToCartItem = {
13
13
  productId: string;
14
14
  sku: string;
15
15
  quantity: number;
@@ -22,7 +22,7 @@ export type PostCartItemIdRequest = {
22
22
  * cart id
23
23
  */
24
24
  id: string;
25
- requestBody: PostCartItemIdRequestBody;
25
+ requestBody: PostCartItemIdAddToCartItem;
26
26
  };
27
27
 
28
28
  export type PostCartItemIdContent = {
@@ -42,8 +42,8 @@ export type PostCartItemIdResponseBody = {
42
42
  };
43
43
 
44
44
  /** @internal */
45
- export const PostCartItemIdRequestBody$inboundSchema: z.ZodType<
46
- PostCartItemIdRequestBody,
45
+ export const PostCartItemIdAddToCartItem$inboundSchema: z.ZodType<
46
+ PostCartItemIdAddToCartItem,
47
47
  z.ZodTypeDef,
48
48
  unknown
49
49
  > = z.object({
@@ -61,7 +61,7 @@ export const PostCartItemIdRequestBody$inboundSchema: z.ZodType<
61
61
  });
62
62
 
63
63
  /** @internal */
64
- export type PostCartItemIdRequestBody$Outbound = {
64
+ export type PostCartItemIdAddToCartItem$Outbound = {
65
65
  product_id: string;
66
66
  sku: string;
67
67
  quantity: number;
@@ -70,10 +70,10 @@ export type PostCartItemIdRequestBody$Outbound = {
70
70
  };
71
71
 
72
72
  /** @internal */
73
- export const PostCartItemIdRequestBody$outboundSchema: z.ZodType<
74
- PostCartItemIdRequestBody$Outbound,
73
+ export const PostCartItemIdAddToCartItem$outboundSchema: z.ZodType<
74
+ PostCartItemIdAddToCartItem$Outbound,
75
75
  z.ZodTypeDef,
76
- PostCartItemIdRequestBody
76
+ PostCartItemIdAddToCartItem
77
77
  > = z.object({
78
78
  productId: z.string(),
79
79
  sku: z.string(),
@@ -92,30 +92,32 @@ export const PostCartItemIdRequestBody$outboundSchema: z.ZodType<
92
92
  * @internal
93
93
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
94
94
  */
95
- export namespace PostCartItemIdRequestBody$ {
96
- /** @deprecated use `PostCartItemIdRequestBody$inboundSchema` instead. */
97
- export const inboundSchema = PostCartItemIdRequestBody$inboundSchema;
98
- /** @deprecated use `PostCartItemIdRequestBody$outboundSchema` instead. */
99
- export const outboundSchema = PostCartItemIdRequestBody$outboundSchema;
100
- /** @deprecated use `PostCartItemIdRequestBody$Outbound` instead. */
101
- export type Outbound = PostCartItemIdRequestBody$Outbound;
95
+ export namespace PostCartItemIdAddToCartItem$ {
96
+ /** @deprecated use `PostCartItemIdAddToCartItem$inboundSchema` instead. */
97
+ export const inboundSchema = PostCartItemIdAddToCartItem$inboundSchema;
98
+ /** @deprecated use `PostCartItemIdAddToCartItem$outboundSchema` instead. */
99
+ export const outboundSchema = PostCartItemIdAddToCartItem$outboundSchema;
100
+ /** @deprecated use `PostCartItemIdAddToCartItem$Outbound` instead. */
101
+ export type Outbound = PostCartItemIdAddToCartItem$Outbound;
102
102
  }
103
103
 
104
- export function postCartItemIdRequestBodyToJSON(
105
- postCartItemIdRequestBody: PostCartItemIdRequestBody,
104
+ export function postCartItemIdAddToCartItemToJSON(
105
+ postCartItemIdAddToCartItem: PostCartItemIdAddToCartItem,
106
106
  ): string {
107
107
  return JSON.stringify(
108
- PostCartItemIdRequestBody$outboundSchema.parse(postCartItemIdRequestBody),
108
+ PostCartItemIdAddToCartItem$outboundSchema.parse(
109
+ postCartItemIdAddToCartItem,
110
+ ),
109
111
  );
110
112
  }
111
113
 
112
- export function postCartItemIdRequestBodyFromJSON(
114
+ export function postCartItemIdAddToCartItemFromJSON(
113
115
  jsonString: string,
114
- ): SafeParseResult<PostCartItemIdRequestBody, SDKValidationError> {
116
+ ): SafeParseResult<PostCartItemIdAddToCartItem, SDKValidationError> {
115
117
  return safeParse(
116
118
  jsonString,
117
- (x) => PostCartItemIdRequestBody$inboundSchema.parse(JSON.parse(x)),
118
- `Failed to parse 'PostCartItemIdRequestBody' from JSON`,
119
+ (x) => PostCartItemIdAddToCartItem$inboundSchema.parse(JSON.parse(x)),
120
+ `Failed to parse 'PostCartItemIdAddToCartItem' from JSON`,
119
121
  );
120
122
  }
121
123
 
@@ -126,7 +128,7 @@ export const PostCartItemIdRequest$inboundSchema: z.ZodType<
126
128
  unknown
127
129
  > = z.object({
128
130
  id: z.string(),
129
- RequestBody: z.lazy(() => PostCartItemIdRequestBody$inboundSchema),
131
+ RequestBody: z.lazy(() => PostCartItemIdAddToCartItem$inboundSchema),
130
132
  }).transform((v) => {
131
133
  return remap$(v, {
132
134
  "RequestBody": "requestBody",
@@ -136,7 +138,7 @@ export const PostCartItemIdRequest$inboundSchema: z.ZodType<
136
138
  /** @internal */
137
139
  export type PostCartItemIdRequest$Outbound = {
138
140
  id: string;
139
- RequestBody: PostCartItemIdRequestBody$Outbound;
141
+ RequestBody: PostCartItemIdAddToCartItem$Outbound;
140
142
  };
141
143
 
142
144
  /** @internal */
@@ -146,7 +148,7 @@ export const PostCartItemIdRequest$outboundSchema: z.ZodType<
146
148
  PostCartItemIdRequest
147
149
  > = z.object({
148
150
  id: z.string(),
149
- requestBody: z.lazy(() => PostCartItemIdRequestBody$outboundSchema),
151
+ requestBody: z.lazy(() => PostCartItemIdAddToCartItem$outboundSchema),
150
152
  }).transform((v) => {
151
153
  return remap$(v, {
152
154
  requestBody: "RequestBody",
@@ -7,7 +7,7 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
7
  import * as operations from "../models/operations/index.js";
8
8
  import { unwrapAsync } from "../types/fp.js";
9
9
 
10
- export class CeStorefrontPayments extends ClientSDK {
10
+ export class CeStorefrontOrdersPayments extends ClientSDK {
11
11
  /**
12
12
  * Retrieve order payments
13
13
  *
@@ -2,7 +2,13 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { ClientSDK } from "../lib/sdks.js";
5
+ import { customersGetCustomersId } from "../funcs/customersGetCustomersId.js";
6
+ import { customersPostCustomers } from "../funcs/customersPostCustomers.js";
7
+ import { customersPutCustomersId } from "../funcs/customersPutCustomersId.js";
8
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
9
+ import * as components from "../models/components/index.js";
10
+ import * as operations from "../models/operations/index.js";
11
+ import { unwrapAsync } from "../types/fp.js";
6
12
  import { Addresses } from "./addresses.js";
7
13
  import { Loyalty } from "./loyalty.js";
8
14
  import { Reviews } from "./reviews.js";
@@ -22,4 +28,55 @@ export class Customers extends ClientSDK {
22
28
  get reviews(): Reviews {
23
29
  return (this._reviews ??= new Reviews(this._options));
24
30
  }
31
+
32
+ /**
33
+ * Create customer
34
+ *
35
+ * @remarks
36
+ * Create customer
37
+ */
38
+ async postCustomers(
39
+ request: components.CreateCustomer,
40
+ options?: RequestOptions,
41
+ ): Promise<operations.PostCustomersResponseBody> {
42
+ return unwrapAsync(customersPostCustomers(
43
+ this,
44
+ request,
45
+ options,
46
+ ));
47
+ }
48
+
49
+ /**
50
+ * Retrieve customer detail
51
+ *
52
+ * @remarks
53
+ * Retrieve customer detail.
54
+ */
55
+ async getCustomersId(
56
+ request: operations.GetCustomersIdRequest,
57
+ options?: RequestOptions,
58
+ ): Promise<operations.GetCustomersIdResponseBody> {
59
+ return unwrapAsync(customersGetCustomersId(
60
+ this,
61
+ request,
62
+ options,
63
+ ));
64
+ }
65
+
66
+ /**
67
+ * Update customer detail
68
+ *
69
+ * @remarks
70
+ * Update customer detail
71
+ */
72
+ async putCustomersId(
73
+ request: operations.PutCustomersIdRequest,
74
+ options?: RequestOptions,
75
+ ): Promise<operations.PutCustomersIdResponseBody> {
76
+ return unwrapAsync(customersPutCustomersId(
77
+ this,
78
+ request,
79
+ options,
80
+ ));
81
+ }
25
82
  }
@@ -2,15 +2,15 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
- import { paymentsAPIJuspayGetPaymentsJuspayCustomer } from "../funcs/paymentsAPIJuspayGetPaymentsJuspayCustomer.js";
6
- import { paymentsAPIJuspayPostPaymentsJuspayCreateCustomer } from "../funcs/paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.js";
7
- import { paymentsAPIJuspayPostPaymentsJuspayCreateOrder } from "../funcs/paymentsAPIJuspayPostPaymentsJuspayCreateOrder.js";
5
+ import { juspayGetPaymentsJuspayCustomer } from "../funcs/juspayGetPaymentsJuspayCustomer.js";
6
+ import { juspayPostPaymentsJuspayCreateCustomer } from "../funcs/juspayPostPaymentsJuspayCreateCustomer.js";
7
+ import { juspayPostPaymentsJuspayCreateOrder } from "../funcs/juspayPostPaymentsJuspayCreateOrder.js";
8
8
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
9
9
  import * as components from "../models/components/index.js";
10
10
  import * as operations from "../models/operations/index.js";
11
11
  import { unwrapAsync } from "../types/fp.js";
12
12
 
13
- export class PaymentsAPIJuspay extends ClientSDK {
13
+ export class Juspay extends ClientSDK {
14
14
  /**
15
15
  * Create order in juspay
16
16
  *
@@ -22,7 +22,7 @@ export class PaymentsAPIJuspay extends ClientSDK {
22
22
  request: components.JuspayCreateOrderPayload,
23
23
  options?: RequestOptions,
24
24
  ): Promise<operations.PostPaymentsJuspayCreateOrderResponseBody> {
25
- return unwrapAsync(paymentsAPIJuspayPostPaymentsJuspayCreateOrder(
25
+ return unwrapAsync(juspayPostPaymentsJuspayCreateOrder(
26
26
  this,
27
27
  request,
28
28
  options,
@@ -39,7 +39,7 @@ export class PaymentsAPIJuspay extends ClientSDK {
39
39
  request: components.JuspayCreateCustomerPayload,
40
40
  options?: RequestOptions,
41
41
  ): Promise<operations.PostPaymentsJuspayCreateCustomerResponseBody> {
42
- return unwrapAsync(paymentsAPIJuspayPostPaymentsJuspayCreateCustomer(
42
+ return unwrapAsync(juspayPostPaymentsJuspayCreateCustomer(
43
43
  this,
44
44
  request,
45
45
  options,
@@ -56,7 +56,7 @@ export class PaymentsAPIJuspay extends ClientSDK {
56
56
  request: operations.GetPaymentsJuspayCustomerRequest,
57
57
  options?: RequestOptions,
58
58
  ): Promise<operations.GetPaymentsJuspayCustomerResponseBody> {
59
- return unwrapAsync(paymentsAPIJuspayGetPaymentsJuspayCustomer(
59
+ return unwrapAsync(juspayGetPaymentsJuspayCustomer(
60
60
  this,
61
61
  request,
62
62
  options,
package/src/sdk/orders.ts CHANGED
@@ -5,12 +5,13 @@
5
5
  import { ordersCancel } from "../funcs/ordersCancel.js";
6
6
  import { ordersCreate } from "../funcs/ordersCreate.js";
7
7
  import { ordersGet } from "../funcs/ordersGet.js";
8
+ import { ordersGetOrdersIdPaymentStatus } from "../funcs/ordersGetOrdersIdPaymentStatus.js";
8
9
  import { ordersList } from "../funcs/ordersList.js";
9
10
  import { ordersRetryPayment } from "../funcs/ordersRetryPayment.js";
10
11
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
11
12
  import * as operations from "../models/operations/index.js";
12
13
  import { unwrapAsync } from "../types/fp.js";
13
- import { CeStorefrontPayments } from "./cestorefrontpayments.js";
14
+ import { CeStorefrontOrdersPayments } from "./cestorefrontorderspayments.js";
14
15
  import { Refunds } from "./refunds.js";
15
16
  import { Shipments } from "./shipments.js";
16
17
 
@@ -25,9 +26,9 @@ export class Orders extends ClientSDK {
25
26
  return (this._refunds ??= new Refunds(this._options));
26
27
  }
27
28
 
28
- private _payments?: CeStorefrontPayments;
29
- get payments(): CeStorefrontPayments {
30
- return (this._payments ??= new CeStorefrontPayments(this._options));
29
+ private _payments?: CeStorefrontOrdersPayments;
30
+ get payments(): CeStorefrontOrdersPayments {
31
+ return (this._payments ??= new CeStorefrontOrdersPayments(this._options));
31
32
  }
32
33
 
33
34
  /**
@@ -114,4 +115,21 @@ export class Orders extends ClientSDK {
114
115
  options,
115
116
  ));
116
117
  }
118
+
119
+ /**
120
+ * Retrieve payment status
121
+ *
122
+ * @remarks
123
+ * Retrieve payment status of a paricular order.
124
+ */
125
+ async getOrdersIdPaymentStatus(
126
+ request: operations.GetOrdersIdPaymentStatusRequest,
127
+ options?: RequestOptions,
128
+ ): Promise<operations.GetOrdersIdPaymentStatusResponseBody> {
129
+ return unwrapAsync(ordersGetOrdersIdPaymentStatus(
130
+ this,
131
+ request,
132
+ options,
133
+ ));
134
+ }
117
135
  }
@@ -4,6 +4,9 @@
4
4
 
5
5
  import { paymentsGenerateHash } from "../funcs/paymentsGenerateHash.js";
6
6
  import { paymentsGetMethods } from "../funcs/paymentsGetMethods.js";
7
+ import { paymentsGetPaymentsCards } from "../funcs/paymentsGetPaymentsCards.js";
8
+ import { paymentsGetPaymentsVerifyVpa } from "../funcs/paymentsGetPaymentsVerifyVpa.js";
9
+ import { paymentsPostPaymentsCards } from "../funcs/paymentsPostPaymentsCards.js";
7
10
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
11
  import * as operations from "../models/operations/index.js";
9
12
  import { unwrapAsync } from "../types/fp.js";
@@ -33,13 +36,65 @@ export class Payments extends ClientSDK {
33
36
  * List all payment methods
34
37
  */
35
38
  async getMethods(
36
- request: operations.GetPaymentsPaymentMethodsRequest,
39
+ request: operations.GetPaymentMethodsRequest,
37
40
  options?: RequestOptions,
38
- ): Promise<operations.GetPaymentsPaymentMethodsResponseBody> {
41
+ ): Promise<operations.GetPaymentMethodsResponseBody> {
39
42
  return unwrapAsync(paymentsGetMethods(
40
43
  this,
41
44
  request,
42
45
  options,
43
46
  ));
44
47
  }
48
+
49
+ /**
50
+ * List all saved cards
51
+ *
52
+ * @remarks
53
+ * List all saved cards.
54
+ */
55
+ async getPaymentsCards(
56
+ request: operations.GetPaymentsCardsRequest,
57
+ options?: RequestOptions,
58
+ ): Promise<operations.GetPaymentsCardsResponseBody> {
59
+ return unwrapAsync(paymentsGetPaymentsCards(
60
+ this,
61
+ request,
62
+ options,
63
+ ));
64
+ }
65
+
66
+ /**
67
+ * Add card
68
+ *
69
+ * @remarks
70
+ * Add a new card
71
+ */
72
+ async postPaymentsCards(
73
+ request: operations.PostPaymentsCardsRequestBody,
74
+ options?: RequestOptions,
75
+ ): Promise<operations.PostPaymentsCardsResponseBody> {
76
+ return unwrapAsync(paymentsPostPaymentsCards(
77
+ this,
78
+ request,
79
+ options,
80
+ ));
81
+ }
82
+
83
+ /**
84
+ * Verify VPA
85
+ *
86
+ * @remarks
87
+ * The Virtual Payment Address or VPA is a unique ID given to an individual using the Unified Payment Interface (UPI) service to send or receive money. In the case of UPI collect VPA is the mandatory param and merchants are always advised to check if the VPA is valid or not.
88
+ * Validating the VPA will help in reducing the failure rate due to incorrect vpa.
89
+ */
90
+ async getPaymentsVerifyVpa(
91
+ request: operations.GetPaymentsVerifyVpaRequest,
92
+ options?: RequestOptions,
93
+ ): Promise<operations.GetPaymentsVerifyVpaResponseBody> {
94
+ return unwrapAsync(paymentsGetPaymentsVerifyVpa(
95
+ this,
96
+ request,
97
+ options,
98
+ ));
99
+ }
45
100
  }
@@ -42,7 +42,7 @@ export class Products extends ClientSDK {
42
42
  }
43
43
 
44
44
  /**
45
- * Retrieve a product
45
+ * Retrieve a product detail
46
46
  *
47
47
  * @remarks
48
48
  * Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Commerce Engine will return the corresponding product information.
package/src/sdk/sdk.ts CHANGED
@@ -10,13 +10,10 @@ import { Carts } from "./carts.js";
10
10
  import { Catalog } from "./catalog.js";
11
11
  import { Checkout } from "./checkout.js";
12
12
  import { Customers } from "./customers.js";
13
- import { CustomersAPI } from "./customersapi.js";
13
+ import { Juspay } from "./juspay.js";
14
14
  import { Offers } from "./offers.js";
15
15
  import { Orders } from "./orders.js";
16
- import { OrdersAPI } from "./ordersapi.js";
17
16
  import { Payments } from "./payments.js";
18
- import { PaymentsAPI } from "./paymentsapi.js";
19
- import { PaymentsAPIJuspay } from "./paymentsapijuspay.js";
20
17
  import { Shipping } from "./shipping.js";
21
18
  import { User } from "./user.js";
22
19
  import { Utils } from "./utils.js";
@@ -28,11 +25,6 @@ export class CeStorefront extends ClientSDK {
28
25
  return (this._catalog ??= new Catalog(this._options));
29
26
  }
30
27
 
31
- private _customersAPI?: CustomersAPI;
32
- get customersAPI(): CustomersAPI {
33
- return (this._customersAPI ??= new CustomersAPI(this._options));
34
- }
35
-
36
28
  private _carts?: Carts;
37
29
  get carts(): Carts {
38
30
  return (this._carts ??= new Carts(this._options));
@@ -63,11 +55,6 @@ export class CeStorefront extends ClientSDK {
63
55
  return (this._orders ??= new Orders(this._options));
64
56
  }
65
57
 
66
- private _ordersAPI?: OrdersAPI;
67
- get ordersAPI(): OrdersAPI {
68
- return (this._ordersAPI ??= new OrdersAPI(this._options));
69
- }
70
-
71
58
  private _shipping?: Shipping;
72
59
  get shipping(): Shipping {
73
60
  return (this._shipping ??= new Shipping(this._options));
@@ -88,14 +75,9 @@ export class CeStorefront extends ClientSDK {
88
75
  return (this._payments ??= new Payments(this._options));
89
76
  }
90
77
 
91
- private _paymentsAPI?: PaymentsAPI;
92
- get paymentsAPI(): PaymentsAPI {
93
- return (this._paymentsAPI ??= new PaymentsAPI(this._options));
94
- }
95
-
96
- private _paymentsAPIJuspay?: PaymentsAPIJuspay;
97
- get paymentsAPIJuspay(): PaymentsAPIJuspay {
98
- return (this._paymentsAPIJuspay ??= new PaymentsAPIJuspay(this._options));
78
+ private _juspay?: Juspay;
79
+ get juspay(): Juspay {
80
+ return (this._juspay ??= new Juspay(this._options));
99
81
  }
100
82
 
101
83
  private _utils?: Utils;