@fiado/type-kit 2.0.27 → 2.0.29
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/bin/address/dtos/AddressBase.js +2 -1
- package/bin/address/enums/ValidateAddressErrorCodeEnum.d.ts +2 -1
- package/bin/address/enums/ValidateAddressErrorCodeEnum.js +1 -0
- package/package.json +1 -1
- package/src/address/dtos/AddressBase.ts +2 -1
- package/src/address/enums/ValidateAddressErrorCodeEnum.ts +1 -0
|
@@ -17,6 +17,7 @@ const AddressStatus_1 = require("../enums/AddressStatus");
|
|
|
17
17
|
const Place_1 = require("./Place");
|
|
18
18
|
const CountryId_1 = require("../../country/enums/CountryId");
|
|
19
19
|
const regex_1 = require("../../helpers/constans/regex");
|
|
20
|
+
const country_1 = require("../../country");
|
|
20
21
|
class AddressBase {
|
|
21
22
|
}
|
|
22
23
|
exports.AddressBase = AddressBase;
|
|
@@ -158,6 +159,6 @@ __decorate([
|
|
|
158
159
|
__metadata("design:type", String)
|
|
159
160
|
], AddressBase.prototype, "postalCode", void 0);
|
|
160
161
|
__decorate([
|
|
161
|
-
(0, class_validator_1.IsEnum)(
|
|
162
|
+
(0, class_validator_1.IsEnum)(country_1.CountryISO2ToISO3),
|
|
162
163
|
__metadata("design:type", String)
|
|
163
164
|
], AddressBase.prototype, "country", void 0);
|
|
@@ -9,5 +9,6 @@ export declare enum ValidateAddressErrorCodeEnum {
|
|
|
9
9
|
ADDRESS_INCOMPLETE_SECONDARY = "ADDRESS_INCOMPLETE_SECONDARY",
|
|
10
10
|
ADDRESS_INCOMPLETE_PO_BOX = "ADDRESS_INCOMPLETE_PO_BOX",
|
|
11
11
|
ADDRESS_VACANT = "ADDRESS_VACANT",
|
|
12
|
-
ADDRESS_UNKNOWN = "ADDRESS_UNKNOWN"
|
|
12
|
+
ADDRESS_UNKNOWN = "ADDRESS_UNKNOWN",
|
|
13
|
+
ADDRESS_NOT_RESIDENTIAL = "ADDRESS_NOT_RESIDENTIAL"
|
|
13
14
|
}
|
|
@@ -14,4 +14,5 @@ var ValidateAddressErrorCodeEnum;
|
|
|
14
14
|
ValidateAddressErrorCodeEnum["ADDRESS_INCOMPLETE_PO_BOX"] = "ADDRESS_INCOMPLETE_PO_BOX";
|
|
15
15
|
ValidateAddressErrorCodeEnum["ADDRESS_VACANT"] = "ADDRESS_VACANT";
|
|
16
16
|
ValidateAddressErrorCodeEnum["ADDRESS_UNKNOWN"] = "ADDRESS_UNKNOWN";
|
|
17
|
+
ValidateAddressErrorCodeEnum["ADDRESS_NOT_RESIDENTIAL"] = "ADDRESS_NOT_RESIDENTIAL";
|
|
17
18
|
})(ValidateAddressErrorCodeEnum || (exports.ValidateAddressErrorCodeEnum = ValidateAddressErrorCodeEnum = {}));
|
package/package.json
CHANGED
|
@@ -8,6 +8,7 @@ import { AddressStatus } from "../enums/AddressStatus";
|
|
|
8
8
|
import { Place } from "./Place";
|
|
9
9
|
import { CountryId } from '../../country/enums/CountryId';
|
|
10
10
|
import { regexIso8601, regexUuidV4 } from '../../helpers/constans/regex';
|
|
11
|
+
import { CountryISO2ToISO3 } from '../../country';
|
|
11
12
|
|
|
12
13
|
export class AddressBase {
|
|
13
14
|
|
|
@@ -126,6 +127,6 @@ export class AddressBase {
|
|
|
126
127
|
@Length(5, 10)
|
|
127
128
|
postalCode?: string;
|
|
128
129
|
|
|
129
|
-
@IsEnum(
|
|
130
|
+
@IsEnum(CountryISO2ToISO3)
|
|
130
131
|
country: string;
|
|
131
132
|
}
|