@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.
@@ -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)(CountryId_1.CountryId),
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "2.0.27",
3
+ "version": "2.0.29",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -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(CountryId)
130
+ @IsEnum(CountryISO2ToISO3)
130
131
  country: string;
131
132
  }
@@ -11,4 +11,5 @@ export enum ValidateAddressErrorCodeEnum {
11
11
  ADDRESS_INCOMPLETE_PO_BOX = "ADDRESS_INCOMPLETE_PO_BOX",
12
12
  ADDRESS_VACANT = "ADDRESS_VACANT",
13
13
  ADDRESS_UNKNOWN = "ADDRESS_UNKNOWN",
14
+ ADDRESS_NOT_RESIDENTIAL = "ADDRESS_NOT_RESIDENTIAL",
14
15
  }