@autofleet/zehut 1.4.10-beta-1 → 1.4.10-beta-2
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/lib/errors.d.ts +1 -1
- package/lib/errors.js +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +2 -0
- package/package.json +1 -1
package/lib/errors.d.ts
CHANGED
package/lib/errors.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UnauthorizedAccessError = void 0;
|
|
4
4
|
class UnauthorizedAccessError extends Error {
|
|
5
|
-
constructor(user, ...params) {
|
|
5
|
+
constructor(user = null, ...params) {
|
|
6
6
|
super(...params);
|
|
7
7
|
this.user = user;
|
|
8
8
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import User from './user';
|
|
2
|
+
import { UnauthorizedAccessError } from './errors';
|
|
2
3
|
declare const _default: {
|
|
3
4
|
User: typeof User;
|
|
4
5
|
middleware: (options?: {
|
|
@@ -15,5 +16,6 @@ declare const _default: {
|
|
|
15
16
|
checkFleetPermission: (fleetId: any) => any;
|
|
16
17
|
checkBusinessModelPermission: (businessModelId: any) => any;
|
|
17
18
|
checkDemandSourcePermission: (demandSourceId: any) => any;
|
|
19
|
+
UnauthorizedAccessError: typeof UnauthorizedAccessError;
|
|
18
20
|
};
|
|
19
21
|
export default _default;
|
package/lib/index.js
CHANGED
|
@@ -22,6 +22,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
22
22
|
const user_1 = __importStar(require("./user"));
|
|
23
23
|
const tracer_1 = require("./tracer");
|
|
24
24
|
const check_permission_1 = require("./check-permission");
|
|
25
|
+
const errors_1 = require("./errors");
|
|
25
26
|
tracer_1.enable();
|
|
26
27
|
exports.default = {
|
|
27
28
|
User: user_1.default,
|
|
@@ -33,4 +34,5 @@ exports.default = {
|
|
|
33
34
|
checkFleetPermission: check_permission_1.checkFleetPermission,
|
|
34
35
|
checkBusinessModelPermission: check_permission_1.checkBusinessModelPermission,
|
|
35
36
|
checkDemandSourcePermission: check_permission_1.checkDemandSourcePermission,
|
|
37
|
+
UnauthorizedAccessError: errors_1.UnauthorizedAccessError,
|
|
36
38
|
};
|