@otters.ai/common-backend 1.0.35 → 1.0.37

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,5 +2,6 @@ export declare enum Subjects {
2
2
  SessionLogCreated = "sessionLog:created",
3
3
  SessionLogUpdated = "sessionLog:updated",
4
4
  PartnerLeadContactCreated = "partnerLeadContact:created",
5
- PartnerLeadContactUpdated = "partnerLeadContact:updated"
5
+ PartnerLeadContactUpdated = "partnerLeadContact:updated",
6
+ SignUpCompanyCreated = "signUpCompany:created"
6
7
  }
@@ -7,4 +7,5 @@ var Subjects;
7
7
  Subjects["SessionLogUpdated"] = "sessionLog:updated";
8
8
  Subjects["PartnerLeadContactCreated"] = "partnerLeadContact:created";
9
9
  Subjects["PartnerLeadContactUpdated"] = "partnerLeadContact:updated";
10
+ Subjects["SignUpCompanyCreated"] = "signUpCompany:created";
10
11
  })(Subjects || (exports.Subjects = Subjects = {}));
@@ -4,3 +4,5 @@ export * from './sessionLogStruct';
4
4
  export * from './tokenDataStruct';
5
5
  export * from './contactStruct';
6
6
  export * from './partnerLeadContactCreatedStruct';
7
+ export * from './signUpCompany/signUpCompanyStruct';
8
+ export * from './signUpCompany/signUpCompanyCreatedStruct';
@@ -20,3 +20,5 @@ __exportStar(require("./sessionLogStruct"), exports);
20
20
  __exportStar(require("./tokenDataStruct"), exports);
21
21
  __exportStar(require("./contactStruct"), exports);
22
22
  __exportStar(require("./partnerLeadContactCreatedStruct"), exports);
23
+ __exportStar(require("./signUpCompany/signUpCompanyStruct"), exports);
24
+ __exportStar(require("./signUpCompany/signUpCompanyCreatedStruct"), exports);
@@ -0,0 +1,6 @@
1
+ import { Subjects } from "../../enum";
2
+ import { SignUpCompanyStruct } from "./signUpCompanyStruct";
3
+ export interface SignUpCompanyCreatedStruct {
4
+ subject: Subjects.SignUpCompanyCreated;
5
+ data: SignUpCompanyStruct;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface SignUpCompanyStruct {
2
+ name: string;
3
+ userId: string;
4
+ domain: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -34,7 +34,7 @@ const checkToken = (sessionLogService, req, res, next) => __awaiter(void 0, void
34
34
  token: token
35
35
  });
36
36
  if (!verifyToken.flag) {
37
- return res.status(200).json({ success: false, result: { message: verifyToken.message } });
37
+ return res.status(200).json({ success: false, message: verifyToken.message });
38
38
  }
39
39
  if (typeof verifyToken.message === "object") {
40
40
  req['userEmail'] = verifyToken.message.email;
@@ -43,7 +43,7 @@ const checkToken = (sessionLogService, req, res, next) => __awaiter(void 0, void
43
43
  next();
44
44
  }
45
45
  else {
46
- return res.status(200).json({ success: false, result: { message: result.message } });
46
+ return res.status(200).json({ success: false, message: result.message });
47
47
  }
48
48
  }
49
49
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@otters.ai/common-backend",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",