@restaround/react 1.1.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (183) hide show
  1. package/dist/components/Events/Events.d.ts +1 -2
  2. package/dist/components/PublicMenu/Branches/Branches.d.ts +1 -1
  3. package/dist/components/PublicMenu/Customer/CustomerAddress/CustomerAddress.d.ts +2 -0
  4. package/dist/components/PublicMenu/Customer/CustomerAddress/index.d.ts +1 -0
  5. package/dist/components/PublicMenu/FloatingOrdersButton/FloatingOrdersButton.d.ts +2 -0
  6. package/dist/components/PublicMenu/FloatingOrdersButton/index.d.ts +1 -0
  7. package/dist/components/PublicMenu/Header/Header.d.ts +1 -1
  8. package/dist/components/PublicMenu/Modals/AddUpdateAddress/AddUpdateAddress.d.ts +3 -0
  9. package/dist/components/PublicMenu/Modals/AddUpdateAddress/index.d.ts +1 -0
  10. package/dist/components/PublicMenu/Modals/AddUpdateNote/AddUpdateNote.d.ts +3 -0
  11. package/dist/components/PublicMenu/Modals/AddUpdateNote/index.d.ts +1 -0
  12. package/dist/components/PublicMenu/Modals/Auth/Auth.d.ts +3 -0
  13. package/dist/components/PublicMenu/Modals/Auth/EmailStep.d.ts +8 -0
  14. package/dist/components/PublicMenu/Modals/Auth/OTPStep.d.ts +8 -0
  15. package/dist/components/PublicMenu/Modals/Auth/PhoneStep.d.ts +7 -0
  16. package/dist/components/PublicMenu/Modals/Auth/index.d.ts +1 -0
  17. package/dist/components/PublicMenu/OrderDrawer/OrderDrawer.d.ts +2 -0
  18. package/dist/components/PublicMenu/OrderDrawer/OrderDrawerCart.d.ts +2 -0
  19. package/dist/components/PublicMenu/OrderDrawer/OrderDrawerCompleted.d.ts +2 -0
  20. package/dist/components/PublicMenu/OrderDrawer/OrderDrawerDetails.d.ts +2 -0
  21. package/dist/components/PublicMenu/OrderDrawer/OrderDrawerFooter.d.ts +5 -0
  22. package/dist/components/PublicMenu/OrderDrawer/index.d.ts +1 -0
  23. package/dist/components/PublicMenu/OrderItemsList/OrderItemsList.d.ts +5 -0
  24. package/dist/components/PublicMenu/OrderItemsList/OrderNoItems.d.ts +2 -0
  25. package/dist/components/PublicMenu/OrderItemsList/index.d.ts +1 -0
  26. package/dist/components/PublicMenu/OrderListItem/OptionsInfo/OptionsInfo.d.ts +9 -0
  27. package/dist/components/PublicMenu/OrderListItem/OrderListItem.d.ts +7 -0
  28. package/dist/components/PublicMenu/OrderListItem/index.d.ts +1 -0
  29. package/dist/components/PublicMenu/OrderStepper/OrderStepper.d.ts +7 -0
  30. package/dist/components/PublicMenu/OrderStepper/index.d.ts +1 -0
  31. package/dist/components/PublicMenu/ProductAddons/ProductAddons.d.ts +4 -4
  32. package/dist/components/PublicMenu/ProductDetails/ProductDetails.d.ts +2 -2
  33. package/dist/components/PublicMenu/ProductInOrder/ProductInOrder.d.ts +6 -0
  34. package/dist/components/PublicMenu/ProductInOrder/index.d.ts +1 -0
  35. package/dist/components/PublicMenu/ProductQuantity/ProductQuantity.d.ts +4 -3
  36. package/dist/components/PublicMenu/ProductVariants/ProductVariants.d.ts +2 -2
  37. package/dist/components/PublicMenu/ProductsGridItem/ProductsGridItem.d.ts +1 -1
  38. package/dist/components/PublicMenu/ProductsListItem/ProductsListItem.d.ts +1 -1
  39. package/dist/constants/analytics.d.ts +1 -1
  40. package/dist/constants/env.d.ts +1 -0
  41. package/dist/hooks/product.d.ts +4 -4
  42. package/dist/hooks/translation.d.ts +4 -2
  43. package/dist/index.esm.js +1 -1
  44. package/dist/index.esm.js.map +1 -1
  45. package/dist/index.js +1 -1
  46. package/dist/index.js.map +1 -1
  47. package/dist/models/index.d.ts +3 -3
  48. package/dist/models/index.esm.js.map +1 -1
  49. package/dist/models/index.js.map +1 -1
  50. package/dist/models/menu.d.ts +4 -3
  51. package/dist/models/models/category.d.ts +10 -0
  52. package/dist/models/models/index.d.ts +6 -0
  53. package/dist/models/models/menu.d.ts +30 -0
  54. package/dist/models/models/pricing.d.ts +17 -0
  55. package/dist/models/{addon.d.ts → modules/addon/models.d.ts} +0 -3
  56. package/dist/models/modules/customer/models.d.ts +47 -0
  57. package/dist/models/modules/feature/models.d.ts +3 -0
  58. package/dist/models/modules/order/models.d.ts +80 -0
  59. package/dist/{utils/models/product.d.ts → models/modules/product/models.d.ts} +5 -4
  60. package/dist/modules/addon/index.d.ts +2 -0
  61. package/dist/{utils/models/addon.d.ts → modules/addon/models.d.ts} +0 -3
  62. package/dist/{utils/utils/addon.d.ts → modules/addon/utils.d.ts} +1 -1
  63. package/dist/modules/branch/index.d.ts +1 -0
  64. package/dist/modules/business/index.d.ts +1 -0
  65. package/dist/modules/common/index.d.ts +1 -0
  66. package/dist/modules/common/services.d.ts +1 -0
  67. package/dist/modules/customer/hooks.d.ts +3 -0
  68. package/dist/modules/customer/index.d.ts +4 -0
  69. package/dist/modules/customer/models.d.ts +47 -0
  70. package/dist/modules/customer/services.d.ts +7 -0
  71. package/dist/modules/customer/utils.d.ts +6 -0
  72. package/dist/modules/feature/hooks.d.ts +2 -0
  73. package/dist/modules/feature/index.d.ts +2 -0
  74. package/dist/modules/feature/models.d.ts +3 -0
  75. package/dist/modules/order/constants.d.ts +9 -0
  76. package/dist/modules/order/hooks.d.ts +22 -0
  77. package/dist/modules/order/index.d.ts +5 -0
  78. package/dist/modules/order/models.d.ts +80 -0
  79. package/dist/modules/order/services.d.ts +2 -0
  80. package/dist/modules/order/utils.d.ts +20 -0
  81. package/dist/modules/product/index.d.ts +2 -0
  82. package/dist/{models/product.d.ts → modules/product/models.d.ts} +5 -4
  83. package/dist/{utils/product.d.ts → modules/product/utils.d.ts} +9 -8
  84. package/dist/modules/view/constants.d.ts +15 -0
  85. package/dist/modules/view/index.d.ts +3 -0
  86. package/dist/modules/view/services.d.ts +2 -0
  87. package/dist/modules/view/utils.d.ts +6 -0
  88. package/dist/services/api/index.d.ts +5 -0
  89. package/dist/services/translation/index.d.ts +3 -0
  90. package/dist/services/translation/locales/az/auth.d.ts +7 -0
  91. package/dist/services/translation/locales/az/common.d.ts +6 -0
  92. package/dist/services/translation/locales/az/customer.d.ts +75 -0
  93. package/dist/services/translation/locales/az/error.d.ts +11 -0
  94. package/dist/services/translation/locales/az/events.d.ts +8 -0
  95. package/dist/services/translation/locales/az/index.d.ts +164 -0
  96. package/dist/services/translation/locales/az/order.d.ts +32 -0
  97. package/dist/services/translation/locales/az/pricing.d.ts +29 -0
  98. package/dist/services/translation/locales/en/auth.d.ts +2 -0
  99. package/dist/services/translation/locales/en/common.d.ts +2 -0
  100. package/dist/services/translation/locales/en/customer.d.ts +2 -0
  101. package/dist/services/translation/locales/en/error.d.ts +7 -0
  102. package/dist/services/translation/locales/en/events.d.ts +2 -0
  103. package/dist/services/translation/locales/en/index.d.ts +15 -0
  104. package/dist/services/translation/locales/en/order.d.ts +2 -0
  105. package/dist/services/translation/locales/en/pricing.d.ts +2 -0
  106. package/dist/services/translation/locales/et/auth.d.ts +7 -0
  107. package/dist/services/translation/locales/et/common.d.ts +6 -0
  108. package/dist/services/translation/locales/et/customer.d.ts +75 -0
  109. package/dist/services/translation/locales/et/error.d.ts +11 -0
  110. package/dist/services/translation/locales/et/events.d.ts +8 -0
  111. package/dist/services/translation/locales/et/index.d.ts +165 -0
  112. package/dist/services/translation/locales/et/order.d.ts +33 -0
  113. package/dist/services/translation/locales/et/pricing.d.ts +29 -0
  114. package/dist/services/translation/locales/index.d.ts +836 -0
  115. package/dist/services/translation/locales/nl/auth.d.ts +7 -0
  116. package/dist/services/translation/locales/nl/common.d.ts +6 -0
  117. package/dist/services/translation/locales/nl/customer.d.ts +75 -0
  118. package/dist/services/translation/locales/nl/error.d.ts +11 -0
  119. package/dist/services/translation/locales/nl/events.d.ts +8 -0
  120. package/dist/services/translation/locales/nl/index.d.ts +165 -0
  121. package/dist/services/translation/locales/nl/order.d.ts +33 -0
  122. package/dist/services/translation/locales/nl/pricing.d.ts +29 -0
  123. package/dist/services/translation/locales/ru/auth.d.ts +7 -0
  124. package/dist/services/translation/locales/ru/common.d.ts +6 -0
  125. package/dist/services/translation/locales/ru/customer.d.ts +75 -0
  126. package/dist/services/translation/locales/ru/error.d.ts +11 -0
  127. package/dist/services/translation/locales/ru/events.d.ts +8 -0
  128. package/dist/services/translation/locales/ru/index.d.ts +165 -0
  129. package/dist/services/translation/locales/ru/order.d.ts +33 -0
  130. package/dist/services/translation/locales/ru/pricing.d.ts +29 -0
  131. package/dist/services/translation/locales/tr/auth.d.ts +7 -0
  132. package/dist/services/translation/locales/tr/common.d.ts +6 -0
  133. package/dist/services/translation/locales/tr/customer.d.ts +75 -0
  134. package/dist/services/translation/locales/tr/error.d.ts +11 -0
  135. package/dist/services/translation/locales/tr/events.d.ts +8 -0
  136. package/dist/services/translation/locales/tr/index.d.ts +165 -0
  137. package/dist/services/translation/locales/tr/order.d.ts +33 -0
  138. package/dist/services/translation/locales/tr/pricing.d.ts +29 -0
  139. package/dist/store/order.d.ts +30 -0
  140. package/dist/styles/ui.css +1 -1
  141. package/dist/styles/ui.css.map +1 -1
  142. package/dist/utils/index.d.ts +3 -3
  143. package/dist/utils/index.esm.js +1 -1
  144. package/dist/utils/index.esm.js.map +1 -1
  145. package/dist/utils/index.js +1 -1
  146. package/dist/utils/index.js.map +1 -1
  147. package/dist/utils/models/index.d.ts +3 -3
  148. package/dist/utils/models/menu.d.ts +4 -3
  149. package/dist/utils/modules/addon/models.d.ts +27 -0
  150. package/dist/utils/{addon.d.ts → modules/addon/utils.d.ts} +1 -1
  151. package/dist/utils/modules/branch/models.d.ts +11 -0
  152. package/dist/utils/modules/business/models.d.ts +20 -0
  153. package/dist/utils/modules/order/models.d.ts +80 -0
  154. package/dist/utils/modules/order/utils.d.ts +20 -0
  155. package/dist/utils/modules/product/models.d.ts +40 -0
  156. package/dist/utils/{utils/product.d.ts → modules/product/utils.d.ts} +9 -8
  157. package/dist/utils/utils/index.d.ts +3 -3
  158. package/package.json +17 -15
  159. package/dist/components/PublicMenu/Cart/Cart.d.ts +0 -2
  160. package/dist/components/PublicMenu/Cart/index.d.ts +0 -1
  161. package/dist/components/PublicMenu/CartDrawer/CartDrawer.d.ts +0 -2
  162. package/dist/components/PublicMenu/CartDrawer/index.d.ts +0 -1
  163. package/dist/components/PublicMenu/CartItem/CartItem.d.ts +0 -6
  164. package/dist/components/PublicMenu/CartItem/OptionsInfo/OptionsInfo.d.ts +0 -9
  165. package/dist/components/PublicMenu/CartItem/index.d.ts +0 -1
  166. package/dist/components/PublicMenu/CartStepper/CartStepper.d.ts +0 -6
  167. package/dist/components/PublicMenu/CartStepper/index.d.ts +0 -1
  168. package/dist/components/PublicMenu/ProductInCart/ProductInCart.d.ts +0 -6
  169. package/dist/components/PublicMenu/ProductInCart/index.d.ts +0 -1
  170. package/dist/constants/translations.d.ts +0 -212
  171. package/dist/hooks/cart.d.ts +0 -12
  172. package/dist/models/order.d.ts +0 -47
  173. package/dist/store/cart.d.ts +0 -23
  174. package/dist/utils/cart.d.ts +0 -7
  175. package/dist/utils/cart.test.d.ts +0 -1
  176. package/dist/utils/models/order.d.ts +0 -47
  177. package/dist/utils/utils/cart.d.ts +0 -7
  178. package/dist/utils/utils/cart.test.d.ts +0 -1
  179. /package/dist/components/PublicMenu/{CartItem → OrderListItem}/OptionsInfo/index.d.ts +0 -0
  180. /package/dist/models/{branch.d.ts → modules/branch/models.d.ts} +0 -0
  181. /package/dist/models/{business.d.ts → modules/business/models.d.ts} +0 -0
  182. /package/dist/{utils/models/branch.d.ts → modules/branch/models.d.ts} +0 -0
  183. /package/dist/{utils/models/business.d.ts → modules/business/models.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
- export * from "./business";
2
- export * from "./branch";
1
+ export * from "src/modules/business/models";
2
+ export * from "src/modules/product/models";
3
+ export * from "src/modules/branch/models";
3
4
  export * from "./category";
4
5
  export * from "./menu";
5
- export * from "./product";
6
6
  export * from "./pricing";
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../src/models/product.ts","../../src/models/pricing.ts"],"sourcesContent":["import { MenuAddon } from \"./addon\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId: number;\n}\n\nexport interface ProductVariantTranslations {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslations[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n"],"names":["ProductView","PlanType"],"mappings":"IAwCYA,ECxCAC,GDwCZ,SAAYD,GACXA,EAAA,KAAA,OACAA,EAAA,KAAA,MACA,CAHD,CAAYA,IAAAA,EAGX,CAAA,IC3CD,SAAYC,GACXA,EAAA,UAAA,YACAA,EAAA,YAAA,aACAA,EAAA,cAAA,cACA,CAJD,CAAYA,IAAAA,EAIX,CAAA"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/modules/product/models.ts","../../../src/models/pricing.ts"],"sourcesContent":["import { MenuAddon } from \"../addon/models\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId?: number;\n}\n\nexport interface ProductVariantTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslation[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n"],"names":["ProductView","PlanType"],"mappings":"IAyCYA,ECzCAC,GDyCZ,SAAYD,GACXA,EAAA,KAAA,OACAA,EAAA,KAAA,MACA,CAHD,CAAYA,IAAAA,EAGX,CAAA,IC5CD,SAAYC,GACXA,EAAA,UAAA,YACAA,EAAA,YAAA,aACAA,EAAA,cAAA,cACA,CAJD,CAAYA,IAAAA,EAIX,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/models/product.ts","../../src/models/pricing.ts"],"sourcesContent":["import { MenuAddon } from \"./addon\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId: number;\n}\n\nexport interface ProductVariantTranslations {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslations[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n"],"names":["ProductView","PlanType"],"mappings":"aAwCA,IAAYA,ECxCAC,EDwCAD,QAAAA,iBAAAA,GAAAA,EAAAA,QAAWA,cAAXA,oBAGX,CAAA,IAFA,KAAA,OACAA,EAAA,KAAA,OC1CWC,QAAAA,cAAAA,GAAAA,EAAAA,QAAQA,WAARA,iBAIX,CAAA,IAHA,UAAA,YACAA,EAAA,YAAA,aACAA,EAAA,cAAA"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/modules/product/models.ts","../../../src/models/pricing.ts"],"sourcesContent":["import { MenuAddon } from \"../addon/models\";\n\nexport interface ProductTranslation {\n\tid: number;\n\tname: string;\n\tdescription?: string;\n\tlanguage: string;\n\tproductId?: number;\n}\n\nexport interface ProductVariantTranslation {\n\tid?: number;\n\ttitle: string;\n\tlanguage: string;\n}\n\nexport interface ProductVariant {\n\tid?: number;\n\tprice: number;\n\ttranslations: ProductVariantTranslation[];\n\tproductId?: number;\n\tremove?: boolean;\n}\n\nexport interface Product {\n\tid: number;\n\tcategoryId: number;\n\tvat?: number;\n\tprice: number;\n\tvolume?: string; // 100qr/250ml/1kq\n\timage160?: string;\n\timage580?: string;\n\timage1024?: string;\n\ttranslations: ProductTranslation[];\n\tvariants: ProductVariant[];\n\taddons: MenuAddon[];\n\tavailable?: boolean;\n\tvisible?: boolean;\n\tposition?: number;\n}\n\nexport enum ProductView {\n\tLIST = \"list\",\n\tGRID = \"grid\",\n}\n","export enum PlanType {\n\tAPPETIZER = \"appetizer\",\n\tMAIN_COURSE = \"mainCourse\",\n\tCHEFS_SPECIAL = \"chefsSpecial\",\n}\n\nexport interface PricingPlan {\n\ttitle: string;\n\tprice: {\n\t\tmonthly: number;\n\t\tannually: number;\n\t};\n\tdiscountedPrice?: number;\n}\n\nexport interface PricingPlans {\n\t[key: string]: PricingPlan;\n}\n\nexport type PricingInterval = \"monthly\" | \"annually\";\n"],"names":["ProductView","PlanType"],"mappings":"aAyCA,IAAYA,ECzCAC,EDyCAD,QAAAA,iBAAAA,GAAAA,EAAAA,QAAWA,cAAXA,oBAGX,CAAA,IAFA,KAAA,OACAA,EAAA,KAAA,OC3CWC,QAAAA,cAAAA,GAAAA,EAAAA,QAAQA,WAARA,iBAIX,CAAA,IAHA,UAAA,YACAA,EAAA,YAAA,aACAA,EAAA,cAAA"}
@@ -1,8 +1,9 @@
1
- import * as branchModels from "./branch";
2
- import * as productModels from "./product";
1
+ import * as productModels from "src/modules/product/models";
2
+ import * as branchModels from "src/modules/branch/models";
3
3
  import * as categoryModels from "./category";
4
- import * as businessModels from "./business";
4
+ import * as businessModels from "src/modules/business/models";
5
5
  export interface PublicMenuData {
6
+ businessId: number;
6
7
  branches: branchModels.Branch[];
7
8
  branchId: number | null | undefined;
8
9
  coverImage?: string;
@@ -0,0 +1,10 @@
1
+ export interface CategoryTranslation {
2
+ name: string;
3
+ language: string;
4
+ categoryId: number;
5
+ }
6
+ export interface Category {
7
+ id: number;
8
+ businessId: number;
9
+ translations: CategoryTranslation[];
10
+ }
@@ -0,0 +1,6 @@
1
+ export * from "src/modules/business/models";
2
+ export * from "src/modules/product/models";
3
+ export * from "src/modules/branch/models";
4
+ export * from "./category";
5
+ export * from "./menu";
6
+ export * from "./pricing";
@@ -0,0 +1,30 @@
1
+ import * as productModels from "src/modules/product/models";
2
+ import * as branchModels from "src/modules/branch/models";
3
+ import * as categoryModels from "./category";
4
+ import * as businessModels from "src/modules/business/models";
5
+ export interface PublicMenuData {
6
+ businessId: number;
7
+ branches: branchModels.Branch[];
8
+ branchId: number | null | undefined;
9
+ coverImage?: string;
10
+ logoImage?: string;
11
+ name: string;
12
+ currency: string;
13
+ products: productModels.Product[];
14
+ categories: categoryModels.Category[];
15
+ language: string;
16
+ languages?: businessModels.BusinessLanguage[];
17
+ instagram?: string;
18
+ facebook?: string;
19
+ whatsapp?: string;
20
+ telegram?: string;
21
+ tiktok?: string;
22
+ rootPath?: string;
23
+ hostname?: string | null;
24
+ imageTag?: any;
25
+ onBranchSelect?: (branchId: number) => void;
26
+ onLanguageSelect?: (code: string) => void;
27
+ }
28
+ export interface CategoryProductMap extends categoryModels.Category {
29
+ products: productModels.Product[];
30
+ }
@@ -0,0 +1,17 @@
1
+ export declare enum PlanType {
2
+ APPETIZER = "appetizer",
3
+ MAIN_COURSE = "mainCourse",
4
+ CHEFS_SPECIAL = "chefsSpecial"
5
+ }
6
+ export interface PricingPlan {
7
+ title: string;
8
+ price: {
9
+ monthly: number;
10
+ annually: number;
11
+ };
12
+ discountedPrice?: number;
13
+ }
14
+ export interface PricingPlans {
15
+ [key: string]: PricingPlan;
16
+ }
17
+ export type PricingInterval = "monthly" | "annually";
@@ -25,6 +25,3 @@ export interface MenuAddon {
25
25
  options: MenuAddonOption[];
26
26
  businessId?: number;
27
27
  }
28
- export interface SelectedAddons {
29
- [key: number]: number | number[];
30
- }
@@ -0,0 +1,47 @@
1
+ export declare enum CustomerAuthStep {
2
+ PHONE = "PHONE",
3
+ OTP = "OTP",
4
+ EMAIL = "EMAIL"
5
+ }
6
+ export declare enum CustomerAddressType {
7
+ HOME = "HOME",
8
+ WORK = "WORK",
9
+ TRAVEL = "TRAVEL"
10
+ }
11
+ export interface CustomerAddress {
12
+ id?: number;
13
+ addressId?: number;
14
+ countryCode: string;
15
+ cityName: string;
16
+ street: string;
17
+ houseNumber: string;
18
+ additionalNumber?: string;
19
+ postCode?: string;
20
+ instructions?: string;
21
+ floor?: number;
22
+ longitude?: number;
23
+ latitude?: number;
24
+ title?: string;
25
+ type?: CustomerAddressType;
26
+ }
27
+ export interface CustomerAuthForm {
28
+ phoneNumber: string;
29
+ otp: string;
30
+ email: string;
31
+ }
32
+ export interface CustomerAuthPhoneForm {
33
+ countryCode: string;
34
+ phoneNumber: string;
35
+ }
36
+ export interface AuthResponse {
37
+ accessToken: string;
38
+ refreshToken: string;
39
+ }
40
+ export interface Customer {
41
+ id?: number;
42
+ email: string;
43
+ fullName: string;
44
+ address: CustomerAddress;
45
+ addresses?: CustomerAddress[];
46
+ }
47
+ export type CustomerUpdatePayload = Partial<Customer>;
@@ -0,0 +1,3 @@
1
+ export declare enum Feature {
2
+ ORDER = "feature_order"
3
+ }
@@ -0,0 +1,80 @@
1
+ export declare enum OrderType {
2
+ DINE_IN = "DINE_IN",
3
+ PICK_UP = "PICK_UP",
4
+ DELIVERY = "DELIVERY"
5
+ }
6
+ export declare enum OrderStatus {
7
+ PENDING = "PENDING",
8
+ CONFIRMED = "CONFIRMED",
9
+ PREPARING = "PREPARING",
10
+ READY = "READY",
11
+ COMPLETED = "COMPLETED",
12
+ CANCELLED = "CANCELLED"
13
+ }
14
+ export declare enum OrderItemStatus {
15
+ PENDING = "PENDING",
16
+ PREPARING = "PREPARING",
17
+ READY = "READY",
18
+ SERVED = "SERVED"
19
+ }
20
+ export declare enum PaymentMethod {
21
+ CASH = "CASH",
22
+ CARD = "CARD",
23
+ WALLET = "WALLET",
24
+ TERMINAL = "TERMINAL"
25
+ }
26
+ export interface OrderAddon {
27
+ id?: number;
28
+ addonId: number;
29
+ optionId: number;
30
+ price: number;
31
+ }
32
+ export interface SelectedAddons {
33
+ [key: number]: number | number[];
34
+ }
35
+ export interface OrderItemVariant {
36
+ id?: number;
37
+ variantId: number;
38
+ price: number;
39
+ }
40
+ export interface OrderItem {
41
+ id?: number;
42
+ productId: number;
43
+ orderId?: number;
44
+ quantity: number;
45
+ price: number;
46
+ variant?: OrderItemVariant;
47
+ addons: OrderAddon[];
48
+ note?: string;
49
+ status?: OrderItemStatus;
50
+ vat?: number;
51
+ isPaid?: boolean;
52
+ }
53
+ export interface Order {
54
+ id?: number;
55
+ businessId?: number;
56
+ branchId?: number;
57
+ workingDayId?: number;
58
+ tableId?: number;
59
+ customerId?: number;
60
+ employeeId?: number;
61
+ orderType: OrderType;
62
+ totalPriceWithTax: number;
63
+ totalPriceWithoutTax: number;
64
+ totalTax: number;
65
+ items: OrderItem[];
66
+ status?: OrderStatus;
67
+ vat?: number;
68
+ paymentMethod?: PaymentMethod;
69
+ note?: string;
70
+ createdAt?: number;
71
+ updatedAt?: number;
72
+ }
73
+ export interface OrderItems {
74
+ [key: string]: OrderItem;
75
+ }
76
+ export declare enum OrderStep {
77
+ CART = "CART",
78
+ DETAILS = "DETAILS",
79
+ COMPLETED = "COMPLETED"
80
+ }
@@ -1,12 +1,12 @@
1
- import { MenuAddon } from "./addon";
1
+ import { MenuAddon } from "../addon/models";
2
2
  export interface ProductTranslation {
3
3
  id: number;
4
4
  name: string;
5
5
  description?: string;
6
6
  language: string;
7
- productId: number;
7
+ productId?: number;
8
8
  }
9
- export interface ProductVariantTranslations {
9
+ export interface ProductVariantTranslation {
10
10
  id?: number;
11
11
  title: string;
12
12
  language: string;
@@ -14,7 +14,7 @@ export interface ProductVariantTranslations {
14
14
  export interface ProductVariant {
15
15
  id?: number;
16
16
  price: number;
17
- translations: ProductVariantTranslations[];
17
+ translations: ProductVariantTranslation[];
18
18
  productId?: number;
19
19
  remove?: boolean;
20
20
  }
@@ -32,6 +32,7 @@ export interface Product {
32
32
  addons: MenuAddon[];
33
33
  available?: boolean;
34
34
  visible?: boolean;
35
+ position?: number;
35
36
  }
36
37
  export declare enum ProductView {
37
38
  LIST = "list",
@@ -0,0 +1,2 @@
1
+ export * as models from "./models";
2
+ export * as utils from "./utils";
@@ -25,6 +25,3 @@ export interface MenuAddon {
25
25
  options: MenuAddonOption[];
26
26
  businessId?: number;
27
27
  }
28
- export interface SelectedAddons {
29
- [key: number]: number | number[];
30
- }
@@ -1,4 +1,4 @@
1
- import { MenuAddon, MenuAddonOption, MenuAddonOptionTranslation, MenuAddonTranslation } from "src/models/addon";
1
+ import { MenuAddon, MenuAddonOption, MenuAddonOptionTranslation, MenuAddonTranslation } from "./models";
2
2
  export declare const getAddonTranslation: (addon: MenuAddon, language: string) => MenuAddonTranslation;
3
3
  export declare const getAddonOptionTranslation: (option: MenuAddonOption, language: string) => MenuAddonOptionTranslation;
4
4
  export declare const getOptionPrice: ({ option, currency, language, }: {
@@ -0,0 +1 @@
1
+ export * as models from "./models";
@@ -0,0 +1 @@
1
+ export * as models from "./models";
@@ -0,0 +1 @@
1
+ export * as services from "./services";
@@ -0,0 +1 @@
1
+ export declare const logException: (error?: any, errorInfo?: {}) => Promise<Response>;
@@ -0,0 +1,3 @@
1
+ import { Customer, CustomerAddress } from "./models";
2
+ export declare const useAvailableCustomer: () => Customer;
3
+ export declare const useCustomerAddress: () => CustomerAddress;
@@ -0,0 +1,4 @@
1
+ export * as hooks from "./hooks";
2
+ export * as models from "./models";
3
+ export * as services from "./services";
4
+ export * as utils from "./utils";
@@ -0,0 +1,47 @@
1
+ export declare enum CustomerAuthStep {
2
+ PHONE = "PHONE",
3
+ OTP = "OTP",
4
+ EMAIL = "EMAIL"
5
+ }
6
+ export declare enum CustomerAddressType {
7
+ HOME = "HOME",
8
+ WORK = "WORK",
9
+ TRAVEL = "TRAVEL"
10
+ }
11
+ export interface CustomerAddress {
12
+ id?: number;
13
+ addressId?: number;
14
+ countryCode: string;
15
+ cityName: string;
16
+ street: string;
17
+ houseNumber: string;
18
+ additionalNumber?: string;
19
+ postCode?: string;
20
+ instructions?: string;
21
+ floor?: number;
22
+ longitude?: number;
23
+ latitude?: number;
24
+ title?: string;
25
+ type?: CustomerAddressType;
26
+ }
27
+ export interface CustomerAuthForm {
28
+ phoneNumber: string;
29
+ otp: string;
30
+ email: string;
31
+ }
32
+ export interface CustomerAuthPhoneForm {
33
+ countryCode: string;
34
+ phoneNumber: string;
35
+ }
36
+ export interface AuthResponse {
37
+ accessToken: string;
38
+ refreshToken: string;
39
+ }
40
+ export interface Customer {
41
+ id?: number;
42
+ email: string;
43
+ fullName: string;
44
+ address: CustomerAddress;
45
+ addresses?: CustomerAddress[];
46
+ }
47
+ export type CustomerUpdatePayload = Partial<Customer>;
@@ -0,0 +1,7 @@
1
+ import { AuthResponse, Customer, CustomerUpdatePayload } from "./models";
2
+ export declare const getCustomer: () => Promise<Customer>;
3
+ export declare const loginCustomer: (phoneNumber: string) => Promise<{
4
+ status: number;
5
+ }>;
6
+ export declare const verifyOTP: (otp: string, phoneNumber: string) => Promise<AuthResponse>;
7
+ export declare const update: (payload: CustomerUpdatePayload) => Promise<any>;
@@ -0,0 +1,6 @@
1
+ import { FormErrors } from "@sorocraft/ui";
2
+ import { CustomerAddress, CustomerAuthForm, CustomerAuthPhoneForm, CustomerAuthStep } from "./models";
3
+ export declare const preparePhoneNumber: (form: CustomerAuthPhoneForm) => string;
4
+ export declare const validateForm: (form: CustomerAuthForm, step: CustomerAuthStep) => FormErrors;
5
+ export declare const validateAddressForm: (form: CustomerAddress) => FormErrors;
6
+ export declare const formatLine: (fields: (string | undefined)[]) => string;
@@ -0,0 +1,2 @@
1
+ import type { Feature } from "./models";
2
+ export declare const useFeatureActive: (feature: Feature) => boolean;
@@ -0,0 +1,2 @@
1
+ export * as hooks from "./hooks";
2
+ export * as models from "./models";
@@ -0,0 +1,3 @@
1
+ export declare enum Feature {
2
+ ORDER = "feature_order"
3
+ }
@@ -0,0 +1,9 @@
1
+ import { OrderType, PaymentMethod } from "./models";
2
+ export declare const initialOrder: {
3
+ orderType: OrderType;
4
+ totalPriceWithTax: number;
5
+ totalPriceWithoutTax: number;
6
+ totalTax: number;
7
+ vat: number;
8
+ paymentMethod: PaymentMethod;
9
+ };
@@ -0,0 +1,22 @@
1
+ import { Order, OrderItem, SelectedAddons } from "./models";
2
+ export declare const useOrderPriceDetails: () => {
3
+ totalPriceWithTax: number;
4
+ totalPriceWithoutTax: number;
5
+ totalTax: number;
6
+ };
7
+ export declare const usePrepareOrder: (existingOrderData?: Partial<Order>) => Order;
8
+ export declare const useTotalOrderItemsCount: () => number;
9
+ export declare const useOrderItemsTotalPrice: () => {
10
+ totalPrice: number;
11
+ formattedTotalPrice: string;
12
+ };
13
+ export declare const useProductQuantityInOrder: ({ productId, variantId, selectedAddons, }: {
14
+ productId: number;
15
+ variantId?: number | null;
16
+ selectedAddons: SelectedAddons;
17
+ }) => number;
18
+ export declare const useProductQuantityInOrderWithAllVariants: (productId: number) => number;
19
+ export declare const useOrderItemPrice: (item: OrderItem) => {
20
+ totalPrice: number;
21
+ formattedTotalPrice: string;
22
+ };
@@ -0,0 +1,5 @@
1
+ export * as models from "./models";
2
+ export * as utils from "./utils";
3
+ export * as hooks from "./hooks";
4
+ export * as constants from "./constants";
5
+ export * as services from "./services";
@@ -0,0 +1,80 @@
1
+ export declare enum OrderType {
2
+ DINE_IN = "DINE_IN",
3
+ PICK_UP = "PICK_UP",
4
+ DELIVERY = "DELIVERY"
5
+ }
6
+ export declare enum OrderStatus {
7
+ PENDING = "PENDING",
8
+ CONFIRMED = "CONFIRMED",
9
+ PREPARING = "PREPARING",
10
+ READY = "READY",
11
+ COMPLETED = "COMPLETED",
12
+ CANCELLED = "CANCELLED"
13
+ }
14
+ export declare enum OrderItemStatus {
15
+ PENDING = "PENDING",
16
+ PREPARING = "PREPARING",
17
+ READY = "READY",
18
+ SERVED = "SERVED"
19
+ }
20
+ export declare enum PaymentMethod {
21
+ CASH = "CASH",
22
+ CARD = "CARD",
23
+ WALLET = "WALLET",
24
+ TERMINAL = "TERMINAL"
25
+ }
26
+ export interface OrderAddon {
27
+ id?: number;
28
+ addonId: number;
29
+ optionId: number;
30
+ price: number;
31
+ }
32
+ export interface SelectedAddons {
33
+ [key: number]: number | number[];
34
+ }
35
+ export interface OrderItemVariant {
36
+ id?: number;
37
+ variantId: number;
38
+ price: number;
39
+ }
40
+ export interface OrderItem {
41
+ id?: number;
42
+ productId: number;
43
+ orderId?: number;
44
+ quantity: number;
45
+ price: number;
46
+ variant?: OrderItemVariant;
47
+ addons: OrderAddon[];
48
+ note?: string;
49
+ status?: OrderItemStatus;
50
+ vat?: number;
51
+ isPaid?: boolean;
52
+ }
53
+ export interface Order {
54
+ id?: number;
55
+ businessId?: number;
56
+ branchId?: number;
57
+ workingDayId?: number;
58
+ tableId?: number;
59
+ customerId?: number;
60
+ employeeId?: number;
61
+ orderType: OrderType;
62
+ totalPriceWithTax: number;
63
+ totalPriceWithoutTax: number;
64
+ totalTax: number;
65
+ items: OrderItem[];
66
+ status?: OrderStatus;
67
+ vat?: number;
68
+ paymentMethod?: PaymentMethod;
69
+ note?: string;
70
+ createdAt?: number;
71
+ updatedAt?: number;
72
+ }
73
+ export interface OrderItems {
74
+ [key: string]: OrderItem;
75
+ }
76
+ export declare enum OrderStep {
77
+ CART = "CART",
78
+ DETAILS = "DETAILS",
79
+ COMPLETED = "COMPLETED"
80
+ }
@@ -0,0 +1,2 @@
1
+ import { Order } from "./models";
2
+ export declare const createOrder: (order: Order) => Promise<Order>;
@@ -0,0 +1,20 @@
1
+ import { Order, OrderAddon, OrderItem, SelectedAddons } from "./models";
2
+ export declare const getOrderAddonsPrice: (orderAddons: OrderAddon[], quantity: number) => number;
3
+ export declare const getOrderPrice: (order: Order, currency: string, language: string) => {
4
+ totalWithoutTax: number;
5
+ totalWithoutTaxFormatted: string;
6
+ totalTax: number;
7
+ totalTaxFormatted: string;
8
+ totalWithTax: number;
9
+ totalWithTaxFormatted: string;
10
+ };
11
+ export declare const generateOrderItemsId: (productId: number, variantId: number | null, selectedAddons: SelectedAddons) => string;
12
+ export declare const getOrderItemPrice: (orderItem: OrderItem) => {
13
+ totalGross: number;
14
+ totalNet: number;
15
+ totalTax: number;
16
+ itemGrossPrice: number;
17
+ itemNetPrice: number;
18
+ itemTax: number;
19
+ };
20
+ export declare const getSelectedAddonsFromOrderItems: (item: OrderItem) => SelectedAddons;
@@ -0,0 +1,2 @@
1
+ export * as models from "./models";
2
+ export * as utils from "./utils";
@@ -1,12 +1,12 @@
1
- import { MenuAddon } from "./addon";
1
+ import { MenuAddon } from "../addon/models";
2
2
  export interface ProductTranslation {
3
3
  id: number;
4
4
  name: string;
5
5
  description?: string;
6
6
  language: string;
7
- productId: number;
7
+ productId?: number;
8
8
  }
9
- export interface ProductVariantTranslations {
9
+ export interface ProductVariantTranslation {
10
10
  id?: number;
11
11
  title: string;
12
12
  language: string;
@@ -14,7 +14,7 @@ export interface ProductVariantTranslations {
14
14
  export interface ProductVariant {
15
15
  id?: number;
16
16
  price: number;
17
- translations: ProductVariantTranslations[];
17
+ translations: ProductVariantTranslation[];
18
18
  productId?: number;
19
19
  remove?: boolean;
20
20
  }
@@ -32,6 +32,7 @@ export interface Product {
32
32
  addons: MenuAddon[];
33
33
  available?: boolean;
34
34
  visible?: boolean;
35
+ position?: number;
35
36
  }
36
37
  export declare enum ProductView {
37
38
  LIST = "list",
@@ -1,5 +1,6 @@
1
- import { Product, ProductTranslation, ProductVariant, ProductVariantTranslations } from "src/models/product";
2
- import { MenuAddon, SelectedAddons } from "src/models/addon";
1
+ import { Product, ProductTranslation, ProductVariant, ProductVariantTranslation } from "./models";
2
+ import { MenuAddon } from "src/modules/addon/models";
3
+ import * as orderModels from "src/modules/order/models";
3
4
  export declare const getProductTranslation: (product: Product, language: string) => ProductTranslation;
4
5
  export declare const getProductRawPrice: (product: Product, quantity?: number) => number;
5
6
  export declare const getProductPrice: (product: Product, currency: string, language: string, quantity?: number) => {
@@ -7,7 +8,7 @@ export declare const getProductPrice: (product: Product, currency: string, langu
7
8
  formattedTotalPrice: string;
8
9
  };
9
10
  export declare const getProductVariant: (product: Product, variantId: number) => ProductVariant;
10
- export declare const getSelectedOptionsTotalPrice: (product: Product, selectedAddons: SelectedAddons, quantity: number) => number;
11
+ export declare const getSelectedOptionsTotalPrice: (product: Product, selectedAddons: orderModels.SelectedAddons, quantity: number) => number;
11
12
  export declare const getProductVariantRawPrice: (variantId: number, product: Product, quantity?: number) => number;
12
13
  export declare const getProductVariantPrice: ({ variantId, currency, language, product, quantity, }: {
13
14
  variantId: number;
@@ -19,25 +20,25 @@ export declare const getProductVariantPrice: ({ variantId, currency, language, p
19
20
  totalPrice: number;
20
21
  formattedTotalPrice: string;
21
22
  };
22
- export declare const getProductVariantTranslation: (variant: ProductVariant, language: string) => ProductVariantTranslations;
23
- export declare const getProductCartRawPrice: ({ product, variantId, quantity, selectedAddons, noVat, }: {
23
+ export declare const getProductVariantTranslation: (variant: ProductVariant, language: string) => ProductVariantTranslation;
24
+ export declare const getProductOrderRawPrice: ({ product, variantId, quantity, selectedAddons, noVat, }: {
24
25
  product: Product;
25
26
  variantId: number | null;
26
27
  quantity: number;
27
- selectedAddons: SelectedAddons;
28
+ selectedAddons: orderModels.SelectedAddons;
28
29
  noVat?: boolean;
29
30
  }) => {
30
31
  price: number;
31
32
  optionsPrice: number;
32
33
  total: number;
33
34
  };
34
- export declare const getProductCartPrice: ({ product, variantId, quantity, currency, language, selectedAddons, noVat, }: {
35
+ export declare const getProductOrderPrice: ({ product, variantId, quantity, currency, language, selectedAddons, noVat, }: {
35
36
  product: Product;
36
37
  variantId: number | null;
37
38
  quantity: number;
38
39
  currency: string;
39
40
  language: string;
40
- selectedAddons: SelectedAddons;
41
+ selectedAddons: orderModels.SelectedAddons;
41
42
  noVat?: boolean;
42
43
  }) => {
43
44
  totalPrice: number;