@merkaly/api 0.2.2-30 → 0.2.2-32

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 (25) hide show
  1. package/.output/abstract/abstract.document.d.ts +5 -2
  2. package/.output/abstract/abstract.document.js +5 -4
  3. package/.output/abstract/abstract.fixture.d.ts +4 -0
  4. package/.output/abstract/abstract.fixture.js +11 -0
  5. package/.output/modules/content/banners/banner.document.d.ts +2 -12
  6. package/.output/modules/content/banners/banner.document.js +1 -2
  7. package/.output/modules/content/banners/banner.entity.d.ts +2 -14
  8. package/.output/modules/content/banners/banner.entity.js +7 -57
  9. package/.output/modules/content/banners/banner.fixture.d.ts +5 -0
  10. package/.output/modules/content/banners/banner.fixture.js +39 -0
  11. package/.output/modules/content/banners/banner.validator.d.ts +3 -2
  12. package/.output/modules/content/banners/banner.validator.js +12 -7
  13. package/.output/modules/content/pages/page.fixture.d.ts +5 -0
  14. package/.output/modules/content/pages/page.fixture.js +39 -0
  15. package/.output/modules/inventory/categories/category.fixture.d.ts +5 -0
  16. package/.output/modules/inventory/categories/category.fixture.js +38 -0
  17. package/.output/modules/inventory/products/product.fixture.d.ts +5 -0
  18. package/.output/modules/inventory/products/product.fixture.js +54 -0
  19. package/.output/modules/setting/layout/layout.document.d.ts +5 -0
  20. package/.output/modules/setting/layout/layout.document.js +29 -0
  21. package/.output/modules/setting/layout/layout.entity.d.ts +6 -0
  22. package/.output/modules/setting/layout/layout.entity.js +46 -0
  23. package/package.json +1 -1
  24. package/.output/modules/setting/social/social.validator.d.ts +0 -11
  25. package/.output/modules/setting/social/social.validator.js +0 -36
@@ -1,7 +1,10 @@
1
- import { AbstractEntity } from './abstract.entity';
2
1
  export declare abstract class AbstractDocument {
3
2
  readonly id: string;
4
3
  readonly createdAt: Date;
5
4
  readonly updatedAt: Date;
6
- constructor(entity: AbstractEntity);
5
+ constructor({ _id, createdAt, updatedAt }: {
6
+ _id: string;
7
+ createdAt?: Date;
8
+ updatedAt?: Date;
9
+ });
7
10
  }
@@ -2,10 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AbstractDocument = void 0;
4
4
  var AbstractDocument = (function () {
5
- function AbstractDocument(entity) {
6
- this.id = entity._id;
7
- this.createdAt = entity.createdAt;
8
- this.updatedAt = entity.updatedAt;
5
+ function AbstractDocument(_a) {
6
+ var _id = _a._id, createdAt = _a.createdAt, updatedAt = _a.updatedAt;
7
+ this.id = _id;
8
+ this.createdAt = createdAt || new Date();
9
+ this.updatedAt = updatedAt || new Date();
9
10
  }
10
11
  return AbstractDocument;
11
12
  }());
@@ -0,0 +1,4 @@
1
+ export declare abstract class AbstractFixture {
2
+ protected $faker: import("@faker-js/faker").Faker;
3
+ abstract normal(): any;
4
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AbstractFixture = void 0;
4
+ var faker_1 = require("@faker-js/faker");
5
+ var AbstractFixture = (function () {
6
+ function AbstractFixture() {
7
+ this.$faker = faker_1.faker;
8
+ }
9
+ return AbstractFixture;
10
+ }());
11
+ exports.AbstractFixture = AbstractFixture;
@@ -1,16 +1,6 @@
1
1
  import { AbstractDocument } from '../../../abstract/abstract.document';
2
2
  export declare class BannerDocument extends AbstractDocument {
3
- title: string;
4
- description: string;
3
+ name: string;
5
4
  image: string;
6
- size: number;
7
- cta: {
8
- variant: string;
9
- text: string;
10
- to: string;
11
- };
12
- tip?: {
13
- variant: string;
14
- text: string;
15
- };
5
+ href: string;
16
6
  }
@@ -21,9 +21,8 @@ var BannerDocument = (function (_super) {
21
21
  __extends(BannerDocument, _super);
22
22
  function BannerDocument() {
23
23
  var _this = _super !== null && _super.apply(this, arguments) || this;
24
- _this.description = null;
25
24
  _this.image = null;
26
- _this.size = 6;
25
+ _this.href = '#';
27
26
  return _this;
28
27
  }
29
28
  return BannerDocument;
@@ -1,19 +1,7 @@
1
1
  import { AbstractEntity } from '../../../abstract/abstract.entity';
2
- export declare class BannerCta extends Map {
3
- variant: string;
4
- text: string;
5
- to: string;
6
- }
7
- export declare class BannerTip extends Map {
8
- variant: string;
9
- text: string;
10
- }
11
2
  export declare class BannerEntity extends AbstractEntity {
12
3
  static readonly $index = "content_banners";
13
- title: string;
14
- description: string;
4
+ name: string;
15
5
  image: string;
16
- size: number;
17
- cta: BannerCta;
18
- tip?: BannerTip;
6
+ href: string;
19
7
  }
@@ -24,78 +24,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
24
24
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
25
  };
26
26
  Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.BannerEntity = exports.BannerTip = exports.BannerCta = void 0;
27
+ exports.BannerEntity = void 0;
28
28
  var mongoose_1 = require("@nestjs/mongoose");
29
29
  var mongoose_2 = require("mongoose");
30
30
  var abstract_entity_1 = require("../../../abstract/abstract.entity");
31
- var BannerCta = (function (_super) {
32
- __extends(BannerCta, _super);
33
- function BannerCta() {
34
- return _super !== null && _super.apply(this, arguments) || this;
35
- }
36
- __decorate([
37
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
38
- __metadata("design:type", String)
39
- ], BannerCta.prototype, "variant", void 0);
40
- __decorate([
41
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
42
- __metadata("design:type", String)
43
- ], BannerCta.prototype, "text", void 0);
44
- __decorate([
45
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
46
- __metadata("design:type", String)
47
- ], BannerCta.prototype, "to", void 0);
48
- return BannerCta;
49
- }(Map));
50
- exports.BannerCta = BannerCta;
51
- var BannerTip = (function (_super) {
52
- __extends(BannerTip, _super);
53
- function BannerTip() {
54
- return _super !== null && _super.apply(this, arguments) || this;
55
- }
56
- __decorate([
57
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
58
- __metadata("design:type", String)
59
- ], BannerTip.prototype, "variant", void 0);
60
- __decorate([
61
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
62
- __metadata("design:type", String)
63
- ], BannerTip.prototype, "text", void 0);
64
- return BannerTip;
65
- }(Map));
66
- exports.BannerTip = BannerTip;
67
31
  var BannerEntity = (function (_super) {
68
32
  __extends(BannerEntity, _super);
69
33
  function BannerEntity() {
70
- var _this = _super !== null && _super.apply(this, arguments) || this;
71
- _this.size = 6;
72
- return _this;
34
+ return _super !== null && _super.apply(this, arguments) || this;
73
35
  }
74
36
  BannerEntity.$index = 'content_banners';
75
37
  __decorate([
76
38
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
77
39
  __metadata("design:type", String)
78
- ], BannerEntity.prototype, "title", void 0);
79
- __decorate([
80
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
81
- __metadata("design:type", String)
82
- ], BannerEntity.prototype, "description", void 0);
40
+ ], BannerEntity.prototype, "name", void 0);
83
41
  __decorate([
84
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
42
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
85
43
  __metadata("design:type", String)
86
44
  ], BannerEntity.prototype, "image", void 0);
87
45
  __decorate([
88
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, default: 6 }),
89
- __metadata("design:type", Object)
90
- ], BannerEntity.prototype, "size", void 0);
91
- __decorate([
92
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return BannerCta; }, default: new BannerCta() }),
93
- __metadata("design:type", BannerCta)
94
- ], BannerEntity.prototype, "cta", void 0);
95
- __decorate([
96
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return BannerTip; } }),
97
- __metadata("design:type", BannerTip)
98
- ], BannerEntity.prototype, "tip", void 0);
46
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: '#' }),
47
+ __metadata("design:type", String)
48
+ ], BannerEntity.prototype, "href", void 0);
99
49
  BannerEntity = __decorate([
100
50
  (0, mongoose_1.Schema)({ timestamps: true })
101
51
  ], BannerEntity);
@@ -0,0 +1,5 @@
1
+ import { AbstractFixture } from '../../../abstract/abstract.fixture';
2
+ import { BannerDocument } from './banner.document';
3
+ export declare class BannerFixture extends AbstractFixture {
4
+ normal(): BannerDocument;
5
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.BannerFixture = void 0;
19
+ var faker_1 = require("@faker-js/faker");
20
+ var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
21
+ var banner_document_1 = require("./banner.document");
22
+ var BannerFixture = (function (_super) {
23
+ __extends(BannerFixture, _super);
24
+ function BannerFixture() {
25
+ return _super !== null && _super.apply(this, arguments) || this;
26
+ }
27
+ BannerFixture.prototype.normal = function () {
28
+ var banner = new banner_document_1.BannerDocument({
29
+ _id: this.$faker.datatype.uuid(),
30
+ createdAt: this.$faker.date.past(1),
31
+ updatedAt: this.$faker.date.past(1),
32
+ });
33
+ banner.name = faker_1.faker.random.words(6);
34
+ banner.image = faker_1.faker.image.placeholder.imageUrl(850, 400, 'webp');
35
+ return banner;
36
+ };
37
+ return BannerFixture;
38
+ }(abstract_fixture_1.AbstractFixture));
39
+ exports.BannerFixture = BannerFixture;
@@ -1,7 +1,8 @@
1
1
  export declare class CreateBannerValidator {
2
- title: string;
3
- description: string;
2
+ name: string;
4
3
  image: string;
4
+ href: string;
5
5
  }
6
6
  export declare class UpdateBannerValidator extends CreateBannerValidator {
7
+ image: string;
7
8
  }
@@ -28,31 +28,36 @@ exports.UpdateBannerValidator = exports.CreateBannerValidator = void 0;
28
28
  var class_validator_1 = require("class-validator");
29
29
  var CreateBannerValidator = (function () {
30
30
  function CreateBannerValidator() {
31
- this.description = null;
32
31
  this.image = null;
33
32
  }
34
33
  __decorate([
35
34
  (0, class_validator_1.IsString)(),
36
35
  __metadata("design:type", String)
37
- ], CreateBannerValidator.prototype, "title", void 0);
36
+ ], CreateBannerValidator.prototype, "name", void 0);
38
37
  __decorate([
39
- (0, class_validator_1.IsString)(),
40
- (0, class_validator_1.IsOptional)(),
38
+ (0, class_validator_1.IsUrl)(),
41
39
  __metadata("design:type", String)
42
- ], CreateBannerValidator.prototype, "description", void 0);
40
+ ], CreateBannerValidator.prototype, "image", void 0);
43
41
  __decorate([
44
42
  (0, class_validator_1.IsUrl)(),
45
43
  (0, class_validator_1.IsOptional)(),
46
44
  __metadata("design:type", String)
47
- ], CreateBannerValidator.prototype, "image", void 0);
45
+ ], CreateBannerValidator.prototype, "href", void 0);
48
46
  return CreateBannerValidator;
49
47
  }());
50
48
  exports.CreateBannerValidator = CreateBannerValidator;
51
49
  var UpdateBannerValidator = (function (_super) {
52
50
  __extends(UpdateBannerValidator, _super);
53
51
  function UpdateBannerValidator() {
54
- return _super !== null && _super.apply(this, arguments) || this;
52
+ var _this = _super !== null && _super.apply(this, arguments) || this;
53
+ _this.image = null;
54
+ return _this;
55
55
  }
56
+ __decorate([
57
+ (0, class_validator_1.IsUrl)(),
58
+ (0, class_validator_1.IsOptional)(),
59
+ __metadata("design:type", String)
60
+ ], UpdateBannerValidator.prototype, "image", void 0);
56
61
  return UpdateBannerValidator;
57
62
  }(CreateBannerValidator));
58
63
  exports.UpdateBannerValidator = UpdateBannerValidator;
@@ -0,0 +1,5 @@
1
+ import { AbstractFixture } from '../../../abstract/abstract.fixture';
2
+ import { CreatePageValidator } from './page.validator';
3
+ export declare class PageFixture extends AbstractFixture {
4
+ normal(): CreatePageValidator;
5
+ }
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.PageFixture = void 0;
19
+ var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
20
+ var page_types_1 = require("./page.types");
21
+ var page_validator_1 = require("./page.validator");
22
+ var PageFixture = (function (_super) {
23
+ __extends(PageFixture, _super);
24
+ function PageFixture() {
25
+ return _super !== null && _super.apply(this, arguments) || this;
26
+ }
27
+ PageFixture.prototype.normal = function () {
28
+ var page = new page_validator_1.CreatePageValidator();
29
+ page.title = this.$faker.random.words(6);
30
+ page.slug = this.$faker.helpers.slugify(page.title);
31
+ page.description = this.$faker.lorem.words(45);
32
+ page.image = this.$faker.image.image(850, 400, true);
33
+ page.content = this.$faker.lorem.paragraph(this.$faker.datatype.number({ min: 30, max: 60 }));
34
+ page.type = this.$faker.helpers.arrayElement(Object.values(page_types_1.PageTypes));
35
+ return page;
36
+ };
37
+ return PageFixture;
38
+ }(abstract_fixture_1.AbstractFixture));
39
+ exports.PageFixture = PageFixture;
@@ -0,0 +1,5 @@
1
+ import { AbstractFixture } from '../../../abstract/abstract.fixture';
2
+ import { CategoryDocument } from './category.document';
3
+ export declare class CategoryFixture extends AbstractFixture {
4
+ normal(): CategoryDocument;
5
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.CategoryFixture = void 0;
19
+ var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
20
+ var category_document_1 = require("./category.document");
21
+ var CategoryFixture = (function (_super) {
22
+ __extends(CategoryFixture, _super);
23
+ function CategoryFixture() {
24
+ return _super !== null && _super.apply(this, arguments) || this;
25
+ }
26
+ CategoryFixture.prototype.normal = function () {
27
+ var category = new category_document_1.CategoryDocument({
28
+ _id: this.$faker.datatype.uuid(),
29
+ createdAt: this.$faker.date.past(1),
30
+ updatedAt: this.$faker.date.past(1),
31
+ });
32
+ category.name = this.$faker.vehicle.manufacturer();
33
+ category.description = this.$faker.lorem.sentence();
34
+ return category;
35
+ };
36
+ return CategoryFixture;
37
+ }(abstract_fixture_1.AbstractFixture));
38
+ exports.CategoryFixture = CategoryFixture;
@@ -0,0 +1,5 @@
1
+ import { AbstractFixture } from '../../../abstract/abstract.fixture';
2
+ import { ProductDocument } from './product.document';
3
+ export declare class ProductFixture extends AbstractFixture {
4
+ normal(): ProductDocument;
5
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ProductFixture = void 0;
19
+ var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
20
+ var product_document_1 = require("./product.document");
21
+ var ProductFixture = (function (_super) {
22
+ __extends(ProductFixture, _super);
23
+ function ProductFixture() {
24
+ return _super !== null && _super.apply(this, arguments) || this;
25
+ }
26
+ ProductFixture.prototype.normal = function () {
27
+ var _this = this;
28
+ var product = new product_document_1.ProductDocument({
29
+ _id: this.$faker.datatype.uuid(),
30
+ createdAt: this.$faker.date.past(1),
31
+ updatedAt: this.$faker.date.past(1),
32
+ });
33
+ product.name = this.$faker.vehicle.vehicle();
34
+ product.description = this.$faker.commerce.productDescription();
35
+ product.price = Number(this.$faker.commerce.price(1000, 10000, 2));
36
+ product.brand = {
37
+ id: this.$faker.datatype.uuid(),
38
+ name: this.$faker.vehicle.model(),
39
+ };
40
+ product.category = {
41
+ id: this.$faker.datatype.uuid(),
42
+ name: this.$faker.vehicle.manufacturer(),
43
+ };
44
+ var randomFiles = this.$faker.datatype.number({ min: 1, max: 8 });
45
+ product.files = Array(randomFiles).fill(0).map(function (value) { return ({
46
+ id: _this.$faker.datatype.uuid(),
47
+ alt: _this.$faker.lorem.paragraph(),
48
+ url: _this.$faker.image.transport(215, 215, true) + "?" + product.id,
49
+ }); });
50
+ return product;
51
+ };
52
+ return ProductFixture;
53
+ }(abstract_fixture_1.AbstractFixture));
54
+ exports.ProductFixture = ProductFixture;
@@ -0,0 +1,5 @@
1
+ import { AbstractDocument } from '../../../abstract/abstract.document';
2
+ export declare class LayoutDocument extends AbstractDocument {
3
+ path: string;
4
+ content: Record<string, any>;
5
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.LayoutDocument = void 0;
19
+ var abstract_document_1 = require("../../../abstract/abstract.document");
20
+ var LayoutDocument = (function (_super) {
21
+ __extends(LayoutDocument, _super);
22
+ function LayoutDocument() {
23
+ var _this = _super !== null && _super.apply(this, arguments) || this;
24
+ _this.content = {};
25
+ return _this;
26
+ }
27
+ return LayoutDocument;
28
+ }(abstract_document_1.AbstractDocument));
29
+ exports.LayoutDocument = LayoutDocument;
@@ -0,0 +1,6 @@
1
+ import { AbstractEntity } from '../../../abstract/abstract.entity';
2
+ export declare class LayoutEntity extends AbstractEntity {
3
+ static readonly $index = "settings_layout";
4
+ path: string;
5
+ content: Map<string, any>;
6
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.LayoutEntity = void 0;
28
+ var mongoose_1 = require("@nestjs/mongoose");
29
+ var mongoose_2 = require("mongoose");
30
+ var abstract_entity_1 = require("../../../abstract/abstract.entity");
31
+ var LayoutEntity = (function (_super) {
32
+ __extends(LayoutEntity, _super);
33
+ function LayoutEntity() {
34
+ return _super !== null && _super.apply(this, arguments) || this;
35
+ }
36
+ LayoutEntity.$index = 'settings_layout';
37
+ __decorate([
38
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 128 }),
39
+ __metadata("design:type", String)
40
+ ], LayoutEntity.prototype, "path", void 0);
41
+ LayoutEntity = __decorate([
42
+ (0, mongoose_1.Schema)({ timestamps: true })
43
+ ], LayoutEntity);
44
+ return LayoutEntity;
45
+ }(abstract_entity_1.AbstractEntity));
46
+ exports.LayoutEntity = LayoutEntity;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.2.2-30",
3
+ "version": "0.2.2-32",
4
4
  "description": "NestJS Backend ApiRest Service",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,11 +0,0 @@
1
- export declare enum SocialType {
2
- FACEBOOK = "facebook",
3
- TWITTER = "twitter",
4
- INSTAGRAM = "instagram",
5
- TIKTOK = "tiktok",
6
- LINKEDIN = "linkedin"
7
- }
8
- export declare class CreateSocialValidator {
9
- name: SocialType;
10
- url: string;
11
- }
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CreateSocialValidator = exports.SocialType = void 0;
13
- var class_validator_1 = require("class-validator");
14
- var SocialType;
15
- (function (SocialType) {
16
- SocialType["FACEBOOK"] = "facebook";
17
- SocialType["TWITTER"] = "twitter";
18
- SocialType["INSTAGRAM"] = "instagram";
19
- SocialType["TIKTOK"] = "tiktok";
20
- SocialType["LINKEDIN"] = "linkedin";
21
- })(SocialType = exports.SocialType || (exports.SocialType = {}));
22
- var CreateSocialValidator = (function () {
23
- function CreateSocialValidator() {
24
- }
25
- __decorate([
26
- (0, class_validator_1.IsString)(),
27
- (0, class_validator_1.IsEnum)(SocialType),
28
- __metadata("design:type", String)
29
- ], CreateSocialValidator.prototype, "name", void 0);
30
- __decorate([
31
- (0, class_validator_1.IsUrl)(),
32
- __metadata("design:type", String)
33
- ], CreateSocialValidator.prototype, "url", void 0);
34
- return CreateSocialValidator;
35
- }());
36
- exports.CreateSocialValidator = CreateSocialValidator;