@hedia/types 2.1.63-alpha.1 → 2.1.63-alpha.10

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.
@@ -5,7 +5,6 @@ export * from "./logbook/logbook";
5
5
  export * from "./services/outbound/email";
6
6
  export * from "./services/outbound/notification";
7
7
  export * from "./services/rpc/auth";
8
- export * from "./services/rpc/food";
9
8
  export * from "./services/rpc/logbook";
10
9
  export * from "./services/events/logbook";
11
10
  export * from "./userdetails/userdetails";
@@ -17,7 +17,6 @@ __exportStar(require("./logbook/logbook"), exports);
17
17
  __exportStar(require("./services/outbound/email"), exports);
18
18
  __exportStar(require("./services/outbound/notification"), exports);
19
19
  __exportStar(require("./services/rpc/auth"), exports);
20
- __exportStar(require("./services/rpc/food"), exports);
21
20
  __exportStar(require("./services/rpc/logbook"), exports);
22
21
  __exportStar(require("./services/events/logbook"), exports);
23
22
  __exportStar(require("./userdetails/userdetails"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,oEAAkD;AAClD,4CAA0B;AAC1B,oDAAkC;AAClC,4DAA0C;AAC1C,mEAAiD;AACjD,sDAAoC;AACpC,sDAAoC;AACpC,yDAAuC;AACvC,4DAA0C;AAC1C,4DAA0C;AAC1C,8DAA4C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,oEAAkD;AAClD,4CAA0B;AAC1B,oDAAkC;AAClC,4DAA0C;AAC1C,mEAAiD;AACjD,sDAAoC;AACpC,yDAAuC;AACvC,4DAA0C;AAC1C,4DAA0C;AAC1C,8DAA4C"}
@@ -1,17 +1,19 @@
1
1
  export declare namespace AuthService {
2
2
  namespace Types {
3
3
  interface IAuthRequest {
4
- token: string;
4
+ refreshToken: string;
5
+ }
6
+ interface IAuthResponse {
7
+ refreshToken: string;
8
+ accessToken: string;
9
+ message?: string;
5
10
  }
6
11
  interface ILoginRequest {
7
12
  email: string;
8
13
  password: string;
9
14
  }
10
- interface ILoginResponse {
11
- token: string;
12
- message?: string;
13
- }
15
+ type ILoginResponse = IAuthResponse;
14
16
  type IRegisterRequest = ILoginRequest;
15
- type IRegisterResponse = ILoginResponse;
17
+ type IRegisterResponse = IAuthResponse;
16
18
  }
17
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedia/types",
3
- "version": "2.1.63-alpha.1",
3
+ "version": "2.1.63-alpha.10",
4
4
  "description": "Enums, interfaces, and other common types for use in Hedia's software.",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
@@ -1,66 +0,0 @@
1
- import { Languages } from "../../enums";
2
- import { IRpcRoute } from "../../types";
3
- export declare namespace FoodService {
4
- namespace Enums {
5
- enum Timespans {
6
- Breakfast = "breakfast",
7
- Lunch = "lunch",
8
- Dinner = "dinner",
9
- Night = "night"
10
- }
11
- }
12
- namespace RPC {
13
- namespace SearchFood {
14
- type Get = IRpcRoute<Types.IFoodSearchRequest, Types.IFoodSearchResponse>;
15
- }
16
- namespace AddFood {
17
- type Post = IRpcRoute<Types.IAddFoodRequest, {}>;
18
- }
19
- namespace FavoriteFood {
20
- type Post = IRpcRoute<{}, {}>;
21
- }
22
- namespace RecentFood { }
23
- }
24
- namespace Types {
25
- interface IFoodSearchRequest {
26
- language: Languages;
27
- text: string;
28
- }
29
- interface IFoodSearchResponse {
30
- results: Array<IFoodNames>;
31
- }
32
- type IAddFoodRequest = IFoodItems & IFoodNames;
33
- interface IFoodTransactions {
34
- id: string;
35
- foodItemsId: number;
36
- grams: number;
37
- timestamp: Date;
38
- logbookId: number;
39
- }
40
- interface IFoodFavorites {
41
- id: string;
42
- foodItemsId: number;
43
- timespan: Date;
44
- }
45
- interface IFoodItems {
46
- id: string;
47
- userId: number;
48
- energy: number;
49
- carbohydrates: number;
50
- protein: number;
51
- sugar: number;
52
- fibers: number;
53
- fat: number;
54
- saturatedFat: number;
55
- }
56
- interface IFoodNames {
57
- id: string;
58
- foodItemsId: number;
59
- title: string;
60
- keyword: string;
61
- description: string;
62
- language: keyof Languages;
63
- ts?: unknown;
64
- }
65
- }
66
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FoodService = void 0;
4
- var FoodService;
5
- (function (FoodService) {
6
- let Enums;
7
- (function (Enums) {
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
- })(Enums = FoodService.Enums || (FoodService.Enums = {}));
16
- })(FoodService = exports.FoodService || (exports.FoodService = {}));
17
- //# sourceMappingURL=food.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"food.js","sourceRoot":"","sources":["../../../../types/services/rpc/food.ts"],"names":[],"mappings":";;;AAGA,IAAiB,WAAW,CA0E3B;AA1ED,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;AAkEF,CAAC,EA1EgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QA0E3B"}
@@ -1,4 +0,0 @@
1
- export interface IRpcRoute<Request, Response> {
2
- Request: Request;
3
- Response: Response;
4
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../types/types.ts"],"names":[],"mappings":""}