@infrab4a/connect-angular 4.0.0-beta.11 → 4.0.0-beta.13
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-firestore.module.d.ts +1 -2
- package/esm2020/angular-connect.module.mjs +1 -1
- package/esm2020/angular-firestore.module.mjs +58 -18
- package/esm2020/angular-hasura-graphql.module.mjs +74 -8
- package/esm2020/services/cart.service.mjs +130 -22
- package/esm2020/services/checkout-subscription.service.mjs +5 -3
- package/esm2020/services/checkout.service.mjs +2 -2
- package/esm2020/services/coupon.service.mjs +20 -37
- package/esm2020/services/shipping.service.mjs +3 -4
- package/fesm2015/infrab4a-connect-angular.mjs +294 -99
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +292 -93
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +2 -3
- package/services/cart.service.d.ts +7 -2
- package/services/coupon.service.d.ts +2 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LineItem, ProductRepository, Shops, User } from '@infrab4a/connect';
|
|
1
|
+
import { Buy2WinFirestoreRepository, LineItem, ProductRepository, Shops, User, VariantRepository } from '@infrab4a/connect';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { AuthService } from './auth.service';
|
|
4
4
|
import { CheckoutService } from './checkout.service';
|
|
@@ -12,8 +12,10 @@ export declare class CartService {
|
|
|
12
12
|
private readonly checkoutService;
|
|
13
13
|
private readonly defaultShop;
|
|
14
14
|
private readonly productRepository;
|
|
15
|
+
private readonly variantRepository;
|
|
16
|
+
private readonly buy2WinRepository;
|
|
15
17
|
private cartSubject;
|
|
16
|
-
constructor(authService: AuthService, checkoutService: CheckoutService, defaultShop: Shops, productRepository: ProductRepository);
|
|
18
|
+
constructor(authService: AuthService, checkoutService: CheckoutService, defaultShop: Shops, productRepository: ProductRepository, variantRepository: VariantRepository, buy2WinRepository: Buy2WinFirestoreRepository);
|
|
17
19
|
addItem(item: LineItem, quantity?: number): Observable<Cart>;
|
|
18
20
|
decreaseItem(item: LineItem): Observable<Cart>;
|
|
19
21
|
getCart(checkout?: RequiredCheckoutData): Observable<Cart>;
|
|
@@ -28,8 +30,11 @@ export declare class CartService {
|
|
|
28
30
|
private updateLineItemInCart;
|
|
29
31
|
private generateCartObject;
|
|
30
32
|
private buildLineItem;
|
|
33
|
+
private getProductData;
|
|
31
34
|
private getProductPrice;
|
|
32
35
|
private checkMaxStock;
|
|
36
|
+
getGifts(): Observable<Cart>;
|
|
37
|
+
private giftToLineItems;
|
|
33
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
|
|
34
39
|
static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
|
|
35
40
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { CategoryRepository, Checkout, CheckoutSubscription, CheckoutTypes, Coupon, CouponRepository, OrderRepository, Shops
|
|
1
|
+
import { CategoryRepository, Checkout, CheckoutSubscription, CheckoutTypes, Coupon, CouponRepository, OrderRepository, Shops } from '@infrab4a/connect';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class CouponService {
|
|
5
5
|
private readonly couponRepository;
|
|
6
6
|
private readonly defaultShop;
|
|
7
7
|
private readonly orderRepository;
|
|
8
|
-
private readonly subscriptionRepository;
|
|
9
8
|
private readonly categoryRepository;
|
|
10
|
-
constructor(couponRepository: CouponRepository, defaultShop: Shops, orderRepository: OrderRepository,
|
|
9
|
+
constructor(couponRepository: CouponRepository, defaultShop: Shops, orderRepository: OrderRepository, categoryRepository: CategoryRepository);
|
|
11
10
|
checkCoupon(nickname: string, userEmail: string, checkoutType: CheckoutTypes, plan?: string, checkout?: Partial<Checkout>, isSubscription?: boolean): Observable<Coupon>;
|
|
12
11
|
private emailIsFromCollaborator;
|
|
13
12
|
private checkCouponRules;
|