@infrab4a/connect-angular 4.2.3-beta.1 → 4.2.3-beta.3
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/angular-connect.module.d.ts +23 -23
- package/angular-elastic-search.module.d.ts +9 -9
- package/angular-firebase-auth.module.d.ts +11 -11
- package/angular-firestore.module.d.ts +17 -17
- package/angular-hasura-graphql.module.d.ts +16 -16
- package/consts/backend-url.const.d.ts +1 -1
- package/consts/category-structure.d.ts +1 -1
- package/consts/default-shop.const.d.ts +1 -1
- package/consts/es-config.const.d.ts +1 -1
- package/consts/firebase-const.d.ts +3 -3
- package/consts/hasura-options.const.d.ts +1 -1
- package/consts/index.d.ts +6 -6
- package/esm2022/angular-connect.module.mjs +97 -0
- package/esm2022/angular-elastic-search.module.mjs +34 -0
- package/esm2022/angular-firebase-auth.module.mjs +115 -0
- package/esm2022/angular-firestore.module.mjs +483 -0
- package/esm2022/angular-hasura-graphql.module.mjs +265 -0
- package/{esm2020 → esm2022}/consts/backend-url.const.mjs +1 -1
- package/{esm2020 → esm2022}/consts/category-structure.mjs +2 -2
- package/{esm2020 → esm2022}/consts/default-shop.const.mjs +2 -2
- package/{esm2020 → esm2022}/consts/es-config.const.mjs +2 -2
- package/{esm2020 → esm2022}/consts/firebase-const.mjs +4 -4
- package/{esm2020 → esm2022}/consts/hasura-options.const.mjs +2 -2
- package/{esm2020 → esm2022}/consts/index.mjs +7 -7
- package/{esm2020 → esm2022}/helpers/index.mjs +2 -2
- package/{esm2020 → esm2022}/helpers/mobile-operation-system-checker.helper.mjs +7 -7
- package/{esm2020 → esm2022}/index.mjs +6 -6
- package/{esm2020 → esm2022}/infrab4a-connect-angular.mjs +4 -4
- package/{esm2020 → esm2022}/services/auth.service.mjs +37 -37
- package/{esm2020 → esm2022}/services/cart.service.mjs +281 -285
- package/{esm2020 → esm2022}/services/catalog/adapters/category-structure.adapter.mjs +2 -2
- package/{esm2020 → esm2022}/services/catalog/adapters/index.mjs +4 -4
- package/{esm2020 → esm2022}/services/catalog/adapters/new-category-structure.adapter.mjs +41 -41
- package/{esm2020 → esm2022}/services/catalog/adapters/old-category-structure.adapter.mjs +23 -23
- package/{esm2020 → esm2022}/services/catalog/catalog.service.mjs +170 -170
- package/{esm2020 → esm2022}/services/catalog/category.service.mjs +51 -51
- package/{esm2020 → esm2022}/services/catalog/enums/index.mjs +2 -2
- package/{esm2020 → esm2022}/services/catalog/enums/product-sorts.enum.mjs +11 -11
- package/{esm2020 → esm2022}/services/catalog/index.mjs +7 -7
- package/{esm2020 → esm2022}/services/catalog/models/category-with-tree.model.mjs +10 -10
- package/{esm2020 → esm2022}/services/catalog/models/index.mjs +2 -2
- package/{esm2020 → esm2022}/services/catalog/types/index.mjs +2 -2
- package/{esm2020 → esm2022}/services/catalog/types/product-sort.type.mjs +2 -2
- package/{esm2020 → esm2022}/services/catalog/wishlist.service.mjs +107 -107
- package/{esm2020 → esm2022}/services/checkout-subscription.service.mjs +53 -53
- package/{esm2020 → esm2022}/services/checkout.service.mjs +71 -71
- package/{esm2020 → esm2022}/services/coupon.service.mjs +218 -218
- package/{esm2020 → esm2022}/services/helpers/index.mjs +2 -2
- package/{esm2020 → esm2022}/services/helpers/util.helper.mjs +18 -18
- package/{esm2020 → esm2022}/services/home-shop.service.mjs +114 -114
- package/{esm2020 → esm2022}/services/index.mjs +11 -11
- package/{esm2020 → esm2022}/services/order.service.mjs +30 -30
- package/{esm2020 → esm2022}/services/shipping.service.mjs +96 -96
- package/{esm2020 → esm2022}/services/types/index.mjs +3 -3
- package/{esm2020 → esm2022}/services/types/required-checkout-data.type.mjs +2 -2
- package/{esm2020 → esm2022}/services/types/required-checkout-subscription-data.type.mjs +2 -2
- package/esm2022/services/types/shipping-methods.type.mjs +2 -0
- package/{esm2020 → esm2022}/types/firebase-app-config.type.mjs +2 -2
- package/{esm2020 → esm2022}/types/index.mjs +2 -2
- package/{fesm2020 → fesm2022}/infrab4a-connect-angular.mjs +2159 -2163
- package/fesm2022/infrab4a-connect-angular.mjs.map +1 -0
- package/helpers/index.d.ts +1 -1
- package/helpers/mobile-operation-system-checker.helper.d.ts +3 -3
- package/index.d.ts +5 -5
- package/package.json +6 -12
- package/services/auth.service.d.ts +18 -18
- package/services/cart.service.d.ts +42 -42
- package/services/catalog/adapters/category-structure.adapter.d.ts +4 -4
- package/services/catalog/adapters/index.d.ts +3 -3
- package/services/catalog/adapters/new-category-structure.adapter.d.ts +12 -12
- package/services/catalog/adapters/old-category-structure.adapter.d.ts +10 -10
- package/services/catalog/catalog.service.d.ts +83 -83
- package/services/catalog/category.service.d.ts +15 -15
- package/services/catalog/enums/index.d.ts +1 -1
- package/services/catalog/enums/product-sorts.enum.d.ts +9 -9
- package/services/catalog/index.d.ts +6 -6
- package/services/catalog/models/category-with-tree.model.d.ts +4 -4
- package/services/catalog/models/index.d.ts +1 -1
- package/services/catalog/types/index.d.ts +1 -1
- package/services/catalog/types/product-sort.type.d.ts +2 -2
- package/services/catalog/wishlist.service.d.ts +22 -22
- package/services/checkout-subscription.service.d.ts +18 -18
- package/services/checkout.service.d.ts +23 -23
- package/services/coupon.service.d.ts +28 -28
- package/services/helpers/index.d.ts +1 -1
- package/services/helpers/util.helper.d.ts +3 -3
- package/services/home-shop.service.d.ts +25 -25
- package/services/index.d.ts +10 -10
- package/services/order.service.d.ts +13 -13
- package/services/shipping.service.d.ts +19 -19
- package/services/types/index.d.ts +2 -2
- package/services/types/required-checkout-data.type.d.ts +2 -2
- package/services/types/required-checkout-subscription-data.type.d.ts +2 -2
- package/services/types/shipping-methods.type.d.ts +12 -12
- package/types/firebase-app-config.type.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/esm2020/angular-connect.module.mjs +0 -97
- package/esm2020/angular-elastic-search.module.mjs +0 -34
- package/esm2020/angular-firebase-auth.module.mjs +0 -115
- package/esm2020/angular-firestore.module.mjs +0 -483
- package/esm2020/angular-hasura-graphql.module.mjs +0 -265
- package/esm2020/services/types/shipping-methods.type.mjs +0 -2
- package/fesm2015/infrab4a-connect-angular.mjs +0 -2309
- package/fesm2015/infrab4a-connect-angular.mjs.map +0 -1
- package/fesm2020/infrab4a-connect-angular.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Category, Product, RepositoryFindFielters } from '@infrab4a/connect/';
|
|
2
|
-
export interface CategoryStructureAdapter {
|
|
3
|
-
buildProductFilterByCategory(category: Category): Promise<RepositoryFindFielters<Product>>;
|
|
4
|
-
}
|
|
1
|
+
import { Category, Product, RepositoryFindFielters } from '@infrab4a/connect/';
|
|
2
|
+
export interface CategoryStructureAdapter {
|
|
3
|
+
buildProductFilterByCategory(category: Category): Promise<RepositoryFindFielters<Product>>;
|
|
4
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './category-structure.adapter';
|
|
2
|
-
export * from './new-category-structure.adapter';
|
|
3
|
-
export * from './old-category-structure.adapter';
|
|
1
|
+
export * from './category-structure.adapter';
|
|
2
|
+
export * from './new-category-structure.adapter';
|
|
3
|
+
export * from './old-category-structure.adapter';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Category, CategoryRepository, Product, RepositoryFindFielters } from '@infrab4a/connect';
|
|
2
|
-
import { CategoryStructureAdapter } from './category-structure.adapter';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class NewCategoryStructureAdapter implements CategoryStructureAdapter {
|
|
5
|
-
private readonly categoryRepository;
|
|
6
|
-
constructor(categoryRepository: CategoryRepository);
|
|
7
|
-
buildProductFilterByCategory(category: Category): Promise<RepositoryFindFielters<Product>>;
|
|
8
|
-
private getAllCategoriesIdFromCategory;
|
|
9
|
-
private getCategory;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NewCategoryStructureAdapter, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NewCategoryStructureAdapter>;
|
|
12
|
-
}
|
|
1
|
+
import { Category, CategoryRepository, Product, RepositoryFindFielters } from '@infrab4a/connect';
|
|
2
|
+
import { CategoryStructureAdapter } from './category-structure.adapter';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NewCategoryStructureAdapter implements CategoryStructureAdapter {
|
|
5
|
+
private readonly categoryRepository;
|
|
6
|
+
constructor(categoryRepository: CategoryRepository);
|
|
7
|
+
buildProductFilterByCategory(category: Category): Promise<RepositoryFindFielters<Product>>;
|
|
8
|
+
private getAllCategoriesIdFromCategory;
|
|
9
|
+
private getCategory;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NewCategoryStructureAdapter, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NewCategoryStructureAdapter>;
|
|
12
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Category, CategoryRepository, Product, RepositoryFindFielters } from '@infrab4a/connect';
|
|
2
|
-
import { CategoryStructureAdapter } from './category-structure.adapter';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class OldCategoryStructureAdapter implements CategoryStructureAdapter {
|
|
5
|
-
private readonly categoryRepository;
|
|
6
|
-
constructor(categoryRepository: CategoryRepository);
|
|
7
|
-
buildProductFilterByCategory(category: Category): Promise<RepositoryFindFielters<Product>>;
|
|
8
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OldCategoryStructureAdapter, never>;
|
|
9
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OldCategoryStructureAdapter>;
|
|
10
|
-
}
|
|
1
|
+
import { Category, CategoryRepository, Product, RepositoryFindFielters } from '@infrab4a/connect';
|
|
2
|
+
import { CategoryStructureAdapter } from './category-structure.adapter';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class OldCategoryStructureAdapter implements CategoryStructureAdapter {
|
|
5
|
+
private readonly categoryRepository;
|
|
6
|
+
constructor(categoryRepository: CategoryRepository);
|
|
7
|
+
buildProductFilterByCategory(category: Category): Promise<RepositoryFindFielters<Product>>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OldCategoryStructureAdapter, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OldCategoryStructureAdapter>;
|
|
10
|
+
}
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import { Category, Product, ProductGender, ProductRepository, ProductsIndex, Shops } from '@infrab4a/connect';
|
|
2
|
-
import { CategoryStructureAdapter } from './adapters';
|
|
3
|
-
import { ProductSort } from './types/product-sort.type';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
type FetchProductsFilters = {
|
|
6
|
-
clubDiscount?: number[];
|
|
7
|
-
brands?: string[];
|
|
8
|
-
prices?: {
|
|
9
|
-
min?: number;
|
|
10
|
-
max?: number;
|
|
11
|
-
subscriberPrice?: boolean;
|
|
12
|
-
};
|
|
13
|
-
gender?: ProductGender[];
|
|
14
|
-
rate?: number;
|
|
15
|
-
customOptions?: string[];
|
|
16
|
-
tags?: string[];
|
|
17
|
-
};
|
|
18
|
-
type FetchProductsOptions = {
|
|
19
|
-
page?: number;
|
|
20
|
-
perPage?: number;
|
|
21
|
-
sort?: ProductSort;
|
|
22
|
-
mainGender?: ProductGender;
|
|
23
|
-
};
|
|
24
|
-
type FetchProductsMainParams<T extends Category> = {
|
|
25
|
-
category?: T;
|
|
26
|
-
profile?: string[];
|
|
27
|
-
term?: string;
|
|
28
|
-
};
|
|
29
|
-
type FetchProductsParams<T extends Category> = FetchProductsOptions & ({
|
|
30
|
-
category: FetchProductsMainParams<T>['category'];
|
|
31
|
-
filters?: FetchProductsFilters;
|
|
32
|
-
} | {
|
|
33
|
-
profile: FetchProductsMainParams<T>['profile'];
|
|
34
|
-
filters?: FetchProductsFilters & {
|
|
35
|
-
customOptions?: never;
|
|
36
|
-
tags?: never;
|
|
37
|
-
};
|
|
38
|
-
} | {
|
|
39
|
-
term: FetchProductsMainParams<T>['term'];
|
|
40
|
-
filters?: FetchProductsFilters & {
|
|
41
|
-
customOptions?: never;
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
type FetchProductsResponse = {
|
|
45
|
-
products: {
|
|
46
|
-
data: Product[];
|
|
47
|
-
total: number;
|
|
48
|
-
};
|
|
49
|
-
pages: number;
|
|
50
|
-
prices: {
|
|
51
|
-
price: {
|
|
52
|
-
min: number;
|
|
53
|
-
max: number;
|
|
54
|
-
};
|
|
55
|
-
subscriberPrice: {
|
|
56
|
-
min: number;
|
|
57
|
-
max: number;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
brands?: string[];
|
|
61
|
-
};
|
|
62
|
-
export declare class CatalogService<T extends Category = Category> {
|
|
63
|
-
private readonly productRepository;
|
|
64
|
-
private readonly categoryStructureAdapter;
|
|
65
|
-
private readonly shop;
|
|
66
|
-
private readonly productIndex;
|
|
67
|
-
private productsByTerm;
|
|
68
|
-
constructor(productRepository: ProductRepository, categoryStructureAdapter: CategoryStructureAdapter, shop: Shops, productIndex: ProductsIndex);
|
|
69
|
-
fetchProducts(options: FetchProductsParams<T>): Promise<FetchProductsResponse>;
|
|
70
|
-
private findCatalog;
|
|
71
|
-
private buildMainFilter;
|
|
72
|
-
private findCatalogByTermAndSortByMostRevelant;
|
|
73
|
-
private findCatalogIdsByElasticSearch;
|
|
74
|
-
private buildFilterQuery;
|
|
75
|
-
private buildSortQuery;
|
|
76
|
-
private buildLimitQuery;
|
|
77
|
-
private hasProfile;
|
|
78
|
-
private hasTerm;
|
|
79
|
-
private hasCategory;
|
|
80
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CatalogService<any>, never>;
|
|
81
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CatalogService<any>>;
|
|
82
|
-
}
|
|
83
|
-
export {};
|
|
1
|
+
import { Category, Product, ProductGender, ProductRepository, ProductsIndex, Shops } from '@infrab4a/connect';
|
|
2
|
+
import { CategoryStructureAdapter } from './adapters';
|
|
3
|
+
import { ProductSort } from './types/product-sort.type';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
type FetchProductsFilters = {
|
|
6
|
+
clubDiscount?: number[];
|
|
7
|
+
brands?: string[];
|
|
8
|
+
prices?: {
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
subscriberPrice?: boolean;
|
|
12
|
+
};
|
|
13
|
+
gender?: ProductGender[];
|
|
14
|
+
rate?: number;
|
|
15
|
+
customOptions?: string[];
|
|
16
|
+
tags?: string[];
|
|
17
|
+
};
|
|
18
|
+
type FetchProductsOptions = {
|
|
19
|
+
page?: number;
|
|
20
|
+
perPage?: number;
|
|
21
|
+
sort?: ProductSort;
|
|
22
|
+
mainGender?: ProductGender;
|
|
23
|
+
};
|
|
24
|
+
type FetchProductsMainParams<T extends Category> = {
|
|
25
|
+
category?: T;
|
|
26
|
+
profile?: string[];
|
|
27
|
+
term?: string;
|
|
28
|
+
};
|
|
29
|
+
type FetchProductsParams<T extends Category> = FetchProductsOptions & ({
|
|
30
|
+
category: FetchProductsMainParams<T>['category'];
|
|
31
|
+
filters?: FetchProductsFilters;
|
|
32
|
+
} | {
|
|
33
|
+
profile: FetchProductsMainParams<T>['profile'];
|
|
34
|
+
filters?: FetchProductsFilters & {
|
|
35
|
+
customOptions?: never;
|
|
36
|
+
tags?: never;
|
|
37
|
+
};
|
|
38
|
+
} | {
|
|
39
|
+
term: FetchProductsMainParams<T>['term'];
|
|
40
|
+
filters?: FetchProductsFilters & {
|
|
41
|
+
customOptions?: never;
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
type FetchProductsResponse = {
|
|
45
|
+
products: {
|
|
46
|
+
data: Product[];
|
|
47
|
+
total: number;
|
|
48
|
+
};
|
|
49
|
+
pages: number;
|
|
50
|
+
prices: {
|
|
51
|
+
price: {
|
|
52
|
+
min: number;
|
|
53
|
+
max: number;
|
|
54
|
+
};
|
|
55
|
+
subscriberPrice: {
|
|
56
|
+
min: number;
|
|
57
|
+
max: number;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
brands?: string[];
|
|
61
|
+
};
|
|
62
|
+
export declare class CatalogService<T extends Category = Category> {
|
|
63
|
+
private readonly productRepository;
|
|
64
|
+
private readonly categoryStructureAdapter;
|
|
65
|
+
private readonly shop;
|
|
66
|
+
private readonly productIndex;
|
|
67
|
+
private productsByTerm;
|
|
68
|
+
constructor(productRepository: ProductRepository, categoryStructureAdapter: CategoryStructureAdapter, shop: Shops, productIndex: ProductsIndex);
|
|
69
|
+
fetchProducts(options: FetchProductsParams<T>): Promise<FetchProductsResponse>;
|
|
70
|
+
private findCatalog;
|
|
71
|
+
private buildMainFilter;
|
|
72
|
+
private findCatalogByTermAndSortByMostRevelant;
|
|
73
|
+
private findCatalogIdsByElasticSearch;
|
|
74
|
+
private buildFilterQuery;
|
|
75
|
+
private buildSortQuery;
|
|
76
|
+
private buildLimitQuery;
|
|
77
|
+
private hasProfile;
|
|
78
|
+
private hasTerm;
|
|
79
|
+
private hasCategory;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CatalogService<any>, never>;
|
|
81
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CatalogService<any>>;
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Category, CategoryFilterRepository, CategoryRepository, Filter, ProductGender, ProductRepository, Shops } from '@infrab4a/connect';
|
|
2
|
-
import { CategoryStructureAdapter } from './adapters';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class CategoryService {
|
|
5
|
-
private readonly productRepository;
|
|
6
|
-
private readonly categoryRepository;
|
|
7
|
-
private readonly categoryFilterRepository;
|
|
8
|
-
private readonly categoryStructureAdapter;
|
|
9
|
-
private readonly shop;
|
|
10
|
-
constructor(productRepository: ProductRepository, categoryRepository: CategoryRepository, categoryFilterRepository: CategoryFilterRepository, categoryStructureAdapter: CategoryStructureAdapter, shop: Shops);
|
|
11
|
-
fetchBrands(category: Category, mainGender?: ProductGender): Promise<Category[]>;
|
|
12
|
-
fetchFilterOptions(category: Category): Promise<Filter[]>;
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CategoryService, never>;
|
|
14
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CategoryService>;
|
|
15
|
-
}
|
|
1
|
+
import { Category, CategoryFilterRepository, CategoryRepository, Filter, ProductGender, ProductRepository, Shops } from '@infrab4a/connect';
|
|
2
|
+
import { CategoryStructureAdapter } from './adapters';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CategoryService {
|
|
5
|
+
private readonly productRepository;
|
|
6
|
+
private readonly categoryRepository;
|
|
7
|
+
private readonly categoryFilterRepository;
|
|
8
|
+
private readonly categoryStructureAdapter;
|
|
9
|
+
private readonly shop;
|
|
10
|
+
constructor(productRepository: ProductRepository, categoryRepository: CategoryRepository, categoryFilterRepository: CategoryFilterRepository, categoryStructureAdapter: CategoryStructureAdapter, shop: Shops);
|
|
11
|
+
fetchBrands(category: Category, mainGender?: ProductGender): Promise<Category[]>;
|
|
12
|
+
fetchFilterOptions(category: Category): Promise<Filter[]>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CategoryService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CategoryService>;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './product-sorts.enum';
|
|
1
|
+
export * from './product-sorts.enum';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare enum ProductSorts {
|
|
2
|
-
MOST_RELEVANT = "most-relevant",
|
|
3
|
-
BEST_SELLER = "best-sellers",
|
|
4
|
-
BIGGEST_PRICE = "biggest-price",
|
|
5
|
-
LOWEST_PRICE = "lowest-price",
|
|
6
|
-
BIGGEST_DISCOUNT = "biggest-discount",
|
|
7
|
-
BEST_RATING = "best-rating",
|
|
8
|
-
NEWS = "news"
|
|
9
|
-
}
|
|
1
|
+
export declare enum ProductSorts {
|
|
2
|
+
MOST_RELEVANT = "most-relevant",
|
|
3
|
+
BEST_SELLER = "best-sellers",
|
|
4
|
+
BIGGEST_PRICE = "biggest-price",
|
|
5
|
+
LOWEST_PRICE = "lowest-price",
|
|
6
|
+
BIGGEST_DISCOUNT = "biggest-discount",
|
|
7
|
+
BEST_RATING = "best-rating",
|
|
8
|
+
NEWS = "news"
|
|
9
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './catalog.service';
|
|
2
|
-
export * from './category.service';
|
|
3
|
-
export * from './enums';
|
|
4
|
-
export * from './models';
|
|
5
|
-
export * from './types';
|
|
6
|
-
export * from './wishlist.service';
|
|
1
|
+
export * from './catalog.service';
|
|
2
|
+
export * from './category.service';
|
|
3
|
+
export * from './enums';
|
|
4
|
+
export * from './models';
|
|
5
|
+
export * from './types';
|
|
6
|
+
export * from './wishlist.service';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Category } from '@infrab4a/connect';
|
|
2
|
-
export declare class CategoryWithTree extends Category {
|
|
3
|
-
children?: CategoryWithTree[];
|
|
4
|
-
}
|
|
1
|
+
import { Category } from '@infrab4a/connect';
|
|
2
|
+
export declare class CategoryWithTree extends Category {
|
|
3
|
+
children?: CategoryWithTree[];
|
|
4
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './category-with-tree.model';
|
|
1
|
+
export * from './category-with-tree.model';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './product-sort.type';
|
|
1
|
+
export * from './product-sort.type';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ProductSorts } from '../enums';
|
|
2
|
-
export type ProductSort = `${ProductSorts}`;
|
|
1
|
+
import { ProductSorts } from '../enums';
|
|
2
|
+
export type ProductSort = `${ProductSorts}`;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { CategoryFilterRepository, ProductRepository, ProductsIndex, Shops, Wishlist, WishlistRepository } from '@infrab4a/connect';
|
|
2
|
-
import { CatalogService } from './catalog.service';
|
|
3
|
-
import { CategoryService } from './category.service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class WishlistService {
|
|
6
|
-
private readonly wishlistRepository;
|
|
7
|
-
private readonly shop;
|
|
8
|
-
private catalogService;
|
|
9
|
-
private categoryService;
|
|
10
|
-
constructor(wishlistRepository: WishlistRepository, shop: Shops, productRepository: ProductRepository, categoryFilterRepository: CategoryFilterRepository, productIndex: ProductsIndex);
|
|
11
|
-
getCatalogService(): CatalogService<import("@infrab4a/connect").Category>;
|
|
12
|
-
getCategoryService(): CategoryService;
|
|
13
|
-
create(personId: string, title: string, description: string, userFullName: string, userPhoto?: string): Promise<Wishlist>;
|
|
14
|
-
update(id: string, title: string, description: string, userFullName: string, userPhoto?: string): Promise<Wishlist>;
|
|
15
|
-
delete(wishlistId: string): Promise<void>;
|
|
16
|
-
getWishlistBySlug(slug: string): Promise<Wishlist>;
|
|
17
|
-
getWishlistsByPerson(personId: string): Promise<Wishlist[]>;
|
|
18
|
-
addProduct(wishlistId: string, productId: string): Promise<Wishlist>;
|
|
19
|
-
removeProduct(wishlistId: string, productId: string): Promise<Wishlist>;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<WishlistService, never>;
|
|
21
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<WishlistService>;
|
|
22
|
-
}
|
|
1
|
+
import { CategoryFilterRepository, ProductRepository, ProductsIndex, Shops, Wishlist, WishlistRepository } from '@infrab4a/connect';
|
|
2
|
+
import { CatalogService } from './catalog.service';
|
|
3
|
+
import { CategoryService } from './category.service';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class WishlistService {
|
|
6
|
+
private readonly wishlistRepository;
|
|
7
|
+
private readonly shop;
|
|
8
|
+
private catalogService;
|
|
9
|
+
private categoryService;
|
|
10
|
+
constructor(wishlistRepository: WishlistRepository, shop: Shops, productRepository: ProductRepository, categoryFilterRepository: CategoryFilterRepository, productIndex: ProductsIndex);
|
|
11
|
+
getCatalogService(): CatalogService<import("@infrab4a/connect").Category>;
|
|
12
|
+
getCategoryService(): CategoryService;
|
|
13
|
+
create(personId: string, title: string, description: string, userFullName: string, userPhoto?: string): Promise<Wishlist>;
|
|
14
|
+
update(id: string, title: string, description: string, userFullName: string, userPhoto?: string): Promise<Wishlist>;
|
|
15
|
+
delete(wishlistId: string): Promise<void>;
|
|
16
|
+
getWishlistBySlug(slug: string): Promise<Wishlist>;
|
|
17
|
+
getWishlistsByPerson(personId: string): Promise<Wishlist[]>;
|
|
18
|
+
addProduct(wishlistId: string, productId: string): Promise<Wishlist>;
|
|
19
|
+
removeProduct(wishlistId: string, productId: string): Promise<Wishlist>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WishlistService, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WishlistService>;
|
|
22
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { CheckoutSubscription, CheckoutSubscriptionRepository, Coupon, SubscriptionRepository } from '@infrab4a/connect';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { RequiredCheckoutSubscriptionData } from './types';
|
|
4
|
-
import { CouponService } from './coupon.service';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class CheckoutSubscriptionService {
|
|
7
|
-
private readonly checkoutSubscriptionRepository;
|
|
8
|
-
private readonly subscriptionRepository;
|
|
9
|
-
private readonly couponService;
|
|
10
|
-
constructor(checkoutSubscriptionRepository: CheckoutSubscriptionRepository, subscriptionRepository: SubscriptionRepository, couponService: CouponService);
|
|
11
|
-
getCheckoutSubscription(checkoutData?: RequiredCheckoutSubscriptionData): Observable<CheckoutSubscription>;
|
|
12
|
-
private createCheckoutSubscription;
|
|
13
|
-
clearCheckoutSubscriptionFromSession(): Observable<void>;
|
|
14
|
-
checkCoupon(nickname: string, userEmail: string): Observable<Coupon>;
|
|
15
|
-
calcDiscountSubscription(coupon: Coupon): Observable<number>;
|
|
16
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutSubscriptionService, never>;
|
|
17
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutSubscriptionService>;
|
|
18
|
-
}
|
|
1
|
+
import { CheckoutSubscription, CheckoutSubscriptionRepository, Coupon, SubscriptionRepository } from '@infrab4a/connect';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { RequiredCheckoutSubscriptionData } from './types';
|
|
4
|
+
import { CouponService } from './coupon.service';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CheckoutSubscriptionService {
|
|
7
|
+
private readonly checkoutSubscriptionRepository;
|
|
8
|
+
private readonly subscriptionRepository;
|
|
9
|
+
private readonly couponService;
|
|
10
|
+
constructor(checkoutSubscriptionRepository: CheckoutSubscriptionRepository, subscriptionRepository: SubscriptionRepository, couponService: CouponService);
|
|
11
|
+
getCheckoutSubscription(checkoutData?: RequiredCheckoutSubscriptionData): Observable<CheckoutSubscription>;
|
|
12
|
+
private createCheckoutSubscription;
|
|
13
|
+
clearCheckoutSubscriptionFromSession(): Observable<void>;
|
|
14
|
+
checkCoupon(nickname: string, userEmail: string): Observable<Coupon>;
|
|
15
|
+
calcDiscountSubscription(coupon: Coupon): Observable<number>;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutSubscriptionService, never>;
|
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutSubscriptionService>;
|
|
18
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { Checkout, CheckoutRepository, CheckoutTypes, Coupon, OrderRepository, Shops, User, UserRepository } from '@infrab4a/connect';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { CouponService } from './coupon.service';
|
|
4
|
-
import { RequiredCheckoutData } from './types';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class CheckoutService {
|
|
7
|
-
private readonly couponService;
|
|
8
|
-
private readonly checkoutRepository;
|
|
9
|
-
private readonly orderRepository;
|
|
10
|
-
private readonly userRepository;
|
|
11
|
-
private readonly defaultShop;
|
|
12
|
-
constructor(couponService: CouponService, checkoutRepository: CheckoutRepository, orderRepository: OrderRepository, userRepository: UserRepository, defaultShop: Shops);
|
|
13
|
-
getCheckout(checkoutData?: RequiredCheckoutData): Observable<Checkout>;
|
|
14
|
-
getUserByCheckout(checkoutId: string): Observable<User>;
|
|
15
|
-
updateCheckoutLineItems(checkout: Partial<Checkout>): Observable<Checkout>;
|
|
16
|
-
updateCheckoutUser(checkout: Partial<Checkout>): Observable<Checkout>;
|
|
17
|
-
clearCheckoutFromSession(): Observable<void>;
|
|
18
|
-
calcDiscount(coupon: Coupon): Observable<number>;
|
|
19
|
-
checkCoupon(nickname: string, checkoutType: CheckoutTypes): Observable<Coupon>;
|
|
20
|
-
private createCheckout;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutService, never>;
|
|
22
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutService>;
|
|
23
|
-
}
|
|
1
|
+
import { Checkout, CheckoutRepository, CheckoutTypes, Coupon, OrderRepository, Shops, User, UserRepository } from '@infrab4a/connect';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { CouponService } from './coupon.service';
|
|
4
|
+
import { RequiredCheckoutData } from './types';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class CheckoutService {
|
|
7
|
+
private readonly couponService;
|
|
8
|
+
private readonly checkoutRepository;
|
|
9
|
+
private readonly orderRepository;
|
|
10
|
+
private readonly userRepository;
|
|
11
|
+
private readonly defaultShop;
|
|
12
|
+
constructor(couponService: CouponService, checkoutRepository: CheckoutRepository, orderRepository: OrderRepository, userRepository: UserRepository, defaultShop: Shops);
|
|
13
|
+
getCheckout(checkoutData?: RequiredCheckoutData): Observable<Checkout>;
|
|
14
|
+
getUserByCheckout(checkoutId: string): Observable<User>;
|
|
15
|
+
updateCheckoutLineItems(checkout: Partial<Checkout>): Observable<Checkout>;
|
|
16
|
+
updateCheckoutUser(checkout: Partial<Checkout>): Observable<Checkout>;
|
|
17
|
+
clearCheckoutFromSession(): Observable<void>;
|
|
18
|
+
calcDiscount(coupon: Coupon): Observable<number>;
|
|
19
|
+
checkCoupon(nickname: string, checkoutType: CheckoutTypes): Observable<Coupon>;
|
|
20
|
+
private createCheckout;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutService, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutService>;
|
|
23
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { CategoryRepository, Checkout, CheckoutSubscription, CheckoutTypes, Coupon, CouponRepository, OrderRepository, Shops } from '@infrab4a/connect';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class CouponService {
|
|
5
|
-
private readonly couponRepository;
|
|
6
|
-
private readonly defaultShop;
|
|
7
|
-
private readonly orderRepository;
|
|
8
|
-
private readonly categoryRepository;
|
|
9
|
-
constructor(couponRepository: CouponRepository, defaultShop: Shops, orderRepository: OrderRepository, categoryRepository: CategoryRepository);
|
|
10
|
-
checkCoupon(nickname: string, checkoutType: CheckoutTypes, checkout: Partial<Checkout>, plan: string): Observable<Coupon>;
|
|
11
|
-
private couponValidation;
|
|
12
|
-
private couponRulesValidation;
|
|
13
|
-
calcDiscountSubscription(coupon: Coupon, checkout: Partial<CheckoutSubscription>): Observable<number>;
|
|
14
|
-
calcDiscountShopping(coupon: Coupon, checkout: Partial<Checkout>): Promise<number>;
|
|
15
|
-
private calcDiscountByType;
|
|
16
|
-
private hasMinSubTotal;
|
|
17
|
-
private hasProductCategories;
|
|
18
|
-
private coupomUserValidation;
|
|
19
|
-
private getCouponCategoriesId;
|
|
20
|
-
private emailIsFromCollaborator;
|
|
21
|
-
private getLineItensEligebleForDiscount;
|
|
22
|
-
private calcCheckoutSubtotal;
|
|
23
|
-
private getOrdersWithCoupon;
|
|
24
|
-
private countOrdersWithUser;
|
|
25
|
-
private getCouponUseLimits;
|
|
26
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
|
|
27
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
|
|
28
|
-
}
|
|
1
|
+
import { CategoryRepository, Checkout, CheckoutSubscription, CheckoutTypes, Coupon, CouponRepository, OrderRepository, Shops } from '@infrab4a/connect';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CouponService {
|
|
5
|
+
private readonly couponRepository;
|
|
6
|
+
private readonly defaultShop;
|
|
7
|
+
private readonly orderRepository;
|
|
8
|
+
private readonly categoryRepository;
|
|
9
|
+
constructor(couponRepository: CouponRepository, defaultShop: Shops, orderRepository: OrderRepository, categoryRepository: CategoryRepository);
|
|
10
|
+
checkCoupon(nickname: string, checkoutType: CheckoutTypes, checkout: Partial<Checkout>, plan: string): Observable<Coupon>;
|
|
11
|
+
private couponValidation;
|
|
12
|
+
private couponRulesValidation;
|
|
13
|
+
calcDiscountSubscription(coupon: Coupon, checkout: Partial<CheckoutSubscription>): Observable<number>;
|
|
14
|
+
calcDiscountShopping(coupon: Coupon, checkout: Partial<Checkout>): Promise<number>;
|
|
15
|
+
private calcDiscountByType;
|
|
16
|
+
private hasMinSubTotal;
|
|
17
|
+
private hasProductCategories;
|
|
18
|
+
private coupomUserValidation;
|
|
19
|
+
private getCouponCategoriesId;
|
|
20
|
+
private emailIsFromCollaborator;
|
|
21
|
+
private getLineItensEligebleForDiscount;
|
|
22
|
+
private calcCheckoutSubtotal;
|
|
23
|
+
private getOrdersWithCoupon;
|
|
24
|
+
private countOrdersWithUser;
|
|
25
|
+
private getCouponUseLimits;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
|
|
27
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
|
|
28
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './util.helper';
|
|
1
|
+
export * from './util.helper';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare class UtilHelper {
|
|
2
|
-
static createSlug(name: string): string;
|
|
3
|
-
}
|
|
1
|
+
export declare class UtilHelper {
|
|
2
|
+
static createSlug(name: string): string;
|
|
3
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { Banner, CategoryRepository, Home, HomeRepository, ProductRepository, Shops } from '@infrab4a/connect';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
type BannerType = 'brand' | 'buyToWin' | 'block' | 'blog';
|
|
5
|
-
export declare class HomeShopService {
|
|
6
|
-
private readonly categoryRepository;
|
|
7
|
-
private readonly homeRepository;
|
|
8
|
-
private readonly productRepository;
|
|
9
|
-
private readonly defaultShop;
|
|
10
|
-
private homeConfiguration;
|
|
11
|
-
private get homeId();
|
|
12
|
-
constructor(categoryRepository: CategoryRepository, homeRepository: HomeRepository, productRepository: ProductRepository, defaultShop: Shops);
|
|
13
|
-
getHomeData(): Observable<Home>;
|
|
14
|
-
getBanners(type: BannerType): Observable<Banner[]>;
|
|
15
|
-
getMinValueForFreeShipping(): Observable<number>;
|
|
16
|
-
private getDiscoverProducts;
|
|
17
|
-
private getFeaturedProducts;
|
|
18
|
-
private getVerticalProducts;
|
|
19
|
-
private getHomeConfiguration;
|
|
20
|
-
private saveHomeData;
|
|
21
|
-
private buildCategoryGroupWithRequiredData;
|
|
22
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HomeShopService, never>;
|
|
23
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<HomeShopService>;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
|
1
|
+
import { Banner, CategoryRepository, Home, HomeRepository, ProductRepository, Shops } from '@infrab4a/connect';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
type BannerType = 'brand' | 'buyToWin' | 'block' | 'blog';
|
|
5
|
+
export declare class HomeShopService {
|
|
6
|
+
private readonly categoryRepository;
|
|
7
|
+
private readonly homeRepository;
|
|
8
|
+
private readonly productRepository;
|
|
9
|
+
private readonly defaultShop;
|
|
10
|
+
private homeConfiguration;
|
|
11
|
+
private get homeId();
|
|
12
|
+
constructor(categoryRepository: CategoryRepository, homeRepository: HomeRepository, productRepository: ProductRepository, defaultShop: Shops);
|
|
13
|
+
getHomeData(): Observable<Home>;
|
|
14
|
+
getBanners(type: BannerType): Observable<Banner[]>;
|
|
15
|
+
getMinValueForFreeShipping(): Observable<number>;
|
|
16
|
+
private getDiscoverProducts;
|
|
17
|
+
private getFeaturedProducts;
|
|
18
|
+
private getVerticalProducts;
|
|
19
|
+
private getHomeConfiguration;
|
|
20
|
+
private saveHomeData;
|
|
21
|
+
private buildCategoryGroupWithRequiredData;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HomeShopService, never>;
|
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HomeShopService>;
|
|
24
|
+
}
|
|
25
|
+
export {};
|
package/services/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from './auth.service';
|
|
2
|
-
export * from './cart.service';
|
|
3
|
-
export * from './catalog';
|
|
4
|
-
export * from './checkout-subscription.service';
|
|
5
|
-
export * from './checkout.service';
|
|
6
|
-
export * from './coupon.service';
|
|
7
|
-
export * from './helpers';
|
|
8
|
-
export * from './home-shop.service';
|
|
9
|
-
export * from './order.service';
|
|
10
|
-
export * from './shipping.service';
|
|
1
|
+
export * from './auth.service';
|
|
2
|
+
export * from './cart.service';
|
|
3
|
+
export * from './catalog';
|
|
4
|
+
export * from './checkout-subscription.service';
|
|
5
|
+
export * from './checkout.service';
|
|
6
|
+
export * from './coupon.service';
|
|
7
|
+
export * from './helpers';
|
|
8
|
+
export * from './home-shop.service';
|
|
9
|
+
export * from './order.service';
|
|
10
|
+
export * from './shipping.service';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Firestore } from '@angular/fire/firestore';
|
|
2
|
-
import { Order, OrderFirestoreRepository } from '@infrab4a/connect';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class OrderService {
|
|
6
|
-
private readonly angularFirestore;
|
|
7
|
-
private readonly orderRepository;
|
|
8
|
-
orderSubject: Subject<Order>;
|
|
9
|
-
constructor(angularFirestore: Firestore, orderRepository: OrderFirestoreRepository);
|
|
10
|
-
getOrder(id: string): Subject<Order>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OrderService, never>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OrderService>;
|
|
13
|
-
}
|
|
1
|
+
import { Firestore } from '@angular/fire/firestore';
|
|
2
|
+
import { Order, OrderFirestoreRepository } from '@infrab4a/connect';
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class OrderService {
|
|
6
|
+
private readonly angularFirestore;
|
|
7
|
+
private readonly orderRepository;
|
|
8
|
+
orderSubject: Subject<Order>;
|
|
9
|
+
constructor(angularFirestore: Firestore, orderRepository: OrderFirestoreRepository);
|
|
10
|
+
getOrder(id: string): Subject<Order>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrderService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OrderService>;
|
|
13
|
+
}
|