@rufous/aem 1.1.66 → 1.1.68

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.
Files changed (96) hide show
  1. package/build/errors/bad-request-error.js +3 -1
  2. package/build/errors/custom-error.js +3 -1
  3. package/build/errors/database-connection-error.js +3 -1
  4. package/build/errors/internal-server-error.js +3 -1
  5. package/build/errors/not-authorized-error.js +3 -1
  6. package/build/errors/not-found-error.js +3 -1
  7. package/build/errors/not-verified-error.js +3 -1
  8. package/build/errors/permission-denied-error.js +3 -1
  9. package/build/errors/request-validation-error.js +3 -1
  10. package/build/errors/security-error.js +3 -1
  11. package/build/events/base-listener.js +1 -1
  12. package/build/events/subjects.js +1 -1
  13. package/build/index.js +6 -2
  14. package/build/middlewares/current-user.js +2 -1
  15. package/build/middlewares/error-handler.js +2 -1
  16. package/build/middlewares/require-auth.js +2 -1
  17. package/build/middlewares/require-candidate-auth.js +2 -1
  18. package/build/middlewares/require-company-employee-auth.js +2 -1
  19. package/build/middlewares/require-company-employee-manager-auth.js +2 -1
  20. package/build/middlewares/require-company-manager-auth.js +2 -1
  21. package/build/middlewares/require-company-or-candidate-auth.js +2 -1
  22. package/build/middlewares/require-company-superuser-auth.js +2 -1
  23. package/build/middlewares/require-customer-support-auth.js +2 -1
  24. package/build/middlewares/require-partner-candidate-auth.js +2 -1
  25. package/build/middlewares/require-partner-employee-auth.js +2 -1
  26. package/build/middlewares/require-partner-employee-manager-auth.js +2 -1
  27. package/build/middlewares/require-partner-manager-auth.js +2 -1
  28. package/build/middlewares/require-partner-or-candidate-auth.js +2 -1
  29. package/build/middlewares/require-partner-superuser-auth.js +2 -1
  30. package/build/middlewares/require-superadmin-auth.js +2 -1
  31. package/build/middlewares/require-superadmin-or-candidate-auth.js +2 -1
  32. package/build/middlewares/require-superadmin-or-company-auth.js +2 -1
  33. package/build/middlewares/require-superadmin-or-partner-auth.js +2 -1
  34. package/build/middlewares/required-permissions.js +5 -4
  35. package/build/middlewares/validate-request.js +3 -2
  36. package/build/types/access-level.js +1 -1
  37. package/build/types/agreement-status.js +1 -1
  38. package/build/types/agreement-type.js +1 -1
  39. package/build/types/agreement-user-type.js +1 -1
  40. package/build/types/app-type.js +1 -1
  41. package/build/types/asset-allocation-status.js +1 -1
  42. package/build/types/asset-status.js +1 -1
  43. package/build/types/bank-account-type.js +1 -1
  44. package/build/types/candidate-states.js +1 -1
  45. package/build/types/candidate-status.js +1 -1
  46. package/build/types/chat-group-action-type.js +1 -1
  47. package/build/types/chat-message-status.js +1 -1
  48. package/build/types/chat-message-type.js +1 -1
  49. package/build/types/company-states.js +1 -1
  50. package/build/types/company-status.js +1 -1
  51. package/build/types/company-type.js +1 -1
  52. package/build/types/country-type.js +1 -1
  53. package/build/types/currency-type.js +1 -1
  54. package/build/types/current-slot-status.js +1 -1
  55. package/build/types/device-push-type.js +1 -1
  56. package/build/types/device-type.js +1 -1
  57. package/build/types/document-status.js +1 -1
  58. package/build/types/education-type.js +1 -1
  59. package/build/types/email-delivery-type.js +1 -1
  60. package/build/types/email-template.js +1 -1
  61. package/build/types/email-type.js +1 -1
  62. package/build/types/employment-type.js +1 -1
  63. package/build/types/file-type.js +1 -1
  64. package/build/types/gender-type.js +1 -1
  65. package/build/types/invite-status.js +1 -1
  66. package/build/types/job-application-initiated-by.js +1 -1
  67. package/build/types/job-application-state.d.ts +2 -1
  68. package/build/types/job-application-state.js +2 -1
  69. package/build/types/job-status.js +1 -1
  70. package/build/types/kyc-status.js +1 -1
  71. package/build/types/notification-type.js +1 -1
  72. package/build/types/order-status.d.ts +4 -1
  73. package/build/types/order-status.js +4 -1
  74. package/build/types/order-type.js +1 -1
  75. package/build/types/otp-status.js +1 -1
  76. package/build/types/otp-type.js +1 -1
  77. package/build/types/partner-states.js +1 -1
  78. package/build/types/partner-status.js +1 -1
  79. package/build/types/partner-type.js +1 -1
  80. package/build/types/payment-status.js +1 -1
  81. package/build/types/payment-type.js +1 -1
  82. package/build/types/profile-type.js +1 -1
  83. package/build/types/project-status.js +1 -1
  84. package/build/types/razorpay-account-status.js +1 -1
  85. package/build/types/resume-status.js +1 -1
  86. package/build/types/service-type.js +1 -1
  87. package/build/types/sms-template.js +1 -1
  88. package/build/types/sms-type.js +1 -1
  89. package/build/types/task-status.js +1 -1
  90. package/build/types/timesheet-payment-status.js +1 -1
  91. package/build/types/timesheet-status.js +1 -1
  92. package/build/types/user-status.js +1 -1
  93. package/build/types/user-type.d.ts +4 -4
  94. package/build/types/user-type.js +1 -1
  95. package/build/types/work-states.js +1 -1
  96. package/package.json +3 -3
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -3,10 +3,12 @@ var __extends = (this && this.__extends) || (function () {
3
3
  var extendStatics = function (d, b) {
4
4
  extendStatics = Object.setPrototypeOf ||
5
5
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
10
12
  extendStatics(d, b);
11
13
  function __() { this.constructor = d; }
12
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -18,7 +18,7 @@ var Listener = /** @class */ (function () {
18
18
  var _this = this;
19
19
  var subscription = this.client.subscribe(this.subject, this.queueGroupName, this.subscriptionOptions());
20
20
  subscription.on('message', function (msg) {
21
- console.log("Message received: " + _this.subject + " / " + _this.queueGroupName);
21
+ console.log("Message received: ".concat(_this.subject, " / ").concat(_this.queueGroupName));
22
22
  var parsedData = _this.parseMessage(msg);
23
23
  _this.onMessage(parsedData, msg);
24
24
  });
@@ -117,4 +117,4 @@ var Subjects;
117
117
  Subjects["UsersLeavesCalculation"] = "users:leaves:calculation";
118
118
  Subjects["UpdateFirebaseWorkitems"] = "update:firebase:workitems";
119
119
  Subjects["WorkitemCreatedOrUpdated"] = "workitem:created:or:updated";
120
- })(Subjects = exports.Subjects || (exports.Subjects = {}));
120
+ })(Subjects || (exports.Subjects = Subjects = {}));
package/build/index.js CHANGED
@@ -1,13 +1,17 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
8
12
  }));
9
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  // Re-export stuff from errors and middlewares
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.currentUser = void 0;
7
7
  var jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
8
- exports.currentUser = function (req, res, next) {
8
+ var currentUser = function (req, res, next) {
9
9
  var _a, _b, _c, _d;
10
10
  if (!((_a = req.session) === null || _a === void 0 ? void 0 : _a.jwt)) {
11
11
  var noToken = false;
@@ -33,3 +33,4 @@ exports.currentUser = function (req, res, next) {
33
33
  catch (err) { }
34
34
  next();
35
35
  };
36
+ exports.currentUser = currentUser;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.errorHandler = void 0;
4
4
  var custom_error_1 = require("../errors/custom-error");
5
- exports.errorHandler = function (err, req, res, next) {
5
+ var errorHandler = function (err, req, res, next) {
6
6
  if (err instanceof custom_error_1.CustomError) {
7
7
  return res.status(err.statusCode).send({ errors: err.serializeErrors() });
8
8
  }
@@ -11,3 +11,4 @@ exports.errorHandler = function (err, req, res, next) {
11
11
  errors: [{ message: 'Something went wrong' }]
12
12
  });
13
13
  };
14
+ exports.errorHandler = errorHandler;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.requireAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_status_1 = require("../types/user-status");
6
- exports.requireAuth = function (req, res, next) {
6
+ var requireAuth = function (req, res, next) {
7
7
  if (!req.currentUser) {
8
8
  throw new not_authorized_error_1.NotAuthorizedError();
9
9
  }
@@ -12,3 +12,4 @@ exports.requireAuth = function (req, res, next) {
12
12
  }
13
13
  next();
14
14
  };
15
+ exports.requireAuth = requireAuth;
@@ -4,7 +4,7 @@ exports.requireCandidateAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireCandidateAuth = function (req, res, next) {
7
+ var requireCandidateAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -17,3 +17,4 @@ exports.requireCandidateAuth = function (req, res, next) {
17
17
  }
18
18
  next();
19
19
  };
20
+ exports.requireCandidateAuth = requireCandidateAuth;
@@ -4,7 +4,7 @@ exports.requireCompanyEmployeeAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireCompanyEmployeeAuth = function (req, res, next) {
7
+ var requireCompanyEmployeeAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -20,3 +20,4 @@ exports.requireCompanyEmployeeAuth = function (req, res, next) {
20
20
  }
21
21
  next();
22
22
  };
23
+ exports.requireCompanyEmployeeAuth = requireCompanyEmployeeAuth;
@@ -4,7 +4,7 @@ exports.requireCompanyEmployeeAdminAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireCompanyEmployeeAdminAuth = function (req, res, next) {
7
+ var requireCompanyEmployeeAdminAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -17,3 +17,4 @@ exports.requireCompanyEmployeeAdminAuth = function (req, res, next) {
17
17
  }
18
18
  next();
19
19
  };
20
+ exports.requireCompanyEmployeeAdminAuth = requireCompanyEmployeeAdminAuth;
@@ -4,7 +4,7 @@ exports.requireCompanyManagerAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireCompanyManagerAuth = function (req, res, next) {
7
+ var requireCompanyManagerAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -17,3 +17,4 @@ exports.requireCompanyManagerAuth = function (req, res, next) {
17
17
  }
18
18
  next();
19
19
  };
20
+ exports.requireCompanyManagerAuth = requireCompanyManagerAuth;
@@ -4,7 +4,7 @@ exports.requireCompanyOrCandidateAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireCompanyOrCandidateAuth = function (req, res, next) {
7
+ var requireCompanyOrCandidateAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -21,3 +21,4 @@ exports.requireCompanyOrCandidateAuth = function (req, res, next) {
21
21
  }
22
22
  next();
23
23
  };
24
+ exports.requireCompanyOrCandidateAuth = requireCompanyOrCandidateAuth;
@@ -4,7 +4,7 @@ exports.requireCompanySuperuserAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireCompanySuperuserAuth = function (req, res, next) {
7
+ var requireCompanySuperuserAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -17,3 +17,4 @@ exports.requireCompanySuperuserAuth = function (req, res, next) {
17
17
  }
18
18
  next();
19
19
  };
20
+ exports.requireCompanySuperuserAuth = requireCompanySuperuserAuth;
@@ -4,7 +4,7 @@ exports.requireCustomerSupportAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireCustomerSupportAuth = function (req, res, next) {
7
+ var requireCustomerSupportAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -16,3 +16,4 @@ exports.requireCustomerSupportAuth = function (req, res, next) {
16
16
  }
17
17
  next();
18
18
  };
19
+ exports.requireCustomerSupportAuth = requireCustomerSupportAuth;
@@ -4,7 +4,7 @@ exports.requirePartnerCandidateAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requirePartnerCandidateAuth = function (req, res, next) {
7
+ var requirePartnerCandidateAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -21,3 +21,4 @@ exports.requirePartnerCandidateAuth = function (req, res, next) {
21
21
  }
22
22
  next();
23
23
  };
24
+ exports.requirePartnerCandidateAuth = requirePartnerCandidateAuth;
@@ -4,7 +4,7 @@ exports.requirePartnerEmployeeAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requirePartnerEmployeeAuth = function (req, res, next) {
7
+ var requirePartnerEmployeeAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -20,3 +20,4 @@ exports.requirePartnerEmployeeAuth = function (req, res, next) {
20
20
  }
21
21
  next();
22
22
  };
23
+ exports.requirePartnerEmployeeAuth = requirePartnerEmployeeAuth;
@@ -4,7 +4,7 @@ exports.requirePartnerEmployeeAdminAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requirePartnerEmployeeAdminAuth = function (req, res, next) {
7
+ var requirePartnerEmployeeAdminAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -17,3 +17,4 @@ exports.requirePartnerEmployeeAdminAuth = function (req, res, next) {
17
17
  }
18
18
  next();
19
19
  };
20
+ exports.requirePartnerEmployeeAdminAuth = requirePartnerEmployeeAdminAuth;
@@ -4,7 +4,7 @@ exports.requirePartnerManagerAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requirePartnerManagerAuth = function (req, res, next) {
7
+ var requirePartnerManagerAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -17,3 +17,4 @@ exports.requirePartnerManagerAuth = function (req, res, next) {
17
17
  }
18
18
  next();
19
19
  };
20
+ exports.requirePartnerManagerAuth = requirePartnerManagerAuth;
@@ -4,7 +4,7 @@ exports.requirePartnerOrCandidateAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requirePartnerOrCandidateAuth = function (req, res, next) {
7
+ var requirePartnerOrCandidateAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -22,3 +22,4 @@ exports.requirePartnerOrCandidateAuth = function (req, res, next) {
22
22
  }
23
23
  next();
24
24
  };
25
+ exports.requirePartnerOrCandidateAuth = requirePartnerOrCandidateAuth;
@@ -4,7 +4,7 @@ exports.requirePartnerSuperuserAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requirePartnerSuperuserAuth = function (req, res, next) {
7
+ var requirePartnerSuperuserAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -17,3 +17,4 @@ exports.requirePartnerSuperuserAuth = function (req, res, next) {
17
17
  }
18
18
  next();
19
19
  };
20
+ exports.requirePartnerSuperuserAuth = requirePartnerSuperuserAuth;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.requireSuperAdminAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
- exports.requireSuperAdminAuth = function (req, res, next) {
6
+ var requireSuperAdminAuth = function (req, res, next) {
7
7
  if (!req.currentUser) {
8
8
  throw new not_authorized_error_1.NotAuthorizedError();
9
9
  }
@@ -12,3 +12,4 @@ exports.requireSuperAdminAuth = function (req, res, next) {
12
12
  }
13
13
  next();
14
14
  };
15
+ exports.requireSuperAdminAuth = requireSuperAdminAuth;
@@ -4,7 +4,7 @@ exports.requireSuperAdminOrCandidateAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireSuperAdminOrCandidateAuth = function (req, res, next) {
7
+ var requireSuperAdminOrCandidateAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -18,3 +18,4 @@ exports.requireSuperAdminOrCandidateAuth = function (req, res, next) {
18
18
  }
19
19
  next();
20
20
  };
21
+ exports.requireSuperAdminOrCandidateAuth = requireSuperAdminOrCandidateAuth;
@@ -4,7 +4,7 @@ exports.requireSuperAdminOrCompanyAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireSuperAdminOrCompanyAuth = function (req, res, next) {
7
+ var requireSuperAdminOrCompanyAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -22,3 +22,4 @@ exports.requireSuperAdminOrCompanyAuth = function (req, res, next) {
22
22
  }
23
23
  next();
24
24
  };
25
+ exports.requireSuperAdminOrCompanyAuth = requireSuperAdminOrCompanyAuth;
@@ -4,7 +4,7 @@ exports.requireSuperAdminOrPartnerAuth = void 0;
4
4
  var not_authorized_error_1 = require("../errors/not-authorized-error");
5
5
  var user_type_1 = require("../types/user-type");
6
6
  var user_status_1 = require("../types/user-status");
7
- exports.requireSuperAdminOrPartnerAuth = function (req, res, next) {
7
+ var requireSuperAdminOrPartnerAuth = function (req, res, next) {
8
8
  if (!req.currentUser) {
9
9
  throw new not_authorized_error_1.NotAuthorizedError();
10
10
  }
@@ -23,3 +23,4 @@ exports.requireSuperAdminOrPartnerAuth = function (req, res, next) {
23
23
  }
24
24
  next();
25
25
  };
26
+ exports.requireSuperAdminOrPartnerAuth = requireSuperAdminOrPartnerAuth;
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -44,7 +44,7 @@ var not_authorized_error_1 = require("../errors/not-authorized-error");
44
44
  var user_status_1 = require("../types/user-status");
45
45
  var mongoose_1 = __importDefault(require("mongoose"));
46
46
  var permission_denied_error_1 = require("../errors/permission-denied-error");
47
- exports.requirePermissions = function (accessType, permissionType, userModel, permissionsModel) {
47
+ var requirePermissions = function (accessType, permissionType, userModel, permissionsModel) {
48
48
  return function (req, res, next) { return __awaiter(void 0, void 0, void 0, function () {
49
49
  var user, userDetails, ispermExist, roles, permissions, permissionsArr;
50
50
  return __generator(this, function (_a) {
@@ -91,3 +91,4 @@ exports.requirePermissions = function (accessType, permissionType, userModel, pe
91
91
  });
92
92
  }); };
93
93
  };
94
+ exports.requirePermissions = requirePermissions;
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateRequest = void 0;
4
4
  var express_validator_1 = require("express-validator");
5
5
  var request_validation_error_1 = require("../errors/request-validation-error");
6
- exports.validateRequest = function (req, res, next) {
7
- var errors = express_validator_1.validationResult(req);
6
+ var validateRequest = function (req, res, next) {
7
+ var errors = (0, express_validator_1.validationResult)(req);
8
8
  if (!errors.isEmpty()) {
9
9
  throw new request_validation_error_1.RequestValidationError(errors.array());
10
10
  }
11
11
  next();
12
12
  };
13
+ exports.validateRequest = validateRequest;
@@ -13,4 +13,4 @@ var AccessLevel;
13
13
  AccessLevel[AccessLevel["Employee"] = 19] = "Employee";
14
14
  AccessLevel[AccessLevel["Candidate"] = 9] = "Candidate";
15
15
  AccessLevel[AccessLevel["NoAccess"] = 0] = "NoAccess";
16
- })(AccessLevel = exports.AccessLevel || (exports.AccessLevel = {}));
16
+ })(AccessLevel || (exports.AccessLevel = AccessLevel = {}));
@@ -7,4 +7,4 @@ var AgreementStatus;
7
7
  AgreementStatus["rejected"] = "Rejected";
8
8
  AgreementStatus["pending"] = "Pending";
9
9
  AgreementStatus["updated"] = "Updated";
10
- })(AgreementStatus = exports.AgreementStatus || (exports.AgreementStatus = {}));
10
+ })(AgreementStatus || (exports.AgreementStatus = AgreementStatus = {}));
@@ -7,4 +7,4 @@ var AgreementType;
7
7
  AgreementType["Company"] = "Company";
8
8
  AgreementType["Partner"] = "Partner";
9
9
  AgreementType["Candidate"] = "Candidate";
10
- })(AgreementType = exports.AgreementType || (exports.AgreementType = {}));
10
+ })(AgreementType || (exports.AgreementType = AgreementType = {}));
@@ -6,4 +6,4 @@ var AgreementUserType;
6
6
  AgreementUserType["Company"] = "Company";
7
7
  AgreementUserType["Partner"] = "Partner";
8
8
  AgreementUserType["Candidate"] = "Candidate";
9
- })(AgreementUserType = exports.AgreementUserType || (exports.AgreementUserType = {}));
9
+ })(AgreementUserType || (exports.AgreementUserType = AgreementUserType = {}));
@@ -9,4 +9,4 @@ var AppType;
9
9
  AppType["Work"] = "work";
10
10
  AppType["Workspace"] = "workspace";
11
11
  AppType["Assessment"] = "assessment";
12
- })(AppType = exports.AppType || (exports.AppType = {}));
12
+ })(AppType || (exports.AppType = AppType = {}));
@@ -5,4 +5,4 @@ var AssetAllocationStatus;
5
5
  (function (AssetAllocationStatus) {
6
6
  AssetAllocationStatus["active"] = "Active";
7
7
  AssetAllocationStatus["deactive"] = "Deactive";
8
- })(AssetAllocationStatus = exports.AssetAllocationStatus || (exports.AssetAllocationStatus = {}));
8
+ })(AssetAllocationStatus || (exports.AssetAllocationStatus = AssetAllocationStatus = {}));
@@ -7,4 +7,4 @@ var AssetStatus;
7
7
  AssetStatus["nonFunctional"] = "Non Functional";
8
8
  AssetStatus["archive"] = "Archive";
9
9
  AssetStatus["notAvailable"] = "Not Available";
10
- })(AssetStatus = exports.AssetStatus || (exports.AssetStatus = {}));
10
+ })(AssetStatus || (exports.AssetStatus = AssetStatus = {}));
@@ -6,4 +6,4 @@ var BankAccountType;
6
6
  BankAccountType["CompanyAccount"] = "company-account";
7
7
  BankAccountType["SavingAccount"] = "saving-account";
8
8
  BankAccountType["Other"] = "other";
9
- })(BankAccountType = exports.BankAccountType || (exports.BankAccountType = {}));
9
+ })(BankAccountType || (exports.BankAccountType = BankAccountType = {}));
@@ -13,4 +13,4 @@ var CandidateStates;
13
13
  CandidateStates["CandidateVerifiedAndActive"] = "candidate-verified-and-active";
14
14
  CandidateStates["CandidateVerificationRejected"] = "candidate-verification-rejected";
15
15
  CandidateStates["CandidateAccountSuspended"] = "candidate-account-suspended";
16
- })(CandidateStates = exports.CandidateStates || (exports.CandidateStates = {}));
16
+ })(CandidateStates || (exports.CandidateStates = CandidateStates = {}));
@@ -15,4 +15,4 @@ var CandidateStatus;
15
15
  CandidateStatus["Inactive"] = "inactive";
16
16
  CandidateStatus["Suspended"] = "suspended";
17
17
  CandidateStatus["Deleted"] = "deleted";
18
- })(CandidateStatus = exports.CandidateStatus || (exports.CandidateStatus = {}));
18
+ })(CandidateStatus || (exports.CandidateStatus = CandidateStatus = {}));
@@ -5,4 +5,4 @@ var ChatGroupActionType;
5
5
  (function (ChatGroupActionType) {
6
6
  ChatGroupActionType["ADDCHATGROUP"] = "add:chat:group";
7
7
  ChatGroupActionType["REMOVECHATGROUP"] = "remove:chat:group";
8
- })(ChatGroupActionType = exports.ChatGroupActionType || (exports.ChatGroupActionType = {}));
8
+ })(ChatGroupActionType || (exports.ChatGroupActionType = ChatGroupActionType = {}));
@@ -7,4 +7,4 @@ var ChatMessageStatus;
7
7
  ChatMessageStatus["DELIVERED"] = "delivered";
8
8
  ChatMessageStatus["READ"] = "read";
9
9
  ChatMessageStatus["FAILED"] = "failed";
10
- })(ChatMessageStatus = exports.ChatMessageStatus || (exports.ChatMessageStatus = {}));
10
+ })(ChatMessageStatus || (exports.ChatMessageStatus = ChatMessageStatus = {}));
@@ -8,4 +8,4 @@ var ChatMessageType;
8
8
  ChatMessageType["VIDEO"] = "video";
9
9
  ChatMessageType["AUDIO"] = "audio";
10
10
  ChatMessageType["SYSTEM"] = "system";
11
- })(ChatMessageType = exports.ChatMessageType || (exports.ChatMessageType = {}));
11
+ })(ChatMessageType || (exports.ChatMessageType = ChatMessageType = {}));
@@ -13,4 +13,4 @@ var CompanyStates;
13
13
  CompanyStates["CompanyVerifiedAndActive"] = "company-verified-and-active";
14
14
  CompanyStates["CompanyVerificationRejected"] = "company-verification-rejected";
15
15
  CompanyStates["CompanyAccountSuspended"] = "company-account-suspended";
16
- })(CompanyStates = exports.CompanyStates || (exports.CompanyStates = {}));
16
+ })(CompanyStates || (exports.CompanyStates = CompanyStates = {}));
@@ -8,4 +8,4 @@ var CompanyStatus;
8
8
  CompanyStatus["Active"] = "active";
9
9
  CompanyStatus["Suspended"] = "suspended";
10
10
  CompanyStatus["Inactive"] = "inactive";
11
- })(CompanyStatus = exports.CompanyStatus || (exports.CompanyStatus = {}));
11
+ })(CompanyStatus || (exports.CompanyStatus = CompanyStatus = {}));
@@ -5,4 +5,4 @@ var CompanyType;
5
5
  (function (CompanyType) {
6
6
  CompanyType["Company"] = "company";
7
7
  CompanyType["NotApplicable"] = "not:applicable";
8
- })(CompanyType = exports.CompanyType || (exports.CompanyType = {}));
8
+ })(CompanyType || (exports.CompanyType = CompanyType = {}));
@@ -5,4 +5,4 @@ var CountryType;
5
5
  (function (CountryType) {
6
6
  CountryType["INDIA"] = "INDIA";
7
7
  CountryType["USA"] = "USA";
8
- })(CountryType = exports.CountryType || (exports.CountryType = {}));
8
+ })(CountryType || (exports.CountryType = CountryType = {}));
@@ -5,4 +5,4 @@ var CurrencyType;
5
5
  (function (CurrencyType) {
6
6
  CurrencyType["INR"] = "INR";
7
7
  CurrencyType["USD"] = "USD";
8
- })(CurrencyType = exports.CurrencyType || (exports.CurrencyType = {}));
8
+ })(CurrencyType || (exports.CurrencyType = CurrencyType = {}));
@@ -5,4 +5,4 @@ var CurrentSlotStatus;
5
5
  (function (CurrentSlotStatus) {
6
6
  CurrentSlotStatus[CurrentSlotStatus["Unallocated"] = 0] = "Unallocated";
7
7
  CurrentSlotStatus[CurrentSlotStatus["Allocated"] = 1] = "Allocated";
8
- })(CurrentSlotStatus = exports.CurrentSlotStatus || (exports.CurrentSlotStatus = {}));
8
+ })(CurrentSlotStatus || (exports.CurrentSlotStatus = CurrentSlotStatus = {}));
@@ -8,4 +8,4 @@ var DevicePushType;
8
8
  DevicePushType["WEB"] = "web";
9
9
  DevicePushType["ADM"] = "adm";
10
10
  DevicePushType["WNS"] = "wns";
11
- })(DevicePushType = exports.DevicePushType || (exports.DevicePushType = {}));
11
+ })(DevicePushType || (exports.DevicePushType = DevicePushType = {}));
@@ -7,4 +7,4 @@ var DeviceType;
7
7
  DeviceType["IOS"] = "ios";
8
8
  DeviceType["Chrome"] = "chrome";
9
9
  DeviceType["Other"] = "other";
10
- })(DeviceType = exports.DeviceType || (exports.DeviceType = {}));
10
+ })(DeviceType || (exports.DeviceType = DeviceType = {}));
@@ -5,4 +5,4 @@ var DocumentStatus;
5
5
  (function (DocumentStatus) {
6
6
  DocumentStatus["Unverified"] = "unverified";
7
7
  DocumentStatus["Verified"] = "verified";
8
- })(DocumentStatus = exports.DocumentStatus || (exports.DocumentStatus = {}));
8
+ })(DocumentStatus || (exports.DocumentStatus = DocumentStatus = {}));
@@ -6,4 +6,4 @@ var EducationType;
6
6
  EducationType["FullTime"] = "FullTime";
7
7
  EducationType["PartTime"] = "PartTime";
8
8
  EducationType["Correspondence"] = "Correspondence";
9
- })(EducationType = exports.EducationType || (exports.EducationType = {}));
9
+ })(EducationType || (exports.EducationType = EducationType = {}));
@@ -7,4 +7,4 @@ var EmailDeliveryType;
7
7
  EmailDeliveryType["BestEffort"] = "best:effort";
8
8
  EmailDeliveryType["DuringOverNightBatchJob"] = "during:overnight:batch:job";
9
9
  EmailDeliveryType["AtExactTime"] = "at:exact:time";
10
- })(EmailDeliveryType = exports.EmailDeliveryType || (exports.EmailDeliveryType = {}));
10
+ })(EmailDeliveryType || (exports.EmailDeliveryType = EmailDeliveryType = {}));
@@ -57,4 +57,4 @@ var EmailTemplate;
57
57
  EmailTemplate["WorkItemTimeLogEmail"] = "work-item-time-log-email";
58
58
  EmailTemplate["WorkItemLinkWorkItemsEmail"] = "work-item-link-work-item-email";
59
59
  EmailTemplate["WorkItemCompbinedUpdatesEmail"] = "work-item-combined-updates-email";
60
- })(EmailTemplate = exports.EmailTemplate || (exports.EmailTemplate = {}));
60
+ })(EmailTemplate || (exports.EmailTemplate = EmailTemplate = {}));
@@ -5,4 +5,4 @@ var EmailType;
5
5
  (function (EmailType) {
6
6
  EmailType["PlanText"] = "text/plain";
7
7
  EmailType["HtmlText"] = "text/html";
8
- })(EmailType = exports.EmailType || (exports.EmailType = {}));
8
+ })(EmailType || (exports.EmailType = EmailType = {}));
@@ -6,4 +6,4 @@ var EmploymentType;
6
6
  EmploymentType["Permanent"] = "Permanent";
7
7
  EmploymentType["Contract"] = "Contract";
8
8
  EmploymentType["Freelance"] = "Freelance";
9
- })(EmploymentType = exports.EmploymentType || (exports.EmploymentType = {}));
9
+ })(EmploymentType || (exports.EmploymentType = EmploymentType = {}));
@@ -6,4 +6,4 @@ var FileType;
6
6
  FileType["Image"] = "images";
7
7
  FileType["PDF"] = "pdf";
8
8
  FileType["ANY"] = "any";
9
- })(FileType = exports.FileType || (exports.FileType = {}));
9
+ })(FileType || (exports.FileType = FileType = {}));
@@ -6,4 +6,4 @@ var GenderType;
6
6
  GenderType["Male"] = "male";
7
7
  GenderType["Female"] = "female";
8
8
  GenderType["Other"] = "other";
9
- })(GenderType = exports.GenderType || (exports.GenderType = {}));
9
+ })(GenderType || (exports.GenderType = GenderType = {}));
@@ -8,4 +8,4 @@ var InviteStatus;
8
8
  InviteStatus["Accepted"] = "accepted";
9
9
  InviteStatus["Expired"] = "expired";
10
10
  InviteStatus["AwaitingResponse"] = "awaiting-response";
11
- })(InviteStatus = exports.InviteStatus || (exports.InviteStatus = {}));
11
+ })(InviteStatus || (exports.InviteStatus = InviteStatus = {}));
@@ -5,4 +5,4 @@ var ApplicationinitiatedBy;
5
5
  (function (ApplicationinitiatedBy) {
6
6
  ApplicationinitiatedBy["candidate"] = "Candidate";
7
7
  ApplicationinitiatedBy["company"] = "Company";
8
- })(ApplicationinitiatedBy = exports.ApplicationinitiatedBy || (exports.ApplicationinitiatedBy = {}));
8
+ })(ApplicationinitiatedBy || (exports.ApplicationinitiatedBy = ApplicationinitiatedBy = {}));
@@ -14,5 +14,6 @@ export declare enum JobApplicationState {
14
14
  onboarded = "Onboarded",
15
15
  contractEndRequest = "ContractEndRequest",
16
16
  contractEndAccepted = "ContractEndAccepted",
17
- contractEnded = "ContractEnded"
17
+ contractEnded = "ContractEnded",
18
+ evaluationTest = "EvaluationTest"
18
19
  }
@@ -19,4 +19,5 @@ var JobApplicationState;
19
19
  JobApplicationState["contractEndRequest"] = "ContractEndRequest";
20
20
  JobApplicationState["contractEndAccepted"] = "ContractEndAccepted";
21
21
  JobApplicationState["contractEnded"] = "ContractEnded";
22
- })(JobApplicationState = exports.JobApplicationState || (exports.JobApplicationState = {}));
22
+ JobApplicationState["evaluationTest"] = "EvaluationTest";
23
+ })(JobApplicationState || (exports.JobApplicationState = JobApplicationState = {}));
@@ -6,4 +6,4 @@ var JobStatus;
6
6
  JobStatus["Open"] = "Open";
7
7
  JobStatus["closed"] = "closed";
8
8
  JobStatus["deleted"] = "deleted";
9
- })(JobStatus = exports.JobStatus || (exports.JobStatus = {}));
9
+ })(JobStatus || (exports.JobStatus = JobStatus = {}));
@@ -5,4 +5,4 @@ var KYCStatus;
5
5
  (function (KYCStatus) {
6
6
  KYCStatus["Unverified"] = "unverified";
7
7
  KYCStatus["Verified"] = "verified";
8
- })(KYCStatus = exports.KYCStatus || (exports.KYCStatus = {}));
8
+ })(KYCStatus || (exports.KYCStatus = KYCStatus = {}));
@@ -7,4 +7,4 @@ var NotificationType;
7
7
  NotificationType["Multicast"] = "multicast";
8
8
  NotificationType["Broadcast"] = "broadcast";
9
9
  NotificationType["VideoCall"] = "videoCall";
10
- })(NotificationType = exports.NotificationType || (exports.NotificationType = {}));
10
+ })(NotificationType || (exports.NotificationType = NotificationType = {}));
@@ -3,5 +3,8 @@ export declare enum OrderStatus {
3
3
  Cancelled = "cancelled",
4
4
  PaymentFailed = "payment:failed",
5
5
  AwaitingPayment = "awaiting:payment",
6
- Completed = "completed"
6
+ Completed = "completed",
7
+ Processing = "processing",
8
+ ProcessingFailed = "processing:failed",
9
+ Refunded = "refunded"
7
10
  }
@@ -8,4 +8,7 @@ var OrderStatus;
8
8
  OrderStatus["PaymentFailed"] = "payment:failed";
9
9
  OrderStatus["AwaitingPayment"] = "awaiting:payment";
10
10
  OrderStatus["Completed"] = "completed";
11
- })(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {}));
11
+ OrderStatus["Processing"] = "processing";
12
+ OrderStatus["ProcessingFailed"] = "processing:failed";
13
+ OrderStatus["Refunded"] = "refunded";
14
+ })(OrderStatus || (exports.OrderStatus = OrderStatus = {}));
@@ -9,4 +9,4 @@ var OrderType;
9
9
  OrderType["CourseRequest"] = "course:request";
10
10
  OrderType["MentorRequest"] = "mentor:request";
11
11
  OrderType["CompanyUsers"] = "company:users";
12
- })(OrderType = exports.OrderType || (exports.OrderType = {}));
12
+ })(OrderType || (exports.OrderType = OrderType = {}));
@@ -6,4 +6,4 @@ var OTPStatus;
6
6
  OTPStatus["Valid"] = "valid";
7
7
  OTPStatus["Expired"] = "expired";
8
8
  OTPStatus["Used"] = "used";
9
- })(OTPStatus = exports.OTPStatus || (exports.OTPStatus = {}));
9
+ })(OTPStatus || (exports.OTPStatus = OTPStatus = {}));
@@ -5,4 +5,4 @@ var OTPType;
5
5
  (function (OTPType) {
6
6
  OTPType["Email"] = "email";
7
7
  OTPType["Phone"] = "phone";
8
- })(OTPType = exports.OTPType || (exports.OTPType = {}));
8
+ })(OTPType || (exports.OTPType = OTPType = {}));
@@ -13,4 +13,4 @@ var PartnerStates;
13
13
  PartnerStates["PartnerVerifiedAndActive"] = "partner-verified-and-active";
14
14
  PartnerStates["PartnerVerificationRejected"] = "partner-verification-rejected";
15
15
  PartnerStates["PartnerAccountSuspended"] = "partner-account-suspended";
16
- })(PartnerStates = exports.PartnerStates || (exports.PartnerStates = {}));
16
+ })(PartnerStates || (exports.PartnerStates = PartnerStates = {}));
@@ -8,4 +8,4 @@ var PartnerStatus;
8
8
  PartnerStatus["Active"] = "active";
9
9
  PartnerStatus["Suspended"] = "suspended";
10
10
  PartnerStatus["Inactive"] = "inactive";
11
- })(PartnerStatus = exports.PartnerStatus || (exports.PartnerStatus = {}));
11
+ })(PartnerStatus || (exports.PartnerStatus = PartnerStatus = {}));
@@ -6,4 +6,4 @@ var PartnerType;
6
6
  PartnerType["PartnerIndividual"] = "partner:individual";
7
7
  PartnerType["PartnerCompany"] = "partner:company";
8
8
  PartnerType["NotApplicable"] = "not:applicable";
9
- })(PartnerType = exports.PartnerType || (exports.PartnerType = {}));
9
+ })(PartnerType || (exports.PartnerType = PartnerType = {}));
@@ -6,4 +6,4 @@ var PaymentType;
6
6
  PaymentType["Paid"] = "paid";
7
7
  PaymentType["Pending"] = "pending";
8
8
  PaymentType["Unknown"] = "unknown";
9
- })(PaymentType = exports.PaymentType || (exports.PaymentType = {}));
9
+ })(PaymentType || (exports.PaymentType = PaymentType = {}));
@@ -6,4 +6,4 @@ var PaymentType;
6
6
  PaymentType["Online"] = "online";
7
7
  PaymentType["DiscountCoupon"] = "discount:coupon";
8
8
  PaymentType["Unknown"] = "unknown";
9
- })(PaymentType = exports.PaymentType || (exports.PaymentType = {}));
9
+ })(PaymentType || (exports.PaymentType = PaymentType = {}));
@@ -8,4 +8,4 @@ var ProfileType;
8
8
  ProfileType["PartnerCompanyProfile"] = "partner:company:profile";
9
9
  ProfileType["CompanyEmployeePartnerProfile"] = "companyEmployee:partner:profile";
10
10
  ProfileType["PartnerEmployeeCompanyProfile"] = "partnerEmployee:company:profile";
11
- })(ProfileType = exports.ProfileType || (exports.ProfileType = {}));
11
+ })(ProfileType || (exports.ProfileType = ProfileType = {}));
@@ -6,4 +6,4 @@ var ProjectStatus;
6
6
  ProjectStatus["inProgress"] = "InProgress";
7
7
  ProjectStatus["closed"] = "Closed";
8
8
  ProjectStatus["toStart"] = "ToStart";
9
- })(ProjectStatus = exports.ProjectStatus || (exports.ProjectStatus = {}));
9
+ })(ProjectStatus || (exports.ProjectStatus = ProjectStatus = {}));
@@ -6,4 +6,4 @@ var RazorpayAccountStatus;
6
6
  RazorpayAccountStatus["Activated"] = "activated";
7
7
  RazorpayAccountStatus["Review"] = "under-review";
8
8
  RazorpayAccountStatus["NeedClarification"] = "needs-clarification";
9
- })(RazorpayAccountStatus = exports.RazorpayAccountStatus || (exports.RazorpayAccountStatus = {}));
9
+ })(RazorpayAccountStatus || (exports.RazorpayAccountStatus = RazorpayAccountStatus = {}));
@@ -5,4 +5,4 @@ var ResumeStatus;
5
5
  (function (ResumeStatus) {
6
6
  ResumeStatus["Unverified"] = "unverified";
7
7
  ResumeStatus["Verified"] = "verified";
8
- })(ResumeStatus = exports.ResumeStatus || (exports.ResumeStatus = {}));
8
+ })(ResumeStatus || (exports.ResumeStatus = ResumeStatus = {}));
@@ -8,4 +8,4 @@ var ServiceType;
8
8
  ServiceType[ServiceType["Training"] = 2] = "Training";
9
9
  ServiceType[ServiceType["BackgroundCheck"] = 4] = "BackgroundCheck";
10
10
  ServiceType[ServiceType["Interview"] = 8] = "Interview";
11
- })(ServiceType = exports.ServiceType || (exports.ServiceType = {}));
11
+ })(ServiceType || (exports.ServiceType = ServiceType = {}));
@@ -5,4 +5,4 @@ var SMSTemplate;
5
5
  (function (SMSTemplate) {
6
6
  SMSTemplate["NoTemplate"] = "no:template";
7
7
  SMSTemplate["RUFOUS_OTP"] = "RUFOUS_OTP";
8
- })(SMSTemplate = exports.SMSTemplate || (exports.SMSTemplate = {}));
8
+ })(SMSTemplate || (exports.SMSTemplate = SMSTemplate = {}));
@@ -5,4 +5,4 @@ var SMSType;
5
5
  (function (SMSType) {
6
6
  SMSType["OTP"] = "otp";
7
7
  SMSType["Transactional"] = "transactional";
8
- })(SMSType = exports.SMSType || (exports.SMSType = {}));
8
+ })(SMSType || (exports.SMSType = SMSType = {}));
@@ -7,4 +7,4 @@ var TaskStatus;
7
7
  TaskStatus["applied"] = "Applied";
8
8
  TaskStatus["approved"] = "Approved";
9
9
  TaskStatus["rejected"] = "Rejected";
10
- })(TaskStatus = exports.TaskStatus || (exports.TaskStatus = {}));
10
+ })(TaskStatus || (exports.TaskStatus = TaskStatus = {}));
@@ -5,4 +5,4 @@ var TimesheetPaymentStatus;
5
5
  (function (TimesheetPaymentStatus) {
6
6
  TimesheetPaymentStatus["paid"] = "Paid";
7
7
  TimesheetPaymentStatus["pending"] = "Pending";
8
- })(TimesheetPaymentStatus = exports.TimesheetPaymentStatus || (exports.TimesheetPaymentStatus = {}));
8
+ })(TimesheetPaymentStatus || (exports.TimesheetPaymentStatus = TimesheetPaymentStatus = {}));
@@ -6,4 +6,4 @@ var TimesheetStatus;
6
6
  TimesheetStatus["Approved"] = "Approved";
7
7
  TimesheetStatus["Submitted"] = "Submitted";
8
8
  TimesheetStatus["None"] = "";
9
- })(TimesheetStatus = exports.TimesheetStatus || (exports.TimesheetStatus = {}));
9
+ })(TimesheetStatus || (exports.TimesheetStatus = TimesheetStatus = {}));
@@ -9,4 +9,4 @@ var UserStatus;
9
9
  UserStatus["Inactive"] = "inactive";
10
10
  UserStatus["Suspended"] = "suspended";
11
11
  UserStatus["Archived"] = "archived";
12
- })(UserStatus = exports.UserStatus || (exports.UserStatus = {}));
12
+ })(UserStatus || (exports.UserStatus = UserStatus = {}));
@@ -1,13 +1,13 @@
1
1
  export declare enum UserType {
2
2
  Superadmin = "superadmin",
3
- PartnerSuperuser = "partner:superuser",
3
+ PartnerSuperuser = "partner:superuser",// Admin X N
4
4
  CompanySuperuser = "company:superuser",
5
- PartnerManager = "partner:manager",
5
+ PartnerManager = "partner:manager",//Users X N
6
6
  CompanyManager = "company:manager",
7
7
  PartnerEmployeeManager = "partner:employee:manager",
8
8
  CompanyEmployeeManager = "company:employee:manager",
9
- PartnerEmployee = "partner:employee",
10
- CompanyEmployee = "company:employee",
9
+ PartnerEmployee = "partner:employee",//Role based
10
+ CompanyEmployee = "company:employee",//Role based
11
11
  PartnerCustomerSupport = "partner:customer:support",
12
12
  CompanyCustomerSupport = "company:customer:support",
13
13
  RufousCustomerSupport = "rufous:customer:support",
@@ -20,4 +20,4 @@ var UserType;
20
20
  UserType["RufousUser"] = "rufous:user";
21
21
  UserType["CompanyUser"] = "company:user";
22
22
  UserType["PartnerUser"] = "partner:user";
23
- })(UserType = exports.UserType || (exports.UserType = {}));
23
+ })(UserType || (exports.UserType = UserType = {}));
@@ -6,4 +6,4 @@ var WorkState;
6
6
  WorkState["workAssigned"] = "WorkAssigned";
7
7
  WorkState["onboarded"] = "Onboarded";
8
8
  WorkState["workClosed"] = "workClosed";
9
- })(WorkState = exports.WorkState || (exports.WorkState = {}));
9
+ })(WorkState || (exports.WorkState = WorkState = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rufous/aem",
3
- "version": "1.1.66",
3
+ "version": "1.1.68",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [
@@ -15,7 +15,7 @@
15
15
  "license": "ISC",
16
16
  "devDependencies": {
17
17
  "del-cli": "^3.0.1",
18
- "typescript": "^3.9.7"
18
+ "typescript": "^5.7.2"
19
19
  },
20
20
  "dependencies": {
21
21
  "@types/cookie-session": "^2.0.41",
@@ -25,9 +25,9 @@
25
25
  "cookie-session": "^1.4.0",
26
26
  "express": "^4.17.1",
27
27
  "express-validator": "^6.6.0",
28
- "mongoose": "5.10.19",
29
28
  "express-winston": "^4.0.5",
30
29
  "jsonwebtoken": "^8.5.1",
30
+ "mongoose": "5.10.19",
31
31
  "node-nats-streaming": "^0.3.2",
32
32
  "winston": "^3.3.3",
33
33
  "winston-mongodb": "^5.0.1"