ce-storefront 0.15.31 → 0.16.1

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 (228) hide show
  1. package/README.md +0 -1
  2. package/RUNTIMES.md +6 -6
  3. package/esm/funcs/authGenerateOtp.js +1 -1
  4. package/esm/funcs/authGenerateOtp.js.map +1 -1
  5. package/esm/funcs/authGetUserDetail.js +1 -1
  6. package/esm/funcs/authGetUserDetail.js.map +1 -1
  7. package/esm/funcs/authLoginWithEmail.js +1 -1
  8. package/esm/funcs/authLoginWithEmail.js.map +1 -1
  9. package/esm/funcs/authLoginWithPhone.js +1 -1
  10. package/esm/funcs/authLoginWithPhone.js.map +1 -1
  11. package/esm/funcs/authLoginWithWhatsapp.js +1 -1
  12. package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
  13. package/esm/funcs/authLogout.js +1 -1
  14. package/esm/funcs/authLogout.js.map +1 -1
  15. package/esm/funcs/authRefreshToken.js +1 -1
  16. package/esm/funcs/authRefreshToken.js.map +1 -1
  17. package/esm/funcs/authUpdateUser.js +1 -1
  18. package/esm/funcs/authUpdateUser.js.map +1 -1
  19. package/esm/funcs/authVerifyOtp.js +1 -1
  20. package/esm/funcs/authVerifyOtp.js.map +1 -1
  21. package/esm/funcs/cartsAddShippingMethod.js +1 -1
  22. package/esm/funcs/cartsAddShippingMethod.js.map +1 -1
  23. package/esm/funcs/cartsApplyCoupon.js +1 -1
  24. package/esm/funcs/cartsApplyCoupon.js.map +1 -1
  25. package/esm/funcs/cartsCreateCart.js +1 -1
  26. package/esm/funcs/cartsCreateCart.js.map +1 -1
  27. package/esm/funcs/cartsCreateCartAddress.js +1 -1
  28. package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
  29. package/esm/funcs/cartsDeleteCart.js +1 -1
  30. package/esm/funcs/cartsDeleteCart.js.map +1 -1
  31. package/esm/funcs/cartsGetCart.js +1 -1
  32. package/esm/funcs/cartsGetCart.js.map +1 -1
  33. package/esm/funcs/cartsGetUserCart.js +1 -1
  34. package/esm/funcs/cartsGetUserCart.js.map +1 -1
  35. package/esm/funcs/cartsRedeemLoyaltyPoints.js +1 -1
  36. package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -1
  37. package/esm/funcs/cartsRemoveCoupon.js +1 -1
  38. package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
  39. package/esm/funcs/cartsRemoveLoyaltyPoints.js +1 -1
  40. package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -1
  41. package/esm/funcs/cartsRemoveUserCart.js +1 -1
  42. package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
  43. package/esm/funcs/cartsUpdateCart.js +1 -1
  44. package/esm/funcs/cartsUpdateCart.js.map +1 -1
  45. package/esm/funcs/cartsUpdateFulfillmentPreference.js +1 -1
  46. package/esm/funcs/cartsUpdateFulfillmentPreference.js.map +1 -1
  47. package/esm/funcs/catalogGetProductDetail.js +1 -1
  48. package/esm/funcs/catalogGetProductDetail.js.map +1 -1
  49. package/esm/funcs/catalogGetVariantDetail.js +1 -1
  50. package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
  51. package/esm/funcs/catalogListCategories.js +1 -1
  52. package/esm/funcs/catalogListCategories.js.map +1 -1
  53. package/esm/funcs/catalogListCrosssellProducts.js +1 -1
  54. package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
  55. package/esm/funcs/catalogListProductReviews.js +1 -1
  56. package/esm/funcs/catalogListProductReviews.js.map +1 -1
  57. package/esm/funcs/catalogListProductVariants.js +1 -1
  58. package/esm/funcs/catalogListProductVariants.js.map +1 -1
  59. package/esm/funcs/catalogListProducts.js +1 -1
  60. package/esm/funcs/catalogListProducts.js.map +1 -1
  61. package/esm/funcs/catalogListSimilarProducts.js +1 -1
  62. package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
  63. package/esm/funcs/catalogListSkus.js +1 -1
  64. package/esm/funcs/catalogListSkus.js.map +1 -1
  65. package/esm/funcs/catalogListUpsellProducts.js +1 -1
  66. package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
  67. package/esm/funcs/catalogSearchProducts.js +1 -1
  68. package/esm/funcs/catalogSearchProducts.js.map +1 -1
  69. package/esm/funcs/commonListCountryPincodes.js +1 -1
  70. package/esm/funcs/commonListCountryPincodes.js.map +1 -1
  71. package/esm/funcs/customersCreateAddress.js +1 -1
  72. package/esm/funcs/customersCreateAddress.js.map +1 -1
  73. package/esm/funcs/customersDeleteAddress.js +1 -1
  74. package/esm/funcs/customersDeleteAddress.js.map +1 -1
  75. package/esm/funcs/customersGetAddressDetail.js +1 -1
  76. package/esm/funcs/customersGetAddressDetail.js.map +1 -1
  77. package/esm/funcs/customersGetLoyaltyDetails.js +1 -1
  78. package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -1
  79. package/esm/funcs/customersListAddresses.js +1 -1
  80. package/esm/funcs/customersListAddresses.js.map +1 -1
  81. package/esm/funcs/customersListUserReviews.js +1 -1
  82. package/esm/funcs/customersListUserReviews.js.map +1 -1
  83. package/esm/funcs/customersUpdateAddressDetail.js +1 -1
  84. package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
  85. package/esm/funcs/ordersCancelOrder.js +1 -1
  86. package/esm/funcs/ordersCancelOrder.js.map +1 -1
  87. package/esm/funcs/ordersCreateOrder.js +1 -1
  88. package/esm/funcs/ordersCreateOrder.js.map +1 -1
  89. package/esm/funcs/ordersGetOrderDetail.js +1 -1
  90. package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
  91. package/esm/funcs/ordersGetPaymentStatus.js +1 -1
  92. package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
  93. package/esm/funcs/ordersListOrderShipments.js +1 -1
  94. package/esm/funcs/ordersListOrderShipments.js.map +1 -1
  95. package/esm/funcs/ordersListOrders.js +1 -1
  96. package/esm/funcs/ordersListOrders.js.map +1 -1
  97. package/esm/funcs/ordersRetryOrderPayment.js +1 -1
  98. package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
  99. package/esm/funcs/shippingCheckServiceability.js +1 -1
  100. package/esm/funcs/shippingCheckServiceability.js.map +1 -1
  101. package/esm/funcs/shippingFulfillmentOptions.js +1 -1
  102. package/esm/funcs/shippingFulfillmentOptions.js.map +1 -1
  103. package/esm/funcs/shippingShippingMethods.js +1 -1
  104. package/esm/funcs/shippingShippingMethods.js.map +1 -1
  105. package/esm/lib/config.d.ts +3 -3
  106. package/esm/lib/config.js +3 -3
  107. package/esm/lib/config.js.map +1 -1
  108. package/esm/models/components/cart.d.ts +3 -8
  109. package/esm/models/components/cart.d.ts.map +1 -1
  110. package/esm/models/components/cart.js +5 -16
  111. package/esm/models/components/cart.js.map +1 -1
  112. package/esm/models/components/deliveryfulfillment.d.ts +8 -0
  113. package/esm/models/components/deliveryfulfillment.d.ts.map +1 -1
  114. package/esm/models/components/deliveryfulfillment.js +16 -0
  115. package/esm/models/components/deliveryfulfillment.js.map +1 -1
  116. package/esm/models/components/fulfillmentitem.d.ts +40 -0
  117. package/esm/models/components/fulfillmentitem.d.ts.map +1 -0
  118. package/esm/models/components/fulfillmentitem.js +54 -0
  119. package/esm/models/components/fulfillmentitem.js.map +1 -0
  120. package/esm/models/components/fulfillmentiteminput.d.ts +36 -0
  121. package/esm/models/components/fulfillmentiteminput.d.ts.map +1 -0
  122. package/esm/models/components/fulfillmentiteminput.js +46 -0
  123. package/esm/models/components/fulfillmentiteminput.js.map +1 -0
  124. package/esm/models/components/fulfillmentpreference.d.ts +16 -19
  125. package/esm/models/components/fulfillmentpreference.d.ts.map +1 -1
  126. package/esm/models/components/fulfillmentpreference.js +20 -9
  127. package/esm/models/components/fulfillmentpreference.js.map +1 -1
  128. package/esm/models/components/index.d.ts +3 -0
  129. package/esm/models/components/index.d.ts.map +1 -1
  130. package/esm/models/components/index.js +3 -0
  131. package/esm/models/components/index.js.map +1 -1
  132. package/esm/models/components/order.d.ts +3 -8
  133. package/esm/models/components/order.d.ts.map +1 -1
  134. package/esm/models/components/order.js +5 -16
  135. package/esm/models/components/order.js.map +1 -1
  136. package/esm/models/components/orderdetail.d.ts +3 -8
  137. package/esm/models/components/orderdetail.d.ts.map +1 -1
  138. package/esm/models/components/orderdetail.js +5 -16
  139. package/esm/models/components/orderdetail.js.map +1 -1
  140. package/esm/models/components/partialcollectanddelivery.d.ts +32 -57
  141. package/esm/models/components/partialcollectanddelivery.d.ts.map +1 -1
  142. package/esm/models/components/partialcollectanddelivery.js +44 -74
  143. package/esm/models/components/partialcollectanddelivery.js.map +1 -1
  144. package/esm/models/components/partialcollectanddeliveryinput.d.ts +93 -0
  145. package/esm/models/components/partialcollectanddeliveryinput.d.ts.map +1 -0
  146. package/esm/models/components/partialcollectanddeliveryinput.js +121 -0
  147. package/esm/models/components/partialcollectanddeliveryinput.js.map +1 -0
  148. package/esm/models/components/variantoption.d.ts +4 -4
  149. package/esm/models/components/variantoption.d.ts.map +1 -1
  150. package/esm/models/components/variantoption.js +4 -4
  151. package/esm/models/components/variantoption.js.map +1 -1
  152. package/esm/models/operations/getfulfillmentoptions.d.ts +27 -1
  153. package/esm/models/operations/getfulfillmentoptions.d.ts.map +1 -1
  154. package/esm/models/operations/getfulfillmentoptions.js +21 -2
  155. package/esm/models/operations/getfulfillmentoptions.js.map +1 -1
  156. package/esm/models/operations/updatefulfillmentpreference.d.ts +4 -4
  157. package/esm/models/operations/updatefulfillmentpreference.d.ts.map +1 -1
  158. package/esm/models/operations/updatefulfillmentpreference.js +4 -4
  159. package/esm/models/operations/updatefulfillmentpreference.js.map +1 -1
  160. package/examples/package-lock.json +1 -1
  161. package/jsr.json +1 -1
  162. package/package.json +1 -1
  163. package/src/funcs/authGenerateOtp.ts +1 -1
  164. package/src/funcs/authGetUserDetail.ts +1 -1
  165. package/src/funcs/authLoginWithEmail.ts +1 -1
  166. package/src/funcs/authLoginWithPhone.ts +1 -1
  167. package/src/funcs/authLoginWithWhatsapp.ts +1 -1
  168. package/src/funcs/authLogout.ts +1 -1
  169. package/src/funcs/authRefreshToken.ts +1 -1
  170. package/src/funcs/authUpdateUser.ts +1 -1
  171. package/src/funcs/authVerifyOtp.ts +1 -1
  172. package/src/funcs/cartsAddShippingMethod.ts +1 -1
  173. package/src/funcs/cartsApplyCoupon.ts +1 -1
  174. package/src/funcs/cartsCreateCart.ts +1 -1
  175. package/src/funcs/cartsCreateCartAddress.ts +1 -1
  176. package/src/funcs/cartsDeleteCart.ts +1 -1
  177. package/src/funcs/cartsGetCart.ts +1 -1
  178. package/src/funcs/cartsGetUserCart.ts +1 -1
  179. package/src/funcs/cartsRedeemLoyaltyPoints.ts +1 -1
  180. package/src/funcs/cartsRemoveCoupon.ts +1 -1
  181. package/src/funcs/cartsRemoveLoyaltyPoints.ts +1 -1
  182. package/src/funcs/cartsRemoveUserCart.ts +1 -1
  183. package/src/funcs/cartsUpdateCart.ts +1 -1
  184. package/src/funcs/cartsUpdateFulfillmentPreference.ts +1 -1
  185. package/src/funcs/catalogGetProductDetail.ts +1 -1
  186. package/src/funcs/catalogGetVariantDetail.ts +1 -1
  187. package/src/funcs/catalogListCategories.ts +1 -1
  188. package/src/funcs/catalogListCrosssellProducts.ts +1 -1
  189. package/src/funcs/catalogListProductReviews.ts +1 -1
  190. package/src/funcs/catalogListProductVariants.ts +1 -1
  191. package/src/funcs/catalogListProducts.ts +1 -1
  192. package/src/funcs/catalogListSimilarProducts.ts +1 -1
  193. package/src/funcs/catalogListSkus.ts +1 -1
  194. package/src/funcs/catalogListUpsellProducts.ts +1 -1
  195. package/src/funcs/catalogSearchProducts.ts +1 -1
  196. package/src/funcs/commonListCountryPincodes.ts +1 -1
  197. package/src/funcs/customersCreateAddress.ts +1 -1
  198. package/src/funcs/customersDeleteAddress.ts +1 -1
  199. package/src/funcs/customersGetAddressDetail.ts +1 -1
  200. package/src/funcs/customersGetLoyaltyDetails.ts +1 -1
  201. package/src/funcs/customersListAddresses.ts +1 -1
  202. package/src/funcs/customersListUserReviews.ts +1 -1
  203. package/src/funcs/customersUpdateAddressDetail.ts +1 -1
  204. package/src/funcs/ordersCancelOrder.ts +1 -1
  205. package/src/funcs/ordersCreateOrder.ts +1 -1
  206. package/src/funcs/ordersGetOrderDetail.ts +1 -1
  207. package/src/funcs/ordersGetPaymentStatus.ts +1 -1
  208. package/src/funcs/ordersListOrderShipments.ts +1 -1
  209. package/src/funcs/ordersListOrders.ts +1 -1
  210. package/src/funcs/ordersRetryOrderPayment.ts +1 -1
  211. package/src/funcs/shippingCheckServiceability.ts +1 -1
  212. package/src/funcs/shippingFulfillmentOptions.ts +1 -1
  213. package/src/funcs/shippingShippingMethods.ts +1 -1
  214. package/src/lib/config.ts +3 -3
  215. package/src/models/components/cart.ts +12 -24
  216. package/src/models/components/deliveryfulfillment.ts +24 -0
  217. package/src/models/components/fulfillmentitem.ts +98 -0
  218. package/src/models/components/fulfillmentiteminput.ts +88 -0
  219. package/src/models/components/fulfillmentpreference.ts +69 -15
  220. package/src/models/components/index.ts +3 -0
  221. package/src/models/components/order.ts +12 -24
  222. package/src/models/components/orderdetail.ts +12 -24
  223. package/src/models/components/partialcollectanddelivery.ts +98 -134
  224. package/src/models/components/partialcollectanddeliveryinput.ts +266 -0
  225. package/src/models/components/variantoption.ts +8 -8
  226. package/src/models/operations/getfulfillmentoptions.ts +33 -4
  227. package/src/models/operations/updatefulfillmentpreference.ts +8 -8
  228. package/docs/sdks/cestorefront/README.md +0 -10
@@ -107,7 +107,7 @@ async function $do(
107
107
  options: client._options,
108
108
  baseURL: options?.serverURL ?? client._baseURL ?? "",
109
109
  operationID: "create-order",
110
- oAuth2Scopes: [],
110
+ oAuth2Scopes: null,
111
111
 
112
112
  resolvedSecurity: requestSecurity,
113
113
 
@@ -113,7 +113,7 @@ async function $do(
113
113
  options: client._options,
114
114
  baseURL: options?.serverURL ?? client._baseURL ?? "",
115
115
  operationID: "get-order-detail",
116
- oAuth2Scopes: [],
116
+ oAuth2Scopes: null,
117
117
 
118
118
  resolvedSecurity: requestSecurity,
119
119
 
@@ -113,7 +113,7 @@ async function $do(
113
113
  options: client._options,
114
114
  baseURL: options?.serverURL ?? client._baseURL ?? "",
115
115
  operationID: "get-payment-status",
116
- oAuth2Scopes: [],
116
+ oAuth2Scopes: null,
117
117
 
118
118
  resolvedSecurity: requestSecurity,
119
119
 
@@ -113,7 +113,7 @@ async function $do(
113
113
  options: client._options,
114
114
  baseURL: options?.serverURL ?? client._baseURL ?? "",
115
115
  operationID: "list-order-shipments",
116
- oAuth2Scopes: [],
116
+ oAuth2Scopes: null,
117
117
 
118
118
  resolvedSecurity: requestSecurity,
119
119
 
@@ -109,7 +109,7 @@ async function $do(
109
109
  options: client._options,
110
110
  baseURL: options?.serverURL ?? client._baseURL ?? "",
111
111
  operationID: "list-orders",
112
- oAuth2Scopes: [],
112
+ oAuth2Scopes: null,
113
113
 
114
114
  resolvedSecurity: requestSecurity,
115
115
 
@@ -116,7 +116,7 @@ async function $do(
116
116
  options: client._options,
117
117
  baseURL: options?.serverURL ?? client._baseURL ?? "",
118
118
  operationID: "retry-order-payment",
119
- oAuth2Scopes: [],
119
+ oAuth2Scopes: null,
120
120
 
121
121
  resolvedSecurity: requestSecurity,
122
122
 
@@ -116,7 +116,7 @@ async function $do(
116
116
  options: client._options,
117
117
  baseURL: options?.serverURL ?? client._baseURL ?? "",
118
118
  operationID: "check-pincode-serviceability",
119
- oAuth2Scopes: [],
119
+ oAuth2Scopes: null,
120
120
 
121
121
  resolvedSecurity: requestSecurity,
122
122
 
@@ -111,7 +111,7 @@ async function $do(
111
111
  options: client._options,
112
112
  baseURL: options?.serverURL ?? client._baseURL ?? "",
113
113
  operationID: "get-fulfillment-options",
114
- oAuth2Scopes: [],
114
+ oAuth2Scopes: null,
115
115
 
116
116
  resolvedSecurity: requestSecurity,
117
117
 
@@ -111,7 +111,7 @@ async function $do(
111
111
  options: client._options,
112
112
  baseURL: options?.serverURL ?? client._baseURL ?? "",
113
113
  operationID: "get-shipping-methods",
114
- oAuth2Scopes: [],
114
+ oAuth2Scopes: null,
115
115
 
116
116
  resolvedSecurity: requestSecurity,
117
117
 
package/src/lib/config.ts CHANGED
@@ -80,7 +80,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "1.0",
83
- sdkVersion: "0.15.31",
84
- genVersion: "2.715.0",
85
- userAgent: "speakeasy-sdk/typescript 0.15.31 2.715.0 1.0 ce-storefront",
83
+ sdkVersion: "0.16.1",
84
+ genVersion: "2.723.11",
85
+ userAgent: "speakeasy-sdk/typescript 0.16.1 2.723.11 1.0 ce-storefront",
86
86
  } as const;
@@ -37,6 +37,12 @@ import {
37
37
  CustomerAddress$Outbound,
38
38
  CustomerAddress$outboundSchema,
39
39
  } from "./customeraddress.js";
40
+ import {
41
+ FulfillmentPreference,
42
+ FulfillmentPreference$inboundSchema,
43
+ FulfillmentPreference$Outbound,
44
+ FulfillmentPreference$outboundSchema,
45
+ } from "./fulfillmentpreference.js";
40
46
 
41
47
  /**
42
48
  * This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
@@ -120,10 +126,7 @@ export type Cart = {
120
126
  * Shipping amount including shipping tax.
121
127
  */
122
128
  shippingAmountIncludingTax: number | null;
123
- shippingProviderId: string | null;
124
- shippingProviderName: string | null;
125
- courierCompanyId: string | null;
126
- courierCompanyName: string | null;
129
+ fulfillmentPreference?: FulfillmentPreference | undefined;
127
130
  estimatedDeliveryDays: number | null;
128
131
  /**
129
132
  * The additional charge applied to cover the costs associated with processing, packaging, and handling an order. This fee is separate from shipping charges and may include materials, or special handling requirements.
@@ -212,10 +215,7 @@ export const Cart$inboundSchema: z.ZodType<Cart, z.ZodTypeDef, unknown> = z
212
215
  shipping_tax_rate: z.nullable(z.number()),
213
216
  shipping_tax_amount: z.nullable(z.number()),
214
217
  shipping_amount_including_tax: z.nullable(z.number()),
215
- shipping_provider_id: z.nullable(z.string()),
216
- shipping_provider_name: z.nullable(z.string()),
217
- courier_company_id: z.nullable(z.string()),
218
- courier_company_name: z.nullable(z.string()),
218
+ fulfillment_preference: FulfillmentPreference$inboundSchema.optional(),
219
219
  estimated_delivery_days: z.nullable(z.number().int()),
220
220
  handling_charge_excluding_tax: z.number(),
221
221
  handling_charge_tax_amount: z.number(),
@@ -259,10 +259,7 @@ export const Cart$inboundSchema: z.ZodType<Cart, z.ZodTypeDef, unknown> = z
259
259
  "shipping_tax_rate": "shippingTaxRate",
260
260
  "shipping_tax_amount": "shippingTaxAmount",
261
261
  "shipping_amount_including_tax": "shippingAmountIncludingTax",
262
- "shipping_provider_id": "shippingProviderId",
263
- "shipping_provider_name": "shippingProviderName",
264
- "courier_company_id": "courierCompanyId",
265
- "courier_company_name": "courierCompanyName",
262
+ "fulfillment_preference": "fulfillmentPreference",
266
263
  "estimated_delivery_days": "estimatedDeliveryDays",
267
264
  "handling_charge_excluding_tax": "handlingChargeExcludingTax",
268
265
  "handling_charge_tax_amount": "handlingChargeTaxAmount",
@@ -308,10 +305,7 @@ export type Cart$Outbound = {
308
305
  shipping_tax_rate: number | null;
309
306
  shipping_tax_amount: number | null;
310
307
  shipping_amount_including_tax: number | null;
311
- shipping_provider_id: string | null;
312
- shipping_provider_name: string | null;
313
- courier_company_id: string | null;
314
- courier_company_name: string | null;
308
+ fulfillment_preference?: FulfillmentPreference$Outbound | undefined;
315
309
  estimated_delivery_days: number | null;
316
310
  handling_charge_excluding_tax: number;
317
311
  handling_charge_tax_amount: number;
@@ -359,10 +353,7 @@ export const Cart$outboundSchema: z.ZodType<Cart$Outbound, z.ZodTypeDef, Cart> =
359
353
  shippingTaxRate: z.nullable(z.number()),
360
354
  shippingTaxAmount: z.nullable(z.number()),
361
355
  shippingAmountIncludingTax: z.nullable(z.number()),
362
- shippingProviderId: z.nullable(z.string()),
363
- shippingProviderName: z.nullable(z.string()),
364
- courierCompanyId: z.nullable(z.string()),
365
- courierCompanyName: z.nullable(z.string()),
356
+ fulfillmentPreference: FulfillmentPreference$outboundSchema.optional(),
366
357
  estimatedDeliveryDays: z.nullable(z.number().int()),
367
358
  handlingChargeExcludingTax: z.number(),
368
359
  handlingChargeTaxAmount: z.number(),
@@ -404,10 +395,7 @@ export const Cart$outboundSchema: z.ZodType<Cart$Outbound, z.ZodTypeDef, Cart> =
404
395
  shippingTaxRate: "shipping_tax_rate",
405
396
  shippingTaxAmount: "shipping_tax_amount",
406
397
  shippingAmountIncludingTax: "shipping_amount_including_tax",
407
- shippingProviderId: "shipping_provider_id",
408
- shippingProviderName: "shipping_provider_name",
409
- courierCompanyId: "courier_company_id",
410
- courierCompanyName: "courier_company_name",
398
+ fulfillmentPreference: "fulfillment_preference",
411
399
  estimatedDeliveryDays: "estimated_delivery_days",
412
400
  handlingChargeExcludingTax: "handling_charge_excluding_tax",
413
401
  handlingChargeTaxAmount: "handling_charge_tax_amount",
@@ -13,6 +13,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
13
  */
14
14
  export type DeliveryFulfillment = {
15
15
  fulfillmentType?: "delivery" | undefined;
16
+ shippingProviderId?: string | null | undefined;
17
+ shippingProviderName?: string | null | undefined;
18
+ courierCompanyId?: string | null | undefined;
19
+ courierCompanyName?: string | null | undefined;
16
20
  };
17
21
 
18
22
  /** @internal */
@@ -22,15 +26,27 @@ export const DeliveryFulfillment$inboundSchema: z.ZodType<
22
26
  unknown
23
27
  > = z.object({
24
28
  fulfillment_type: z.literal("delivery").default("delivery").optional(),
29
+ shipping_provider_id: z.nullable(z.string()).optional(),
30
+ shipping_provider_name: z.nullable(z.string()).optional(),
31
+ courier_company_id: z.nullable(z.string()).optional(),
32
+ courier_company_name: z.nullable(z.string()).optional(),
25
33
  }).transform((v) => {
26
34
  return remap$(v, {
27
35
  "fulfillment_type": "fulfillmentType",
36
+ "shipping_provider_id": "shippingProviderId",
37
+ "shipping_provider_name": "shippingProviderName",
38
+ "courier_company_id": "courierCompanyId",
39
+ "courier_company_name": "courierCompanyName",
28
40
  });
29
41
  });
30
42
 
31
43
  /** @internal */
32
44
  export type DeliveryFulfillment$Outbound = {
33
45
  fulfillment_type: "delivery";
46
+ shipping_provider_id?: string | null | undefined;
47
+ shipping_provider_name?: string | null | undefined;
48
+ courier_company_id?: string | null | undefined;
49
+ courier_company_name?: string | null | undefined;
34
50
  };
35
51
 
36
52
  /** @internal */
@@ -40,9 +56,17 @@ export const DeliveryFulfillment$outboundSchema: z.ZodType<
40
56
  DeliveryFulfillment
41
57
  > = z.object({
42
58
  fulfillmentType: z.literal("delivery").default("delivery" as const),
59
+ shippingProviderId: z.nullable(z.string()).optional(),
60
+ shippingProviderName: z.nullable(z.string()).optional(),
61
+ courierCompanyId: z.nullable(z.string()).optional(),
62
+ courierCompanyName: z.nullable(z.string()).optional(),
43
63
  }).transform((v) => {
44
64
  return remap$(v, {
45
65
  fulfillmentType: "fulfillment_type",
66
+ shippingProviderId: "shipping_provider_id",
67
+ shippingProviderName: "shipping_provider_name",
68
+ courierCompanyId: "courier_company_id",
69
+ courierCompanyName: "courier_company_name",
46
70
  });
47
71
  });
48
72
 
@@ -0,0 +1,98 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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
+ /**
12
+ * @see {@link https://llm-docs.commercengine.io/schemas/FulfillmentItem} - API reference for the FulfillmentItem schema
13
+ */
14
+ export type FulfillmentItem = {
15
+ productId: string;
16
+ productName: string;
17
+ variantId: string | null;
18
+ variantName: string | null;
19
+ quantity: number;
20
+ };
21
+
22
+ /** @internal */
23
+ export const FulfillmentItem$inboundSchema: z.ZodType<
24
+ FulfillmentItem,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ product_id: z.string(),
29
+ product_name: z.string(),
30
+ variant_id: z.nullable(z.string()),
31
+ variant_name: z.nullable(z.string()),
32
+ quantity: z.number().int(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ "product_id": "productId",
36
+ "product_name": "productName",
37
+ "variant_id": "variantId",
38
+ "variant_name": "variantName",
39
+ });
40
+ });
41
+
42
+ /** @internal */
43
+ export type FulfillmentItem$Outbound = {
44
+ product_id: string;
45
+ product_name: string;
46
+ variant_id: string | null;
47
+ variant_name: string | null;
48
+ quantity: number;
49
+ };
50
+
51
+ /** @internal */
52
+ export const FulfillmentItem$outboundSchema: z.ZodType<
53
+ FulfillmentItem$Outbound,
54
+ z.ZodTypeDef,
55
+ FulfillmentItem
56
+ > = z.object({
57
+ productId: z.string(),
58
+ productName: z.string(),
59
+ variantId: z.nullable(z.string()),
60
+ variantName: z.nullable(z.string()),
61
+ quantity: z.number().int(),
62
+ }).transform((v) => {
63
+ return remap$(v, {
64
+ productId: "product_id",
65
+ productName: "product_name",
66
+ variantId: "variant_id",
67
+ variantName: "variant_name",
68
+ });
69
+ });
70
+
71
+ /**
72
+ * @internal
73
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
74
+ */
75
+ export namespace FulfillmentItem$ {
76
+ /** @deprecated use `FulfillmentItem$inboundSchema` instead. */
77
+ export const inboundSchema = FulfillmentItem$inboundSchema;
78
+ /** @deprecated use `FulfillmentItem$outboundSchema` instead. */
79
+ export const outboundSchema = FulfillmentItem$outboundSchema;
80
+ /** @deprecated use `FulfillmentItem$Outbound` instead. */
81
+ export type Outbound = FulfillmentItem$Outbound;
82
+ }
83
+
84
+ export function fulfillmentItemToJSON(
85
+ fulfillmentItem: FulfillmentItem,
86
+ ): string {
87
+ return JSON.stringify(FulfillmentItem$outboundSchema.parse(fulfillmentItem));
88
+ }
89
+
90
+ export function fulfillmentItemFromJSON(
91
+ jsonString: string,
92
+ ): SafeParseResult<FulfillmentItem, SDKValidationError> {
93
+ return safeParse(
94
+ jsonString,
95
+ (x) => FulfillmentItem$inboundSchema.parse(JSON.parse(x)),
96
+ `Failed to parse 'FulfillmentItem' from JSON`,
97
+ );
98
+ }
@@ -0,0 +1,88 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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
+ /**
12
+ * @see {@link https://llm-docs.commercengine.io/schemas/FulfillmentItem} - API reference for the FulfillmentItem schema
13
+ */
14
+ export type FulfillmentItemInput = {
15
+ productId: string;
16
+ variantId: string | null;
17
+ quantity: number;
18
+ };
19
+
20
+ /** @internal */
21
+ export const FulfillmentItemInput$inboundSchema: z.ZodType<
22
+ FulfillmentItemInput,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ product_id: z.string(),
27
+ variant_id: z.nullable(z.string()),
28
+ quantity: z.number().int(),
29
+ }).transform((v) => {
30
+ return remap$(v, {
31
+ "product_id": "productId",
32
+ "variant_id": "variantId",
33
+ });
34
+ });
35
+
36
+ /** @internal */
37
+ export type FulfillmentItemInput$Outbound = {
38
+ product_id: string;
39
+ variant_id: string | null;
40
+ quantity: number;
41
+ };
42
+
43
+ /** @internal */
44
+ export const FulfillmentItemInput$outboundSchema: z.ZodType<
45
+ FulfillmentItemInput$Outbound,
46
+ z.ZodTypeDef,
47
+ FulfillmentItemInput
48
+ > = z.object({
49
+ productId: z.string(),
50
+ variantId: z.nullable(z.string()),
51
+ quantity: z.number().int(),
52
+ }).transform((v) => {
53
+ return remap$(v, {
54
+ productId: "product_id",
55
+ variantId: "variant_id",
56
+ });
57
+ });
58
+
59
+ /**
60
+ * @internal
61
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
62
+ */
63
+ export namespace FulfillmentItemInput$ {
64
+ /** @deprecated use `FulfillmentItemInput$inboundSchema` instead. */
65
+ export const inboundSchema = FulfillmentItemInput$inboundSchema;
66
+ /** @deprecated use `FulfillmentItemInput$outboundSchema` instead. */
67
+ export const outboundSchema = FulfillmentItemInput$outboundSchema;
68
+ /** @deprecated use `FulfillmentItemInput$Outbound` instead. */
69
+ export type Outbound = FulfillmentItemInput$Outbound;
70
+ }
71
+
72
+ export function fulfillmentItemInputToJSON(
73
+ fulfillmentItemInput: FulfillmentItemInput,
74
+ ): string {
75
+ return JSON.stringify(
76
+ FulfillmentItemInput$outboundSchema.parse(fulfillmentItemInput),
77
+ );
78
+ }
79
+
80
+ export function fulfillmentItemInputFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<FulfillmentItemInput, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => FulfillmentItemInput$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'FulfillmentItemInput' from JSON`,
87
+ );
88
+ }
@@ -3,29 +3,63 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import { ClosedEnum } from "../../types/enums.js";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ CollectInStoreFulfillment,
11
+ CollectInStoreFulfillment$inboundSchema,
12
+ CollectInStoreFulfillment$Outbound,
13
+ CollectInStoreFulfillment$outboundSchema,
14
+ } from "./collectinstorefulfillment.js";
15
+ import {
16
+ DeliveryFulfillment,
17
+ DeliveryFulfillment$inboundSchema,
18
+ DeliveryFulfillment$Outbound,
19
+ DeliveryFulfillment$outboundSchema,
20
+ } from "./deliveryfulfillment.js";
21
+ import {
22
+ PartialCollectAndDelivery,
23
+ PartialCollectAndDelivery$inboundSchema,
24
+ PartialCollectAndDelivery$Outbound,
25
+ PartialCollectAndDelivery$outboundSchema,
26
+ } from "./partialcollectanddelivery.js";
7
27
 
8
28
  /**
9
29
  * @see {@link https://llm-docs.commercengine.io/schemas/FulfillmentPreference} - API reference for the FulfillmentPreference schema
10
30
  */
11
- export const FulfillmentPreference = {
12
- CollectInStore: "collect-in-store",
13
- Delivery: "delivery",
14
- } as const;
15
- /**
16
- * @see {@link https://llm-docs.commercengine.io/schemas/FulfillmentPreference} - API reference for the FulfillmentPreference schema
17
- */
18
- export type FulfillmentPreference = ClosedEnum<typeof FulfillmentPreference>;
31
+ export type FulfillmentPreference =
32
+ | PartialCollectAndDelivery
33
+ | CollectInStoreFulfillment
34
+ | DeliveryFulfillment;
35
+
36
+ /** @internal */
37
+ export const FulfillmentPreference$inboundSchema: z.ZodType<
38
+ FulfillmentPreference,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.union([
42
+ PartialCollectAndDelivery$inboundSchema,
43
+ CollectInStoreFulfillment$inboundSchema,
44
+ DeliveryFulfillment$inboundSchema,
45
+ ]);
19
46
 
20
47
  /** @internal */
21
- export const FulfillmentPreference$inboundSchema: z.ZodNativeEnum<
22
- typeof FulfillmentPreference
23
- > = z.nativeEnum(FulfillmentPreference);
48
+ export type FulfillmentPreference$Outbound =
49
+ | PartialCollectAndDelivery$Outbound
50
+ | CollectInStoreFulfillment$Outbound
51
+ | DeliveryFulfillment$Outbound;
24
52
 
25
53
  /** @internal */
26
- export const FulfillmentPreference$outboundSchema: z.ZodNativeEnum<
27
- typeof FulfillmentPreference
28
- > = FulfillmentPreference$inboundSchema;
54
+ export const FulfillmentPreference$outboundSchema: z.ZodType<
55
+ FulfillmentPreference$Outbound,
56
+ z.ZodTypeDef,
57
+ FulfillmentPreference
58
+ > = z.union([
59
+ PartialCollectAndDelivery$outboundSchema,
60
+ CollectInStoreFulfillment$outboundSchema,
61
+ DeliveryFulfillment$outboundSchema,
62
+ ]);
29
63
 
30
64
  /**
31
65
  * @internal
@@ -36,4 +70,24 @@ export namespace FulfillmentPreference$ {
36
70
  export const inboundSchema = FulfillmentPreference$inboundSchema;
37
71
  /** @deprecated use `FulfillmentPreference$outboundSchema` instead. */
38
72
  export const outboundSchema = FulfillmentPreference$outboundSchema;
73
+ /** @deprecated use `FulfillmentPreference$Outbound` instead. */
74
+ export type Outbound = FulfillmentPreference$Outbound;
75
+ }
76
+
77
+ export function fulfillmentPreferenceToJSON(
78
+ fulfillmentPreference: FulfillmentPreference,
79
+ ): string {
80
+ return JSON.stringify(
81
+ FulfillmentPreference$outboundSchema.parse(fulfillmentPreference),
82
+ );
83
+ }
84
+
85
+ export function fulfillmentPreferenceFromJSON(
86
+ jsonString: string,
87
+ ): SafeParseResult<FulfillmentPreference, SDKValidationError> {
88
+ return safeParse(
89
+ jsonString,
90
+ (x) => FulfillmentPreference$inboundSchema.parse(JSON.parse(x)),
91
+ `Failed to parse 'FulfillmentPreference' from JSON`,
92
+ );
39
93
  }
@@ -28,6 +28,8 @@ export * from "./deliveryfulfillment.js";
28
28
  export * from "./discountbasedpromotion.js";
29
29
  export * from "./fixedpricepromotion.js";
30
30
  export * from "./freegoodspromotion.js";
31
+ export * from "./fulfillmentitem.js";
32
+ export * from "./fulfillmentiteminput.js";
31
33
  export * from "./fulfillmentpreference.js";
32
34
  export * from "./generateotpwithemail.js";
33
35
  export * from "./generateotpwithphone.js";
@@ -48,6 +50,7 @@ export * from "./orderpayment.js";
48
50
  export * from "./ordershipment.js";
49
51
  export * from "./pagination.js";
50
52
  export * from "./partialcollectanddelivery.js";
53
+ export * from "./partialcollectanddeliveryinput.js";
51
54
  export * from "./paymentgateway.js";
52
55
  export * from "./paymentgatewayparams.js";
53
56
  export * from "./payupaymentgatewayparams.js";
@@ -26,6 +26,12 @@ import {
26
26
  CustomerAddress$Outbound,
27
27
  CustomerAddress$outboundSchema,
28
28
  } from "./customeraddress.js";
29
+ import {
30
+ FulfillmentPreference,
31
+ FulfillmentPreference$inboundSchema,
32
+ FulfillmentPreference$Outbound,
33
+ FulfillmentPreference$outboundSchema,
34
+ } from "./fulfillmentpreference.js";
29
35
  import {
30
36
  OrderItem,
31
37
  OrderItem$inboundSchema,
@@ -143,10 +149,7 @@ export type Order = {
143
149
  shippingTaxRate?: number | undefined;
144
150
  shippingTaxAmount?: number | undefined;
145
151
  shippingAmountIncludingTax?: number | undefined;
146
- shippingProviderId?: string | null | undefined;
147
- shippingProviderName?: string | null | undefined;
148
- courierCompanyId?: string | null | undefined;
149
- courierCompanyName?: string | null | undefined;
152
+ fulfillmentPreference?: FulfillmentPreference | undefined;
150
153
  estimatedDeliveryDays?: number | null | undefined;
151
154
  handlingChargeExcludingTax?: number | undefined;
152
155
  handlingChargeTaxAmount?: number | undefined;
@@ -410,10 +413,7 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
410
413
  shipping_tax_rate: z.number().optional(),
411
414
  shipping_tax_amount: z.number().optional(),
412
415
  shipping_amount_including_tax: z.number().optional(),
413
- shipping_provider_id: z.nullable(z.string()).optional(),
414
- shipping_provider_name: z.nullable(z.string()).optional(),
415
- courier_company_id: z.nullable(z.string()).optional(),
416
- courier_company_name: z.nullable(z.string()).optional(),
416
+ fulfillment_preference: FulfillmentPreference$inboundSchema.optional(),
417
417
  estimated_delivery_days: z.nullable(z.number().int()).optional(),
418
418
  handling_charge_excluding_tax: z.number().optional(),
419
419
  handling_charge_tax_amount: z.number().optional(),
@@ -464,10 +464,7 @@ export const Order$inboundSchema: z.ZodType<Order, z.ZodTypeDef, unknown> = z
464
464
  "shipping_tax_rate": "shippingTaxRate",
465
465
  "shipping_tax_amount": "shippingTaxAmount",
466
466
  "shipping_amount_including_tax": "shippingAmountIncludingTax",
467
- "shipping_provider_id": "shippingProviderId",
468
- "shipping_provider_name": "shippingProviderName",
469
- "courier_company_id": "courierCompanyId",
470
- "courier_company_name": "courierCompanyName",
467
+ "fulfillment_preference": "fulfillmentPreference",
471
468
  "estimated_delivery_days": "estimatedDeliveryDays",
472
469
  "handling_charge_excluding_tax": "handlingChargeExcludingTax",
473
470
  "handling_charge_tax_amount": "handlingChargeTaxAmount",
@@ -518,10 +515,7 @@ export type Order$Outbound = {
518
515
  shipping_tax_rate?: number | undefined;
519
516
  shipping_tax_amount?: number | undefined;
520
517
  shipping_amount_including_tax?: number | undefined;
521
- shipping_provider_id?: string | null | undefined;
522
- shipping_provider_name?: string | null | undefined;
523
- courier_company_id?: string | null | undefined;
524
- courier_company_name?: string | null | undefined;
518
+ fulfillment_preference?: FulfillmentPreference$Outbound | undefined;
525
519
  estimated_delivery_days?: number | null | undefined;
526
520
  handling_charge_excluding_tax?: number | undefined;
527
521
  handling_charge_tax_amount?: number | undefined;
@@ -578,10 +572,7 @@ export const Order$outboundSchema: z.ZodType<
578
572
  shippingTaxRate: z.number().optional(),
579
573
  shippingTaxAmount: z.number().optional(),
580
574
  shippingAmountIncludingTax: z.number().optional(),
581
- shippingProviderId: z.nullable(z.string()).optional(),
582
- shippingProviderName: z.nullable(z.string()).optional(),
583
- courierCompanyId: z.nullable(z.string()).optional(),
584
- courierCompanyName: z.nullable(z.string()).optional(),
575
+ fulfillmentPreference: FulfillmentPreference$outboundSchema.optional(),
585
576
  estimatedDeliveryDays: z.nullable(z.number().int()).optional(),
586
577
  handlingChargeExcludingTax: z.number().optional(),
587
578
  handlingChargeTaxAmount: z.number().optional(),
@@ -632,10 +623,7 @@ export const Order$outboundSchema: z.ZodType<
632
623
  shippingTaxRate: "shipping_tax_rate",
633
624
  shippingTaxAmount: "shipping_tax_amount",
634
625
  shippingAmountIncludingTax: "shipping_amount_including_tax",
635
- shippingProviderId: "shipping_provider_id",
636
- shippingProviderName: "shipping_provider_name",
637
- courierCompanyId: "courier_company_id",
638
- courierCompanyName: "courier_company_name",
626
+ fulfillmentPreference: "fulfillment_preference",
639
627
  estimatedDeliveryDays: "estimated_delivery_days",
640
628
  handlingChargeExcludingTax: "handling_charge_excluding_tax",
641
629
  handlingChargeTaxAmount: "handling_charge_tax_amount",