@ecogood/e-calculator-schemas 2.2.1 → 2.4.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.
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BalanceSheetItemsResponseSchema = exports.BalanceSheetItemResponseSchema = exports.BalanceSheetResponseBodySchema = exports.BalanceSheetPatchRequestBodySchema = exports.BalanceSheetCreateRequestBodySchema = void 0;
4
- const shared_schemas_1 = require("./shared.schemas");
5
- const zod_1 = require("zod");
6
- const company_facts_dto_1 = require("./company.facts.dto");
7
- const rating_dto_1 = require("./rating.dto");
8
- const stakeholder_weight_dto_1 = require("./stakeholder.weight.dto");
9
- exports.BalanceSheetCreateRequestBodySchema = zod_1.z.object({
10
- type: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetType),
11
- version: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetVersion),
12
- companyFacts: company_facts_dto_1.CompanyFactsCreateRequestBodySchema.default({}),
13
- ratings: rating_dto_1.RatingRequestBodySchema.array().default([]),
14
- stakeholderWeights: stakeholder_weight_dto_1.StakeholderWeightSchema.array().default([]),
15
- });
16
- exports.BalanceSheetPatchRequestBodySchema = zod_1.z.object({
17
- companyFacts: company_facts_dto_1.CompanyFactsPatchRequestBodySchema.optional(),
18
- ratings: rating_dto_1.RatingRequestBodySchema.array().default([]),
19
- stakeholderWeights: stakeholder_weight_dto_1.StakeholderWeightSchema.array().optional(),
20
- });
21
- exports.BalanceSheetResponseBodySchema = zod_1.z.object({
22
- id: zod_1.z.number().optional(),
23
- type: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetType),
24
- version: zod_1.z.nativeEnum(shared_schemas_1.BalanceSheetVersion),
25
- ratings: rating_dto_1.RatingResponseBodySchema.array(),
26
- companyFacts: company_facts_dto_1.CompanyFactsResponseBodySchema,
27
- stakeholderWeights: stakeholder_weight_dto_1.StakeholderWeightSchema.array(),
28
- });
29
- exports.BalanceSheetItemResponseSchema = zod_1.z.object({
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),
33
- });
34
- exports.BalanceSheetItemsResponseSchema = exports.BalanceSheetItemResponseSchema.array();
@@ -1,346 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const CompanyFactsCreateRequestBodySchema: z.ZodObject<{
3
- totalPurchaseFromSuppliers: z.ZodDefault<z.ZodNumber>;
4
- totalStaffCosts: z.ZodDefault<z.ZodNumber>;
5
- profit: z.ZodDefault<z.ZodNumber>;
6
- financialCosts: z.ZodDefault<z.ZodNumber>;
7
- incomeFromFinancialInvestments: z.ZodDefault<z.ZodNumber>;
8
- additionsToFixedAssets: z.ZodDefault<z.ZodNumber>;
9
- turnover: z.ZodDefault<z.ZodNumber>;
10
- totalAssets: z.ZodDefault<z.ZodNumber>;
11
- financialAssetsAndCashBalance: z.ZodDefault<z.ZodNumber>;
12
- numberOfEmployees: z.ZodDefault<z.ZodNumber>;
13
- hasCanteen: z.ZodOptional<z.ZodBoolean>;
14
- averageJourneyToWorkForStaffInKm: z.ZodDefault<z.ZodNumber>;
15
- isB2B: z.ZodDefault<z.ZodBoolean>;
16
- supplyFractions: z.ZodDefault<z.ZodArray<z.ZodObject<{
17
- countryCode: z.ZodOptional<z.ZodString>;
18
- industryCode: z.ZodOptional<z.ZodString>;
19
- costs: z.ZodDefault<z.ZodNumber>;
20
- }, "strip", z.ZodTypeAny, {
21
- costs: number;
22
- countryCode?: string | undefined;
23
- industryCode?: string | undefined;
24
- }, {
25
- countryCode?: string | undefined;
26
- industryCode?: string | undefined;
27
- costs?: number | undefined;
28
- }>, "many">>;
29
- employeesFractions: z.ZodDefault<z.ZodArray<z.ZodObject<{
30
- countryCode: z.ZodOptional<z.ZodString>;
31
- percentage: z.ZodNumber;
32
- }, "strip", z.ZodTypeAny, {
33
- percentage: number;
34
- countryCode?: string | undefined;
35
- }, {
36
- percentage: number;
37
- countryCode?: string | undefined;
38
- }>, "many">>;
39
- industrySectors: z.ZodDefault<z.ZodArray<z.ZodObject<{
40
- industryCode: z.ZodOptional<z.ZodString>;
41
- amountOfTotalTurnover: z.ZodNumber;
42
- description: z.ZodDefault<z.ZodString>;
43
- }, "strip", z.ZodTypeAny, {
44
- description: string;
45
- amountOfTotalTurnover: number;
46
- industryCode?: string | undefined;
47
- }, {
48
- amountOfTotalTurnover: number;
49
- description?: string | undefined;
50
- industryCode?: string | undefined;
51
- }>, "many">>;
52
- mainOriginOfOtherSuppliers: z.ZodOptional<z.ZodString>;
53
- }, "strip", z.ZodTypeAny, {
54
- totalPurchaseFromSuppliers: number;
55
- totalStaffCosts: number;
56
- profit: number;
57
- financialCosts: number;
58
- incomeFromFinancialInvestments: number;
59
- additionsToFixedAssets: number;
60
- turnover: number;
61
- totalAssets: number;
62
- financialAssetsAndCashBalance: number;
63
- numberOfEmployees: number;
64
- averageJourneyToWorkForStaffInKm: number;
65
- isB2B: boolean;
66
- supplyFractions: {
67
- costs: number;
68
- countryCode?: string | undefined;
69
- industryCode?: string | undefined;
70
- }[];
71
- employeesFractions: {
72
- percentage: number;
73
- countryCode?: string | undefined;
74
- }[];
75
- industrySectors: {
76
- description: string;
77
- amountOfTotalTurnover: number;
78
- industryCode?: string | undefined;
79
- }[];
80
- hasCanteen?: boolean | undefined;
81
- mainOriginOfOtherSuppliers?: string | undefined;
82
- }, {
83
- totalPurchaseFromSuppliers?: number | undefined;
84
- totalStaffCosts?: number | undefined;
85
- profit?: number | undefined;
86
- financialCosts?: number | undefined;
87
- incomeFromFinancialInvestments?: number | undefined;
88
- additionsToFixedAssets?: number | undefined;
89
- turnover?: number | undefined;
90
- totalAssets?: number | undefined;
91
- financialAssetsAndCashBalance?: number | undefined;
92
- numberOfEmployees?: number | undefined;
93
- hasCanteen?: boolean | undefined;
94
- averageJourneyToWorkForStaffInKm?: number | undefined;
95
- isB2B?: boolean | undefined;
96
- supplyFractions?: {
97
- countryCode?: string | undefined;
98
- industryCode?: string | undefined;
99
- costs?: number | undefined;
100
- }[] | undefined;
101
- employeesFractions?: {
102
- percentage: number;
103
- countryCode?: string | undefined;
104
- }[] | undefined;
105
- industrySectors?: {
106
- amountOfTotalTurnover: number;
107
- description?: string | undefined;
108
- industryCode?: string | undefined;
109
- }[] | undefined;
110
- mainOriginOfOtherSuppliers?: string | undefined;
111
- }>;
112
- export declare const CompanyFactsPatchRequestBodySchema: z.ZodObject<{
113
- totalPurchaseFromSuppliers: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
114
- totalStaffCosts: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
115
- profit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
116
- financialCosts: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
117
- incomeFromFinancialInvestments: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
118
- additionsToFixedAssets: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
119
- turnover: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
120
- totalAssets: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
121
- financialAssetsAndCashBalance: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
122
- numberOfEmployees: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
123
- hasCanteen: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
124
- averageJourneyToWorkForStaffInKm: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
125
- isB2B: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
126
- supplyFractions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
127
- countryCode: z.ZodOptional<z.ZodString>;
128
- industryCode: z.ZodOptional<z.ZodString>;
129
- costs: z.ZodDefault<z.ZodNumber>;
130
- }, "strip", z.ZodTypeAny, {
131
- costs: number;
132
- countryCode?: string | undefined;
133
- industryCode?: string | undefined;
134
- }, {
135
- countryCode?: string | undefined;
136
- industryCode?: string | undefined;
137
- costs?: number | undefined;
138
- }>, "many">>>;
139
- employeesFractions: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
140
- countryCode: z.ZodOptional<z.ZodString>;
141
- percentage: z.ZodNumber;
142
- }, "strip", z.ZodTypeAny, {
143
- percentage: number;
144
- countryCode?: string | undefined;
145
- }, {
146
- percentage: number;
147
- countryCode?: string | undefined;
148
- }>, "many">>>;
149
- industrySectors: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
150
- industryCode: z.ZodOptional<z.ZodString>;
151
- amountOfTotalTurnover: z.ZodNumber;
152
- description: z.ZodDefault<z.ZodString>;
153
- }, "strip", z.ZodTypeAny, {
154
- description: string;
155
- amountOfTotalTurnover: number;
156
- industryCode?: string | undefined;
157
- }, {
158
- amountOfTotalTurnover: number;
159
- description?: string | undefined;
160
- industryCode?: string | undefined;
161
- }>, "many">>>;
162
- mainOriginOfOtherSuppliers: z.ZodOptional<z.ZodOptional<z.ZodString>>;
163
- }, "strip", z.ZodTypeAny, {
164
- totalPurchaseFromSuppliers?: number | undefined;
165
- totalStaffCosts?: number | undefined;
166
- profit?: number | undefined;
167
- financialCosts?: number | undefined;
168
- incomeFromFinancialInvestments?: number | undefined;
169
- additionsToFixedAssets?: number | undefined;
170
- turnover?: number | undefined;
171
- totalAssets?: number | undefined;
172
- financialAssetsAndCashBalance?: number | undefined;
173
- numberOfEmployees?: number | undefined;
174
- hasCanteen?: boolean | undefined;
175
- averageJourneyToWorkForStaffInKm?: number | undefined;
176
- isB2B?: boolean | undefined;
177
- supplyFractions?: {
178
- costs: number;
179
- countryCode?: string | undefined;
180
- industryCode?: string | undefined;
181
- }[] | undefined;
182
- employeesFractions?: {
183
- percentage: number;
184
- countryCode?: string | undefined;
185
- }[] | undefined;
186
- industrySectors?: {
187
- description: string;
188
- amountOfTotalTurnover: number;
189
- industryCode?: string | undefined;
190
- }[] | undefined;
191
- mainOriginOfOtherSuppliers?: string | undefined;
192
- }, {
193
- totalPurchaseFromSuppliers?: number | undefined;
194
- totalStaffCosts?: number | undefined;
195
- profit?: number | undefined;
196
- financialCosts?: number | undefined;
197
- incomeFromFinancialInvestments?: number | undefined;
198
- additionsToFixedAssets?: number | undefined;
199
- turnover?: number | undefined;
200
- totalAssets?: number | undefined;
201
- financialAssetsAndCashBalance?: number | undefined;
202
- numberOfEmployees?: number | undefined;
203
- hasCanteen?: boolean | undefined;
204
- averageJourneyToWorkForStaffInKm?: number | undefined;
205
- isB2B?: boolean | undefined;
206
- supplyFractions?: {
207
- countryCode?: string | undefined;
208
- industryCode?: string | undefined;
209
- costs?: number | undefined;
210
- }[] | undefined;
211
- employeesFractions?: {
212
- percentage: number;
213
- countryCode?: string | undefined;
214
- }[] | undefined;
215
- industrySectors?: {
216
- amountOfTotalTurnover: number;
217
- description?: string | undefined;
218
- industryCode?: string | undefined;
219
- }[] | undefined;
220
- mainOriginOfOtherSuppliers?: string | undefined;
221
- }>;
222
- export declare const CompanyFactsResponseBodySchema: z.ZodObject<{
223
- totalPurchaseFromSuppliers: z.ZodDefault<z.ZodNumber>;
224
- totalStaffCosts: z.ZodDefault<z.ZodNumber>;
225
- profit: z.ZodDefault<z.ZodNumber>;
226
- financialCosts: z.ZodDefault<z.ZodNumber>;
227
- incomeFromFinancialInvestments: z.ZodDefault<z.ZodNumber>;
228
- additionsToFixedAssets: z.ZodDefault<z.ZodNumber>;
229
- turnover: z.ZodDefault<z.ZodNumber>;
230
- totalAssets: z.ZodDefault<z.ZodNumber>;
231
- financialAssetsAndCashBalance: z.ZodDefault<z.ZodNumber>;
232
- numberOfEmployees: z.ZodDefault<z.ZodNumber>;
233
- hasCanteen: z.ZodOptional<z.ZodBoolean>;
234
- averageJourneyToWorkForStaffInKm: z.ZodDefault<z.ZodNumber>;
235
- isB2B: z.ZodBoolean;
236
- supplyFractions: z.ZodArray<z.ZodObject<{
237
- countryCode: z.ZodOptional<z.ZodString>;
238
- industryCode: z.ZodOptional<z.ZodString>;
239
- costs: z.ZodDefault<z.ZodNumber>;
240
- }, "strip", z.ZodTypeAny, {
241
- costs: number;
242
- countryCode?: string | undefined;
243
- industryCode?: string | undefined;
244
- }, {
245
- countryCode?: string | undefined;
246
- industryCode?: string | undefined;
247
- costs?: number | undefined;
248
- }>, "many">;
249
- employeesFractions: z.ZodArray<z.ZodObject<{
250
- countryCode: z.ZodOptional<z.ZodString>;
251
- percentage: z.ZodNumber;
252
- }, "strip", z.ZodTypeAny, {
253
- percentage: number;
254
- countryCode?: string | undefined;
255
- }, {
256
- percentage: number;
257
- countryCode?: string | undefined;
258
- }>, "many">;
259
- industrySectors: z.ZodArray<z.ZodObject<{
260
- industryCode: z.ZodOptional<z.ZodString>;
261
- amountOfTotalTurnover: z.ZodNumber;
262
- description: z.ZodDefault<z.ZodString>;
263
- }, "strip", z.ZodTypeAny, {
264
- description: string;
265
- amountOfTotalTurnover: number;
266
- industryCode?: string | undefined;
267
- }, {
268
- amountOfTotalTurnover: number;
269
- description?: string | undefined;
270
- industryCode?: string | undefined;
271
- }>, "many">;
272
- mainOriginOfOtherSuppliers: z.ZodObject<{
273
- countryCode: z.ZodOptional<z.ZodString>;
274
- costs: z.ZodNumber;
275
- }, "strip", z.ZodTypeAny, {
276
- costs: number;
277
- countryCode?: string | undefined;
278
- }, {
279
- costs: number;
280
- countryCode?: string | undefined;
281
- }>;
282
- }, "strip", z.ZodTypeAny, {
283
- totalPurchaseFromSuppliers: number;
284
- totalStaffCosts: number;
285
- profit: number;
286
- financialCosts: number;
287
- incomeFromFinancialInvestments: number;
288
- additionsToFixedAssets: number;
289
- turnover: number;
290
- totalAssets: number;
291
- financialAssetsAndCashBalance: number;
292
- numberOfEmployees: number;
293
- averageJourneyToWorkForStaffInKm: number;
294
- isB2B: boolean;
295
- supplyFractions: {
296
- costs: number;
297
- countryCode?: string | undefined;
298
- industryCode?: string | undefined;
299
- }[];
300
- employeesFractions: {
301
- percentage: number;
302
- countryCode?: string | undefined;
303
- }[];
304
- industrySectors: {
305
- description: string;
306
- amountOfTotalTurnover: number;
307
- industryCode?: string | undefined;
308
- }[];
309
- mainOriginOfOtherSuppliers: {
310
- costs: number;
311
- countryCode?: string | undefined;
312
- };
313
- hasCanteen?: boolean | undefined;
314
- }, {
315
- isB2B: boolean;
316
- supplyFractions: {
317
- countryCode?: string | undefined;
318
- industryCode?: string | undefined;
319
- costs?: number | undefined;
320
- }[];
321
- employeesFractions: {
322
- percentage: number;
323
- countryCode?: string | undefined;
324
- }[];
325
- industrySectors: {
326
- amountOfTotalTurnover: number;
327
- description?: string | undefined;
328
- industryCode?: string | undefined;
329
- }[];
330
- mainOriginOfOtherSuppliers: {
331
- costs: number;
332
- countryCode?: string | undefined;
333
- };
334
- totalPurchaseFromSuppliers?: number | undefined;
335
- totalStaffCosts?: number | undefined;
336
- profit?: number | undefined;
337
- financialCosts?: number | undefined;
338
- incomeFromFinancialInvestments?: number | undefined;
339
- additionsToFixedAssets?: number | undefined;
340
- turnover?: number | undefined;
341
- totalAssets?: number | undefined;
342
- financialAssetsAndCashBalance?: number | undefined;
343
- numberOfEmployees?: number | undefined;
344
- hasCanteen?: boolean | undefined;
345
- averageJourneyToWorkForStaffInKm?: number | undefined;
346
- }>;
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CompanyFactsResponseBodySchema = exports.CompanyFactsPatchRequestBodySchema = exports.CompanyFactsCreateRequestBodySchema = void 0;
4
- const zod_1 = require("zod");
5
- const shared_schemas_1 = require("./shared.schemas");
6
- const SupplyFractionRequestBodySchema = zod_1.z.object({
7
- countryCode: shared_schemas_1.isCountryCode.optional(),
8
- industryCode: shared_schemas_1.isIndustryCode.optional(),
9
- costs: shared_schemas_1.isPositiveNumber,
10
- });
11
- const EmployeesFractionRequestBodySchema = zod_1.z.object({
12
- countryCode: shared_schemas_1.isCountryCode.optional(),
13
- percentage: shared_schemas_1.isPercentage,
14
- });
15
- const IndustrySectorRequestBodySchema = zod_1.z.object({
16
- industryCode: shared_schemas_1.isIndustryCode.optional(),
17
- amountOfTotalTurnover: shared_schemas_1.isPercentage,
18
- description: zod_1.z.string().default(''),
19
- });
20
- const CompanyFactsRequestBodySchema = zod_1.z.object({
21
- totalPurchaseFromSuppliers: shared_schemas_1.isPositiveNumber,
22
- totalStaffCosts: shared_schemas_1.isPositiveNumber,
23
- profit: shared_schemas_1.isNumberWithDefaultZero,
24
- financialCosts: shared_schemas_1.isPositiveNumber,
25
- incomeFromFinancialInvestments: shared_schemas_1.isNumberWithDefaultZero,
26
- additionsToFixedAssets: shared_schemas_1.isNumberWithDefaultZero,
27
- turnover: shared_schemas_1.isPositiveNumber,
28
- totalAssets: shared_schemas_1.isPositiveNumber,
29
- financialAssetsAndCashBalance: shared_schemas_1.isPositiveNumber,
30
- numberOfEmployees: shared_schemas_1.isPositiveNumber,
31
- hasCanteen: zod_1.z.oboolean(),
32
- averageJourneyToWorkForStaffInKm: shared_schemas_1.isPositiveNumber,
33
- isB2B: zod_1.z.boolean().default(false),
34
- supplyFractions: SupplyFractionRequestBodySchema.array().default([]),
35
- employeesFractions: EmployeesFractionRequestBodySchema.array().default([]),
36
- industrySectors: IndustrySectorRequestBodySchema.array().default([]),
37
- mainOriginOfOtherSuppliers: shared_schemas_1.isCountryCode.optional(),
38
- });
39
- exports.CompanyFactsCreateRequestBodySchema = CompanyFactsRequestBodySchema;
40
- exports.CompanyFactsPatchRequestBodySchema = CompanyFactsRequestBodySchema.partial();
41
- exports.CompanyFactsResponseBodySchema = zod_1.z.object({
42
- totalPurchaseFromSuppliers: shared_schemas_1.isPositiveNumber,
43
- totalStaffCosts: shared_schemas_1.isPositiveNumber,
44
- profit: shared_schemas_1.isNumberWithDefaultZero,
45
- financialCosts: shared_schemas_1.isPositiveNumber,
46
- incomeFromFinancialInvestments: shared_schemas_1.isNumberWithDefaultZero,
47
- additionsToFixedAssets: shared_schemas_1.isNumberWithDefaultZero,
48
- turnover: shared_schemas_1.isPositiveNumber,
49
- totalAssets: shared_schemas_1.isPositiveNumber,
50
- financialAssetsAndCashBalance: shared_schemas_1.isPositiveNumber,
51
- numberOfEmployees: shared_schemas_1.isPositiveNumber,
52
- hasCanteen: zod_1.z.oboolean(),
53
- averageJourneyToWorkForStaffInKm: shared_schemas_1.isPositiveNumber,
54
- isB2B: zod_1.z.boolean(),
55
- supplyFractions: SupplyFractionRequestBodySchema.array(),
56
- employeesFractions: EmployeesFractionRequestBodySchema.array(),
57
- industrySectors: IndustrySectorRequestBodySchema.array(),
58
- mainOriginOfOtherSuppliers: zod_1.z.object({
59
- countryCode: shared_schemas_1.isCountryCode.optional(),
60
- costs: zod_1.z.number(),
61
- }),
62
- });
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const IndustryResponseBodySchema: z.ZodObject<{
3
- industryCode: z.ZodString;
4
- industryName: z.ZodString;
5
- }, "strip", z.ZodTypeAny, {
6
- industryCode: string;
7
- industryName: string;
8
- }, {
9
- industryCode: string;
10
- industryName: string;
11
- }>;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IndustryResponseBodySchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.IndustryResponseBodySchema = zod_1.z.object({
6
- industryCode: zod_1.z.string(),
7
- industryName: zod_1.z.string(),
8
- });
@@ -1,68 +0,0 @@
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
- }>;
24
- export declare const MatrixBodySchema: z.ZodObject<{
25
- ratings: z.ZodArray<z.ZodObject<{
26
- shortName: z.ZodString;
27
- name: z.ZodString;
28
- points: z.ZodNumber;
29
- maxPoints: z.ZodDefault<z.ZodNumber>;
30
- percentageReached: z.ZodOptional<z.ZodNumber>;
31
- notApplicable: z.ZodBoolean;
32
- }, "strip", z.ZodTypeAny, {
33
- name: string;
34
- shortName: string;
35
- points: number;
36
- maxPoints: number;
37
- notApplicable: boolean;
38
- percentageReached?: number | undefined;
39
- }, {
40
- name: string;
41
- shortName: string;
42
- points: number;
43
- notApplicable: boolean;
44
- maxPoints?: number | undefined;
45
- percentageReached?: number | undefined;
46
- }>, "many">;
47
- totalPoints: z.ZodNumber;
48
- }, "strip", z.ZodTypeAny, {
49
- ratings: {
50
- name: string;
51
- shortName: string;
52
- points: number;
53
- maxPoints: number;
54
- notApplicable: boolean;
55
- percentageReached?: number | undefined;
56
- }[];
57
- totalPoints: number;
58
- }, {
59
- ratings: {
60
- name: string;
61
- shortName: string;
62
- points: number;
63
- notApplicable: boolean;
64
- maxPoints?: number | undefined;
65
- percentageReached?: number | undefined;
66
- }[];
67
- totalPoints: number;
68
- }>;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MatrixBodySchema = exports.MatrixRatingBodySchema = void 0;
4
- const zod_1 = require("zod");
5
- const shared_schemas_1 = require("./shared.schemas");
6
- exports.MatrixRatingBodySchema = zod_1.z.object({
7
- shortName: zod_1.z.string(),
8
- name: zod_1.z.string(),
9
- points: zod_1.z.number(),
10
- maxPoints: shared_schemas_1.isPositiveNumber,
11
- percentageReached: shared_schemas_1.isPercentage.optional(),
12
- notApplicable: zod_1.z.boolean(),
13
- });
14
- exports.MatrixBodySchema = zod_1.z.object({
15
- ratings: exports.MatrixRatingBodySchema.array(),
16
- totalPoints: zod_1.z.number(),
17
- });
@@ -1,88 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const OrganizationRequestSchema: z.ZodObject<{
3
- name: z.ZodString;
4
- address: z.ZodObject<{
5
- city: z.ZodString;
6
- houseNumber: z.ZodString;
7
- street: z.ZodString;
8
- zip: z.ZodString;
9
- }, "strip", z.ZodTypeAny, {
10
- city: string;
11
- houseNumber: string;
12
- street: string;
13
- zip: string;
14
- }, {
15
- city: string;
16
- houseNumber: string;
17
- street: string;
18
- zip: string;
19
- }>;
20
- }, "strip", z.ZodTypeAny, {
21
- name: string;
22
- address: {
23
- city: string;
24
- houseNumber: string;
25
- street: string;
26
- zip: string;
27
- };
28
- }, {
29
- name: string;
30
- address: {
31
- city: string;
32
- houseNumber: string;
33
- street: string;
34
- zip: string;
35
- };
36
- }>;
37
- export declare const OrganizationResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
38
- name: z.ZodString;
39
- address: z.ZodObject<{
40
- city: z.ZodString;
41
- houseNumber: z.ZodString;
42
- street: z.ZodString;
43
- zip: z.ZodString;
44
- }, "strip", z.ZodTypeAny, {
45
- city: string;
46
- houseNumber: string;
47
- street: string;
48
- zip: string;
49
- }, {
50
- city: string;
51
- houseNumber: string;
52
- street: string;
53
- zip: string;
54
- }>;
55
- }, {
56
- id: z.ZodNumber;
57
- invitations: z.ZodArray<z.ZodString, "many">;
58
- }>, "strip", z.ZodTypeAny, {
59
- name: string;
60
- id: number;
61
- address: {
62
- city: string;
63
- houseNumber: string;
64
- street: string;
65
- zip: string;
66
- };
67
- invitations: string[];
68
- }, {
69
- name: string;
70
- id: number;
71
- address: {
72
- city: string;
73
- houseNumber: string;
74
- street: string;
75
- zip: string;
76
- };
77
- invitations: string[];
78
- }>;
79
- export declare const OrganizationItemsResponseSchema: z.ZodArray<z.ZodObject<{
80
- id: z.ZodNumber;
81
- name: z.ZodString;
82
- }, "strip", z.ZodTypeAny, {
83
- name: string;
84
- id: number;
85
- }, {
86
- name: string;
87
- id: number;
88
- }>, "many">;
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OrganizationItemsResponseSchema = exports.OrganizationResponseSchema = exports.OrganizationRequestSchema = void 0;
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 });
9
- exports.OrganizationRequestSchema = zod_1.z.object({
10
- name: isNonEmptyString,
11
- address: zod_1.z.object({
12
- city: isNonEmptyString,
13
- houseNumber: isNonEmptyString,
14
- street: isNonEmptyString,
15
- zip: isNonEmptyString,
16
- }),
17
- });
18
- exports.OrganizationResponseSchema = exports.OrganizationRequestSchema.extend({
19
- id: zod_1.z.number(),
20
- invitations: zod_1.z.string().email().array(),
21
- });
22
- exports.OrganizationItemsResponseSchema = zod_1.z
23
- .object({ id: zod_1.z.number(), name: isNonEmptyString })
24
- .array();