@infrab4a/connect-angular 0.14.2-beta.12 → 0.14.2-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 +15 -15
- package/angular-elastic-search.module.d.ts +9 -9
- package/angular-firebase-auth.module.d.ts +10 -10
- package/angular-firestore.module.d.ts +15 -15
- package/bundles/infrab4a-connect-angular.umd.js +1397 -1418
- package/bundles/infrab4a-connect-angular.umd.js.map +1 -1
- package/consts/default-shop.const.d.ts +1 -1
- package/consts/es-config.const.d.ts +1 -1
- package/consts/index.d.ts +2 -2
- package/esm2015/angular-connect.module.js +47 -47
- package/esm2015/angular-elastic-search.module.js +38 -38
- package/esm2015/angular-firebase-auth.module.js +113 -113
- package/esm2015/angular-firestore.module.js +340 -340
- package/esm2015/consts/default-shop.const.js +2 -2
- package/esm2015/consts/es-config.const.js +2 -2
- package/esm2015/consts/index.js +3 -3
- package/esm2015/index.js +5 -5
- package/esm2015/infrab4a-connect-angular.js +4 -4
- package/esm2015/services/auth.service.js +42 -42
- package/esm2015/services/cart.service.js +150 -167
- package/esm2015/services/checkout-subscription.service.js +44 -68
- package/esm2015/services/checkout.service.js +68 -79
- package/esm2015/services/coupon.service.js +98 -70
- package/esm2015/services/errors/group-invalid-coupon.error.js +7 -7
- package/esm2015/services/errors/index.js +3 -3
- package/esm2015/services/errors/invalid-coupon.error.js +7 -7
- package/esm2015/services/home-shop.service.js +108 -108
- package/esm2015/services/index.js +8 -8
- package/esm2015/services/order.service.js +32 -32
- package/esm2015/services/types/index.js +3 -3
- package/esm2015/services/types/required-checkout-data.type.js +2 -2
- package/esm2015/services/types/required-checkout-subscription-data.type.js +2 -2
- package/fesm2015/infrab4a-connect-angular.js +988 -1011
- package/fesm2015/infrab4a-connect-angular.js.map +1 -1
- package/index.d.ts +4 -4
- package/infrab4a-connect-angular.d.ts +5 -5
- package/package.json +2 -2
- package/services/auth.service.d.ts +19 -19
- package/services/cart.service.d.ts +35 -41
- package/services/checkout-subscription.service.d.ts +16 -18
- package/services/checkout.service.d.ts +23 -22
- package/services/coupon.service.d.ts +17 -14
- package/services/errors/group-invalid-coupon.error.d.ts +5 -5
- package/services/errors/index.d.ts +2 -2
- package/services/errors/invalid-coupon.error.d.ts +4 -4
- package/services/home-shop.service.d.ts +24 -24
- package/services/index.d.ts +7 -7
- package/services/order.service.d.ts +13 -13
- 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
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { CheckoutTypes, CouponRepository,
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
private
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import { 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
|
+
constructor(couponRepository: CouponRepository, defaultShop: Shops, orderRepository: OrderRepository);
|
|
9
|
+
checkCoupon(nickname: string, userEmail: string, checkoutType: CheckoutTypes, plan?: string): Observable<Coupon>;
|
|
10
|
+
private isValidCoupon;
|
|
11
|
+
private emailIsFromCollaborator;
|
|
12
|
+
private separateValidCoupons;
|
|
13
|
+
private checkCouponRules;
|
|
14
|
+
private checkCouponUseLimit;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
|
|
17
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InvalidCouponError } from './invalid-coupon.error';
|
|
2
|
-
export declare class GroupInvalidCouponError extends Error {
|
|
3
|
-
readonly errors: InvalidCouponError[];
|
|
4
|
-
constructor(errors: InvalidCouponError[]);
|
|
5
|
-
}
|
|
1
|
+
import { InvalidCouponError } from './invalid-coupon.error';
|
|
2
|
+
export declare class GroupInvalidCouponError extends Error {
|
|
3
|
+
readonly errors: InvalidCouponError[];
|
|
4
|
+
constructor(errors: InvalidCouponError[]);
|
|
5
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './invalid-coupon.error';
|
|
2
|
-
export * from './group-invalid-coupon.error';
|
|
1
|
+
export * from './invalid-coupon.error';
|
|
2
|
+
export * from './group-invalid-coupon.error';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare class InvalidCouponError extends Error {
|
|
2
|
-
readonly message: any;
|
|
3
|
-
constructor(message: any);
|
|
4
|
-
}
|
|
1
|
+
export declare class InvalidCouponError extends Error {
|
|
2
|
+
readonly message: any;
|
|
3
|
+
constructor(message: any);
|
|
4
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { Banner, CategoryRepository, Home, HomeRepository, ProductRepository, Shops } from '@infrab4a/connect';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
declare 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
|
-
private getDiscoverProducts;
|
|
16
|
-
private getFeaturedProducts;
|
|
17
|
-
private getVerticalProducts;
|
|
18
|
-
private getHomeConfiguration;
|
|
19
|
-
private saveHomeData;
|
|
20
|
-
private buildCategoryGroupWithRequiredData;
|
|
21
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HomeShopService, never>;
|
|
22
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<HomeShopService>;
|
|
23
|
-
}
|
|
24
|
-
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
|
+
declare 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
|
+
private getDiscoverProducts;
|
|
16
|
+
private getFeaturedProducts;
|
|
17
|
+
private getVerticalProducts;
|
|
18
|
+
private getHomeConfiguration;
|
|
19
|
+
private saveHomeData;
|
|
20
|
+
private buildCategoryGroupWithRequiredData;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HomeShopService, never>;
|
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<HomeShopService>;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
package/services/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './auth.service';
|
|
2
|
-
export * from './cart.service';
|
|
3
|
-
export * from './checkout.service';
|
|
4
|
-
export * from './checkout-subscription.service';
|
|
5
|
-
export * from './order.service';
|
|
6
|
-
export * from './coupon.service';
|
|
7
|
-
export * from './home-shop.service';
|
|
1
|
+
export * from './auth.service';
|
|
2
|
+
export * from './cart.service';
|
|
3
|
+
export * from './checkout.service';
|
|
4
|
+
export * from './checkout-subscription.service';
|
|
5
|
+
export * from './order.service';
|
|
6
|
+
export * from './coupon.service';
|
|
7
|
+
export * from './home-shop.service';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { AngularFirestore } 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: AngularFirestore, orderRepository: OrderFirestoreRepository);
|
|
10
|
-
getOrder(id: string): Subject<Order>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<OrderService, never>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<OrderService>;
|
|
13
|
-
}
|
|
1
|
+
import { AngularFirestore } 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: AngularFirestore, orderRepository: OrderFirestoreRepository);
|
|
10
|
+
getOrder(id: string): Subject<Order>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrderService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OrderService>;
|
|
13
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './required-checkout-data.type';
|
|
2
|
-
export * from './required-checkout-subscription-data.type';
|
|
1
|
+
export * from './required-checkout-data.type';
|
|
2
|
+
export * from './required-checkout-subscription-data.type';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Checkout } from '@infrab4a/connect';
|
|
2
|
-
export declare type RequiredCheckoutData = Partial<Pick<Checkout, 'id' | 'user' | 'shop' | 'lineItems'>>;
|
|
1
|
+
import { Checkout } from '@infrab4a/connect';
|
|
2
|
+
export declare type RequiredCheckoutData = Partial<Pick<Checkout, 'id' | 'user' | 'shop' | 'lineItems'>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CheckoutSubscription } from '@infrab4a/connect';
|
|
2
|
-
export declare type RequiredCheckoutSubscriptionData = Partial<Pick<CheckoutSubscription, 'id'>>;
|
|
1
|
+
import { CheckoutSubscription } from '@infrab4a/connect';
|
|
2
|
+
export declare type RequiredCheckoutSubscriptionData = Partial<Pick<CheckoutSubscription, 'id'>>;
|