@infrab4a/connect 4.0.0-beta.25 → 4.0.0-beta.27
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/domain/catalog/helpers/RoundProdutcPriceHelper.d.ts +4 -0
- package/domain/catalog/helpers/index.d.ts +1 -0
- package/domain/catalog/index.d.ts +1 -0
- package/domain/catalog/models/category-collection-children.d.ts +13 -0
- package/domain/catalog/models/category-filter.d.ts +1 -1
- package/domain/catalog/models/category.d.ts +3 -3
- package/domain/catalog/models/filter-option.d.ts +1 -2
- package/domain/catalog/models/filter.d.ts +1 -2
- package/domain/catalog/models/index.d.ts +1 -0
- package/domain/catalog/models/kit-product.d.ts +1 -1
- package/domain/catalog/models/product.d.ts +1 -2
- package/domain/catalog/models/types/category-product.d.ts +4 -0
- package/domain/catalog/models/types/index.d.ts +1 -0
- package/domain/catalog/models/variant.d.ts +1 -2
- package/domain/catalog/repositories/category-collection-children.repository.d.ts +4 -0
- package/domain/catalog/repositories/category.repository.d.ts +1 -0
- package/domain/catalog/repositories/index.d.ts +1 -0
- package/domain/generic/model/base.model.d.ts +9 -5
- package/domain/generic/model/types/base-model-builder.type.d.ts +4 -2
- package/domain/generic/model/types/identifier-model.type.d.ts +6 -5
- package/domain/generic/model/types/model-base-structure.type.d.ts +9 -3
- package/domain/generic/model/types/non-function-property-name.type.d.ts +12 -3
- package/domain/generic/repository/get.repository.d.ts +2 -2
- package/domain/generic/repository/types/repository-find-filters.type.d.ts +3 -3
- package/domain/generic/repository/types/repository-order-by-list.type.d.ts +2 -2
- package/domain/generic/repository/types/repository-update-params.type.d.ts +2 -2
- package/domain/location/models/address.d.ts +5 -3
- package/domain/shopping/models/checkout.d.ts +5 -6
- package/domain/shopping/models/subscription/checkout.d.ts +3 -4
- package/domain/users/models/subscription/subscription.d.ts +3 -3
- package/domain/users/models/user-address.d.ts +1 -2
- package/domain/users/models/user.d.ts +2 -3
- package/esm2020/domain/catalog/helpers/RoundProdutcPriceHelper.mjs +15 -0
- package/esm2020/domain/catalog/helpers/index.mjs +2 -0
- package/esm2020/domain/catalog/index.mjs +2 -1
- package/esm2020/domain/catalog/models/category-collection-children.mjs +13 -0
- package/esm2020/domain/catalog/models/category-filter.mjs +1 -1
- package/esm2020/domain/catalog/models/category.mjs +1 -4
- package/esm2020/domain/catalog/models/filter-option.mjs +1 -4
- package/esm2020/domain/catalog/models/filter.mjs +1 -4
- package/esm2020/domain/catalog/models/index.mjs +2 -1
- package/esm2020/domain/catalog/models/kit-product.mjs +2 -2
- package/esm2020/domain/catalog/models/product.mjs +1 -4
- package/esm2020/domain/catalog/models/types/category-product.mjs +2 -0
- package/esm2020/domain/catalog/models/types/index.mjs +2 -1
- package/esm2020/domain/catalog/models/variant.mjs +1 -4
- package/esm2020/domain/catalog/repositories/category-collection-children.repository.mjs +2 -0
- package/esm2020/domain/catalog/repositories/category.repository.mjs +1 -1
- package/esm2020/domain/catalog/repositories/index.mjs +2 -1
- package/esm2020/domain/generic/model/base.model.mjs +3 -2
- package/esm2020/domain/generic/model/types/base-model-builder.type.mjs +1 -1
- package/esm2020/domain/generic/model/types/identifier-model.type.mjs +1 -1
- package/esm2020/domain/generic/model/types/model-base-structure.type.mjs +1 -1
- package/esm2020/domain/generic/model/types/non-function-property-name.type.mjs +1 -1
- package/esm2020/domain/generic/repository/get.repository.mjs +1 -1
- package/esm2020/domain/generic/repository/types/repository-find-filters.type.mjs +1 -1
- package/esm2020/domain/generic/repository/types/repository-order-by-list.type.mjs +1 -1
- package/esm2020/domain/generic/repository/types/repository-update-params.type.mjs +1 -1
- package/esm2020/domain/location/models/address.mjs +2 -2
- package/esm2020/domain/shopping/models/checkout.mjs +6 -7
- package/esm2020/domain/shopping/models/order.mjs +1 -1
- package/esm2020/domain/shopping/models/subscription/checkout.mjs +6 -6
- package/esm2020/domain/users/models/subscription/subscription.mjs +6 -6
- package/esm2020/domain/users/models/user-address.mjs +1 -1
- package/esm2020/domain/users/models/user.mjs +3 -3
- package/esm2020/domain/users/use-cases/authentication.mjs +2 -2
- package/esm2020/infra/elasticsearch/adapters/axios.adapter.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-create-firestore.mixin.mjs +2 -2
- package/esm2020/infra/firebase/firestore/mixins/with-crud-firestore.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-delete-firestore.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-find-firestore.mixin.mjs +3 -3
- package/esm2020/infra/firebase/firestore/mixins/with-firestore.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-get-firestore.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-helpers.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-sub-collection.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/mixins/with-update-firestore.mixin.mjs +1 -1
- package/esm2020/infra/firebase/firestore/repositories/catalog/category-firestore.repository.mjs +4 -1
- package/esm2020/infra/firebase/firestore/types/firestore-sub.repository.type.mjs +1 -1
- package/esm2020/infra/firebase/firestore/types/firestore.helpers.type.mjs +1 -1
- package/esm2020/infra/firebase/firestore/types/firestore.repository.type.mjs +1 -1
- package/esm2020/infra/hasura-graphql/mixins/helpers/attribute-option.helper.mjs +1 -1
- package/esm2020/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.mjs +5 -4
- package/esm2020/infra/hasura-graphql/mixins/helpers/filter-option.helper.mjs +1 -1
- package/esm2020/infra/hasura-graphql/mixins/helpers/graphql-field.helper.mjs +25 -20
- package/esm2020/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.mjs +5 -3
- package/esm2020/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.mjs +1 -1
- package/esm2020/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.mjs +5 -3
- package/esm2020/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.mjs +21 -4
- package/esm2020/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.mjs +5 -3
- package/esm2020/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.mjs +12 -5
- package/esm2020/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.mjs +7 -5
- package/esm2020/infra/hasura-graphql/repositories/catalog/category-collection-children-hasura-graphql.repository.mjs +38 -0
- package/esm2020/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.mjs +26 -2
- package/esm2020/infra/hasura-graphql/repositories/catalog/index.mjs +2 -1
- package/esm2020/infra/hasura-graphql/repositories/catalog/product-hasura-graphql.repository.mjs +3 -2
- package/esm2020/infra/hasura-graphql/types/graphql.repository.type.mjs +1 -1
- package/esm2020/infra/hasura-graphql/types/hasura-graphql-fields.type.mjs +1 -1
- package/esm2020/utils/decorators/debug.class.decorator.mjs +7 -0
- package/esm2020/utils/decorators/index.mjs +3 -0
- package/esm2020/utils/decorators/trace.method.decorator.mjs +81 -0
- package/esm2020/utils/helpers/class-name.helper.mjs +15 -0
- package/esm2020/utils/helpers/debug-decorator.helper.mjs +18 -0
- package/esm2020/utils/helpers/debug.helper.mjs +150 -0
- package/esm2020/utils/helpers/index.mjs +5 -0
- package/esm2020/utils/helpers/reflect.helper.mjs +165 -0
- package/esm2020/utils/index.mjs +4 -1
- package/esm2020/utils/log.utils.mjs +9 -0
- package/fesm2015/infrab4a-connect.mjs +620 -78
- package/fesm2015/infrab4a-connect.mjs.map +1 -1
- package/fesm2020/infrab4a-connect.mjs +622 -78
- package/fesm2020/infrab4a-connect.mjs.map +1 -1
- package/infra/elasticsearch/adapters/axios.adapter.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-create-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-crud-firestore.mixin.d.ts +1 -1
- package/infra/firebase/firestore/mixins/with-delete-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-find-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-get-firestore.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-helpers.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-sub-collection.mixin.d.ts +2 -2
- package/infra/firebase/firestore/mixins/with-update-firestore.mixin.d.ts +3 -3
- package/infra/firebase/firestore/repositories/catalog/category-firestore.repository.d.ts +1 -0
- package/infra/firebase/firestore/types/firestore-sub.repository.type.d.ts +3 -3
- package/infra/firebase/firestore/types/firestore.helpers.type.d.ts +5 -5
- package/infra/firebase/firestore/types/firestore.repository.type.d.ts +1 -1
- package/infra/hasura-graphql/mixins/helpers/attribute-option.helper.d.ts +9 -3
- package/infra/hasura-graphql/mixins/helpers/bind-filter-query.helper.d.ts +5 -5
- package/infra/hasura-graphql/mixins/helpers/filter-option.helper.d.ts +4 -2
- package/infra/hasura-graphql/mixins/helpers/graphql-field.helper.d.ts +8 -5
- package/infra/hasura-graphql/mixins/with-create-hasura-graphql.mixin.d.ts +2 -1
- package/infra/hasura-graphql/mixins/with-crud-hasura-graphql.mixin.d.ts +1 -1
- package/infra/hasura-graphql/mixins/with-delete-hasura-graphql.mixin.d.ts +1 -1
- package/infra/hasura-graphql/mixins/with-find-hasura-graphql.mixin.d.ts +11 -9
- package/infra/hasura-graphql/mixins/with-get-hasura-graphql.mixin.d.ts +7 -6
- package/infra/hasura-graphql/mixins/with-hasura-graphql.mixin.d.ts +2 -2
- package/infra/hasura-graphql/mixins/with-update-hasura-graphql.mixin.d.ts +2 -2
- package/infra/hasura-graphql/repositories/catalog/category-collection-children-hasura-graphql.repository.d.ts +10 -0
- package/infra/hasura-graphql/repositories/catalog/category-hasura-graphql.repository.d.ts +1 -0
- package/infra/hasura-graphql/repositories/catalog/index.d.ts +1 -0
- package/infra/hasura-graphql/types/graphql.repository.type.d.ts +7 -5
- package/infra/hasura-graphql/types/hasura-graphql-fields.type.d.ts +7 -3
- package/package.json +2 -1
- package/utils/decorators/debug.class.decorator.d.ts +2 -0
- package/utils/decorators/index.d.ts +2 -0
- package/utils/decorators/trace.method.decorator.d.ts +14 -0
- package/utils/helpers/class-name.helper.d.ts +3 -0
- package/utils/helpers/debug-decorator.helper.d.ts +9 -0
- package/utils/helpers/debug.helper.d.ts +60 -0
- package/utils/helpers/index.d.ts +4 -0
- package/utils/helpers/reflect.helper.d.ts +50 -0
- package/utils/index.d.ts +3 -0
- package/utils/log.utils.d.ts +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './RoundProdutcPriceHelper';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseModel } from '../../generic/model';
|
|
2
|
+
export declare type CategoryCollectionChildrenIdentifiers = 'collectionId' | 'categoryId';
|
|
3
|
+
export declare class CategoryCollectionChildren extends BaseModel<CategoryCollectionChildren, CategoryCollectionChildrenIdentifiers> {
|
|
4
|
+
collectionId: number;
|
|
5
|
+
categoryId: number;
|
|
6
|
+
parentCollectionId?: number;
|
|
7
|
+
parentCategoryId?: number;
|
|
8
|
+
name: string;
|
|
9
|
+
slug: string;
|
|
10
|
+
reference?: string;
|
|
11
|
+
parent?: CategoryCollectionChildren;
|
|
12
|
+
static get identifiersFields(): CategoryCollectionChildrenIdentifiers[];
|
|
13
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseModel } from '../../generic/model';
|
|
2
2
|
import { Filter } from './filter';
|
|
3
3
|
declare type CategoryFilterIdentifiers = 'id' | 'filterId' | 'categoryId';
|
|
4
|
-
export declare class CategoryFilter extends BaseModel<CategoryFilter> {
|
|
4
|
+
export declare class CategoryFilter extends BaseModel<CategoryFilter, CategoryFilterIdentifiers> {
|
|
5
5
|
id: number;
|
|
6
6
|
filterId: number;
|
|
7
7
|
categoryId: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
2
|
import { Shops } from './enums';
|
|
3
3
|
import { Filter } from './filter';
|
|
4
4
|
import { CategoryCondition, CategoryMetadata } from './types';
|
|
@@ -16,7 +16,8 @@ export declare class Category extends BaseModel<Category> {
|
|
|
16
16
|
products?: string[];
|
|
17
17
|
createdAt?: Date;
|
|
18
18
|
updatedAt?: Date;
|
|
19
|
-
shop
|
|
19
|
+
shop?: Shops;
|
|
20
|
+
shops?: string[];
|
|
20
21
|
published: boolean;
|
|
21
22
|
metadata: CategoryMetadata;
|
|
22
23
|
isCollection?: boolean;
|
|
@@ -24,6 +25,5 @@ export declare class Category extends BaseModel<Category> {
|
|
|
24
25
|
parentId?: number;
|
|
25
26
|
parent?: Category;
|
|
26
27
|
filters?: Filter[];
|
|
27
|
-
identifierFields(): NonFunctionPropertyNames<Category>[];
|
|
28
28
|
static get identifiersFields(): GenericIdentifier[];
|
|
29
29
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
2
|
export declare class FilterOption extends BaseModel<FilterOption> {
|
|
3
3
|
id: string;
|
|
4
4
|
filterId: number;
|
|
5
5
|
description: string;
|
|
6
6
|
createdAt?: Date;
|
|
7
7
|
updatedAt?: Date;
|
|
8
|
-
identifierFields(): NonFunctionPropertyNames<FilterOption>[];
|
|
9
8
|
static get identifiersFields(): GenericIdentifier[];
|
|
10
9
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
2
|
import { FilterOption } from './filter-option';
|
|
3
3
|
export declare class Filter extends BaseModel<Filter> {
|
|
4
4
|
id: number;
|
|
@@ -8,6 +8,5 @@ export declare class Filter extends BaseModel<Filter> {
|
|
|
8
8
|
options?: FilterOption[];
|
|
9
9
|
createdAt?: Date;
|
|
10
10
|
updatedAt?: Date;
|
|
11
|
-
identifierFields(): NonFunctionPropertyNames<Filter>[];
|
|
12
11
|
static get identifiersFields(): GenericIdentifier[];
|
|
13
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseModel } from '../../generic/model';
|
|
2
2
|
import { Product } from './product';
|
|
3
|
-
declare type KitProductIdentifiers = 'productId' | '
|
|
3
|
+
declare type KitProductIdentifiers = 'productId' | 'kitProductId';
|
|
4
4
|
export declare class KitProduct extends BaseModel<KitProduct, KitProductIdentifiers> {
|
|
5
5
|
productId: string;
|
|
6
6
|
kitProductId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier
|
|
1
|
+
import { BaseModel, GenericIdentifier } from '../../generic/model';
|
|
2
2
|
import { Category } from './category';
|
|
3
3
|
import { KitProduct } from './kit-product';
|
|
4
4
|
import { ProductEvaluation, ProductGender, ProductMetadata, ProductReview, ShopDescription, ShopPrice, Stock } from './types';
|
|
@@ -40,6 +40,5 @@ export declare class Product extends BaseModel<Product> {
|
|
|
40
40
|
private reviewsTotal?;
|
|
41
41
|
get evaluation(): ProductEvaluation;
|
|
42
42
|
set evaluation(evaluation: ProductEvaluation);
|
|
43
|
-
identifierFields(): NonFunctionPropertyNames<Product>[];
|
|
44
43
|
static get identifiersFields(): GenericIdentifier[];
|
|
45
44
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseModel
|
|
1
|
+
import { BaseModel } from '../../generic/model';
|
|
2
2
|
import { ShopPrice, Stock, VariantGrade } from './types';
|
|
3
3
|
export declare type ProductVariantIdentifiers = 'id' | 'productId';
|
|
4
4
|
export declare class Variant extends BaseModel<Variant, ProductVariantIdentifiers> {
|
|
@@ -13,6 +13,5 @@ export declare class Variant extends BaseModel<Variant, ProductVariantIdentifier
|
|
|
13
13
|
weight: number;
|
|
14
14
|
createdAt?: Date;
|
|
15
15
|
updatedAt?: Date;
|
|
16
|
-
identifierFields(): NonFunctionPropertyNames<Variant>[];
|
|
17
16
|
static get identifiersFields(): ProductVariantIdentifiers[];
|
|
18
17
|
}
|
|
@@ -4,6 +4,7 @@ import { Category } from '../models/category';
|
|
|
4
4
|
import { Shops } from '../models/enums/shops.enum';
|
|
5
5
|
export interface CategoryRepository extends CrudRepository<Category> {
|
|
6
6
|
getCategoryBySlug(slug: string, shop: Shops): Promise<Category>;
|
|
7
|
+
getCategoryByShop(shop: string): Promise<Category[]>;
|
|
7
8
|
getCategoriesForHome(categoryIds: string[], limit?: number, gender?: string): Promise<{
|
|
8
9
|
category: Category;
|
|
9
10
|
products: Product[];
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { ModelBaseStructure, NonFunctionAndIdentifierProperties,
|
|
2
|
-
export declare type GenericIdentifier<
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ModelBaseStructure, NonFunctionAndIdentifierProperties, NonFunctionAndIdentifierPropertyNames } from './types';
|
|
2
|
+
export declare type GenericIdentifier<M = {
|
|
3
|
+
id: string;
|
|
4
|
+
}, T = NonFunctionAndIdentifierPropertyNames<M>> = T;
|
|
5
|
+
export declare class BaseModel<Model extends ModelBaseStructure<Model, Identifiers>, Identifiers = GenericIdentifier> implements ModelBaseStructure<Model, Identifiers> {
|
|
6
|
+
get identifier(): {
|
|
7
|
+
[key in Extract<NonFunctionAndIdentifierPropertyNames<Model>, Identifiers>]: Model[key];
|
|
8
|
+
};
|
|
5
9
|
get identifiersFields(): Identifiers[];
|
|
6
10
|
constructor(args?: Partial<Model>);
|
|
7
|
-
static toInstance<T
|
|
11
|
+
static toInstance<T>(this: new () => T, data?: Partial<NonFunctionAndIdentifierProperties<T>>): T;
|
|
8
12
|
static isModel<T extends ModelBaseStructure>(this: new () => T, value: any): value is T;
|
|
9
13
|
toPlain(): any;
|
|
10
14
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { PartialIdentifiersModel } from './identifier-model.type';
|
|
2
|
+
import { ModelBaseStructure } from './model-base-structure.type';
|
|
1
3
|
import { NonFunctionAndIdentifierPropertiesWithNoPartial } from './non-function-properties.type';
|
|
2
4
|
import { NonFunctionAndIdentifierPropertyNames } from './non-function-property-name.type';
|
|
3
|
-
export interface BaseModelBuilder<T
|
|
5
|
+
export interface BaseModelBuilder<T extends ModelBaseStructure<T>, Identifiers = NonFunctionAndIdentifierPropertyNames<T> | any, P extends T & {
|
|
4
6
|
prototype: unknown;
|
|
5
7
|
} = T & {
|
|
6
8
|
prototype: unknown;
|
|
@@ -10,6 +12,6 @@ export interface BaseModelBuilder<T, Identifiers = NonFunctionAndIdentifierPrope
|
|
|
10
12
|
prototype: {
|
|
11
13
|
[key in keyof P['prototype']]: P['prototype'][key];
|
|
12
14
|
};
|
|
13
|
-
toInstance(this: new () =>
|
|
15
|
+
toInstance<E>(this: new () => E, data?: NonFunctionAndIdentifierPropertiesWithNoPartial<T> | PartialIdentifiersModel<T>): E;
|
|
14
16
|
isModel(model: any): model is T;
|
|
15
17
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PropType } from '../../../../utils';
|
|
2
2
|
import { ModelBaseStructure } from './model-base-structure.type';
|
|
3
|
-
import { NonFunctionAndIdentifierPropertiesWithNoPartial } from './non-function-properties.type';
|
|
4
3
|
import { NonFunctionAndIdentifierPropertyNames } from './non-function-property-name.type';
|
|
5
|
-
export declare type IdentifierModel<Model extends ModelBaseStructure> =
|
|
6
|
-
export declare type IdentifiersModel<Model extends ModelBaseStructure> =
|
|
7
|
-
|
|
4
|
+
export declare type IdentifierModel<Model extends ModelBaseStructure> = Extract<NonFunctionAndIdentifierPropertyNames<Model>, PropType<Model, 'identifiersFields'>[number]>;
|
|
5
|
+
export declare type IdentifiersModel<Model extends ModelBaseStructure> = {
|
|
6
|
+
[K in IdentifierModel<Model>]: Model[K];
|
|
7
|
+
};
|
|
8
|
+
export declare type PartialIdentifiersModel<Model extends ModelBaseStructure> = Partial<IdentifiersModel<Model>>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { NonFunctionAndIdentifierPropertyNames } from '..';
|
|
2
|
+
declare type ModelBaseStructureRecord = Record<string, any> & {
|
|
3
|
+
identifiersFields: any[];
|
|
4
|
+
};
|
|
5
|
+
export declare type ModelBaseStructure<M extends ModelBaseStructureRecord = ModelBaseStructureRecord, I = M['identifiersFields'][number]> = {
|
|
6
|
+
identifier: {
|
|
7
|
+
[key in Extract<NonFunctionAndIdentifierPropertyNames<M>, I>]: M[key];
|
|
8
|
+
};
|
|
4
9
|
identifiersFields: I[];
|
|
5
10
|
toPlain: any;
|
|
6
11
|
};
|
|
12
|
+
export {};
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
export declare type
|
|
2
|
-
|
|
1
|
+
export declare type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B;
|
|
2
|
+
export declare type ReadonlyKeys<T> = {
|
|
3
|
+
[P in keyof T]-?: IfEquals<{
|
|
4
|
+
[Q in P]: T[P];
|
|
5
|
+
}, {
|
|
6
|
+
-readonly [Q in P]: T[P];
|
|
7
|
+
}, never, P>;
|
|
8
|
+
}[keyof T];
|
|
9
|
+
export declare type WritableKeys<T> = Exclude<keyof T, ReadonlyKeys<T>>;
|
|
10
|
+
export declare type NonFunctionPropertyNames<T, P = T, E extends WritableKeys<P> = WritableKeys<P>> = {
|
|
11
|
+
[K in E]: P[K] extends Function ? never : K extends 'identifiersFields' ? never : K;
|
|
3
12
|
}[E];
|
|
4
|
-
export declare type NonFunctionAndIdentifierPropertyNames<T> = NonFunctionPropertyNames<
|
|
13
|
+
export declare type NonFunctionAndIdentifierPropertyNames<T> = NonFunctionPropertyNames<Omit<T, 'identifier' | 'identifiersFields'>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type GetRepositoryParams<Model extends ModelBaseStructure> =
|
|
1
|
+
import { IdentifiersModel, ModelBaseStructure } from '../model/types';
|
|
2
|
+
export declare type GetRepositoryParams<Model extends ModelBaseStructure> = IdentifiersModel<Model>;
|
|
3
3
|
export interface GetRepository<Model extends ModelBaseStructure, Params = GetRepositoryParams<Model>> {
|
|
4
4
|
get(identifiers: Params): Promise<Model>;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from '../../../../utils';
|
|
2
2
|
import { ModelBaseStructure } from '../../model';
|
|
3
|
-
import {
|
|
3
|
+
import { NonFunctionAndIdentifierPropertyNames } from '../../model/types/non-function-property-name.type';
|
|
4
4
|
import { Where } from '../enums/where.enum';
|
|
5
5
|
export declare type RepositoryFindFieltersOptions<Model, FieldName extends keyof Model> = {
|
|
6
6
|
operator: Where;
|
|
@@ -8,6 +8,6 @@ export declare type RepositoryFindFieltersOptions<Model, FieldName extends keyof
|
|
|
8
8
|
};
|
|
9
9
|
export declare type RepositoryFindField<Model, FieldName extends keyof Model> = RepositoryFindFieltersOptions<Model, FieldName> | RepositoryFindFieltersOptions<Model, FieldName>[] | Partial<PropType<Model, FieldName>>;
|
|
10
10
|
export declare type NestedRepositoryFindFieltersOptions<Model> = {
|
|
11
|
-
[key in
|
|
11
|
+
[key in NonFunctionAndIdentifierPropertyNames<Model>]?: PropType<Model, key> extends ModelBaseStructure ? NestedRepositoryFindFieltersOptions<PropType<Model, key>> : PropType<Required<Model>, key> extends any[] ? PropType<Required<Model>, key>[number] extends ModelBaseStructure ? NestedRepositoryFindFieltersOptions<PropType<Required<Model>, key>[number]> : PropType<Required<Model>, key>[number] extends Record<string, any> ? NestedRepositoryFindFieltersOptions<PropType<Required<Model>, key>[number]> : RepositoryFindField<Model, key> : PropType<Model, key> extends Record<string, any> ? NestedRepositoryFindFieltersOptions<Required<PropType<Model, key>>> : RepositoryFindField<Model, key>;
|
|
12
12
|
};
|
|
13
|
-
export declare type RepositoryFindFielters<Model extends ModelBaseStructure
|
|
13
|
+
export declare type RepositoryFindFielters<Model extends ModelBaseStructure> = NestedRepositoryFindFieltersOptions<Model>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NonFunctionAndIdentifierPropertyNames } from '../../model/types/non-function-property-name.type';
|
|
2
2
|
export declare type RepositoryOrderBy<Model> = {
|
|
3
|
-
[key in
|
|
3
|
+
[key in NonFunctionAndIdentifierPropertyNames<Model>]?: 'asc' | 'desc';
|
|
4
4
|
};
|
|
5
5
|
export declare type RepositoryOrderByList<Model> = RepositoryOrderBy<Model>[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ModelBaseStructure } from '../..';
|
|
2
2
|
import { PropType } from '../../../../utils';
|
|
3
|
-
import {
|
|
3
|
+
import { NonFunctionAndIdentifierPropertyNames } from '../../model/types/non-function-property-name.type';
|
|
4
4
|
export declare type UpdateOptionAction = 'removeField' | 'update' | 'merge' | 'remove' | 'null';
|
|
5
5
|
export declare type UpdateOptions<T> = {
|
|
6
6
|
action: UpdateOptionAction;
|
|
7
7
|
value?: T;
|
|
8
8
|
};
|
|
9
9
|
export declare type RepositoryUpdateParams<Model extends ModelBaseStructure> = {
|
|
10
|
-
[key in
|
|
10
|
+
[key in NonFunctionAndIdentifierPropertyNames<Model>]?: UpdateOptions<PropType<Model, key>> | PropType<Model, key>;
|
|
11
11
|
};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier } from '../../generic
|
|
1
|
+
import { BaseModel, GenericIdentifier, ModelBaseStructure } from '../../generic';
|
|
2
2
|
import { LocationGeometry } from './types/location-geometry.type';
|
|
3
|
-
export declare abstract class Address<Identifiers =
|
|
3
|
+
export declare abstract class Address<ChildAddress extends ModelBaseStructure<ChildAddress, Identifiers>, Identifiers = ChildAddress['identifiersFields']> extends BaseModel<ChildAddress, Identifiers> {
|
|
4
|
+
id: string;
|
|
4
5
|
default?: boolean;
|
|
5
6
|
recipient?: string;
|
|
6
7
|
zip?: string;
|
|
7
8
|
street?: string;
|
|
8
9
|
number?: string;
|
|
9
10
|
extension?: string;
|
|
11
|
+
reference?: string;
|
|
10
12
|
district?: string;
|
|
11
13
|
city?: string;
|
|
12
14
|
regionalPole?: string;
|
|
@@ -18,5 +20,5 @@ export declare abstract class Address<Identifiers = GenericIdentifier> extends B
|
|
|
18
20
|
formattedAddress?: string;
|
|
19
21
|
placeId?: string;
|
|
20
22
|
geometry?: LocationGeometry;
|
|
21
|
-
static get identifiersFields():
|
|
23
|
+
static get identifiersFields(): Array<GenericIdentifier | {}>;
|
|
22
24
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Shops } from '../../catalog/models/enums/shops.enum';
|
|
2
2
|
import { BaseModel, GenericIdentifier } from '../../generic/model/base.model';
|
|
3
|
-
import { User } from '../../users
|
|
3
|
+
import { User, UserAddress } from '../../users';
|
|
4
4
|
import { Coupon } from './coupons/coupon';
|
|
5
5
|
import { LineItem } from './line-item';
|
|
6
6
|
import { ShippingMethod } from './shipping-method';
|
|
7
|
-
import { Shops } from '../../catalog/models/enums/shops.enum';
|
|
8
7
|
export declare class Checkout extends BaseModel<Checkout> {
|
|
9
8
|
id?: string;
|
|
10
9
|
paymentId?: string;
|
|
11
|
-
status?:
|
|
10
|
+
status?: any;
|
|
12
11
|
createdAt?: Date;
|
|
13
12
|
updatedAt?: Date;
|
|
14
13
|
completedAt?: Date;
|
|
@@ -19,8 +18,8 @@ export declare class Checkout extends BaseModel<Checkout> {
|
|
|
19
18
|
glampoints?: number;
|
|
20
19
|
lineItems?: LineItem[];
|
|
21
20
|
user?: User;
|
|
22
|
-
shippingAddress?:
|
|
23
|
-
billingAddress?:
|
|
21
|
+
shippingAddress?: UserAddress;
|
|
22
|
+
billingAddress?: UserAddress;
|
|
24
23
|
shipping?: ShippingMethod;
|
|
25
24
|
coupon?: Coupon;
|
|
26
25
|
static get identifiersFields(): GenericIdentifier[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Address } from '../../../location/models/address';
|
|
2
1
|
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
2
|
+
import { User, UserAddress } from '../../../users';
|
|
3
3
|
import { Coupon } from '../coupons/coupon';
|
|
4
|
-
import { User } from '../../../users/models/user';
|
|
5
4
|
import { SubscriptionPlan } from './plan';
|
|
6
5
|
export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription> {
|
|
7
6
|
id?: string;
|
|
@@ -13,8 +12,8 @@ export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription
|
|
|
13
12
|
discount?: number;
|
|
14
13
|
subTotalPrice?: number;
|
|
15
14
|
totalPrice?: number;
|
|
16
|
-
shippingAddress:
|
|
17
|
-
billingAddress?:
|
|
15
|
+
shippingAddress: UserAddress;
|
|
16
|
+
billingAddress?: UserAddress;
|
|
18
17
|
subscriptionPlan: SubscriptionPlan;
|
|
19
18
|
coupon?: Coupon;
|
|
20
19
|
static get identifiersFields(): GenericIdentifier[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Address } from '../../../location/models/address';
|
|
2
1
|
import { BaseModel, GenericIdentifier } from '../../../generic/model/base.model';
|
|
3
2
|
import { Coupon } from '../../../shopping/models/coupons/coupon';
|
|
4
3
|
import { SubscriptionPlan } from '../../../shopping/models/subscription/plan';
|
|
5
4
|
import { User } from '../user';
|
|
5
|
+
import { UserAddress } from '../user-address';
|
|
6
6
|
import { Edition } from './edition';
|
|
7
7
|
import { Status } from './enums/status.enum';
|
|
8
8
|
import { SubscriptionPayment } from './payment';
|
|
@@ -19,8 +19,8 @@ export declare class Subscription extends BaseModel<Subscription> {
|
|
|
19
19
|
updatedAt: Date;
|
|
20
20
|
user: User;
|
|
21
21
|
subscriptionPlan: SubscriptionPlan;
|
|
22
|
-
shippingAddress:
|
|
23
|
-
billingAddress?:
|
|
22
|
+
shippingAddress: UserAddress;
|
|
23
|
+
billingAddress?: UserAddress;
|
|
24
24
|
coupon?: Coupon;
|
|
25
25
|
editions: Edition[];
|
|
26
26
|
payment?: SubscriptionPayment[];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Address } from '../../location/models/address';
|
|
2
2
|
export declare type UserAddressIdentifiers = 'id' | 'userId';
|
|
3
|
-
export declare class UserAddress extends Address<UserAddressIdentifiers> {
|
|
4
|
-
id: string;
|
|
3
|
+
export declare class UserAddress extends Address<UserAddress, UserAddressIdentifiers> {
|
|
5
4
|
userId: string;
|
|
6
5
|
static get identifiersFields(): UserAddressIdentifiers[];
|
|
7
6
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { BaseModel, GenericIdentifier } from '../../generic
|
|
2
|
-
import { ModelBaseStructure, NonFunctionProperties } from '../../generic/model/types';
|
|
1
|
+
import { BaseModel, GenericIdentifier, NonFunctionAndIdentifierProperties } from '../../generic';
|
|
3
2
|
import { BeautyProfile } from './beauty-profile';
|
|
4
3
|
import { Area, OfficePosition, UserType } from './enums';
|
|
5
4
|
export declare class User extends BaseModel<User> {
|
|
@@ -22,7 +21,7 @@ export declare class User extends BaseModel<User> {
|
|
|
22
21
|
dateCreated?: Date;
|
|
23
22
|
dateModified?: Date;
|
|
24
23
|
beautyProfile?: BeautyProfile;
|
|
25
|
-
static toInstance<T
|
|
24
|
+
static toInstance<T>(this: new () => T, data?: Partial<NonFunctionAndIdentifierProperties<User>>): T;
|
|
26
25
|
toPlain(): Record<string, any>;
|
|
27
26
|
static get identifiersFields(): GenericIdentifier[];
|
|
28
27
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LineItem } from '../../shopping';
|
|
2
|
+
export class RoundProductPricesHelper {
|
|
3
|
+
static roundProductPrices(product) {
|
|
4
|
+
product.price.price = Number(product.price.price.toFixed(2));
|
|
5
|
+
product.price.fullPrice = Number(product.price.fullPrice.toFixed(2));
|
|
6
|
+
if (product.price.subscriberPrice) {
|
|
7
|
+
product.price.subscriberPrice = Number(product.price.subscriberPrice.toFixed(2));
|
|
8
|
+
}
|
|
9
|
+
if (product instanceof LineItem && product.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0,0 +1,2 @@
|
|
|
1
|
+
export * from './RoundProdutcPriceHelper';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vY2F0YWxvZy9oZWxwZXJzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsMkJBQTJCLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL1JvdW5kUHJvZHV0Y1ByaWNlSGVscGVyJ1xuIl19
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './helpers';
|
|
1
2
|
export * from './models';
|
|
2
3
|
export * from './repositories';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vY2F0YWxvZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFdBQVcsQ0FBQTtBQUN6QixjQUFjLFVBQVUsQ0FBQTtBQUN4QixjQUFjLGdCQUFnQixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9oZWxwZXJzJ1xuZXhwb3J0ICogZnJvbSAnLi9tb2RlbHMnXG5leHBvcnQgKiBmcm9tICcuL3JlcG9zaXRvcmllcydcbiJdfQ==
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { Type } from 'class-transformer';
|
|
3
|
+
import { BaseModel } from '../../generic/model';
|
|
4
|
+
export class CategoryCollectionChildren extends BaseModel {
|
|
5
|
+
static get identifiersFields() {
|
|
6
|
+
return ['collectionId', 'categoryId'];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
__decorate([
|
|
10
|
+
Type(() => CategoryCollectionChildren),
|
|
11
|
+
__metadata("design:type", CategoryCollectionChildren)
|
|
12
|
+
], CategoryCollectionChildren.prototype, "parent", void 0);
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2F0ZWdvcnktY29sbGVjdGlvbi1jaGlsZHJlbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2RvbWFpbi9jYXRhbG9nL21vZGVscy9jYXRlZ29yeS1jb2xsZWN0aW9uLWNoaWxkcmVuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFDeEMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHFCQUFxQixDQUFBO0FBSS9DLE1BQU0sT0FBTywwQkFBMkIsU0FBUSxTQUcvQztJQVlDLE1BQU0sS0FBSyxpQkFBaUI7UUFDMUIsT0FBTyxDQUFDLGNBQWMsRUFBRSxZQUFZLENBQUMsQ0FBQTtJQUN2QyxDQUFDO0NBQ0Y7QUFOQztJQUFDLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQywwQkFBMEIsQ0FBQzs4QkFDOUIsMEJBQTBCOzBEQUFBIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgVHlwZSB9IGZyb20gJ2NsYXNzLXRyYW5zZm9ybWVyJ1xuaW1wb3J0IHsgQmFzZU1vZGVsIH0gZnJvbSAnLi4vLi4vZ2VuZXJpYy9tb2RlbCdcblxuZXhwb3J0IHR5cGUgQ2F0ZWdvcnlDb2xsZWN0aW9uQ2hpbGRyZW5JZGVudGlmaWVycyA9ICdjb2xsZWN0aW9uSWQnIHwgJ2NhdGVnb3J5SWQnXG5cbmV4cG9ydCBjbGFzcyBDYXRlZ29yeUNvbGxlY3Rpb25DaGlsZHJlbiBleHRlbmRzIEJhc2VNb2RlbDxcbiAgQ2F0ZWdvcnlDb2xsZWN0aW9uQ2hpbGRyZW4sXG4gIENhdGVnb3J5Q29sbGVjdGlvbkNoaWxkcmVuSWRlbnRpZmllcnNcbj4ge1xuICBjb2xsZWN0aW9uSWQ6IG51bWJlclxuICBjYXRlZ29yeUlkOiBudW1iZXJcbiAgcGFyZW50Q29sbGVjdGlvbklkPzogbnVtYmVyXG4gIHBhcmVudENhdGVnb3J5SWQ/OiBudW1iZXJcbiAgbmFtZTogc3RyaW5nXG4gIHNsdWc6IHN0cmluZ1xuICByZWZlcmVuY2U/OiBzdHJpbmdcblxuICBAVHlwZSgoKSA9PiBDYXRlZ29yeUNvbGxlY3Rpb25DaGlsZHJlbilcbiAgcGFyZW50PzogQ2F0ZWdvcnlDb2xsZWN0aW9uQ2hpbGRyZW5cblxuICBzdGF0aWMgZ2V0IGlkZW50aWZpZXJzRmllbGRzKCk6IENhdGVnb3J5Q29sbGVjdGlvbkNoaWxkcmVuSWRlbnRpZmllcnNbXSB7XG4gICAgcmV0dXJuIFsnY29sbGVjdGlvbklkJywgJ2NhdGVnb3J5SWQnXVxuICB9XG59XG4iXX0=
|
|
@@ -11,4 +11,4 @@ __decorate([
|
|
|
11
11
|
Type(() => Filter),
|
|
12
12
|
__metadata("design:type", Filter)
|
|
13
13
|
], CategoryFilter.prototype, "filter", void 0);
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
14
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2F0ZWdvcnktZmlsdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiL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lcj86IEZpbHRlclxuXG4gIHN0YXRpYyBnZXQgaWRlbnRpZmllcnNGaWVsZHMoKTogQ2F0ZWdvcnlGaWx0ZXJJZGVudGlmaWVyc1tdIHtcbiAgICByZXR1cm4gWydpZCddXG4gIH1cbn1cbiJdfQ==
|
|
@@ -3,9 +3,6 @@ import { Type } from 'class-transformer';
|
|
|
3
3
|
import { BaseModel } from '../../generic/model';
|
|
4
4
|
import { Filter } from './filter';
|
|
5
5
|
export class Category extends BaseModel {
|
|
6
|
-
identifierFields() {
|
|
7
|
-
return ['id'];
|
|
8
|
-
}
|
|
9
6
|
static get identifiersFields() {
|
|
10
7
|
return ['id'];
|
|
11
8
|
}
|
|
@@ -18,4 +15,4 @@ __decorate([
|
|
|
18
15
|
Type(() => Filter),
|
|
19
16
|
__metadata("design:type", Array)
|
|
20
17
|
], Category.prototype, "filters", void 0);
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2F0ZWdvcnkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vY2F0YWxvZy9tb2RlbHMvY2F0ZWdvcnkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQUN4QyxPQUFPLEVBQUUsU0FBUyxFQUFxQixNQUFNLHFCQUFxQixDQUFBO0FBRWxFLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFHakMsTUFBTSxPQUFPLFFBQVMsU0FBUSxTQUFtQjtJQTRCL0MsTUFBTSxLQUFLLGlCQUFpQjtRQUMxQixPQUFPLENBQUMsSUFBSSxDQUFDLENBQUE7SUFDZixDQUFDO0NBQ0Y7QUFUQztJQ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lZ29yeU1ldGFkYXRhXG4gIGlzQ29sbGVjdGlvbj86IGJvb2xlYW5cbiAgcmVmZXJlbmNlPzogc3RyaW5nXG4gIHBhcmVudElkPzogbnVtYmVyXG5cbiAgQFR5cGUoKCkgPT4gQ2F0ZWdvcnkpXG4gIHBhcmVudD86IENhdGVnb3J5XG5cbiAgQFR5cGUoKCkgPT4gRmlsdGVyKVxuICBmaWx0ZXJzPzogRmlsdGVyW11cblxuICBzdGF0aWMgZ2V0IGlkZW50aWZpZXJzRmllbGRzKCk6IEdlbmVyaWNJZGVudGlmaWVyW10ge1xuICAgIHJldHVybiBbJ2lkJ11cbiAgfVxufVxuIl19
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { BaseModel } from '../../generic/model';
|
|
2
2
|
export class FilterOption extends BaseModel {
|
|
3
|
-
identifierFields() {
|
|
4
|
-
return ['id'];
|
|
5
|
-
}
|
|
6
3
|
static get identifiersFields() {
|
|
7
4
|
return ['id'];
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLW9wdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2Nvbm5lY3Qvc3JjL2RvbWFpbi9jYXRhbG9nL21vZGVscy9maWx0ZXItb3B0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQXFCLE1BQU0scUJBQXFCLENBQUE7QUFFbEUsTUFBTSxPQUFPLFlBQWEsU0FBUSxTQUF1QjtJQU92RCxNQUFNLEtBQUssaUJBQWlCO1FBQzFCLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQTtJQUNmLENBQUM7Q0FDRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEJhc2VNb2RlbCwgR2VuZXJpY0lkZW50aWZpZXIgfSBmcm9tICcuLi8uLi9nZW5lcmljL21vZGVsJ1xuXG5leHBvcnQgY2xhc3MgRmlsdGVyT3B0aW9uIGV4dGVuZHMgQmFzZU1vZGVsPEZpbHRlck9wdGlvbj4ge1xuICBpZDogc3RyaW5nXG4gIGZpbHRlcklkOiBudW1iZXJcbiAgZGVzY3JpcHRpb246IHN0cmluZ1xuICBjcmVhdGVkQXQ/OiBEYXRlXG4gIHVwZGF0ZWRBdD86IERhdGVcblxuICBzdGF0aWMgZ2V0IGlkZW50aWZpZXJzRmllbGRzKCk6IEdlbmVyaWNJZGVudGlmaWVyW10ge1xuICAgIHJldHVybiBbJ2lkJ11cbiAgfVxufVxuIl19
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { BaseModel } from '../../generic/model';
|
|
2
2
|
export class Filter extends BaseModel {
|
|
3
|
-
identifierFields() {
|
|
4
|
-
return ['id'];
|
|
5
|
-
}
|
|
6
3
|
static get identifiersFields() {
|
|
7
4
|
return ['id'];
|
|
8
5
|
}
|
|
9
6
|
}
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29ubmVjdC9zcmMvZG9tYWluL2NhdGFsb2cvbW9kZWxzL2ZpbHRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFxQixNQUFNLHFCQUFxQixDQUFBO0FBR2xFLE1BQU0sT0FBTyxNQUFPLFNBQVEsU0FBaUI7SUFTM0MsTUFBTSxLQUFLLGlCQUFpQjtRQUMxQixPQUFPLENBQUMsSUFBSSxDQUFDLENBQUE7SUFDZixDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBCYXNlTW9kZWwsIEdlbmVyaWNJZGVudGlmaWVyIH0gZnJvbSAnLi4vLi4vZ2VuZXJpYy9tb2RlbCdcbmltcG9ydCB7IEZpbHRlck9wdGlvbiB9IGZyb20gJy4vZmlsdGVyLW9wdGlvbidcblxuZXhwb3J0IGNsYXNzIEZpbHRlciBleHRlbmRzIEJhc2VNb2RlbDxGaWx0ZXI+IHtcbiAgaWQ6IG51bWJlclxuICBkZXNjcmlwdGlvbjogc3RyaW5nXG4gIHNsdWc6IHN0cmluZ1xuICBlbmFibGVkOiBib29sZWFuXG4gIG9wdGlvbnM/OiBGaWx0ZXJPcHRpb25bXVxuICBjcmVhdGVkQXQ/OiBEYXRlXG4gIHVwZGF0ZWRBdD86IERhdGVcblxuICBzdGF0aWMgZ2V0IGlkZW50aWZpZXJzRmllbGRzKCk6IEdlbmVyaWNJZGVudGlmaWVyW10ge1xuICAgIHJldHVybiBbJ2lkJ11cbiAgfVxufVxuIl19
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './category';
|
|
2
|
+
export * from './category-collection-children';
|
|
2
3
|
export * from './category-filter';
|
|
3
4
|
export * from './enums';
|
|
4
5
|
export * from './filter';
|
|
@@ -7,4 +8,4 @@ export * from './kit-product';
|
|
|
7
8
|
export * from './product';
|
|
8
9
|
export * from './types';
|
|
9
10
|
export * from './variant';
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0L3NyYy9kb21haW4vY2F0YWxvZy9tb2RlbHMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxZQUFZLENBQUE7QUFDMUIsY0FBYyxnQ0FBZ0MsQ0FBQTtBQUM5QyxjQUFjLG1CQUFtQixDQUFBO0FBQ2pDLGNBQWMsU0FBUyxDQUFBO0FBQ3ZCLGNBQWMsVUFBVSxDQUFBO0FBQ3hCLGNBQWMsaUJBQWlCLENBQUE7QUFDL0IsY0FBYyxlQUFlLENBQUE7QUFDN0IsY0FBYyxXQUFXLENBQUE7QUFDekIsY0FBYyxTQUFTLENBQUE7QUFDdkIsY0FBYyxXQUFXLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NhdGVnb3J5J1xuZXhwb3J0ICogZnJvbSAnLi9jYXRlZ29yeS1jb2xsZWN0aW9uLWNoaWxkcmVuJ1xuZXhwb3J0ICogZnJvbSAnLi9jYXRlZ29yeS1maWx0ZXInXG5leHBvcnQgKiBmcm9tICcuL2VudW1zJ1xuZXhwb3J0ICogZnJvbSAnLi9maWx0ZXInXG5leHBvcnQgKiBmcm9tICcuL2ZpbHRlci1vcHRpb24nXG5leHBvcnQgKiBmcm9tICcuL2tpdC1wcm9kdWN0J1xuZXhwb3J0ICogZnJvbSAnLi9wcm9kdWN0J1xuZXhwb3J0ICogZnJvbSAnLi90eXBlcydcbmV4cG9ydCAqIGZyb20gJy4vdmFyaWFudCdcbiJdfQ==
|
|
@@ -4,7 +4,7 @@ import { BaseModel } from '../../generic/model';
|
|
|
4
4
|
import { Product } from './product';
|
|
5
5
|
export class KitProduct extends BaseModel {
|
|
6
6
|
static get identifiersFields() {
|
|
7
|
-
return ['productId', '
|
|
7
|
+
return ['productId', 'kitProductId'];
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
__decorate([
|
|
@@ -15,4 +15,4 @@ __decorate([
|
|
|
15
15
|
Type(() => Product),
|
|
16
16
|
__metadata("design:type", Product)
|
|
17
17
|
], KitProduct.prototype, "product", void 0);
|
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;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