@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.
- package/build/enum/activities.d.ts +5 -0
- package/build/enum/activities.js +7 -1
- package/build/enum/subjects.d.ts +2 -1
- package/build/enum/subjects.js +2 -0
- package/build/interface/activity/activityCommonStruct.d.ts +1 -0
- package/build/interface/activity/activityCreatedStruct.d.ts +2 -11
- package/build/interface/activity/activityUpdatedStruct.d.ts +6 -0
- package/build/interface/activity/activityUpdatedStruct.js +2 -0
- package/build/interface/goal/goalActivityDetailsStruct.d.ts +3 -0
- package/build/interface/index.d.ts +1 -0
- package/build/interface/index.js +1 -0
- package/build/interface/user/user.d.ts +2 -1
- package/build/middleware/checkToken.js +2 -2
- package/package.json +1 -1
package/build/enum/activities.js
CHANGED
|
@@ -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 = {}));
|
package/build/enum/subjects.d.ts
CHANGED
|
@@ -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
|
}
|
package/build/enum/subjects.js
CHANGED
|
@@ -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 = {}));
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { Subjects } from "../../enum";
|
|
2
|
-
import {
|
|
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
|
}
|
|
@@ -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';
|
package/build/interface/index.js
CHANGED
|
@@ -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:
|
|
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,
|
|
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,
|
|
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() });
|