@otters.ai/common-backend 1.0.63 → 1.0.65

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.
@@ -3,3 +3,8 @@ export declare enum ActivitiesEnum {
3
3
  REVENUE = "REVENUE",
4
4
  NUMBER = "NUMBER"
5
5
  }
6
+ export declare enum ActivityType {
7
+ TrueFalse = 0,
8
+ Number = 1,
9
+ Currency = 2
10
+ }
@@ -1,9 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActivitiesEnum = void 0;
3
+ exports.ActivityType = exports.ActivitiesEnum = void 0;
4
4
  var ActivitiesEnum;
5
5
  (function (ActivitiesEnum) {
6
6
  ActivitiesEnum["TASK"] = "TASK";
7
7
  ActivitiesEnum["REVENUE"] = "REVENUE";
8
8
  ActivitiesEnum["NUMBER"] = "NUMBER";
9
9
  })(ActivitiesEnum || (exports.ActivitiesEnum = ActivitiesEnum = {}));
10
+ var ActivityType;
11
+ (function (ActivityType) {
12
+ ActivityType[ActivityType["TrueFalse"] = 0] = "TrueFalse";
13
+ ActivityType[ActivityType["Number"] = 1] = "Number";
14
+ ActivityType[ActivityType["Currency"] = 2] = "Currency";
15
+ })(ActivityType || (exports.ActivityType = ActivityType = {}));
@@ -9,5 +9,6 @@ export declare enum Subjects {
9
9
  DefaultGoalCreated = "defaultGoal:created",
10
10
  GoalCreated = "goal:created",
11
11
  UserCreated = "user:created",
12
- ActivityCreated = "activity:created"
12
+ ActivityCreated = "activity:created",
13
+ ActivityUpdated = "activity:updated"
13
14
  }
@@ -15,5 +15,7 @@ var Subjects;
15
15
  Subjects["GoalCreated"] = "goal:created";
16
16
  // User...
17
17
  Subjects["UserCreated"] = "user:created";
18
+ // Activity...
18
19
  Subjects["ActivityCreated"] = "activity:created";
20
+ Subjects["ActivityUpdated"] = "activity:updated";
19
21
  })(Subjects || (exports.Subjects = Subjects = {}));
@@ -2,6 +2,7 @@ import { ActivityStatus } from "../../enum";
2
2
  import { ActivityStatusHistory } from "./activityStatusHistoryStruct";
3
3
  export interface ActivityCommonStruct {
4
4
  id?: string;
5
+ name: string;
5
6
  activityId: string;
6
7
  goalId: string;
7
8
  mapId: string;
@@ -1,15 +1,6 @@
1
1
  import { Subjects } from "../../enum";
2
- import { ActivityStatusHistory } from "./activityStatusHistoryStruct";
2
+ import { ActivityCommonCreationEntryStruct } from "./activityCommonStruct";
3
3
  export interface ActivityCreatedStruct {
4
4
  subject: Subjects.ActivityCreated;
5
- data: {
6
- activityId: string;
7
- goalId: string;
8
- mapId: string;
9
- status: string;
10
- currentValue: number;
11
- targetValue: number;
12
- progress: number;
13
- statusHistory: ActivityStatusHistory[];
14
- };
5
+ data: ActivityCommonCreationEntryStruct;
15
6
  }
@@ -0,0 +1,6 @@
1
+ import { Subjects } from "../../enum";
2
+ import { ActivityCommonCreationEntryStruct } from "./activityCommonStruct";
3
+ export interface ActivityUpdatedStruct {
4
+ subject: Subjects.ActivityUpdated;
5
+ data: ActivityCommonCreationEntryStruct;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,5 +2,8 @@ import { ActivityStatus } from "../../enum";
2
2
  import { ActivityStatusHistory } from "../activity/activityStatusHistoryStruct";
3
3
  export interface GoalActivityDetails {
4
4
  status: ActivityStatus;
5
+ name: string;
6
+ id: string;
5
7
  statusHistory: ActivityStatusHistory[];
8
+ progress: number;
6
9
  }
@@ -15,5 +15,6 @@ export * from './goal/goalActivityDetailsStruct';
15
15
  export * from './activity/activityCreatedStruct';
16
16
  export * from './activity/activityStatusHistoryStruct';
17
17
  export * from './activity/activityCommonStruct';
18
+ export * from './activity/activityUpdatedStruct';
18
19
  export * from './user/userCreated';
19
20
  export * from './user/user';
@@ -33,6 +33,7 @@ __exportStar(require("./goal/goalActivityDetailsStruct"), exports);
33
33
  __exportStar(require("./activity/activityCreatedStruct"), exports);
34
34
  __exportStar(require("./activity/activityStatusHistoryStruct"), exports);
35
35
  __exportStar(require("./activity/activityCommonStruct"), exports);
36
+ __exportStar(require("./activity/activityUpdatedStruct"), exports);
36
37
  // user...
37
38
  __exportStar(require("./user/userCreated"), exports);
38
39
  __exportStar(require("./user/user"), exports);
@@ -8,7 +8,7 @@ export interface IUser {
8
8
  isAdmin: boolean;
9
9
  token: string;
10
10
  tempToken: string;
11
- planTypeId: string;
11
+ planTypeId: number;
12
12
  planExpiryDate: string;
13
13
  stripeSubId: string;
14
14
  invitedBy: string;
@@ -30,4 +30,5 @@ export interface AllUsersRespStruct {
30
30
  firstName: string;
31
31
  lastName: string;
32
32
  email: string;
33
+ companyDetails: BaseStruct;
33
34
  }
@@ -21,10 +21,10 @@ const checkToken = (sessionLogService, req, res, next) => __awaiter(void 0, void
21
21
  const authHeader = req.get('Authorization');
22
22
  const token = authHeader && authHeader.toString().split(' ')[1];
23
23
  if (!token) {
24
- return res.status(200).json({ success: false, result: { error: "Token not found." } });
24
+ return res.status(200).json({ success: false, message: "Token not found." });
25
25
  }
26
26
  if (!req.headers['sessionid']) {
27
- return res.status(200).json({ success: false, result: { error: "Session Id not found." } });
27
+ return res.status(200).json({ success: false, message: "Session Id not found." });
28
28
  }
29
29
  let result = yield sessionLogService
30
30
  .findEntry({ sessionId: req.headers['sessionid'].toString() });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otters.ai/common-backend",
3
- "version": "1.0.63",
3
+ "version": "1.0.65",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",