@thzero/library_server_validation_joi 0.16.4 → 0.16.6

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/gamer.js CHANGED
@@ -33,11 +33,13 @@ class GamerJoiValidationService extends JoiBaseValidationService {
33
33
 
34
34
  gamerTagSchema = this._gamerTagPartial.required();
35
35
 
36
- settingRequestSchema() {
37
- const validation = super.settingRequestSchema();
38
- return validation.concat(Joi.object({
39
- settings: this._settingGamerSchema.required()
40
- }));
36
+ settingSchema() {
37
+ const validation = super.settingSchema();
38
+ return validation.concat(this._settingGamerSchema);
39
+ }
40
+
41
+ settingSchema() {
42
+ return this._settingGamerSchema;
41
43
  }
42
44
  }
43
45
 
package/index.js CHANGED
@@ -107,7 +107,7 @@ class JoiBaseValidationService extends BaseValidationService {
107
107
  id: this._externalId.required(),
108
108
  name: this._name.allow(null),
109
109
  email: this._email.allow(null),
110
- picture: this._userpicture
110
+ picture: this._userpicture.allow(null),
111
111
  });
112
112
 
113
113
  settingsRefreshSchema = Joi.object({
@@ -115,11 +115,18 @@ class JoiBaseValidationService extends BaseValidationService {
115
115
  });
116
116
 
117
117
  settingRequestSchema() {
118
- return this._settingRequestSchema;
118
+ return Joi.object({
119
+ userId: this._id.required(),
120
+ settings: this.settingSchema().required()
121
+ });
122
+ }
123
+
124
+ settingSchema() {
125
+ return Joi.object({});
119
126
  }
120
127
 
121
128
  userSchema = Joi.object({
122
- id: this._externalId.required()
129
+ id: this._externalId.required(),
123
130
  });
124
131
 
125
132
  userUpdateSchema = Joi.object({
@@ -128,10 +135,6 @@ class JoiBaseValidationService extends BaseValidationService {
128
135
  roles: Joi.array().items(this._roles).allow(null),
129
136
  updatedTimestamp: this._timestamp.required()
130
137
  });
131
-
132
- _settingRequestSchema = Joi.object({
133
- userId: this._id.required()
134
- });
135
138
  }
136
139
 
137
140
  export default JoiBaseValidationService;
package/openSource.js ADDED
@@ -0,0 +1,46 @@
1
+ export default () => {
2
+ return [
3
+ {
4
+ category: 'server',
5
+ name: '@joi/date',
6
+ url: 'https://github.com/hapijs/joi-date',
7
+ licenseName: 'MIT',
8
+ licenseUrl: 'https://github.com/hapijs/joi-date/blob/master/LICENSE.md'
9
+ },
10
+ {
11
+ category: 'server',
12
+ name: '@thzero/library_common',
13
+ url: 'https://github.com/thzero/library_common',
14
+ licenseName: 'MIT',
15
+ licenseUrl: 'https://github.com/thzero/library_common/blob/master/license.md'
16
+ },
17
+ {
18
+ category: 'server',
19
+ name: '@thzero/library_common_service',
20
+ url: 'https://github.com/thzero/library_common_service',
21
+ licenseName: 'MIT',
22
+ licenseUrl: 'https://github.com/thzero/library_common_service/blob/master/license.md'
23
+ },
24
+ {
25
+ category: 'server',
26
+ name: '@thzero/library_service',
27
+ url: 'https://github.com/thzero/library_service',
28
+ licenseName: 'MIT',
29
+ licenseUrl: 'https://github.com/thzero/library_service/blob/master/license.md'
30
+ },
31
+ {
32
+ category: 'server',
33
+ name: '@thzero/library_server_validation_joi',
34
+ url: 'https://github.com/thzero/library_server_validation_joi',
35
+ licenseName: 'MIT',
36
+ licenseUrl: 'https://github.com/thzero/library_server_validation_joi/blob/master/license.md'
37
+ },
38
+ {
39
+ category: 'server',
40
+ name: 'joi',
41
+ url: 'https://github.com/hapijs/joi',
42
+ licenseName: 'MIT',
43
+ licenseUrl: 'https://github.com/hapijs/joi/blob/master/LICENSE.md'
44
+ }
45
+ ];
46
+ }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thzero/library_server_validation_joi",
3
3
  "type": "module",
4
- "version": "0.16.4",
4
+ "version": "0.16.6",
5
5
  "version_major": 0,
6
6
  "version_minor": 16,
7
- "version_patch": 4,
8
- "version_date": "11/25/2022",
7
+ "version_patch": 6,
8
+ "version_date": "12/20/2022",
9
9
  "author": "thZero",
10
10
  "license": "MIT",
11
11
  "repository": {