@merkaly/api 0.2.2-8 → 0.2.2

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.
Files changed (143) hide show
  1. package/.output/abstract/abstract.document.d.ts +10 -0
  2. package/.output/abstract/abstract.document.js +13 -0
  3. package/.output/{configs/app.entity.d.ts → abstract/abstract.entity.d.ts} +3 -3
  4. package/.output/abstract/abstract.entity.js +54 -0
  5. package/.output/abstract/abstract.fixture.d.ts +4 -0
  6. package/.output/abstract/abstract.fixture.js +11 -0
  7. package/.output/abstract/abstract.validator.d.ts +18 -0
  8. package/.output/abstract/abstract.validator.js +73 -0
  9. package/.output/modules/assets/asset.entity.d.ts +2 -2
  10. package/.output/modules/assets/asset.entity.js +69 -0
  11. package/.output/modules/content/banners/banner.document.d.ts +6 -0
  12. package/.output/modules/content/banners/banner.document.js +30 -0
  13. package/.output/modules/content/banners/banner.entity.d.ts +7 -0
  14. package/.output/modules/content/banners/banner.entity.js +54 -0
  15. package/.output/modules/content/banners/banner.fixture.d.ts +5 -0
  16. package/.output/modules/content/banners/banner.fixture.js +39 -0
  17. package/.output/modules/content/banners/banner.validator.d.ts +8 -0
  18. package/.output/modules/content/banners/banner.validator.js +63 -0
  19. package/.output/modules/content/pages/page.document.d.ts +10 -0
  20. package/.output/modules/content/pages/page.document.js +32 -0
  21. package/.output/modules/content/pages/page.entity.d.ts +11 -0
  22. package/.output/modules/content/pages/page.entity.js +69 -0
  23. package/.output/modules/content/pages/page.fixture.d.ts +5 -0
  24. package/.output/modules/content/pages/page.fixture.js +39 -0
  25. package/.output/modules/content/pages/page.types.d.ts +8 -0
  26. package/.output/modules/content/pages/page.types.js +13 -0
  27. package/.output/modules/content/pages/page.validator.d.ts +11 -0
  28. package/.output/modules/content/pages/page.validator.js +73 -0
  29. package/.output/modules/insight/validators/order.validator.d.ts +4 -0
  30. package/.output/modules/insight/validators/order.validator.js +27 -0
  31. package/.output/modules/inventory/brands/brand.document.d.ts +5 -0
  32. package/.output/modules/inventory/brands/brand.document.js +30 -0
  33. package/.output/modules/inventory/brands/brand.entity.d.ts +2 -2
  34. package/.output/modules/inventory/brands/brand.entity.js +50 -0
  35. package/.output/modules/inventory/brands/brand.validator.js +45 -0
  36. package/.output/modules/inventory/categories/category.document.d.ts +6 -0
  37. package/.output/modules/inventory/categories/category.document.js +31 -0
  38. package/.output/modules/inventory/categories/category.entity.d.ts +5 -2
  39. package/.output/modules/inventory/categories/category.entity.js +61 -0
  40. package/.output/modules/inventory/categories/category.fixture.d.ts +5 -0
  41. package/.output/modules/inventory/categories/category.fixture.js +38 -0
  42. package/.output/modules/inventory/categories/category.validator.d.ts +2 -0
  43. package/.output/modules/inventory/categories/category.validator.js +57 -0
  44. package/.output/modules/inventory/products/entities/code.entity.d.ts +5 -0
  45. package/.output/modules/inventory/products/entities/code.entity.js +53 -0
  46. package/.output/modules/inventory/products/entities/dimension.entity.d.ts +6 -0
  47. package/.output/modules/inventory/products/entities/dimension.entity.js +57 -0
  48. package/.output/modules/inventory/products/entities/price.entity.d.ts +4 -0
  49. package/.output/modules/inventory/products/entities/price.entity.js +49 -0
  50. package/.output/modules/inventory/products/entities/seo.entity.d.ts +5 -0
  51. package/.output/modules/inventory/products/entities/seo.entity.js +53 -0
  52. package/.output/modules/inventory/products/product.document.d.ts +24 -0
  53. package/.output/modules/inventory/products/product.document.js +33 -0
  54. package/.output/modules/inventory/products/product.entity.d.ts +13 -3
  55. package/.output/modules/inventory/products/product.entity.js +101 -0
  56. package/.output/modules/inventory/products/product.fixture.d.ts +5 -0
  57. package/.output/modules/inventory/products/product.fixture.js +54 -0
  58. package/.output/modules/inventory/products/product.validator.d.ts +15 -11
  59. package/.output/modules/inventory/products/product.validator.js +118 -0
  60. package/.output/modules/inventory/products/validators/code.validator.d.ts +5 -0
  61. package/.output/modules/inventory/products/validators/code.validator.js +37 -0
  62. package/.output/modules/inventory/products/validators/dimension.validator.d.ts +6 -0
  63. package/.output/modules/inventory/products/validators/dimension.validator.js +43 -0
  64. package/.output/modules/inventory/products/validators/price.validator.d.ts +4 -0
  65. package/.output/modules/inventory/products/validators/price.validator.js +30 -0
  66. package/.output/modules/inventory/products/validators/seo.validator.d.ts +5 -0
  67. package/.output/modules/inventory/products/validators/seo.validator.js +37 -0
  68. package/.output/modules/inventory/properties/property.entity.d.ts +7 -0
  69. package/.output/modules/inventory/properties/property.entity.js +55 -0
  70. package/.output/modules/inventory/properties/property.validator.d.ts +12 -0
  71. package/.output/modules/inventory/properties/property.validator.js +51 -0
  72. package/.output/modules/sales/clients/client.entity.d.ts +12 -0
  73. package/.output/modules/sales/clients/client.entity.js +73 -0
  74. package/.output/modules/sales/clients/client.validator.d.ts +12 -0
  75. package/.output/modules/sales/clients/client.validator.js +67 -0
  76. package/.output/modules/{store/orders/billing/billing.validator.d.ts → sales/orders/billing/billing.document.d.ts} +4 -4
  77. package/.output/modules/sales/orders/billing/billing.document.js +9 -0
  78. package/.output/modules/{store → sales}/orders/billing/billing.entity.d.ts +0 -0
  79. package/.output/modules/sales/orders/billing/billing.entity.js +44 -0
  80. package/.output/modules/sales/orders/billing/billing.validator.d.ts +7 -0
  81. package/.output/modules/sales/orders/billing/billing.validator.js +40 -0
  82. package/.output/modules/sales/orders/item/item.document.d.ts +6 -0
  83. package/.output/modules/sales/orders/item/item.document.js +9 -0
  84. package/.output/modules/sales/orders/item/item.entity.d.ts +7 -0
  85. package/.output/modules/sales/orders/item/item.entity.js +54 -0
  86. package/.output/modules/{store/orders/item/item.entity.d.ts → sales/orders/item/item.schema.d.ts} +3 -8
  87. package/.output/modules/sales/orders/item/item.schema.js +6 -0
  88. package/.output/modules/{store → sales}/orders/item/item.validator.d.ts +0 -0
  89. package/.output/modules/sales/orders/item/item.validator.js +29 -0
  90. package/.output/modules/sales/orders/order.entity.d.ts +19 -0
  91. package/.output/modules/sales/orders/order.entity.js +82 -0
  92. package/.output/modules/sales/orders/order.validator.d.ts +18 -0
  93. package/.output/modules/sales/orders/order.validator.js +75 -0
  94. package/.output/modules/sales/orders/payment/payment.entity.d.ts +4 -0
  95. package/.output/modules/sales/orders/payment/payment.entity.js +28 -0
  96. package/.output/modules/sales/orders/payment/payment.schema.d.ts +27 -0
  97. package/.output/modules/sales/orders/payment/payment.schema.js +6 -0
  98. package/.output/modules/sales/orders/payment/payment.validator.d.ts +6 -0
  99. package/.output/modules/sales/orders/payment/payment.validator.js +10 -0
  100. package/.output/modules/{store/orders/shipping/shipping.validator.d.ts → sales/orders/shipping/shipping.document.d.ts} +4 -4
  101. package/.output/modules/sales/orders/shipping/shipping.document.js +9 -0
  102. package/.output/modules/{store → sales}/orders/shipping/shipping.entity.d.ts +0 -0
  103. package/.output/modules/sales/orders/shipping/shipping.entity.js +44 -0
  104. package/.output/modules/sales/orders/shipping/shipping.validator.d.ts +7 -0
  105. package/.output/modules/sales/orders/shipping/shipping.validator.js +40 -0
  106. package/.output/modules/sales/orders/status/status.document.d.ts +5 -0
  107. package/.output/modules/sales/orders/status/status.document.js +9 -0
  108. package/.output/modules/sales/orders/status/status.entity.d.ts +6 -0
  109. package/.output/modules/sales/orders/status/status.entity.js +37 -0
  110. package/.output/modules/sales/orders/status/status.validator.d.ts +8 -0
  111. package/.output/modules/sales/orders/status/status.validator.js +12 -0
  112. package/.output/modules/search/search.validator.d.ts +6 -0
  113. package/.output/modules/search/search.validator.js +49 -0
  114. package/.output/modules/{auth → setting}/connections/connection.validator.d.ts +0 -1
  115. package/.output/modules/setting/connections/connection.validator.js +37 -0
  116. package/.output/modules/setting/layout/layout.document.d.ts +5 -0
  117. package/.output/modules/setting/layout/layout.document.js +29 -0
  118. package/.output/modules/setting/layout/layout.entity.d.ts +6 -0
  119. package/.output/modules/setting/layout/layout.entity.js +46 -0
  120. package/.output/modules/{auth → setting}/members/member.validator.d.ts +0 -1
  121. package/.output/modules/setting/members/member.validator.js +2 -0
  122. package/.output/modules/setting/organization/organization.document.d.ts +15 -0
  123. package/.output/modules/setting/organization/organization.document.js +31 -0
  124. package/.output/modules/setting/organization/organization.entity.d.ts +4 -0
  125. package/.output/modules/setting/organization/organization.entity.js +28 -0
  126. package/.output/modules/setting/organization/organization.types.d.ts +22 -0
  127. package/.output/modules/setting/organization/organization.types.js +102 -0
  128. package/.output/modules/setting/organization/organization.validator.d.ts +17 -0
  129. package/.output/modules/setting/organization/organization.validator.js +83 -0
  130. package/.output/modules/setting/theme/theme.entity.d.ts +6 -0
  131. package/.output/modules/setting/theme/theme.entity.js +46 -0
  132. package/.output/modules/users/user.validator.d.ts +10 -0
  133. package/.output/modules/users/user.validator.js +50 -0
  134. package/.output/types.d.ts +23 -0
  135. package/.output/types.js +2 -0
  136. package/package.json +22 -11
  137. package/.output/main.d.ts +0 -0
  138. package/.output/modules/auth/organizations/organization.validator.d.ts +0 -6
  139. package/.output/modules/store/cart/cart.entity.d.ts +0 -14
  140. package/.output/modules/store/cart/cart.validator.d.ts +0 -11
  141. package/.output/modules/store/orders/order.entity.d.ts +0 -14
  142. package/.output/modules/store/orders/order.validator.d.ts +0 -10
  143. package/.output/modules/store/orders/status/status.entity.d.ts +0 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.2.2-8",
3
+ "version": "0.2.2",
4
4
  "description": "NestJS Backend ApiRest Service",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "license": "UNLICENSED",
10
10
  "author": "Randy Tellez Galan <kronhyx@gmail.com>",
11
- "main": "./.output/main",
11
+ "main": "./src/main",
12
12
  "types": "./.output/types.d.ts",
13
13
  "files": [
14
14
  ".output"
@@ -17,25 +17,30 @@
17
17
  "prebuild": "yarn run clean",
18
18
  "build": "nest build",
19
19
  "clean": "tsc -b --clean",
20
- "console": "ts-node -r tsconfig-paths/register ./src/console.ts",
20
+ "console": "ts-node -r tsconfig-paths/register ./src/app.console.ts",
21
21
  "dev": "yarn start --watch",
22
- "lint": "eslint \"{src,a}/**/*.ts\" . ",
22
+ "lint": "eslint \"{src,test}/**/*.ts\" . ",
23
+ "migrate": "tsc --target es5 ./src/migrations/*.ts && migrate --config ./src/app.migration.ts",
23
24
  "prepack": ".bin/package.sh",
24
25
  "postpack": "yarn run clean",
25
26
  "semantic-release": "yarn run build:package && semantic-release",
26
27
  "start": "nest start",
27
- "start:prod": "node .output/main.js",
28
+ "start:prod": "node ./src/main.js",
28
29
  "test": "jest",
29
30
  "test:cov": "yarn test -- --coverage",
30
31
  "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
31
32
  "test:watch": "yarn test -- --watch"
32
33
  },
34
+ "lint-staged": {
35
+ "*.**": "yarn lint --cache --fix"
36
+ },
33
37
  "dependencies": {
38
+ "@elastic/elasticsearch": "^8.4.0",
34
39
  "@types/auth0": "^2.35.2",
35
40
  "class-transformer": "^0.5.1",
36
41
  "class-validator": "^0.13.1",
37
- "reflect-metadata": "^0.1.13",
38
- "short-unique-id": "^4.4.4"
42
+ "mongoose": "^6",
43
+ "reflect-metadata": "^0.1.13"
39
44
  },
40
45
  "devDependencies": {
41
46
  "@commitlint/config-conventional": "^17.0.0",
@@ -45,15 +50,20 @@
45
50
  "@nestjs/common": "^9.0.11",
46
51
  "@nestjs/config": "^2.2.0",
47
52
  "@nestjs/core": "^9.0.11",
53
+ "@nestjs/elasticsearch": "^9.0.0",
54
+ "@nestjs/event-emitter": "^1.3.1",
48
55
  "@nestjs/jwt": "^9.0.0",
49
56
  "@nestjs/mongoose": "^9.2.0",
50
57
  "@nestjs/passport": "^9.0.0",
51
58
  "@nestjs/platform-express": "^9.0.11",
59
+ "@nestjs/platform-socket.io": "^9.1.6",
52
60
  "@nestjs/schematics": "^9.0.1",
53
61
  "@nestjs/swagger": "^6.1.0",
54
62
  "@nestjs/testing": "^9.0.11",
63
+ "@nestjs/websockets": "^9.1.6",
55
64
  "@types/cache-manager": "^4.0.1",
56
65
  "@types/express": "^4.17.12",
66
+ "@types/express-session": "^1.17.5",
57
67
  "@types/jest": "^27.0.0",
58
68
  "@types/multer": "^1.4.7",
59
69
  "@types/node": "^18.0.0",
@@ -63,21 +73,22 @@
63
73
  "@typescript-eslint/eslint-plugin": "4.33.0",
64
74
  "@typescript-eslint/parser": "4.33.0",
65
75
  "auth0": "^2.42.0",
66
- "cache-manager": "^4.1.0",
67
- "chalk": "^4.1.2",
76
+ "cache-manager": "^5.0.0",
68
77
  "commitlint": "^17.0.1",
69
78
  "eslint": "7.32.0",
70
79
  "eslint-plugin-import": "^2.23.4",
71
80
  "express": "^4.17.3",
81
+ "express-session": "^1.17.3",
72
82
  "husky": "^8.0.1",
73
83
  "jest": "27.5.1",
74
- "mongoose": "^6.5.1",
84
+ "lint-staged": "^13.0.3",
85
+ "migrate-mongoose": "^4.0.0",
75
86
  "nestjs-console": "^8.0.0",
76
87
  "passport": "^0.6.0",
77
88
  "passport-jwt": "^4.0.0",
78
89
  "rimraf": "^3.0.2",
79
90
  "rxjs": "^7.2.0",
80
- "stripe": "^10.3.0",
91
+ "short-unique-id": "^4.4.4",
81
92
  "supertest": "^6.1.3",
82
93
  "swagger-ui-express": "^4.3.0",
83
94
  "ts-jest": "27.1.3",
package/.output/main.d.ts DELETED
File without changes
@@ -1,6 +0,0 @@
1
- import { CreateOrganization } from 'auth0';
2
- export declare class CreateOrganizationValidator implements CreateOrganization {
3
- name: string;
4
- email: string;
5
- password?: string;
6
- }
@@ -1,14 +0,0 @@
1
- import { AppEntity } from '../../../configs/app.entity';
2
- import { ItemEntity } from '../orders/item/item.entity';
3
- export declare enum CartStatus {
4
- EMPTY = "EMPTY",
5
- FILLED = "FILLED",
6
- FINISHED = "FINISHED",
7
- ABANDONED = "ABANDONED"
8
- }
9
- export declare class CartEntity extends AppEntity {
10
- static readonly $index = "store_carts";
11
- user: string;
12
- status: CartStatus;
13
- items: ItemEntity[];
14
- }
@@ -1,11 +0,0 @@
1
- import { CreateBillingValidator } from '../orders/billing/billing.validator';
2
- import { CreateShippingValidator } from '../orders/shipping/shipping.validator';
3
- export declare class CheckoutCartValidator {
4
- cart: string;
5
- billing: CreateBillingValidator;
6
- shipping: CreateShippingValidator;
7
- }
8
- export declare class AddItemValidator {
9
- product: string;
10
- quantity: number;
11
- }
@@ -1,14 +0,0 @@
1
- import { AppEntity } from '../../../configs/app.entity';
2
- import { BillingEntity } from './billing/billing.entity';
3
- import { ItemEntity } from './item/item.entity';
4
- import { ShippingEntity } from './shipping/shipping.entity';
5
- import { StatusEntity } from './status/status.entity';
6
- export declare class OrderEntity extends AppEntity {
7
- static readonly $index = "store_orders";
8
- number: string;
9
- amount: number;
10
- status: StatusEntity[];
11
- items: ItemEntity[];
12
- billing: BillingEntity;
13
- shipping: ShippingEntity;
14
- }
@@ -1,10 +0,0 @@
1
- import { CreateBillingValidator } from './billing/billing.validator';
2
- import { CreateItemValidator } from './item/item.validator';
3
- import { CreateShippingValidator } from './shipping/shipping.validator';
4
- export declare class CreateOrderValidator {
5
- items: CreateItemValidator[];
6
- billing: CreateBillingValidator;
7
- shipping: CreateShippingValidator;
8
- }
9
- export declare class UpdateOrderValidator {
10
- }
@@ -1,13 +0,0 @@
1
- export declare enum StatusType {
2
- CREATED = "CREATED",
3
- APPROVED = "APPROVED",
4
- ON_HOLD = "ON_HOLD",
5
- IN_PROGRESS = "IN_PROGRESS",
6
- COMPLETED = "COMPLETED",
7
- CANCELED = "CANCELED"
8
- }
9
- export declare class StatusEntity {
10
- status: StatusType;
11
- user: string;
12
- readonly date: Date;
13
- }