@ecogood/e-calculator-schemas 1.9.0 → 2.1.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.
@@ -50,8 +50,8 @@ export declare const BalanceSheetCreateRequestBodySchema: z.ZodObject<{
50
50
  industryCode?: string | undefined;
51
51
  }, {
52
52
  amountOfTotalTurnover: number;
53
- industryCode?: string | undefined;
54
53
  description?: string | undefined;
54
+ industryCode?: string | undefined;
55
55
  }>, "many">>;
56
56
  mainOriginOfOtherSuppliers: z.ZodOptional<z.ZodString>;
57
57
  }, "strip", z.ZodTypeAny, {
@@ -108,8 +108,8 @@ export declare const BalanceSheetCreateRequestBodySchema: z.ZodObject<{
108
108
  }[] | undefined;
109
109
  industrySectors?: {
110
110
  amountOfTotalTurnover: number;
111
- industryCode?: string | undefined;
112
111
  description?: string | undefined;
112
+ industryCode?: string | undefined;
113
113
  }[] | undefined;
114
114
  mainOriginOfOtherSuppliers?: string | undefined;
115
115
  }>>;
@@ -206,8 +206,8 @@ export declare const BalanceSheetCreateRequestBodySchema: z.ZodObject<{
206
206
  }[] | undefined;
207
207
  industrySectors?: {
208
208
  amountOfTotalTurnover: number;
209
- industryCode?: string | undefined;
210
209
  description?: string | undefined;
210
+ industryCode?: string | undefined;
211
211
  }[] | undefined;
212
212
  mainOriginOfOtherSuppliers?: string | undefined;
213
213
  } | undefined;
@@ -269,8 +269,8 @@ export declare const BalanceSheetPatchRequestBodySchema: z.ZodObject<{
269
269
  industryCode?: string | undefined;
270
270
  }, {
271
271
  amountOfTotalTurnover: number;
272
- industryCode?: string | undefined;
273
272
  description?: string | undefined;
273
+ industryCode?: string | undefined;
274
274
  }>, "many">>>;
275
275
  mainOriginOfOtherSuppliers: z.ZodOptional<z.ZodOptional<z.ZodString>>;
276
276
  }, "strip", z.ZodTypeAny, {
@@ -327,8 +327,8 @@ export declare const BalanceSheetPatchRequestBodySchema: z.ZodObject<{
327
327
  }[] | undefined;
328
328
  industrySectors?: {
329
329
  amountOfTotalTurnover: number;
330
- industryCode?: string | undefined;
331
330
  description?: string | undefined;
331
+ industryCode?: string | undefined;
332
332
  }[] | undefined;
333
333
  mainOriginOfOtherSuppliers?: string | undefined;
334
334
  }>>;
@@ -421,8 +421,8 @@ export declare const BalanceSheetPatchRequestBodySchema: z.ZodObject<{
421
421
  }[] | undefined;
422
422
  industrySectors?: {
423
423
  amountOfTotalTurnover: number;
424
- industryCode?: string | undefined;
425
424
  description?: string | undefined;
425
+ industryCode?: string | undefined;
426
426
  }[] | undefined;
427
427
  mainOriginOfOtherSuppliers?: string | undefined;
428
428
  } | undefined;
@@ -451,8 +451,8 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
451
451
  points: z.ZodNumber;
452
452
  maxPoints: z.ZodNumber;
453
453
  }, "strip", z.ZodTypeAny, {
454
- type: import("./rating.dto").RatingType;
455
454
  name: string;
455
+ type: import("./rating.dto").RatingType;
456
456
  shortName: string;
457
457
  weight: number;
458
458
  estimations: number;
@@ -461,8 +461,8 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
461
461
  points: number;
462
462
  maxPoints: number;
463
463
  }, {
464
- type: import("./rating.dto").RatingType;
465
464
  name: string;
465
+ type: import("./rating.dto").RatingType;
466
466
  shortName: string;
467
467
  weight: number;
468
468
  estimations: number;
@@ -471,8 +471,8 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
471
471
  points: number;
472
472
  maxPoints: number;
473
473
  }>, {
474
- type: import("./rating.dto").RatingType;
475
474
  name: string;
475
+ type: import("./rating.dto").RatingType;
476
476
  shortName: string;
477
477
  weight: number;
478
478
  estimations: number;
@@ -481,8 +481,8 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
481
481
  points: number;
482
482
  maxPoints: number;
483
483
  }, {
484
- type: import("./rating.dto").RatingType;
485
484
  name: string;
485
+ type: import("./rating.dto").RatingType;
486
486
  shortName: string;
487
487
  weight: number;
488
488
  estimations: number;
@@ -538,8 +538,8 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
538
538
  industryCode?: string | undefined;
539
539
  }, {
540
540
  amountOfTotalTurnover: number;
541
- industryCode?: string | undefined;
542
541
  description?: string | undefined;
542
+ industryCode?: string | undefined;
543
543
  }>, "many">;
544
544
  mainOriginOfOtherSuppliers: z.ZodObject<{
545
545
  countryCode: z.ZodOptional<z.ZodString>;
@@ -596,8 +596,8 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
596
596
  }[];
597
597
  industrySectors: {
598
598
  amountOfTotalTurnover: number;
599
- industryCode?: string | undefined;
600
599
  description?: string | undefined;
600
+ industryCode?: string | undefined;
601
601
  }[];
602
602
  mainOriginOfOtherSuppliers: {
603
603
  costs: number;
@@ -663,8 +663,8 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
663
663
  hasCanteen?: boolean | undefined;
664
664
  };
665
665
  ratings: {
666
- type: import("./rating.dto").RatingType;
667
666
  name: string;
667
+ type: import("./rating.dto").RatingType;
668
668
  shortName: string;
669
669
  weight: number;
670
670
  estimations: number;
@@ -694,8 +694,8 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
694
694
  }[];
695
695
  industrySectors: {
696
696
  amountOfTotalTurnover: number;
697
- industryCode?: string | undefined;
698
697
  description?: string | undefined;
698
+ industryCode?: string | undefined;
699
699
  }[];
700
700
  mainOriginOfOtherSuppliers: {
701
701
  costs: number;
@@ -715,8 +715,8 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
715
715
  averageJourneyToWorkForStaffInKm?: number | undefined;
716
716
  };
717
717
  ratings: {
718
- type: import("./rating.dto").RatingType;
719
718
  name: string;
719
+ type: import("./rating.dto").RatingType;
720
720
  shortName: string;
721
721
  weight: number;
722
722
  estimations: number;
@@ -733,15 +733,27 @@ export declare const BalanceSheetResponseBodySchema: z.ZodObject<{
733
733
  }>;
734
734
  export declare const BalanceSheetItemResponseSchema: z.ZodObject<{
735
735
  id: z.ZodNumber;
736
+ version: z.ZodNativeEnum<typeof BalanceSheetVersion>;
737
+ type: z.ZodNativeEnum<typeof BalanceSheetType>;
736
738
  }, "strip", z.ZodTypeAny, {
739
+ type: BalanceSheetType;
737
740
  id: number;
741
+ version: BalanceSheetVersion;
738
742
  }, {
743
+ type: BalanceSheetType;
739
744
  id: number;
745
+ version: BalanceSheetVersion;
740
746
  }>;
741
747
  export declare const BalanceSheetItemsResponseSchema: z.ZodArray<z.ZodObject<{
742
748
  id: z.ZodNumber;
749
+ version: z.ZodNativeEnum<typeof BalanceSheetVersion>;
750
+ type: z.ZodNativeEnum<typeof BalanceSheetType>;
743
751
  }, "strip", z.ZodTypeAny, {
752
+ type: BalanceSheetType;
744
753
  id: number;
754
+ version: BalanceSheetVersion;
745
755
  }, {
756
+ type: BalanceSheetType;
746
757
  id: number;
758
+ version: BalanceSheetVersion;
747
759
  }>, "many">;
@@ -28,5 +28,7 @@ exports.BalanceSheetResponseBodySchema = zod_1.z.object({
28
28
  });
29
29
  exports.BalanceSheetItemResponseSchema = zod_1.z.object({
30
30
  id: zod_1.z.number(),
31
+ version: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetVersion),
32
+ type: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetType),
31
33
  });
32
34
  exports.BalanceSheetItemsResponseSchema = exports.BalanceSheetItemResponseSchema.array();
@@ -46,8 +46,8 @@ export declare const CompanyFactsCreateRequestBodySchema: z.ZodObject<{
46
46
  industryCode?: string | undefined;
47
47
  }, {
48
48
  amountOfTotalTurnover: number;
49
- industryCode?: string | undefined;
50
49
  description?: string | undefined;
50
+ industryCode?: string | undefined;
51
51
  }>, "many">>;
52
52
  mainOriginOfOtherSuppliers: z.ZodOptional<z.ZodString>;
53
53
  }, "strip", z.ZodTypeAny, {
@@ -104,8 +104,8 @@ export declare const CompanyFactsCreateRequestBodySchema: z.ZodObject<{
104
104
  }[] | undefined;
105
105
  industrySectors?: {
106
106
  amountOfTotalTurnover: number;
107
- industryCode?: string | undefined;
108
107
  description?: string | undefined;
108
+ industryCode?: string | undefined;
109
109
  }[] | undefined;
110
110
  mainOriginOfOtherSuppliers?: string | undefined;
111
111
  }>;
@@ -156,8 +156,8 @@ export declare const CompanyFactsPatchRequestBodySchema: z.ZodObject<{
156
156
  industryCode?: string | undefined;
157
157
  }, {
158
158
  amountOfTotalTurnover: number;
159
- industryCode?: string | undefined;
160
159
  description?: string | undefined;
160
+ industryCode?: string | undefined;
161
161
  }>, "many">>>;
162
162
  mainOriginOfOtherSuppliers: z.ZodOptional<z.ZodOptional<z.ZodString>>;
163
163
  }, "strip", z.ZodTypeAny, {
@@ -214,8 +214,8 @@ export declare const CompanyFactsPatchRequestBodySchema: z.ZodObject<{
214
214
  }[] | undefined;
215
215
  industrySectors?: {
216
216
  amountOfTotalTurnover: number;
217
- industryCode?: string | undefined;
218
217
  description?: string | undefined;
218
+ industryCode?: string | undefined;
219
219
  }[] | undefined;
220
220
  mainOriginOfOtherSuppliers?: string | undefined;
221
221
  }>;
@@ -266,8 +266,8 @@ export declare const CompanyFactsResponseBodySchema: z.ZodObject<{
266
266
  industryCode?: string | undefined;
267
267
  }, {
268
268
  amountOfTotalTurnover: number;
269
- industryCode?: string | undefined;
270
269
  description?: string | undefined;
270
+ industryCode?: string | undefined;
271
271
  }>, "many">;
272
272
  mainOriginOfOtherSuppliers: z.ZodObject<{
273
273
  countryCode: z.ZodOptional<z.ZodString>;
@@ -324,8 +324,8 @@ export declare const CompanyFactsResponseBodySchema: z.ZodObject<{
324
324
  }[];
325
325
  industrySectors: {
326
326
  amountOfTotalTurnover: number;
327
- industryCode?: string | undefined;
328
327
  description?: string | undefined;
328
+ industryCode?: string | undefined;
329
329
  }[];
330
330
  mainOriginOfOtherSuppliers: {
331
331
  costs: number;
@@ -18,23 +18,24 @@ export declare const OrganizationRequestSchema: z.ZodObject<{
18
18
  zip: string;
19
19
  }>;
20
20
  }, "strip", z.ZodTypeAny, {
21
+ name: string;
21
22
  address: {
22
23
  city: string;
23
24
  houseNumber: string;
24
25
  street: string;
25
26
  zip: string;
26
27
  };
27
- name: string;
28
28
  }, {
29
+ name: string;
29
30
  address: {
30
31
  city: string;
31
32
  houseNumber: string;
32
33
  street: string;
33
34
  zip: string;
34
35
  };
35
- name: string;
36
36
  }>;
37
- export declare const OrganizationResponseSchema: z.ZodObject<{
37
+ export declare const OrganizationResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
38
+ name: z.ZodString;
38
39
  address: z.ZodObject<{
39
40
  city: z.ZodString;
40
41
  houseNumber: z.ZodString;
@@ -51,10 +52,11 @@ export declare const OrganizationResponseSchema: z.ZodObject<{
51
52
  street: string;
52
53
  zip: string;
53
54
  }>;
54
- name: z.ZodString;
55
+ }, {
55
56
  id: z.ZodNumber;
56
57
  invitations: z.ZodArray<z.ZodString, "many">;
57
- }, "strip", z.ZodTypeAny, {
58
+ }>, "strip", z.ZodTypeAny, {
59
+ name: string;
58
60
  id: number;
59
61
  address: {
60
62
  city: string;
@@ -62,9 +64,9 @@ export declare const OrganizationResponseSchema: z.ZodObject<{
62
64
  street: string;
63
65
  zip: string;
64
66
  };
65
- name: string;
66
67
  invitations: string[];
67
68
  }, {
69
+ name: string;
68
70
  id: number;
69
71
  address: {
70
72
  city: string;
@@ -72,16 +74,15 @@ export declare const OrganizationResponseSchema: z.ZodObject<{
72
74
  street: string;
73
75
  zip: string;
74
76
  };
75
- name: string;
76
77
  invitations: string[];
77
78
  }>;
78
79
  export declare const OrganizationItemsResponseSchema: z.ZodArray<z.ZodObject<{
79
80
  id: z.ZodNumber;
80
81
  name: z.ZodString;
81
82
  }, "strip", z.ZodTypeAny, {
82
- id: number;
83
83
  name: string;
84
- }, {
85
84
  id: number;
85
+ }, {
86
86
  name: string;
87
+ id: number;
87
88
  }>, "many">;
@@ -27,8 +27,8 @@ export declare const RatingResponseBodySchema: z.ZodEffects<z.ZodObject<{
27
27
  points: z.ZodNumber;
28
28
  maxPoints: z.ZodNumber;
29
29
  }, "strip", z.ZodTypeAny, {
30
- type: RatingType;
31
30
  name: string;
31
+ type: RatingType;
32
32
  shortName: string;
33
33
  weight: number;
34
34
  estimations: number;
@@ -37,8 +37,8 @@ export declare const RatingResponseBodySchema: z.ZodEffects<z.ZodObject<{
37
37
  points: number;
38
38
  maxPoints: number;
39
39
  }, {
40
- type: RatingType;
41
40
  name: string;
41
+ type: RatingType;
42
42
  shortName: string;
43
43
  weight: number;
44
44
  estimations: number;
@@ -47,8 +47,8 @@ export declare const RatingResponseBodySchema: z.ZodEffects<z.ZodObject<{
47
47
  points: number;
48
48
  maxPoints: number;
49
49
  }>, {
50
- type: RatingType;
51
50
  name: string;
51
+ type: RatingType;
52
52
  shortName: string;
53
53
  weight: number;
54
54
  estimations: number;
@@ -57,8 +57,8 @@ export declare const RatingResponseBodySchema: z.ZodEffects<z.ZodObject<{
57
57
  points: number;
58
58
  maxPoints: number;
59
59
  }, {
60
- type: RatingType;
61
60
  name: string;
61
+ type: RatingType;
62
62
  shortName: string;
63
63
  weight: number;
64
64
  estimations: number;
@@ -20,9 +20,9 @@ export declare const UserInvitationResponseSchema: z.ZodObject<{
20
20
  id: z.ZodNumber;
21
21
  name: z.ZodString;
22
22
  }, "strip", z.ZodTypeAny, {
23
- id: number;
24
23
  name: string;
25
- }, {
26
24
  id: number;
25
+ }, {
27
26
  name: string;
27
+ id: number;
28
28
  }>;
@@ -13,6 +13,22 @@ export declare const WorkbookResponseBodySchema: z.ZodObject<{
13
13
  name: string;
14
14
  shortName: string;
15
15
  }>, "many">;
16
+ evaluationLevels: z.ZodArray<z.ZodObject<{
17
+ level: z.ZodNumber;
18
+ name: z.ZodString;
19
+ pointsFrom: z.ZodNumber;
20
+ pointsTo: z.ZodNumber;
21
+ }, "strip", z.ZodTypeAny, {
22
+ name: string;
23
+ level: number;
24
+ pointsFrom: number;
25
+ pointsTo: number;
26
+ }, {
27
+ name: string;
28
+ level: number;
29
+ pointsFrom: number;
30
+ pointsTo: number;
31
+ }>, "many">;
16
32
  }, "strip", z.ZodTypeAny, {
17
33
  groups: {
18
34
  name: string;
@@ -20,6 +36,12 @@ export declare const WorkbookResponseBodySchema: z.ZodObject<{
20
36
  }[];
21
37
  type: BalanceSheetType;
22
38
  version: BalanceSheetVersion;
39
+ evaluationLevels: {
40
+ name: string;
41
+ level: number;
42
+ pointsFrom: number;
43
+ pointsTo: number;
44
+ }[];
23
45
  }, {
24
46
  groups: {
25
47
  name: string;
@@ -27,4 +49,10 @@ export declare const WorkbookResponseBodySchema: z.ZodObject<{
27
49
  }[];
28
50
  type: BalanceSheetType;
29
51
  version: BalanceSheetVersion;
52
+ evaluationLevels: {
53
+ name: string;
54
+ level: number;
55
+ pointsFrom: number;
56
+ pointsTo: number;
57
+ }[];
30
58
  }>;
@@ -7,8 +7,15 @@ const GroupSchema = zod_1.z.object({
7
7
  shortName: zod_1.z.string(),
8
8
  name: zod_1.z.string(),
9
9
  });
10
+ const EvaluationLevelSchema = zod_1.z.object({
11
+ level: zod_1.z.number(),
12
+ name: zod_1.z.string(),
13
+ pointsFrom: zod_1.z.number(),
14
+ pointsTo: zod_1.z.number(),
15
+ });
10
16
  exports.WorkbookResponseBodySchema = zod_1.z.object({
11
17
  version: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetVersion),
12
18
  type: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetType),
13
19
  groups: GroupSchema.array(),
20
+ evaluationLevels: EvaluationLevelSchema.array(),
14
21
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecogood/e-calculator-schemas",
3
- "version": "1.9.0",
3
+ "version": "2.1.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",
@@ -45,5 +45,8 @@
45
45
  "ts-jest": "^29.0.5",
46
46
  "typescript": "^5.4.5",
47
47
  "typescript-eslint": "^7.13.0"
48
+ },
49
+ "dependencies": {
50
+ "zod": "^3.23.8"
48
51
  }
49
52
  }