@ecogood/e-calculator-schemas 1.4.0 → 1.5.1
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const OrganizationRequestSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
3
4
|
address: z.ZodObject<{
|
|
4
5
|
city: z.ZodString;
|
|
5
6
|
houseNumber: z.ZodString;
|
|
@@ -23,6 +24,7 @@ export declare const OrganizationRequestSchema: z.ZodObject<{
|
|
|
23
24
|
street: string;
|
|
24
25
|
zip: string;
|
|
25
26
|
};
|
|
27
|
+
name: string;
|
|
26
28
|
}, {
|
|
27
29
|
address: {
|
|
28
30
|
city: string;
|
|
@@ -30,6 +32,7 @@ export declare const OrganizationRequestSchema: z.ZodObject<{
|
|
|
30
32
|
street: string;
|
|
31
33
|
zip: string;
|
|
32
34
|
};
|
|
35
|
+
name: string;
|
|
33
36
|
}>;
|
|
34
37
|
export declare const OrganizationResponseSchema: z.ZodObject<{
|
|
35
38
|
address: z.ZodObject<{
|
|
@@ -48,6 +51,7 @@ export declare const OrganizationResponseSchema: z.ZodObject<{
|
|
|
48
51
|
street: string;
|
|
49
52
|
zip: string;
|
|
50
53
|
}>;
|
|
54
|
+
name: z.ZodString;
|
|
51
55
|
id: z.ZodNumber;
|
|
52
56
|
}, "strip", z.ZodTypeAny, {
|
|
53
57
|
id: number;
|
|
@@ -57,6 +61,7 @@ export declare const OrganizationResponseSchema: z.ZodObject<{
|
|
|
57
61
|
street: string;
|
|
58
62
|
zip: string;
|
|
59
63
|
};
|
|
64
|
+
name: string;
|
|
60
65
|
}, {
|
|
61
66
|
id: number;
|
|
62
67
|
address: {
|
|
@@ -65,11 +70,15 @@ export declare const OrganizationResponseSchema: z.ZodObject<{
|
|
|
65
70
|
street: string;
|
|
66
71
|
zip: string;
|
|
67
72
|
};
|
|
73
|
+
name: string;
|
|
68
74
|
}>;
|
|
69
75
|
export declare const OrganizationItemsResponseSchema: z.ZodArray<z.ZodObject<{
|
|
70
76
|
id: z.ZodNumber;
|
|
77
|
+
name: z.ZodString;
|
|
71
78
|
}, "strip", z.ZodTypeAny, {
|
|
72
79
|
id: number;
|
|
80
|
+
name: string;
|
|
73
81
|
}, {
|
|
74
82
|
id: number;
|
|
83
|
+
name: string;
|
|
75
84
|
}>, "many">;
|
package/dist/organization.dto.js
CHANGED
|
@@ -7,6 +7,7 @@ const isNonEmptyString = zod_1.z
|
|
|
7
7
|
.string({ required_error: errorMsg })
|
|
8
8
|
.min(1, { message: errorMsg });
|
|
9
9
|
exports.OrganizationRequestSchema = zod_1.z.object({
|
|
10
|
+
name: isNonEmptyString,
|
|
10
11
|
address: zod_1.z.object({
|
|
11
12
|
city: isNonEmptyString,
|
|
12
13
|
houseNumber: isNonEmptyString,
|
|
@@ -18,5 +19,5 @@ exports.OrganizationResponseSchema = exports.OrganizationRequestSchema.extend({
|
|
|
18
19
|
id: zod_1.z.number(),
|
|
19
20
|
});
|
|
20
21
|
exports.OrganizationItemsResponseSchema = zod_1.z
|
|
21
|
-
.object({ id: zod_1.z.number() })
|
|
22
|
+
.object({ id: zod_1.z.number(), name: isNonEmptyString })
|
|
22
23
|
.array();
|
package/dist/translations/en.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EN_ERROR_TRANSLATIONS = void 0;
|
|
4
|
-
|
|
3
|
+
exports.EN_ERROR_TRANSLATIONS = exports.EN_WORDS = void 0;
|
|
4
|
+
exports.EN_WORDS = [
|
|
5
5
|
'Number expected',
|
|
6
6
|
'Number should be positive',
|
|
7
7
|
'Percentage expected',
|
|
@@ -10,4 +10,4 @@ const EN_ERROR_WORDS = [
|
|
|
10
10
|
'Number should be between -200 and 0',
|
|
11
11
|
'Must not be blank',
|
|
12
12
|
];
|
|
13
|
-
exports.EN_ERROR_TRANSLATIONS =
|
|
13
|
+
exports.EN_ERROR_TRANSLATIONS = Object.assign({}, exports.EN_WORDS.reduce((prevValue, w) => (Object.assign(Object.assign({}, prevValue), { [w]: w })), {}));
|
package/package.json
CHANGED