@restaround/react 1.4.42 → 1.4.45

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 (179) hide show
  1. package/dist/components/PublicMenu/Branches/BranchCard/BranchCard.d.ts +6 -0
  2. package/dist/components/PublicMenu/Branches/BranchCard/Parent.d.ts +7 -0
  3. package/dist/components/PublicMenu/Branches/BranchCard/index.d.ts +1 -0
  4. package/dist/components/PublicMenu/Branches/Branches.d.ts +1 -7
  5. package/dist/components/PublicMenu/{Categories.d.ts → Categories/Categories.d.ts} +1 -1
  6. package/dist/components/PublicMenu/Categories/index.d.ts +1 -0
  7. package/dist/components/PublicMenu/Header/BranchHeader/BranchHeader.d.ts +2 -0
  8. package/dist/components/PublicMenu/Header/BranchHeader/HeaderLinks/HeaderLinks.d.ts +2 -0
  9. package/dist/components/PublicMenu/Header/BranchHeader/HeaderLinks/index.d.ts +1 -0
  10. package/dist/components/PublicMenu/Header/BranchHeader/index.d.ts +1 -0
  11. package/dist/components/PublicMenu/Header/BusinessHeader/BusinessHeader.d.ts +2 -0
  12. package/dist/components/PublicMenu/Header/BusinessHeader/index.d.ts +1 -0
  13. package/dist/components/PublicMenu/Header/Header.d.ts +1 -7
  14. package/dist/components/PublicMenu/MenuContent/MenuContent.d.ts +6 -0
  15. package/dist/components/PublicMenu/MenuContent/index.d.ts +1 -0
  16. package/dist/components/PublicMenu/Products/Products.d.ts +1 -1
  17. package/dist/components/PublicMenu/PublicMenu.d.ts +1 -1
  18. package/dist/constants/index.esm.js +1 -1
  19. package/dist/constants/index.esm.js.map +1 -1
  20. package/dist/constants/index.js +1 -1
  21. package/dist/constants/index.js.map +1 -1
  22. package/dist/constants/modules/view/constants.d.ts +8 -2
  23. package/dist/index.esm.js +1 -1
  24. package/dist/index.esm.js.map +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/index.js.map +1 -1
  27. package/dist/models/index.d.ts +2 -2
  28. package/dist/models/index.esm.js +1 -1
  29. package/dist/models/index.esm.js.map +1 -1
  30. package/dist/models/index.js +1 -1
  31. package/dist/models/index.js.map +1 -1
  32. package/dist/models/models/index.d.ts +2 -2
  33. package/dist/models/modules/branch/hooks.d.ts +9 -1
  34. package/dist/models/modules/branch/models.d.ts +2 -0
  35. package/dist/models/modules/business/constants.d.ts +2 -0
  36. package/dist/models/modules/business/hooks.d.ts +9 -0
  37. package/dist/models/modules/menu/index.d.ts +2 -0
  38. package/dist/models/{menu.d.ts → modules/menu/models.d.ts} +7 -21
  39. package/dist/models/modules/menu/utils.d.ts +4 -0
  40. package/dist/models/modules/product/hooks.d.ts +3 -0
  41. package/dist/models/modules/product/utils.d.ts +1 -0
  42. package/dist/models/modules/table/hooks.d.ts +4 -0
  43. package/dist/models/modules/user/models.d.ts +3 -1
  44. package/dist/models/modules/view/constants.d.ts +8 -2
  45. package/dist/models/store/index.d.ts +3 -3
  46. package/dist/modules/branch/hooks.d.ts +9 -1
  47. package/dist/modules/branch/models.d.ts +2 -0
  48. package/dist/modules/business/constants.d.ts +2 -0
  49. package/dist/modules/business/hooks.d.ts +9 -0
  50. package/dist/modules/business/index.d.ts +1 -0
  51. package/dist/modules/category/hooks.d.ts +3 -0
  52. package/dist/{utils/category.d.ts → modules/category/utils.d.ts} +1 -1
  53. package/dist/modules/menu/index.d.ts +2 -0
  54. package/dist/{models/models/menu.d.ts → modules/menu/models.d.ts} +7 -21
  55. package/dist/modules/menu/utils.d.ts +4 -0
  56. package/dist/modules/product/hooks.d.ts +3 -0
  57. package/dist/modules/product/utils.d.ts +1 -0
  58. package/dist/modules/user/models.d.ts +3 -1
  59. package/dist/modules/view/constants.d.ts +8 -2
  60. package/dist/modules/view/hooks.d.ts +2 -0
  61. package/dist/modules/view/index.d.ts +1 -0
  62. package/dist/modules/view/utils.d.ts +10 -0
  63. package/dist/store/index.d.ts +3 -3
  64. package/dist/styles/ui.css +1 -1
  65. package/dist/styles/ui.css.map +1 -1
  66. package/dist/utils/index.d.ts +2 -5
  67. package/dist/utils/index.esm.js +1 -1
  68. package/dist/utils/index.esm.js.map +1 -1
  69. package/dist/utils/index.js +1 -1
  70. package/dist/utils/index.js.map +1 -1
  71. package/dist/utils/modules/branch/models.d.ts +2 -0
  72. package/dist/utils/{utils/category.d.ts → modules/category/utils.d.ts} +1 -1
  73. package/dist/utils/{models/menu.d.ts → modules/menu/models.d.ts} +7 -21
  74. package/dist/utils/modules/menu/utils.d.ts +4 -0
  75. package/dist/utils/modules/product/utils.d.ts +1 -0
  76. package/dist/utils/modules/view/constants.d.ts +8 -2
  77. package/dist/utils/modules/view/utils.d.ts +10 -0
  78. package/dist/utils/utils/index.d.ts +2 -5
  79. package/package.json +6 -6
  80. package/dist/components/Image/Image.d.ts +0 -9
  81. package/dist/components/Image/index.d.ts +0 -1
  82. package/dist/components/PublicMenu/Header/BranchInfo/BranchInfo.d.ts +0 -10
  83. package/dist/components/PublicMenu/Header/BranchInfo/index.d.ts +0 -1
  84. package/dist/components/PublicMenu/Header/BusinessInfo/BusinessInfo.d.ts +0 -7
  85. package/dist/components/PublicMenu/Header/BusinessInfo/index.d.ts +0 -1
  86. package/dist/hooks/category.d.ts +0 -1
  87. package/dist/hooks/product.d.ts +0 -2
  88. package/dist/models/utils/common.d.ts +0 -1
  89. package/dist/utils/common.d.ts +0 -1
  90. package/dist/utils/components/PublicMenu/OrderMethods/OrderMethods.types.d.ts +0 -9
  91. package/dist/utils/components/PublicMenu/ProductsGridItem/ProductsGridItem.types.d.ts +0 -12
  92. package/dist/utils/constants/env.d.ts +0 -1
  93. package/dist/utils/constants.d.ts +0 -5
  94. package/dist/utils/hooks/translation.d.ts +0 -5
  95. package/dist/utils/image.d.ts +0 -5
  96. package/dist/utils/menu.d.ts +0 -2
  97. package/dist/utils/models/index.d.ts +0 -15
  98. package/dist/utils/modules/branch/hooks.d.ts +0 -9
  99. package/dist/utils/modules/branch/utils.d.ts +0 -9
  100. package/dist/utils/modules/common/services.d.ts +0 -1
  101. package/dist/utils/modules/customer/hooks.d.ts +0 -5
  102. package/dist/utils/modules/customer/services.d.ts +0 -9
  103. package/dist/utils/modules/order/hooks.d.ts +0 -18
  104. package/dist/utils/modules/order/index.d.ts +0 -5
  105. package/dist/utils/modules/order/services.d.ts +0 -4
  106. package/dist/utils/modules/product/hooks.d.ts +0 -6
  107. package/dist/utils/modules/store/hooks.d.ts +0 -6
  108. package/dist/utils/modules/user/models.d.ts +0 -54
  109. package/dist/utils/modules/view/models.d.ts +0 -7
  110. package/dist/utils/modules/view/services.d.ts +0 -2
  111. package/dist/utils/services/api/index.d.ts +0 -5
  112. package/dist/utils/services/translation/index.d.ts +0 -3
  113. package/dist/utils/services/translation/locales/az/auth.d.ts +0 -7
  114. package/dist/utils/services/translation/locales/az/branch.d.ts +0 -13
  115. package/dist/utils/services/translation/locales/az/common.d.ts +0 -6
  116. package/dist/utils/services/translation/locales/az/customer.d.ts +0 -17
  117. package/dist/utils/services/translation/locales/az/error.d.ts +0 -20
  118. package/dist/utils/services/translation/locales/az/events.d.ts +0 -8
  119. package/dist/utils/services/translation/locales/az/index.d.ts +0 -147
  120. package/dist/utils/services/translation/locales/az/order.d.ts +0 -44
  121. package/dist/utils/services/translation/locales/az/pricing.d.ts +0 -37
  122. package/dist/utils/services/translation/locales/en/auth.d.ts +0 -2
  123. package/dist/utils/services/translation/locales/en/branch.d.ts +0 -10
  124. package/dist/utils/services/translation/locales/en/common.d.ts +0 -2
  125. package/dist/utils/services/translation/locales/en/customer.d.ts +0 -2
  126. package/dist/utils/services/translation/locales/en/error.d.ts +0 -16
  127. package/dist/utils/services/translation/locales/en/events.d.ts +0 -2
  128. package/dist/utils/services/translation/locales/en/index.d.ts +0 -33
  129. package/dist/utils/services/translation/locales/en/order.d.ts +0 -2
  130. package/dist/utils/services/translation/locales/en/pricing.d.ts +0 -2
  131. package/dist/utils/services/translation/locales/et/auth.d.ts +0 -7
  132. package/dist/utils/services/translation/locales/et/branch.d.ts +0 -13
  133. package/dist/utils/services/translation/locales/et/common.d.ts +0 -6
  134. package/dist/utils/services/translation/locales/et/customer.d.ts +0 -17
  135. package/dist/utils/services/translation/locales/et/error.d.ts +0 -20
  136. package/dist/utils/services/translation/locales/et/events.d.ts +0 -8
  137. package/dist/utils/services/translation/locales/et/index.d.ts +0 -146
  138. package/dist/utils/services/translation/locales/et/order.d.ts +0 -45
  139. package/dist/utils/services/translation/locales/et/pricing.d.ts +0 -35
  140. package/dist/utils/services/translation/locales/index.d.ts +0 -761
  141. package/dist/utils/services/translation/locales/nl/auth.d.ts +0 -7
  142. package/dist/utils/services/translation/locales/nl/branch.d.ts +0 -13
  143. package/dist/utils/services/translation/locales/nl/common.d.ts +0 -6
  144. package/dist/utils/services/translation/locales/nl/customer.d.ts +0 -17
  145. package/dist/utils/services/translation/locales/nl/error.d.ts +0 -20
  146. package/dist/utils/services/translation/locales/nl/events.d.ts +0 -8
  147. package/dist/utils/services/translation/locales/nl/index.d.ts +0 -146
  148. package/dist/utils/services/translation/locales/nl/order.d.ts +0 -45
  149. package/dist/utils/services/translation/locales/nl/pricing.d.ts +0 -35
  150. package/dist/utils/services/translation/locales/ru/auth.d.ts +0 -7
  151. package/dist/utils/services/translation/locales/ru/branch.d.ts +0 -13
  152. package/dist/utils/services/translation/locales/ru/common.d.ts +0 -6
  153. package/dist/utils/services/translation/locales/ru/customer.d.ts +0 -17
  154. package/dist/utils/services/translation/locales/ru/error.d.ts +0 -20
  155. package/dist/utils/services/translation/locales/ru/events.d.ts +0 -8
  156. package/dist/utils/services/translation/locales/ru/index.d.ts +0 -146
  157. package/dist/utils/services/translation/locales/ru/order.d.ts +0 -45
  158. package/dist/utils/services/translation/locales/ru/pricing.d.ts +0 -35
  159. package/dist/utils/services/translation/locales/tr/auth.d.ts +0 -7
  160. package/dist/utils/services/translation/locales/tr/branch.d.ts +0 -13
  161. package/dist/utils/services/translation/locales/tr/common.d.ts +0 -6
  162. package/dist/utils/services/translation/locales/tr/customer.d.ts +0 -17
  163. package/dist/utils/services/translation/locales/tr/error.d.ts +0 -20
  164. package/dist/utils/services/translation/locales/tr/events.d.ts +0 -8
  165. package/dist/utils/services/translation/locales/tr/index.d.ts +0 -146
  166. package/dist/utils/services/translation/locales/tr/order.d.ts +0 -45
  167. package/dist/utils/services/translation/locales/tr/pricing.d.ts +0 -35
  168. package/dist/utils/store/index.d.ts +0 -7
  169. package/dist/utils/store/order.d.ts +0 -42
  170. package/dist/utils/url.d.ts +0 -6
  171. package/dist/utils/utils/common.d.ts +0 -1
  172. package/dist/utils/utils/constants.d.ts +0 -5
  173. package/dist/utils/utils/image.d.ts +0 -5
  174. package/dist/utils/utils/menu.d.ts +0 -2
  175. package/dist/utils/utils/url.d.ts +0 -6
  176. package/dist/models/{category.d.ts → modules/category/models.d.ts} +0 -0
  177. package/dist/{utils/modules/product → modules/category}/index.d.ts +1 -1
  178. /package/dist/{models/models/category.d.ts → modules/category/models.d.ts} +0 -0
  179. /package/dist/utils/{models/category.d.ts → modules/category/models.d.ts} +0 -0
@@ -3,12 +3,18 @@ export declare const MODALS: {
3
3
  AUTH: string;
4
4
  ADD_UPDATE_ADDRESS: string;
5
5
  BRANCH_BUSINESS_HOURS: string;
6
+ PRODUCT_DETAILS: string;
6
7
  };
7
8
  export declare const SUPPORTED_LOCALES: string[];
8
- export declare const DEFAULT_LANGUAGE = "en";
9
- export declare const DEFAULT_CURRENCY = "AZN";
10
9
  export declare const SUPPORTED_COUNTRIES: {
11
10
  name: string;
12
11
  code: string;
13
12
  phoneCode: string;
14
13
  }[];
14
+ export declare const CO_DOMAIN = "restaround.co";
15
+ export declare const AZ_DOMAIN = "restaround.az";
16
+ export declare const EE_DOMAIN = "restaround.ee";
17
+ export declare const NL_DOMAIN = "restaround.nl";
18
+ export declare const DEFAULT_HOSTNAME = "restaround.co";
19
+ export declare const DOMAINS: string[];
20
+ export declare const IMAGE_BASE_URL = "https://images.restaround.co";
@@ -3,4 +3,14 @@ interface ValidationResult {
3
3
  error?: string;
4
4
  }
5
5
  export declare function validatePhoneNumber(phoneNumber: string): ValidationResult;
6
+ export declare const getBaseUrl: (hostname: string, language: string) => {
7
+ url: string;
8
+ domain: string;
9
+ };
10
+ export declare const getTLD: (language: string) => "az" | "co";
11
+ export declare const getRegisterUrl: (language: string, source: string) => string;
12
+ export declare const getImageSource: (image?: string) => string;
13
+ export declare const getLogoImageSource: (logoImage?: string) => string;
14
+ export declare const getCoverPhotoSource: (coverPhoto?: string) => string;
15
+ export declare const rgbDataURL: (r: number, g: number, b: number) => string;
6
16
  export {};
@@ -1,11 +1,8 @@
1
- export * from "./category";
2
- export * from "./common";
3
- export * from "./image";
4
- export * from "./menu";
5
1
  export * from "../modules/addon/utils";
6
2
  export * from "../modules/product/utils";
7
3
  export * from "../modules/order/utils";
8
4
  export * from "../modules/customer/utils";
9
5
  export * from "../modules/feature/utils";
10
6
  export * from "../modules/view/utils";
11
- export * from "./url";
7
+ export * from "../modules/category/utils";
8
+ export * from "../modules/menu/utils";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restaround/react",
3
- "version": "1.4.42",
3
+ "version": "1.4.45",
4
4
  "description": "React Library by restaround.co",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -60,9 +60,9 @@
60
60
  "homepage": "https://restaround.co",
61
61
  "peerDependencies": {
62
62
  "@sorocraft/js-utils": ">=1.0.55",
63
- "@sorocraft/ui": ">=1.2.111",
64
- "react": ">=19.0.0",
65
- "react-dom": ">=19.0.0"
63
+ "@sorocraft/ui": ">=1.2.115",
64
+ "react": ">=19.2.3",
65
+ "react-dom": ">=19.2.3"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@rollup/plugin-commonjs": "^29.0.0",
@@ -76,7 +76,7 @@
76
76
  "@types/react": "^19.2.7",
77
77
  "@types/react-dom": "^19.2.3",
78
78
  "autoprefixer": "^10.4.22",
79
- "eslint": "^9.39.1",
79
+ "eslint": "^9.39.2",
80
80
  "eslint-plugin-react": "^7.37.5",
81
81
  "eslint-plugin-react-hooks": "^7.0.1",
82
82
  "eslint-plugin-unicorn": "^62.0.0",
@@ -87,7 +87,7 @@
87
87
  "rollup-plugin-copy": "^3.5.0",
88
88
  "rollup-plugin-peer-deps-external": "^2.2.4",
89
89
  "rollup-plugin-postcss": "^4.0.2",
90
- "sass": "1.94.3",
90
+ "sass": "^1.96.0",
91
91
  "ts-jest": "^29.4.6",
92
92
  "ts-node": "^10.9.2",
93
93
  "tslib": "^2.8.1",
@@ -1,9 +0,0 @@
1
- import { DetailedHTMLProps, ImgHTMLAttributes } from "react";
2
- interface Props extends DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> {
3
- placeholder?: "blur" | "empty" | `data:image/${string}`;
4
- blurDataURL?: string;
5
- priority?: boolean;
6
- quality?: number | `${number}`;
7
- }
8
- declare const Image: (props: Props) => import("react/jsx-runtime").JSX.Element;
9
- export default Image;
@@ -1 +0,0 @@
1
- export { default } from "./Image";
@@ -1,10 +0,0 @@
1
- import { models as branchModels } from "src/modules/branch";
2
- import * as menuModels from "src/models/menu";
3
- interface Props {
4
- branch?: branchModels.Branch;
5
- hasSingleBranch?: boolean;
6
- name: menuModels.PublicMenuData["name"];
7
- logoImage: menuModels.PublicMenuData["logoImage"];
8
- }
9
- declare const BranchInfo: ({ branch, hasSingleBranch, name, logoImage }: Props) => import("react/jsx-runtime").JSX.Element;
10
- export default BranchInfo;
@@ -1 +0,0 @@
1
- export { default } from "./BranchInfo";
@@ -1,7 +0,0 @@
1
- import * as menuModels from "src/models/menu";
2
- interface Props {
3
- name: menuModels.PublicMenuData["name"];
4
- logoImage: menuModels.PublicMenuData["logoImage"];
5
- }
6
- declare const BusinessInfo: ({ name, logoImage }: Props) => import("react/jsx-runtime").JSX.Element;
7
- export default BusinessInfo;
@@ -1 +0,0 @@
1
- export { default } from "./BusinessInfo";
@@ -1 +0,0 @@
1
- export declare const useCategoryNameById: (categoryId: number) => string;
@@ -1,2 +0,0 @@
1
- import { models as productModels } from "src/modules/product";
2
- export declare const useProductById: (productId: number) => productModels.Product;
@@ -1 +0,0 @@
1
- export declare const calculateTotalPrice: (price?: number, quantity?: number, vat?: number) => number;
@@ -1 +0,0 @@
1
- export declare const calculateTotalPrice: (price?: number, quantity?: number, vat?: number) => number;
@@ -1,9 +0,0 @@
1
- import { IconType } from "@sorocraft/ui";
2
- import { models as orderModels } from "src/modules/order";
3
- export interface OrderTypeForMethods {
4
- type: orderModels.OrderType;
5
- icon: IconType;
6
- title: string;
7
- isDisabled: boolean;
8
- isVisible: boolean;
9
- }
@@ -1,12 +0,0 @@
1
- import { models as productModels } from "src/modules/product";
2
- export interface ProductsGridItemProps {
3
- product: productModels.Product;
4
- currency: string;
5
- language: string;
6
- defaultImage?: string;
7
- isDashboard?: boolean;
8
- onClick?: () => void;
9
- onAddProduct?: ({ product }: {
10
- product: productModels.Product;
11
- }) => void;
12
- }
@@ -1 +0,0 @@
1
- export declare const BASE_API_URL = "https://api.restaround.co/api/v1";
@@ -1,5 +0,0 @@
1
- export declare const CO_DOMAIN = "restaround.co";
2
- export declare const AZ_DOMAIN = "restaround.az";
3
- export declare const EE_DOMAIN = "restaround.ee";
4
- export declare const NL_DOMAIN = "restaround.nl";
5
- export declare const DOMAINS: string[];
@@ -1,5 +0,0 @@
1
- export declare const useTranslation: (ns?: string, params?: {
2
- language?: string;
3
- }) => {
4
- t: (key: string, options?: Record<string, string>) => string;
5
- };
@@ -1,5 +0,0 @@
1
- export declare const IMAGE_BASE_URL = "https://images.restaround.co";
2
- export declare const getImageSource: (image?: string) => string;
3
- export declare const getLogoImageSource: (logoImage?: string) => string;
4
- export declare const getCoverPhotoSource: (coverPhoto?: string) => string;
5
- export declare const rgbDataURL: (r: number, g: number, b: number) => string;
@@ -1,2 +0,0 @@
1
- import { Category, CategoryProductMap, Product } from "src/models";
2
- export declare const prepareCategoryAndProductMap: (categories: Category[], products: Product[]) => CategoryProductMap[];
@@ -1,15 +0,0 @@
1
- export * from "../modules/addon/models";
2
- export * from "../modules/branch/models";
3
- export * from "../modules/business/models";
4
- export * from "../modules/customer/models";
5
- export * from "../modules/feature/models";
6
- export * from "../modules/order/models";
7
- export * from "../modules/product/models";
8
- export * from "../modules/view/models";
9
- export * from "../modules/subscription/models";
10
- export * from "../modules/table/models";
11
- export * from "../modules/user/models";
12
- export * from "./category";
13
- export * from "./menu";
14
- export * from "../components/PublicMenu/ProductsGridItem/ProductsGridItem.types";
15
- export * from "../components/PublicMenu/OrderMethods/OrderMethods.types";
@@ -1,9 +0,0 @@
1
- import * as viewModels from "../view/models";
2
- import { BranchServes, BranchSettings } from "./models";
3
- export declare const useBranchCoordinates: () => viewModels.Coordinates;
4
- export declare const useBranchServes: () => BranchServes;
5
- export declare const useBranchSettings: () => BranchSettings;
6
- export declare const useMaxDeliveryDistance: () => number;
7
- export declare const useMinDeliveryAmount: () => number;
8
- export declare const useOrderEnabled: () => boolean;
9
- export declare const useIsDeliveryEnabled: () => boolean;
@@ -1,9 +0,0 @@
1
- import { Branch, BranchWorkDays } from "src/models";
2
- export declare const getVenueName: (businessName: string, hasSingleBranch: boolean, selectedBranch?: Branch) => string;
3
- export declare function normalizeRootPath(rootPath: string): string;
4
- export declare const getHoursForDay: (schedule: BranchWorkDays, weekDayIndex: number) => import("src/models").BranchWorkHour;
5
- export declare const splitHours: (hours: string) => number[];
6
- export declare const isWithinTimeRange: (timeRange?: {
7
- openAt: string;
8
- closeAt: string;
9
- }) => boolean;
@@ -1 +0,0 @@
1
- export declare const logException: (error?: any, errorInfo?: {}) => Promise<Response>;
@@ -1,5 +0,0 @@
1
- import { Customer, CustomerAddress } from "./models";
2
- export declare const useAvailableCustomer: () => Customer;
3
- export declare const useCustomerAddress: () => CustomerAddress;
4
- export declare const useCustomerId: () => number;
5
- export declare const useCustomerEmail: () => string;
@@ -1,9 +0,0 @@
1
- import * as viewModels from "../view/models";
2
- import { AuthResponse, Customer, CustomerUpdatePayload } from "./models";
3
- export declare const getCustomer: () => Promise<Customer>;
4
- export declare const loginCustomer: (phoneNumber: string) => Promise<{
5
- status: number;
6
- }>;
7
- export declare const verifyOTP: (otp: string, phoneNumber: string) => Promise<AuthResponse>;
8
- export declare const update: (payload: CustomerUpdatePayload) => Promise<any>;
9
- export declare const getCustomerDistance: (branchCoordinates: viewModels.Coordinates, customerCoordinates: viewModels.Coordinates) => Promise<number>;
@@ -1,18 +0,0 @@
1
- import { Order, OrderFormattedPriceDetails, OrderItem, OrderPayload, OrderPriceDetails, SelectedAddons } from "./models";
2
- export declare const useOrderPriceDetails: () => OrderPriceDetails;
3
- export declare const useOrderFormattedPriceDetails: () => OrderFormattedPriceDetails;
4
- export declare const usePrepareOrder: (existingOrderData?: Partial<Order>) => OrderPayload;
5
- export declare const useTotalOrderItemsCount: () => number;
6
- export declare const useProductQuantityInOrder: ({ productId, variantId, selectedAddons, }: {
7
- productId: number;
8
- variantId?: number | null;
9
- selectedAddons: SelectedAddons;
10
- }) => number;
11
- export declare const useProductQuantityInOrderWithAllVariants: (productId: number) => number;
12
- export declare const useOrderItemPrice: (item: OrderItem) => {
13
- totalPrice: number;
14
- formattedTotalPrice: string;
15
- };
16
- export declare const useDeliveryDistanceError: () => string | null;
17
- export declare const useDeliveryAmountError: () => string | null;
18
- export declare const useOrderErrorInDetails: () => string | null;
@@ -1,5 +0,0 @@
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";
@@ -1,4 +0,0 @@
1
- import { OrderPayload } from "./models";
2
- export declare const createOrder: (order: OrderPayload) => Promise<{
3
- trackingId: string;
4
- }>;
@@ -1,6 +0,0 @@
1
- import * as orderModels from "src/modules/order/models";
2
- export declare const useProductQuantity: ({ productId, variantId, selectedAddons, }: {
3
- productId: number;
4
- variantId?: number;
5
- selectedAddons: orderModels.SelectedAddons;
6
- }) => number;
@@ -1,6 +0,0 @@
1
- import * as orderModels from "src/modules/order/models";
2
- export declare const useInitialOrder: ({ defaultOrderType, defaultPaymentMethod, defaultBranchId, }: {
3
- defaultOrderType: orderModels.OrderType;
4
- defaultPaymentMethod: orderModels.PaymentMethod;
5
- defaultBranchId: number;
6
- }) => Partial<orderModels.Order>;
@@ -1,54 +0,0 @@
1
- export declare enum EmployeePermission {
2
- VIEW_BUSINESS = "VIEW_BUSINESS",
3
- UPDATE_BUSINESS = "UPDATE_BUSINESS",
4
- VIEW_ORDERS = "VIEW_ORDERS",
5
- UPDATE_ORDER = "UPDATE_ORDER",
6
- CREATE_ORDER = "CREATE_ORDER",
7
- VIEW_QR_MENU = "VIEW_QR_MENU",
8
- VIEW_MENU = "VIEW_MENU",
9
- VIEW_MENU_ITEMS = "VIEW_MENU_ITEMS",
10
- CREATE_MENU_ITEM = "CREATE_MENU_ITEM",
11
- UPDATE_MENU_ITEM = "UPDATE_MENU_ITEM",
12
- DELETE_MENU_ITEM = "DELETE_MENU_ITEM",
13
- VIEW_CATEGORIES = "VIEW_CATEGORIES",
14
- UPDATE_CATEGORY = "UPDATE_CATEGORY",
15
- CREATE_CATEGORY = "CREATE_CATEGORY",
16
- DELETE_CATEGORY = "DELETE_CATEGORY",
17
- VIEW_ADDONS = "VIEW_ADDONS",
18
- UPDATE_ADDON = "UPDATE_ADDON",
19
- CREATE_ADDON = "CREATE_ADDON",
20
- DELETE_ADDON = "DELETE_ADDON",
21
- VIEW_TABLES = "VIEW_TABLES",
22
- UPDATE_TABLE = "UPDATE_TABLE",
23
- UPDATE_TABLE_STATUS = "UPDATE_TABLE_STATUS",
24
- CREATE_TABLE = "CREATE_TABLE",
25
- DELETE_TABLE = "DELETE_TABLE",
26
- VIEW_BRANCHES = "VIEW_BRANCHES",
27
- UPDATE_BRANCH = "UPDATE_BRANCH",
28
- CREATE_BRANCH = "CREATE_BRANCH",
29
- DELETE_BRANCH = "DELETE_BRANCH",
30
- VIEW_EMPLOYEES = "VIEW_EMPLOYEES",
31
- UPDATE_EMPLOYEE = "UPDATE_EMPLOYEE",
32
- CREATE_EMPLOYEE = "CREATE_EMPLOYEE",
33
- DELETE_EMPLOYEE = "DELETE_EMPLOYEE",
34
- VIEW_ANALYTICS = "VIEW_ANALYTICS",
35
- VIEW_SALES_REPORTS = "VIEW_SALES_REPORTS",
36
- VIEW_SUBSCRIPTION = "VIEW_SUBSCRIPTION",
37
- UPDATE_SUBSCRIPTION = "UPDATE_SUBSCRIPTION",
38
- VIEW_QR_CODES = "VIEW_QR_CODES",
39
- CREATE_QR_CODE = "CREATE_QR_CODE",
40
- DELETE_QR_CODE = "DELETE_QR_CODE",
41
- ALL = "ALL",
42
- VIEW_INVENTORY = "VIEW_INVENTORY",
43
- VIEW_PURCHASES = "VIEW_PURCHASES",
44
- VIEW_PURCHASE_DETAIL = "VIEW_PURCHASE_DETAIL",
45
- CREATE_PURCHASE = "CREATE_PURCHASE",
46
- UPDATE_PURCHASE = "UPDATE_PURCHASE",
47
- DELETE_PURCHASE = "DELETE_PURCHASE",
48
- VIEW_INVENTORY_PRODUCTS = "VIEW_INVENTORY_PRODUCTS",
49
- CREATE_INVENTORY_PRODUCT = "CREATE_INVENTORY_PRODUCT",
50
- UPDATE_INVENTORY_PRODUCT = "UPDATE_INVENTORY_PRODUCT",
51
- DELETE_INVENTORY_PRODUCT = "DELETE_INVENTORY_PRODUCT",
52
- VIEW_BUSINESS_BALANCE = "VIEW_BUSINESS_BALANCE",
53
- VIEW_BRANCH_BALANCE = "VIEW_BRANCH_BALANCE"
54
- }
@@ -1,7 +0,0 @@
1
- export type Coordinates = {
2
- longitude?: number;
3
- latitude?: number;
4
- };
5
- export type ErrorWithCode = Error & {
6
- errorCode?: string;
7
- };
@@ -1,2 +0,0 @@
1
- import { Storage } from "@sorocraft/js-utils";
2
- export declare const storage: Storage;
@@ -1,5 +0,0 @@
1
- export declare const API: {
2
- post: (endpoint: string, body: any) => Promise<any>;
3
- patch: (endpoint: string, body: any) => Promise<any>;
4
- get: (endpoint: string) => Promise<any>;
5
- };
@@ -1,3 +0,0 @@
1
- export declare const getTranslations: (locale: string, ns: string) => {
2
- t: (key: string, options?: Record<string, string>) => string;
3
- };
@@ -1,7 +0,0 @@
1
- declare const _default: {
2
- "Create an account or log in": string;
3
- "Phone number": string;
4
- "I don't have an email": string;
5
- "We sent a confirmation code to {{address}}": string;
6
- };
7
- export default _default;
@@ -1,13 +0,0 @@
1
- declare const _default: {
2
- "WEEKDAY-0": string;
3
- "WEEKDAY-1": string;
4
- "WEEKDAY-2": string;
5
- "WEEKDAY-3": string;
6
- "WEEKDAY-4": string;
7
- "WEEKDAY-5": string;
8
- "WEEKDAY-6": string;
9
- Closed: string;
10
- "Opening Hours": string;
11
- "Delivery Hours": string;
12
- };
13
- export default _default;
@@ -1,6 +0,0 @@
1
- declare const _default: {
2
- Save: string;
3
- Cancel: string;
4
- Continue: string;
5
- };
6
- export default _default;
@@ -1,17 +0,0 @@
1
- declare const _default: {
2
- "Unknown address": string;
3
- "No address available": string;
4
- "Update Delivery Address": string;
5
- Country: string;
6
- City: string;
7
- "Baker Street": string;
8
- Address: string;
9
- "House number": string;
10
- "Additional number": string;
11
- "Example: Door code is 555": string;
12
- "Delivery Instructions": string;
13
- Azerbaijan: string;
14
- Floor: string;
15
- "Enter address": string;
16
- };
17
- export default _default;
@@ -1,20 +0,0 @@
1
- declare const _default: {
2
- SOMETHING_WRONG: string;
3
- FIELD_REQUIRED: string;
4
- "Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60": string;
5
- "Unsupported country code": string;
6
- "Invalid OTP": string;
7
- INVALID_OTP: string;
8
- OTP_RATE_LIMIT_EXCEEDED: string;
9
- "Invalid Email Address": string;
10
- FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
11
- ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
12
- ORDER_TYPE_DISABLED_AT_THIS_TIME: string;
13
- COUNTRY_REQUIRED: string;
14
- CITY_REQUIRED: string;
15
- STREET_REQUIRED: string;
16
- STREET_NUMBER_REQUIRED: string;
17
- OUT_OF_DELIVERY_RANGE: string;
18
- NO_ORDER_TYPE: string;
19
- };
20
- export default _default;
@@ -1,8 +0,0 @@
1
- declare const _default: {
2
- Events: string;
3
- "Scrolled to Category": string;
4
- "Category Selected": string;
5
- "Product Details": string;
6
- "Product Added to Order": string;
7
- };
8
- export default _default;
@@ -1,147 +0,0 @@
1
- declare const _default: {
2
- error: {
3
- SOMETHING_WRONG: string;
4
- FIELD_REQUIRED: string;
5
- "Azerbaijani numbers must be 9 digits and start with 50, 51, 10, 55, 99, 70, 77, 60": string;
6
- "Unsupported country code": string;
7
- "Invalid OTP": string;
8
- INVALID_OTP: string;
9
- OTP_RATE_LIMIT_EXCEEDED: string;
10
- "Invalid Email Address": string;
11
- FEATURE_NOT_AVAILABLE_FOR_SEGMENT: string;
12
- ORDER_TYPE_DISABLED_FOR_BUSINESS: string;
13
- ORDER_TYPE_DISABLED_AT_THIS_TIME: string;
14
- COUNTRY_REQUIRED: string;
15
- CITY_REQUIRED: string;
16
- STREET_REQUIRED: string;
17
- STREET_NUMBER_REQUIRED: string;
18
- OUT_OF_DELIVERY_RANGE: string;
19
- NO_ORDER_TYPE: string;
20
- };
21
- common: {
22
- Save: string;
23
- Cancel: string;
24
- Continue: string;
25
- };
26
- order: {
27
- "View order": string;
28
- "Remove from order": string;
29
- "Update order": string;
30
- "Add to order": string;
31
- Add: string;
32
- "Your order": string;
33
- Subtotal: string;
34
- "Empty order": string;
35
- "You don't have any items in your order": string;
36
- "Add items": string;
37
- "Add an order note": string;
38
- "Specify any allergies, special requests, or ingredients you want to add or remove": string;
39
- "Your Order is Completed!": string;
40
- "Thank you! We've received your order and it will be delivered shortly.": string;
41
- Delivery: string;
42
- "Dine in": string;
43
- Pickup: string;
44
- Cash: string;
45
- "POS Terminal": string;
46
- "Order summary": string;
47
- Items: string;
48
- Tax: string;
49
- Total: string;
50
- "Special instructions, allergies, etc.": string;
51
- "Go to checkout": string;
52
- "Place order": string;
53
- Continue: string;
54
- "Not available": string;
55
- "In order": string;
56
- "Product choices": string;
57
- "Track order": string;
58
- "Minimum order amount for delivery is {{amount}}": string;
59
- "This field is required": string;
60
- "Please select a table": string;
61
- "Please enter an address": string;
62
- "Please choose product": string;
63
- Table: string;
64
- "Select Table": string;
65
- Card: string;
66
- "Closed Now": string;
67
- "Delivery Fee": string;
68
- };
69
- customer: {
70
- "Unknown address": string;
71
- "No address available": string;
72
- "Update Delivery Address": string;
73
- Country: string;
74
- City: string;
75
- "Baker Street": string;
76
- Address: string;
77
- "House number": string;
78
- "Additional number": string;
79
- "Example: Door code is 555": string;
80
- "Delivery Instructions": string;
81
- Azerbaijan: string;
82
- Floor: string;
83
- "Enter address": string;
84
- };
85
- auth: {
86
- "Create an account or log in": string;
87
- "Phone number": string;
88
- "I don't have an email": string;
89
- "We sent a confirmation code to {{address}}": string;
90
- };
91
- events: {
92
- Events: string;
93
- "Scrolled to Category": string;
94
- "Category Selected": string;
95
- "Product Details": string;
96
- "Product Added to Order": string;
97
- };
98
- pricing: {
99
- "Get Started": string;
100
- "Choose Plan": string;
101
- "Smart QR Menu": string;
102
- "Link-in-bio": string;
103
- "Menu Analytics": string;
104
- "Unlimited Products": string;
105
- "Unlimited Categories": string;
106
- "Product variants": string;
107
- "Product options": string;
108
- "Sales reports": string;
109
- "24/7 Support": string;
110
- "Multiple Branches": string;
111
- "Order Management": string;
112
- "Table Management": string;
113
- "Mobile App for Owners & Staff": string;
114
- "Point of Sale (POS)": string;
115
- "Delivery Management": string;
116
- "Third-Party Delivery Integrations": string;
117
- "RestaroundPay with Mobile": string;
118
- "Event management": string;
119
- "Unlimited Users": string;
120
- "/ month": string;
121
- monthly: string;
122
- annually: string;
123
- "Flexible Plans for Every Business - Simple Pricing, More Value!": string;
124
- "Choose a pricing plan that fits your business. Subscribe monthly or annually and save more with long-term plans!": string;
125
- Appetizer: string;
126
- "Main Course": string;
127
- "Unlimited Languages": string;
128
- "30-day money-back guarantee": string;
129
- "Limited Time Only": string;
130
- "/ lifetime": string;
131
- "Try for free": string;
132
- "No credit card needed": string;
133
- };
134
- branch: {
135
- "WEEKDAY-0": string;
136
- "WEEKDAY-1": string;
137
- "WEEKDAY-2": string;
138
- "WEEKDAY-3": string;
139
- "WEEKDAY-4": string;
140
- "WEEKDAY-5": string;
141
- "WEEKDAY-6": string;
142
- Closed: string;
143
- "Opening Hours": string;
144
- "Delivery Hours": string;
145
- };
146
- };
147
- export default _default;