ce-storefront 0.15.30 → 0.16.0

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 (299) hide show
  1. package/README.md +6 -8
  2. package/RUNTIMES.md +6 -6
  3. package/docs/sdks/auth/README.md +32 -16
  4. package/esm/funcs/authGenerateOtp.d.ts +1 -1
  5. package/esm/funcs/authGenerateOtp.d.ts.map +1 -1
  6. package/esm/funcs/authGenerateOtp.js +8 -4
  7. package/esm/funcs/authGenerateOtp.js.map +1 -1
  8. package/esm/funcs/authGetUserDetail.js +1 -1
  9. package/esm/funcs/authGetUserDetail.js.map +1 -1
  10. package/esm/funcs/authLoginWithEmail.d.ts +1 -1
  11. package/esm/funcs/authLoginWithEmail.d.ts.map +1 -1
  12. package/esm/funcs/authLoginWithEmail.js +8 -4
  13. package/esm/funcs/authLoginWithEmail.js.map +1 -1
  14. package/esm/funcs/authLoginWithPhone.d.ts +1 -1
  15. package/esm/funcs/authLoginWithPhone.d.ts.map +1 -1
  16. package/esm/funcs/authLoginWithPhone.js +8 -4
  17. package/esm/funcs/authLoginWithPhone.js.map +1 -1
  18. package/esm/funcs/authLoginWithWhatsapp.d.ts +1 -1
  19. package/esm/funcs/authLoginWithWhatsapp.d.ts.map +1 -1
  20. package/esm/funcs/authLoginWithWhatsapp.js +8 -4
  21. package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
  22. package/esm/funcs/authLogout.js +1 -1
  23. package/esm/funcs/authLogout.js.map +1 -1
  24. package/esm/funcs/authRefreshToken.js +1 -1
  25. package/esm/funcs/authRefreshToken.js.map +1 -1
  26. package/esm/funcs/authUpdateUser.js +1 -1
  27. package/esm/funcs/authUpdateUser.js.map +1 -1
  28. package/esm/funcs/authVerifyOtp.js +1 -1
  29. package/esm/funcs/authVerifyOtp.js.map +1 -1
  30. package/esm/funcs/cartsAddShippingMethod.js +1 -1
  31. package/esm/funcs/cartsAddShippingMethod.js.map +1 -1
  32. package/esm/funcs/cartsApplyCoupon.js +1 -1
  33. package/esm/funcs/cartsApplyCoupon.js.map +1 -1
  34. package/esm/funcs/cartsCreateCart.js +1 -1
  35. package/esm/funcs/cartsCreateCart.js.map +1 -1
  36. package/esm/funcs/cartsCreateCartAddress.js +1 -1
  37. package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
  38. package/esm/funcs/cartsDeleteCart.js +1 -1
  39. package/esm/funcs/cartsDeleteCart.js.map +1 -1
  40. package/esm/funcs/cartsGetCart.js +1 -1
  41. package/esm/funcs/cartsGetCart.js.map +1 -1
  42. package/esm/funcs/cartsGetUserCart.js +1 -1
  43. package/esm/funcs/cartsGetUserCart.js.map +1 -1
  44. package/esm/funcs/cartsRedeemLoyaltyPoints.js +1 -1
  45. package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -1
  46. package/esm/funcs/cartsRemoveCoupon.js +1 -1
  47. package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
  48. package/esm/funcs/cartsRemoveLoyaltyPoints.js +1 -1
  49. package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -1
  50. package/esm/funcs/cartsRemoveUserCart.js +1 -1
  51. package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
  52. package/esm/funcs/cartsUpdateCart.js +1 -1
  53. package/esm/funcs/cartsUpdateCart.js.map +1 -1
  54. package/esm/funcs/cartsUpdateFulfillmentPreference.js +1 -1
  55. package/esm/funcs/cartsUpdateFulfillmentPreference.js.map +1 -1
  56. package/esm/funcs/catalogGetProductDetail.js +1 -1
  57. package/esm/funcs/catalogGetProductDetail.js.map +1 -1
  58. package/esm/funcs/catalogGetVariantDetail.js +1 -1
  59. package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
  60. package/esm/funcs/catalogListCategories.js +1 -1
  61. package/esm/funcs/catalogListCategories.js.map +1 -1
  62. package/esm/funcs/catalogListCrosssellProducts.js +1 -1
  63. package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
  64. package/esm/funcs/catalogListProductReviews.js +1 -1
  65. package/esm/funcs/catalogListProductReviews.js.map +1 -1
  66. package/esm/funcs/catalogListProductVariants.js +1 -1
  67. package/esm/funcs/catalogListProductVariants.js.map +1 -1
  68. package/esm/funcs/catalogListProducts.js +1 -1
  69. package/esm/funcs/catalogListProducts.js.map +1 -1
  70. package/esm/funcs/catalogListSimilarProducts.js +1 -1
  71. package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
  72. package/esm/funcs/catalogListSkus.js +1 -1
  73. package/esm/funcs/catalogListSkus.js.map +1 -1
  74. package/esm/funcs/catalogListUpsellProducts.js +1 -1
  75. package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
  76. package/esm/funcs/catalogSearchProducts.js +1 -1
  77. package/esm/funcs/catalogSearchProducts.js.map +1 -1
  78. package/esm/funcs/commonListCountryPincodes.js +1 -1
  79. package/esm/funcs/commonListCountryPincodes.js.map +1 -1
  80. package/esm/funcs/customersCreateAddress.js +1 -1
  81. package/esm/funcs/customersCreateAddress.js.map +1 -1
  82. package/esm/funcs/customersDeleteAddress.js +1 -1
  83. package/esm/funcs/customersDeleteAddress.js.map +1 -1
  84. package/esm/funcs/customersGetAddressDetail.js +1 -1
  85. package/esm/funcs/customersGetAddressDetail.js.map +1 -1
  86. package/esm/funcs/customersGetLoyaltyDetails.js +1 -1
  87. package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -1
  88. package/esm/funcs/customersListAddresses.js +1 -1
  89. package/esm/funcs/customersListAddresses.js.map +1 -1
  90. package/esm/funcs/customersListUserReviews.js +1 -1
  91. package/esm/funcs/customersListUserReviews.js.map +1 -1
  92. package/esm/funcs/customersUpdateAddressDetail.js +1 -1
  93. package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
  94. package/esm/funcs/ordersCancelOrder.js +1 -1
  95. package/esm/funcs/ordersCancelOrder.js.map +1 -1
  96. package/esm/funcs/ordersCreateOrder.js +1 -1
  97. package/esm/funcs/ordersCreateOrder.js.map +1 -1
  98. package/esm/funcs/ordersGetOrderDetail.js +1 -1
  99. package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
  100. package/esm/funcs/ordersGetPaymentStatus.js +1 -1
  101. package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
  102. package/esm/funcs/ordersListOrderShipments.js +1 -1
  103. package/esm/funcs/ordersListOrderShipments.js.map +1 -1
  104. package/esm/funcs/ordersListOrders.js +1 -1
  105. package/esm/funcs/ordersListOrders.js.map +1 -1
  106. package/esm/funcs/ordersRetryOrderPayment.js +1 -1
  107. package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
  108. package/esm/funcs/shippingCheckServiceability.js +1 -1
  109. package/esm/funcs/shippingCheckServiceability.js.map +1 -1
  110. package/esm/funcs/shippingFulfillmentOptions.js +1 -1
  111. package/esm/funcs/shippingFulfillmentOptions.js.map +1 -1
  112. package/esm/funcs/shippingShippingMethods.js +1 -1
  113. package/esm/funcs/shippingShippingMethods.js.map +1 -1
  114. package/esm/lib/config.d.ts +3 -3
  115. package/esm/lib/config.js +3 -3
  116. package/esm/lib/config.js.map +1 -1
  117. package/esm/lib/url.js +1 -1
  118. package/esm/lib/url.js.map +1 -1
  119. package/esm/models/components/cart.d.ts +6 -0
  120. package/esm/models/components/cart.d.ts.map +1 -1
  121. package/esm/models/components/cart.js +10 -0
  122. package/esm/models/components/cart.js.map +1 -1
  123. package/esm/models/components/cartitem.d.ts +0 -5
  124. package/esm/models/components/cartitem.d.ts.map +1 -1
  125. package/esm/models/components/cartitem.js +0 -4
  126. package/esm/models/components/cartitem.js.map +1 -1
  127. package/esm/models/components/deliveryfulfillment.d.ts +8 -0
  128. package/esm/models/components/deliveryfulfillment.d.ts.map +1 -1
  129. package/esm/models/components/deliveryfulfillment.js +16 -0
  130. package/esm/models/components/deliveryfulfillment.js.map +1 -1
  131. package/esm/models/components/fulfillmentpreference.d.ts +16 -19
  132. package/esm/models/components/fulfillmentpreference.d.ts.map +1 -1
  133. package/esm/models/components/fulfillmentpreference.js +20 -9
  134. package/esm/models/components/fulfillmentpreference.js.map +1 -1
  135. package/esm/models/components/fulfillmenttype.d.ts +37 -0
  136. package/esm/models/components/fulfillmenttype.d.ts.map +1 -0
  137. package/esm/models/components/fulfillmenttype.js +28 -0
  138. package/esm/models/components/fulfillmenttype.js.map +1 -0
  139. package/esm/models/components/index.d.ts +2 -0
  140. package/esm/models/components/index.d.ts.map +1 -1
  141. package/esm/models/components/index.js +2 -0
  142. package/esm/models/components/index.js.map +1 -1
  143. package/esm/models/components/item.d.ts +0 -5
  144. package/esm/models/components/item.d.ts.map +1 -1
  145. package/esm/models/components/item.js +0 -4
  146. package/esm/models/components/item.js.map +1 -1
  147. package/esm/models/components/order.d.ts +6 -0
  148. package/esm/models/components/order.d.ts.map +1 -1
  149. package/esm/models/components/order.js +10 -0
  150. package/esm/models/components/order.js.map +1 -1
  151. package/esm/models/components/orderdetail.d.ts +6 -0
  152. package/esm/models/components/orderdetail.d.ts.map +1 -1
  153. package/esm/models/components/orderdetail.js +10 -0
  154. package/esm/models/components/orderdetail.js.map +1 -1
  155. package/esm/models/components/orderitem.d.ts +0 -2
  156. package/esm/models/components/orderitem.d.ts.map +1 -1
  157. package/esm/models/components/orderitem.js +0 -4
  158. package/esm/models/components/orderitem.js.map +1 -1
  159. package/esm/models/components/partialcollectanddelivery.d.ts +91 -28
  160. package/esm/models/components/partialcollectanddelivery.d.ts.map +1 -1
  161. package/esm/models/components/partialcollectanddelivery.js +112 -34
  162. package/esm/models/components/partialcollectanddelivery.js.map +1 -1
  163. package/esm/models/components/partialcollectanddeliveryinput.d.ts +173 -0
  164. package/esm/models/components/partialcollectanddeliveryinput.d.ts.map +1 -0
  165. package/esm/models/components/partialcollectanddeliveryinput.js +211 -0
  166. package/esm/models/components/partialcollectanddeliveryinput.js.map +1 -0
  167. package/esm/models/components/product.d.ts +0 -5
  168. package/esm/models/components/product.d.ts.map +1 -1
  169. package/esm/models/components/product.js +0 -4
  170. package/esm/models/components/product.js.map +1 -1
  171. package/esm/models/components/productbundleitem.d.ts +0 -5
  172. package/esm/models/components/productbundleitem.d.ts.map +1 -1
  173. package/esm/models/components/productbundleitem.js +0 -4
  174. package/esm/models/components/productbundleitem.js.map +1 -1
  175. package/esm/models/components/productdetail.d.ts +0 -5
  176. package/esm/models/components/productdetail.d.ts.map +1 -1
  177. package/esm/models/components/productdetail.js +0 -4
  178. package/esm/models/components/productdetail.js.map +1 -1
  179. package/esm/models/components/variant.d.ts +0 -5
  180. package/esm/models/components/variant.d.ts.map +1 -1
  181. package/esm/models/components/variant.js +0 -4
  182. package/esm/models/components/variant.js.map +1 -1
  183. package/esm/models/components/variantdetail.d.ts +0 -5
  184. package/esm/models/components/variantdetail.d.ts.map +1 -1
  185. package/esm/models/components/variantdetail.js +0 -4
  186. package/esm/models/components/variantdetail.js.map +1 -1
  187. package/esm/models/components/variantoption.d.ts +4 -4
  188. package/esm/models/components/variantoption.d.ts.map +1 -1
  189. package/esm/models/components/variantoption.js +4 -4
  190. package/esm/models/components/variantoption.js.map +1 -1
  191. package/esm/models/operations/generateotp.d.ts +30 -0
  192. package/esm/models/operations/generateotp.d.ts.map +1 -1
  193. package/esm/models/operations/generateotp.js +43 -0
  194. package/esm/models/operations/generateotp.js.map +1 -1
  195. package/esm/models/operations/getfulfillmentoptions.d.ts +27 -1
  196. package/esm/models/operations/getfulfillmentoptions.d.ts.map +1 -1
  197. package/esm/models/operations/getfulfillmentoptions.js +21 -2
  198. package/esm/models/operations/getfulfillmentoptions.js.map +1 -1
  199. package/esm/models/operations/loginwithemail.d.ts +30 -0
  200. package/esm/models/operations/loginwithemail.d.ts.map +1 -1
  201. package/esm/models/operations/loginwithemail.js +37 -0
  202. package/esm/models/operations/loginwithemail.js.map +1 -1
  203. package/esm/models/operations/loginwithphone.d.ts +30 -0
  204. package/esm/models/operations/loginwithphone.d.ts.map +1 -1
  205. package/esm/models/operations/loginwithphone.js +37 -0
  206. package/esm/models/operations/loginwithphone.js.map +1 -1
  207. package/esm/models/operations/loginwithwhatsapp.d.ts +30 -0
  208. package/esm/models/operations/loginwithwhatsapp.d.ts.map +1 -1
  209. package/esm/models/operations/loginwithwhatsapp.js +37 -0
  210. package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
  211. package/esm/models/operations/updatefulfillmentpreference.d.ts +4 -4
  212. package/esm/models/operations/updatefulfillmentpreference.d.ts.map +1 -1
  213. package/esm/models/operations/updatefulfillmentpreference.js +4 -4
  214. package/esm/models/operations/updatefulfillmentpreference.js.map +1 -1
  215. package/esm/sdk/auth.d.ts +4 -4
  216. package/esm/sdk/auth.d.ts.map +1 -1
  217. package/esm/sdk/auth.js.map +1 -1
  218. package/examples/package-lock.json +1 -1
  219. package/jsr.json +1 -1
  220. package/package.json +1 -1
  221. package/src/funcs/authGenerateOtp.ts +10 -6
  222. package/src/funcs/authGetUserDetail.ts +1 -1
  223. package/src/funcs/authLoginWithEmail.ts +10 -6
  224. package/src/funcs/authLoginWithPhone.ts +10 -6
  225. package/src/funcs/authLoginWithWhatsapp.ts +10 -7
  226. package/src/funcs/authLogout.ts +1 -1
  227. package/src/funcs/authRefreshToken.ts +1 -1
  228. package/src/funcs/authUpdateUser.ts +1 -1
  229. package/src/funcs/authVerifyOtp.ts +1 -1
  230. package/src/funcs/cartsAddShippingMethod.ts +1 -1
  231. package/src/funcs/cartsApplyCoupon.ts +1 -1
  232. package/src/funcs/cartsCreateCart.ts +1 -1
  233. package/src/funcs/cartsCreateCartAddress.ts +1 -1
  234. package/src/funcs/cartsDeleteCart.ts +1 -1
  235. package/src/funcs/cartsGetCart.ts +1 -1
  236. package/src/funcs/cartsGetUserCart.ts +1 -1
  237. package/src/funcs/cartsRedeemLoyaltyPoints.ts +1 -1
  238. package/src/funcs/cartsRemoveCoupon.ts +1 -1
  239. package/src/funcs/cartsRemoveLoyaltyPoints.ts +1 -1
  240. package/src/funcs/cartsRemoveUserCart.ts +1 -1
  241. package/src/funcs/cartsUpdateCart.ts +1 -1
  242. package/src/funcs/cartsUpdateFulfillmentPreference.ts +1 -1
  243. package/src/funcs/catalogGetProductDetail.ts +1 -1
  244. package/src/funcs/catalogGetVariantDetail.ts +1 -1
  245. package/src/funcs/catalogListCategories.ts +1 -1
  246. package/src/funcs/catalogListCrosssellProducts.ts +1 -1
  247. package/src/funcs/catalogListProductReviews.ts +1 -1
  248. package/src/funcs/catalogListProductVariants.ts +1 -1
  249. package/src/funcs/catalogListProducts.ts +1 -1
  250. package/src/funcs/catalogListSimilarProducts.ts +1 -1
  251. package/src/funcs/catalogListSkus.ts +1 -1
  252. package/src/funcs/catalogListUpsellProducts.ts +1 -1
  253. package/src/funcs/catalogSearchProducts.ts +1 -1
  254. package/src/funcs/commonListCountryPincodes.ts +1 -1
  255. package/src/funcs/customersCreateAddress.ts +1 -1
  256. package/src/funcs/customersDeleteAddress.ts +1 -1
  257. package/src/funcs/customersGetAddressDetail.ts +1 -1
  258. package/src/funcs/customersGetLoyaltyDetails.ts +1 -1
  259. package/src/funcs/customersListAddresses.ts +1 -1
  260. package/src/funcs/customersListUserReviews.ts +1 -1
  261. package/src/funcs/customersUpdateAddressDetail.ts +1 -1
  262. package/src/funcs/ordersCancelOrder.ts +1 -1
  263. package/src/funcs/ordersCreateOrder.ts +1 -1
  264. package/src/funcs/ordersGetOrderDetail.ts +1 -1
  265. package/src/funcs/ordersGetPaymentStatus.ts +1 -1
  266. package/src/funcs/ordersListOrderShipments.ts +1 -1
  267. package/src/funcs/ordersListOrders.ts +1 -1
  268. package/src/funcs/ordersRetryOrderPayment.ts +1 -1
  269. package/src/funcs/shippingCheckServiceability.ts +1 -1
  270. package/src/funcs/shippingFulfillmentOptions.ts +1 -1
  271. package/src/funcs/shippingShippingMethods.ts +1 -1
  272. package/src/lib/config.ts +3 -3
  273. package/src/lib/url.ts +1 -1
  274. package/src/models/components/cart.ts +23 -0
  275. package/src/models/components/cartitem.ts +0 -9
  276. package/src/models/components/deliveryfulfillment.ts +24 -0
  277. package/src/models/components/fulfillmentpreference.ts +69 -15
  278. package/src/models/components/fulfillmenttype.ts +40 -0
  279. package/src/models/components/index.ts +2 -0
  280. package/src/models/components/item.ts +0 -9
  281. package/src/models/components/order.ts +23 -0
  282. package/src/models/components/orderdetail.ts +23 -0
  283. package/src/models/components/orderitem.ts +0 -6
  284. package/src/models/components/partialcollectanddelivery.ts +210 -63
  285. package/src/models/components/partialcollectanddeliveryinput.ts +472 -0
  286. package/src/models/components/product.ts +0 -9
  287. package/src/models/components/productbundleitem.ts +0 -9
  288. package/src/models/components/productdetail.ts +0 -9
  289. package/src/models/components/variant.ts +0 -9
  290. package/src/models/components/variantdetail.ts +0 -9
  291. package/src/models/components/variantoption.ts +8 -8
  292. package/src/models/operations/generateotp.ts +85 -0
  293. package/src/models/operations/getfulfillmentoptions.ts +33 -4
  294. package/src/models/operations/loginwithemail.ts +75 -0
  295. package/src/models/operations/loginwithphone.ts +75 -0
  296. package/src/models/operations/loginwithwhatsapp.ts +75 -0
  297. package/src/models/operations/updatefulfillmentpreference.ts +8 -8
  298. package/src/sdk/auth.ts +4 -4
  299. package/docs/sdks/cestorefront/README.md +0 -10
@@ -7,29 +7,38 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
- import {
11
- CustomerAddressInput,
12
- CustomerAddressInput$inboundSchema,
13
- CustomerAddressInput$Outbound,
14
- CustomerAddressInput$outboundSchema,
15
- } from "./customeraddressinput.js";
16
10
 
17
- export type Pickup = {
11
+ export type Items = {
18
12
  productId: string;
13
+ productName: string;
19
14
  variantId: string | null;
15
+ variantName: string | null;
20
16
  quantity: number;
21
17
  };
22
18
 
23
- export type Delivery = {
19
+ export type Pickup = {
20
+ items?: Array<Items> | undefined;
21
+ };
22
+
23
+ export type PartialCollectAndDeliveryItems = {
24
24
  productId: string;
25
+ productName: string;
25
26
  variantId: string | null;
27
+ variantName: string | null;
26
28
  quantity: number;
27
29
  };
28
30
 
29
- export type Preferences = {
30
- pickup: Array<Pickup>;
31
- delivery: Array<Delivery>;
32
- shippingAddress: CustomerAddressInput | null;
31
+ export type Delivery = {
32
+ shippingProviderId: string | null;
33
+ shippingProviderName: string | null;
34
+ courierCompanyId?: string | null | undefined;
35
+ courierCompanyName?: string | null | undefined;
36
+ items: Array<PartialCollectAndDeliveryItems>;
37
+ };
38
+
39
+ export type Preference = {
40
+ pickup: Pickup;
41
+ delivery: Delivery;
33
42
  };
34
43
 
35
44
  /**
@@ -37,43 +46,100 @@ export type Preferences = {
37
46
  */
38
47
  export type PartialCollectAndDelivery = {
39
48
  fulfillmentType?: "partial-collect-and-delivery" | undefined;
40
- preferences: Preferences;
49
+ preference: Preference;
41
50
  };
42
51
 
43
52
  /** @internal */
44
- export const Pickup$inboundSchema: z.ZodType<Pickup, z.ZodTypeDef, unknown> = z
53
+ export const Items$inboundSchema: z.ZodType<Items, z.ZodTypeDef, unknown> = z
45
54
  .object({
46
55
  product_id: z.string(),
56
+ product_name: z.string(),
47
57
  variant_id: z.nullable(z.string()),
58
+ variant_name: z.nullable(z.string()),
48
59
  quantity: z.number().int(),
49
60
  }).transform((v) => {
50
61
  return remap$(v, {
51
62
  "product_id": "productId",
63
+ "product_name": "productName",
52
64
  "variant_id": "variantId",
65
+ "variant_name": "variantName",
53
66
  });
54
67
  });
55
68
 
56
69
  /** @internal */
57
- export type Pickup$Outbound = {
70
+ export type Items$Outbound = {
58
71
  product_id: string;
72
+ product_name: string;
59
73
  variant_id: string | null;
74
+ variant_name: string | null;
60
75
  quantity: number;
61
76
  };
62
77
 
63
78
  /** @internal */
64
- export const Pickup$outboundSchema: z.ZodType<
65
- Pickup$Outbound,
79
+ export const Items$outboundSchema: z.ZodType<
80
+ Items$Outbound,
66
81
  z.ZodTypeDef,
67
- Pickup
82
+ Items
68
83
  > = z.object({
69
84
  productId: z.string(),
85
+ productName: z.string(),
70
86
  variantId: z.nullable(z.string()),
87
+ variantName: z.nullable(z.string()),
71
88
  quantity: z.number().int(),
72
89
  }).transform((v) => {
73
90
  return remap$(v, {
74
91
  productId: "product_id",
92
+ productName: "product_name",
75
93
  variantId: "variant_id",
94
+ variantName: "variant_name",
95
+ });
96
+ });
97
+
98
+ /**
99
+ * @internal
100
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
101
+ */
102
+ export namespace Items$ {
103
+ /** @deprecated use `Items$inboundSchema` instead. */
104
+ export const inboundSchema = Items$inboundSchema;
105
+ /** @deprecated use `Items$outboundSchema` instead. */
106
+ export const outboundSchema = Items$outboundSchema;
107
+ /** @deprecated use `Items$Outbound` instead. */
108
+ export type Outbound = Items$Outbound;
109
+ }
110
+
111
+ export function itemsToJSON(items: Items): string {
112
+ return JSON.stringify(Items$outboundSchema.parse(items));
113
+ }
114
+
115
+ export function itemsFromJSON(
116
+ jsonString: string,
117
+ ): SafeParseResult<Items, SDKValidationError> {
118
+ return safeParse(
119
+ jsonString,
120
+ (x) => Items$inboundSchema.parse(JSON.parse(x)),
121
+ `Failed to parse 'Items' from JSON`,
122
+ );
123
+ }
124
+
125
+ /** @internal */
126
+ export const Pickup$inboundSchema: z.ZodType<Pickup, z.ZodTypeDef, unknown> = z
127
+ .object({
128
+ items: z.array(z.lazy(() => Items$inboundSchema)).optional(),
76
129
  });
130
+
131
+ /** @internal */
132
+ export type Pickup$Outbound = {
133
+ items?: Array<Items$Outbound> | undefined;
134
+ };
135
+
136
+ /** @internal */
137
+ export const Pickup$outboundSchema: z.ZodType<
138
+ Pickup$Outbound,
139
+ z.ZodTypeDef,
140
+ Pickup
141
+ > = z.object({
142
+ items: z.array(z.lazy(() => Items$outboundSchema)).optional(),
77
143
  });
78
144
 
79
145
  /**
@@ -104,41 +170,133 @@ export function pickupFromJSON(
104
170
  }
105
171
 
106
172
  /** @internal */
107
- export const Delivery$inboundSchema: z.ZodType<
108
- Delivery,
173
+ export const PartialCollectAndDeliveryItems$inboundSchema: z.ZodType<
174
+ PartialCollectAndDeliveryItems,
109
175
  z.ZodTypeDef,
110
176
  unknown
111
177
  > = z.object({
112
178
  product_id: z.string(),
179
+ product_name: z.string(),
113
180
  variant_id: z.nullable(z.string()),
181
+ variant_name: z.nullable(z.string()),
114
182
  quantity: z.number().int(),
115
183
  }).transform((v) => {
116
184
  return remap$(v, {
117
185
  "product_id": "productId",
186
+ "product_name": "productName",
118
187
  "variant_id": "variantId",
188
+ "variant_name": "variantName",
119
189
  });
120
190
  });
121
191
 
122
192
  /** @internal */
123
- export type Delivery$Outbound = {
193
+ export type PartialCollectAndDeliveryItems$Outbound = {
124
194
  product_id: string;
195
+ product_name: string;
125
196
  variant_id: string | null;
197
+ variant_name: string | null;
126
198
  quantity: number;
127
199
  };
128
200
 
129
201
  /** @internal */
130
- export const Delivery$outboundSchema: z.ZodType<
131
- Delivery$Outbound,
202
+ export const PartialCollectAndDeliveryItems$outboundSchema: z.ZodType<
203
+ PartialCollectAndDeliveryItems$Outbound,
132
204
  z.ZodTypeDef,
133
- Delivery
205
+ PartialCollectAndDeliveryItems
134
206
  > = z.object({
135
207
  productId: z.string(),
208
+ productName: z.string(),
136
209
  variantId: z.nullable(z.string()),
210
+ variantName: z.nullable(z.string()),
137
211
  quantity: z.number().int(),
138
212
  }).transform((v) => {
139
213
  return remap$(v, {
140
214
  productId: "product_id",
215
+ productName: "product_name",
141
216
  variantId: "variant_id",
217
+ variantName: "variant_name",
218
+ });
219
+ });
220
+
221
+ /**
222
+ * @internal
223
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
224
+ */
225
+ export namespace PartialCollectAndDeliveryItems$ {
226
+ /** @deprecated use `PartialCollectAndDeliveryItems$inboundSchema` instead. */
227
+ export const inboundSchema = PartialCollectAndDeliveryItems$inboundSchema;
228
+ /** @deprecated use `PartialCollectAndDeliveryItems$outboundSchema` instead. */
229
+ export const outboundSchema = PartialCollectAndDeliveryItems$outboundSchema;
230
+ /** @deprecated use `PartialCollectAndDeliveryItems$Outbound` instead. */
231
+ export type Outbound = PartialCollectAndDeliveryItems$Outbound;
232
+ }
233
+
234
+ export function partialCollectAndDeliveryItemsToJSON(
235
+ partialCollectAndDeliveryItems: PartialCollectAndDeliveryItems,
236
+ ): string {
237
+ return JSON.stringify(
238
+ PartialCollectAndDeliveryItems$outboundSchema.parse(
239
+ partialCollectAndDeliveryItems,
240
+ ),
241
+ );
242
+ }
243
+
244
+ export function partialCollectAndDeliveryItemsFromJSON(
245
+ jsonString: string,
246
+ ): SafeParseResult<PartialCollectAndDeliveryItems, SDKValidationError> {
247
+ return safeParse(
248
+ jsonString,
249
+ (x) => PartialCollectAndDeliveryItems$inboundSchema.parse(JSON.parse(x)),
250
+ `Failed to parse 'PartialCollectAndDeliveryItems' from JSON`,
251
+ );
252
+ }
253
+
254
+ /** @internal */
255
+ export const Delivery$inboundSchema: z.ZodType<
256
+ Delivery,
257
+ z.ZodTypeDef,
258
+ unknown
259
+ > = z.object({
260
+ shipping_provider_id: z.nullable(z.string()),
261
+ shipping_provider_name: z.nullable(z.string()),
262
+ courier_company_id: z.nullable(z.string()).optional(),
263
+ courier_company_name: z.nullable(z.string()).optional(),
264
+ items: z.array(z.lazy(() => PartialCollectAndDeliveryItems$inboundSchema)),
265
+ }).transform((v) => {
266
+ return remap$(v, {
267
+ "shipping_provider_id": "shippingProviderId",
268
+ "shipping_provider_name": "shippingProviderName",
269
+ "courier_company_id": "courierCompanyId",
270
+ "courier_company_name": "courierCompanyName",
271
+ });
272
+ });
273
+
274
+ /** @internal */
275
+ export type Delivery$Outbound = {
276
+ shipping_provider_id: string | null;
277
+ shipping_provider_name: string | null;
278
+ courier_company_id?: string | null | undefined;
279
+ courier_company_name?: string | null | undefined;
280
+ items: Array<PartialCollectAndDeliveryItems$Outbound>;
281
+ };
282
+
283
+ /** @internal */
284
+ export const Delivery$outboundSchema: z.ZodType<
285
+ Delivery$Outbound,
286
+ z.ZodTypeDef,
287
+ Delivery
288
+ > = z.object({
289
+ shippingProviderId: z.nullable(z.string()),
290
+ shippingProviderName: z.nullable(z.string()),
291
+ courierCompanyId: z.nullable(z.string()).optional(),
292
+ courierCompanyName: z.nullable(z.string()).optional(),
293
+ items: z.array(z.lazy(() => PartialCollectAndDeliveryItems$outboundSchema)),
294
+ }).transform((v) => {
295
+ return remap$(v, {
296
+ shippingProviderId: "shipping_provider_id",
297
+ shippingProviderName: "shipping_provider_name",
298
+ courierCompanyId: "courier_company_id",
299
+ courierCompanyName: "courier_company_name",
142
300
  });
143
301
  });
144
302
 
@@ -170,66 +328,55 @@ export function deliveryFromJSON(
170
328
  }
171
329
 
172
330
  /** @internal */
173
- export const Preferences$inboundSchema: z.ZodType<
174
- Preferences,
331
+ export const Preference$inboundSchema: z.ZodType<
332
+ Preference,
175
333
  z.ZodTypeDef,
176
334
  unknown
177
335
  > = z.object({
178
- pickup: z.array(z.lazy(() => Pickup$inboundSchema)),
179
- delivery: z.array(z.lazy(() => Delivery$inboundSchema)),
180
- shipping_address: z.nullable(CustomerAddressInput$inboundSchema),
181
- }).transform((v) => {
182
- return remap$(v, {
183
- "shipping_address": "shippingAddress",
184
- });
336
+ pickup: z.lazy(() => Pickup$inboundSchema),
337
+ delivery: z.lazy(() => Delivery$inboundSchema),
185
338
  });
186
339
 
187
340
  /** @internal */
188
- export type Preferences$Outbound = {
189
- pickup: Array<Pickup$Outbound>;
190
- delivery: Array<Delivery$Outbound>;
191
- shipping_address: CustomerAddressInput$Outbound | null;
341
+ export type Preference$Outbound = {
342
+ pickup: Pickup$Outbound;
343
+ delivery: Delivery$Outbound;
192
344
  };
193
345
 
194
346
  /** @internal */
195
- export const Preferences$outboundSchema: z.ZodType<
196
- Preferences$Outbound,
347
+ export const Preference$outboundSchema: z.ZodType<
348
+ Preference$Outbound,
197
349
  z.ZodTypeDef,
198
- Preferences
350
+ Preference
199
351
  > = z.object({
200
- pickup: z.array(z.lazy(() => Pickup$outboundSchema)),
201
- delivery: z.array(z.lazy(() => Delivery$outboundSchema)),
202
- shippingAddress: z.nullable(CustomerAddressInput$outboundSchema),
203
- }).transform((v) => {
204
- return remap$(v, {
205
- shippingAddress: "shipping_address",
206
- });
352
+ pickup: z.lazy(() => Pickup$outboundSchema),
353
+ delivery: z.lazy(() => Delivery$outboundSchema),
207
354
  });
208
355
 
209
356
  /**
210
357
  * @internal
211
358
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
212
359
  */
213
- export namespace Preferences$ {
214
- /** @deprecated use `Preferences$inboundSchema` instead. */
215
- export const inboundSchema = Preferences$inboundSchema;
216
- /** @deprecated use `Preferences$outboundSchema` instead. */
217
- export const outboundSchema = Preferences$outboundSchema;
218
- /** @deprecated use `Preferences$Outbound` instead. */
219
- export type Outbound = Preferences$Outbound;
360
+ export namespace Preference$ {
361
+ /** @deprecated use `Preference$inboundSchema` instead. */
362
+ export const inboundSchema = Preference$inboundSchema;
363
+ /** @deprecated use `Preference$outboundSchema` instead. */
364
+ export const outboundSchema = Preference$outboundSchema;
365
+ /** @deprecated use `Preference$Outbound` instead. */
366
+ export type Outbound = Preference$Outbound;
220
367
  }
221
368
 
222
- export function preferencesToJSON(preferences: Preferences): string {
223
- return JSON.stringify(Preferences$outboundSchema.parse(preferences));
369
+ export function preferenceToJSON(preference: Preference): string {
370
+ return JSON.stringify(Preference$outboundSchema.parse(preference));
224
371
  }
225
372
 
226
- export function preferencesFromJSON(
373
+ export function preferenceFromJSON(
227
374
  jsonString: string,
228
- ): SafeParseResult<Preferences, SDKValidationError> {
375
+ ): SafeParseResult<Preference, SDKValidationError> {
229
376
  return safeParse(
230
377
  jsonString,
231
- (x) => Preferences$inboundSchema.parse(JSON.parse(x)),
232
- `Failed to parse 'Preferences' from JSON`,
378
+ (x) => Preference$inboundSchema.parse(JSON.parse(x)),
379
+ `Failed to parse 'Preference' from JSON`,
233
380
  );
234
381
  }
235
382
 
@@ -242,7 +389,7 @@ export const PartialCollectAndDelivery$inboundSchema: z.ZodType<
242
389
  fulfillment_type: z.literal("partial-collect-and-delivery").default(
243
390
  "partial-collect-and-delivery",
244
391
  ).optional(),
245
- preferences: z.lazy(() => Preferences$inboundSchema),
392
+ preference: z.lazy(() => Preference$inboundSchema),
246
393
  }).transform((v) => {
247
394
  return remap$(v, {
248
395
  "fulfillment_type": "fulfillmentType",
@@ -252,7 +399,7 @@ export const PartialCollectAndDelivery$inboundSchema: z.ZodType<
252
399
  /** @internal */
253
400
  export type PartialCollectAndDelivery$Outbound = {
254
401
  fulfillment_type: "partial-collect-and-delivery";
255
- preferences: Preferences$Outbound;
402
+ preference: Preference$Outbound;
256
403
  };
257
404
 
258
405
  /** @internal */
@@ -264,7 +411,7 @@ export const PartialCollectAndDelivery$outboundSchema: z.ZodType<
264
411
  fulfillmentType: z.literal("partial-collect-and-delivery").default(
265
412
  "partial-collect-and-delivery" as const,
266
413
  ),
267
- preferences: z.lazy(() => Preferences$outboundSchema),
414
+ preference: z.lazy(() => Preference$outboundSchema),
268
415
  }).transform((v) => {
269
416
  return remap$(v, {
270
417
  fulfillmentType: "fulfillment_type",