@resolveio/server-lib 4.0.2 → 4.0.3

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.
@@ -135,6 +135,19 @@ var schema = {
135
135
  customer_type: {
136
136
  type: String,
137
137
  optional: true
138
+ },
139
+ departments: {
140
+ type: Array,
141
+ optional: true
142
+ },
143
+ 'departments.$': {
144
+ type: Object
145
+ },
146
+ 'departments.$.id_department': {
147
+ type: String
148
+ },
149
+ 'departments.$.department': {
150
+ type: String
138
151
  }
139
152
  };
140
153
  var DefaultSchema = new mongoose_1.Schema(schema, {
@@ -3,18 +3,26 @@ export interface UserModel extends CollectionDocument {
3
3
  attempts: number;
4
4
  last: Date;
5
5
  fullname: string;
6
- roles: string[] | UserRoleModel;
6
+ roles: string[];
7
7
  readonly?: boolean;
8
8
  username?: string;
9
9
  email?: string;
10
10
  active?: boolean;
11
11
  services?: any;
12
12
  phonenumber?: string;
13
- other?: object;
13
+ other?: UserObject;
14
14
  id_customer?: string;
15
15
  customer?: string;
16
16
  customer_type?: string;
17
- customers: UserCustomersModel[];
17
+ customers?: UserCustomersModel[];
18
+ departments?: UserDepartmentModel[];
19
+ }
20
+ export interface UserObject {
21
+ [key: string]: any;
22
+ }
23
+ export interface UserDepartmentModel {
24
+ id_department: string;
25
+ department: string;
18
26
  }
19
27
  export interface UserRoleModel {
20
28
  super_admin: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {