@thzero/library_server_validation_joi 0.18.3 → 0.18.4

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.
Files changed (2) hide show
  1. package/index.js +12 -0
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -140,6 +140,18 @@ class JoiBaseValidationService extends BaseValidationService {
140
140
  value: this._number.allow(null)
141
141
  });
142
142
 
143
+ usageMetricsMeasurementTagParamsSort = Joi.object({
144
+ id: Joi.string().valid(...[ 'date', 'type', 'value' ]),
145
+ dir: Joi.boolean()
146
+ });
147
+
148
+ usageMetricsMeasurementTagParams = Joi.object({
149
+ unit: Joi.string().valid(...[ 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year' ]).allow(null).allow(''),
150
+ number: Joi.number().greater(-1).allow(null),
151
+ date: this._dateIso.allow(null),
152
+ sort: Joi.array().items(this.usageMetricsMeasurementTagParamsSort).allow(null)
153
+ });
154
+
143
155
  userSchema = Joi.object({
144
156
  id: this._externalId.required(),
145
157
  });
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.3",
4
+ "version": "0.18.4",
5
5
  "version_major": 0,
6
6
  "version_minor": 18,
7
- "version_patch": 3,
8
- "version_date": "04/06/2024",
7
+ "version_patch": 4,
8
+ "version_date": "04/07/2024",
9
9
  "author": "thZero",
10
10
  "license": "MIT",
11
11
  "repository": {