@merkaly/api 0.1.11-4 → 0.1.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/{src → config}/app.entity.d.ts +0 -0
- package/config/app.entity.d.ts.map +1 -0
- package/config/app.entity.ts +9 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.ts +3 -0
- package/package.json +5 -4
- package/src/account/connections/connection.validator.d.ts +1 -0
- package/src/account/connections/connection.validator.d.ts.map +1 -1
- package/src/account/connections/connection.validator.ts +1 -0
- package/src/account/organizations/connections/connection.validator.d.ts +1 -0
- package/src/account/organizations/connections/connection.validator.d.ts.map +1 -1
- package/src/account/organizations/connections/connection.validator.ts +1 -0
- package/src/account/organizations/members/member.validator.d.ts +1 -0
- package/src/account/organizations/members/member.validator.d.ts.map +1 -1
- package/src/account/organizations/members/member.validator.ts +2 -0
- package/src/account/organizations/organization.validator.d.ts +5 -4
- package/src/account/organizations/organization.validator.d.ts.map +1 -1
- package/src/account/organizations/organization.validator.ts +5 -4
- package/src/account/roles/role.validator.d.ts +1 -0
- package/src/account/roles/role.validator.d.ts.map +1 -1
- package/src/account/roles/role.validator.ts +1 -0
- package/src/account/roles/users/user.validator.d.ts +1 -0
- package/src/account/roles/users/user.validator.d.ts.map +1 -1
- package/src/account/roles/users/user.validator.ts +2 -0
- package/src/account/users/extra/extra.validator.d.ts +1 -0
- package/src/account/users/extra/extra.validator.d.ts.map +1 -1
- package/src/account/users/extra/extra.validator.ts +1 -0
- package/src/account/users/roles/role.validator.d.ts +1 -0
- package/src/account/users/roles/role.validator.d.ts.map +1 -1
- package/src/account/users/roles/role.validator.ts +2 -0
- package/src/account/users/user.validator.d.ts +1 -0
- package/src/account/users/user.validator.d.ts.map +1 -1
- package/src/account/users/user.validator.ts +1 -0
- package/src/auth/auth.validator.d.ts +1 -0
- package/src/auth/auth.validator.d.ts.map +1 -1
- package/src/auth/auth.validator.ts +1 -0
- package/src/inventory/brands/brand.entity.d.ts +1 -1
- package/src/inventory/brands/brand.entity.d.ts.map +1 -1
- package/src/inventory/brands/brand.entity.ts +4 -9
- package/src/inventory/brands/brand.validator.d.ts +1 -0
- package/src/inventory/brands/brand.validator.d.ts.map +1 -1
- package/src/inventory/brands/brand.validator.ts +1 -0
- package/src/inventory/categories/category.entity.d.ts +1 -3
- package/src/inventory/categories/category.entity.d.ts.map +1 -1
- package/src/inventory/categories/category.entity.ts +4 -16
- package/src/inventory/categories/category.validator.d.ts +1 -0
- package/src/inventory/categories/category.validator.d.ts.map +1 -1
- package/src/inventory/categories/category.validator.ts +1 -0
- package/src/inventory/media/media.entity.d.ts +6 -0
- package/src/inventory/media/media.entity.d.ts.map +1 -0
- package/src/inventory/media/media.entity.ts +7 -0
- package/src/inventory/{products/media → media}/media.validator.d.ts +1 -0
- package/src/inventory/media/media.validator.d.ts.map +1 -0
- package/src/inventory/{products/media → media}/media.validator.ts +2 -0
- package/src/inventory/products/product.entity.d.ts +8 -20
- package/src/inventory/products/product.entity.d.ts.map +1 -1
- package/src/inventory/products/product.entity.ts +13 -37
- package/src/inventory/products/product.validator.d.ts +5 -4
- package/src/inventory/products/product.validator.d.ts.map +1 -1
- package/src/inventory/products/product.validator.ts +17 -16
- package/src/inventory/properties/property.entity.d.ts +2 -2
- package/src/inventory/properties/property.entity.d.ts.map +1 -1
- package/src/inventory/properties/property.entity.ts +4 -10
- package/src/inventory/properties/property.validator.d.ts +1 -0
- package/src/inventory/properties/property.validator.d.ts.map +1 -1
- package/src/inventory/properties/property.validator.ts +1 -0
- package/src/inventory/variants/variant.entity.d.ts +12 -0
- package/src/inventory/variants/variant.entity.d.ts.map +1 -0
- package/src/inventory/variants/variant.entity.ts +22 -0
- package/src/inventory/{products/variants → variants}/variant.validator.d.ts +2 -1
- package/src/inventory/variants/variant.validator.d.ts.map +1 -0
- package/src/inventory/{products/variants → variants}/variant.validator.ts +3 -1
- package/src/store/orders/order.entity.d.ts +1 -3
- package/src/store/orders/order.entity.d.ts.map +1 -1
- package/src/store/orders/order.entity.ts +3 -11
- package/src/store/orders/order.validator.d.ts +1 -0
- package/src/store/orders/order.validator.d.ts.map +1 -1
- package/src/store/orders/order.validator.ts +3 -0
- package/src/app.entity.d.ts.map +0 -1
- package/src/app.entity.ts +0 -15
- package/src/index.d.ts +0 -3
- package/src/index.d.ts.map +0 -1
- package/src/index.ts +0 -3
- package/src/inventory/products/media/media.entity.d.ts +0 -7
- package/src/inventory/products/media/media.entity.d.ts.map +0 -1
- package/src/inventory/products/media/media.entity.ts +0 -13
- package/src/inventory/products/media/media.validator.d.ts.map +0 -1
- package/src/inventory/products/variants/variant.entity.d.ts +0 -10
- package/src/inventory/products/variants/variant.entity.d.ts.map +0 -1
- package/src/inventory/products/variants/variant.entity.ts +0 -21
- package/src/inventory/products/variants/variant.validator.d.ts.map +0 -1
- package/src/store/carts/cart.entity.d.ts +0 -17
- package/src/store/carts/cart.entity.d.ts.map +0 -1
- package/src/store/carts/cart.entity.ts +0 -25
- package/src/store/carts/cart.validator.d.ts +0 -7
- package/src/store/carts/cart.validator.d.ts.map +0 -1
- package/src/store/carts/cart.validator.ts +0 -8
- package/src/store/items/item.entity.d.ts +0 -9
- package/src/store/items/item.entity.d.ts.map +0 -1
- package/src/store/items/item.entity.ts +0 -16
- package/src/store/items/item.validator.d.ts +0 -5
- package/src/store/items/item.validator.d.ts.map +0 -1
- package/src/store/items/item.validator.ts +0 -7
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.entity.d.ts","sourceRoot":"","sources":["app.entity.ts"],"names":[],"mappings":"AAAA,8BAAsB,SAAS;IACtB,EAAE,EAAE,MAAM,CAAA;IAEjB,SAAgB,SAAS,OAAa;IAEtC,SAAgB,SAAS,CAAC,EAAE,IAAI,CAAA;IAEhC,SAAgB,SAAS,CAAC,EAAE,IAAI,CAAA;CACjC"}
|
package/index.d.ts
ADDED
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,eAAe,CAAA;AAExC,MAAM,QAAQ,OAAO,GAAG,OAAO,CAAA"}
|
package/index.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkaly/api",
|
|
3
|
-
"version": "0.1.11
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "NestJS Backend ApiRest Service",
|
|
5
5
|
"author": "Randy Tellez Galan <kronhyx@gmail.com>",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"@elastic/elasticsearch": "^8.0.0",
|
|
37
37
|
"@nestjs/axios": "^0.0.7",
|
|
38
38
|
"@nestjs/cli": "8.2.2",
|
|
39
|
-
"@nestjs/common": "8.4.
|
|
39
|
+
"@nestjs/common": "8.4.1",
|
|
40
40
|
"@nestjs/config": "^1.0.0",
|
|
41
|
-
"@nestjs/core": "8.4.
|
|
41
|
+
"@nestjs/core": "8.4.1",
|
|
42
42
|
"@nestjs/elasticsearch": "8.1.0",
|
|
43
43
|
"@nestjs/event-emitter": "^1.0.0",
|
|
44
44
|
"@nestjs/jwt": "8.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@nestjs/platform-express": "8.4.0",
|
|
47
47
|
"@nestjs/schematics": "8.0.8",
|
|
48
48
|
"@nestjs/swagger": "^5.0.9",
|
|
49
|
-
"@nestjs/testing": "8.4.
|
|
49
|
+
"@nestjs/testing": "8.4.1",
|
|
50
50
|
"@nestjs/typeorm": "^8.0.3",
|
|
51
51
|
"@semantic-release/exec": "^6.0.1",
|
|
52
52
|
"@semantic-release/git": "^10.0.0",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"ts-loader": "^9.2.3",
|
|
79
79
|
"ts-node": "^10.0.0",
|
|
80
80
|
"tsconfig-paths": "^3.9.0",
|
|
81
|
+
"typeorm-naming-strategies": "^4.0.0",
|
|
81
82
|
"typescript": "^4.6.2",
|
|
82
83
|
"webpack": "^5"
|
|
83
84
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.validator.d.ts","sourceRoot":"","sources":["connection.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"connection.validator.d.ts","sourceRoot":"","sources":["connection.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAE1D,OAAO,kBAAkB,CAAA;AAEzB,qBAAa,yBAA0B,YAAW,gBAAgB;IAEzD,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;IAG9B,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAA;CAC9C;AAED,qBAAa,yBAA0B,YAAW,gBAAgB;CAEjE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AddOrganizationEnabledConnection, UpdateOrganizationEnabledConnection } from 'auth0';
|
|
2
|
+
import 'reflect-metadata';
|
|
2
3
|
export declare class CreateConnectionValidator implements AddOrganizationEnabledConnection {
|
|
3
4
|
connection_id: AddOrganizationEnabledConnection['connection_id'];
|
|
4
5
|
assign_membership_on_login: AddOrganizationEnabledConnection['assign_membership_on_login'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection.validator.d.ts","sourceRoot":"","sources":["connection.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,mCAAmC,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"connection.validator.d.ts","sourceRoot":"","sources":["connection.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,mCAAmC,EAAE,MAAM,OAAO,CAAA;AAE7F,OAAO,kBAAkB,CAAA;AAEzB,qBAAa,yBAA0B,YAAW,gCAAgC;IAEhF,aAAa,EAAE,gCAAgC,CAAC,eAAe,CAAC,CAAA;IAGhE,0BAA0B,EAAE,gCAAgC,CAAC,4BAA4B,CAAC,CAAA;CAC3F;AAED,qBAAa,yBAA0B,YAAW,mCAAmC;IAEnF,0BAA0B,EAAE,mCAAmC,CAAC,4BAA4B,CAAC,CAAA;CAC9F"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AddOrganizationEnabledConnection, UpdateOrganizationEnabledConnection } from 'auth0'
|
|
2
2
|
import { IsBoolean, IsString } from 'class-validator'
|
|
3
|
+
import 'reflect-metadata'
|
|
3
4
|
|
|
4
5
|
export class CreateConnectionValidator implements AddOrganizationEnabledConnection {
|
|
5
6
|
@IsString()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member.validator.d.ts","sourceRoot":"","sources":["member.validator.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB,GAAG,MAAM,EAAE,CAAA;AAE7C,oBAAY,yBAAyB,GAAG,MAAM,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"member.validator.d.ts","sourceRoot":"","sources":["member.validator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,oBAAY,sBAAsB,GAAG,MAAM,EAAE,CAAA;AAE7C,oBAAY,yBAAyB,GAAG,MAAM,EAAE,CAAA"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { Organization } from 'auth0';
|
|
2
|
+
import 'reflect-metadata';
|
|
2
3
|
export declare class FindOrganizationValidator {
|
|
3
4
|
}
|
|
4
5
|
export declare class CreateOrganizationValidator {
|
|
5
6
|
name: Organization['name'];
|
|
6
7
|
display_name: Organization['display_name'];
|
|
7
8
|
logo_url?: string;
|
|
8
|
-
primary_color
|
|
9
|
-
secondary_color
|
|
9
|
+
primary_color: string;
|
|
10
|
+
secondary_color: string;
|
|
10
11
|
}
|
|
11
12
|
export declare class UpdateOrganizationValidator {
|
|
12
13
|
display_name?: Organization['display_name'];
|
|
13
14
|
logo_url?: string;
|
|
14
|
-
primary_color
|
|
15
|
-
secondary_color
|
|
15
|
+
primary_color: string;
|
|
16
|
+
secondary_color: string;
|
|
16
17
|
}
|
|
17
18
|
//# sourceMappingURL=organization.validator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.validator.d.ts","sourceRoot":"","sources":["organization.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"organization.validator.d.ts","sourceRoot":"","sources":["organization.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAEpC,OAAO,kBAAkB,CAAA;AAEzB,qBAAa,yBAAyB;CAErC;AAED,qBAAa,2BAA2B;IAEtC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,CAAA;IAG1B,YAAY,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAI1C,QAAQ,CAAC,EAAE,MAAM,CAAA;IAIjB,aAAa,EAAE,MAAM,CAAA;IAIrB,eAAe,EAAE,MAAM,CAAA;CACxB;AAED,qBAAa,2BAA2B;IAGtC,YAAY,CAAC,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;IAI3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IAIjB,aAAa,EAAE,MAAM,CAAA;IAKrB,eAAe,EAAE,MAAM,CAAA;CACxB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Organization } from 'auth0'
|
|
2
2
|
import { IsHexColor, IsOptional, IsString, IsUrl } from 'class-validator'
|
|
3
|
+
import 'reflect-metadata'
|
|
3
4
|
|
|
4
5
|
export class FindOrganizationValidator {
|
|
5
6
|
|
|
@@ -18,11 +19,11 @@ export class CreateOrganizationValidator {
|
|
|
18
19
|
|
|
19
20
|
@IsHexColor()
|
|
20
21
|
@IsOptional()
|
|
21
|
-
primary_color
|
|
22
|
+
primary_color: string
|
|
22
23
|
|
|
23
24
|
@IsHexColor()
|
|
24
25
|
@IsOptional()
|
|
25
|
-
secondary_color
|
|
26
|
+
secondary_color: string
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export class UpdateOrganizationValidator {
|
|
@@ -36,10 +37,10 @@ export class UpdateOrganizationValidator {
|
|
|
36
37
|
|
|
37
38
|
@IsHexColor()
|
|
38
39
|
@IsOptional()
|
|
39
|
-
primary_color
|
|
40
|
+
primary_color: string
|
|
40
41
|
|
|
41
42
|
@IsString()
|
|
42
43
|
@IsHexColor()
|
|
43
44
|
@IsOptional()
|
|
44
|
-
secondary_color
|
|
45
|
+
secondary_color: string
|
|
45
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.validator.d.ts","sourceRoot":"","sources":["role.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"role.validator.d.ts","sourceRoot":"","sources":["role.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,kBAAkB,CAAA;AAEzB,qBAAa,iBAAiB;CAE7B;AAED,qBAAa,mBAAoB,YAAW,cAAc;IAExD,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAI5B,WAAW,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;CAC3C;AAED,qBAAa,mBAAoB,YAAW,cAAc;IAGxD,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAI5B,WAAW,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;CAC3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.validator.d.ts","sourceRoot":"","sources":["user.validator.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY,GAAG,MAAM,EAAE,CAAA;AAEnC,oBAAY,eAAe,GAAG,MAAM,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"user.validator.d.ts","sourceRoot":"","sources":["user.validator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,oBAAY,YAAY,GAAG,MAAM,EAAE,CAAA;AAEnC,oBAAY,eAAe,GAAG,MAAM,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extra.validator.d.ts","sourceRoot":"","sources":["extra.validator.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"extra.validator.d.ts","sourceRoot":"","sources":["extra.validator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'reflect-metadata'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.validator.d.ts","sourceRoot":"","sources":["role.validator.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG,MAAM,EAAE,CAAA;AAElC,oBAAY,cAAc,GAAG,MAAM,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"role.validator.d.ts","sourceRoot":"","sources":["role.validator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,oBAAY,WAAW,GAAG,MAAM,EAAE,CAAA;AAElC,oBAAY,cAAc,GAAG,MAAM,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.validator.d.ts","sourceRoot":"","sources":["user.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"user.validator.d.ts","sourceRoot":"","sources":["user.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AAEtD,OAAO,kBAAkB,CAAA;AAEzB,qBAAa,iBAAiB;CAC7B;AAED,qBAAa,mBAAoB,YAAW,cAAc;IAExD,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,CAAA;IAG9B,QAAQ,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;IAIpC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAI5B,UAAU,EAAE,cAAc,CAAC,YAAY,CAAC,CAAA;CACzC;AAED,qBAAa,mBAAoB,YAAW,cAAc;IAGxD,IAAI,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAI7B,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAA;IAIrC,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.validator.d.ts","sourceRoot":"","sources":["auth.validator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auth.validator.d.ts","sourceRoot":"","sources":["auth.validator.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAA;AAEzB,qBAAa,cAAc;IAGzB,QAAQ,EAAE,MAAM,CAAA;IAGhB,QAAQ,EAAE,MAAM,CAAA;CAEjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.entity.d.ts","sourceRoot":"","sources":["brand.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"brand.entity.d.ts","sourceRoot":"","sources":["brand.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,qBAAa,WAAY,SAAQ,SAAS;IACjC,IAAI,EAAE,MAAM,CAAA;IAEZ,WAAW,EAAE,MAAM,CAAA;IAEnB,QAAQ,EAAE,aAAa,EAAE,CAAA;CACjC"}
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AppEntity } from '../../app.entity'
|
|
1
|
+
import { AppEntity } from '@/config/app.entity'
|
|
3
2
|
import { ProductEntity } from '../products/product.entity'
|
|
4
3
|
|
|
5
|
-
@Entity('inventory_brands')
|
|
6
4
|
export class BrandEntity extends AppEntity {
|
|
7
|
-
|
|
8
|
-
name: string
|
|
5
|
+
public name: string
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
description: string
|
|
7
|
+
public description: string
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
products: ProductEntity[]
|
|
9
|
+
public products: ProductEntity[]
|
|
15
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.validator.d.ts","sourceRoot":"","sources":["brand.validator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,qBAAa,kBAAkB;CAC9B;AAED,qBAAa,oBAAoB;IAE/B,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC1B;AAED,qBAAa,oBAAoB;IAG/B,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC3B"}
|
|
1
|
+
{"version":3,"file":"brand.validator.d.ts","sourceRoot":"","sources":["brand.validator.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,qBAAa,kBAAkB;CAC9B;AAED,qBAAa,oBAAoB;IAE/B,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC1B;AAED,qBAAa,oBAAoB;IAG/B,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;CAC3B"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { AppEntity } from '
|
|
1
|
+
import { AppEntity } from '@/config/app.entity';
|
|
2
2
|
import { ProductEntity } from '../products/product.entity';
|
|
3
3
|
import { PropertyEntity } from '../properties/property.entity';
|
|
4
4
|
export declare class CategoryEntity extends AppEntity {
|
|
5
5
|
name: string;
|
|
6
6
|
description: string;
|
|
7
|
-
parent?: CategoryEntity;
|
|
8
|
-
children: CategoryEntity[];
|
|
9
7
|
products: ProductEntity[];
|
|
10
8
|
properties: PropertyEntity[];
|
|
11
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.entity.d.ts","sourceRoot":"","sources":["category.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"category.entity.d.ts","sourceRoot":"","sources":["category.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAE9D,qBAAa,cAAe,SAAQ,SAAS;IACpC,IAAI,EAAE,MAAM,CAAA;IAEZ,WAAW,EAAE,MAAM,CAAA;IAEnB,QAAQ,EAAE,aAAa,EAAE,CAAA;IAEzB,UAAU,EAAE,cAAc,EAAE,CAAA;CACpC"}
|
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AppEntity } from '../../app.entity'
|
|
1
|
+
import { AppEntity } from '@/config/app.entity'
|
|
3
2
|
import { ProductEntity } from '../products/product.entity'
|
|
4
3
|
import { PropertyEntity } from '../properties/property.entity'
|
|
5
4
|
|
|
6
|
-
@Entity('inventory_categories')
|
|
7
5
|
export class CategoryEntity extends AppEntity {
|
|
8
|
-
|
|
9
|
-
name: string
|
|
6
|
+
public name: string
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
description: string
|
|
8
|
+
public description: string
|
|
13
9
|
|
|
14
|
-
|
|
15
|
-
parent?: CategoryEntity
|
|
10
|
+
public products: ProductEntity[]
|
|
16
11
|
|
|
17
|
-
@OneToMany(() => CategoryEntity, c => c.parent)
|
|
18
|
-
children: CategoryEntity[]
|
|
19
|
-
|
|
20
|
-
@OneToMany(() => ProductEntity, p => p.category)
|
|
21
|
-
products: ProductEntity[]
|
|
22
|
-
|
|
23
|
-
@OneToMany(() => PropertyEntity, p => p.category, { eager: true })
|
|
24
12
|
public properties: PropertyEntity[]
|
|
25
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.validator.d.ts","sourceRoot":"","sources":["category.validator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,qBAAa,qBAAqB;CACjC;AAED,qBAAa,uBAAuB;IAElC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAI5B,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;CAC5C;AAED,qBAAa,uBAAuB;IAElC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;CAC7B"}
|
|
1
|
+
{"version":3,"file":"category.validator.d.ts","sourceRoot":"","sources":["category.validator.ts"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAA;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAElD,qBAAa,qBAAqB;CACjC;AAED,qBAAa,uBAAuB;IAElC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;IAI5B,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;CAC5C;AAED,qBAAa,uBAAuB;IAElC,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.entity.d.ts","sourceRoot":"","sources":["media.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,qBAAa,WAAY,SAAQ,SAAS;IACjC,IAAI,EAAE,MAAM,CAAA;IAEZ,GAAG,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.validator.d.ts","sourceRoot":"","sources":["media.validator.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAA;AAEzB,qBAAa,oBAAoB;CAEhC;AAED,qBAAa,oBAAoB;CAEhC"}
|
|
@@ -1,34 +1,22 @@
|
|
|
1
|
-
import { AppEntity } from '
|
|
1
|
+
import { AppEntity } from '@/config/app.entity';
|
|
2
2
|
import { BrandEntity } from '../brands/brand.entity';
|
|
3
3
|
import { CategoryEntity } from '../categories/category.entity';
|
|
4
|
+
import { MediaEntity } from '../media/media.entity';
|
|
4
5
|
import { PropertyEntity } from '../properties/property.entity';
|
|
5
|
-
import {
|
|
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
|
-
PUBLISHED = "PUBLISHED",
|
|
17
|
-
PAUSED = "PAUSED",
|
|
18
|
-
EXHAUSTED = "EXHAUSTED"
|
|
19
|
-
}
|
|
6
|
+
import { VariantEntity } from '../variants/variant.entity';
|
|
20
7
|
export declare class ProductEntity extends AppEntity {
|
|
21
8
|
name: string;
|
|
22
9
|
description?: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
availableFrom?: Date;
|
|
10
|
+
active: boolean;
|
|
11
|
+
availableFrom: Date;
|
|
26
12
|
hashtags: string[];
|
|
27
13
|
category?: CategoryEntity;
|
|
28
14
|
brand?: BrandEntity;
|
|
29
15
|
properties: PropertyEntity[];
|
|
16
|
+
variant: VariantEntity;
|
|
30
17
|
variants: VariantEntity[];
|
|
31
18
|
media: MediaEntity[];
|
|
32
|
-
get
|
|
19
|
+
get isOutOfStock(): boolean;
|
|
20
|
+
get isDraft(): boolean;
|
|
33
21
|
}
|
|
34
22
|
//# sourceMappingURL=product.entity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.entity.d.ts","sourceRoot":"","sources":["product.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product.entity.d.ts","sourceRoot":"","sources":["product.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAE1D,qBAAa,aAAc,SAAQ,SAAS;IACnC,IAAI,EAAE,MAAM,CAAA;IAEZ,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,MAAM,UAAO;IAEb,aAAa,OAAa;IAE1B,QAAQ,EAAE,MAAM,EAAE,CAAK;IAEvB,QAAQ,CAAC,EAAE,cAAc,CAAA;IAEzB,KAAK,CAAC,EAAE,WAAW,CAAA;IAEnB,UAAU,EAAE,cAAc,EAAE,CAAA;IAE5B,OAAO,EAAE,aAAa,CAAA;IAEtB,QAAQ,EAAE,aAAa,EAAE,CAAA;IAEzB,KAAK,EAAE,WAAW,EAAE,CAAA;IAE3B,IAAW,YAAY,YAEtB;IAED,IAAW,OAAO,YAEjB;CACF"}
|
|
@@ -1,62 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AppEntity } from '../../app.entity'
|
|
1
|
+
import { AppEntity } from '@/config/app.entity'
|
|
3
2
|
import { BrandEntity } from '../brands/brand.entity'
|
|
4
3
|
import { CategoryEntity } from '../categories/category.entity'
|
|
4
|
+
import { MediaEntity } from '../media/media.entity'
|
|
5
5
|
import { PropertyEntity } from '../properties/property.entity'
|
|
6
|
-
import {
|
|
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
|
-
PUBLISHED = 'PUBLISHED',
|
|
20
|
-
PAUSED = 'PAUSED',
|
|
21
|
-
EXHAUSTED = 'EXHAUSTED',
|
|
22
|
-
}
|
|
6
|
+
import { VariantEntity } from '../variants/variant.entity'
|
|
23
7
|
|
|
24
|
-
@Entity('inventory_products')
|
|
25
8
|
export class ProductEntity extends AppEntity {
|
|
26
|
-
@Column({ length: 64 })
|
|
27
9
|
public name: string
|
|
28
10
|
|
|
29
|
-
@Column({ nullable: true, type: 'text' })
|
|
30
11
|
public description?: string
|
|
31
12
|
|
|
32
|
-
|
|
33
|
-
public unit = PRODUCT_UNIT.QUANTITY
|
|
34
|
-
|
|
35
|
-
@Column({ type: 'enum', enum: PRODUCT_STATUS, default: PRODUCT_STATUS.DRAFT })
|
|
36
|
-
public status = PRODUCT_STATUS.DRAFT
|
|
13
|
+
public active = true
|
|
37
14
|
|
|
38
|
-
|
|
39
|
-
public availableFrom?: Date
|
|
15
|
+
public availableFrom = new Date()
|
|
40
16
|
|
|
41
|
-
@Column('simple-array')
|
|
42
17
|
public hashtags: string[] = []
|
|
43
18
|
|
|
44
|
-
@ManyToOne(() => CategoryEntity, c => c.products, { eager: true })
|
|
45
19
|
public category?: CategoryEntity
|
|
46
20
|
|
|
47
|
-
@ManyToOne(() => BrandEntity, b => b.products, { eager: true })
|
|
48
21
|
public brand?: BrandEntity
|
|
49
22
|
|
|
50
|
-
@OneToMany(() => PropertyEntity, p => p.products, { eager: true })
|
|
51
23
|
public properties: PropertyEntity[]
|
|
52
24
|
|
|
53
|
-
|
|
25
|
+
public variant: VariantEntity
|
|
26
|
+
|
|
54
27
|
public variants: VariantEntity[]
|
|
55
28
|
|
|
56
|
-
@OneToMany(() => MediaEntity, m => m.products, { eager: true })
|
|
57
29
|
public media: MediaEntity[]
|
|
58
30
|
|
|
59
|
-
public get
|
|
60
|
-
return this.variants.
|
|
31
|
+
public get isOutOfStock () {
|
|
32
|
+
return this.variants.every(variant => variant.isOutOfStock)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public get isDraft () {
|
|
36
|
+
return this.active === true
|
|
61
37
|
}
|
|
62
38
|
}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { CreateVariantValidator } from '../variants/variant.validator';
|
|
1
3
|
import { ProductEntity } from './product.entity';
|
|
2
|
-
import { CreateVariantValidator } from './variants/variant.validator';
|
|
3
4
|
export declare class FindProductValidator {
|
|
4
5
|
}
|
|
5
6
|
export declare class CreateProductValidator {
|
|
6
7
|
name: ProductEntity['name'];
|
|
7
8
|
description?: ProductEntity['description'];
|
|
9
|
+
availableFrom: Date;
|
|
10
|
+
active: boolean;
|
|
8
11
|
category?: number;
|
|
9
12
|
brand?: number;
|
|
10
|
-
unit: ProductEntity['unit'];
|
|
11
13
|
hashtags: ProductEntity['hashtags'];
|
|
12
14
|
variants: CreateVariantValidator[];
|
|
15
|
+
variant: CreateVariantValidator;
|
|
13
16
|
}
|
|
14
17
|
export declare class UpdateProductValidator {
|
|
15
18
|
name?: ProductEntity['name'];
|
|
16
19
|
description?: ProductEntity['description'];
|
|
17
20
|
category?: number;
|
|
18
21
|
brand?: number;
|
|
19
|
-
unit?: ProductEntity['unit'];
|
|
20
|
-
status?: ProductEntity['status'];
|
|
21
22
|
hashtags?: ProductEntity['hashtags'];
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=product.validator.d.ts.map
|