@merkaly/api 0.4.7 → 0.4.8
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/account/address/address.validator.js +1 -6
- package/dist/address.validator.js +6 -9
- package/dist/inventory/catalog/product/product.entity.d.ts +2 -0
- package/dist/inventory/stock/warehouse/warehouse.validator.d.ts +1 -1
- package/dist/inventory/stock/warehouse/warehouse.validator.js +1 -1
- package/dist/order/sale/customer/customer.validator.d.ts +1 -0
- package/dist/order/sale/customer/customer.validator.js +14 -0
- package/package.json +1 -1
|
@@ -25,32 +25,27 @@ export class SaveAddressValidator extends abstract_validator_1.AbstractValidator
|
|
|
25
25
|
__decorate([
|
|
26
26
|
(0, class_validator_1.IsString)(),
|
|
27
27
|
(0, class_validator_1.IsNotEmpty)(),
|
|
28
|
-
(0, class_validator_1.Length)(0, 255),
|
|
29
28
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
30
29
|
__metadata("design:type", String)
|
|
31
30
|
], SaveAddressValidator.prototype, "street", void 0);
|
|
32
31
|
__decorate([
|
|
33
32
|
(0, class_validator_1.IsString)(),
|
|
34
33
|
(0, class_validator_1.IsNotEmpty)(),
|
|
35
|
-
(0, class_validator_1.Length)(0, 100),
|
|
36
34
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
37
35
|
__metadata("design:type", String)
|
|
38
36
|
], SaveAddressValidator.prototype, "name", void 0);
|
|
39
37
|
__decorate([
|
|
40
38
|
(0, class_validator_1.IsString)(),
|
|
41
|
-
(0, class_validator_1.Length)(0, 255),
|
|
42
39
|
(0, class_validator_1.IsOptional)(),
|
|
43
40
|
__metadata("design:type", String)
|
|
44
41
|
], SaveAddressValidator.prototype, "complement", void 0);
|
|
45
42
|
__decorate([
|
|
46
|
-
(0, class_validator_1.
|
|
47
|
-
(0, class_validator_1.Length)(2, 2),
|
|
43
|
+
(0, class_validator_1.IsISO31661Alpha2)(),
|
|
48
44
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
49
45
|
__metadata("design:type", String)
|
|
50
46
|
], SaveAddressValidator.prototype, "country", void 0);
|
|
51
47
|
__decorate([
|
|
52
48
|
(0, class_validator_1.IsString)(),
|
|
53
|
-
(0, class_validator_1.Length)(0, 10),
|
|
54
49
|
(0, class_validator_1.IsOptional)(),
|
|
55
50
|
__metadata("design:type", String)
|
|
56
51
|
], SaveAddressValidator.prototype, "code", void 0);
|
|
@@ -22,44 +22,41 @@ export class AddressValidator {
|
|
|
22
22
|
}
|
|
23
23
|
__decorate([
|
|
24
24
|
(0, class_validator_1.IsString)(),
|
|
25
|
-
(0, class_validator_1.
|
|
25
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
26
26
|
__metadata("design:type", String)
|
|
27
27
|
], AddressValidator.prototype, "line1", void 0);
|
|
28
28
|
__decorate([
|
|
29
29
|
(0, class_validator_1.IsString)(),
|
|
30
|
-
(0, class_validator_1.Length)(0, 255),
|
|
31
30
|
(0, class_validator_1.IsOptional)(),
|
|
32
31
|
__metadata("design:type", String)
|
|
33
32
|
], AddressValidator.prototype, "line2", void 0);
|
|
34
33
|
__decorate([
|
|
35
34
|
(0, class_validator_1.IsString)(),
|
|
36
|
-
(0, class_validator_1.
|
|
35
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
36
|
__metadata("design:type", String)
|
|
38
37
|
], AddressValidator.prototype, "name", void 0);
|
|
39
38
|
__decorate([
|
|
40
39
|
(0, class_validator_1.IsString)(),
|
|
41
|
-
(0, class_validator_1.
|
|
40
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
42
41
|
__metadata("design:type", String)
|
|
43
42
|
], AddressValidator.prototype, "city", void 0);
|
|
44
43
|
__decorate([
|
|
45
44
|
(0, class_validator_1.IsString)(),
|
|
46
|
-
(0, class_validator_1.
|
|
45
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
47
46
|
__metadata("design:type", String)
|
|
48
47
|
], AddressValidator.prototype, "state", void 0);
|
|
49
48
|
__decorate([
|
|
50
49
|
(0, class_validator_1.IsString)(),
|
|
51
|
-
(0, class_validator_1.Length)(0, 100),
|
|
52
50
|
(0, class_validator_1.IsOptional)(),
|
|
53
51
|
__metadata("design:type", String)
|
|
54
52
|
], AddressValidator.prototype, "locality", void 0);
|
|
55
53
|
__decorate([
|
|
56
|
-
(0, class_validator_1.
|
|
57
|
-
(0, class_validator_1.Length)(0, 100),
|
|
54
|
+
(0, class_validator_1.IsISO31661Alpha2)(),
|
|
58
55
|
__metadata("design:type", String)
|
|
59
56
|
], AddressValidator.prototype, "country", void 0);
|
|
60
57
|
__decorate([
|
|
61
58
|
(0, class_validator_1.IsString)(),
|
|
62
|
-
(0, class_validator_1.
|
|
59
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
63
60
|
__metadata("design:type", String)
|
|
64
61
|
], AddressValidator.prototype, "code", void 0);
|
|
65
62
|
__decorate([
|
|
@@ -68,7 +68,7 @@ __decorate([
|
|
|
68
68
|
(0, class_validator_1.IsNotEmptyObject)({}, { message: 'Address is required' }),
|
|
69
69
|
(0, class_validator_1.ValidateNested)(),
|
|
70
70
|
(0, class_transformer_1.Type)(() => address_validator_1.AddressValidator),
|
|
71
|
-
(0, class_validator_1.IsOptional)(
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
72
|
__metadata("design:type", address_validator_1.AddressValidator)
|
|
73
73
|
], SaveStockWarehouseValidator.prototype, "address", void 0);
|
|
74
74
|
__decorate([
|
|
@@ -6,6 +6,7 @@ export declare class SearchSaleCustomerValidator extends SearchValidator<SaleCus
|
|
|
6
6
|
export declare class ReadSaleCustomerValidator extends ReadValidator<SaleCustomerEntity> {
|
|
7
7
|
}
|
|
8
8
|
export declare class SaveSaleCustomerValidator extends AbstractValidator {
|
|
9
|
+
constructor(entity?: SaleCustomerEntity);
|
|
9
10
|
name: string;
|
|
10
11
|
type: SaleCustomerTypeEnum;
|
|
11
12
|
description: string;
|
|
@@ -15,6 +15,20 @@ export class SearchSaleCustomerValidator extends abstract_validator_1.SearchVali
|
|
|
15
15
|
export class ReadSaleCustomerValidator extends abstract_validator_1.ReadValidator {
|
|
16
16
|
}
|
|
17
17
|
export class SaveSaleCustomerValidator extends abstract_validator_1.AbstractValidator {
|
|
18
|
+
constructor(entity) {
|
|
19
|
+
super();
|
|
20
|
+
if (!entity)
|
|
21
|
+
return;
|
|
22
|
+
this.name = entity.name;
|
|
23
|
+
this.type = entity.type;
|
|
24
|
+
this.description = entity.description;
|
|
25
|
+
this.email = entity.email;
|
|
26
|
+
this.phone = entity.phone;
|
|
27
|
+
this.website = entity.website;
|
|
28
|
+
this.logo = entity.logo;
|
|
29
|
+
this.taxId = entity.taxId;
|
|
30
|
+
this.active = entity.active;
|
|
31
|
+
}
|
|
18
32
|
name;
|
|
19
33
|
type = customer_enum_1.SaleCustomerTypeEnum.B2C;
|
|
20
34
|
description;
|