@resolveio/server-lib 1.0.22 → 1.1.0-newrole

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,13 +21,6 @@ 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
- },
31
24
  attempts: {
32
25
  type: Number,
33
26
  optional: true
@@ -64,60 +57,73 @@ var schema = {
64
57
  type: String
65
58
  },
66
59
  roles: {
60
+ type: Object
61
+ },
62
+ 'roles.super_admin': {
63
+ type: Boolean
64
+ },
65
+ 'roles.approvals': {
67
66
  type: Array
68
67
  },
69
- 'roles.$': {
68
+ 'roles.approvals.$': {
69
+ type: Object
70
+ },
71
+ 'roles.approvals.$.name': {
70
72
  type: String
71
73
  },
72
- phonenumber: {
73
- type: String,
74
- optional: true
74
+ 'roles.approvals.$.type': {
75
+ type: String
75
76
  },
76
- other: {
77
- type: Object,
78
- blackbox: true,
79
- optional: true
77
+ 'roles.approvals.$.accounting_code': {
78
+ type: String
80
79
  },
81
- assets: {
82
- type: Array,
83
- optional: true
80
+ 'roles.groups': {
81
+ type: Array
84
82
  },
85
- 'assets.$': {
83
+ 'roles.groups.$': {
86
84
  type: Object
87
85
  },
88
- 'assets.$.type': {
86
+ 'roles.groups.$.name': {
89
87
  type: String
90
88
  },
91
- 'assets.$.id_asset': {
92
- type: String
89
+ 'roles.groups.$.views': {
90
+ type: Array
93
91
  },
94
- 'assets.$.asset_number': {
92
+ 'roles.groups.$.views.$': {
95
93
  type: String
96
94
  },
97
- 'assets.$.ownership': {
98
- type: String
95
+ 'roles.groups.$.yard': {
96
+ type: String,
97
+ optional: true
99
98
  },
100
- 'assets.$.ownership_driver': {
99
+ 'roles.notifications': {
100
+ type: Array
101
+ },
102
+ 'roles.notifications.$': {
101
103
  type: String
102
104
  },
103
- 'assets.$.date_start': {
104
- type: Date
105
+ 'roles.miscs': {
106
+ type: Array
105
107
  },
106
- 'assets.$.date_end': {
107
- type: Date,
108
- optional: true
108
+ 'roles.miscs.$': {
109
+ type: String
109
110
  },
110
- id_function: {
111
+ active: Boolean,
112
+ id_customer: {
111
113
  type: String,
112
114
  optional: true
113
115
  },
114
116
  customer: {
115
117
  type: String,
116
- optional: true,
118
+ optional: true
117
119
  },
118
- id_customer: {
120
+ customer_type: {
119
121
  type: String,
120
- optional: true,
122
+ optional: true
123
+ },
124
+ phonenumber: {
125
+ type: String,
126
+ optional: true
121
127
  }
122
128
  };
123
129
  var DefaultSchema = new mongoose_1.Schema(schema, {
@@ -1,14 +1,30 @@
1
1
  import { CollectionDocument } from './collection-document.model';
2
2
  export interface UserModel extends CollectionDocument {
3
- attempts: number;
4
- last: Date;
5
- services?: any;
6
3
  fullname: string;
4
+ roles: UserRoleModel;
7
5
  username?: string;
8
6
  email?: string;
9
- roles?: string[];
10
7
  active?: boolean;
11
- readonly?: boolean;
8
+ services?: any;
9
+ id_customer?: string;
10
+ customer?: string;
11
+ customer_type?: string;
12
12
  phonenumber?: string;
13
- other?: object;
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;
14
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolveio/server-lib",
3
- "version": "1.0.22",
3
+ "version": "1.1.0-newrole",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {
@@ -16,16 +16,12 @@
16
16
  }
17
17
  .tg {border-collapse:collapse;border-spacing:0;border-color:#999;}
18
18
  .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#444;background-color:#F7FDFA;border-top-width:1px;border-bottom-width:1px;}
19
- .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#fff;background-color:rgb(0, 183, 255);border-top-width:1px;border-bottom-width:1px;}
19
+ .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#fff;background-color:black;border-top-width:1px;border-bottom-width:1px;}
20
20
  .tg .tg-baqh{text-align:left;vertical-align:top}
21
21
  .tg .tg-yw4l{vertical-align:top;}
22
22
  </style>
23
23
 
24
-
25
-
26
- Good Day,<br><br>
27
-
28
- A support ticket: (#{{support_ticket_number_string}}) has been deleted.
24
+ Support ticket #{{support_ticket_number_string}} has been deleted.
29
25
 
30
26
  <br><br>
31
27
  <div id="containter">
@@ -35,16 +31,10 @@ A support ticket: (#{{support_ticket_number_string}}) has been deleted.
35
31
  <th class="tg-yw4l" style="padding: 0; margin: 0; border-left: 1px solid #999;">
36
32
  <img src="{{logo}}" style="width: auto; height: 90px; background-color: white; margin-left: -10px; margin-bottom: -10px;" alt="Logo">
37
33
  </th>
38
- <th class="tg-yw4l" style="min-width: 1050px; max-width: 1050px; font-size: 20px; color: white; text-align: right; padding: 30px;">Support Ticket</th>
34
+ <th class="tg-yw4l" style="min-width: 800px; max-width: 800px; font-size: 20px; color: white; text-align: right; padding: 30px;">Support Ticket</th>
39
35
  </tr>
40
36
  </thead>
41
37
  <tbody>
42
38
  </tbody>
43
39
  </table>
44
- </div>
45
- <br><br><br>
46
-
47
- ResolveIO, LLC<br>
48
- Dustin Poole<br>
49
- <a href="mailTo:ar@resolveio.com">ar@resolveio.com</a><br>
50
- 432-661-6150<br><br>
40
+ </div>
@@ -16,16 +16,12 @@
16
16
  }
17
17
  .tg {border-collapse:collapse;border-spacing:0;border-color:#999;}
18
18
  .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#444;background-color:#F7FDFA;border-top-width:1px;border-bottom-width:1px;}
19
- .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#fff;background-color:rgb(0, 183, 255);border-top-width:1px;border-bottom-width:1px;}
19
+ .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#fff;background-color:black;border-top-width:1px;border-bottom-width:1px;}
20
20
  .tg .tg-baqh{text-align:left;vertical-align:top}
21
21
  .tg .tg-yw4l{vertical-align:top;}
22
22
  </style>
23
23
 
24
-
25
-
26
- Good Day,<br><br>
27
-
28
- A new support ticket: (#{{support_ticket_number_string}}), has been modified by {{user_created}}.
24
+ Support ticket: #{{support_ticket_number_string}} has been modified by {{user_created}}.
29
25
  <br><br>
30
26
  <div id="containter">
31
27
  <table class="tg">
@@ -34,7 +30,7 @@ A new support ticket: (#{{support_ticket_number_string}}), has been modified by
34
30
  <th class="tg-yw4l" style="padding: 0; margin: 0; border-left: 1px solid #999;">
35
31
  <img src="{{logo}}" style="width: auto; height: 90px; background-color: white; margin-left: -10px; margin-bottom: -10px;" alt="Logo">
36
32
  </th>
37
- <th class="tg-yw4l" style="min-width: 1050px; max-width: 1050px; font-size: 20px; color: white; text-align: right; padding: 30px;">Support Ticket</th>
33
+ <th class="tg-yw4l" style="min-width: 800px; max-width: 800px; font-size: 20px; color: white; text-align: right; padding: 30px;">Support Ticket</th>
38
34
  </tr>
39
35
  </thead>
40
36
  <tbody>
@@ -42,6 +38,10 @@ A new support ticket: (#{{support_ticket_number_string}}), has been modified by
42
38
  <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Support Ticket <br>Number</td>
43
39
  <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{support_ticket_number_string}}</td>
44
40
  </tr>
41
+ <tr>
42
+ <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Client</td>
43
+ <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{client}}</td>
44
+ </tr>
45
45
  <tr>
46
46
  <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Type</td>
47
47
  <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{type}}</td>
@@ -68,10 +68,4 @@ A new support ticket: (#{{support_ticket_number_string}}), has been modified by
68
68
  </tr>
69
69
  </tbody>
70
70
  </table>
71
- </div>
72
- <br><br><br>
73
-
74
- ResolveIO, LLC<br>
75
- Dustin Poole<br>
76
- <a href="mailTo:ar@resolveio.com">ar@resolveio.com</a><br>
77
- 432-661-6150<br><br>
71
+ </div>
@@ -16,16 +16,12 @@
16
16
  }
17
17
  .tg {border-collapse:collapse;border-spacing:0;border-color:#999;}
18
18
  .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#444;background-color:#F7FDFA;border-top-width:1px;border-bottom-width:1px;}
19
- .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#fff;background-color:rgb(0, 137, 250);border-top-width:1px;border-bottom-width:1px;}
19
+ .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:0px;overflow:hidden;word-break:normal;border-color:#999;color:#fff;background-color:black;border-top-width:1px;border-bottom-width:1px;}
20
20
  .tg .tg-baqh{text-align:left;vertical-align:top}
21
21
  .tg .tg-yw4l{vertical-align:top;}
22
22
  </style>
23
23
 
24
-
25
-
26
- Good Day,<br><br>
27
-
28
- A new support ticket: (#{{support_ticket_number_string}}), has been created by {{user_created}}.
24
+ New support ticket #{{support_ticket_number_string}} has been created by {{user_created}}.
29
25
  <br><br>
30
26
  <div id="containter">
31
27
  <table class="tg">
@@ -34,7 +30,7 @@ A new support ticket: (#{{support_ticket_number_string}}), has been created by {
34
30
  <th class="tg-yw4l" style="padding: 0; margin: 0; border-left: 1px solid #999;">
35
31
  <img src="{{logo}}" style="width: auto; height: 90px; background-color: white; margin-left: -10px; margin-bottom: -10px;" alt="Logo">
36
32
  </th>
37
- <th class="tg-yw4l" style="min-width: 1050px; max-width: 1050px; font-size: 20px; color: white; text-align: right; padding: 30px;">Support Ticket</th>
33
+ <th class="tg-yw4l" style="min-width: 800px; max-width: 800px; font-size: 20px; color: white; text-align: right; padding: 30px;">Support Ticket</th>
38
34
  </tr>
39
35
  </thead>
40
36
  <tbody>
@@ -42,6 +38,10 @@ A new support ticket: (#{{support_ticket_number_string}}), has been created by {
42
38
  <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Support Ticket <br>Number</td>
43
39
  <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{support_ticket_number_string}}</td>
44
40
  </tr>
41
+ <tr>
42
+ <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Client</td>
43
+ <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{client}}</td>
44
+ </tr>
45
45
  <tr>
46
46
  <td class="tg-baqh" style="min-width: 30%; max-width: 30%; font-weight: bold;">Type</td>
47
47
  <td class="tg-baqh" style="min-width: 60%; max-width: 60%;">{{type}}</td>
@@ -68,10 +68,4 @@ A new support ticket: (#{{support_ticket_number_string}}), has been created by {
68
68
  </tr>
69
69
  </tbody>
70
70
  </table>
71
- </div>
72
- <br><br><br>
73
-
74
- ResolveIO, LLC<br>
75
- Dustin Poole<br>
76
- <a href="mailTo:ar@resolveio.com">ar@resolveio.com</a><br>
77
- 432-661-6150<br><br>
71
+ </div>
Binary file