@ecogood/e-calculator-schemas 1.5.0 → 1.5.2

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,4 +1,26 @@
1
1
  import { z } from 'zod';
2
+ export declare const MatrixRatingBodySchema: z.ZodObject<{
3
+ shortName: z.ZodString;
4
+ name: z.ZodString;
5
+ points: z.ZodNumber;
6
+ maxPoints: z.ZodDefault<z.ZodNumber>;
7
+ percentageReached: z.ZodOptional<z.ZodNumber>;
8
+ notApplicable: z.ZodBoolean;
9
+ }, "strip", z.ZodTypeAny, {
10
+ name: string;
11
+ shortName: string;
12
+ points: number;
13
+ maxPoints: number;
14
+ notApplicable: boolean;
15
+ percentageReached?: number | undefined;
16
+ }, {
17
+ name: string;
18
+ shortName: string;
19
+ points: number;
20
+ notApplicable: boolean;
21
+ maxPoints?: number | undefined;
22
+ percentageReached?: number | undefined;
23
+ }>;
2
24
  export declare const MatrixBodySchema: z.ZodObject<{
3
25
  ratings: z.ZodArray<z.ZodObject<{
4
26
  shortName: z.ZodString;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MatrixBodySchema = void 0;
3
+ exports.MatrixBodySchema = exports.MatrixRatingBodySchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const shared_schemas_1 = require("./shared.schemas");
6
- const MatrixRatingBodySchema = zod_1.z.object({
6
+ exports.MatrixRatingBodySchema = zod_1.z.object({
7
7
  shortName: zod_1.z.string(),
8
8
  name: zod_1.z.string(),
9
9
  points: zod_1.z.number(),
@@ -12,6 +12,6 @@ const MatrixRatingBodySchema = zod_1.z.object({
12
12
  notApplicable: zod_1.z.boolean(),
13
13
  });
14
14
  exports.MatrixBodySchema = zod_1.z.object({
15
- ratings: MatrixRatingBodySchema.array(),
15
+ ratings: exports.MatrixRatingBodySchema.array(),
16
16
  totalPoints: zod_1.z.number(),
17
17
  });
@@ -0,0 +1,2 @@
1
+ export declare const EN_WORDS: string[];
2
+ 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 = exports.EN_WORDS = void 0;
4
+ exports.EN_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 = Object.assign({}, exports.EN_WORDS.reduce((prevValue, w) => (Object.assign(Object.assign({}, prevValue), { [w]: w })), {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecogood/e-calculator-schemas",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "A package providing the schemas for the e-calculator application.",
5
5
  "main": "dist/e-calculator-schemas",
6
6
  "types": "dist/e-calculator-schemas",