@infrab4a/connect-angular 4.17.1 → 4.17.3-beta.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect-angular",
3
- "version": "4.17.1",
3
+ "version": "4.17.3-beta.0",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -12,7 +12,7 @@
12
12
  "@angular/common": "^15.1.4",
13
13
  "@angular/core": "^15.1.4",
14
14
  "@angular/fire": "7.5.0",
15
- "@infrab4a/connect": "4.22.0",
15
+ "@infrab4a/connect": "4.22.1-beta.0",
16
16
  "js-cookie": "^3.0.1",
17
17
  "rxjs": "^6.6.7"
18
18
  },
@@ -1,3 +1,5 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { FirebaseOptions } from '@angular/fire/app';
1
3
  import { Buy2WinFirestoreRepository, CategoryRepository, LineItem, ProductRepository, Shops, User, VariantRepository } from '@infrab4a/connect';
2
4
  import { Observable } from 'rxjs';
3
5
  import { AuthService } from './auth.service';
@@ -11,22 +13,25 @@ export declare class CartService {
11
13
  private readonly authService;
12
14
  private readonly checkoutService;
13
15
  private readonly defaultShop;
16
+ private readonly firebaseOptions;
14
17
  private readonly productRepository;
15
18
  private readonly categoryRepository;
16
19
  private readonly variantRepository;
17
20
  private readonly buy2WinRepository;
21
+ private http;
18
22
  private cartSubject;
19
23
  private user;
20
- constructor(authService: AuthService, checkoutService: CheckoutService, defaultShop: Shops, productRepository: ProductRepository, categoryRepository: CategoryRepository, variantRepository: VariantRepository, buy2WinRepository: Buy2WinFirestoreRepository);
21
- addItem(item: LineItem, quantity?: number): Observable<Cart>;
22
- decreaseItem(item: LineItem): Observable<Cart>;
24
+ private checkoutUrl;
25
+ constructor(authService: AuthService, checkoutService: CheckoutService, defaultShop: Shops, firebaseOptions: FirebaseOptions, productRepository: ProductRepository, categoryRepository: CategoryRepository, variantRepository: VariantRepository, buy2WinRepository: Buy2WinFirestoreRepository, http: HttpClient);
26
+ addItem(item: LineItem, quantity?: number): Promise<Observable<Cart>>;
27
+ decreaseItem(item: LineItem): Promise<Observable<Cart>>;
28
+ removeItem(item: LineItem): Observable<Cart>;
29
+ updateUserCart(user: User): Observable<Cart>;
23
30
  getCart(checkout?: RequiredCheckoutData): Observable<Cart>;
24
31
  /**
25
32
  * @deprecated The method should not be used
26
33
  */
27
34
  getVariantPriceDiscount(item: LineItem): Observable<number>;
28
- removeItem(item: LineItem): Observable<Cart>;
29
- updateUserCart(user: User): Observable<Cart>;
30
35
  clearCart(): Observable<Cart>;
31
36
  private buildCartFromCheckout;
32
37
  private updateLineItemInCart;