chopme-frontend-common 1.0.18 → 1.0.22
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.
- package/build/entities/category.entity.d.ts +8 -0
- package/build/entities/category.entity.js +2 -0
- package/build/entities/client.entity.d.ts +2 -2
- package/build/entities/index.d.ts +3 -0
- package/build/entities/index.js +3 -0
- package/build/entities/menu.entity.d.ts +22 -0
- package/build/entities/menu.entity.js +2 -0
- package/build/entities/restaurant.entity.d.ts +58 -0
- package/build/entities/restaurant.entity.js +2 -0
- package/build/enums/index.d.ts +1 -0
- package/build/enums/index.js +1 -0
- package/build/enums/networks.d.ts +4 -0
- package/build/enums/networks.js +8 -0
- package/package.json +2 -1
package/build/entities/index.js
CHANGED
|
@@ -17,3 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./auth.entity"), exports);
|
|
18
18
|
__exportStar(require("./user.entity"), exports);
|
|
19
19
|
__exportStar(require("./client.entity"), exports);
|
|
20
|
+
__exportStar(require("./category.entity"), exports);
|
|
21
|
+
__exportStar(require("./menu.entity"), exports);
|
|
22
|
+
__exportStar(require("./restaurant.entity"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ICategoryEntity } from "./category.entity";
|
|
2
|
+
import { IRestaurantEntity } from "./restaurant.entity";
|
|
3
|
+
export type MenuRating = {
|
|
4
|
+
average: number;
|
|
5
|
+
total: number;
|
|
6
|
+
};
|
|
7
|
+
export type Menu = {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
restaurant: IRestaurantEntity;
|
|
11
|
+
category: ICategoryEntity;
|
|
12
|
+
description?: string;
|
|
13
|
+
coverImage?: string;
|
|
14
|
+
pictures: string[];
|
|
15
|
+
price: number;
|
|
16
|
+
priceWithPlatformPercentage: number;
|
|
17
|
+
available: boolean;
|
|
18
|
+
rating: MenuRating;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
deletedAt: Date | null;
|
|
22
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { EnumNetwork } from "../enums/networks";
|
|
2
|
+
import { EnumRestaurantType } from "../enums/restaurant-types";
|
|
3
|
+
import { EnumWalletTypes } from "../enums/wallet-types";
|
|
4
|
+
export interface IRestaurantAddress {
|
|
5
|
+
country: string;
|
|
6
|
+
city: string;
|
|
7
|
+
countryCode: string;
|
|
8
|
+
state?: string;
|
|
9
|
+
longName?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IRestaurantLocation {
|
|
12
|
+
type: "Point";
|
|
13
|
+
coordinates: number[];
|
|
14
|
+
}
|
|
15
|
+
export interface IRestaurantRating {
|
|
16
|
+
average: number;
|
|
17
|
+
total: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IRestaurantDeliveryPricingKm {
|
|
20
|
+
from: number;
|
|
21
|
+
to: number;
|
|
22
|
+
price: number;
|
|
23
|
+
}
|
|
24
|
+
export interface IRestaurantAvailability {
|
|
25
|
+
day: string;
|
|
26
|
+
openTime: string;
|
|
27
|
+
closeTime: string;
|
|
28
|
+
}
|
|
29
|
+
export interface IMobileWalletData {
|
|
30
|
+
network: EnumNetwork;
|
|
31
|
+
number: string;
|
|
32
|
+
}
|
|
33
|
+
export interface IRestaurantWallet {
|
|
34
|
+
type: EnumWalletTypes;
|
|
35
|
+
mobileData?: IMobileWalletData;
|
|
36
|
+
}
|
|
37
|
+
export interface IRestaurantEntity {
|
|
38
|
+
id: string;
|
|
39
|
+
name: string;
|
|
40
|
+
slug: string;
|
|
41
|
+
slogan?: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
phone?: string;
|
|
44
|
+
email?: string;
|
|
45
|
+
type: EnumRestaurantType;
|
|
46
|
+
address: IRestaurantAddress;
|
|
47
|
+
location: IRestaurantLocation;
|
|
48
|
+
rating: IRestaurantRating;
|
|
49
|
+
totalViews: number;
|
|
50
|
+
coverImage?: string;
|
|
51
|
+
pictures: string[];
|
|
52
|
+
deliveryPricingKm: IRestaurantDeliveryPricingKm[];
|
|
53
|
+
isClosed: boolean;
|
|
54
|
+
availability: IRestaurantAvailability[];
|
|
55
|
+
createdAt: Date;
|
|
56
|
+
updatedAt: Date;
|
|
57
|
+
deletedAt: Date | null;
|
|
58
|
+
}
|
package/build/enums/index.d.ts
CHANGED
package/build/enums/index.js
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnumNetwork = void 0;
|
|
4
|
+
var EnumNetwork;
|
|
5
|
+
(function (EnumNetwork) {
|
|
6
|
+
EnumNetwork["MTN"] = "MTN";
|
|
7
|
+
EnumNetwork["ORANGE"] = "ORANGEMONEY";
|
|
8
|
+
})(EnumNetwork || (exports.EnumNetwork = EnumNetwork = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chopme-frontend-common",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.22",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"react-redux": "^9.3.0",
|
|
29
29
|
"react-router-dom": "^7.18.1",
|
|
30
30
|
"react-toastify": "^11.1.0",
|
|
31
|
+
"socket.io-client": "^4.8.3",
|
|
31
32
|
"zod": "^4.4.3"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|