@fiado/type-kit 2.0.0 → 2.0.3
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/.idea/aws.xml +11 -0
- package/.idea/fiado-type-kit.iml +9 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/bin/account/dtos/AccountCreateRequest.js +3 -0
- package/bin/address/dtos/Place.d.ts +2 -0
- package/bin/address/dtos/Place.js +16 -1
- package/bin/address/dtos/Timezone.d.ts +2 -2
- package/bin/address/dtos/Timezone.js +22 -0
- package/bin/collector/dtos/OrdersCollector.d.ts +18 -0
- package/bin/collector/dtos/OrdersCollector.js +2 -0
- package/package.json +1 -1
- package/src/account/dtos/AccountCreateRequest.ts +17 -16
- package/src/address/dtos/Place.ts +12 -0
- package/src/address/dtos/Timezone.ts +7 -3
package/.idea/aws.xml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="accountSettings">
|
|
4
|
+
<option name="activeRegion" value="us-east-1" />
|
|
5
|
+
<option name="recentlyUsedRegions">
|
|
6
|
+
<list>
|
|
7
|
+
<option value="us-east-1" />
|
|
8
|
+
</list>
|
|
9
|
+
</option>
|
|
10
|
+
</component>
|
|
11
|
+
</project>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
|
6
|
+
<orderEntry type="inheritedJdk" />
|
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
+
</component>
|
|
9
|
+
</module>
|
package/.idea/misc.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="corretto-21" project-jdk-type="JavaSDK">
|
|
4
|
+
<output url="file://$PROJECT_DIR$/out" />
|
|
5
|
+
</component>
|
|
6
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/fiado-type-kit.iml" filepath="$PROJECT_DIR$/.idea/fiado-type-kit.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
|
@@ -20,6 +20,7 @@ const identity_1 = require("../../identity");
|
|
|
20
20
|
const Profile_1 = require("../../directory/enums/Profile");
|
|
21
21
|
const AccountLevelEnum_1 = require("../enums/AccountLevelEnum");
|
|
22
22
|
const provider_1 = require("../../provider");
|
|
23
|
+
const class_transformer_1 = require("class-transformer");
|
|
23
24
|
class AccountCreateRequest {
|
|
24
25
|
}
|
|
25
26
|
exports.AccountCreateRequest = AccountCreateRequest;
|
|
@@ -82,6 +83,8 @@ __decorate([
|
|
|
82
83
|
], AccountCreateRequest.prototype, "phoneNumber", void 0);
|
|
83
84
|
__decorate([
|
|
84
85
|
(0, class_validator_1.IsOptional)(),
|
|
86
|
+
(0, class_validator_1.ValidateNested)(),
|
|
87
|
+
(0, class_transformer_1.Type)(() => address_1.AddressResponse),
|
|
85
88
|
__metadata("design:type", address_1.AddressResponse)
|
|
86
89
|
], AccountCreateRequest.prototype, "address", void 0);
|
|
87
90
|
__decorate([
|
|
@@ -11,7 +11,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.Place = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
|
+
const Timezone_1 = require("./Timezone");
|
|
14
15
|
const Country_1 = require("../../country/enums/Country");
|
|
16
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
17
|
class Place {
|
|
16
18
|
}
|
|
17
19
|
exports.Place = Place;
|
|
@@ -96,7 +98,8 @@ __decorate([
|
|
|
96
98
|
__decorate([
|
|
97
99
|
(0, class_validator_1.IsOptional)(),
|
|
98
100
|
(0, class_validator_1.ValidateNested)(),
|
|
99
|
-
|
|
101
|
+
(0, class_transformer_1.Type)(() => Timezone_1.Timezone),
|
|
102
|
+
__metadata("design:type", Timezone_1.Timezone)
|
|
100
103
|
], Place.prototype, "timezone", void 0);
|
|
101
104
|
__decorate([
|
|
102
105
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -110,3 +113,15 @@ __decorate([
|
|
|
110
113
|
(0, class_validator_1.Length)(1, 10),
|
|
111
114
|
__metadata("design:type", String)
|
|
112
115
|
], Place.prototype, "unitType", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, class_validator_1.IsOptional)(),
|
|
118
|
+
(0, class_validator_1.IsString)(),
|
|
119
|
+
(0, class_validator_1.Length)(1, 60),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], Place.prototype, "city", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, class_validator_1.IsOptional)(),
|
|
124
|
+
(0, class_validator_1.IsString)(),
|
|
125
|
+
(0, class_validator_1.Length)(1, 60),
|
|
126
|
+
__metadata("design:type", String)
|
|
127
|
+
], Place.prototype, "state", void 0);
|
|
@@ -1,2 +1,24 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Timezone = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class Timezone {
|
|
15
|
+
}
|
|
16
|
+
exports.Timezone = Timezone;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], Timezone.prototype, "name", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Timezone.prototype, "offset", void 0);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CollectionOrderExecutionStatus } from "../enums/CollectionOrderExecutionStatus";
|
|
2
|
+
export interface OrdersCollector {
|
|
3
|
+
id: string;
|
|
4
|
+
executionId: string;
|
|
5
|
+
createdAt: number;
|
|
6
|
+
updatedAt: number;
|
|
7
|
+
status: CollectionOrderExecutionStatus;
|
|
8
|
+
startedAt: number;
|
|
9
|
+
finishedAt?: number;
|
|
10
|
+
totalOrders?: number;
|
|
11
|
+
batchesSent?: number;
|
|
12
|
+
ordersCompleted?: number;
|
|
13
|
+
ordersPartial?: number;
|
|
14
|
+
ordersDue?: number;
|
|
15
|
+
ordersError?: number;
|
|
16
|
+
notes?: string;
|
|
17
|
+
executedBy?: string;
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -4,10 +4,11 @@ import { CountryId } from "../../country";
|
|
|
4
4
|
import { regexUuidV4 } from '../../helpers/constans/regex';
|
|
5
5
|
import { TypeOfDirectoryId } from '../../directory';
|
|
6
6
|
import { IsPhoneNumberFiado } from '../../card/validations/IsPhoneNumberConstraint';
|
|
7
|
-
import {IdentificationDocument, SexDocument} from '../../identity';
|
|
7
|
+
import { IdentificationDocument, SexDocument } from '../../identity';
|
|
8
8
|
import { Profile } from "../../directory/enums/Profile";
|
|
9
|
-
import {AccountLevelEnum} from "../enums/AccountLevelEnum";
|
|
9
|
+
import { AccountLevelEnum } from "../enums/AccountLevelEnum";
|
|
10
10
|
import { Provider } from '../../provider';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
11
12
|
|
|
12
13
|
export class AccountCreateRequest {
|
|
13
14
|
|
|
@@ -17,7 +18,7 @@ export class AccountCreateRequest {
|
|
|
17
18
|
message: 'directoryId must be a valid UUID v4',
|
|
18
19
|
})
|
|
19
20
|
directoryId: string;
|
|
20
|
-
|
|
21
|
+
|
|
21
22
|
|
|
22
23
|
@IsString()
|
|
23
24
|
@Matches(regexUuidV4,
|
|
@@ -38,30 +39,31 @@ export class AccountCreateRequest {
|
|
|
38
39
|
|
|
39
40
|
@IsEnum(TypeOfDirectoryId)
|
|
40
41
|
typeOfDirectoryId: string;
|
|
41
|
-
|
|
42
|
+
|
|
42
43
|
@IsString()
|
|
43
|
-
latLastNameMaternal:string
|
|
44
|
-
|
|
44
|
+
latLastNameMaternal: string
|
|
45
|
+
|
|
45
46
|
@IsString()
|
|
46
|
-
latLastNamePaternal:string
|
|
47
|
-
|
|
47
|
+
latLastNamePaternal: string
|
|
48
|
+
|
|
48
49
|
@IsString()
|
|
49
|
-
latNames:string
|
|
50
|
+
latNames: string
|
|
50
51
|
|
|
51
52
|
@IsString()
|
|
52
|
-
countryOfBirth:string
|
|
53
|
-
|
|
53
|
+
countryOfBirth: string
|
|
54
|
+
|
|
54
55
|
@IsString()
|
|
55
|
-
usNames:string
|
|
56
|
-
|
|
56
|
+
usNames: string
|
|
57
|
+
|
|
57
58
|
@IsString()
|
|
58
|
-
usLastNames:string
|
|
59
|
+
usLastNames: string
|
|
59
60
|
|
|
60
61
|
@IsPhoneNumberFiado()
|
|
61
62
|
phoneNumber: string;
|
|
62
63
|
|
|
63
|
-
|
|
64
64
|
@IsOptional()
|
|
65
|
+
@ValidateNested()
|
|
66
|
+
@Type(() => AddressResponse)
|
|
65
67
|
address: AddressResponse;
|
|
66
68
|
|
|
67
69
|
@IsEmail()
|
|
@@ -102,4 +104,3 @@ export class AccountCreateRequest {
|
|
|
102
104
|
externalReferenceId?: string;
|
|
103
105
|
|
|
104
106
|
}
|
|
105
|
-
|
|
@@ -2,6 +2,7 @@ import { IsArray, IsBoolean, IsEnum, IsOptional, IsString, Length, ValidateNeste
|
|
|
2
2
|
import { Geometry } from "./Geometry";
|
|
3
3
|
import { Timezone } from "./Timezone";
|
|
4
4
|
import { Country } from '../../country/enums/Country';
|
|
5
|
+
import { Type } from 'class-transformer';
|
|
5
6
|
|
|
6
7
|
export class Place {
|
|
7
8
|
@ValidateNested()
|
|
@@ -70,6 +71,7 @@ export class Place {
|
|
|
70
71
|
|
|
71
72
|
@IsOptional()
|
|
72
73
|
@ValidateNested()
|
|
74
|
+
@Type(() => Timezone)
|
|
73
75
|
timezone?: Timezone;
|
|
74
76
|
|
|
75
77
|
@IsOptional()
|
|
@@ -81,4 +83,14 @@ export class Place {
|
|
|
81
83
|
@IsString()
|
|
82
84
|
@Length(1, 10)
|
|
83
85
|
unitType?: string;
|
|
86
|
+
|
|
87
|
+
@IsOptional()
|
|
88
|
+
@IsString()
|
|
89
|
+
@Length(1, 60)
|
|
90
|
+
city?: string;
|
|
91
|
+
|
|
92
|
+
@IsOptional()
|
|
93
|
+
@IsString()
|
|
94
|
+
@Length(1, 60)
|
|
95
|
+
state?: string;
|
|
84
96
|
}
|