@ecogood/e-calculator-schemas 1.5.3 → 1.5.5

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.
@@ -53,6 +53,7 @@ export declare const OrganizationResponseSchema: z.ZodObject<{
53
53
  }>;
54
54
  name: z.ZodString;
55
55
  id: z.ZodNumber;
56
+ invitations: z.ZodArray<z.ZodString, "many">;
56
57
  }, "strip", z.ZodTypeAny, {
57
58
  id: number;
58
59
  address: {
@@ -62,6 +63,7 @@ export declare const OrganizationResponseSchema: z.ZodObject<{
62
63
  zip: string;
63
64
  };
64
65
  name: string;
66
+ invitations: string[];
65
67
  }, {
66
68
  id: number;
67
69
  address: {
@@ -71,6 +73,7 @@ export declare const OrganizationResponseSchema: z.ZodObject<{
71
73
  zip: string;
72
74
  };
73
75
  name: string;
76
+ invitations: string[];
74
77
  }>;
75
78
  export declare const OrganizationItemsResponseSchema: z.ZodArray<z.ZodObject<{
76
79
  id: z.ZodNumber;
@@ -17,6 +17,7 @@ exports.OrganizationRequestSchema = zod_1.z.object({
17
17
  });
18
18
  exports.OrganizationResponseSchema = exports.OrganizationRequestSchema.extend({
19
19
  id: zod_1.z.number(),
20
+ invitations: zod_1.z.string().email().array(),
20
21
  });
21
22
  exports.OrganizationItemsResponseSchema = zod_1.z
22
23
  .object({ id: zod_1.z.number(), name: isNonEmptyString })
@@ -9,6 +9,7 @@ export declare enum BalanceSheetVersion {
9
9
  v5_0_6 = "5.06",
10
10
  v5_0_8 = "5.08"
11
11
  }
12
+ export declare const WEIGHT_VALUES: number[];
12
13
  export declare const isWeight: z.ZodEffects<z.ZodNumber, number, number>;
13
14
  export declare const isWeightOptional: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
14
15
  export declare const isNumberWithDefaultZero: z.ZodDefault<z.ZodNumber>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isPercentage = exports.isPositiveNumber = exports.isNumberWithDefaultZero = exports.isWeightOptional = exports.isWeight = exports.BalanceSheetVersion = exports.BalanceSheetType = exports.isIndustryCode = exports.isCountryCode = void 0;
3
+ exports.isPercentage = exports.isPositiveNumber = exports.isNumberWithDefaultZero = exports.isWeightOptional = exports.isWeight = exports.WEIGHT_VALUES = exports.BalanceSheetVersion = exports.BalanceSheetType = exports.isIndustryCode = exports.isCountryCode = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.isCountryCode = zod_1.z.string().min(3).max(3);
6
6
  exports.isIndustryCode = zod_1.z.string().min(1).max(4);
@@ -20,11 +20,11 @@ const isNumberCustomError = zod_1.z.number({
20
20
  invalid_type_error: 'Number expected',
21
21
  required_error: 'Number expected',
22
22
  });
23
- const WEIGHT_VALUES = [0, 0.5, 1, 1.5, 2];
23
+ exports.WEIGHT_VALUES = [0, 0.5, 1, 1.5, 2];
24
24
  exports.isWeight = zod_1.z
25
25
  .number()
26
- .refine((v) => WEIGHT_VALUES.some((w) => w === v), {
27
- message: `Weight has to be one of the following values ${WEIGHT_VALUES}`,
26
+ .refine((v) => exports.WEIGHT_VALUES.some((w) => w === v), {
27
+ message: `Weight has to be one of the following values ${exports.WEIGHT_VALUES}`,
28
28
  });
29
29
  exports.isWeightOptional = exports.isWeight.optional();
30
30
  exports.isNumberWithDefaultZero = isNumberCustomError.default(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecogood/e-calculator-schemas",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
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",