gemcap-be-common 1.4.174 → 1.4.175
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.
|
@@ -70,17 +70,27 @@ const criterionSchema = joi_1.default.object({
|
|
|
70
70
|
}),
|
|
71
71
|
min: joi_1.default.when('type', {
|
|
72
72
|
is: joi_1.default.valid('number', 'range', 'rating'),
|
|
73
|
-
then: joi_1.default.number().
|
|
73
|
+
then: joi_1.default.number().optional(),
|
|
74
74
|
otherwise: joi_1.default.forbidden(),
|
|
75
75
|
}),
|
|
76
76
|
max: joi_1.default.when('type', {
|
|
77
77
|
is: joi_1.default.valid('number', 'range', 'rating'),
|
|
78
|
-
then: joi_1.default.number().
|
|
78
|
+
then: joi_1.default.number().optional(),
|
|
79
79
|
otherwise: joi_1.default.forbidden(),
|
|
80
80
|
}),
|
|
81
81
|
step: joi_1.default.when('type', {
|
|
82
82
|
is: joi_1.default.valid('number', 'range', 'rating'),
|
|
83
|
-
then: joi_1.default.number().
|
|
83
|
+
then: joi_1.default.number().optional(),
|
|
84
|
+
otherwise: joi_1.default.forbidden(),
|
|
85
|
+
}),
|
|
86
|
+
prefix: joi_1.default.when('type', {
|
|
87
|
+
is: joi_1.default.valid('number', 'range', 'rating'),
|
|
88
|
+
then: joi_1.default.string().optional(),
|
|
89
|
+
otherwise: joi_1.default.forbidden(),
|
|
90
|
+
}),
|
|
91
|
+
suffix: joi_1.default.when('type', {
|
|
92
|
+
is: joi_1.default.valid('number', 'range', 'rating'),
|
|
93
|
+
then: joi_1.default.string().optional(),
|
|
84
94
|
otherwise: joi_1.default.forbidden(),
|
|
85
95
|
}),
|
|
86
96
|
rules: joi_1.default.array()
|
|
@@ -44,6 +44,9 @@ export interface IScorecardDefinition {
|
|
|
44
44
|
options?: { value: string; label: string }[];
|
|
45
45
|
min?: number;
|
|
46
46
|
max?: number;
|
|
47
|
+
step?: number;
|
|
48
|
+
prefix?: string;
|
|
49
|
+
suffix?: string;
|
|
47
50
|
rules: IScoringRule[];
|
|
48
51
|
}[];
|
|
49
52
|
}[];
|
|
@@ -158,19 +161,31 @@ const criterionSchema = Joi.object({
|
|
|
158
161
|
|
|
159
162
|
min: Joi.when('type', {
|
|
160
163
|
is: Joi.valid('number', 'range', 'rating'),
|
|
161
|
-
then: Joi.number().
|
|
164
|
+
then: Joi.number().optional(),
|
|
162
165
|
otherwise: Joi.forbidden(),
|
|
163
166
|
}),
|
|
164
167
|
|
|
165
168
|
max: Joi.when('type', {
|
|
166
169
|
is: Joi.valid('number', 'range', 'rating'),
|
|
167
|
-
then: Joi.number().
|
|
170
|
+
then: Joi.number().optional(),
|
|
168
171
|
otherwise: Joi.forbidden(),
|
|
169
172
|
}),
|
|
170
173
|
|
|
171
174
|
step: Joi.when('type', {
|
|
172
175
|
is: Joi.valid('number', 'range', 'rating'),
|
|
173
|
-
then: Joi.number().
|
|
176
|
+
then: Joi.number().optional(),
|
|
177
|
+
otherwise: Joi.forbidden(),
|
|
178
|
+
}),
|
|
179
|
+
|
|
180
|
+
prefix: Joi.when('type', {
|
|
181
|
+
is: Joi.valid('number', 'range', 'rating'),
|
|
182
|
+
then: Joi.string().optional(),
|
|
183
|
+
otherwise: Joi.forbidden(),
|
|
184
|
+
}),
|
|
185
|
+
|
|
186
|
+
suffix: Joi.when('type', {
|
|
187
|
+
is: Joi.valid('number', 'range', 'rating'),
|
|
188
|
+
then: Joi.string().optional(),
|
|
174
189
|
otherwise: Joi.forbidden(),
|
|
175
190
|
}),
|
|
176
191
|
|