scheduler-node-models 1.2.113 → 1.2.114
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/package.json +1 -1
- package/users/index.d.ts +2 -0
- package/users/index.js +2 -0
- package/users/permission.d.ts +13 -0
- package/users/permission.js +21 -0
package/package.json
CHANGED
package/users/index.d.ts
CHANGED
package/users/index.js
CHANGED
|
@@ -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./user"), exports);
|
|
18
|
+
__exportStar(require("./permission"), exports);
|
|
19
|
+
__exportStar(require("./question"), exports);
|
|
18
20
|
__exportStar(require("./web"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class and interface for the user permission
|
|
3
|
+
*/
|
|
4
|
+
export interface IPermission {
|
|
5
|
+
application: string;
|
|
6
|
+
job: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class Permission implements IPermission {
|
|
9
|
+
application: string;
|
|
10
|
+
job: string;
|
|
11
|
+
constructor(perm?: IPermission);
|
|
12
|
+
compareTo(other?: Permission): number;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Permission = void 0;
|
|
4
|
+
class Permission {
|
|
5
|
+
application;
|
|
6
|
+
job;
|
|
7
|
+
constructor(perm) {
|
|
8
|
+
this.application = (perm) ? perm.application : '';
|
|
9
|
+
this.job = (perm) ? perm.job : '';
|
|
10
|
+
}
|
|
11
|
+
compareTo(other) {
|
|
12
|
+
if (other) {
|
|
13
|
+
if (this.application === other.application) {
|
|
14
|
+
return (this.job < other.job) ? -1 : 1;
|
|
15
|
+
}
|
|
16
|
+
return (this.application < other.application) ? -1 : 1;
|
|
17
|
+
}
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Permission = Permission;
|