@merkaly/api 0.5.14 → 0.5.15
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/inventory/catalog/attribute/index.d.ts +1 -1
- package/dist/inventory/catalog/attribute/index.js +1 -1
- package/dist/inventory/catalog/attribute/request.validator.d.ts +8 -0
- package/dist/inventory/catalog/attribute/{attribute.validator.js → request.validator.js} +4 -8
- package/dist/inventory/catalog/brand/brand.entity.d.ts +2 -0
- package/dist/inventory/catalog/brand/index.d.ts +1 -1
- package/dist/inventory/catalog/brand/index.js +1 -1
- package/dist/inventory/catalog/brand/request.validator.d.ts +7 -0
- package/dist/inventory/catalog/brand/{brand.validator.js → request.validator.js} +3 -7
- package/dist/inventory/catalog/category/category.entity.d.ts +2 -0
- package/dist/inventory/catalog/category/index.d.ts +1 -1
- package/dist/inventory/catalog/category/index.js +1 -1
- package/dist/inventory/catalog/category/request.validator.d.ts +7 -0
- package/dist/inventory/catalog/category/{category.validator.js → request.validator.js} +3 -7
- package/dist/inventory/catalog/collection/collection.entity.d.ts +2 -2
- package/dist/inventory/catalog/collection/index.d.ts +1 -1
- package/dist/inventory/catalog/collection/index.js +1 -1
- package/dist/inventory/catalog/collection/request.validator.d.ts +8 -0
- package/dist/inventory/catalog/collection/{collection.validator.js → request.validator.js} +4 -8
- package/dist/inventory/catalog/product/index.d.ts +1 -1
- package/dist/inventory/catalog/product/index.js +1 -1
- package/dist/inventory/catalog/product/product.entity.d.ts +10 -8
- package/dist/inventory/catalog/product/request.validator.d.ts +24 -0
- package/dist/inventory/catalog/product/{product.validator.js → request.validator.js} +30 -19
- package/dist/inventory/catalog/variant/index.d.ts +1 -1
- package/dist/inventory/catalog/variant/index.js +1 -1
- package/dist/inventory/catalog/variant/request.validator.d.ts +17 -0
- package/dist/inventory/catalog/variant/{variant.validator.js → request.validator.js} +36 -15
- package/dist/inventory/catalog/variant/variant.entity.d.ts +7 -5
- package/dist/order/purchase/transaction/transaction.enum.d.ts +4 -1
- package/dist/order/purchase/transaction/transaction.enum.js +11 -1
- package/dist/order/purchase/transaction/transaction.transition.js +3 -2
- package/dist/order/purchase/transaction/transaction.validator.js +1 -0
- package/dist/order/purchase/vendor/vendor.validator.d.ts +1 -0
- package/dist/order/purchase/vendor/vendor.validator.js +13 -0
- package/dist/order/sale/transaction/transaction.enum.d.ts +6 -1
- package/dist/order/sale/transaction/transaction.enum.js +17 -1
- package/dist/order/sale/transaction/transaction.transition.js +4 -2
- package/dist/order/sale/transaction/transaction.validator.js +1 -0
- package/dist/order/service/transaction/transaction.validator.js +1 -0
- package/package.json +1 -1
- package/dist/inventory/catalog/attribute/attribute.validator.d.ts +0 -12
- package/dist/inventory/catalog/brand/brand.validator.d.ts +0 -11
- package/dist/inventory/catalog/category/category.validator.d.ts +0 -11
- package/dist/inventory/catalog/collection/collection.validator.d.ts +0 -12
- package/dist/inventory/catalog/product/product.validator.d.ts +0 -27
- package/dist/inventory/catalog/variant/variant.validator.d.ts +0 -18
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './attribute.entity';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './request.validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './request.validator.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CatalogAttributeEntity } from './';
|
|
2
|
+
import { AbstractValidator } from '../../..';
|
|
3
|
+
export declare class SaveAttributeRequestValidator extends AbstractValidator {
|
|
4
|
+
constructor(entity?: CatalogAttributeEntity);
|
|
5
|
+
name: string;
|
|
6
|
+
values?: string[];
|
|
7
|
+
active?: boolean;
|
|
8
|
+
}
|
|
@@ -9,11 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import * as class_validator_1 from "class-validator";
|
|
11
11
|
import * as abstract_validator_1 from '../../..';
|
|
12
|
-
export class
|
|
13
|
-
}
|
|
14
|
-
export class ReadCatalogAttributeValidator extends abstract_validator_1.ReadValidator {
|
|
15
|
-
}
|
|
16
|
-
export class SaveCatalogAttributeValidator extends abstract_validator_1.AbstractValidator {
|
|
12
|
+
export class SaveAttributeRequestValidator extends abstract_validator_1.AbstractValidator {
|
|
17
13
|
constructor(entity) {
|
|
18
14
|
super();
|
|
19
15
|
if (!entity)
|
|
@@ -32,7 +28,7 @@ __decorate([
|
|
|
32
28
|
(0, class_validator_1.Length)(0, 100),
|
|
33
29
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
34
30
|
__metadata("design:type", String)
|
|
35
|
-
],
|
|
31
|
+
], SaveAttributeRequestValidator.prototype, "name", void 0);
|
|
36
32
|
__decorate([
|
|
37
33
|
(0, class_validator_1.IsArray)(),
|
|
38
34
|
(0, class_validator_1.ArrayNotEmpty)(),
|
|
@@ -40,9 +36,9 @@ __decorate([
|
|
|
40
36
|
(0, class_validator_1.Length)(0, 100, { each: true }),
|
|
41
37
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
42
38
|
__metadata("design:type", Array)
|
|
43
|
-
],
|
|
39
|
+
], SaveAttributeRequestValidator.prototype, "values", void 0);
|
|
44
40
|
__decorate([
|
|
45
41
|
(0, class_validator_1.IsBoolean)(),
|
|
46
42
|
(0, class_validator_1.IsOptional)(),
|
|
47
43
|
__metadata("design:type", Boolean)
|
|
48
|
-
],
|
|
44
|
+
], SaveAttributeRequestValidator.prototype, "active", void 0);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AbstractEntity } from '../../..';
|
|
2
|
+
import { CatalogRelationStatusEnum } from '../../..';
|
|
2
3
|
import { CatalogProductEntity } from '../product';
|
|
3
4
|
export declare class CatalogBrandEntity extends AbstractEntity {
|
|
4
5
|
name: string;
|
|
5
6
|
description: string;
|
|
6
7
|
readonly products?: CatalogProductEntity[];
|
|
8
|
+
readonly status: CatalogRelationStatusEnum;
|
|
7
9
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './brand.entity';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './request.validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './request.validator.js';
|
|
@@ -9,11 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import * as class_validator_1 from "class-validator";
|
|
11
11
|
import * as abstract_validator_1 from '../../..';
|
|
12
|
-
export class
|
|
13
|
-
}
|
|
14
|
-
export class ReadCatalogBrandValidator extends abstract_validator_1.ReadValidator {
|
|
15
|
-
}
|
|
16
|
-
export class SaveCatalogBrandValidator extends abstract_validator_1.AbstractValidator {
|
|
12
|
+
export class SaveBrandRequestValidator extends abstract_validator_1.AbstractValidator {
|
|
17
13
|
constructor(entity) {
|
|
18
14
|
super();
|
|
19
15
|
if (!entity)
|
|
@@ -30,10 +26,10 @@ __decorate([
|
|
|
30
26
|
(0, class_validator_1.Length)(0, 100),
|
|
31
27
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
32
28
|
__metadata("design:type", String)
|
|
33
|
-
],
|
|
29
|
+
], SaveBrandRequestValidator.prototype, "name", void 0);
|
|
34
30
|
__decorate([
|
|
35
31
|
(0, class_validator_1.IsString)(),
|
|
36
32
|
(0, class_validator_1.Length)(0, 1000),
|
|
37
33
|
(0, class_validator_1.IsOptional)(),
|
|
38
34
|
__metadata("design:type", String)
|
|
39
|
-
],
|
|
35
|
+
], SaveBrandRequestValidator.prototype, "description", void 0);
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { AbstractEntity } from '../../..';
|
|
2
|
+
import { CatalogRelationStatusEnum } from '../../..';
|
|
2
3
|
import { CatalogProductEntity } from '../product';
|
|
3
4
|
export declare class CatalogCategoryEntity extends AbstractEntity {
|
|
4
5
|
name: string;
|
|
5
6
|
description: string;
|
|
6
7
|
readonly products?: CatalogProductEntity[];
|
|
8
|
+
readonly status: CatalogRelationStatusEnum;
|
|
7
9
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './category.entity';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './request.validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './request.validator.js';
|
|
@@ -9,11 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import * as class_validator_1 from "class-validator";
|
|
11
11
|
import * as abstract_validator_1 from '../../..';
|
|
12
|
-
export class
|
|
13
|
-
}
|
|
14
|
-
export class ReadCatalogCategoryValidator extends abstract_validator_1.ReadValidator {
|
|
15
|
-
}
|
|
16
|
-
export class SaveCatalogCategoryValidator extends abstract_validator_1.AbstractValidator {
|
|
12
|
+
export class SaveCategoryRequestValidator extends abstract_validator_1.AbstractValidator {
|
|
17
13
|
constructor(entity) {
|
|
18
14
|
super();
|
|
19
15
|
if (!entity)
|
|
@@ -30,10 +26,10 @@ __decorate([
|
|
|
30
26
|
(0, class_validator_1.Length)(0, 100),
|
|
31
27
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
32
28
|
__metadata("design:type", String)
|
|
33
|
-
],
|
|
29
|
+
], SaveCategoryRequestValidator.prototype, "name", void 0);
|
|
34
30
|
__decorate([
|
|
35
31
|
(0, class_validator_1.IsString)(),
|
|
36
32
|
(0, class_validator_1.Length)(0, 1000),
|
|
37
33
|
(0, class_validator_1.IsOptional)(),
|
|
38
34
|
__metadata("design:type", String)
|
|
39
|
-
],
|
|
35
|
+
], SaveCategoryRequestValidator.prototype, "description", void 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AbstractEntity
|
|
1
|
+
import { AbstractEntity } from '../../..';
|
|
2
2
|
import { CatalogProductEntity } from '../product';
|
|
3
3
|
export declare class CatalogCollectionEntity extends AbstractEntity {
|
|
4
4
|
name: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
products:
|
|
6
|
+
products: CatalogProductEntity[];
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './collection.entity';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './request.validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './request.validator.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CatalogCollectionEntity } from './';
|
|
2
|
+
import { AbstractValidator } from '../../..';
|
|
3
|
+
export declare class SaveCollectionRequestValidator extends AbstractValidator {
|
|
4
|
+
constructor(entity?: CatalogCollectionEntity);
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
products: string[];
|
|
8
|
+
}
|
|
@@ -9,11 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import * as class_validator_1 from "class-validator";
|
|
11
11
|
import * as abstract_validator_1 from '../../..';
|
|
12
|
-
export class
|
|
13
|
-
}
|
|
14
|
-
export class ReadCatalogCollectionValidator extends abstract_validator_1.ReadValidator {
|
|
15
|
-
}
|
|
16
|
-
export class SaveCatalogCollectionValidator extends abstract_validator_1.AbstractValidator {
|
|
12
|
+
export class SaveCollectionRequestValidator extends abstract_validator_1.AbstractValidator {
|
|
17
13
|
constructor(entity) {
|
|
18
14
|
super();
|
|
19
15
|
if (!entity)
|
|
@@ -32,15 +28,15 @@ __decorate([
|
|
|
32
28
|
(0, class_validator_1.Length)(0, 100),
|
|
33
29
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
34
30
|
__metadata("design:type", String)
|
|
35
|
-
],
|
|
31
|
+
], SaveCollectionRequestValidator.prototype, "name", void 0);
|
|
36
32
|
__decorate([
|
|
37
33
|
(0, class_validator_1.IsString)(),
|
|
38
34
|
(0, class_validator_1.Length)(0, 1000),
|
|
39
35
|
(0, class_validator_1.IsOptional)(),
|
|
40
36
|
__metadata("design:type", String)
|
|
41
|
-
],
|
|
37
|
+
], SaveCollectionRequestValidator.prototype, "description", void 0);
|
|
42
38
|
__decorate([
|
|
43
39
|
(0, class_validator_1.IsMongoId)({ each: true }),
|
|
44
40
|
(0, class_validator_1.IsOptional)(),
|
|
45
41
|
__metadata("design:type", Array)
|
|
46
|
-
],
|
|
42
|
+
], SaveCollectionRequestValidator.prototype, "products", void 0);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './product.entity';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './request.validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './request.validator.js';
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
import { AssetEntity } from '../../../assets/asset';
|
|
2
|
+
import { StockBalanceStatusEnum } from '../../..';
|
|
2
3
|
import { AbstractEntity } from '../../..';
|
|
3
4
|
import { CatalogAttributeEntity } from '../attribute';
|
|
4
5
|
import type { CatalogBrandEntity } from '../brand';
|
|
5
6
|
import type { CatalogCategoryEntity } from '../category';
|
|
6
7
|
import type { CatalogVariantEntity } from '../variant';
|
|
7
8
|
import type { ConfigurationMeasurementEntity } from '../../configuration/measurement';
|
|
8
|
-
import type { MongoEntity } from '../../..';
|
|
9
9
|
export declare class CatalogProductEntity extends AbstractEntity {
|
|
10
10
|
sku?: string;
|
|
11
11
|
name: string;
|
|
12
12
|
description?: string;
|
|
13
13
|
price: number;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
minStockLevel: number;
|
|
15
|
+
pictures: AssetEntity[];
|
|
16
|
+
category?: CatalogCategoryEntity;
|
|
17
|
+
brand?: CatalogBrandEntity;
|
|
17
18
|
attributes: {
|
|
18
|
-
type:
|
|
19
|
+
type: CatalogAttributeEntity;
|
|
19
20
|
values: string[];
|
|
20
21
|
}[];
|
|
21
22
|
measure?: {
|
|
22
23
|
amount: number;
|
|
23
|
-
kind:
|
|
24
|
+
kind: ConfigurationMeasurementEntity;
|
|
24
25
|
unit: string;
|
|
25
26
|
};
|
|
26
27
|
hashtags: string[];
|
|
27
|
-
readonly variants:
|
|
28
|
+
readonly variants: CatalogVariantEntity[];
|
|
28
29
|
readonly stock: number;
|
|
29
|
-
readonly
|
|
30
|
+
readonly status: StockBalanceStatusEnum;
|
|
31
|
+
readonly image: AssetEntity;
|
|
30
32
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CatalogProductEntity } from './';
|
|
2
|
+
import { AbstractValidator } from '../../..';
|
|
3
|
+
export declare class ProductAttributeRequestValidator extends AbstractValidator {
|
|
4
|
+
type: string;
|
|
5
|
+
values: string[];
|
|
6
|
+
}
|
|
7
|
+
export declare class SaveProductRequestValidator extends AbstractValidator {
|
|
8
|
+
constructor(entity?: CatalogProductEntity);
|
|
9
|
+
name: string;
|
|
10
|
+
sku: string;
|
|
11
|
+
description: string;
|
|
12
|
+
price: number;
|
|
13
|
+
minStockLevel?: number;
|
|
14
|
+
measure: {
|
|
15
|
+
amount: any;
|
|
16
|
+
kind: any;
|
|
17
|
+
unit: any;
|
|
18
|
+
};
|
|
19
|
+
pictures: string[];
|
|
20
|
+
category: string;
|
|
21
|
+
brand: string;
|
|
22
|
+
hashtags: string[];
|
|
23
|
+
attributes: ProductAttributeRequestValidator[];
|
|
24
|
+
}
|
|
@@ -10,25 +10,21 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import * as class_transformer_1 from "class-transformer";
|
|
11
11
|
import * as class_validator_1 from "class-validator";
|
|
12
12
|
import * as abstract_validator_1 from '../../..';
|
|
13
|
-
export class
|
|
14
|
-
}
|
|
15
|
-
export class ReadCatalogProductValidator extends abstract_validator_1.ReadValidator {
|
|
16
|
-
}
|
|
17
|
-
export class ProductAttributeValidator extends abstract_validator_1.AbstractValidator {
|
|
13
|
+
export class ProductAttributeRequestValidator extends abstract_validator_1.AbstractValidator {
|
|
18
14
|
type;
|
|
19
15
|
values = [];
|
|
20
16
|
}
|
|
21
17
|
__decorate([
|
|
22
18
|
(0, class_validator_1.IsMongoId)(),
|
|
23
19
|
__metadata("design:type", String)
|
|
24
|
-
],
|
|
20
|
+
], ProductAttributeRequestValidator.prototype, "type", void 0);
|
|
25
21
|
__decorate([
|
|
26
22
|
(0, class_validator_1.IsArray)(),
|
|
27
23
|
(0, class_validator_1.IsString)({ each: true }),
|
|
28
24
|
(0, class_validator_1.Length)(0, 100, { each: true }),
|
|
29
25
|
__metadata("design:type", Array)
|
|
30
|
-
],
|
|
31
|
-
export class
|
|
26
|
+
], ProductAttributeRequestValidator.prototype, "values", void 0);
|
|
27
|
+
export class SaveProductRequestValidator extends abstract_validator_1.AbstractValidator {
|
|
32
28
|
constructor(entity) {
|
|
33
29
|
super();
|
|
34
30
|
if (!entity)
|
|
@@ -37,16 +33,25 @@ export class SaveCatalogProductValidator extends abstract_validator_1.AbstractVa
|
|
|
37
33
|
this.name = entity.name;
|
|
38
34
|
this.description = entity.description;
|
|
39
35
|
this.price = entity.price;
|
|
36
|
+
this.minStockLevel = entity.minStockLevel;
|
|
40
37
|
this.category = (0, abstract_validator_1.toId)(entity.category);
|
|
41
38
|
this.brand = (0, abstract_validator_1.toId)(entity.brand);
|
|
42
39
|
this.measure.amount = entity.measure?.amount;
|
|
43
40
|
this.measure.kind = (0, abstract_validator_1.toId)(entity.measure?.kind);
|
|
44
41
|
this.measure.unit = entity.measure?.unit;
|
|
42
|
+
this.pictures = entity.pictures?.map(abstract_validator_1.toId).filter(Boolean) || [];
|
|
43
|
+
this.hashtags = entity.hashtags || [];
|
|
44
|
+
this.attributes =
|
|
45
|
+
entity.attributes?.map((attribute) => ({
|
|
46
|
+
type: (0, abstract_validator_1.toId)(attribute.type),
|
|
47
|
+
values: attribute.values || [],
|
|
48
|
+
})) || [];
|
|
45
49
|
}
|
|
46
50
|
name;
|
|
47
51
|
sku;
|
|
48
52
|
description;
|
|
49
53
|
price;
|
|
54
|
+
minStockLevel;
|
|
50
55
|
measure = { amount: undefined, kind: undefined, unit: undefined };
|
|
51
56
|
pictures = [];
|
|
52
57
|
category;
|
|
@@ -60,56 +65,62 @@ __decorate([
|
|
|
60
65
|
(0, class_validator_1.Length)(0, 100),
|
|
61
66
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
62
67
|
__metadata("design:type", String)
|
|
63
|
-
],
|
|
68
|
+
], SaveProductRequestValidator.prototype, "name", void 0);
|
|
64
69
|
__decorate([
|
|
65
70
|
(0, class_validator_1.IsString)(),
|
|
66
71
|
(0, class_validator_1.Length)(0, 50),
|
|
67
72
|
(0, class_validator_1.IsOptional)(),
|
|
68
73
|
__metadata("design:type", String)
|
|
69
|
-
],
|
|
74
|
+
], SaveProductRequestValidator.prototype, "sku", void 0);
|
|
70
75
|
__decorate([
|
|
71
76
|
(0, class_validator_1.IsString)(),
|
|
72
77
|
(0, class_validator_1.Length)(0, 1000),
|
|
73
78
|
(0, class_validator_1.IsOptional)(),
|
|
74
79
|
__metadata("design:type", String)
|
|
75
|
-
],
|
|
80
|
+
], SaveProductRequestValidator.prototype, "description", void 0);
|
|
76
81
|
__decorate([
|
|
77
82
|
(0, class_validator_1.IsPositive)(),
|
|
78
83
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
79
84
|
__metadata("design:type", Number)
|
|
80
|
-
],
|
|
85
|
+
], SaveProductRequestValidator.prototype, "price", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_validator_1.IsInt)(),
|
|
88
|
+
(0, class_validator_1.Min)(0),
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
__metadata("design:type", Number)
|
|
91
|
+
], SaveProductRequestValidator.prototype, "minStockLevel", void 0);
|
|
81
92
|
__decorate([
|
|
82
93
|
(0, class_validator_1.IsObject)(),
|
|
83
94
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
84
95
|
__metadata("design:type", Object)
|
|
85
|
-
],
|
|
96
|
+
], SaveProductRequestValidator.prototype, "measure", void 0);
|
|
86
97
|
__decorate([
|
|
87
98
|
(0, class_validator_1.IsMongoId)({ each: true }),
|
|
88
99
|
(0, class_validator_1.IsArray)(),
|
|
89
100
|
(0, class_validator_1.IsOptional)(),
|
|
90
101
|
__metadata("design:type", Array)
|
|
91
|
-
],
|
|
102
|
+
], SaveProductRequestValidator.prototype, "pictures", void 0);
|
|
92
103
|
__decorate([
|
|
93
104
|
(0, class_validator_1.IsMongoId)(),
|
|
94
105
|
(0, class_validator_1.IsOptional)(),
|
|
95
106
|
__metadata("design:type", String)
|
|
96
|
-
],
|
|
107
|
+
], SaveProductRequestValidator.prototype, "category", void 0);
|
|
97
108
|
__decorate([
|
|
98
109
|
(0, class_validator_1.IsMongoId)(),
|
|
99
110
|
(0, class_validator_1.IsOptional)(),
|
|
100
111
|
__metadata("design:type", String)
|
|
101
|
-
],
|
|
112
|
+
], SaveProductRequestValidator.prototype, "brand", void 0);
|
|
102
113
|
__decorate([
|
|
103
114
|
(0, class_validator_1.IsArray)(),
|
|
104
115
|
(0, class_validator_1.IsString)({ each: true }),
|
|
105
116
|
(0, class_validator_1.Length)(0, 50, { each: true }),
|
|
106
117
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
107
118
|
__metadata("design:type", Array)
|
|
108
|
-
],
|
|
119
|
+
], SaveProductRequestValidator.prototype, "hashtags", void 0);
|
|
109
120
|
__decorate([
|
|
110
121
|
(0, class_validator_1.IsArray)(),
|
|
111
|
-
(0, class_transformer_1.Type)(() =>
|
|
122
|
+
(0, class_transformer_1.Type)(() => ProductAttributeRequestValidator),
|
|
112
123
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
113
124
|
(0, class_validator_1.IsOptional)({ groups: ['update'] }),
|
|
114
125
|
__metadata("design:type", Array)
|
|
115
|
-
],
|
|
126
|
+
], SaveProductRequestValidator.prototype, "attributes", void 0);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export * from './variant.entity';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './request.validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './request.validator.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CatalogVariantEntity } from './';
|
|
2
|
+
import { AbstractValidator } from '../../..';
|
|
3
|
+
export declare class VariantOptionRequestValidator {
|
|
4
|
+
constructor(option?: CatalogVariantEntity['options'][number]);
|
|
5
|
+
type: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class SaveVariantRequestValidator extends AbstractValidator {
|
|
9
|
+
constructor(entity?: CatalogVariantEntity);
|
|
10
|
+
product?: string;
|
|
11
|
+
sku?: string;
|
|
12
|
+
price?: number;
|
|
13
|
+
minStockLevel?: number;
|
|
14
|
+
options?: VariantOptionRequestValidator[];
|
|
15
|
+
active?: boolean;
|
|
16
|
+
barcode?: string;
|
|
17
|
+
}
|
|
@@ -10,28 +10,43 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import * as class_transformer_1 from "class-transformer";
|
|
11
11
|
import * as class_validator_1 from "class-validator";
|
|
12
12
|
import * as abstract_validator_1 from '../../..';
|
|
13
|
-
export class
|
|
13
|
+
export class VariantOptionRequestValidator {
|
|
14
|
+
constructor(option) {
|
|
15
|
+
if (!option)
|
|
16
|
+
return;
|
|
17
|
+
this.type = (0, abstract_validator_1.toId)(option.type);
|
|
18
|
+
this.value = option.value;
|
|
19
|
+
}
|
|
14
20
|
type;
|
|
15
21
|
value;
|
|
16
22
|
}
|
|
17
23
|
__decorate([
|
|
18
24
|
(0, class_validator_1.IsMongoId)(),
|
|
19
25
|
__metadata("design:type", String)
|
|
20
|
-
],
|
|
26
|
+
], VariantOptionRequestValidator.prototype, "type", void 0);
|
|
21
27
|
__decorate([
|
|
22
28
|
(0, class_validator_1.IsString)(),
|
|
23
29
|
(0, class_validator_1.IsNotEmpty)(),
|
|
24
30
|
(0, class_validator_1.Length)(0, 100),
|
|
25
31
|
__metadata("design:type", String)
|
|
26
|
-
],
|
|
27
|
-
export class
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
], VariantOptionRequestValidator.prototype, "value", void 0);
|
|
33
|
+
export class SaveVariantRequestValidator extends abstract_validator_1.AbstractValidator {
|
|
34
|
+
constructor(entity) {
|
|
35
|
+
super();
|
|
36
|
+
if (!entity)
|
|
37
|
+
return;
|
|
38
|
+
this.product = (0, abstract_validator_1.toId)(entity.product);
|
|
39
|
+
this.sku = entity.sku;
|
|
40
|
+
this.price = entity.price;
|
|
41
|
+
this.minStockLevel = entity.minStockLevel;
|
|
42
|
+
this.options = entity.options?.map((option) => new VariantOptionRequestValidator(option)) || [];
|
|
43
|
+
this.active = entity.active;
|
|
44
|
+
this.barcode = entity.barcode;
|
|
45
|
+
}
|
|
32
46
|
product;
|
|
33
47
|
sku;
|
|
34
48
|
price;
|
|
49
|
+
minStockLevel;
|
|
35
50
|
options = [];
|
|
36
51
|
active;
|
|
37
52
|
barcode;
|
|
@@ -40,33 +55,39 @@ __decorate([
|
|
|
40
55
|
(0, class_validator_1.IsMongoId)(),
|
|
41
56
|
(0, class_validator_1.IsOptional)(),
|
|
42
57
|
__metadata("design:type", String)
|
|
43
|
-
],
|
|
58
|
+
], SaveVariantRequestValidator.prototype, "product", void 0);
|
|
44
59
|
__decorate([
|
|
45
60
|
(0, class_validator_1.IsString)(),
|
|
46
61
|
(0, class_validator_1.Length)(0, 50),
|
|
47
62
|
(0, class_validator_1.IsOptional)(),
|
|
48
63
|
__metadata("design:type", String)
|
|
49
|
-
],
|
|
64
|
+
], SaveVariantRequestValidator.prototype, "sku", void 0);
|
|
50
65
|
__decorate([
|
|
51
66
|
(0, class_validator_1.IsNumber)(),
|
|
52
67
|
(0, class_validator_1.IsOptional)(),
|
|
53
68
|
__metadata("design:type", Number)
|
|
54
|
-
],
|
|
69
|
+
], SaveVariantRequestValidator.prototype, "price", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_validator_1.IsInt)(),
|
|
72
|
+
(0, class_validator_1.Min)(0),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], SaveVariantRequestValidator.prototype, "minStockLevel", void 0);
|
|
55
76
|
__decorate([
|
|
56
77
|
(0, class_validator_1.IsArray)(),
|
|
57
78
|
(0, class_validator_1.IsOptional)(),
|
|
58
|
-
(0, class_transformer_1.Type)(() =>
|
|
79
|
+
(0, class_transformer_1.Type)(() => VariantOptionRequestValidator),
|
|
59
80
|
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
60
81
|
__metadata("design:type", Array)
|
|
61
|
-
],
|
|
82
|
+
], SaveVariantRequestValidator.prototype, "options", void 0);
|
|
62
83
|
__decorate([
|
|
63
84
|
(0, class_validator_1.IsBoolean)(),
|
|
64
85
|
(0, class_validator_1.IsOptional)(),
|
|
65
86
|
__metadata("design:type", Boolean)
|
|
66
|
-
],
|
|
87
|
+
], SaveVariantRequestValidator.prototype, "active", void 0);
|
|
67
88
|
__decorate([
|
|
68
89
|
(0, class_validator_1.IsString)(),
|
|
69
90
|
(0, class_validator_1.Length)(0, 50),
|
|
70
91
|
(0, class_validator_1.IsOptional)(),
|
|
71
92
|
__metadata("design:type", String)
|
|
72
|
-
],
|
|
93
|
+
], SaveVariantRequestValidator.prototype, "barcode", void 0);
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { AssetEntity } from '../../../assets/asset';
|
|
2
|
+
import { StockBalanceStatusEnum } from '../../..';
|
|
2
3
|
import { AbstractEntity } from '../../..';
|
|
3
4
|
import type { CatalogAttributeEntity } from '../attribute';
|
|
4
5
|
import type { CatalogProductEntity } from '../product';
|
|
5
6
|
import type { StockBalanceEntity } from '../../stock/balance';
|
|
6
|
-
import type { MongoEntity } from '../../..';
|
|
7
7
|
export declare class CatalogVariantEntity extends AbstractEntity {
|
|
8
|
-
product?:
|
|
8
|
+
product?: CatalogProductEntity;
|
|
9
9
|
sku?: string;
|
|
10
10
|
price: number;
|
|
11
|
+
minStockLevel: number;
|
|
11
12
|
options: {
|
|
12
|
-
type:
|
|
13
|
+
type: CatalogAttributeEntity;
|
|
13
14
|
value: string;
|
|
14
15
|
}[];
|
|
15
16
|
active: boolean;
|
|
16
17
|
barcode?: string;
|
|
17
|
-
pictures:
|
|
18
|
+
pictures: AssetEntity[];
|
|
18
19
|
readonly total: number;
|
|
19
20
|
readonly stock: number;
|
|
20
|
-
readonly
|
|
21
|
+
readonly status: StockBalanceStatusEnum;
|
|
22
|
+
readonly balances: StockBalanceEntity[];
|
|
21
23
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export declare enum PurchaseTransactionStatusEnum {
|
|
2
|
-
|
|
2
|
+
OPEN = "OPEN",
|
|
3
|
+
ORDERED = "ORDERED",
|
|
3
4
|
PAUSED = "PAUSED",
|
|
4
5
|
RECEIVED = "RECEIVED",
|
|
5
6
|
CANCELLED = "CANCELLED"
|
|
6
7
|
}
|
|
8
|
+
export declare const PURCHASE_OPEN_TRANSACTION_STATUSES: readonly PurchaseTransactionStatusEnum[];
|
|
9
|
+
export declare const PURCHASE_INCOMING_TRANSACTION_STATUSES: readonly PurchaseTransactionStatusEnum[];
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
export var PurchaseTransactionStatusEnum;
|
|
2
2
|
(function (PurchaseTransactionStatusEnum) {
|
|
3
|
-
PurchaseTransactionStatusEnum["
|
|
3
|
+
PurchaseTransactionStatusEnum["OPEN"] = "OPEN";
|
|
4
|
+
PurchaseTransactionStatusEnum["ORDERED"] = "ORDERED";
|
|
4
5
|
PurchaseTransactionStatusEnum["PAUSED"] = "PAUSED";
|
|
5
6
|
PurchaseTransactionStatusEnum["RECEIVED"] = "RECEIVED";
|
|
6
7
|
PurchaseTransactionStatusEnum["CANCELLED"] = "CANCELLED";
|
|
7
8
|
})(PurchaseTransactionStatusEnum || (PurchaseTransactionStatusEnum = {}));
|
|
9
|
+
export const PURCHASE_OPEN_TRANSACTION_STATUSES = [
|
|
10
|
+
PurchaseTransactionStatusEnum.OPEN,
|
|
11
|
+
PurchaseTransactionStatusEnum.ORDERED,
|
|
12
|
+
PurchaseTransactionStatusEnum.PAUSED,
|
|
13
|
+
];
|
|
14
|
+
export const PURCHASE_INCOMING_TRANSACTION_STATUSES = [
|
|
15
|
+
PurchaseTransactionStatusEnum.ORDERED,
|
|
16
|
+
PurchaseTransactionStatusEnum.PAUSED,
|
|
17
|
+
];
|
|
@@ -3,8 +3,9 @@ import * as transaction_enum_1 from './transaction.enum.js';
|
|
|
3
3
|
|
|
4
4
|
export class PurchaseTransactionTransition extends AbstractTransition {
|
|
5
5
|
$states = {
|
|
6
|
-
[transaction_enum_1.PurchaseTransactionStatusEnum.
|
|
7
|
-
[transaction_enum_1.PurchaseTransactionStatusEnum.
|
|
6
|
+
[transaction_enum_1.PurchaseTransactionStatusEnum.OPEN]: [transaction_enum_1.PurchaseTransactionStatusEnum.ORDERED, transaction_enum_1.PurchaseTransactionStatusEnum.RECEIVED, transaction_enum_1.PurchaseTransactionStatusEnum.CANCELLED],
|
|
7
|
+
[transaction_enum_1.PurchaseTransactionStatusEnum.ORDERED]: [transaction_enum_1.PurchaseTransactionStatusEnum.PAUSED, transaction_enum_1.PurchaseTransactionStatusEnum.RECEIVED, transaction_enum_1.PurchaseTransactionStatusEnum.CANCELLED],
|
|
8
|
+
[transaction_enum_1.PurchaseTransactionStatusEnum.PAUSED]: [transaction_enum_1.PurchaseTransactionStatusEnum.ORDERED, transaction_enum_1.PurchaseTransactionStatusEnum.CANCELLED],
|
|
8
9
|
[transaction_enum_1.PurchaseTransactionStatusEnum.RECEIVED]: [],
|
|
9
10
|
[transaction_enum_1.PurchaseTransactionStatusEnum.CANCELLED]: [],
|
|
10
11
|
};
|
|
@@ -35,6 +35,7 @@ export class SavePurchaseTransactionValidator extends abstract_validator_1.Abstr
|
|
|
35
35
|
this.notes = entity.notes;
|
|
36
36
|
this.payment = typeof payment !== 'string' ? payment?.status : undefined;
|
|
37
37
|
this.vendor = (0, abstract_validator_1.toId)(entity.vendor);
|
|
38
|
+
this.status = entity.status;
|
|
38
39
|
}
|
|
39
40
|
items = [];
|
|
40
41
|
notes;
|
|
@@ -5,6 +5,7 @@ export declare class SearchPurchaseVendorValidator extends SearchValidator<Purch
|
|
|
5
5
|
export declare class ReadPurchaseVendorValidator extends ReadValidator<PurchaseVendorEntity> {
|
|
6
6
|
}
|
|
7
7
|
export declare class SavePurchaseVendorValidator extends AbstractValidator {
|
|
8
|
+
constructor(entity?: PurchaseVendorEntity);
|
|
8
9
|
name: string;
|
|
9
10
|
description: string;
|
|
10
11
|
email: string;
|
|
@@ -14,6 +14,19 @@ export class SearchPurchaseVendorValidator extends abstract_validator_1.SearchVa
|
|
|
14
14
|
export class ReadPurchaseVendorValidator extends abstract_validator_1.ReadValidator {
|
|
15
15
|
}
|
|
16
16
|
export class SavePurchaseVendorValidator extends abstract_validator_1.AbstractValidator {
|
|
17
|
+
constructor(entity) {
|
|
18
|
+
super();
|
|
19
|
+
if (!entity)
|
|
20
|
+
return;
|
|
21
|
+
this.name = entity.name;
|
|
22
|
+
this.description = entity.description;
|
|
23
|
+
this.email = entity.email;
|
|
24
|
+
this.logo = entity.logo;
|
|
25
|
+
this.phone = entity.phone;
|
|
26
|
+
this.website = entity.website;
|
|
27
|
+
this.taxId = entity.taxId;
|
|
28
|
+
this.active = entity.active;
|
|
29
|
+
}
|
|
17
30
|
name;
|
|
18
31
|
description;
|
|
19
32
|
email;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export declare enum SaleTransactionStatusEnum {
|
|
2
|
-
|
|
2
|
+
OPEN = "OPEN",
|
|
3
|
+
READY = "READY",
|
|
4
|
+
IN_PROGRESS = "IN_PROGRESS",
|
|
3
5
|
PAUSED = "PAUSED",
|
|
4
6
|
COMPLETED = "COMPLETED",
|
|
5
7
|
CANCELLED = "CANCELLED"
|
|
6
8
|
}
|
|
9
|
+
export declare const SALE_PRE_FULFILLMENT_TRANSACTION_STATUSES: readonly SaleTransactionStatusEnum[];
|
|
10
|
+
export declare const SALE_OPEN_TRANSACTION_STATUSES: readonly SaleTransactionStatusEnum[];
|
|
11
|
+
export declare const SALE_STOCK_CONSUMED_TRANSACTION_STATUSES: readonly SaleTransactionStatusEnum[];
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
export var SaleTransactionStatusEnum;
|
|
2
2
|
(function (SaleTransactionStatusEnum) {
|
|
3
|
-
SaleTransactionStatusEnum["
|
|
3
|
+
SaleTransactionStatusEnum["OPEN"] = "OPEN";
|
|
4
|
+
SaleTransactionStatusEnum["READY"] = "READY";
|
|
5
|
+
SaleTransactionStatusEnum["IN_PROGRESS"] = "IN_PROGRESS";
|
|
4
6
|
SaleTransactionStatusEnum["PAUSED"] = "PAUSED";
|
|
5
7
|
SaleTransactionStatusEnum["COMPLETED"] = "COMPLETED";
|
|
6
8
|
SaleTransactionStatusEnum["CANCELLED"] = "CANCELLED";
|
|
7
9
|
})(SaleTransactionStatusEnum || (SaleTransactionStatusEnum = {}));
|
|
10
|
+
export const SALE_PRE_FULFILLMENT_TRANSACTION_STATUSES = [
|
|
11
|
+
SaleTransactionStatusEnum.OPEN,
|
|
12
|
+
SaleTransactionStatusEnum.READY,
|
|
13
|
+
];
|
|
14
|
+
export const SALE_OPEN_TRANSACTION_STATUSES = [
|
|
15
|
+
...SALE_PRE_FULFILLMENT_TRANSACTION_STATUSES,
|
|
16
|
+
SaleTransactionStatusEnum.IN_PROGRESS,
|
|
17
|
+
SaleTransactionStatusEnum.PAUSED,
|
|
18
|
+
];
|
|
19
|
+
export const SALE_STOCK_CONSUMED_TRANSACTION_STATUSES = [
|
|
20
|
+
SaleTransactionStatusEnum.IN_PROGRESS,
|
|
21
|
+
SaleTransactionStatusEnum.PAUSED,
|
|
22
|
+
SaleTransactionStatusEnum.COMPLETED,
|
|
23
|
+
];
|
|
@@ -3,8 +3,10 @@ import * as transaction_enum_1 from './transaction.enum.js';
|
|
|
3
3
|
|
|
4
4
|
export class SaleTransactionTransition extends AbstractTransition {
|
|
5
5
|
$states = {
|
|
6
|
-
[transaction_enum_1.SaleTransactionStatusEnum.
|
|
7
|
-
[transaction_enum_1.SaleTransactionStatusEnum.
|
|
6
|
+
[transaction_enum_1.SaleTransactionStatusEnum.OPEN]: [transaction_enum_1.SaleTransactionStatusEnum.READY, transaction_enum_1.SaleTransactionStatusEnum.IN_PROGRESS, transaction_enum_1.SaleTransactionStatusEnum.CANCELLED],
|
|
7
|
+
[transaction_enum_1.SaleTransactionStatusEnum.READY]: [transaction_enum_1.SaleTransactionStatusEnum.IN_PROGRESS, transaction_enum_1.SaleTransactionStatusEnum.CANCELLED],
|
|
8
|
+
[transaction_enum_1.SaleTransactionStatusEnum.IN_PROGRESS]: [transaction_enum_1.SaleTransactionStatusEnum.PAUSED, transaction_enum_1.SaleTransactionStatusEnum.COMPLETED, transaction_enum_1.SaleTransactionStatusEnum.CANCELLED],
|
|
9
|
+
[transaction_enum_1.SaleTransactionStatusEnum.PAUSED]: [transaction_enum_1.SaleTransactionStatusEnum.IN_PROGRESS, transaction_enum_1.SaleTransactionStatusEnum.CANCELLED],
|
|
8
10
|
[transaction_enum_1.SaleTransactionStatusEnum.COMPLETED]: [],
|
|
9
11
|
[transaction_enum_1.SaleTransactionStatusEnum.CANCELLED]: [],
|
|
10
12
|
};
|
|
@@ -34,6 +34,7 @@ export class SaveSaleTransactionValidator extends abstract_validator_1.AbstractV
|
|
|
34
34
|
this.notes = entity.notes;
|
|
35
35
|
this.payment = payment?.status;
|
|
36
36
|
this.customer = (0, abstract_validator_1.toId)(entity.customer);
|
|
37
|
+
this.status = entity.status;
|
|
37
38
|
}
|
|
38
39
|
items = [];
|
|
39
40
|
notes;
|
|
@@ -33,6 +33,7 @@ export class SaveServiceTransactionValidator extends abstract_validator_1.Abstra
|
|
|
33
33
|
this.customer = (0, abstract_validator_1.toId)(entity.customer);
|
|
34
34
|
this.user = (0, abstract_validator_1.toId)(entity.user);
|
|
35
35
|
this.notes = entity.notes;
|
|
36
|
+
this.status = entity.status;
|
|
36
37
|
}
|
|
37
38
|
items = [];
|
|
38
39
|
notes;
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CatalogAttributeEntity } from './';
|
|
2
|
-
import { AbstractValidator, ReadValidator, SearchValidator } from '../../..';
|
|
3
|
-
export declare class SearchCatalogAttributeValidator extends SearchValidator<CatalogAttributeEntity> {
|
|
4
|
-
}
|
|
5
|
-
export declare class ReadCatalogAttributeValidator extends ReadValidator<CatalogAttributeEntity> {
|
|
6
|
-
}
|
|
7
|
-
export declare class SaveCatalogAttributeValidator extends AbstractValidator {
|
|
8
|
-
constructor(entity?: CatalogAttributeEntity);
|
|
9
|
-
name: string;
|
|
10
|
-
values?: string[];
|
|
11
|
-
active?: boolean;
|
|
12
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CatalogBrandEntity } from './';
|
|
2
|
-
import { AbstractValidator, ReadValidator, SearchValidator } from '../../..';
|
|
3
|
-
export declare class SearchCatalogBrandValidator extends SearchValidator<CatalogBrandEntity> {
|
|
4
|
-
}
|
|
5
|
-
export declare class ReadCatalogBrandValidator extends ReadValidator<CatalogBrandEntity> {
|
|
6
|
-
}
|
|
7
|
-
export declare class SaveCatalogBrandValidator extends AbstractValidator {
|
|
8
|
-
constructor(entity?: CatalogBrandEntity);
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CatalogCategoryEntity } from './';
|
|
2
|
-
import { AbstractValidator, ReadValidator, SearchValidator } from '../../..';
|
|
3
|
-
export declare class SearchCatalogCategoryValidator extends SearchValidator<CatalogCategoryEntity> {
|
|
4
|
-
}
|
|
5
|
-
export declare class ReadCatalogCategoryValidator extends ReadValidator<CatalogCategoryEntity> {
|
|
6
|
-
}
|
|
7
|
-
export declare class SaveCatalogCategoryValidator extends AbstractValidator {
|
|
8
|
-
constructor(entity?: CatalogCategoryEntity);
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CatalogCollectionEntity } from './';
|
|
2
|
-
import { AbstractValidator, ReadValidator, SearchValidator } from '../../..';
|
|
3
|
-
export declare class SearchCatalogCollectionValidator extends SearchValidator<CatalogCollectionEntity> {
|
|
4
|
-
}
|
|
5
|
-
export declare class ReadCatalogCollectionValidator extends ReadValidator<CatalogCollectionEntity> {
|
|
6
|
-
}
|
|
7
|
-
export declare class SaveCatalogCollectionValidator extends AbstractValidator {
|
|
8
|
-
constructor(entity?: CatalogCollectionEntity);
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
products: string[];
|
|
12
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { CatalogProductEntity } from './';
|
|
2
|
-
import { AbstractValidator, ReadValidator, SearchValidator } from '../../..';
|
|
3
|
-
export declare class SearchCatalogProductValidator extends SearchValidator<CatalogProductEntity> {
|
|
4
|
-
}
|
|
5
|
-
export declare class ReadCatalogProductValidator extends ReadValidator<CatalogProductEntity> {
|
|
6
|
-
}
|
|
7
|
-
export declare class ProductAttributeValidator extends AbstractValidator {
|
|
8
|
-
type: string;
|
|
9
|
-
values: string[];
|
|
10
|
-
}
|
|
11
|
-
export declare class SaveCatalogProductValidator extends AbstractValidator {
|
|
12
|
-
constructor(entity?: CatalogProductEntity);
|
|
13
|
-
name: string;
|
|
14
|
-
sku: string;
|
|
15
|
-
description: string;
|
|
16
|
-
price: number;
|
|
17
|
-
measure: {
|
|
18
|
-
amount: any;
|
|
19
|
-
kind: any;
|
|
20
|
-
unit: any;
|
|
21
|
-
};
|
|
22
|
-
pictures: string[];
|
|
23
|
-
category: string;
|
|
24
|
-
brand: string;
|
|
25
|
-
hashtags: string[];
|
|
26
|
-
attributes: ProductAttributeValidator[];
|
|
27
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CatalogVariantEntity } from './';
|
|
2
|
-
import { AbstractValidator, ReadValidator, SearchValidator } from '../../..';
|
|
3
|
-
export declare class VariantOptionValidator {
|
|
4
|
-
type: string;
|
|
5
|
-
value: string;
|
|
6
|
-
}
|
|
7
|
-
export declare class SearchCatalogVariantValidator extends SearchValidator<CatalogVariantEntity> {
|
|
8
|
-
}
|
|
9
|
-
export declare class ReadCatalogVariantValidator extends ReadValidator<CatalogVariantEntity> {
|
|
10
|
-
}
|
|
11
|
-
export declare class SaveCatalogVariantValidator extends AbstractValidator {
|
|
12
|
-
product?: string;
|
|
13
|
-
sku?: string;
|
|
14
|
-
price?: number;
|
|
15
|
-
options?: VariantOptionValidator[];
|
|
16
|
-
active?: boolean;
|
|
17
|
-
barcode?: string;
|
|
18
|
-
}
|