@verisure-italy/zipcode-types 1.4.0 → 1.6.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/index.cjs +17 -7
- package/dist/index.d.cts +14 -9
- package/dist/index.d.ts +14 -9
- package/dist/index.js +15 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -20,17 +20,27 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
areaSchema: () => areaSchema,
|
|
24
|
+
enabledSchema: () => enabledSchema
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(index_exports);
|
|
27
27
|
|
|
28
|
-
// src/
|
|
28
|
+
// src/models.ts
|
|
29
|
+
var import_shared_types = require("@verisure-italy/shared-types");
|
|
29
30
|
var import_zod = require("zod");
|
|
30
|
-
var
|
|
31
|
-
|
|
31
|
+
var enabledSchema = import_zod.z.object({
|
|
32
|
+
zipCode: import_shared_types.zipCodeSchema
|
|
33
|
+
});
|
|
34
|
+
var areaSchema = import_zod.z.object({
|
|
35
|
+
id: import_zod.z.uuid(),
|
|
36
|
+
city: import_zod.z.string().min(2, "city.required"),
|
|
37
|
+
province: import_zod.z.string().min(2, "province.required").max(3, "province.bad_format"),
|
|
38
|
+
region: import_zod.z.string().min(2, "region.required"),
|
|
39
|
+
town: import_zod.z.string().min(2, "town.required"),
|
|
40
|
+
zipCode: import_shared_types.zipCodeSchema
|
|
41
|
+
});
|
|
32
42
|
// Annotate the CommonJS export names for ESM import in node:
|
|
33
43
|
0 && (module.exports = {
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
areaSchema,
|
|
45
|
+
enabledSchema
|
|
36
46
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
declare const enabledSchema: z.ZodObject<{
|
|
4
|
+
zipCode: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
type Enabled = z.infer<typeof enabledSchema>;
|
|
7
|
+
declare const areaSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodUUID;
|
|
9
|
+
city: z.ZodString;
|
|
10
|
+
province: z.ZodString;
|
|
11
|
+
region: z.ZodString;
|
|
12
|
+
town: z.ZodString;
|
|
13
|
+
zipCode: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type Area = z.infer<typeof areaSchema>;
|
|
11
16
|
|
|
12
|
-
export { type
|
|
17
|
+
export { type Area, type Enabled, areaSchema, enabledSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
declare const enabledSchema: z.ZodObject<{
|
|
4
|
+
zipCode: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
type Enabled = z.infer<typeof enabledSchema>;
|
|
7
|
+
declare const areaSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodUUID;
|
|
9
|
+
city: z.ZodString;
|
|
10
|
+
province: z.ZodString;
|
|
11
|
+
region: z.ZodString;
|
|
12
|
+
town: z.ZodString;
|
|
13
|
+
zipCode: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
type Area = z.infer<typeof areaSchema>;
|
|
11
16
|
|
|
12
|
-
export { type
|
|
17
|
+
export { type Area, type Enabled, areaSchema, enabledSchema };
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/models.ts
|
|
2
|
+
import { zipCodeSchema } from "@verisure-italy/shared-types";
|
|
2
3
|
import { z } from "zod";
|
|
3
|
-
var
|
|
4
|
-
|
|
4
|
+
var enabledSchema = z.object({
|
|
5
|
+
zipCode: zipCodeSchema
|
|
6
|
+
});
|
|
7
|
+
var areaSchema = z.object({
|
|
8
|
+
id: z.uuid(),
|
|
9
|
+
city: z.string().min(2, "city.required"),
|
|
10
|
+
province: z.string().min(2, "province.required").max(3, "province.bad_format"),
|
|
11
|
+
region: z.string().min(2, "region.required"),
|
|
12
|
+
town: z.string().min(2, "town.required"),
|
|
13
|
+
zipCode: zipCodeSchema
|
|
14
|
+
});
|
|
5
15
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
16
|
+
areaSchema,
|
|
17
|
+
enabledSchema
|
|
8
18
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verisure-italy/zipcode-types",
|
|
3
3
|
"description": "Types for ZipCode service",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.6.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"zod": "4.1.12",
|
|
22
|
-
"@verisure-italy/shared-types": "1.
|
|
22
|
+
"@verisure-italy/shared-types": "1.6.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "24.6.0",
|