@hedia/types 2.1.63-alpha.25 → 2.1.63-alpha.4
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.
|
@@ -2,7 +2,7 @@ import { Languages } from "../../enums";
|
|
|
2
2
|
import { IRpcRoute } from "../../types";
|
|
3
3
|
export declare namespace FoodService {
|
|
4
4
|
namespace Enums {
|
|
5
|
-
enum
|
|
5
|
+
enum Timespans {
|
|
6
6
|
Breakfast = "breakfast",
|
|
7
7
|
Lunch = "lunch",
|
|
8
8
|
Dinner = "dinner",
|
|
@@ -14,18 +14,12 @@ export declare namespace FoodService {
|
|
|
14
14
|
type Post = IRpcRoute<Types.IFoodSearchRequest, Types.IFoodSearchResponse>;
|
|
15
15
|
}
|
|
16
16
|
namespace AddFood {
|
|
17
|
-
type Post = IRpcRoute<Types.IAddFoodRequest,
|
|
18
|
-
}
|
|
19
|
-
namespace RecentFood {
|
|
20
|
-
type Post = IRpcRoute<Array<{
|
|
21
|
-
foodItemsId: string;
|
|
22
|
-
grams: number;
|
|
23
|
-
}>, undefined>;
|
|
24
|
-
type Get = IRpcRoute<Types.IFrequentFoodsRequest, Array<Types.IFrequentFoodsResponse>>;
|
|
17
|
+
type Post = IRpcRoute<Types.IAddFoodRequest, {}>;
|
|
25
18
|
}
|
|
26
19
|
namespace FavoriteFood {
|
|
27
|
-
type Post = IRpcRoute<
|
|
20
|
+
type Post = IRpcRoute<{}, {}>;
|
|
28
21
|
}
|
|
22
|
+
namespace RecentFood { }
|
|
29
23
|
}
|
|
30
24
|
namespace Types {
|
|
31
25
|
interface IFoodSearchRequest {
|
|
@@ -33,38 +27,31 @@ export declare namespace FoodService {
|
|
|
33
27
|
text: string;
|
|
34
28
|
}
|
|
35
29
|
interface IFoodSearchResponse {
|
|
36
|
-
results: Array<
|
|
37
|
-
}
|
|
38
|
-
type IAddFoodRequest = Omit<IFoodItems & IFoodNames, "id" | "userId" | "foodItemsId">;
|
|
39
|
-
type IAddFoodResponse = IFoodItems & IFoodNames;
|
|
40
|
-
type IFrequentFoodsRequest = undefined;
|
|
41
|
-
type IFrequentFoodsResponse = Pick<IFoodItems & IFoodNames, "id" | "foodItemsId">;
|
|
42
|
-
interface IFavoriteFoodRequest {
|
|
43
|
-
timestamp: Date;
|
|
30
|
+
results: Array<IFoodNames>;
|
|
44
31
|
}
|
|
45
|
-
type
|
|
46
|
-
interface
|
|
32
|
+
type IAddFoodRequest = IFoodItems & IFoodNames;
|
|
33
|
+
interface IFoodTransactions {
|
|
47
34
|
id: string;
|
|
48
35
|
foodItemsId: string;
|
|
49
36
|
grams: number;
|
|
50
37
|
timestamp: Date;
|
|
38
|
+
logbookId: string;
|
|
51
39
|
}
|
|
52
40
|
interface IFoodFavorites {
|
|
53
41
|
id: string;
|
|
54
42
|
foodItemsId: string;
|
|
55
|
-
|
|
56
|
-
mealType: Enums.MealType;
|
|
43
|
+
timespan: Date;
|
|
57
44
|
}
|
|
58
45
|
interface IFoodItems {
|
|
59
46
|
id: string;
|
|
60
47
|
userId: string;
|
|
61
|
-
|
|
48
|
+
energy: number;
|
|
62
49
|
carbohydrates: number;
|
|
63
|
-
|
|
64
|
-
|
|
50
|
+
protein: number;
|
|
51
|
+
sugar: number;
|
|
65
52
|
fibers: number;
|
|
66
|
-
|
|
67
|
-
|
|
53
|
+
fat: number;
|
|
54
|
+
saturatedFat: number;
|
|
68
55
|
}
|
|
69
56
|
interface IFoodNames {
|
|
70
57
|
id: string;
|
|
@@ -5,13 +5,13 @@ var FoodService;
|
|
|
5
5
|
(function (FoodService) {
|
|
6
6
|
let Enums;
|
|
7
7
|
(function (Enums) {
|
|
8
|
-
let
|
|
9
|
-
(function (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
})(
|
|
8
|
+
let Timespans;
|
|
9
|
+
(function (Timespans) {
|
|
10
|
+
Timespans["Breakfast"] = "breakfast";
|
|
11
|
+
Timespans["Lunch"] = "lunch";
|
|
12
|
+
Timespans["Dinner"] = "dinner";
|
|
13
|
+
Timespans["Night"] = "night";
|
|
14
|
+
})(Timespans = Enums.Timespans || (Enums.Timespans = {}));
|
|
15
15
|
})(Enums = FoodService.Enums || (FoodService.Enums = {}));
|
|
16
16
|
})(FoodService = exports.FoodService || (exports.FoodService = {}));
|
|
17
17
|
//# sourceMappingURL=food.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"food.js","sourceRoot":"","sources":["../../../../types/services/rpc/food.ts"],"names":[],"mappings":";;;AAGA,IAAiB,WAAW,
|
|
1
|
+
{"version":3,"file":"food.js","sourceRoot":"","sources":["../../../../types/services/rpc/food.ts"],"names":[],"mappings":";;;AAGA,IAAiB,WAAW,CAyE3B;AAzED,WAAiB,WAAW;IAC3B,IAAiB,KAAK,CAOrB;IAPD,WAAiB,KAAK;QACrB,IAAY,SAKX;QALD,WAAY,SAAS;YACpB,oCAAuB,CAAA;YACvB,4BAAe,CAAA;YACf,8BAAiB,CAAA;YACjB,4BAAe,CAAA;QAChB,CAAC,EALW,SAAS,GAAT,eAAS,KAAT,eAAS,QAKpB;IACF,CAAC,EAPgB,KAAK,GAAL,iBAAK,KAAL,iBAAK,QAOrB;AAiEF,CAAC,EAzEgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAyE3B"}
|