@ecogood/e-calculator-schemas 1.2.3 → 1.3.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.
package/dist/organization.dto.js
CHANGED
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OrganizationItemsResponseSchema = exports.OrganizationResponseSchema = exports.OrganizationRequestSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const errorMsg = 'Must not be blank';
|
|
6
|
+
const isNonEmptyString = zod_1.z
|
|
7
|
+
.string({ required_error: errorMsg })
|
|
8
|
+
.min(1, { message: errorMsg });
|
|
5
9
|
exports.OrganizationRequestSchema = zod_1.z.object({
|
|
6
10
|
address: zod_1.z.object({
|
|
7
|
-
city:
|
|
8
|
-
houseNumber:
|
|
9
|
-
street:
|
|
10
|
-
zip:
|
|
11
|
+
city: isNonEmptyString,
|
|
12
|
+
houseNumber: isNonEmptyString,
|
|
13
|
+
street: isNonEmptyString,
|
|
14
|
+
zip: isNonEmptyString,
|
|
11
15
|
}),
|
|
12
16
|
});
|
|
13
17
|
exports.OrganizationResponseSchema = exports.OrganizationRequestSchema.extend({
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const DE_ERROR_TRANSLATIONS: {
|
|
2
|
+
'Number expected': string;
|
|
3
|
+
'Number should be positive': string;
|
|
4
|
+
'Percentage expected': string;
|
|
5
|
+
'Percentage should be between 0 and 100': string;
|
|
6
|
+
'Number should be between 0 and 10': string;
|
|
7
|
+
'Number should be between -200 and 0': string;
|
|
8
|
+
'Must not be blank': string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DE_ERROR_TRANSLATIONS = void 0;
|
|
4
|
+
exports.DE_ERROR_TRANSLATIONS = {
|
|
5
|
+
'Number expected': 'Zahl erwartet',
|
|
6
|
+
'Number should be positive': 'Zahl sollte positiv sein',
|
|
7
|
+
'Percentage expected': 'Prozentangabe erwartet',
|
|
8
|
+
'Percentage should be between 0 and 100': 'Prozentangabe sollte zwischen 0 und 100 liegen',
|
|
9
|
+
'Number should be between 0 and 10': 'Zahl sollte zwischen 0 und 10 liegen',
|
|
10
|
+
'Number should be between -200 and 0': 'Zahl sollte zwischen -200 und 0 liegen',
|
|
11
|
+
'Must not be blank': 'Darf nicht leer sein',
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EN_ERROR_TRANSLATIONS: {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EN_ERROR_TRANSLATIONS = void 0;
|
|
4
|
+
const EN_ERROR_WORDS = [
|
|
5
|
+
'Number expected',
|
|
6
|
+
'Number should be positive',
|
|
7
|
+
'Percentage expected',
|
|
8
|
+
'Percentage should be between 0 and 100',
|
|
9
|
+
'Number should be between 0 and 10',
|
|
10
|
+
'Number should be between -200 and 0',
|
|
11
|
+
'Must not be blank',
|
|
12
|
+
];
|
|
13
|
+
exports.EN_ERROR_TRANSLATIONS = EN_ERROR_WORDS.reduce((prevValue, w) => (Object.assign(Object.assign({}, prevValue), { [w]: w })), {});
|
package/package.json
CHANGED