@merkaly/api 0.1.7 → 0.1.9-4
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/auth/auth.decorator.d.ts +5 -4
- package/src/account/auth/auth.decorator.d.ts.map +1 -0
- package/src/account/auth/auth.decorator.ts +10 -10
- package/src/account/auth/auth.guard.d.ts +16 -15
- package/src/account/auth/auth.guard.d.ts.map +1 -0
- package/src/account/auth/auth.guard.ts +41 -41
- package/src/account/auth/auth.strategy.d.ts +18 -17
- package/src/account/auth/auth.strategy.d.ts.map +1 -0
- package/src/account/auth/auth.strategy.ts +31 -31
- package/src/account/auth/auth.validator.d.ts +5 -4
- package/src/account/auth/auth.validator.d.ts.map +1 -0
- package/src/account/auth/auth.validator.ts +11 -11
- package/src/account/auth/index.d.ts +2 -1
- package/src/account/auth/index.d.ts.map +1 -0
- package/src/account/auth/index.ts +1 -1
- package/src/account/index.d.ts +5 -4
- package/src/account/index.d.ts.map +1 -0
- package/src/account/index.ts +4 -4
- package/src/account/organizations/index.d.ts +4 -3
- package/src/account/organizations/index.d.ts.map +1 -0
- package/src/account/organizations/index.ts +3 -3
- package/src/account/organizations/members/index.d.ts +2 -1
- package/src/account/organizations/members/index.d.ts.map +1 -0
- package/src/account/organizations/members/index.ts +1 -1
- package/src/account/organizations/members/member.entity.d.ts +10 -9
- package/src/account/organizations/members/member.entity.d.ts.map +1 -0
- package/src/account/organizations/members/member.entity.ts +11 -11
- 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 +18 -15
- package/src/account/organizations/organization.entity.d.ts.map +1 -0
- package/src/account/organizations/organization.entity.ts +24 -21
- 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/index.d.ts +4 -3
- package/src/account/roles/index.d.ts.map +1 -0
- package/src/account/roles/index.ts +3 -3
- package/src/account/roles/role.entity.d.ts +8 -7
- package/src/account/roles/role.entity.d.ts.map +1 -0
- package/src/account/roles/role.entity.ts +9 -9
- 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/index.d.ts +3 -2
- package/src/account/roles/users/index.d.ts.map +1 -0
- package/src/account/roles/users/index.ts +2 -2
- package/src/account/roles/users/user.entity.d.ts +10 -9
- package/src/account/roles/users/user.entity.d.ts.map +1 -0
- package/src/account/roles/users/user.entity.ts +11 -11
- 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/index.d.ts +4 -3
- package/src/account/users/index.d.ts.map +1 -0
- package/src/account/users/index.ts +3 -3
- package/src/account/users/roles/index.d.ts +3 -2
- package/src/account/users/roles/index.d.ts.map +1 -0
- package/src/account/users/roles/index.ts +2 -2
- package/src/account/users/roles/role.entity.d.ts +10 -9
- package/src/account/users/roles/role.entity.d.ts.map +1 -0
- package/src/account/users/roles/role.entity.ts +11 -11
- 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 +33 -32
- package/src/account/users/user.entity.d.ts.map +1 -0
- package/src/account/users/user.entity.ts +36 -36
- 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.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.emitter.ts +27 -0
- package/src/app.entity.d.ts +8 -0
- package/src/app.entity.d.ts.map +1 -0
- package/src/app.entity.ts +13 -13
- package/src/app.routes.d.ts +4 -0
- package/src/app.routes.d.ts.map +1 -0
- package/src/app.routes.ts +61 -0
- package/src/index.d.ts +4 -3
- package/src/index.d.ts.map +1 -0
- package/src/index.ts +3 -3
- package/src/inventory/brands/brand.entity.d.ts +6 -5
- package/src/inventory/brands/brand.entity.d.ts.map +1 -0
- package/src/inventory/brands/brand.entity.ts +10 -10
- 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/brands/index.d.ts +3 -2
- package/src/inventory/brands/index.d.ts.map +1 -0
- package/src/inventory/brands/index.ts +2 -2
- package/src/inventory/categories/category.entity.d.ts +6 -5
- package/src/inventory/categories/category.entity.d.ts.map +1 -0
- package/src/inventory/categories/category.entity.ts +10 -10
- 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/categories/index.d.ts +3 -2
- package/src/inventory/categories/index.d.ts.map +1 -0
- package/src/inventory/categories/index.ts +2 -2
- package/src/inventory/index.d.ts +6 -5
- package/src/inventory/index.d.ts.map +1 -0
- package/src/inventory/index.ts +6 -6
- package/src/inventory/products/index.d.ts +5 -4
- package/src/inventory/products/index.d.ts.map +1 -0
- package/src/inventory/products/index.ts +4 -4
- package/src/inventory/products/media/index.d.ts +3 -2
- package/src/inventory/products/media/index.d.ts.map +1 -0
- package/src/inventory/products/media/index.ts +2 -2
- package/src/inventory/products/media/media.entity.d.ts +7 -6
- package/src/inventory/products/media/media.entity.d.ts.map +1 -0
- package/src/inventory/products/media/media.entity.ts +10 -10
- 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 +63 -63
- 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/index.d.ts +3 -2
- package/src/inventory/products/variants/index.d.ts.map +1 -0
- package/src/inventory/products/variants/index.ts +2 -2
- package/src/inventory/products/variants/variant.entity.d.ts +7 -6
- package/src/inventory/products/variants/variant.entity.d.ts.map +1 -0
- package/src/inventory/products/variants/variant.entity.ts +11 -11
- 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/index.d.ts +3 -2
- package/src/inventory/properties/index.d.ts.map +1 -0
- package/src/inventory/properties/index.ts +2 -2
- package/src/inventory/properties/property.entity.d.ts +9 -8
- package/src/inventory/properties/property.entity.d.ts.map +1 -0
- package/src/inventory/properties/property.entity.ts +19 -19
- 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 +15 -14
- package/src/store/carts/cart.entity.d.ts.map +1 -0
- package/src/store/carts/cart.entity.ts +21 -21
- 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/index.d.ts +4 -3
- package/src/store/index.d.ts.map +1 -0
- package/src/store/index.ts +4 -4
- package/src/store/orders/index.d.ts +4 -3
- package/src/store/orders/index.d.ts.map +1 -0
- package/src/store/orders/index.ts +3 -3
- package/src/store/orders/items/index.d.ts +3 -2
- package/src/store/orders/items/index.d.ts.map +1 -0
- package/src/store/orders/items/index.ts +2 -2
- package/src/store/orders/items/item.entity.d.ts +8 -7
- package/src/store/orders/items/item.entity.d.ts.map +1 -0
- package/src/store/orders/items/item.entity.ts +14 -14
- 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 +10 -9
- package/src/store/orders/order.entity.d.ts.map +1 -0
- package/src/store/orders/order.entity.ts +18 -18
- 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/app.ts +0 -40
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare class CreateCategoryValidator {
|
|
2
|
-
name: string;
|
|
3
|
-
}
|
|
4
|
-
export declare class UpdateCategoryValidator {
|
|
5
|
-
name: string;
|
|
6
|
-
}
|
|
1
|
+
export declare class CreateCategoryValidator {
|
|
2
|
+
name: string;
|
|
3
|
+
}
|
|
4
|
+
export declare class UpdateCategoryValidator {
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=category.validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"category.validator.d.ts","sourceRoot":"","sources":["category.validator.ts"],"names":[],"mappings":"AAEA,qBAAa,uBAAuB;IAElC,IAAI,EAAE,MAAM,CAAA;CACb;AAED,qBAAa,uBAAuB;IAElC,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { IsString } from 'class-validator'
|
|
2
|
-
|
|
3
|
-
export class CreateCategoryValidator {
|
|
4
|
-
@IsString()
|
|
5
|
-
name: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export class UpdateCategoryValidator {
|
|
9
|
-
@IsString()
|
|
10
|
-
name: string
|
|
11
|
-
}
|
|
1
|
+
import { IsString } from 'class-validator'
|
|
2
|
+
|
|
3
|
+
export class CreateCategoryValidator {
|
|
4
|
+
@IsString()
|
|
5
|
+
name: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export class UpdateCategoryValidator {
|
|
9
|
+
@IsString()
|
|
10
|
+
name: string
|
|
11
|
+
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './category.validator';
|
|
2
|
-
export * from './category.entity';
|
|
1
|
+
export * from './category.validator';
|
|
2
|
+
export * from './category.entity';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './category.validator'
|
|
2
|
-
export * from './category.entity'
|
|
1
|
+
export * from './category.validator'
|
|
2
|
+
export * from './category.entity'
|
package/src/inventory/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from './brands';
|
|
2
|
-
export * from './categories';
|
|
3
|
-
export * from './products';
|
|
4
|
-
export * from './properties';
|
|
5
|
-
export declare const $InventoryPath = "inventory";
|
|
1
|
+
export * from './brands';
|
|
2
|
+
export * from './categories';
|
|
3
|
+
export * from './products';
|
|
4
|
+
export * from './properties';
|
|
5
|
+
export declare const $InventoryPath = "inventory";
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAE5B,eAAO,MAAM,cAAc,cAAc,CAAA"}
|
package/src/inventory/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './brands'
|
|
2
|
-
export * from './categories'
|
|
3
|
-
export * from './products'
|
|
4
|
-
export * from './properties'
|
|
5
|
-
|
|
6
|
-
export const $InventoryPath = 'inventory'
|
|
1
|
+
export * from './brands'
|
|
2
|
+
export * from './categories'
|
|
3
|
+
export * from './products'
|
|
4
|
+
export * from './properties'
|
|
5
|
+
|
|
6
|
+
export const $InventoryPath = 'inventory'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './product.validator';
|
|
2
|
-
export * from './product.entity';
|
|
3
|
-
export * from './variants';
|
|
4
|
-
export * from './media';
|
|
1
|
+
export * from './product.validator';
|
|
2
|
+
export * from './product.entity';
|
|
3
|
+
export * from './variants';
|
|
4
|
+
export * from './media';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './product.validator'
|
|
2
|
-
export * from './product.entity'
|
|
3
|
-
export * from './variants'
|
|
4
|
-
export * from './media'
|
|
1
|
+
export * from './product.validator'
|
|
2
|
+
export * from './product.entity'
|
|
3
|
+
export * from './variants'
|
|
4
|
+
export * from './media'
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './media.entity';
|
|
2
|
-
export * from './media.validator';
|
|
1
|
+
export * from './media.entity';
|
|
2
|
+
export * from './media.validator';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './media.entity'
|
|
2
|
-
export * from './media.validator'
|
|
1
|
+
export * from './media.entity'
|
|
2
|
+
export * from './media.validator'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity';
|
|
2
|
-
export declare class ProductMediaEntity extends AppEntity {
|
|
3
|
-
static readonly $path = "images";
|
|
4
|
-
name: string;
|
|
5
|
-
src: string;
|
|
6
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity';
|
|
2
|
+
export declare class ProductMediaEntity extends AppEntity {
|
|
3
|
+
static readonly $path = "images";
|
|
4
|
+
name: string;
|
|
5
|
+
src: string;
|
|
6
|
+
}
|
|
7
|
+
//# 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,kBAAmB,SAAQ,SAAS;IAE/C,MAAM,CAAC,QAAQ,CAAC,KAAK,YAAW;IAEhC,IAAI,EAAE,MAAM,CAAA;IAEZ,GAAG,EAAE,MAAM,CAAA;CACZ"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity'
|
|
2
|
-
|
|
3
|
-
export class ProductMediaEntity extends AppEntity {
|
|
4
|
-
|
|
5
|
-
static readonly $path = 'images'
|
|
6
|
-
|
|
7
|
-
name: string
|
|
8
|
-
|
|
9
|
-
src: string
|
|
10
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity'
|
|
2
|
+
|
|
3
|
+
export class ProductMediaEntity extends AppEntity {
|
|
4
|
+
|
|
5
|
+
static readonly $path = 'images'
|
|
6
|
+
|
|
7
|
+
name: string
|
|
8
|
+
|
|
9
|
+
src: string
|
|
10
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export declare class CreateProductMediaValidator {
|
|
2
|
-
}
|
|
3
|
-
export declare class UpdateProductMediaValidator {
|
|
4
|
-
}
|
|
1
|
+
export declare class CreateProductMediaValidator {
|
|
2
|
+
}
|
|
3
|
+
export declare class UpdateProductMediaValidator {
|
|
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,2BAA2B;CAEvC;AAED,qBAAa,2BAA2B;CAEvC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export class CreateProductMediaValidator {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export class UpdateProductMediaValidator {
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
export class CreateProductMediaValidator {
|
|
2
|
+
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export class UpdateProductMediaValidator {
|
|
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 { ProductMediaEntity } from './media';
|
|
6
|
-
import { ProductVariantEntity } from './variants';
|
|
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
|
-
static readonly $path = "products";
|
|
21
|
-
name: string;
|
|
22
|
-
description: string;
|
|
23
|
-
price: number;
|
|
24
|
-
unit: PRODUCT_UNIT;
|
|
25
|
-
status: PRODUCT_STATUS;
|
|
26
|
-
hashtags: string[];
|
|
27
|
-
category?: CategoryEntity;
|
|
28
|
-
brand: BrandEntity;
|
|
29
|
-
variants?: ISubCollection<ProductVariantEntity>;
|
|
30
|
-
media: ISubCollection<ProductMediaEntity>;
|
|
31
|
-
}
|
|
1
|
+
import { ISubCollection } from 'fireorm';
|
|
2
|
+
import AppEntity from '../../app.entity';
|
|
3
|
+
import { BrandEntity } from '../brands';
|
|
4
|
+
import { CategoryEntity } from '../categories';
|
|
5
|
+
import { ProductMediaEntity } from './media';
|
|
6
|
+
import { ProductVariantEntity } from './variants';
|
|
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
|
+
static readonly $path = "products";
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
price: number;
|
|
24
|
+
unit: PRODUCT_UNIT;
|
|
25
|
+
status: PRODUCT_STATUS;
|
|
26
|
+
hashtags: string[];
|
|
27
|
+
category?: CategoryEntity;
|
|
28
|
+
brand: BrandEntity;
|
|
29
|
+
variants?: ISubCollection<ProductVariantEntity>;
|
|
30
|
+
media: ISubCollection<ProductMediaEntity>;
|
|
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,WAAW,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEjD,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,MAAM,CAAC,QAAQ,CAAC,KAAK,cAAa;IAGlC,IAAI,EAAE,MAAM,CAAA;IAGZ,WAAW,EAAG,MAAM,CAAA;IAGpB,KAAK,EAAE,MAAM,CAAA;IAGb,IAAI,EAAE,YAAY,CAAwB;IAG1C,MAAM,EAAE,cAAc,CAAuB;IAK7C,QAAQ,EAAE,MAAM,EAAE,CAAK;IAGvB,QAAQ,CAAC,EAAE,cAAc,CAAA;IAGzB,KAAK,EAAE,WAAW,CAAA;IAMlB,QAAQ,CAAC,EAAE,cAAc,CAAC,oBAAoB,CAAC,CAAA;IAI/C,KAAK,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAA;CAC1C"}
|
|
@@ -1,63 +1,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'
|
|
5
|
-
import { CategoryEntity } from '../categories'
|
|
6
|
-
import { ProductMediaEntity } from './media'
|
|
7
|
-
import { ProductVariantEntity } from './variants'
|
|
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(ProductEntity.$path)
|
|
24
|
-
export class ProductEntity extends AppEntity {
|
|
25
|
-
|
|
26
|
-
static readonly $path = 'products'
|
|
27
|
-
|
|
28
|
-
@Type(() => String)
|
|
29
|
-
name: string
|
|
30
|
-
|
|
31
|
-
@Type(() => String)
|
|
32
|
-
description!: string
|
|
33
|
-
|
|
34
|
-
@Type(() => Number)
|
|
35
|
-
price: number
|
|
36
|
-
|
|
37
|
-
@Type(() => String)
|
|
38
|
-
unit: PRODUCT_UNIT = PRODUCT_UNIT.QUANTITY
|
|
39
|
-
|
|
40
|
-
@Type(() => String)
|
|
41
|
-
status: PRODUCT_STATUS = PRODUCT_STATUS.DRAFT
|
|
42
|
-
|
|
43
|
-
//TODO Implement availableFrom Date -> When a product become available from the selected date
|
|
44
|
-
|
|
45
|
-
@Type(() => Array)
|
|
46
|
-
hashtags: string[] = []
|
|
47
|
-
|
|
48
|
-
@Type(() => CategoryEntity)
|
|
49
|
-
category?: CategoryEntity
|
|
50
|
-
|
|
51
|
-
@Type(() => BrandEntity)
|
|
52
|
-
brand: BrandEntity
|
|
53
|
-
|
|
54
|
-
@SubCollection(ProductVariantEntity, ProductVariantEntity.$path)
|
|
55
|
-
@Transform(AppEntity.transformSubCollection)
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
variants?: ISubCollection<ProductVariantEntity>
|
|
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'
|
|
5
|
+
import { CategoryEntity } from '../categories'
|
|
6
|
+
import { ProductMediaEntity } from './media'
|
|
7
|
+
import { ProductVariantEntity } from './variants'
|
|
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(ProductEntity.$path)
|
|
24
|
+
export class ProductEntity extends AppEntity {
|
|
25
|
+
|
|
26
|
+
static readonly $path = 'products'
|
|
27
|
+
|
|
28
|
+
@Type(() => String)
|
|
29
|
+
name: string
|
|
30
|
+
|
|
31
|
+
@Type(() => String)
|
|
32
|
+
description!: string
|
|
33
|
+
|
|
34
|
+
@Type(() => Number)
|
|
35
|
+
price: number
|
|
36
|
+
|
|
37
|
+
@Type(() => String)
|
|
38
|
+
unit: PRODUCT_UNIT = PRODUCT_UNIT.QUANTITY
|
|
39
|
+
|
|
40
|
+
@Type(() => String)
|
|
41
|
+
status: PRODUCT_STATUS = PRODUCT_STATUS.DRAFT
|
|
42
|
+
|
|
43
|
+
//TODO Implement availableFrom Date -> When a product become available from the selected date
|
|
44
|
+
|
|
45
|
+
@Type(() => Array)
|
|
46
|
+
hashtags: string[] = []
|
|
47
|
+
|
|
48
|
+
@Type(() => CategoryEntity)
|
|
49
|
+
category?: CategoryEntity
|
|
50
|
+
|
|
51
|
+
@Type(() => BrandEntity)
|
|
52
|
+
brand: BrandEntity
|
|
53
|
+
|
|
54
|
+
@SubCollection(ProductVariantEntity, ProductVariantEntity.$path)
|
|
55
|
+
@Transform(AppEntity.transformSubCollection)
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
variants?: ISubCollection<ProductVariantEntity>
|
|
59
|
+
|
|
60
|
+
@SubCollection(ProductMediaEntity, ProductMediaEntity.$path)
|
|
61
|
+
@Transform(AppEntity.transformSubCollection)
|
|
62
|
+
media: ISubCollection<ProductMediaEntity>
|
|
63
|
+
}
|
|
@@ -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,2 +1,3 @@
|
|
|
1
|
-
export * from './variant.validator';
|
|
2
|
-
export * from './variant.entity';
|
|
1
|
+
export * from './variant.validator';
|
|
2
|
+
export * from './variant.entity';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './variant.validator'
|
|
2
|
-
export * from './variant.entity'
|
|
1
|
+
export * from './variant.validator'
|
|
2
|
+
export * from './variant.entity'
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity';
|
|
2
|
-
export declare class ProductVariantEntity extends AppEntity {
|
|
3
|
-
static readonly $path = "variants";
|
|
4
|
-
name: string;
|
|
5
|
-
price: number;
|
|
6
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity';
|
|
2
|
+
export declare class ProductVariantEntity extends AppEntity {
|
|
3
|
+
static readonly $path = "variants";
|
|
4
|
+
name: string;
|
|
5
|
+
price: number;
|
|
6
|
+
}
|
|
7
|
+
//# 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,oBAAqB,SAAQ,SAAS;IAEjD,MAAM,CAAC,QAAQ,CAAC,KAAK,cAAa;IAElC,IAAI,EAAE,MAAM,CAAA;IAEZ,KAAK,EAAE,MAAM,CAAA;CAEd"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import AppEntity from '../../../app.entity'
|
|
2
|
-
|
|
3
|
-
export class ProductVariantEntity extends AppEntity {
|
|
4
|
-
|
|
5
|
-
static readonly $path = 'variants'
|
|
6
|
-
|
|
7
|
-
name: string
|
|
8
|
-
|
|
9
|
-
price: number
|
|
10
|
-
|
|
11
|
-
}
|
|
1
|
+
import AppEntity from '../../../app.entity'
|
|
2
|
+
|
|
3
|
+
export class ProductVariantEntity extends AppEntity {
|
|
4
|
+
|
|
5
|
+
static readonly $path = 'variants'
|
|
6
|
+
|
|
7
|
+
name: string
|
|
8
|
+
|
|
9
|
+
price: number
|
|
10
|
+
|
|
11
|
+
}
|