@shophost/rest-api 2.0.64 → 2.0.67

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 (315) hide show
  1. package/package.json +2 -2
  2. package/scripts/shophost-rest-api.mjs +1 -199
  3. package/src/bootstrap.js +1 -1
  4. package/src/container.d.ts +2 -2
  5. package/src/container.js +1 -1
  6. package/src/core/auth/auth.schema.js +1 -1
  7. package/src/core/auth/auth.util.js +1 -1
  8. package/src/core/auth/better-auth.lib.js +1 -1
  9. package/src/core/auth/generate-password-hash.util.js +1 -1
  10. package/src/core/auth/headers.schema.js +1 -1
  11. package/src/core/auth/user.schema.js +1 -1
  12. package/src/core/db/__generated__/client/browser.js +1 -1
  13. package/src/core/db/__generated__/client/client.js +1 -1
  14. package/src/core/db/__generated__/client/enums.js +1 -1
  15. package/src/core/db/__generated__/client/internal/class.js +1 -788
  16. package/src/core/db/__generated__/client/internal/prismaNamespace.js +1 -1
  17. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js +1 -1
  18. package/src/core/db/index.js +1 -1
  19. package/src/core/email/components.js +1 -1
  20. package/src/core/exceptions/http-exception.js +1 -1
  21. package/src/core/hono/hono.js +1 -1
  22. package/src/core/lib/prisma.d.ts +24 -24
  23. package/src/core/lib/prisma.js +1 -1
  24. package/src/core/logging/pino.js +1 -1
  25. package/src/core/notifications/email.service.d.ts +1 -1
  26. package/src/core/notifications/email.service.js +1 -1
  27. package/src/core/openapi/openapi.lib.js +1 -1
  28. package/src/core/utils/currency.util.js +1 -1
  29. package/src/core/utils/env.util.js +1 -1
  30. package/src/core/utils/object.util.js +1 -1
  31. package/src/core/utils/translations.util.js +1 -1
  32. package/src/core/utils/zod.util.js +1 -1
  33. package/src/db.js +1 -1
  34. package/src/features/access/access.handler.js +1 -1
  35. package/src/features/access/access.route.js +1 -1
  36. package/src/features/access/access.schema.js +1 -1
  37. package/src/features/access/access.service.js +1 -1
  38. package/src/features/analytics/analytics.handler.js +1 -1
  39. package/src/features/analytics/analytics.route.js +1 -1
  40. package/src/features/analytics/analytics.schema.js +1 -1
  41. package/src/features/analytics/analytics.service.js +1 -1
  42. package/src/features/cart/cart.handler.js +1 -1
  43. package/src/features/cart/cart.route.js +1 -1
  44. package/src/features/cart/cart.schema.js +1 -1
  45. package/src/features/cart/cart.service.js +1 -1
  46. package/src/features/cart/cart.util.js +1 -1
  47. package/src/features/customer/customer.handler.js +1 -1
  48. package/src/features/customer/customer.route.d.ts +4 -4
  49. package/src/features/customer/customer.route.js +1 -1
  50. package/src/features/customer/customer.schema.d.ts +4 -4
  51. package/src/features/customer/customer.schema.js +1 -1
  52. package/src/features/customer/customer.service.d.ts +1 -1
  53. package/src/features/customer/customer.service.js +1 -1
  54. package/src/features/file/file.handler.js +1 -1
  55. package/src/features/file/file.route.js +1 -1
  56. package/src/features/file/file.schema.js +1 -1
  57. package/src/features/file/file.service.js +1 -1
  58. package/src/features/health/health.handler.js +1 -1
  59. package/src/features/health/health.route.js +1 -1
  60. package/src/features/index.js +1 -1
  61. package/src/features/integration/integration-config.js +1 -1
  62. package/src/features/integration/integration-registry.js +1 -1
  63. package/src/features/integration/integration.handler.js +1 -1
  64. package/src/features/integration/integration.route.js +1 -1
  65. package/src/features/integration/integration.schema.js +1 -1
  66. package/src/features/integration/integration.service.d.ts +1 -1
  67. package/src/features/integration/integration.service.js +1 -1
  68. package/src/features/inventory/inventory.service.js +1 -1
  69. package/src/features/location/location.handler.js +1 -1
  70. package/src/features/location/location.route.js +1 -1
  71. package/src/features/location/location.schema.js +1 -1
  72. package/src/features/location/location.service.js +1 -1
  73. package/src/features/manufacturer/manufacturer.handler.js +1 -1
  74. package/src/features/manufacturer/manufacturer.route.js +1 -1
  75. package/src/features/manufacturer/manufacturer.schema.js +1 -1
  76. package/src/features/manufacturer/manufacturer.service.js +1 -1
  77. package/src/features/order/emails/order-confirmation.email.js +1 -1
  78. package/src/features/order/emails/order-notification.email.js +1 -1
  79. package/src/features/order/fulfilment.schema.js +1 -1
  80. package/src/features/order/order-fulfillment.service.js +1 -1
  81. package/src/features/order/order.handler.js +1 -1
  82. package/src/features/order/order.route.d.ts +139 -21
  83. package/src/features/order/order.route.js +1 -1
  84. package/src/features/order/order.schema.d.ts +4 -4
  85. package/src/features/order/order.schema.js +1 -1
  86. package/src/features/order/order.service.d.ts +13 -7
  87. package/src/features/order/order.service.js +1 -1
  88. package/src/features/order/recipient.schema.d.ts +1 -1
  89. package/src/features/order/recipient.schema.js +1 -1
  90. package/src/features/organization/legal-entity.schema.d.ts +1 -1
  91. package/src/features/organization/legal-entity.schema.js +1 -1
  92. package/src/features/organization/organization-configuration.schema.d.ts +1 -1
  93. package/src/features/organization/organization-configuration.schema.js +1 -1
  94. package/src/features/organization/organization.handler.js +1 -1
  95. package/src/features/organization/organization.route.d.ts +5 -5
  96. package/src/features/organization/organization.route.js +1 -1
  97. package/src/features/organization/organization.schema.d.ts +2 -2
  98. package/src/features/organization/organization.schema.js +1 -1
  99. package/src/features/organization/organization.service.d.ts +4 -4
  100. package/src/features/organization/organization.service.js +1 -1
  101. package/src/features/payment/payment-webhook.service.d.ts +1 -3
  102. package/src/features/payment/payment-webhook.service.js +1 -1
  103. package/src/features/payment/payment.handler.js +1 -1
  104. package/src/features/payment/payment.route.js +1 -1
  105. package/src/features/payment/payment.schema.d.ts +1 -1
  106. package/src/features/payment/payment.schema.js +1 -1
  107. package/src/features/payment/payment.service.d.ts +1 -0
  108. package/src/features/payment/payment.service.js +1 -1
  109. package/src/features/payment/stripe.service.d.ts +4 -1
  110. package/src/features/payment/stripe.service.js +1 -1
  111. package/src/features/product/product-modifier.schema.js +1 -1
  112. package/src/features/product/product.handler.js +1 -1
  113. package/src/features/product/product.route.js +1 -1
  114. package/src/features/product/product.schema.js +1 -1
  115. package/src/features/product/product.service.js +1 -1
  116. package/src/features/product-category/product-category.handler.js +1 -1
  117. package/src/features/product-category/product-category.route.js +1 -1
  118. package/src/features/product-category/product-category.schema.js +1 -1
  119. package/src/features/product-category/product-category.service.js +1 -1
  120. package/src/features/reservation/emails/reservation-cancellation.email.js +1 -1
  121. package/src/features/reservation/emails/reservation-confirmation.email.js +1 -1
  122. package/src/features/reservation/emails/reservation-notification.email.js +1 -1
  123. package/src/features/reservation/emails/reservation-updated.email.js +1 -1
  124. package/src/features/reservation/reservation.handler.js +1 -1
  125. package/src/features/reservation/reservation.route.js +1 -1
  126. package/src/features/reservation/reservation.schema.js +1 -1
  127. package/src/features/reservation/reservation.service.js +1 -1
  128. package/src/features/shipping/shipping.handler.js +1 -1
  129. package/src/features/shipping/shipping.route.d.ts +4 -4
  130. package/src/features/shipping/shipping.route.js +1 -1
  131. package/src/features/shipping/shipping.service.d.ts +3 -3
  132. package/src/features/shipping/shipping.service.js +1 -1
  133. package/src/features/shipping-method/shipping-method.handler.js +1 -1
  134. package/src/features/shipping-method/shipping-method.route.js +1 -1
  135. package/src/features/shipping-method/shipping-method.schema.js +1 -1
  136. package/src/features/shipping-method/shipping-method.service.js +1 -1
  137. package/src/features/shipping-method/shipping-zone.schema.js +1 -1
  138. package/src/features/webhook/webhook.handler.js +1 -1
  139. package/src/features/webhook/webhook.route.d.ts +2 -2
  140. package/src/features/webhook/webhook.route.js +1 -1
  141. package/src/index.js +1 -1
  142. package/src/integrations/next.js +1 -1
  143. package/src/schemas/address.schema.d.ts +3 -3
  144. package/src/schemas/address.schema.js +1 -1
  145. package/src/schemas/currency.schema.js +1 -1
  146. package/src/schemas/error.schema.js +1 -1
  147. package/src/schemas/index.js +1 -1
  148. package/src/schemas/locales.schema.js +1 -1
  149. package/src/schemas/number.schema.js +1 -1
  150. package/src/schemas/pagination.schema.js +1 -1
  151. package/src/schemas/params.schema.js +1 -1
  152. package/src/schemas/queries.schema.js +1 -1
  153. package/scripts/minify-dist.mjs +0 -45
  154. package/src/bootstrap.js.map +0 -1
  155. package/src/container.js.map +0 -1
  156. package/src/core/auth/auth.schema.js.map +0 -1
  157. package/src/core/auth/auth.util.js.map +0 -1
  158. package/src/core/auth/better-auth.lib.js.map +0 -1
  159. package/src/core/auth/generate-password-hash.util.js.map +0 -1
  160. package/src/core/auth/headers.schema.js.map +0 -1
  161. package/src/core/auth/user.schema.js.map +0 -1
  162. package/src/core/db/__generated__/client/browser.js.map +0 -1
  163. package/src/core/db/__generated__/client/client.js.map +0 -1
  164. package/src/core/db/__generated__/client/commonInputTypes.js.map +0 -1
  165. package/src/core/db/__generated__/client/enums.js.map +0 -1
  166. package/src/core/db/__generated__/client/internal/class.js.map +0 -1
  167. package/src/core/db/__generated__/client/internal/prismaNamespace.js.map +0 -1
  168. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js.map +0 -1
  169. package/src/core/db/__generated__/client/models/Account.js.map +0 -1
  170. package/src/core/db/__generated__/client/models/Address.js.map +0 -1
  171. package/src/core/db/__generated__/client/models/Campaign.js.map +0 -1
  172. package/src/core/db/__generated__/client/models/ClosingTimes.js.map +0 -1
  173. package/src/core/db/__generated__/client/models/File.js.map +0 -1
  174. package/src/core/db/__generated__/client/models/Integration.js.map +0 -1
  175. package/src/core/db/__generated__/client/models/Invitation.js.map +0 -1
  176. package/src/core/db/__generated__/client/models/LegalEntity.js.map +0 -1
  177. package/src/core/db/__generated__/client/models/Manufacturer.js.map +0 -1
  178. package/src/core/db/__generated__/client/models/ManufacturerTranslation.js.map +0 -1
  179. package/src/core/db/__generated__/client/models/Member.js.map +0 -1
  180. package/src/core/db/__generated__/client/models/Modifier.js.map +0 -1
  181. package/src/core/db/__generated__/client/models/ModifierGroup.js.map +0 -1
  182. package/src/core/db/__generated__/client/models/ModifierGroupTranslation.js.map +0 -1
  183. package/src/core/db/__generated__/client/models/OpeningTimes.js.map +0 -1
  184. package/src/core/db/__generated__/client/models/Order.js.map +0 -1
  185. package/src/core/db/__generated__/client/models/OrderItem.js.map +0 -1
  186. package/src/core/db/__generated__/client/models/OrderItemTranslation.js.map +0 -1
  187. package/src/core/db/__generated__/client/models/Organization.js.map +0 -1
  188. package/src/core/db/__generated__/client/models/OrganizationConfiguration.js.map +0 -1
  189. package/src/core/db/__generated__/client/models/Payment.js.map +0 -1
  190. package/src/core/db/__generated__/client/models/PaymentSession.js.map +0 -1
  191. package/src/core/db/__generated__/client/models/Product.js.map +0 -1
  192. package/src/core/db/__generated__/client/models/ProductCategory.js.map +0 -1
  193. package/src/core/db/__generated__/client/models/ProductCategoryTranslation.js.map +0 -1
  194. package/src/core/db/__generated__/client/models/ProductSnapshot.js.map +0 -1
  195. package/src/core/db/__generated__/client/models/ProductTranslation.js.map +0 -1
  196. package/src/core/db/__generated__/client/models/Reservation.js.map +0 -1
  197. package/src/core/db/__generated__/client/models/Session.js.map +0 -1
  198. package/src/core/db/__generated__/client/models/ShippingMethod.js.map +0 -1
  199. package/src/core/db/__generated__/client/models/ShippingZone.js.map +0 -1
  200. package/src/core/db/__generated__/client/models/User.js.map +0 -1
  201. package/src/core/db/__generated__/client/models/Verification.js.map +0 -1
  202. package/src/core/db/__generated__/client/models.js.map +0 -1
  203. package/src/core/db/index.js.map +0 -1
  204. package/src/core/email/components.js.map +0 -1
  205. package/src/core/exceptions/http-exception.js.map +0 -1
  206. package/src/core/hono/hono.js.map +0 -1
  207. package/src/core/lib/prisma.js.map +0 -1
  208. package/src/core/logging/pino.js.map +0 -1
  209. package/src/core/notifications/email.service.js.map +0 -1
  210. package/src/core/openapi/openapi.lib.js.map +0 -1
  211. package/src/core/types/google-maps.types.js.map +0 -1
  212. package/src/core/utils/currency.util.js.map +0 -1
  213. package/src/core/utils/env.util.js.map +0 -1
  214. package/src/core/utils/object.util.js.map +0 -1
  215. package/src/core/utils/translations.util.js.map +0 -1
  216. package/src/core/utils/zod.util.js.map +0 -1
  217. package/src/db.js.map +0 -1
  218. package/src/features/access/access.handler.js.map +0 -1
  219. package/src/features/access/access.route.js.map +0 -1
  220. package/src/features/access/access.schema.js.map +0 -1
  221. package/src/features/access/access.service.js.map +0 -1
  222. package/src/features/analytics/analytics.handler.js.map +0 -1
  223. package/src/features/analytics/analytics.route.js.map +0 -1
  224. package/src/features/analytics/analytics.schema.js.map +0 -1
  225. package/src/features/analytics/analytics.service.js.map +0 -1
  226. package/src/features/cart/cart.handler.js.map +0 -1
  227. package/src/features/cart/cart.route.js.map +0 -1
  228. package/src/features/cart/cart.schema.js.map +0 -1
  229. package/src/features/cart/cart.service.js.map +0 -1
  230. package/src/features/cart/cart.util.js.map +0 -1
  231. package/src/features/customer/customer.handler.js.map +0 -1
  232. package/src/features/customer/customer.route.js.map +0 -1
  233. package/src/features/customer/customer.schema.js.map +0 -1
  234. package/src/features/customer/customer.service.js.map +0 -1
  235. package/src/features/file/file.handler.js.map +0 -1
  236. package/src/features/file/file.route.js.map +0 -1
  237. package/src/features/file/file.schema.js.map +0 -1
  238. package/src/features/file/file.service.js.map +0 -1
  239. package/src/features/health/health.handler.js.map +0 -1
  240. package/src/features/health/health.route.js.map +0 -1
  241. package/src/features/index.js.map +0 -1
  242. package/src/features/integration/integration-config.js.map +0 -1
  243. package/src/features/integration/integration-registry.js.map +0 -1
  244. package/src/features/integration/integration.handler.js.map +0 -1
  245. package/src/features/integration/integration.route.js.map +0 -1
  246. package/src/features/integration/integration.schema.js.map +0 -1
  247. package/src/features/integration/integration.service.js.map +0 -1
  248. package/src/features/inventory/inventory.service.js.map +0 -1
  249. package/src/features/location/location.handler.js.map +0 -1
  250. package/src/features/location/location.route.js.map +0 -1
  251. package/src/features/location/location.schema.js.map +0 -1
  252. package/src/features/location/location.service.js.map +0 -1
  253. package/src/features/manufacturer/manufacturer.handler.js.map +0 -1
  254. package/src/features/manufacturer/manufacturer.route.js.map +0 -1
  255. package/src/features/manufacturer/manufacturer.schema.js.map +0 -1
  256. package/src/features/manufacturer/manufacturer.service.js.map +0 -1
  257. package/src/features/order/emails/order-confirmation.email.js.map +0 -1
  258. package/src/features/order/emails/order-notification.email.js.map +0 -1
  259. package/src/features/order/fulfilment.schema.js.map +0 -1
  260. package/src/features/order/order-fulfillment.service.js.map +0 -1
  261. package/src/features/order/order.handler.js.map +0 -1
  262. package/src/features/order/order.route.js.map +0 -1
  263. package/src/features/order/order.schema.js.map +0 -1
  264. package/src/features/order/order.service.js.map +0 -1
  265. package/src/features/order/recipient.schema.js.map +0 -1
  266. package/src/features/organization/legal-entity.schema.js.map +0 -1
  267. package/src/features/organization/organization-configuration.schema.js.map +0 -1
  268. package/src/features/organization/organization.handler.js.map +0 -1
  269. package/src/features/organization/organization.route.js.map +0 -1
  270. package/src/features/organization/organization.schema.js.map +0 -1
  271. package/src/features/organization/organization.service.js.map +0 -1
  272. package/src/features/payment/payment-webhook.service.js.map +0 -1
  273. package/src/features/payment/payment.handler.js.map +0 -1
  274. package/src/features/payment/payment.route.js.map +0 -1
  275. package/src/features/payment/payment.schema.js.map +0 -1
  276. package/src/features/payment/payment.service.js.map +0 -1
  277. package/src/features/payment/stripe.service.js.map +0 -1
  278. package/src/features/product/product-modifier.schema.js.map +0 -1
  279. package/src/features/product/product.handler.js.map +0 -1
  280. package/src/features/product/product.route.js.map +0 -1
  281. package/src/features/product/product.schema.js.map +0 -1
  282. package/src/features/product/product.service.js.map +0 -1
  283. package/src/features/product-category/product-category.handler.js.map +0 -1
  284. package/src/features/product-category/product-category.route.js.map +0 -1
  285. package/src/features/product-category/product-category.schema.js.map +0 -1
  286. package/src/features/product-category/product-category.service.js.map +0 -1
  287. package/src/features/reservation/emails/reservation-cancellation.email.js.map +0 -1
  288. package/src/features/reservation/emails/reservation-confirmation.email.js.map +0 -1
  289. package/src/features/reservation/emails/reservation-notification.email.js.map +0 -1
  290. package/src/features/reservation/emails/reservation-updated.email.js.map +0 -1
  291. package/src/features/reservation/reservation.handler.js.map +0 -1
  292. package/src/features/reservation/reservation.route.js.map +0 -1
  293. package/src/features/reservation/reservation.schema.js.map +0 -1
  294. package/src/features/reservation/reservation.service.js.map +0 -1
  295. package/src/features/shipping/shipping.handler.js.map +0 -1
  296. package/src/features/shipping/shipping.route.js.map +0 -1
  297. package/src/features/shipping/shipping.service.js.map +0 -1
  298. package/src/features/shipping-method/shipping-method.handler.js.map +0 -1
  299. package/src/features/shipping-method/shipping-method.route.js.map +0 -1
  300. package/src/features/shipping-method/shipping-method.schema.js.map +0 -1
  301. package/src/features/shipping-method/shipping-method.service.js.map +0 -1
  302. package/src/features/shipping-method/shipping-zone.schema.js.map +0 -1
  303. package/src/features/webhook/webhook.handler.js.map +0 -1
  304. package/src/features/webhook/webhook.route.js.map +0 -1
  305. package/src/index.js.map +0 -1
  306. package/src/integrations/next.js.map +0 -1
  307. package/src/schemas/address.schema.js.map +0 -1
  308. package/src/schemas/currency.schema.js.map +0 -1
  309. package/src/schemas/error.schema.js.map +0 -1
  310. package/src/schemas/index.js.map +0 -1
  311. package/src/schemas/locales.schema.js.map +0 -1
  312. package/src/schemas/number.schema.js.map +0 -1
  313. package/src/schemas/pagination.schema.js.map +0 -1
  314. package/src/schemas/params.schema.js.map +0 -1
  315. package/src/schemas/queries.schema.js.map +0 -1
@@ -355,7 +355,7 @@ export declare const orderRoute: {
355
355
  zipCode: z.ZodOptional<z.ZodString>;
356
356
  city: z.ZodString;
357
357
  country: z.ZodString;
358
- placeId: z.ZodString;
358
+ placeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
359
359
  deliveryInstructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
360
360
  }, z.core.$strip>>>;
361
361
  fulfilmentMethod: z.ZodEnum<{
@@ -421,7 +421,7 @@ export declare const orderRoute: {
421
421
  shipping: z.ZodDefault<z.ZodNumber>;
422
422
  subtotal: z.ZodNumber;
423
423
  total: z.ZodNumber;
424
- discount: z.ZodDefault<z.ZodNumber>;
424
+ discount: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodDefault<z.ZodNumber>>;
425
425
  currency: z.ZodEnum<{
426
426
  USD: "USD";
427
427
  EUR: "EUR";
@@ -556,13 +556,13 @@ export declare const orderRoute: {
556
556
  addressLineOne: string;
557
557
  city: string;
558
558
  country: string;
559
- placeId: string;
560
559
  firstname?: string | null | undefined;
561
560
  lastname?: string | null | undefined;
562
561
  phone?: string | null | undefined;
563
562
  doorNumber?: string | null | undefined;
564
563
  addressLineTwo?: string | null | undefined;
565
564
  zipCode?: string | undefined;
565
+ placeId?: string | null | undefined;
566
566
  deliveryInstructions?: string | null | undefined;
567
567
  } | null | undefined;
568
568
  }, {
@@ -663,13 +663,13 @@ export declare const orderRoute: {
663
663
  addressLineOne: string;
664
664
  city: string;
665
665
  country: string;
666
- placeId: string;
667
666
  firstname?: string | null | undefined;
668
667
  lastname?: string | null | undefined;
669
668
  phone?: string | null | undefined;
670
669
  doorNumber?: string | null | undefined;
671
670
  addressLineTwo?: string | null | undefined;
672
671
  zipCode?: string | undefined;
672
+ placeId?: string | null | undefined;
673
673
  deliveryInstructions?: string | null | undefined;
674
674
  } | null | undefined;
675
675
  }>>>;
@@ -1070,7 +1070,7 @@ export declare const orderRoute: {
1070
1070
  zipCode: z.ZodOptional<z.ZodString>;
1071
1071
  city: z.ZodString;
1072
1072
  country: z.ZodString;
1073
- placeId: z.ZodString;
1073
+ placeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1074
1074
  deliveryInstructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1075
1075
  }, z.core.$strip>>>;
1076
1076
  fulfilmentMethod: z.ZodEnum<{
@@ -1136,7 +1136,7 @@ export declare const orderRoute: {
1136
1136
  shipping: z.ZodDefault<z.ZodNumber>;
1137
1137
  subtotal: z.ZodNumber;
1138
1138
  total: z.ZodNumber;
1139
- discount: z.ZodDefault<z.ZodNumber>;
1139
+ discount: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodDefault<z.ZodNumber>>;
1140
1140
  currency: z.ZodEnum<{
1141
1141
  USD: "USD";
1142
1142
  EUR: "EUR";
@@ -1271,13 +1271,13 @@ export declare const orderRoute: {
1271
1271
  addressLineOne: string;
1272
1272
  city: string;
1273
1273
  country: string;
1274
- placeId: string;
1275
1274
  firstname?: string | null | undefined;
1276
1275
  lastname?: string | null | undefined;
1277
1276
  phone?: string | null | undefined;
1278
1277
  doorNumber?: string | null | undefined;
1279
1278
  addressLineTwo?: string | null | undefined;
1280
1279
  zipCode?: string | undefined;
1280
+ placeId?: string | null | undefined;
1281
1281
  deliveryInstructions?: string | null | undefined;
1282
1282
  } | null | undefined;
1283
1283
  }, {
@@ -1378,13 +1378,13 @@ export declare const orderRoute: {
1378
1378
  addressLineOne: string;
1379
1379
  city: string;
1380
1380
  country: string;
1381
- placeId: string;
1382
1381
  firstname?: string | null | undefined;
1383
1382
  lastname?: string | null | undefined;
1384
1383
  phone?: string | null | undefined;
1385
1384
  doorNumber?: string | null | undefined;
1386
1385
  addressLineTwo?: string | null | undefined;
1387
1386
  zipCode?: string | undefined;
1387
+ placeId?: string | null | undefined;
1388
1388
  deliveryInstructions?: string | null | undefined;
1389
1389
  } | null | undefined;
1390
1390
  }>>>;
@@ -1485,7 +1485,125 @@ export declare const orderRoute: {
1485
1485
  params: z.ZodObject<{
1486
1486
  organizationId: z.ZodString;
1487
1487
  }, z.core.$strip>;
1488
- } & Record<never, never>;
1488
+ } & {
1489
+ query: z.ZodObject<{
1490
+ locale: z.ZodOptional<z.ZodEnum<{
1491
+ hr: "hr";
1492
+ th: "th";
1493
+ tr: "tr";
1494
+ id: "id";
1495
+ is: "is";
1496
+ mt: "mt";
1497
+ ml: "ml";
1498
+ af: "af";
1499
+ sq: "sq";
1500
+ ar_dz: "ar_dz";
1501
+ ar_bh: "ar_bh";
1502
+ ar_eg: "ar_eg";
1503
+ ar_iq: "ar_iq";
1504
+ ar_jo: "ar_jo";
1505
+ ar_kw: "ar_kw";
1506
+ ar_lb: "ar_lb";
1507
+ ar_ly: "ar_ly";
1508
+ ar_ma: "ar_ma";
1509
+ ar_om: "ar_om";
1510
+ ar_qa: "ar_qa";
1511
+ ar_sa: "ar_sa";
1512
+ ar_sy: "ar_sy";
1513
+ ar_tn: "ar_tn";
1514
+ ar_ae: "ar_ae";
1515
+ ar_ye: "ar_ye";
1516
+ eu: "eu";
1517
+ be: "be";
1518
+ bg: "bg";
1519
+ ca: "ca";
1520
+ zh_hk: "zh_hk";
1521
+ zh_cn: "zh_cn";
1522
+ zh_sg: "zh_sg";
1523
+ zh_tw: "zh_tw";
1524
+ cs: "cs";
1525
+ da: "da";
1526
+ nl_be: "nl_be";
1527
+ nl: "nl";
1528
+ en: "en";
1529
+ en_au: "en_au";
1530
+ en_bz: "en_bz";
1531
+ en_ca: "en_ca";
1532
+ en_ie: "en_ie";
1533
+ en_jm: "en_jm";
1534
+ en_nz: "en_nz";
1535
+ en_za: "en_za";
1536
+ en_tt: "en_tt";
1537
+ en_gb: "en_gb";
1538
+ en_us: "en_us";
1539
+ et: "et";
1540
+ fo: "fo";
1541
+ fa: "fa";
1542
+ fi: "fi";
1543
+ fr_be: "fr_be";
1544
+ fr_ca: "fr_ca";
1545
+ fr_lu: "fr_lu";
1546
+ fr: "fr";
1547
+ fr_ch: "fr_ch";
1548
+ gd: "gd";
1549
+ de_at: "de_at";
1550
+ de_li: "de_li";
1551
+ de_lu: "de_lu";
1552
+ de: "de";
1553
+ de_ch: "de_ch";
1554
+ el: "el";
1555
+ he: "he";
1556
+ hi: "hi";
1557
+ hu: "hu";
1558
+ ga: "ga";
1559
+ it: "it";
1560
+ it_ch: "it_ch";
1561
+ ja: "ja";
1562
+ ko: "ko";
1563
+ ku: "ku";
1564
+ lv: "lv";
1565
+ lt: "lt";
1566
+ mk: "mk";
1567
+ ms: "ms";
1568
+ no: "no";
1569
+ nb: "nb";
1570
+ nn: "nn";
1571
+ pl: "pl";
1572
+ pt_br: "pt_br";
1573
+ pt: "pt";
1574
+ pa: "pa";
1575
+ rm: "rm";
1576
+ ro: "ro";
1577
+ ro_md: "ro_md";
1578
+ ru: "ru";
1579
+ ru_md: "ru_md";
1580
+ sr: "sr";
1581
+ sk: "sk";
1582
+ sl: "sl";
1583
+ sb: "sb";
1584
+ es_ar: "es_ar";
1585
+ es_bo: "es_bo";
1586
+ es_cl: "es_cl";
1587
+ es_co: "es_co";
1588
+ es_cr: "es_cr";
1589
+ es_do: "es_do";
1590
+ es_ec: "es_ec";
1591
+ es_sv: "es_sv";
1592
+ es_gt: "es_gt";
1593
+ es_hn: "es_hn";
1594
+ es_mx: "es_mx";
1595
+ es: "es";
1596
+ sv: "sv";
1597
+ sv_fi: "sv_fi";
1598
+ uk: "uk";
1599
+ ur: "ur";
1600
+ vi: "vi";
1601
+ cy: "cy";
1602
+ ji: "ji";
1603
+ zu: "zu";
1604
+ }>>;
1605
+ }, z.core.$strip>;
1606
+ };
1489
1607
  responses: {
1490
1608
  201: {
1491
1609
  content: {
@@ -1704,7 +1822,7 @@ export declare const orderRoute: {
1704
1822
  zipCode: z.ZodOptional<z.ZodString>;
1705
1823
  city: z.ZodString;
1706
1824
  country: z.ZodString;
1707
- placeId: z.ZodString;
1825
+ placeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1708
1826
  deliveryInstructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1709
1827
  }, z.core.$strip>>>;
1710
1828
  fulfilmentMethod: z.ZodEnum<{
@@ -1770,7 +1888,7 @@ export declare const orderRoute: {
1770
1888
  shipping: z.ZodDefault<z.ZodNumber>;
1771
1889
  subtotal: z.ZodNumber;
1772
1890
  total: z.ZodNumber;
1773
- discount: z.ZodDefault<z.ZodNumber>;
1891
+ discount: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodDefault<z.ZodNumber>>;
1774
1892
  currency: z.ZodEnum<{
1775
1893
  USD: "USD";
1776
1894
  EUR: "EUR";
@@ -1905,13 +2023,13 @@ export declare const orderRoute: {
1905
2023
  addressLineOne: string;
1906
2024
  city: string;
1907
2025
  country: string;
1908
- placeId: string;
1909
2026
  firstname?: string | null | undefined;
1910
2027
  lastname?: string | null | undefined;
1911
2028
  phone?: string | null | undefined;
1912
2029
  doorNumber?: string | null | undefined;
1913
2030
  addressLineTwo?: string | null | undefined;
1914
2031
  zipCode?: string | undefined;
2032
+ placeId?: string | null | undefined;
1915
2033
  deliveryInstructions?: string | null | undefined;
1916
2034
  } | null | undefined;
1917
2035
  }, {
@@ -2012,13 +2130,13 @@ export declare const orderRoute: {
2012
2130
  addressLineOne: string;
2013
2131
  city: string;
2014
2132
  country: string;
2015
- placeId: string;
2016
2133
  firstname?: string | null | undefined;
2017
2134
  lastname?: string | null | undefined;
2018
2135
  phone?: string | null | undefined;
2019
2136
  doorNumber?: string | null | undefined;
2020
2137
  addressLineTwo?: string | null | undefined;
2021
2138
  zipCode?: string | undefined;
2139
+ placeId?: string | null | undefined;
2022
2140
  deliveryInstructions?: string | null | undefined;
2023
2141
  } | null | undefined;
2024
2142
  }>>;
@@ -2494,7 +2612,7 @@ export declare const orderRoute: {
2494
2612
  zipCode: z.ZodOptional<z.ZodString>;
2495
2613
  city: z.ZodString;
2496
2614
  country: z.ZodString;
2497
- placeId: z.ZodString;
2615
+ placeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2498
2616
  deliveryInstructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2499
2617
  }, z.core.$strip>>>;
2500
2618
  fulfilmentMethod: z.ZodEnum<{
@@ -2560,7 +2678,7 @@ export declare const orderRoute: {
2560
2678
  shipping: z.ZodDefault<z.ZodNumber>;
2561
2679
  subtotal: z.ZodNumber;
2562
2680
  total: z.ZodNumber;
2563
- discount: z.ZodDefault<z.ZodNumber>;
2681
+ discount: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodDefault<z.ZodNumber>>;
2564
2682
  currency: z.ZodEnum<{
2565
2683
  USD: "USD";
2566
2684
  EUR: "EUR";
@@ -2695,13 +2813,13 @@ export declare const orderRoute: {
2695
2813
  addressLineOne: string;
2696
2814
  city: string;
2697
2815
  country: string;
2698
- placeId: string;
2699
2816
  firstname?: string | null | undefined;
2700
2817
  lastname?: string | null | undefined;
2701
2818
  phone?: string | null | undefined;
2702
2819
  doorNumber?: string | null | undefined;
2703
2820
  addressLineTwo?: string | null | undefined;
2704
2821
  zipCode?: string | undefined;
2822
+ placeId?: string | null | undefined;
2705
2823
  deliveryInstructions?: string | null | undefined;
2706
2824
  } | null | undefined;
2707
2825
  }, {
@@ -2802,13 +2920,13 @@ export declare const orderRoute: {
2802
2920
  addressLineOne: string;
2803
2921
  city: string;
2804
2922
  country: string;
2805
- placeId: string;
2806
2923
  firstname?: string | null | undefined;
2807
2924
  lastname?: string | null | undefined;
2808
2925
  phone?: string | null | undefined;
2809
2926
  doorNumber?: string | null | undefined;
2810
2927
  addressLineTwo?: string | null | undefined;
2811
2928
  zipCode?: string | undefined;
2929
+ placeId?: string | null | undefined;
2812
2930
  deliveryInstructions?: string | null | undefined;
2813
2931
  } | null | undefined;
2814
2932
  }>>;
@@ -3086,7 +3204,7 @@ export declare const orderRoute: {
3086
3204
  zipCode: z.ZodOptional<z.ZodString>;
3087
3205
  city: z.ZodString;
3088
3206
  country: z.ZodString;
3089
- placeId: z.ZodString;
3207
+ placeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3090
3208
  deliveryInstructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3091
3209
  }, z.core.$strip>>>;
3092
3210
  fulfilmentMethod: z.ZodEnum<{
@@ -3152,7 +3270,7 @@ export declare const orderRoute: {
3152
3270
  shipping: z.ZodDefault<z.ZodNumber>;
3153
3271
  subtotal: z.ZodNumber;
3154
3272
  total: z.ZodNumber;
3155
- discount: z.ZodDefault<z.ZodNumber>;
3273
+ discount: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodDefault<z.ZodNumber>>;
3156
3274
  currency: z.ZodEnum<{
3157
3275
  USD: "USD";
3158
3276
  EUR: "EUR";
@@ -3287,13 +3405,13 @@ export declare const orderRoute: {
3287
3405
  addressLineOne: string;
3288
3406
  city: string;
3289
3407
  country: string;
3290
- placeId: string;
3291
3408
  firstname?: string | null | undefined;
3292
3409
  lastname?: string | null | undefined;
3293
3410
  phone?: string | null | undefined;
3294
3411
  doorNumber?: string | null | undefined;
3295
3412
  addressLineTwo?: string | null | undefined;
3296
3413
  zipCode?: string | undefined;
3414
+ placeId?: string | null | undefined;
3297
3415
  deliveryInstructions?: string | null | undefined;
3298
3416
  } | null | undefined;
3299
3417
  }, {
@@ -3394,13 +3512,13 @@ export declare const orderRoute: {
3394
3512
  addressLineOne: string;
3395
3513
  city: string;
3396
3514
  country: string;
3397
- placeId: string;
3398
3515
  firstname?: string | null | undefined;
3399
3516
  lastname?: string | null | undefined;
3400
3517
  phone?: string | null | undefined;
3401
3518
  doorNumber?: string | null | undefined;
3402
3519
  addressLineTwo?: string | null | undefined;
3403
3520
  zipCode?: string | undefined;
3521
+ placeId?: string | null | undefined;
3404
3522
  deliveryInstructions?: string | null | undefined;
3405
3523
  } | null | undefined;
3406
3524
  }>>;
@@ -1 +1 @@
1
- import{z as r}from"@hono/zod-openapi";import{createApiRoute as t}from"../../core/hono/hono";import{CartConflictSchema as p}from"../cart/cart.schema";import{CreateOrderSchema as m,ErrorSchema as e,HeaderSchema as a,OrderSchema as o,OrderStatusSchema as h,OrganizationParams as s,OrganizationWithIdParams as d,PaginationMetaSchema as n,PaginationQuerySchema as i}from"../../schemas";const c=t({description:"Fetches paginated list of orders",headers:a,method:"GET",operationId:"getOrders",path:"/:organizationId/orders",pathParams:s,query:i,responses:{200:r.object({list:r.array(o),meta:n}),400:e,401:e},summary:"Get Orders",tags:["Order"]}),g=t({description:"Fetches paginated list of orders for the authenticated user",headers:a,method:"GET",operationId:"getMyOrders",path:"/:organizationId/orders/me",pathParams:s,query:i,responses:{200:r.object({list:r.array(o),meta:n}),400:e,401:e},summary:"Get My Orders",tags:["Order"]}),O=t({body:m,description:"Creates a new order",headers:a,method:"POST",operationId:"createOrder",path:"/:organizationId/orders",pathParams:r.object({organizationId:r.string().cuid().min(1).openapi({description:"The organization ID",example:"ckel0e8qw00004n5p5w6fznym",param:{in:"path",name:"organizationId"}})}),responses:{201:r.object({order:o,redirectUrl:r.string().url().optional()}),409:p,400:e,401:e,404:e},summary:"Create Order",tags:["Order"]}),u=t({headers:a,method:"GET",operationId:"getOrder",path:"/:organizationId/orders/:id",pathParams:d,responses:{200:o,401:e,404:e},summary:"Get Order",tags:["Order"]}),l=t({description:"Changes the status of an existing order based on the operation",headers:a,method:"POST",operationId:"updateOrderStatus",path:"/:organizationId/orders/:id/status/:operation",pathParams:d.extend({operation:h}),responses:{200:o,400:e,401:e,404:e},summary:"Change Order Status",tags:["Order"]}),y=t({description:"Soft deletes order",headers:a,method:"DELETE",operationId:"deleteOrder",path:"/:organizationId/orders/:id",pathParams:d,responses:{204:null,400:e,401:e,404:e},summary:"Delete Order",tags:["Order"]});export const orderRoute={getOrders:c,getMyOrders:g,createOrder:O,getOrder:u,updateStatus:l,deleteOrder:y};
1
+ const _0xb57c5f=_0x2976,_0x5e69a7=_0x2976;(function(_0x4e544f,_0x3bbfc8){const _0x41b2ba=_0x2976,_0x11680d=_0x2976,_0xe31313=_0x4e544f();while(!![]){try{const _0x54e467=-parseInt(_0x41b2ba(0x1f3))/0x1+parseInt(_0x41b2ba(0x1ea))/0x2+parseInt(_0x11680d(0x1e2))/0x3*(parseInt(_0x41b2ba(0x1f4))/0x4)+-parseInt(_0x11680d(0x20f))/0x5*(-parseInt(_0x41b2ba(0x1e7))/0x6)+-parseInt(_0x11680d(0x1fe))/0x7*(parseInt(_0x41b2ba(0x20c))/0x8)+parseInt(_0x41b2ba(0x21f))/0x9*(-parseInt(_0x11680d(0x1ec))/0xa)+-parseInt(_0x41b2ba(0x20e))/0xb*(-parseInt(_0x41b2ba(0x1e9))/0xc);if(_0x54e467===_0x3bbfc8)break;else _0xe31313['push'](_0xe31313['shift']());}catch(_0x26057c){_0xe31313['push'](_0xe31313['shift']());}}}(_0x129c,0xeb261));import{z as _0x49c050}from'@hono/zod-openapi';import{createApiRoute as _0x10d196}from'../../core/hono/hono';import{CreateOrderSchema as _0x37bbb4,ErrorSchema as _0x36bd80,HeaderSchema as _0x195603,locale as _0x25e92a,OrderSchema as _0x30726d,OrderStatusSchema as _0x1235ec,OrganizationParams as _0x21c817,OrganizationWithIdParams as _0x5ce77e,PaginationMetaSchema as _0x22bea4,PaginationQuerySchema as _0x254f11}from'../../schemas';import{CartConflictSchema as _0x5acb9f}from'../cart/cart.schema';const g=_0x10d196({'description':_0xb57c5f(0x1fa)+'paginate'+_0xb57c5f(0x200)+_0xb57c5f(0x226),'headers':_0x195603,'method':'GET','operationId':_0xb57c5f(0x201)+'s','path':'/:organi'+_0x5e69a7(0x21d)+_0xb57c5f(0x203),'pathParams':_0x21c817,'query':_0x254f11,'responses':{0xc8:_0x49c050[_0x5e69a7(0x1ff)]({'list':_0x49c050['array'](_0x30726d),'meta':_0x22bea4}),0x190:_0x36bd80,0x191:_0x36bd80},'summary':_0x5e69a7(0x1fd)+'rs','tags':[_0x5e69a7(0x1e0)]}),O=_0x10d196({'description':'Fetches\x20'+_0xb57c5f(0x206)+_0xb57c5f(0x200)+_0x5e69a7(0x226)+_0xb57c5f(0x1e8)+_0xb57c5f(0x1e4)+_0xb57c5f(0x221)+_0xb57c5f(0x218),'headers':_0x195603,'method':'GET','operationId':_0xb57c5f(0x1f7)+_0x5e69a7(0x1e1),'path':'/:organi'+_0x5e69a7(0x21d)+_0x5e69a7(0x1f0)+'me','pathParams':_0x21c817,'query':_0x254f11,'responses':{0xc8:_0x49c050[_0xb57c5f(0x1ff)]({'list':_0x49c050[_0xb57c5f(0x214)](_0x30726d),'meta':_0x22bea4}),0x190:_0x36bd80,0x191:_0x36bd80},'summary':_0x5e69a7(0x211)+_0x5e69a7(0x219),'tags':['Order']}),u=_0x10d196({'body':_0x37bbb4,'description':_0xb57c5f(0x1f9)+_0x5e69a7(0x1ef)+_0x5e69a7(0x1f8),'headers':_0x195603,'method':_0x5e69a7(0x1e5),'operationId':_0x5e69a7(0x1f2)+_0xb57c5f(0x1f8),'path':_0x5e69a7(0x213)+_0xb57c5f(0x21d)+_0xb57c5f(0x203),'pathParams':_0x49c050[_0x5e69a7(0x1ff)]({'organizationId':_0x49c050[_0xb57c5f(0x223)]()[_0x5e69a7(0x209)]()[_0x5e69a7(0x1ed)](0x1)[_0x5e69a7(0x212)]({'description':_0x5e69a7(0x1e3)+'nization'+_0xb57c5f(0x21c),'example':_0xb57c5f(0x210)+'w00004n5'+_0xb57c5f(0x21e)+'m','param':{'in':_0x5e69a7(0x224),'name':_0xb57c5f(0x20d)+_0xb57c5f(0x1fb)}})}),'query':_0x49c050['object']({'locale':_0x25e92a[_0xb57c5f(0x220)]()}),'responses':{0xc9:_0x49c050[_0x5e69a7(0x1ff)]({'order':_0x30726d,'redirectUrl':_0x49c050[_0x5e69a7(0x223)]()['url']()[_0xb57c5f(0x220)]()}),0x199:_0x5acb9f,0x190:_0x36bd80,0x191:_0x36bd80,0x194:_0x36bd80},'summary':_0xb57c5f(0x1f5)+'rder','tags':[_0x5e69a7(0x1e0)]}),l=_0x10d196({'headers':_0x195603,'method':_0xb57c5f(0x1fc),'operationId':_0xb57c5f(0x201),'path':_0xb57c5f(0x213)+_0xb57c5f(0x21d)+_0xb57c5f(0x1f0)+_0x5e69a7(0x217),'pathParams':_0x5ce77e,'responses':{0xc8:_0x30726d,0x191:_0x36bd80,0x194:_0x36bd80},'summary':'Get\x20Orde'+'r','tags':['Order']}),y=_0x10d196({'description':_0x5e69a7(0x208)+_0xb57c5f(0x20a)+_0x5e69a7(0x215)+_0xb57c5f(0x1f1)+_0xb57c5f(0x1f6)+_0xb57c5f(0x21a)+_0xb57c5f(0x1df)+_0x5e69a7(0x222),'headers':_0x195603,'method':_0xb57c5f(0x1e5),'operationId':'updateOr'+_0x5e69a7(0x207)+'s','path':'/:organi'+_0x5e69a7(0x21d)+_0x5e69a7(0x1f0)+':id/stat'+_0x5e69a7(0x1e6)+'ation','pathParams':_0x5ce77e[_0xb57c5f(0x21b)]({'operation':_0x1235ec}),'responses':{0xc8:_0x30726d,0x190:_0x36bd80,0x191:_0x36bd80,0x194:_0x36bd80},'summary':_0x5e69a7(0x20b)+_0xb57c5f(0x216)+_0xb57c5f(0x202),'tags':[_0xb57c5f(0x1e0)]}),I=_0x10d196({'description':_0xb57c5f(0x1ee)+_0xb57c5f(0x204)+'er','headers':_0x195603,'method':_0x5e69a7(0x1eb),'operationId':_0x5e69a7(0x225)+_0x5e69a7(0x1f8),'path':_0xb57c5f(0x213)+'zationId'+_0x5e69a7(0x1f0)+_0x5e69a7(0x217),'pathParams':_0x5ce77e,'responses':{0xcc:null,0x190:_0x36bd80,0x191:_0x36bd80,0x194:_0x36bd80},'summary':_0x5e69a7(0x205)+'rder','tags':[_0x5e69a7(0x1e0)]});function _0x2976(_0x4bffee,_0x54dda2){_0x4bffee=_0x4bffee-0x1df;const _0x129c82=_0x129c();let _0x297689=_0x129c82[_0x4bffee];if(_0x2976['eIhiQx']===undefined){var _0x3154cc=function(_0x5719e3){const _0x55e61b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x49c050='',_0x10d196='';for(let _0x37bbb4=0x0,_0x36bd80,_0x195603,_0x25e92a=0x0;_0x195603=_0x5719e3['charAt'](_0x25e92a++);~_0x195603&&(_0x36bd80=_0x37bbb4%0x4?_0x36bd80*0x40+_0x195603:_0x195603,_0x37bbb4++%0x4)?_0x49c050+=String['fromCharCode'](0xff&_0x36bd80>>(-0x2*_0x37bbb4&0x6)):0x0){_0x195603=_0x55e61b['indexOf'](_0x195603);}for(let _0x30726d=0x0,_0x1235ec=_0x49c050['length'];_0x30726d<_0x1235ec;_0x30726d++){_0x10d196+='%'+('00'+_0x49c050['charCodeAt'](_0x30726d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x10d196);};_0x2976['xoagSR']=_0x3154cc,_0x2976['TGQyMO']={},_0x2976['eIhiQx']=!![];}const _0x470cce=_0x129c82[0x0],_0x376ca3=_0x4bffee+_0x470cce,_0x3d8a2b=_0x2976['TGQyMO'][_0x376ca3];return!_0x3d8a2b?(_0x297689=_0x2976['xoagSR'](_0x297689),_0x2976['TGQyMO'][_0x376ca3]=_0x297689):_0x297689=_0x3d8a2b,_0x297689;}function _0x129c(){const _0x1b29d=['igf1DgHLBNq','ue9tva','DxmVoM9Wzxi','ndqXmJrHs2rYEg8','igzVCIb0Agu','mJmXoti0A3DOu3nK','mtiXmdC0ofHJv0H1yG','revmrvrf','mta3mZm3mtbsvfHxrfO','BwLU','u29MDcbKzwW','ysbUzxCGB3i','l29YzgvYCY8','igv4Axn0Aw4','y3jLyxrLt3i','nZmXmZeWwgLkzhb3','mty0nhvKwMnnvG','q3jLyxrLie8','zYbVCMrLCIa','z2v0txLpCMq','zgvY','q3jLyxrLCYa','rMv0y2HLCYa','DgLVBKLK','r0vu','r2v0ie9Yzgu','mZC5otuZzg9MA2vK','B2jQzwn0','zcbSAxn0ig8','z2v0t3jKzxi','DhvZ','l29YzgvYCW','zxrLCYbVCMq','rgvSzxrLie8','CgfNAw5HDgu','zgvYu3rHDhu','q2HHBMDLCYa','y3vPza','DgHLihn0yxq','q2HHBMDLie8','mta0vfHeAxrz','B3jNyw5PEMe','nZa0qKnVv2DQ','ntCWsgP5A054','y2TLBdbLohe','r2v0ie15ie8','B3bLBMfWAq','lZPVCMDHBMK','yxjYyxK','DxmGB2yGyw4','CMrLCIbtDge','oMLK','C2vY','CMrLCNm','yMfZzwqGB24','zxH0zw5K','ieLe','EMf0Aw9Uswq','Cdv3nMz6BNK','oxPfs2rJqW','B3b0Aw9UywW','AwnHDgvKihu','CMf0Aw9U','C3rYAw5N','Cgf0Aa','zgvSzxrLt3i','zIbVCMrLCNm','ihrOzsbVCgu','t3jKzxi','zxjZ','ntC4n2Lru2TLyG','vgHLig9Yz2e'];_0x129c=function(){return _0x1b29d;};return _0x129c();}export const orderRoute={'getOrders':g,'getMyOrders':O,'createOrder':u,'getOrder':l,'updateStatus':y,'deleteOrder':I};
@@ -371,7 +371,7 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
371
371
  zipCode: z.ZodOptional<z.ZodString>;
372
372
  city: z.ZodString;
373
373
  country: z.ZodString;
374
- placeId: z.ZodString;
374
+ placeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
375
375
  deliveryInstructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
376
376
  }, z.core.$strip>>>;
377
377
  fulfilmentMethod: z.ZodEnum<{
@@ -437,7 +437,7 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
437
437
  shipping: z.ZodDefault<z.ZodNumber>;
438
438
  subtotal: z.ZodNumber;
439
439
  total: z.ZodNumber;
440
- discount: z.ZodDefault<z.ZodNumber>;
440
+ discount: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodDefault<z.ZodNumber>>;
441
441
  currency: z.ZodEnum<{
442
442
  USD: "USD";
443
443
  EUR: "EUR";
@@ -572,13 +572,13 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
572
572
  addressLineOne: string;
573
573
  city: string;
574
574
  country: string;
575
- placeId: string;
576
575
  firstname?: string | null | undefined;
577
576
  lastname?: string | null | undefined;
578
577
  phone?: string | null | undefined;
579
578
  doorNumber?: string | null | undefined;
580
579
  addressLineTwo?: string | null | undefined;
581
580
  zipCode?: string | undefined;
581
+ placeId?: string | null | undefined;
582
582
  deliveryInstructions?: string | null | undefined;
583
583
  } | null | undefined;
584
584
  }, {
@@ -679,13 +679,13 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
679
679
  addressLineOne: string;
680
680
  city: string;
681
681
  country: string;
682
- placeId: string;
683
682
  firstname?: string | null | undefined;
684
683
  lastname?: string | null | undefined;
685
684
  phone?: string | null | undefined;
686
685
  doorNumber?: string | null | undefined;
687
686
  addressLineTwo?: string | null | undefined;
688
687
  zipCode?: string | undefined;
688
+ placeId?: string | null | undefined;
689
689
  deliveryInstructions?: string | null | undefined;
690
690
  } | null | undefined;
691
691
  }>>;
@@ -1 +1 @@
1
- import{z as e}from"@hono/zod-openapi";import{AddressSchema as a}from"../../schemas/address.schema";import{currency as o}from"../../schemas/currency.schema";import{locale as n}from"../../schemas/locales.schema";import{CartItemSchema as p,CartSchema as d}from"../cart/cart.schema";import{FileSchema as l}from"../file/file.schema";import{PaymentMethodSchema as c,PaymentProviderSchema as s,PaymentSchema as m}from"../payment/payment.schema";import{ShippingMethodSchema as h}from"../shipping-method/shipping-method.schema";import{fulfilmentMethod as r}from"./fulfilment.schema";export const OrderStatusSchema=e.enum(["draft","pending","accepted","ready-for-dispatch","dispatched","completed","cancelled"]).openapi({description:"Status of the order",example:"accepted"}),OrderItemSchema=e.object({translations:e.array(e.object({locale:n.openapi({description:"Locale of the translation",example:"en-US"}),title:e.string().openapi({description:"Title of the ordered product",example:"Premium Watch"}),subtitle:e.string().openapi({description:"Additional details about the ordered item, including modifiers",example:"Color: Silver, Size: Large"})})).openapi({description:"Translations for the order item"}),rawData:p,unitPrice:e.number().min(0).openapi({description:"Price per unit of the item",example:299.99}),image:l.nullable().optional(),totalPrice:e.number().min(0).openapi({description:"Total price for this item (unitPrice \xD7 quantity)",example:599.98}),quantity:e.number().min(1).openapi({description:"Number of units ordered",example:2}),productSnapshotId:e.string().cuid()}).openapi("OrderItem"),InventoryConflictItemSchema=e.object({productId:e.string().cuid(),title:e.string(),requestedQuantity:e.number().int().min(1),availableQuantity:e.number().int().min(0)}).openapi("InventoryConflictItem"),OrderSchema=e.object({id:e.string().openapi({description:"Unique identifier for the order",example:"clj1234567890abcdef"}),referenceId:e.string().openapi({description:"External reference ID for the order",example:"ORD-12345"}),status:OrderStatusSchema.optional(),token:e.string().openapi({description:"Security token for order verification",example:"a1b2c3d4e5f6g7h8i9j0"}),expiresAt:e.date().openapi({description:"Expiration date for the order",example:"2023-12-31T23:59:59Z"}),items:e.array(OrderItemSchema).min(1).openapi({description:"Array of items in the order"}),shippingMethod:h.nullable().openapi({description:"Shipping method selected for the order"}),acceptedAt:e.date().nullable().optional().openapi({description:"Date when the order was accepted",example:"2023-06-15T14:30:00Z"}),dispatchedAt:e.date().nullable().optional().openapi({description:"Date when the order was dispatched",example:"2023-06-16T09:15:00Z"}),readyForDispatchAt:e.date().nullable().optional().openapi({description:"Date when the order was ready for dispatch",example:"2023-06-16T09:15:00Z"}),createdAt:e.date().openapi({description:"Date when the order was created",example:"2023-06-15T14:30:00Z"}),completedAt:e.date().nullable().optional().openapi({description:"Date when the order was completed",example:"2023-06-18T11:45:00Z"}),cancelledAt:e.date().nullable().optional().openapi({description:"Date when the order was cancelled",example:"2023-06-14T16:20:00Z"}),inventoryDeductedAt:e.date().nullable().optional().openapi({description:"Date when the paid order inventory was deducted",example:"2023-06-15T14:30:00Z"}),inventoryConflictAt:e.date().nullable().optional().openapi({description:"Date when the paid order was flagged for manual inventory review",example:"2023-06-15T14:30:00Z"}),inventoryConflictItems:e.array(InventoryConflictItemSchema).nullable().optional().openapi({description:"List of line items that could not be deducted after payment"}),shippingAddress:a.nullable().optional(),fulfilmentMethod:r.openapi({description:"Method of order fulfilment (pickup or delivery)",example:"delivery"}),currency:o.openapi({description:"Currency used for the order",example:"USD"}),payment:m}).transform(t=>{let i;return t.cancelledAt?i="cancelled":t.completedAt?i="completed":t.dispatchedAt?i="dispatched":t.readyForDispatchAt?i="ready-for-dispatch":t.acceptedAt?i="accepted":i="pending",Object.assign(Object.assign({},t),{status:i})}).openapi("Order"),CreateOrderSchema=d.extend({fulfilmentMethod:r.default("delivery"),payment:e.object({provider:s,method:c}),checkoutBaseUrl:e.string().url()}).refine(t=>t.fulfilmentMethod!=="delivery"||t.shippingMethodId!==void 0,{message:"shippingMethodId is required when fulfilmentMethod is 'delivery'",path:["shippingMethodId"]}).openapi("CreateOrder");
1
+ const _0x116ad4=_0x29b8,_0xcd3a8b=_0x29b8;(function(_0x4313fe,_0x396838){const _0x228211=_0x29b8,_0x3fe8f4=_0x29b8,_0x529385=_0x4313fe();while(!![]){try{const _0xe14d5a=-parseInt(_0x228211(0x9a))/0x1*(parseInt(_0x228211(0x99))/0x2)+parseInt(_0x228211(0x9d))/0x3*(-parseInt(_0x3fe8f4(0x6a))/0x4)+-parseInt(_0x3fe8f4(0x8f))/0x5*(-parseInt(_0x3fe8f4(0x6c))/0x6)+parseInt(_0x228211(0xc4))/0x7*(parseInt(_0x3fe8f4(0x6f))/0x8)+parseInt(_0x228211(0x88))/0x9+parseInt(_0x228211(0xcc))/0xa+-parseInt(_0x228211(0x9f))/0xb*(-parseInt(_0x3fe8f4(0x86))/0xc);if(_0xe14d5a===_0x396838)break;else _0x529385['push'](_0x529385['shift']());}catch(_0x47060f){_0x529385['push'](_0x529385['shift']());}}}(_0x1515,0x55156));import{z as _0x3f300f}from'@hono/zod-openapi';function _0x1515(){const _0x6e9e3b=['mtGXmLvkD3vzyq','BNvSBgfIBgu','nJqXnJf5B1fqEKm','mtvumtq6mZa','ig1HBNvHBca','ihvZzwqGzM8','zgvSAxzLCNK','BNrnzxrOB2q','q3jLyxrLt3i','ntC4nZa1vhfHCffH','yw5ZBgf0Aw8','yxrPB24','rgf0zsb3Agu','zIb1BML0CYa','ihjLzMvYzw4','CgvUzgLUzW','rgLZCgf0y2G','rxHWAxjHDgK','AwzPzxjZ','mLjvsLHVEq','ntKXodKXv2fICKPR','zIbVCMrLCIa','ywnJzxb0zwq','odKWndnjthv0yuW','ig1LDgHVzca','mJu4nuPLt05nAW','vg90ywWGChi','zw4Tvvm','zgvYihDHCYa','B3iGB3jKzxi','Dwn0zwqGywy','t3jKzxi','zxiGAxrLBq','zgLUzYbTB2q','mtHumte6ndu','zwrbDa','ihrOzsbVCMq','BgLUzsbPDgu','u3rHDhvZig8','AxjLzcb3Agu','t1jelteYmZq','DgvYihbHEw0','B3bLBMfWAq','rxH0zxjUywW','mJaYmY0XmI0','zwXPDMvYEsC','y3vPza','C3rYAw5N','AtLQma','mJaYmY0WnI0','DxaGB3iGzgu','ztvMnMC3AdG','qwrKAxrPB24','B3jKzxi','vvne','q3vYCMvUy3K','AxPLoIbmyxi','BIbMDwXMAwW','B2jQzwn0','yxjYyxK','zw51Bq','zM9YihrOzsa','nty1nJiXzfPWufr3','ywWGzgv0ywK','zIb0AguGDhi','igzVCIb0Agu','zhjHzNq','twv0Ag9Kswq','CMvMAw5L','twv0Ag9Kig8','mtmXmdy2mg1iwLzOza','tNvTyMvYig8','Aw50','qxjYyxKGB2y','oJaWwG','uhjPy2uGCgu','oJu5wG','igLZihjLCxu','u2HPChbPBMC','DhjHBNnMB3i','zhvJDa','tg9JywXLig8','CIb1BML0ig8','y2XQmtiZndu','BIb0AguGCge','CI1KAxnWyxq','igLUDMvUDg8','DeL0zw0','zw50','q29SB3i6ifm','y29TCgXLDgu','BwLU','CNKGD2fZigq','mZfumJm6ntK','AwX2zxiSifm','mtrumty6mJa','vgL0BguGB2y','BIb0AguGB3i','C2HPChbPBMC','B3b0Aw9UywW','zgvY','ihzLCMLMAwm','DcbIzsbKzwq','y2uGsuqGzM8','B24Gzgf0zsa','vhjHBNnSyxq','Aw9UCYbMB3i','ndbSCNHHsw4','z2DLzcbMB3i','mZbiwhnrqwq','EunVBMzSAwm','zxH0zw5K','ndHvqxjSvKS','vw5PCxvLigK','CIb0AguGB3i','mtzumdK6mtu','zgvMyxvSDa','y2fUy2vSBgu','AwnLigzVCIa','zgLZCgf0y2G','CIbMB3iGDgG','yxnZAwDU','BNvTyMvY','zIb0AguGAxq','zgf0zq','CMvHzhLgB3i','BwvUDe1LDgG','BsWGAw5JBhu','AwqGB3jKzxi','Aw52zw50B3i','BgL2zxj5kq','CMvHzhKTzM8','zNvSzMLSBwu','t3jKzxjjDgu','ihDHCYbMBge'];_0x1515=function(){return _0x6e9e3b;};return _0x1515();}import{AddressSchema as _0x6e3c04}from'../../schemas/address.schema';import{currency as _0x2d1fe9}from'../../schemas/currency.schema';import{locale as _0x314128}from'../../schemas/locales.schema';import{CartItemSchema as _0x296c8e,CartSchema as _0x447ef1}from'../cart/cart.schema';function _0x29b8(_0x4b5646,_0x137248){_0x4b5646=_0x4b5646-0x67;const _0x15156a=_0x1515();let _0x29b8f6=_0x15156a[_0x4b5646];if(_0x29b8['kLiPzz']===undefined){var _0x1dbb1f=function(_0x36518a){const _0x33f7bb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4f4779='',_0x21bd65='';for(let _0x27d816=0x0,_0x15ee5d,_0x5b1d5e,_0x54bb0d=0x0;_0x5b1d5e=_0x36518a['charAt'](_0x54bb0d++);~_0x5b1d5e&&(_0x15ee5d=_0x27d816%0x4?_0x15ee5d*0x40+_0x5b1d5e:_0x5b1d5e,_0x27d816++%0x4)?_0x4f4779+=String['fromCharCode'](0xff&_0x15ee5d>>(-0x2*_0x27d816&0x6)):0x0){_0x5b1d5e=_0x33f7bb['indexOf'](_0x5b1d5e);}for(let _0x3b197a=0x0,_0x40bac1=_0x4f4779['length'];_0x3b197a<_0x40bac1;_0x3b197a++){_0x21bd65+='%'+('00'+_0x4f4779['charCodeAt'](_0x3b197a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x21bd65);};_0x29b8['usSyQK']=_0x1dbb1f,_0x29b8['ITJERx']={},_0x29b8['kLiPzz']=!![];}const _0x648017=_0x15156a[0x0],_0x41e1a7=_0x4b5646+_0x648017,_0x32d658=_0x29b8['ITJERx'][_0x41e1a7];return!_0x32d658?(_0x29b8f6=_0x29b8['usSyQK'](_0x29b8f6),_0x29b8['ITJERx'][_0x41e1a7]=_0x29b8f6):_0x29b8f6=_0x32d658,_0x29b8f6;}import{FileSchema as _0x13fcc0}from'../file/file.schema';import{PaymentMethodSchema as _0x3b865c,PaymentProviderSchema as _0x59fae5,PaymentSchema as _0xb2c478}from'../payment/payment.schema';import{ShippingMethodSchema as _0x57922d}from'../shipping-method/shipping-method.schema';import{fulfilmentMethod as _0x8c97e7}from'./fulfilment.schema';export const OrderStatusSchema=_0x3f300f[_0x116ad4(0xc2)]([_0x116ad4(0xc8),_0xcd3a8b(0x95),_0xcd3a8b(0x9c),_0x116ad4(0x82)+_0x116ad4(0xdb)+'ch',_0x116ad4(0x76)+'ed',_0x116ad4(0xe0)+'d','cancelle'+'d'])[_0x116ad4(0xb0)]({'description':_0x116ad4(0xac)+'f\x20the\x20or'+'der','example':_0x116ad4(0x9c)}),OrderItemSchema=_0x3f300f[_0x116ad4(0xc0)]({'translations':_0x3f300f[_0x116ad4(0xc1)](_0x3f300f[_0x116ad4(0xc0)]({'locale':_0x314128[_0x116ad4(0xb0)]({'description':_0x116ad4(0xd7)+_0x116ad4(0xc6)+_0xcd3a8b(0x90)+'n','example':_0x116ad4(0xa1)}),'title':_0x3f300f['string']()[_0x116ad4(0xb0)]({'description':_0xcd3a8b(0xe6)+_0xcd3a8b(0xaa)+'ered\x20pro'+_0x116ad4(0xd6),'example':'Premium\x20'+'Watch'}),'subtitle':_0x3f300f[_0x116ad4(0xb5)]()[_0x116ad4(0xb0)]({'description':_0xcd3a8b(0xba)+_0x116ad4(0xc5)+'ls\x20about'+_0x116ad4(0xaa)+'ered\x20ite'+_0xcd3a8b(0x7e)+_0x116ad4(0xa7)+_0xcd3a8b(0x98),'example':_0x116ad4(0xdf)+_0xcd3a8b(0xe4)+_0x116ad4(0xbe)+'ge'})}))[_0x116ad4(0xb0)]({'description':_0xcd3a8b(0x68)+_0x116ad4(0x69)+_0xcd3a8b(0xaa)+_0x116ad4(0xa6)}),'rawData':_0x296c8e,'unitPrice':_0x3f300f['number']()['min'](0x0)['openapi']({'description':_0x116ad4(0xd1)+_0x116ad4(0xd8)+_0x116ad4(0x7a)+'em','example':299.99}),'image':_0x13fcc0[_0x116ad4(0x87)]()[_0x116ad4(0xe9)](),'totalPrice':_0x3f300f[_0x116ad4(0x79)]()['min'](0x0)[_0xcd3a8b(0xb0)]({'description':_0xcd3a8b(0xa0)+_0xcd3a8b(0x75)+'this\x20ite'+'m\x20(unitP'+'rice\x20×\x20q'+'uantity)','example':599.98}),'quantity':_0x3f300f[_0xcd3a8b(0x79)]()['min'](0x1)[_0x116ad4(0xb0)]({'description':_0xcd3a8b(0xcd)+_0xcd3a8b(0x93)+'ordered','example':0x2}),'productSnapshotId':_0x3f300f[_0xcd3a8b(0xb5)]()[_0x116ad4(0xb4)]()})['openapi'](_0xcd3a8b(0x84)+'m'),InventoryConflictItemSchema=_0x3f300f[_0x116ad4(0xc0)]({'productId':_0x3f300f[_0x116ad4(0xb5)]()[_0xcd3a8b(0xb4)](),'title':_0x3f300f[_0xcd3a8b(0xb5)](),'requestedQuantity':_0x3f300f[_0x116ad4(0x79)]()[_0x116ad4(0xce)]()[_0x116ad4(0xe1)](0x1),'availableQuantity':_0x3f300f[_0xcd3a8b(0x79)]()[_0x116ad4(0xce)]()[_0xcd3a8b(0xe1)](0x0)})[_0xcd3a8b(0xb0)]('Inventor'+_0xcd3a8b(0x6d)+_0xcd3a8b(0xdd)),OrderSchema=_0x3f300f['object']({'id':_0x3f300f[_0xcd3a8b(0xb5)]()[_0xcd3a8b(0xb0)]({'description':_0xcd3a8b(0x70)+'dentifie'+_0x116ad4(0x77)+'e\x20order','example':_0xcd3a8b(0xd9)+'67890abc'+'def'}),'referenceId':_0x3f300f['string']()['openapi']({'description':_0x116ad4(0xb1)+_0xcd3a8b(0x94)+_0x116ad4(0xed)+'r\x20the\x20or'+_0xcd3a8b(0xea),'example':_0xcd3a8b(0xae)+'5'}),'status':OrderStatusSchema[_0x116ad4(0xe9)](),'token':_0x3f300f[_0xcd3a8b(0xb5)]()[_0x116ad4(0xb0)]({'description':'Security'+'\x20token\x20f'+_0xcd3a8b(0xa3)+_0xcd3a8b(0xeb)+_0xcd3a8b(0x91),'example':'a1b2c3d4'+_0xcd3a8b(0xb9)+_0x116ad4(0xb6)}),'expiresAt':_0x3f300f[_0xcd3a8b(0x7b)]()[_0xcd3a8b(0xb0)]({'description':_0xcd3a8b(0x97)+_0xcd3a8b(0x67)+_0x116ad4(0xc3)+_0xcd3a8b(0xbb),'example':_0xcd3a8b(0xb2)+_0x116ad4(0xe3)+_0xcd3a8b(0xd2)}),'items':_0x3f300f[_0x116ad4(0xc1)](OrderItemSchema)[_0xcd3a8b(0xe1)](0x1)['openapi']({'description':_0xcd3a8b(0xcf)+'\x20items\x20i'+_0xcd3a8b(0xe7)+_0xcd3a8b(0xea)}),'shippingMethod':_0x57922d[_0x116ad4(0x87)]()[_0x116ad4(0xb0)]({'description':_0x116ad4(0xd4)+_0xcd3a8b(0x9e)+'selected'+_0x116ad4(0xc7)+'\x20order'}),'acceptedAt':_0x3f300f['date']()[_0xcd3a8b(0x87)]()['optional']()[_0xcd3a8b(0xb0)]({'description':'Date\x20whe'+_0x116ad4(0xe7)+_0xcd3a8b(0xa2)+_0xcd3a8b(0x9c),'example':_0x116ad4(0xb7)+'15T14:30'+':00Z'}),'dispatchedAt':_0x3f300f[_0x116ad4(0x7b)]()[_0x116ad4(0x87)]()[_0xcd3a8b(0xe9)]()['openapi']({'description':_0xcd3a8b(0x92)+_0x116ad4(0xe7)+_0xcd3a8b(0xa2)+_0x116ad4(0x76)+'ed','example':_0x116ad4(0xb7)+_0xcd3a8b(0x72)+_0xcd3a8b(0xd0)}),'readyForDispatchAt':_0x3f300f['date']()[_0xcd3a8b(0x87)]()[_0x116ad4(0xe9)]()[_0xcd3a8b(0xb0)]({'description':'Date\x20whe'+'n\x20the\x20or'+_0xcd3a8b(0xa2)+'ready\x20fo'+'r\x20dispat'+'ch','example':_0x116ad4(0xb7)+_0x116ad4(0x72)+_0x116ad4(0xd0)}),'createdAt':_0x3f300f['date']()[_0x116ad4(0xb0)]({'description':_0xcd3a8b(0x92)+'n\x20the\x20or'+_0xcd3a8b(0xa2)+'created','example':_0xcd3a8b(0xb7)+_0xcd3a8b(0x89)+_0xcd3a8b(0xd0)}),'completedAt':_0x3f300f[_0xcd3a8b(0x7b)]()[_0x116ad4(0x87)]()['optional']()['openapi']({'description':_0xcd3a8b(0x92)+_0xcd3a8b(0xe7)+_0xcd3a8b(0xa2)+_0x116ad4(0xe0)+'d','example':_0xcd3a8b(0xb7)+_0xcd3a8b(0xa8)+':00Z'}),'cancelledAt':_0x3f300f[_0xcd3a8b(0x7b)]()[_0x116ad4(0x87)]()[_0xcd3a8b(0xe9)]()[_0xcd3a8b(0xb0)]({'description':_0x116ad4(0x92)+_0x116ad4(0xe7)+'der\x20was\x20'+_0xcd3a8b(0x74)+'d','example':_0xcd3a8b(0xb7)+_0xcd3a8b(0xe5)+_0xcd3a8b(0xd0)}),'inventoryDeductedAt':_0x3f300f['date']()[_0xcd3a8b(0x87)]()[_0xcd3a8b(0xe9)]()[_0x116ad4(0xb0)]({'description':_0xcd3a8b(0x92)+'n\x20the\x20pa'+_0xcd3a8b(0x7f)+_0xcd3a8b(0xdc)+_0x116ad4(0xe2)+'educted','example':'2023-06-'+_0xcd3a8b(0x89)+_0xcd3a8b(0xd0)}),'inventoryConflictAt':_0x3f300f[_0xcd3a8b(0x7b)]()[_0x116ad4(0x87)]()[_0x116ad4(0xe9)]()[_0x116ad4(0xb0)]({'description':'Date\x20whe'+_0xcd3a8b(0xda)+_0xcd3a8b(0x7f)+_0x116ad4(0x85)+_0xcd3a8b(0x6b)+_0x116ad4(0x8a)+_0xcd3a8b(0x80)+'y\x20review','example':_0xcd3a8b(0xb7)+'15T14:30'+_0x116ad4(0xd0)}),'inventoryConflictItems':_0x3f300f[_0xcd3a8b(0xc1)](InventoryConflictItemSchema)[_0xcd3a8b(0x87)]()['optional']()['openapi']({'description':'List\x20of\x20'+_0x116ad4(0xab)+'ms\x20that\x20'+'could\x20no'+_0x116ad4(0xec)+_0xcd3a8b(0xa4)+_0xcd3a8b(0xaf)+_0xcd3a8b(0xde)}),'shippingAddress':_0x6e3c04[_0xcd3a8b(0x87)]()[_0xcd3a8b(0xe9)](),'fulfilmentMethod':_0x8c97e7[_0xcd3a8b(0xb0)]({'description':_0x116ad4(0xcb)+_0xcd3a8b(0x9b)+'fulfilme'+'nt\x20(pick'+_0x116ad4(0xb8)+_0xcd3a8b(0x81),'example':_0x116ad4(0x8c)}),'currency':_0x2d1fe9[_0x116ad4(0xb0)]({'description':_0xcd3a8b(0xbd)+_0xcd3a8b(0x8b)+_0x116ad4(0x71)+_0xcd3a8b(0xea),'example':_0xcd3a8b(0xbc)}),'payment':_0xb2c478})[_0x116ad4(0xd5)+'m'](_0x1446f6=>{const _0x1dfc8f=_0xcd3a8b,_0x23605e=_0xcd3a8b,_0x3952d7={'sSZwF':_0x1dfc8f(0x9c)};let _0x8d9214;return _0x1446f6[_0x23605e(0x74)+'dAt']?_0x8d9214=_0x23605e(0x74)+'d':_0x1446f6[_0x1dfc8f(0xe0)+'dAt']?_0x8d9214='complete'+'d':_0x1446f6[_0x23605e(0x76)+_0x23605e(0xa9)]?_0x8d9214=_0x23605e(0x76)+'ed':_0x1446f6[_0x1dfc8f(0x7c)+_0x1dfc8f(0x96)+'At']?_0x8d9214=_0x1dfc8f(0x82)+_0x23605e(0xdb)+'ch':_0x1446f6[_0x23605e(0x9c)+'At']?_0x8d9214=_0x3952d7['sSZwF']:_0x8d9214=_0x1dfc8f(0x95),Object[_0x1dfc8f(0x78)](Object[_0x23605e(0x78)]({},_0x1446f6),{'status':_0x8d9214});})[_0x116ad4(0xb0)](_0x116ad4(0xa5)),CreateOrderSchema=_0x447ef1[_0xcd3a8b(0x6e)]({'fulfilmentMethod':_0x8c97e7[_0x116ad4(0x73)](_0xcd3a8b(0x8c)),'payment':_0x3f300f[_0xcd3a8b(0xc0)]({'provider':_0x59fae5,'method':_0x3b865c}),'checkoutBaseUrl':_0x3f300f['string']()['url']()})[_0xcd3a8b(0xca)](_0xc97386=>_0xc97386[_0x116ad4(0x83)+_0x116ad4(0x8d)]!==_0x116ad4(0x8c)||_0xc97386['shipping'+'MethodId']!==void 0x0,{'message':_0xcd3a8b(0xe8)+_0xcd3a8b(0xc9)+_0x116ad4(0xd3)+_0x116ad4(0xad)+_0xcd3a8b(0xbf)+_0x116ad4(0x7d)+'od\x20is\x20\x27d'+_0x116ad4(0xb3),'path':[_0x116ad4(0xe8)+'MethodId']})[_0xcd3a8b(0xb0)](_0x116ad4(0x8e)+_0xcd3a8b(0xea));
@@ -2,7 +2,7 @@ import { z } from "@hono/zod-openapi";
2
2
  import { HttpException } from "../../core/exceptions/http-exception";
3
3
  import { PrismaClientType } from "../../core/lib/prisma";
4
4
  import { EmailService } from "../../core/notifications/email.service";
5
- import { CreateOrderSchema, OrderStatus, User } from "../../schemas";
5
+ import { CreateOrderSchema, Locale, OrderStatus, User } from "../../schemas";
6
6
  import { CartData } from "../cart/cart.schema";
7
7
  import { CartService } from "../cart/cart.service";
8
8
  import { PaymentService } from "../payment/payment.service";
@@ -20,10 +20,16 @@ declare class OrderService {
20
20
  private readonly cartService;
21
21
  private readonly emailService;
22
22
  constructor(prisma: PrismaClientType, paymentService: PaymentService, cartService: CartService, emailService: EmailService);
23
+ private safelySendEmail;
24
+ private toLocaleCandidates;
25
+ private resolveCheckoutLocale;
23
26
  /**
24
27
  * Create a draft order
25
28
  */
26
- createOrder(organizationId: string, user: User, body: z.infer<typeof CreateOrderSchema>): Promise<{
29
+ createOrder(organizationId: string, user: User, body: z.infer<typeof CreateOrderSchema>, options?: {
30
+ acceptLanguage?: string;
31
+ locale?: Locale;
32
+ }): Promise<{
27
33
  redirectUrl: string | undefined;
28
34
  order: {
29
35
  status: "pending" | "accepted" | "ready-for-dispatch" | "dispatched" | "completed" | "cancelled";
@@ -123,13 +129,13 @@ declare class OrderService {
123
129
  addressLineOne: string;
124
130
  city: string;
125
131
  country: string;
126
- placeId: string;
127
132
  firstname?: string | null | undefined;
128
133
  lastname?: string | null | undefined;
129
134
  phone?: string | null | undefined;
130
135
  doorNumber?: string | null | undefined;
131
136
  addressLineTwo?: string | null | undefined;
132
137
  zipCode?: string | undefined;
138
+ placeId?: string | null | undefined;
133
139
  deliveryInstructions?: string | null | undefined;
134
140
  } | null | undefined;
135
141
  };
@@ -237,13 +243,13 @@ declare class OrderService {
237
243
  addressLineOne: string;
238
244
  city: string;
239
245
  country: string;
240
- placeId: string;
241
246
  firstname?: string | null | undefined;
242
247
  lastname?: string | null | undefined;
243
248
  phone?: string | null | undefined;
244
249
  doorNumber?: string | null | undefined;
245
250
  addressLineTwo?: string | null | undefined;
246
251
  zipCode?: string | undefined;
252
+ placeId?: string | null | undefined;
247
253
  deliveryInstructions?: string | null | undefined;
248
254
  } | null | undefined;
249
255
  }>;
@@ -359,13 +365,13 @@ declare class OrderService {
359
365
  addressLineOne: string;
360
366
  city: string;
361
367
  country: string;
362
- placeId: string;
363
368
  firstname?: string | null | undefined;
364
369
  lastname?: string | null | undefined;
365
370
  phone?: string | null | undefined;
366
371
  doorNumber?: string | null | undefined;
367
372
  addressLineTwo?: string | null | undefined;
368
373
  zipCode?: string | undefined;
374
+ placeId?: string | null | undefined;
369
375
  deliveryInstructions?: string | null | undefined;
370
376
  } | null | undefined;
371
377
  }[];
@@ -484,13 +490,13 @@ declare class OrderService {
484
490
  addressLineOne: string;
485
491
  city: string;
486
492
  country: string;
487
- placeId: string;
488
493
  firstname?: string | null | undefined;
489
494
  lastname?: string | null | undefined;
490
495
  phone?: string | null | undefined;
491
496
  doorNumber?: string | null | undefined;
492
497
  addressLineTwo?: string | null | undefined;
493
498
  zipCode?: string | undefined;
499
+ placeId?: string | null | undefined;
494
500
  deliveryInstructions?: string | null | undefined;
495
501
  } | null | undefined;
496
502
  }[];
@@ -600,13 +606,13 @@ declare class OrderService {
600
606
  addressLineOne: string;
601
607
  city: string;
602
608
  country: string;
603
- placeId: string;
604
609
  firstname?: string | null | undefined;
605
610
  lastname?: string | null | undefined;
606
611
  phone?: string | null | undefined;
607
612
  doorNumber?: string | null | undefined;
608
613
  addressLineTwo?: string | null | undefined;
609
614
  zipCode?: string | undefined;
615
+ placeId?: string | null | undefined;
610
616
  deliveryInstructions?: string | null | undefined;
611
617
  } | null | undefined;
612
618
  }>;