@ecogood/e-calculator-schemas 1.7.0 → 1.9.0
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/rating.dto.js +1 -1
- package/dist/shared.schemas.d.ts +2 -1
- package/dist/shared.schemas.js +3 -5
- package/dist/workbook.dto.d.ts +15 -18
- package/dist/workbook.dto.js +7 -4
- package/package.json +8 -19
package/dist/rating.dto.js
CHANGED
|
@@ -12,7 +12,7 @@ var RatingType;
|
|
|
12
12
|
(function (RatingType) {
|
|
13
13
|
RatingType["topic"] = "topic";
|
|
14
14
|
RatingType["aspect"] = "aspect";
|
|
15
|
-
})(RatingType
|
|
15
|
+
})(RatingType || (exports.RatingType = RatingType = {}));
|
|
16
16
|
exports.RatingResponseBodySchema = zod_1.z
|
|
17
17
|
.object({
|
|
18
18
|
shortName: zod_1.z.string(),
|
package/dist/shared.schemas.d.ts
CHANGED
|
@@ -8,7 +8,8 @@ export declare enum BalanceSheetType {
|
|
|
8
8
|
export declare enum BalanceSheetVersion {
|
|
9
9
|
v5_0_6 = "5.06",
|
|
10
10
|
v5_0_8 = "5.08",
|
|
11
|
-
v5_0_9 = "5.09"
|
|
11
|
+
v5_0_9 = "5.09",
|
|
12
|
+
v5_1_0 = "5.10"
|
|
12
13
|
}
|
|
13
14
|
export declare const WEIGHT_VALUES: number[];
|
|
14
15
|
export declare const isWeight: z.ZodEffects<z.ZodNumber, number, number>;
|
package/dist/shared.schemas.js
CHANGED
|
@@ -8,16 +8,14 @@ var BalanceSheetType;
|
|
|
8
8
|
(function (BalanceSheetType) {
|
|
9
9
|
BalanceSheetType["Compact"] = "Compact";
|
|
10
10
|
BalanceSheetType["Full"] = "Full";
|
|
11
|
-
})(BalanceSheetType
|
|
11
|
+
})(BalanceSheetType || (exports.BalanceSheetType = BalanceSheetType = {}));
|
|
12
12
|
var BalanceSheetVersion;
|
|
13
13
|
(function (BalanceSheetVersion) {
|
|
14
|
-
// eslint-disable-next-line camelcase
|
|
15
14
|
BalanceSheetVersion["v5_0_6"] = "5.06";
|
|
16
|
-
// eslint-disable-next-line camelcase
|
|
17
15
|
BalanceSheetVersion["v5_0_8"] = "5.08";
|
|
18
|
-
// eslint-disable-next-line camelcase
|
|
19
16
|
BalanceSheetVersion["v5_0_9"] = "5.09";
|
|
20
|
-
|
|
17
|
+
BalanceSheetVersion["v5_1_0"] = "5.10";
|
|
18
|
+
})(BalanceSheetVersion || (exports.BalanceSheetVersion = BalanceSheetVersion = {}));
|
|
21
19
|
const isNumberCustomError = zod_1.z.number({
|
|
22
20
|
invalid_type_error: 'Number expected',
|
|
23
21
|
required_error: 'Number expected',
|
package/dist/workbook.dto.d.ts
CHANGED
|
@@ -1,33 +1,30 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
shortName: z.ZodString;
|
|
4
|
-
title: z.ZodString;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
title: string;
|
|
7
|
-
shortName: string;
|
|
8
|
-
}, {
|
|
9
|
-
title: string;
|
|
10
|
-
shortName: string;
|
|
11
|
-
}>;
|
|
2
|
+
import { BalanceSheetType, BalanceSheetVersion } from './shared.schemas';
|
|
12
3
|
export declare const WorkbookResponseBodySchema: z.ZodObject<{
|
|
13
|
-
|
|
4
|
+
version: z.ZodNativeEnum<typeof BalanceSheetVersion>;
|
|
5
|
+
type: z.ZodNativeEnum<typeof BalanceSheetType>;
|
|
6
|
+
groups: z.ZodArray<z.ZodObject<{
|
|
14
7
|
shortName: z.ZodString;
|
|
15
|
-
|
|
8
|
+
name: z.ZodString;
|
|
16
9
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
|
|
10
|
+
name: string;
|
|
18
11
|
shortName: string;
|
|
19
12
|
}, {
|
|
20
|
-
|
|
13
|
+
name: string;
|
|
21
14
|
shortName: string;
|
|
22
15
|
}>, "many">;
|
|
23
16
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
groups: {
|
|
18
|
+
name: string;
|
|
26
19
|
shortName: string;
|
|
27
20
|
}[];
|
|
21
|
+
type: BalanceSheetType;
|
|
22
|
+
version: BalanceSheetVersion;
|
|
28
23
|
}, {
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
groups: {
|
|
25
|
+
name: string;
|
|
31
26
|
shortName: string;
|
|
32
27
|
}[];
|
|
28
|
+
type: BalanceSheetType;
|
|
29
|
+
version: BalanceSheetVersion;
|
|
33
30
|
}>;
|
package/dist/workbook.dto.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkbookResponseBodySchema =
|
|
3
|
+
exports.WorkbookResponseBodySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
5
|
+
const shared_schemas_1 = require("./shared.schemas");
|
|
6
|
+
const GroupSchema = zod_1.z.object({
|
|
6
7
|
shortName: zod_1.z.string(),
|
|
7
|
-
|
|
8
|
+
name: zod_1.z.string(),
|
|
8
9
|
});
|
|
9
10
|
exports.WorkbookResponseBodySchema = zod_1.z.object({
|
|
10
|
-
|
|
11
|
+
version: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetVersion),
|
|
12
|
+
type: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetType),
|
|
13
|
+
groups: GroupSchema.array(),
|
|
11
14
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecogood/e-calculator-schemas",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
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",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"test": "jest --watch --runInBand",
|
|
10
10
|
"test:ci": "jest --runInBand",
|
|
11
11
|
"format": "prettier --write .",
|
|
12
|
-
"lint": "eslint
|
|
13
|
-
"lint-fix": "eslint
|
|
12
|
+
"lint": "eslint .",
|
|
13
|
+
"lint-fix": "eslint . --fix",
|
|
14
14
|
"update:to:latest": "ncu -u && yarn update && yarn install && yarn audit fix",
|
|
15
15
|
"prepare": "rm -r dist || true && yarn run build && yarn run test:ci && yarn run lint"
|
|
16
16
|
},
|
|
@@ -35,26 +35,15 @@
|
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://git.ecogood.org/services/e-calculator-schemas/issues"
|
|
37
37
|
},
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"eslint-plugin-n": "^15.6.1",
|
|
40
|
-
"zod": "^3.20.6"
|
|
41
|
-
},
|
|
42
38
|
"devDependencies": {
|
|
39
|
+
"@eslint/js": "^9.4.0",
|
|
40
|
+
"@types/eslint__js": "^8.42.3",
|
|
43
41
|
"@types/jest": "^28.1.6",
|
|
44
|
-
"
|
|
45
|
-
"@typescript-eslint/parser": "^5.33.0",
|
|
46
|
-
"eslint": "8.22.0",
|
|
47
|
-
"eslint-config-airbnb-base": "^15.0.0",
|
|
48
|
-
"eslint-config-prettier": "^8.5.0",
|
|
49
|
-
"eslint-config-standard": "^17.0.0",
|
|
50
|
-
"eslint-plugin-import": "^2.26.0",
|
|
51
|
-
"eslint-plugin-node": "^11.1.0",
|
|
52
|
-
"eslint-plugin-prettier": "^4.2.1",
|
|
53
|
-
"eslint-plugin-promise": "^6.0.0",
|
|
54
|
-
"eslint-plugin-unused-imports": "^2.0.0",
|
|
42
|
+
"eslint": "^9.4.0",
|
|
55
43
|
"jest": "^29.5.0",
|
|
56
44
|
"prettier": "2.3.2",
|
|
57
45
|
"ts-jest": "^29.0.5",
|
|
58
|
-
"typescript": "^
|
|
46
|
+
"typescript": "^5.4.5",
|
|
47
|
+
"typescript-eslint": "^7.13.0"
|
|
59
48
|
}
|
|
60
49
|
}
|