@thzero/library_server_validation_joi 0.18.1 → 0.18.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.
- package/index.js +12 -0
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -93,6 +93,12 @@ class JoiBaseValidationService extends BaseValidationService {
|
|
|
93
93
|
.max(255)
|
|
94
94
|
.uri();
|
|
95
95
|
|
|
96
|
+
_usageMetricsMeasurementType = Joi.string()
|
|
97
|
+
.trim()
|
|
98
|
+
.regex(/^[a-zA-Z0-9]+([._\-a-zA-Z0-9]*)*$/)
|
|
99
|
+
.min(2)
|
|
100
|
+
.max(16);
|
|
101
|
+
|
|
96
102
|
_username = Joi.string()
|
|
97
103
|
.trim()
|
|
98
104
|
.alphanum()
|
|
@@ -128,6 +134,12 @@ class JoiBaseValidationService extends BaseValidationService {
|
|
|
128
134
|
return Joi.object({});
|
|
129
135
|
}
|
|
130
136
|
|
|
137
|
+
usageMetricsMeasurementTag = Joi.object({
|
|
138
|
+
type: this._usageMetricsMeasurementType,
|
|
139
|
+
mobile: Joi.boolean().allow(null),
|
|
140
|
+
value: this._number.allow(null)
|
|
141
|
+
});
|
|
142
|
+
|
|
131
143
|
userSchema = Joi.object({
|
|
132
144
|
id: this._externalId.required(),
|
|
133
145
|
});
|
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.18.
|
|
4
|
+
"version": "0.18.3",
|
|
5
5
|
"version_major": 0,
|
|
6
6
|
"version_minor": 18,
|
|
7
|
-
"version_patch":
|
|
8
|
-
"version_date": "
|
|
7
|
+
"version_patch": 3,
|
|
8
|
+
"version_date": "04/06/2024",
|
|
9
9
|
"author": "thZero",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"repository": {
|