@merkaly/api 0.2.3 → 0.2.4-1
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/.output/abstract/abstract.entity.d.ts +1 -0
- package/.output/abstract/abstract.validator.d.ts +7 -8
- package/.output/abstract/abstract.validator.js +6 -0
- package/.output/modules/content/banners/banner.fixture.d.ts +2 -2
- package/.output/modules/content/banners/banner.fixture.js +2 -2
- package/.output/modules/inventory/categories/category.fixture.d.ts +2 -2
- package/.output/modules/inventory/categories/category.fixture.js +2 -2
- package/.output/modules/inventory/products/product.fixture.d.ts +2 -2
- package/.output/modules/inventory/products/product.fixture.js +3 -18
- package/.output/modules/sales/orders/order.entity.d.ts +1 -0
- package/.output/modules/sales/orders/order.validator.d.ts +1 -1
- package/.output/modules/sales/orders/order.validator.js +4 -2
- package/.output/modules/setting/organization/organization.entity.d.ts +11 -0
- package/.output/types.d.ts +0 -8
- package/package.json +1 -3
- package/.output/abstract/abstract.document.d.ts +0 -10
- package/.output/abstract/abstract.document.js +0 -13
- package/.output/modules/content/banners/banner.document.d.ts +0 -6
- package/.output/modules/content/banners/banner.document.js +0 -30
- package/.output/modules/content/pages/page.document.d.ts +0 -10
- package/.output/modules/content/pages/page.document.js +0 -32
- package/.output/modules/inventory/brands/brand.document.d.ts +0 -5
- package/.output/modules/inventory/brands/brand.document.js +0 -30
- package/.output/modules/inventory/categories/category.document.d.ts +0 -6
- package/.output/modules/inventory/categories/category.document.js +0 -31
- package/.output/modules/inventory/products/product.document.d.ts +0 -25
- package/.output/modules/inventory/products/product.document.js +0 -34
- package/.output/modules/sales/clients/client.document.d.ts +0 -9
- package/.output/modules/sales/clients/client.document.js +0 -33
- package/.output/modules/sales/orders/billing/billing.document.d.ts +0 -7
- package/.output/modules/sales/orders/billing/billing.document.js +0 -9
- package/.output/modules/sales/orders/item/item.document.d.ts +0 -6
- package/.output/modules/sales/orders/item/item.document.js +0 -9
- package/.output/modules/sales/orders/shipping/shipping.document.d.ts +0 -7
- package/.output/modules/sales/orders/shipping/shipping.document.js +0 -9
- package/.output/modules/sales/orders/status/status.document.d.ts +0 -5
- package/.output/modules/sales/orders/status/status.document.js +0 -9
- package/.output/modules/search/search.validator.d.ts +0 -7
- package/.output/modules/search/search.validator.js +0 -68
- package/.output/modules/setting/layout/layout.document.d.ts +0 -5
- package/.output/modules/setting/layout/layout.document.js +0 -29
- package/.output/modules/setting/organization/organization.document.d.ts +0 -15
- package/.output/modules/setting/organization/organization.document.js +0 -31
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FilterQuery, PopulateOptions, SortOrder } from 'mongoose';
|
|
2
2
|
import { AbstractEntity } from './abstract.entity';
|
|
3
3
|
import 'reflect-metadata';
|
|
4
4
|
export interface SearchResults<I> {
|
|
@@ -8,14 +8,13 @@ export interface SearchResults<I> {
|
|
|
8
8
|
}
|
|
9
9
|
export declare abstract class AbstractValidator {
|
|
10
10
|
}
|
|
11
|
+
export declare type KeyOfType<T, V> = keyof {
|
|
12
|
+
[P in keyof T as T[P] extends V ? P : never]: any;
|
|
13
|
+
};
|
|
11
14
|
export declare class FindValidator<E extends AbstractEntity> extends AbstractValidator {
|
|
12
15
|
limit?: number;
|
|
13
16
|
page?: number;
|
|
14
|
-
sort?:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
filters?: {
|
|
18
|
-
[x: string]: string | QuerySelector<any>;
|
|
19
|
-
};
|
|
20
|
-
join?: (keyof E | string | PopulateOptions)[];
|
|
17
|
+
sort?: Partial<Record<keyof E, SortOrder>>;
|
|
18
|
+
filters?: FilterQuery<E>;
|
|
19
|
+
join?: (PopulateOptions | KeyOfType<E, AbstractEntity | AbstractEntity[]>)[];
|
|
21
20
|
}
|
|
@@ -65,6 +65,9 @@ var FindValidator = (function (_super) {
|
|
|
65
65
|
__decorate([
|
|
66
66
|
(0, class_transformer_1.Transform)(function (_a) {
|
|
67
67
|
var value = _a.value;
|
|
68
|
+
if ((0, class_validator_1.isObject)(value)) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
68
71
|
return value && JSON.parse(value);
|
|
69
72
|
}),
|
|
70
73
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -73,6 +76,9 @@ var FindValidator = (function (_super) {
|
|
|
73
76
|
__decorate([
|
|
74
77
|
(0, class_transformer_1.Transform)(function (_a) {
|
|
75
78
|
var value = _a.value;
|
|
79
|
+
if ((0, class_validator_1.isObject)(value)) {
|
|
80
|
+
return value;
|
|
81
|
+
}
|
|
76
82
|
return value && JSON.parse(value);
|
|
77
83
|
}),
|
|
78
84
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbstractFixture } from '../../../abstract/abstract.fixture';
|
|
2
|
-
import {
|
|
2
|
+
import { BannerEntity } from "./banner.entity";
|
|
3
3
|
export declare class BannerFixture extends AbstractFixture {
|
|
4
|
-
normal():
|
|
4
|
+
normal(): BannerEntity;
|
|
5
5
|
}
|
|
@@ -18,14 +18,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
exports.BannerFixture = void 0;
|
|
19
19
|
var faker_1 = require("@faker-js/faker");
|
|
20
20
|
var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
|
|
21
|
-
var
|
|
21
|
+
var banner_entity_1 = require("./banner.entity");
|
|
22
22
|
var BannerFixture = (function (_super) {
|
|
23
23
|
__extends(BannerFixture, _super);
|
|
24
24
|
function BannerFixture() {
|
|
25
25
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
26
|
}
|
|
27
27
|
BannerFixture.prototype.normal = function () {
|
|
28
|
-
var banner = new
|
|
28
|
+
var banner = new banner_entity_1.BannerEntity({
|
|
29
29
|
_id: this.$faker.datatype.uuid(),
|
|
30
30
|
createdAt: this.$faker.date.past(1),
|
|
31
31
|
updatedAt: this.$faker.date.past(1),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbstractFixture } from '../../../abstract/abstract.fixture';
|
|
2
|
-
import {
|
|
2
|
+
import { CategoryEntity } from "./category.entity";
|
|
3
3
|
export declare class CategoryFixture extends AbstractFixture {
|
|
4
|
-
normal():
|
|
4
|
+
normal(): CategoryEntity;
|
|
5
5
|
}
|
|
@@ -17,14 +17,14 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.CategoryFixture = void 0;
|
|
19
19
|
var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
|
|
20
|
-
var
|
|
20
|
+
var category_entity_1 = require("./category.entity");
|
|
21
21
|
var CategoryFixture = (function (_super) {
|
|
22
22
|
__extends(CategoryFixture, _super);
|
|
23
23
|
function CategoryFixture() {
|
|
24
24
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
25
|
}
|
|
26
26
|
CategoryFixture.prototype.normal = function () {
|
|
27
|
-
var category = new
|
|
27
|
+
var category = new category_entity_1.CategoryEntity({
|
|
28
28
|
_id: this.$faker.datatype.uuid(),
|
|
29
29
|
createdAt: this.$faker.date.past(1),
|
|
30
30
|
updatedAt: this.$faker.date.past(1),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AbstractFixture } from '../../../abstract/abstract.fixture';
|
|
2
|
-
import {
|
|
2
|
+
import { ProductEntity } from "./product.entity";
|
|
3
3
|
export declare class ProductFixture extends AbstractFixture {
|
|
4
|
-
normal():
|
|
4
|
+
normal(): ProductEntity;
|
|
5
5
|
}
|
|
@@ -17,36 +17,21 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.ProductFixture = void 0;
|
|
19
19
|
var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
|
|
20
|
-
var
|
|
20
|
+
var product_entity_1 = require("./product.entity");
|
|
21
21
|
var ProductFixture = (function (_super) {
|
|
22
22
|
__extends(ProductFixture, _super);
|
|
23
23
|
function ProductFixture() {
|
|
24
24
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
25
|
}
|
|
26
26
|
ProductFixture.prototype.normal = function () {
|
|
27
|
-
var
|
|
28
|
-
var product = new product_document_1.ProductDocument({
|
|
27
|
+
var product = new product_entity_1.ProductEntity({
|
|
29
28
|
_id: this.$faker.datatype.uuid(),
|
|
30
29
|
createdAt: this.$faker.date.past(1),
|
|
31
30
|
updatedAt: this.$faker.date.past(1),
|
|
32
31
|
});
|
|
33
32
|
product.name = this.$faker.vehicle.vehicle();
|
|
34
33
|
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
|
-
}); });
|
|
34
|
+
product.price.sale = Number(this.$faker.commerce.price(1000, 10000, 2));
|
|
50
35
|
return product;
|
|
51
36
|
};
|
|
52
37
|
return ProductFixture;
|
|
@@ -12,7 +12,7 @@ export declare class CreateOrderValidator extends AbstractValidator {
|
|
|
12
12
|
customer: CreateCustomerValidator;
|
|
13
13
|
notes?: string;
|
|
14
14
|
}
|
|
15
|
-
export declare class UpdateOrderValidator {
|
|
15
|
+
export declare class UpdateOrderValidator extends CreateOrderValidator {
|
|
16
16
|
client?: string;
|
|
17
17
|
}
|
|
18
18
|
export declare class ChangeOrderStatusValidator extends AbstractValidator {
|
|
@@ -80,8 +80,10 @@ var CreateOrderValidator = (function (_super) {
|
|
|
80
80
|
return CreateOrderValidator;
|
|
81
81
|
}(abstract_validator_1.AbstractValidator));
|
|
82
82
|
exports.CreateOrderValidator = CreateOrderValidator;
|
|
83
|
-
var UpdateOrderValidator = (function () {
|
|
83
|
+
var UpdateOrderValidator = (function (_super) {
|
|
84
|
+
__extends(UpdateOrderValidator, _super);
|
|
84
85
|
function UpdateOrderValidator() {
|
|
86
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
85
87
|
}
|
|
86
88
|
__decorate([
|
|
87
89
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -89,7 +91,7 @@ var UpdateOrderValidator = (function () {
|
|
|
89
91
|
__metadata("design:type", String)
|
|
90
92
|
], UpdateOrderValidator.prototype, "client", void 0);
|
|
91
93
|
return UpdateOrderValidator;
|
|
92
|
-
}());
|
|
94
|
+
}(CreateOrderValidator));
|
|
93
95
|
exports.UpdateOrderValidator = UpdateOrderValidator;
|
|
94
96
|
var ChangeOrderStatusValidator = (function (_super) {
|
|
95
97
|
__extends(ChangeOrderStatusValidator, _super);
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
2
|
+
import { OrganizationMetadataAddress, OrganizationMetadataInformation, OrganizationMetadataLocalization, OrganizationMetadataSocial } from "./organization.types";
|
|
3
|
+
interface OrganizationMetadata {
|
|
4
|
+
address?: OrganizationMetadataAddress;
|
|
5
|
+
domain: string;
|
|
6
|
+
information?: OrganizationMetadataInformation;
|
|
7
|
+
localization?: OrganizationMetadataLocalization;
|
|
8
|
+
social?: OrganizationMetadataSocial[];
|
|
9
|
+
theme: string;
|
|
10
|
+
}
|
|
2
11
|
export declare class OrganizationEntity extends AbstractEntity {
|
|
3
12
|
static readonly $index = "setting_organization";
|
|
13
|
+
metadata: OrganizationMetadata;
|
|
4
14
|
}
|
|
15
|
+
export {};
|
package/.output/types.d.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import { GetResponse, SearchHit, SearchRequest, SearchTotalHits } from '@elastic/elasticsearch/lib/api/types';
|
|
2
1
|
import { AppMetadata, User, UserMetadata } from 'auth0';
|
|
3
|
-
export declare type Document<D> = GetResponse<D>;
|
|
4
|
-
export declare type Search<D> = {
|
|
5
|
-
total: SearchTotalHits;
|
|
6
|
-
hits: SearchHit<D>[];
|
|
7
|
-
max_score?: number;
|
|
8
|
-
};
|
|
9
|
-
export declare type SearchQuery = Omit<SearchRequest, 'index' | 'filter_path'>;
|
|
10
2
|
export interface MetaAddress {
|
|
11
3
|
city: string;
|
|
12
4
|
code: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkaly/api",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4-1",
|
|
4
4
|
"description": "NestJS Backend ApiRest Service",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"*.**": "yarn lint --cache --fix"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@elastic/elasticsearch": "^8.4.0",
|
|
39
38
|
"@types/auth0": "^2.35.2",
|
|
40
39
|
"class-transformer": "^0.5.1",
|
|
41
40
|
"class-validator": "^0.14.0",
|
|
@@ -51,7 +50,6 @@
|
|
|
51
50
|
"@nestjs/common": "^9.0.11",
|
|
52
51
|
"@nestjs/config": "^2.2.0",
|
|
53
52
|
"@nestjs/core": "^9.0.11",
|
|
54
|
-
"@nestjs/elasticsearch": "^9.0.0",
|
|
55
53
|
"@nestjs/event-emitter": "^1.3.1",
|
|
56
54
|
"@nestjs/jwt": "^10.0.2",
|
|
57
55
|
"@nestjs/mongoose": "^9.2.0",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AbstractDocument = void 0;
|
|
4
|
-
var AbstractDocument = (function () {
|
|
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 || null;
|
|
10
|
-
}
|
|
11
|
-
return AbstractDocument;
|
|
12
|
-
}());
|
|
13
|
-
exports.AbstractDocument = AbstractDocument;
|
|
@@ -1,30 +0,0 @@
|
|
|
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.BannerDocument = void 0;
|
|
19
|
-
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
-
var BannerDocument = (function (_super) {
|
|
21
|
-
__extends(BannerDocument, _super);
|
|
22
|
-
function BannerDocument() {
|
|
23
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
_this.image = null;
|
|
25
|
-
_this.href = '#';
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
return BannerDocument;
|
|
29
|
-
}(abstract_document_1.AbstractDocument));
|
|
30
|
-
exports.BannerDocument = BannerDocument;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AbstractDocument } from '../../../abstract/abstract.document';
|
|
2
|
-
import { PageTypes } from './page.types';
|
|
3
|
-
export declare class PageDocument extends AbstractDocument {
|
|
4
|
-
slug: string;
|
|
5
|
-
title: string;
|
|
6
|
-
content: string;
|
|
7
|
-
description: string;
|
|
8
|
-
image: string;
|
|
9
|
-
type: PageTypes;
|
|
10
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
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.PageDocument = void 0;
|
|
19
|
-
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
-
var page_types_1 = require("./page.types");
|
|
21
|
-
var PageDocument = (function (_super) {
|
|
22
|
-
__extends(PageDocument, _super);
|
|
23
|
-
function PageDocument() {
|
|
24
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
-
_this.description = null;
|
|
26
|
-
_this.image = null;
|
|
27
|
-
_this.type = page_types_1.PageTypes.PAGE;
|
|
28
|
-
return _this;
|
|
29
|
-
}
|
|
30
|
-
return PageDocument;
|
|
31
|
-
}(abstract_document_1.AbstractDocument));
|
|
32
|
-
exports.PageDocument = PageDocument;
|
|
@@ -1,30 +0,0 @@
|
|
|
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.BrandDocument = void 0;
|
|
19
|
-
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
-
var BrandDocument = (function (_super) {
|
|
21
|
-
__extends(BrandDocument, _super);
|
|
22
|
-
function BrandDocument() {
|
|
23
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
_this.name = String();
|
|
25
|
-
_this.description = String();
|
|
26
|
-
return _this;
|
|
27
|
-
}
|
|
28
|
-
return BrandDocument;
|
|
29
|
-
}(abstract_document_1.AbstractDocument));
|
|
30
|
-
exports.BrandDocument = BrandDocument;
|
|
@@ -1,31 +0,0 @@
|
|
|
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.CategoryDocument = void 0;
|
|
19
|
-
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
-
var CategoryDocument = (function (_super) {
|
|
21
|
-
__extends(CategoryDocument, _super);
|
|
22
|
-
function CategoryDocument() {
|
|
23
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
_this.name = String();
|
|
25
|
-
_this.description = String();
|
|
26
|
-
_this.icon = String();
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
return CategoryDocument;
|
|
30
|
-
}(abstract_document_1.AbstractDocument));
|
|
31
|
-
exports.CategoryDocument = CategoryDocument;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { AbstractDocument } from '../../../abstract/abstract.document';
|
|
2
|
-
export declare class ProductDocument extends AbstractDocument {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
measurement: string;
|
|
6
|
-
price: number;
|
|
7
|
-
picture: string;
|
|
8
|
-
brand?: ProductBrand;
|
|
9
|
-
category?: ProductCategory;
|
|
10
|
-
files: ProductFile[];
|
|
11
|
-
}
|
|
12
|
-
interface ProductCategory {
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
}
|
|
16
|
-
interface ProductBrand {
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
}
|
|
20
|
-
interface ProductFile {
|
|
21
|
-
id: string;
|
|
22
|
-
url: string;
|
|
23
|
-
alt: string;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
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.ProductDocument = void 0;
|
|
19
|
-
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
-
var ProductDocument = (function (_super) {
|
|
21
|
-
__extends(ProductDocument, _super);
|
|
22
|
-
function ProductDocument() {
|
|
23
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
_this.name = String();
|
|
25
|
-
_this.description = String();
|
|
26
|
-
_this.measurement = String();
|
|
27
|
-
_this.price = Number();
|
|
28
|
-
_this.picture = String();
|
|
29
|
-
_this.files = [];
|
|
30
|
-
return _this;
|
|
31
|
-
}
|
|
32
|
-
return ProductDocument;
|
|
33
|
-
}(abstract_document_1.AbstractDocument));
|
|
34
|
-
exports.ProductDocument = ProductDocument;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AbstractDocument } from '../../../abstract/abstract.document';
|
|
2
|
-
import type { MetaAddress } from "../../../types";
|
|
3
|
-
export declare class ClientDocument extends AbstractDocument {
|
|
4
|
-
name: string;
|
|
5
|
-
identificationNumber: string;
|
|
6
|
-
email: string;
|
|
7
|
-
phone?: string;
|
|
8
|
-
addresses: MetaAddress[];
|
|
9
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
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.ClientDocument = void 0;
|
|
19
|
-
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
-
var ClientDocument = (function (_super) {
|
|
21
|
-
__extends(ClientDocument, _super);
|
|
22
|
-
function ClientDocument() {
|
|
23
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
_this.name = String();
|
|
25
|
-
_this.identificationNumber = String();
|
|
26
|
-
_this.email = String();
|
|
27
|
-
_this.phone = String();
|
|
28
|
-
_this.addresses = [];
|
|
29
|
-
return _this;
|
|
30
|
-
}
|
|
31
|
-
return ClientDocument;
|
|
32
|
-
}(abstract_document_1.AbstractDocument));
|
|
33
|
-
exports.ClientDocument = ClientDocument;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BillingDocument = void 0;
|
|
4
|
-
var BillingDocument = (function () {
|
|
5
|
-
function BillingDocument() {
|
|
6
|
-
}
|
|
7
|
-
return BillingDocument;
|
|
8
|
-
}());
|
|
9
|
-
exports.BillingDocument = BillingDocument;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ShippingDocument = void 0;
|
|
4
|
-
var ShippingDocument = (function () {
|
|
5
|
-
function ShippingDocument() {
|
|
6
|
-
}
|
|
7
|
-
return ShippingDocument;
|
|
8
|
-
}());
|
|
9
|
-
exports.ShippingDocument = ShippingDocument;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SearchQuery } from '../../types';
|
|
2
|
-
import { AbstractValidator } from "../../abstract/abstract.validator";
|
|
3
|
-
export declare class SearchValidator extends AbstractValidator {
|
|
4
|
-
query?: SearchQuery['query'];
|
|
5
|
-
size?: SearchQuery['size'];
|
|
6
|
-
from?: SearchQuery['from'];
|
|
7
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
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.SearchValidator = void 0;
|
|
28
|
-
var class_transformer_1 = require("class-transformer");
|
|
29
|
-
var class_validator_1 = require("class-validator");
|
|
30
|
-
var abstract_validator_1 = require("../../abstract/abstract.validator");
|
|
31
|
-
var SearchValidator = (function (_super) {
|
|
32
|
-
__extends(SearchValidator, _super);
|
|
33
|
-
function SearchValidator() {
|
|
34
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
-
_this.from = 0;
|
|
36
|
-
return _this;
|
|
37
|
-
}
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, class_validator_1.IsOptional)(),
|
|
40
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
|
41
|
-
var value = _a.value;
|
|
42
|
-
return JSON.parse(value || 'null');
|
|
43
|
-
}),
|
|
44
|
-
__metadata("design:type", Object)
|
|
45
|
-
], SearchValidator.prototype, "query", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
|
49
|
-
var value = _a.value;
|
|
50
|
-
return Number(value);
|
|
51
|
-
}),
|
|
52
|
-
(0, class_validator_1.IsInt)(),
|
|
53
|
-
(0, class_validator_1.Min)(1),
|
|
54
|
-
__metadata("design:type", Object)
|
|
55
|
-
], SearchValidator.prototype, "size", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, class_validator_1.IsOptional)(),
|
|
58
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
|
59
|
-
var value = _a.value;
|
|
60
|
-
return Number(value);
|
|
61
|
-
}),
|
|
62
|
-
(0, class_validator_1.IsInt)(),
|
|
63
|
-
(0, class_validator_1.Min)(0),
|
|
64
|
-
__metadata("design:type", Object)
|
|
65
|
-
], SearchValidator.prototype, "from", void 0);
|
|
66
|
-
return SearchValidator;
|
|
67
|
-
}(abstract_validator_1.AbstractValidator));
|
|
68
|
-
exports.SearchValidator = SearchValidator;
|
|
@@ -1,29 +0,0 @@
|
|
|
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;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AbstractDocument } from '../../../abstract/abstract.document';
|
|
2
|
-
import { OrganizationMetadataAddress, OrganizationMetadataInformation, OrganizationMetadataLocalization, OrganizationMetadataSocial } from './organization.types';
|
|
3
|
-
interface OrganizationMetadata {
|
|
4
|
-
information?: OrganizationMetadataInformation;
|
|
5
|
-
localization?: OrganizationMetadataLocalization;
|
|
6
|
-
address?: OrganizationMetadataAddress;
|
|
7
|
-
social?: OrganizationMetadataSocial[];
|
|
8
|
-
}
|
|
9
|
-
export declare class OrganizationDocument extends AbstractDocument {
|
|
10
|
-
logoUrl: string;
|
|
11
|
-
name: string;
|
|
12
|
-
displayName: string;
|
|
13
|
-
metadata: OrganizationMetadata;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
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.OrganizationDocument = void 0;
|
|
19
|
-
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
-
var OrganizationDocument = (function (_super) {
|
|
21
|
-
__extends(OrganizationDocument, _super);
|
|
22
|
-
function OrganizationDocument() {
|
|
23
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
-
_this.metadata = {
|
|
25
|
-
social: [],
|
|
26
|
-
};
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
return OrganizationDocument;
|
|
30
|
-
}(abstract_document_1.AbstractDocument));
|
|
31
|
-
exports.OrganizationDocument = OrganizationDocument;
|