@resolveio/server-lib 1.1.3-newrole → 1.1.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.
@@ -21,6 +21,13 @@ var schema = {
21
21
  type: Date,
22
22
  optional: true
23
23
  },
24
+ readonly: {
25
+ type: Boolean,
26
+ optional: true
27
+ },
28
+ active: {
29
+ type: Boolean
30
+ },
24
31
  attempts: {
25
32
  type: Number,
26
33
  optional: true
@@ -57,73 +64,60 @@ var schema = {
57
64
  type: String
58
65
  },
59
66
  roles: {
60
- type: Object
61
- },
62
- 'roles.super_admin': {
63
- type: Boolean
64
- },
65
- 'roles.approvals': {
66
67
  type: Array
67
68
  },
68
- 'roles.approvals.$': {
69
- type: Object
70
- },
71
- 'roles.approvals.$.name': {
69
+ 'roles.$': {
72
70
  type: String
73
71
  },
74
- 'roles.approvals.$.type': {
75
- type: String
72
+ phonenumber: {
73
+ type: String,
74
+ optional: true
76
75
  },
77
- 'roles.approvals.$.accounting_code': {
78
- type: String
76
+ other: {
77
+ type: Object,
78
+ blackbox: true,
79
+ optional: true
79
80
  },
80
- 'roles.groups': {
81
- type: Array
81
+ assets: {
82
+ type: Array,
83
+ optional: true
82
84
  },
83
- 'roles.groups.$': {
85
+ 'assets.$': {
84
86
  type: Object
85
87
  },
86
- 'roles.groups.$.name': {
88
+ 'assets.$.type': {
87
89
  type: String
88
90
  },
89
- 'roles.groups.$.views': {
90
- type: Array
91
- },
92
- 'roles.groups.$.views.$': {
91
+ 'assets.$.id_asset': {
93
92
  type: String
94
93
  },
95
- 'roles.groups.$.yard': {
96
- type: String,
97
- optional: true
98
- },
99
- 'roles.notifications': {
100
- type: Array
101
- },
102
- 'roles.notifications.$': {
94
+ 'assets.$.asset_number': {
103
95
  type: String
104
96
  },
105
- 'roles.miscs': {
106
- type: Array
97
+ 'assets.$.ownership': {
98
+ type: String
107
99
  },
108
- 'roles.miscs.$': {
100
+ 'assets.$.ownership_driver': {
109
101
  type: String
110
102
  },
111
- active: Boolean,
112
- id_customer: {
113
- type: String,
103
+ 'assets.$.date_start': {
104
+ type: Date
105
+ },
106
+ 'assets.$.date_end': {
107
+ type: Date,
114
108
  optional: true
115
109
  },
116
- customer: {
110
+ id_function: {
117
111
  type: String,
118
112
  optional: true
119
113
  },
120
- customer_type: {
114
+ customer: {
121
115
  type: String,
122
- optional: true
116
+ optional: true,
123
117
  },
124
- phonenumber: {
118
+ id_customer: {
125
119
  type: String,
126
- optional: true
120
+ optional: true,
127
121
  }
128
122
  };
129
123
  var DefaultSchema = new mongoose_1.Schema(schema, {
@@ -1,30 +1,14 @@
1
1
  import { CollectionDocument } from './collection-document.model';
2
2
  export interface UserModel extends CollectionDocument {
3
+ attempts: number;
4
+ last: Date;
5
+ services?: any;
3
6
  fullname: string;
4
- roles: UserRoleModel;
5
7
  username?: string;
6
8
  email?: string;
9
+ roles?: string[];
7
10
  active?: boolean;
8
- services?: any;
9
- id_customer?: string;
10
- customer?: string;
11
- customer_type?: string;
11
+ readonly?: boolean;
12
12
  phonenumber?: string;
13
- }
14
- export interface UserRoleModel {
15
- super_admin: boolean;
16
- approvals: UserRoleApprovalModel[];
17
- groups: UserRoleGroupModel[];
18
- notifications: string[];
19
- miscs: string[];
20
- }
21
- export interface UserRoleApprovalModel {
22
- accounting_code: string;
23
- type: string;
24
- name: string;
25
- }
26
- export interface UserRoleGroupModel {
27
- name: string;
28
- views: string[];
29
- yard?: string;
13
+ other?: object;
30
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "1.1.3-newrole",
3
+ "version": "1.1.3",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {