@resolveio/server-lib 4.0.1 → 4.0.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.
@@ -131,6 +131,10 @@ var schema = {
131
131
  customer: {
132
132
  type: String,
133
133
  optional: true
134
+ },
135
+ customer_type: {
136
+ type: String,
137
+ optional: true
134
138
  }
135
139
  };
136
140
  var DefaultSchema = new mongoose_1.Schema(schema, {
@@ -2,19 +2,37 @@ import { CollectionDocument } from './collection-document.model';
2
2
  export interface UserModel extends CollectionDocument {
3
3
  attempts: number;
4
4
  last: Date;
5
- services?: any;
6
5
  fullname: string;
6
+ roles: string[] | UserRoleModel;
7
+ readonly?: boolean;
7
8
  username?: string;
8
9
  email?: string;
9
- roles?: string[];
10
10
  active?: boolean;
11
- readonly?: boolean;
11
+ services?: any;
12
12
  phonenumber?: string;
13
13
  other?: object;
14
14
  id_customer?: string;
15
15
  customer?: string;
16
+ customer_type?: string;
16
17
  customers: UserCustomersModel[];
17
18
  }
19
+ export interface UserRoleModel {
20
+ super_admin: boolean;
21
+ approvals: UserRoleApprovalModel[];
22
+ groups: UserRoleGroupModel[];
23
+ notifications: string[];
24
+ miscs: string[];
25
+ }
26
+ export interface UserRoleApprovalModel {
27
+ accounting_code: string;
28
+ type: string;
29
+ name: string;
30
+ }
31
+ export interface UserRoleGroupModel {
32
+ name: string;
33
+ views: string[];
34
+ yard?: string;
35
+ }
18
36
  export interface UserCustomersModel {
19
37
  id_customer: string;
20
38
  customer: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {