@merkaly/api 0.1.7 → 0.1.9-11
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/README.md +79 -79
- package/package.json +89 -97
- package/src/account/account.router.d.ts +3 -0
- package/src/account/account.router.d.ts.map +1 -0
- package/src/account/account.router.ts +11 -0
- package/src/account/organizations/members/member.entity.d.ts +9 -9
- package/src/account/organizations/members/member.entity.d.ts.map +1 -0
- package/src/account/organizations/members/member.entity.ts +9 -11
- package/src/account/organizations/members/member.router.d.ts +3 -0
- package/src/account/organizations/members/member.router.d.ts.map +1 -0
- package/src/account/organizations/members/member.router.ts +7 -0
- package/src/account/organizations/members/member.validator.d.ts +3 -0
- package/src/account/organizations/members/member.validator.d.ts.map +1 -0
- package/src/account/organizations/members/member.validator.ts +3 -0
- package/src/account/organizations/organization.entity.d.ts +17 -15
- package/src/account/organizations/organization.entity.d.ts.map +1 -0
- package/src/account/organizations/organization.entity.ts +22 -21
- package/src/account/organizations/organization.router.d.ts +3 -0
- package/src/account/organizations/organization.router.d.ts.map +1 -0
- package/src/account/organizations/organization.router.ts +9 -0
- package/src/account/organizations/organization.validator.d.ts +14 -13
- package/src/account/organizations/organization.validator.d.ts.map +1 -0
- package/src/account/organizations/organization.validator.ts +41 -41
- package/src/account/roles/role.entity.d.ts +7 -7
- package/src/account/roles/role.entity.d.ts.map +1 -0
- package/src/account/roles/role.entity.ts +7 -9
- package/src/account/roles/role.router.d.ts +3 -0
- package/src/account/roles/role.router.d.ts.map +1 -0
- package/src/account/roles/role.router.ts +9 -0
- package/src/account/roles/role.validator.d.ts +10 -9
- package/src/account/roles/role.validator.d.ts.map +1 -0
- package/src/account/roles/role.validator.ts +21 -21
- package/src/account/roles/users/user.entity.d.ts +9 -9
- package/src/account/roles/users/user.entity.d.ts.map +1 -0
- package/src/account/roles/users/user.entity.ts +9 -11
- package/src/account/roles/users/user.router.d.ts +3 -0
- package/src/account/roles/users/user.router.d.ts.map +1 -0
- package/src/account/roles/users/user.router.ts +7 -0
- package/src/account/roles/users/user.validator.d.ts +3 -4
- package/src/account/roles/users/user.validator.d.ts.map +1 -0
- package/src/account/roles/users/user.validator.ts +3 -10
- package/src/account/users/roles/role.entity.d.ts +9 -9
- package/src/account/users/roles/role.entity.d.ts.map +1 -0
- package/src/account/users/roles/role.entity.ts +9 -11
- package/src/account/users/roles/role.router.d.ts +3 -0
- package/src/account/users/roles/role.router.d.ts.map +1 -0
- package/src/account/users/roles/role.router.ts +7 -0
- package/src/account/users/roles/role.validator.d.ts +3 -4
- package/src/account/users/roles/role.validator.d.ts.map +1 -0
- package/src/account/users/roles/role.validator.ts +3 -10
- package/src/account/users/user.entity.d.ts +32 -32
- package/src/account/users/user.entity.d.ts.map +1 -0
- package/src/account/users/user.entity.ts +34 -36
- package/src/account/users/user.router.d.ts +3 -0
- package/src/account/users/user.router.d.ts.map +1 -0
- package/src/account/users/user.router.ts +9 -0
- package/src/account/users/user.validator.d.ts +12 -11
- package/src/account/users/user.validator.d.ts.map +1 -0
- package/src/account/users/user.validator.ts +29 -29
- package/src/app.config.d.ts +27 -0
- package/src/app.d.ts +2 -0
- package/src/app.d.ts.map +1 -0
- package/src/app.emitter.d.ts +17 -0
- package/src/app.emitter.d.ts.map +1 -0
- package/src/app.entity.d.ts +7 -0
- package/src/app.entity.d.ts.map +1 -0
- package/src/app.entity.ts +11 -13
- package/src/app.middleware.d.ts +3 -0
- package/src/app.middleware.d.ts.map +1 -0
- package/src/app.module.d.ts +6 -0
- package/src/app.repository.d.ts +6 -0
- package/src/app.router.d.ts +5 -0
- package/src/app.router.d.ts.map +1 -0
- package/src/{account/auth → auth}/auth.decorator.d.ts +5 -4
- package/src/auth/auth.decorator.d.ts.map +1 -0
- package/src/{account/auth → auth}/auth.decorator.ts +10 -10
- package/src/{account/auth → auth}/auth.guard.d.ts +16 -15
- package/src/auth/auth.guard.d.ts.map +1 -0
- package/src/{account/auth → auth}/auth.guard.ts +41 -41
- package/src/auth/auth.router.d.ts +3 -0
- package/src/auth/auth.router.d.ts.map +1 -0
- package/src/auth/auth.router.ts +7 -0
- package/src/{account/auth → auth}/auth.strategy.d.ts +18 -17
- package/src/auth/auth.strategy.d.ts.map +1 -0
- package/src/{account/auth → auth}/auth.strategy.ts +31 -31
- package/src/{account/auth → auth}/auth.validator.d.ts +5 -4
- package/src/auth/auth.validator.d.ts.map +1 -0
- package/src/{account/auth → auth}/auth.validator.ts +11 -11
- package/src/inventory/brands/brand.entity.d.ts +5 -5
- package/src/inventory/brands/brand.entity.d.ts.map +1 -0
- package/src/inventory/brands/brand.entity.ts +7 -10
- package/src/inventory/brands/brand.router.d.ts +3 -0
- package/src/inventory/brands/brand.router.d.ts.map +1 -0
- package/src/inventory/brands/brand.router.ts +7 -0
- package/src/inventory/brands/brand.validator.d.ts +7 -6
- package/src/inventory/brands/brand.validator.d.ts.map +1 -0
- package/src/inventory/brands/brand.validator.ts +12 -12
- package/src/inventory/categories/category.entity.d.ts +5 -5
- package/src/inventory/categories/category.entity.d.ts.map +1 -0
- package/src/inventory/categories/category.entity.ts +8 -10
- package/src/inventory/categories/category.router.d.ts +3 -0
- package/src/inventory/categories/category.router.d.ts.map +1 -0
- package/src/inventory/categories/category.router.ts +7 -0
- package/src/inventory/categories/category.validator.d.ts +7 -6
- package/src/inventory/categories/category.validator.d.ts.map +1 -0
- package/src/inventory/categories/category.validator.ts +11 -11
- package/src/inventory/inventory.router.d.ts +3 -0
- package/src/inventory/inventory.router.d.ts.map +1 -0
- package/src/inventory/inventory.router.ts +12 -0
- package/src/inventory/products/media/media.entity.d.ts +6 -6
- package/src/inventory/products/media/media.entity.d.ts.map +1 -0
- package/src/inventory/products/media/media.entity.ts +7 -10
- package/src/inventory/products/media/media.router.d.ts +3 -0
- package/src/inventory/products/media/media.router.d.ts.map +1 -0
- package/src/inventory/products/media/media.router.ts +7 -0
- package/src/inventory/products/media/media.validator.d.ts +5 -4
- package/src/inventory/products/media/media.validator.d.ts.map +1 -0
- package/src/inventory/products/media/media.validator.ts +7 -7
- package/src/inventory/products/product.entity.d.ts +32 -31
- package/src/inventory/products/product.entity.d.ts.map +1 -0
- package/src/inventory/products/product.entity.ts +59 -63
- package/src/inventory/products/product.router.d.ts +3 -0
- package/src/inventory/products/product.router.d.ts.map +1 -0
- package/src/inventory/products/product.router.ts +10 -0
- package/src/inventory/products/product.validator.d.ts +22 -21
- package/src/inventory/products/product.validator.d.ts.map +1 -0
- package/src/inventory/products/product.validator.ts +70 -70
- package/src/inventory/products/variants/variant.entity.d.ts +6 -6
- package/src/inventory/products/variants/variant.entity.d.ts.map +1 -0
- package/src/inventory/products/variants/variant.entity.ts +7 -11
- package/src/inventory/products/variants/variant.router.d.ts +3 -0
- package/src/inventory/products/variants/variant.router.d.ts.map +1 -0
- package/src/inventory/products/variants/variant.router.ts +7 -0
- package/src/inventory/products/variants/variant.validator.d.ts +5 -4
- package/src/inventory/products/variants/variant.validator.d.ts.map +1 -0
- package/src/inventory/products/variants/variant.validator.ts +7 -7
- package/src/inventory/properties/property.entity.d.ts +8 -8
- package/src/inventory/properties/property.entity.d.ts.map +1 -0
- package/src/inventory/properties/property.entity.ts +16 -19
- package/src/inventory/properties/property.router.d.ts +3 -0
- package/src/inventory/properties/property.router.d.ts.map +1 -0
- package/src/inventory/properties/property.router.ts +7 -0
- package/src/inventory/properties/property.validator.d.ts +9 -8
- package/src/inventory/properties/property.validator.d.ts.map +1 -0
- package/src/inventory/properties/property.validator.ts +20 -20
- package/src/store/carts/cart.entity.d.ts +14 -14
- package/src/store/carts/cart.entity.d.ts.map +1 -0
- package/src/store/carts/cart.entity.ts +19 -21
- package/src/store/carts/cart.router.d.ts +6 -0
- package/src/store/carts/cart.router.d.ts.map +1 -0
- package/src/store/carts/cart.router.ts +10 -0
- package/src/store/carts/cart.validator.d.ts +5 -4
- package/src/store/carts/cart.validator.d.ts.map +1 -0
- package/src/store/carts/cart.validator.ts +7 -7
- package/src/store/carts/index.d.ts +3 -2
- package/src/store/carts/index.d.ts.map +1 -0
- package/src/store/carts/index.ts +2 -2
- package/src/store/orders/items/item.entity.d.ts +7 -7
- package/src/store/orders/items/item.entity.d.ts.map +1 -0
- package/src/store/orders/items/item.entity.ts +11 -14
- package/src/store/orders/items/item.router.d.ts +3 -0
- package/src/store/orders/items/item.router.d.ts.map +1 -0
- package/src/store/orders/items/item.router.ts +7 -0
- package/src/store/orders/items/item.validator.d.ts +5 -4
- package/src/store/orders/items/item.validator.d.ts.map +1 -0
- package/src/store/orders/items/item.validator.ts +7 -7
- package/src/store/orders/order.entity.d.ts +12 -9
- package/src/store/orders/order.entity.d.ts.map +1 -0
- package/src/store/orders/order.entity.ts +24 -18
- package/src/store/orders/order.router.d.ts +3 -0
- package/src/store/orders/order.router.d.ts.map +1 -0
- package/src/store/orders/order.router.ts +9 -0
- package/src/store/orders/order.validator.d.ts +5 -4
- package/src/store/orders/order.validator.d.ts.map +1 -0
- package/src/store/orders/order.validator.ts +7 -7
- package/src/store/store.router.d.ts +3 -0
- package/src/store/store.router.d.ts.map +1 -0
- package/src/store/store.router.ts +10 -0
- package/src/account/auth/index.d.ts +0 -1
- package/src/account/auth/index.ts +0 -1
- package/src/account/index.d.ts +0 -4
- package/src/account/index.ts +0 -4
- package/src/account/organizations/index.d.ts +0 -3
- package/src/account/organizations/index.ts +0 -3
- package/src/account/organizations/members/index.d.ts +0 -1
- package/src/account/organizations/members/index.ts +0 -1
- package/src/account/roles/index.d.ts +0 -3
- package/src/account/roles/index.ts +0 -3
- package/src/account/roles/users/index.d.ts +0 -2
- package/src/account/roles/users/index.ts +0 -2
- package/src/account/users/index.d.ts +0 -3
- package/src/account/users/index.ts +0 -3
- package/src/account/users/roles/index.d.ts +0 -2
- package/src/account/users/roles/index.ts +0 -2
- package/src/app.ts +0 -40
- package/src/index.d.ts +0 -3
- package/src/index.ts +0 -3
- package/src/inventory/brands/index.d.ts +0 -2
- package/src/inventory/brands/index.ts +0 -2
- package/src/inventory/categories/index.d.ts +0 -2
- package/src/inventory/categories/index.ts +0 -2
- package/src/inventory/index.d.ts +0 -5
- package/src/inventory/index.ts +0 -6
- package/src/inventory/products/index.d.ts +0 -4
- package/src/inventory/products/index.ts +0 -4
- package/src/inventory/products/media/index.d.ts +0 -2
- package/src/inventory/products/media/index.ts +0 -2
- package/src/inventory/products/variants/index.d.ts +0 -2
- package/src/inventory/products/variants/index.ts +0 -2
- package/src/inventory/properties/index.d.ts +0 -2
- package/src/inventory/properties/index.ts +0 -2
- package/src/store/index.d.ts +0 -3
- package/src/store/index.ts +0 -4
- package/src/store/orders/index.d.ts +0 -3
- package/src/store/orders/index.ts +0 -3
- package/src/store/orders/items/index.d.ts +0 -2
- package/src/store/orders/items/index.ts +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.router.d.ts","sourceRoot":"","sources":["inventory.router.ts"],"names":[],"mappings":";AAOA,wBAIE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useRoute } from '../app.router'
|
|
2
|
+
import BrandRouter from './brands/brand.router'
|
|
3
|
+
import CategoryRouter from './categories/category.router'
|
|
4
|
+
import InventoryModule from './inventory.module'
|
|
5
|
+
import ProductRouter from './products/product.router'
|
|
6
|
+
import PropertyRouter from './properties/property.router'
|
|
7
|
+
|
|
8
|
+
export default useRoute({
|
|
9
|
+
path: '/inventory',
|
|
10
|
+
module: InventoryModule,
|
|
11
|
+
children: [BrandRouter, CategoryRouter, PropertyRouter, ProductRouter]
|
|
12
|
+
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity';
|
|
2
|
-
export declare class
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import AppEntity from '../../../app.entity';
|
|
2
|
+
export declare class MediaEntity extends AppEntity {
|
|
3
|
+
name: string;
|
|
4
|
+
price: number;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=media.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.entity.d.ts","sourceRoot":"","sources":["media.entity.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,qBAAqB,CAAA;AAE3C,qBAAa,WAAY,SAAQ,SAAS;IACxC,IAAI,EAAE,MAAM,CAAA;IAEZ,KAAK,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity'
|
|
2
|
-
|
|
3
|
-
export class
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
src: string
|
|
10
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity'
|
|
2
|
+
|
|
3
|
+
export class MediaEntity extends AppEntity {
|
|
4
|
+
name: string
|
|
5
|
+
|
|
6
|
+
price: number
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.router.d.ts","sourceRoot":"","sources":["media.router.ts"],"names":[],"mappings":";AAGA,wBAGE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare class
|
|
2
|
-
}
|
|
3
|
-
export declare class
|
|
4
|
-
}
|
|
1
|
+
export declare class CreateMediaValidator {
|
|
2
|
+
}
|
|
3
|
+
export declare class UpdateMediaValidator {
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=media.validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.validator.d.ts","sourceRoot":"","sources":["media.validator.ts"],"names":[],"mappings":"AAAA,qBAAa,oBAAoB;CAEhC;AAED,qBAAa,oBAAoB;CAEhC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export class
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export class
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
export class CreateMediaValidator {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export class UpdateMediaValidator {
|
|
6
|
+
|
|
7
|
+
}
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { ISubCollection } from 'fireorm';
|
|
2
|
-
import AppEntity from '../../app.entity';
|
|
3
|
-
import { BrandEntity } from '../brands';
|
|
4
|
-
import { CategoryEntity } from '../categories';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
export declare enum PRODUCT_UNIT {
|
|
8
|
-
LENGHT = "LENGHT",
|
|
9
|
-
VOLUME = "VOLUME",
|
|
10
|
-
WEIGHT = "WEIGHT",
|
|
11
|
-
TIME = "TIME",
|
|
12
|
-
QUANTITY = "QUANTITY"
|
|
13
|
-
}
|
|
14
|
-
export declare enum PRODUCT_STATUS {
|
|
15
|
-
DRAFT = "DRAFT",
|
|
16
|
-
ACTIVE = "ACTIVE",
|
|
17
|
-
INACTIVE = "INACTIVE"
|
|
18
|
-
}
|
|
19
|
-
export declare class ProductEntity extends AppEntity {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
hashtags: string[];
|
|
27
|
-
category?: CategoryEntity;
|
|
28
|
-
brand: BrandEntity;
|
|
29
|
-
variants?: ISubCollection<
|
|
30
|
-
media
|
|
31
|
-
}
|
|
1
|
+
import { ISubCollection } from 'fireorm';
|
|
2
|
+
import AppEntity from '../../app.entity';
|
|
3
|
+
import { BrandEntity } from '../brands/brand.entity';
|
|
4
|
+
import { CategoryEntity } from '../categories/category.entity';
|
|
5
|
+
import { MediaEntity } from './media/media.entity';
|
|
6
|
+
import { VariantEntity } from './variants/variant.entity';
|
|
7
|
+
export declare enum PRODUCT_UNIT {
|
|
8
|
+
LENGHT = "LENGHT",
|
|
9
|
+
VOLUME = "VOLUME",
|
|
10
|
+
WEIGHT = "WEIGHT",
|
|
11
|
+
TIME = "TIME",
|
|
12
|
+
QUANTITY = "QUANTITY"
|
|
13
|
+
}
|
|
14
|
+
export declare enum PRODUCT_STATUS {
|
|
15
|
+
DRAFT = "DRAFT",
|
|
16
|
+
ACTIVE = "ACTIVE",
|
|
17
|
+
INACTIVE = "INACTIVE"
|
|
18
|
+
}
|
|
19
|
+
export declare class ProductEntity extends AppEntity {
|
|
20
|
+
name: string;
|
|
21
|
+
description: string;
|
|
22
|
+
price: number;
|
|
23
|
+
unit: PRODUCT_UNIT;
|
|
24
|
+
status: PRODUCT_STATUS;
|
|
25
|
+
availableFrom?: Date;
|
|
26
|
+
hashtags: string[];
|
|
27
|
+
category?: CategoryEntity;
|
|
28
|
+
brand: BrandEntity;
|
|
29
|
+
variants?: ISubCollection<VariantEntity>;
|
|
30
|
+
media?: ISubCollection<MediaEntity>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=product.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.entity.d.ts","sourceRoot":"","sources":["product.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,cAAc,EAAuB,MAAM,SAAS,CAAA;AACzE,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAEzD,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB;AAED,oBAAY,cAAc;IACxB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,qBACa,aAAc,SAAQ,SAAS;IAE1C,IAAI,EAAE,MAAM,CAAA;IAGZ,WAAW,EAAG,MAAM,CAAA;IAGpB,KAAK,EAAE,MAAM,CAAA;IAGb,IAAI,EAAE,YAAY,CAAwB;IAG1C,MAAM,EAAE,cAAc,CAAuB;IAG7C,aAAa,CAAC,EAAE,IAAI,CAAA;IAGpB,QAAQ,EAAE,MAAM,EAAE,CAAK;IAGvB,QAAQ,CAAC,EAAE,cAAc,CAAA;IAGzB,KAAK,EAAE,WAAW,CAAA;IAIlB,QAAQ,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;IAIxC,KAAK,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAA;CACpC"}
|
|
@@ -1,63 +1,59 @@
|
|
|
1
|
-
import { Transform } from 'class-transformer'
|
|
2
|
-
import { Collection, ISubCollection, SubCollection, Type } from 'fireorm'
|
|
3
|
-
import AppEntity from '../../app.entity'
|
|
4
|
-
import { BrandEntity } from '../brands'
|
|
5
|
-
import { CategoryEntity } from '../categories'
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
export enum PRODUCT_UNIT {
|
|
10
|
-
LENGHT = 'LENGHT',
|
|
11
|
-
VOLUME = 'VOLUME',
|
|
12
|
-
WEIGHT = 'WEIGHT',
|
|
13
|
-
TIME = 'TIME',
|
|
14
|
-
QUANTITY = 'QUANTITY',
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export enum PRODUCT_STATUS {
|
|
18
|
-
DRAFT = 'DRAFT',
|
|
19
|
-
ACTIVE = 'ACTIVE',
|
|
20
|
-
INACTIVE = 'INACTIVE',
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@Collection(
|
|
24
|
-
export class ProductEntity extends AppEntity {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@Type(() => String)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@Type(() =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
@Type(() =>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
@Type(() => String)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
@Type(() =>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
@SubCollection(ProductMediaEntity, ProductMediaEntity.$path)
|
|
61
|
-
@Transform(AppEntity.transformSubCollection)
|
|
62
|
-
media: ISubCollection<ProductMediaEntity>
|
|
63
|
-
}
|
|
1
|
+
import { Transform } from 'class-transformer'
|
|
2
|
+
import { Collection, ISubCollection, SubCollection, Type } from 'fireorm'
|
|
3
|
+
import AppEntity from '../../app.entity'
|
|
4
|
+
import { BrandEntity } from '../brands/brand.entity'
|
|
5
|
+
import { CategoryEntity } from '../categories/category.entity'
|
|
6
|
+
import { MediaEntity } from './media/media.entity'
|
|
7
|
+
import { VariantEntity } from './variants/variant.entity'
|
|
8
|
+
|
|
9
|
+
export enum PRODUCT_UNIT {
|
|
10
|
+
LENGHT = 'LENGHT',
|
|
11
|
+
VOLUME = 'VOLUME',
|
|
12
|
+
WEIGHT = 'WEIGHT',
|
|
13
|
+
TIME = 'TIME',
|
|
14
|
+
QUANTITY = 'QUANTITY',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum PRODUCT_STATUS {
|
|
18
|
+
DRAFT = 'DRAFT',
|
|
19
|
+
ACTIVE = 'ACTIVE',
|
|
20
|
+
INACTIVE = 'INACTIVE',
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@Collection('inventory-products')
|
|
24
|
+
export class ProductEntity extends AppEntity {
|
|
25
|
+
@Type(() => String)
|
|
26
|
+
name: string
|
|
27
|
+
|
|
28
|
+
@Type(() => String)
|
|
29
|
+
description!: string
|
|
30
|
+
|
|
31
|
+
@Type(() => Number)
|
|
32
|
+
price: number
|
|
33
|
+
|
|
34
|
+
@Type(() => String)
|
|
35
|
+
unit: PRODUCT_UNIT = PRODUCT_UNIT.QUANTITY
|
|
36
|
+
|
|
37
|
+
@Type(() => String)
|
|
38
|
+
status: PRODUCT_STATUS = PRODUCT_STATUS.DRAFT
|
|
39
|
+
|
|
40
|
+
@Type(() => Date)
|
|
41
|
+
availableFrom?: Date
|
|
42
|
+
|
|
43
|
+
@Type(() => Array)
|
|
44
|
+
hashtags: string[] = []
|
|
45
|
+
|
|
46
|
+
@Type(() => CategoryEntity)
|
|
47
|
+
category?: CategoryEntity
|
|
48
|
+
|
|
49
|
+
@Type(() => BrandEntity)
|
|
50
|
+
brand: BrandEntity
|
|
51
|
+
|
|
52
|
+
@SubCollection(VariantEntity, 'variants')
|
|
53
|
+
@Transform(AppEntity.transformSubCollection)
|
|
54
|
+
variants?: ISubCollection<VariantEntity>
|
|
55
|
+
|
|
56
|
+
@SubCollection(MediaEntity, 'media')
|
|
57
|
+
@Transform(AppEntity.transformSubCollection)
|
|
58
|
+
media?: ISubCollection<MediaEntity>
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.router.d.ts","sourceRoot":"","sources":["product.router.ts"],"names":[],"mappings":";AAKA,wBAIE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useRoute } from '../../app.router'
|
|
2
|
+
import FileRouter from './media/media.router'
|
|
3
|
+
import ProductModule from './product.module'
|
|
4
|
+
import VariantRouter from './variants/variant.router'
|
|
5
|
+
|
|
6
|
+
export default useRoute({
|
|
7
|
+
path: '/products',
|
|
8
|
+
module: ProductModule,
|
|
9
|
+
children: [VariantRouter, FileRouter]
|
|
10
|
+
})
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { PRODUCT_STATUS, PRODUCT_UNIT } from './product.entity';
|
|
2
|
-
export declare class CreateProductValidator {
|
|
3
|
-
name: string;
|
|
4
|
-
price: number;
|
|
5
|
-
description: string;
|
|
6
|
-
category: string;
|
|
7
|
-
brand: string;
|
|
8
|
-
unit: PRODUCT_UNIT;
|
|
9
|
-
status: PRODUCT_STATUS;
|
|
10
|
-
hashtags: string[];
|
|
11
|
-
}
|
|
12
|
-
export declare class UpdateProductValidator {
|
|
13
|
-
name?: string;
|
|
14
|
-
price?: number;
|
|
15
|
-
description?: string;
|
|
16
|
-
category?: string;
|
|
17
|
-
brand?: string;
|
|
18
|
-
unit: PRODUCT_UNIT;
|
|
19
|
-
status: PRODUCT_STATUS;
|
|
20
|
-
hashtags: string[];
|
|
21
|
-
}
|
|
1
|
+
import { PRODUCT_STATUS, PRODUCT_UNIT } from './product.entity';
|
|
2
|
+
export declare class CreateProductValidator {
|
|
3
|
+
name: string;
|
|
4
|
+
price: number;
|
|
5
|
+
description: string;
|
|
6
|
+
category: string;
|
|
7
|
+
brand: string;
|
|
8
|
+
unit: PRODUCT_UNIT;
|
|
9
|
+
status: PRODUCT_STATUS;
|
|
10
|
+
hashtags: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare class UpdateProductValidator {
|
|
13
|
+
name?: string;
|
|
14
|
+
price?: number;
|
|
15
|
+
description?: string;
|
|
16
|
+
category?: string;
|
|
17
|
+
brand?: string;
|
|
18
|
+
unit: PRODUCT_UNIT;
|
|
19
|
+
status: PRODUCT_STATUS;
|
|
20
|
+
hashtags: string[];
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=product.validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.validator.d.ts","sourceRoot":"","sources":["product.validator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/D,qBAAa,sBAAsB;IAGjC,IAAI,EAAE,MAAM,CAAA;IAGZ,KAAK,EAAE,MAAM,CAAA;IAIb,WAAW,EAAG,MAAM,CAAA;IAIpB,QAAQ,EAAG,MAAM,CAAA;IAIjB,KAAK,EAAG,MAAM,CAAA;IAId,IAAI,EAAE,YAAY,CAAwB;IAI1C,MAAM,EAAE,cAAc,CAAuB;IAI7C,QAAQ,EAAE,MAAM,EAAE,CAAK;CACxB;AAED,qBAAa,sBAAsB;IAGjC,IAAI,CAAC,EAAE,MAAM,CAAA;IAIb,KAAK,CAAC,EAAE,MAAM,CAAA;IAId,WAAW,CAAC,EAAE,MAAM,CAAA;IAIpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IAIjB,KAAK,CAAC,EAAE,MAAM,CAAA;IAId,IAAI,EAAE,YAAY,CAAwB;IAI1C,MAAM,EAAE,cAAc,CAAuB;IAI7C,QAAQ,EAAE,MAAM,EAAE,CAAK;CAExB"}
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { IsEnum, IsFirebasePushId, IsOptional, IsPositive, IsString } from 'class-validator'
|
|
2
|
-
import { PRODUCT_STATUS, PRODUCT_UNIT } from './product.entity'
|
|
3
|
-
|
|
4
|
-
export class CreateProductValidator {
|
|
5
|
-
|
|
6
|
-
@IsString()
|
|
7
|
-
name: string
|
|
8
|
-
|
|
9
|
-
@IsPositive()
|
|
10
|
-
price: number
|
|
11
|
-
|
|
12
|
-
@IsString()
|
|
13
|
-
@IsOptional()
|
|
14
|
-
description!: string
|
|
15
|
-
|
|
16
|
-
@IsOptional()
|
|
17
|
-
@IsFirebasePushId()
|
|
18
|
-
category!: string
|
|
19
|
-
|
|
20
|
-
@IsOptional()
|
|
21
|
-
@IsFirebasePushId()
|
|
22
|
-
brand!: string
|
|
23
|
-
|
|
24
|
-
@IsOptional()
|
|
25
|
-
@IsEnum(PRODUCT_UNIT)
|
|
26
|
-
unit: PRODUCT_UNIT = PRODUCT_UNIT.QUANTITY
|
|
27
|
-
|
|
28
|
-
@IsOptional()
|
|
29
|
-
@IsEnum(PRODUCT_STATUS)
|
|
30
|
-
status: PRODUCT_STATUS = PRODUCT_STATUS.DRAFT
|
|
31
|
-
|
|
32
|
-
@IsOptional()
|
|
33
|
-
@IsString({ each: true })
|
|
34
|
-
hashtags: string[] = []
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export class UpdateProductValidator {
|
|
38
|
-
@IsString()
|
|
39
|
-
@IsOptional()
|
|
40
|
-
name?: string
|
|
41
|
-
|
|
42
|
-
@IsPositive()
|
|
43
|
-
@IsOptional()
|
|
44
|
-
price?: number
|
|
45
|
-
|
|
46
|
-
@IsString()
|
|
47
|
-
@IsOptional()
|
|
48
|
-
description?: string
|
|
49
|
-
|
|
50
|
-
@IsOptional()
|
|
51
|
-
@IsFirebasePushId()
|
|
52
|
-
category?: string
|
|
53
|
-
|
|
54
|
-
@IsOptional()
|
|
55
|
-
@IsFirebasePushId()
|
|
56
|
-
brand?: string
|
|
57
|
-
|
|
58
|
-
@IsOptional()
|
|
59
|
-
@IsEnum(PRODUCT_UNIT)
|
|
60
|
-
unit: PRODUCT_UNIT = PRODUCT_UNIT.QUANTITY
|
|
61
|
-
|
|
62
|
-
@IsOptional()
|
|
63
|
-
@IsEnum(PRODUCT_STATUS)
|
|
64
|
-
status: PRODUCT_STATUS = PRODUCT_STATUS.DRAFT
|
|
65
|
-
|
|
66
|
-
@IsOptional()
|
|
67
|
-
@IsString({ each: true })
|
|
68
|
-
hashtags: string[] = []
|
|
69
|
-
|
|
70
|
-
}
|
|
1
|
+
import { IsEnum, IsFirebasePushId, IsOptional, IsPositive, IsString } from 'class-validator'
|
|
2
|
+
import { PRODUCT_STATUS, PRODUCT_UNIT } from './product.entity'
|
|
3
|
+
|
|
4
|
+
export class CreateProductValidator {
|
|
5
|
+
|
|
6
|
+
@IsString()
|
|
7
|
+
name: string
|
|
8
|
+
|
|
9
|
+
@IsPositive()
|
|
10
|
+
price: number
|
|
11
|
+
|
|
12
|
+
@IsString()
|
|
13
|
+
@IsOptional()
|
|
14
|
+
description!: string
|
|
15
|
+
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsFirebasePushId()
|
|
18
|
+
category!: string
|
|
19
|
+
|
|
20
|
+
@IsOptional()
|
|
21
|
+
@IsFirebasePushId()
|
|
22
|
+
brand!: string
|
|
23
|
+
|
|
24
|
+
@IsOptional()
|
|
25
|
+
@IsEnum(PRODUCT_UNIT)
|
|
26
|
+
unit: PRODUCT_UNIT = PRODUCT_UNIT.QUANTITY
|
|
27
|
+
|
|
28
|
+
@IsOptional()
|
|
29
|
+
@IsEnum(PRODUCT_STATUS)
|
|
30
|
+
status: PRODUCT_STATUS = PRODUCT_STATUS.DRAFT
|
|
31
|
+
|
|
32
|
+
@IsOptional()
|
|
33
|
+
@IsString({ each: true })
|
|
34
|
+
hashtags: string[] = []
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class UpdateProductValidator {
|
|
38
|
+
@IsString()
|
|
39
|
+
@IsOptional()
|
|
40
|
+
name?: string
|
|
41
|
+
|
|
42
|
+
@IsPositive()
|
|
43
|
+
@IsOptional()
|
|
44
|
+
price?: number
|
|
45
|
+
|
|
46
|
+
@IsString()
|
|
47
|
+
@IsOptional()
|
|
48
|
+
description?: string
|
|
49
|
+
|
|
50
|
+
@IsOptional()
|
|
51
|
+
@IsFirebasePushId()
|
|
52
|
+
category?: string
|
|
53
|
+
|
|
54
|
+
@IsOptional()
|
|
55
|
+
@IsFirebasePushId()
|
|
56
|
+
brand?: string
|
|
57
|
+
|
|
58
|
+
@IsOptional()
|
|
59
|
+
@IsEnum(PRODUCT_UNIT)
|
|
60
|
+
unit: PRODUCT_UNIT = PRODUCT_UNIT.QUANTITY
|
|
61
|
+
|
|
62
|
+
@IsOptional()
|
|
63
|
+
@IsEnum(PRODUCT_STATUS)
|
|
64
|
+
status: PRODUCT_STATUS = PRODUCT_STATUS.DRAFT
|
|
65
|
+
|
|
66
|
+
@IsOptional()
|
|
67
|
+
@IsString({ each: true })
|
|
68
|
+
hashtags: string[] = []
|
|
69
|
+
|
|
70
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity';
|
|
2
|
-
export declare class
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import AppEntity from '../../../app.entity';
|
|
2
|
+
export declare class VariantEntity extends AppEntity {
|
|
3
|
+
name: string;
|
|
4
|
+
price: number;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=variant.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant.entity.d.ts","sourceRoot":"","sources":["variant.entity.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,qBAAqB,CAAA;AAE3C,qBAAa,aAAc,SAAQ,SAAS;IAC1C,IAAI,EAAE,MAAM,CAAA;IAEZ,KAAK,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity'
|
|
2
|
-
|
|
3
|
-
export class
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
price: number
|
|
10
|
-
|
|
11
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity'
|
|
2
|
+
|
|
3
|
+
export class VariantEntity extends AppEntity {
|
|
4
|
+
name: string
|
|
5
|
+
|
|
6
|
+
price: number
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant.router.d.ts","sourceRoot":"","sources":["variant.router.ts"],"names":[],"mappings":";AAGA,wBAGE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare class CreateProductVariantValidator {
|
|
2
|
-
}
|
|
3
|
-
export declare class UpdateProductVariantValidator {
|
|
4
|
-
}
|
|
1
|
+
export declare class CreateProductVariantValidator {
|
|
2
|
+
}
|
|
3
|
+
export declare class UpdateProductVariantValidator {
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=variant.validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variant.validator.d.ts","sourceRoot":"","sources":["variant.validator.ts"],"names":[],"mappings":"AAAA,qBAAa,6BAA6B;CAEzC;AAED,qBAAa,6BAA6B;CAEzC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export class CreateProductVariantValidator {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export class UpdateProductVariantValidator {
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
export class CreateProductVariantValidator {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export class UpdateProductVariantValidator {
|
|
6
|
+
|
|
7
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import AppEntity from '../../app.entity';
|
|
2
|
-
import { CategoryEntity } from '../categories/category.entity';
|
|
3
|
-
export declare class PropertyEntity extends AppEntity {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import AppEntity from '../../app.entity';
|
|
2
|
+
import { CategoryEntity } from '../categories/category.entity';
|
|
3
|
+
export declare class PropertyEntity extends AppEntity {
|
|
4
|
+
name: string;
|
|
5
|
+
values: string[];
|
|
6
|
+
category: CategoryEntity;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=property.entity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property.entity.d.ts","sourceRoot":"","sources":["property.entity.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAE9D,qBACa,cAAe,SAAQ,SAAS;IAE3C,IAAI,EAAE,MAAM,CAAA;IAGZ,MAAM,EAAE,MAAM,EAAE,CAAA;IAGhB,QAAQ,EAAE,cAAc,CAAA;CAEzB"}
|