@fiado/type-kit 2.0.18 → 2.0.19
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/SuggestedAddress.d.ts +25 -0
- package/bin/address/dtos/SuggestedAddress.js +118 -0
- package/bin/address/dtos/ValidateAddressResponse.d.ts +2 -2
- package/bin/address/dtos/ValidateAddressResult.d.ts +1 -1
- package/package.json +1 -1
- package/src/address/dtos/SuggestedAddress.ts +88 -0
- package/src/address/dtos/ValidateAddressResponse.ts +2 -2
- package/src/address/dtos/ValidateAddressResult.ts +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AddressProvider } from "../enums/AddressProvider";
|
|
2
|
+
import { Place } from "./Place";
|
|
3
|
+
import { CountryId } from '../../country/enums/CountryId';
|
|
4
|
+
export declare class SuggestedAddress {
|
|
5
|
+
distance?: number;
|
|
6
|
+
isPrincipal: boolean;
|
|
7
|
+
tag?: string;
|
|
8
|
+
tenantId?: string;
|
|
9
|
+
typeOfAddressId?: string;
|
|
10
|
+
provider?: AddressProvider;
|
|
11
|
+
place: Place;
|
|
12
|
+
additionalInformation?: string;
|
|
13
|
+
helpNeeded: boolean;
|
|
14
|
+
internalNumber?: string;
|
|
15
|
+
countryId: CountryId;
|
|
16
|
+
street?: string;
|
|
17
|
+
addressNumber?: string;
|
|
18
|
+
municipality?: string;
|
|
19
|
+
subMunicipality?: string;
|
|
20
|
+
neighborhood?: string;
|
|
21
|
+
subRegion?: string;
|
|
22
|
+
region?: string;
|
|
23
|
+
postalCode?: string;
|
|
24
|
+
country: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SuggestedAddress = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const AddressProvider_1 = require("../enums/AddressProvider");
|
|
15
|
+
const Place_1 = require("./Place");
|
|
16
|
+
const CountryId_1 = require("../../country/enums/CountryId");
|
|
17
|
+
class SuggestedAddress {
|
|
18
|
+
}
|
|
19
|
+
exports.SuggestedAddress = SuggestedAddress;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsNumber)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
__metadata("design:type", Number)
|
|
24
|
+
], SuggestedAddress.prototype, "distance", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsBoolean)(),
|
|
27
|
+
__metadata("design:type", Boolean)
|
|
28
|
+
], SuggestedAddress.prototype, "isPrincipal", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.Length)(1, 100),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], SuggestedAddress.prototype, "tag", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
(0, class_validator_1.Length)(1, 100),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], SuggestedAddress.prototype, "tenantId", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], SuggestedAddress.prototype, "typeOfAddressId", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsEnum)(AddressProvider_1.AddressProvider),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], SuggestedAddress.prototype, "provider", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.ValidateNested)(),
|
|
50
|
+
__metadata("design:type", Place_1.Place)
|
|
51
|
+
], SuggestedAddress.prototype, "place", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
(0, class_validator_1.Length)(1, 200),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], SuggestedAddress.prototype, "additionalInformation", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsBoolean)(),
|
|
60
|
+
__metadata("design:type", Boolean)
|
|
61
|
+
], SuggestedAddress.prototype, "helpNeeded", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
(0, class_validator_1.IsString)(),
|
|
65
|
+
(0, class_validator_1.Length)(1, 10),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], SuggestedAddress.prototype, "internalNumber", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsEnum)(CountryId_1.CountryId),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], SuggestedAddress.prototype, "countryId", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_validator_1.IsString)(),
|
|
74
|
+
(0, class_validator_1.Length)(1, 100),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], SuggestedAddress.prototype, "street", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsString)(),
|
|
79
|
+
(0, class_validator_1.Length)(1, 10),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], SuggestedAddress.prototype, "addressNumber", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_1.IsString)(),
|
|
85
|
+
(0, class_validator_1.Length)(2, 60),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], SuggestedAddress.prototype, "municipality", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
(0, class_validator_1.IsString)(),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], SuggestedAddress.prototype, "subMunicipality", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.IsOptional)(),
|
|
95
|
+
(0, class_validator_1.IsString)(),
|
|
96
|
+
(0, class_validator_1.Length)(2, 60),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], SuggestedAddress.prototype, "neighborhood", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
(0, class_validator_1.IsString)(),
|
|
102
|
+
(0, class_validator_1.Length)(2, 60),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], SuggestedAddress.prototype, "subRegion", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, class_validator_1.IsString)(),
|
|
107
|
+
(0, class_validator_1.Length)(5, 10),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], SuggestedAddress.prototype, "region", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, class_validator_1.IsString)(),
|
|
112
|
+
(0, class_validator_1.Length)(5, 10),
|
|
113
|
+
__metadata("design:type", String)
|
|
114
|
+
], SuggestedAddress.prototype, "postalCode", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, class_validator_1.IsEnum)(CountryId_1.CountryId),
|
|
117
|
+
__metadata("design:type", String)
|
|
118
|
+
], SuggestedAddress.prototype, "country", void 0);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ValidateAddressResult } from "./ValidateAddressResult";
|
|
2
|
-
import {
|
|
2
|
+
import { SuggestedAddress } from "./SuggestedAddress";
|
|
3
3
|
export declare class ValidateAddressResponse {
|
|
4
4
|
validationResult: ValidateAddressResult;
|
|
5
|
-
suggestedAddresses
|
|
5
|
+
suggestedAddresses?: SuggestedAddress[];
|
|
6
6
|
}
|
|
@@ -2,5 +2,5 @@ import { ValidateAddressStatusEnum } from "../enums/ValidateAddressStatusEnum";
|
|
|
2
2
|
import { ValidateAddressErrorCodeEnum } from "../enums/ValidateAddressErrorCodeEnum";
|
|
3
3
|
export declare class ValidateAddressResult {
|
|
4
4
|
validationStatus: ValidateAddressStatusEnum;
|
|
5
|
-
validationCodeError
|
|
5
|
+
validationCodeError?: ValidateAddressErrorCodeEnum;
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
import { IsBoolean, IsEnum, IsNumber, IsOptional, IsString, Length, ValidateNested } from 'class-validator';
|
|
4
|
+
import { AddressProvider } from "../enums/AddressProvider";
|
|
5
|
+
import { Place } from "./Place";
|
|
6
|
+
import { CountryId } from '../../country/enums/CountryId';
|
|
7
|
+
|
|
8
|
+
export class SuggestedAddress {
|
|
9
|
+
|
|
10
|
+
@IsNumber()
|
|
11
|
+
@IsOptional()
|
|
12
|
+
distance?: number;
|
|
13
|
+
|
|
14
|
+
@IsBoolean()
|
|
15
|
+
isPrincipal: boolean;
|
|
16
|
+
|
|
17
|
+
@IsOptional()
|
|
18
|
+
@IsString()
|
|
19
|
+
@Length(1, 100)
|
|
20
|
+
tag?: string;
|
|
21
|
+
|
|
22
|
+
@IsString()
|
|
23
|
+
@Length(1, 100)
|
|
24
|
+
tenantId?: string;
|
|
25
|
+
|
|
26
|
+
@IsString()
|
|
27
|
+
typeOfAddressId?: string;
|
|
28
|
+
|
|
29
|
+
@IsEnum(AddressProvider)
|
|
30
|
+
provider?: AddressProvider;
|
|
31
|
+
|
|
32
|
+
@ValidateNested()
|
|
33
|
+
place: Place;
|
|
34
|
+
|
|
35
|
+
@IsOptional()
|
|
36
|
+
@IsString()
|
|
37
|
+
@Length(1, 200)
|
|
38
|
+
additionalInformation?: string;
|
|
39
|
+
|
|
40
|
+
@IsBoolean()
|
|
41
|
+
helpNeeded: boolean;
|
|
42
|
+
|
|
43
|
+
@IsOptional()
|
|
44
|
+
@IsString()
|
|
45
|
+
@Length(1, 10)
|
|
46
|
+
internalNumber?: string;
|
|
47
|
+
|
|
48
|
+
@IsEnum(CountryId)
|
|
49
|
+
countryId: CountryId;
|
|
50
|
+
|
|
51
|
+
@IsString()
|
|
52
|
+
@Length(1, 100)
|
|
53
|
+
street?: string;
|
|
54
|
+
|
|
55
|
+
@IsString()
|
|
56
|
+
@Length(1, 10)
|
|
57
|
+
addressNumber?: string;
|
|
58
|
+
|
|
59
|
+
@IsOptional()
|
|
60
|
+
@IsString()
|
|
61
|
+
@Length(2, 60)
|
|
62
|
+
municipality?: string;
|
|
63
|
+
|
|
64
|
+
@IsOptional()
|
|
65
|
+
@IsString()
|
|
66
|
+
subMunicipality?: string;
|
|
67
|
+
|
|
68
|
+
@IsOptional()
|
|
69
|
+
@IsString()
|
|
70
|
+
@Length(2, 60)
|
|
71
|
+
neighborhood?: string;
|
|
72
|
+
|
|
73
|
+
@IsOptional()
|
|
74
|
+
@IsString()
|
|
75
|
+
@Length(2, 60)
|
|
76
|
+
subRegion?: string;
|
|
77
|
+
|
|
78
|
+
@IsString()
|
|
79
|
+
@Length(5, 10)
|
|
80
|
+
region?: string;
|
|
81
|
+
|
|
82
|
+
@IsString()
|
|
83
|
+
@Length(5, 10)
|
|
84
|
+
postalCode?: string;
|
|
85
|
+
|
|
86
|
+
@IsEnum(CountryId)
|
|
87
|
+
country: string;
|
|
88
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ValidateAddressResult } from "./ValidateAddressResult";
|
|
2
|
-
import {
|
|
2
|
+
import { SuggestedAddress } from "./SuggestedAddress"
|
|
3
3
|
|
|
4
4
|
export class ValidateAddressResponse {
|
|
5
5
|
validationResult: ValidateAddressResult
|
|
6
|
-
suggestedAddresses
|
|
6
|
+
suggestedAddresses?: SuggestedAddress[];
|
|
7
7
|
}
|
|
@@ -3,5 +3,5 @@ import { ValidateAddressErrorCodeEnum } from "../enums/ValidateAddressErrorCodeE
|
|
|
3
3
|
|
|
4
4
|
export class ValidateAddressResult {
|
|
5
5
|
validationStatus: ValidateAddressStatusEnum;
|
|
6
|
-
validationCodeError
|
|
6
|
+
validationCodeError?: ValidateAddressErrorCodeEnum;
|
|
7
7
|
}
|