@infrab4a/connect-angular 4.17.3-beta.9 → 4.18.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.3-beta.9",
3
+ "version": "4.18.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.1-beta.2",
15
+ "@infrab4a/connect": "4.22.1",
16
16
  "js-cookie": "^3.0.1",
17
17
  "rxjs": "^6.6.7"
18
18
  },
@@ -1,6 +1,6 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { FirebaseOptions } from '@angular/fire/app';
3
- import { Buy2WinFirestoreRepository, CategoryRepository, LineItem, ProductRepository, Shops, User, VariantRepository } from '@infrab4a/connect';
3
+ import { LineItem, Shops, User } from '@infrab4a/connect';
4
4
  import { Observable } from 'rxjs';
5
5
  import { AuthService } from './auth.service';
6
6
  import { CheckoutService } from './checkout.service';
@@ -14,15 +14,10 @@ export declare class CartService {
14
14
  private readonly checkoutService;
15
15
  private readonly defaultShop;
16
16
  private readonly firebaseOptions;
17
- private readonly productRepository;
18
- private readonly categoryRepository;
19
- private readonly variantRepository;
20
- private readonly buy2WinRepository;
21
17
  private http;
22
18
  private cartSubject;
23
- private user;
24
19
  private checkoutUrl;
25
- constructor(authService: AuthService, checkoutService: CheckoutService, defaultShop: Shops, firebaseOptions: FirebaseOptions, productRepository: ProductRepository, categoryRepository: CategoryRepository, variantRepository: VariantRepository, buy2WinRepository: Buy2WinFirestoreRepository, http: HttpClient);
20
+ constructor(authService: AuthService, checkoutService: CheckoutService, defaultShop: Shops, firebaseOptions: FirebaseOptions, http: HttpClient);
26
21
  addItem(item: LineItem, quantity?: number): Observable<Cart>;
27
22
  decreaseItem(item: LineItem): Observable<Cart>;
28
23
  removeItem(item: LineItem): Observable<Cart>;
@@ -30,7 +25,6 @@ export declare class CartService {
30
25
  getCart(checkout?: RequiredCheckoutData): Observable<Cart>;
31
26
  clearCart(): Observable<Cart>;
32
27
  private buildCartFromCheckout;
33
- private updateLineItemInCart;
34
28
  private generateCartObject;
35
29
  static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
36
30
  static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
@@ -1,33 +1,33 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
- import { Checkout, CheckoutRepository, CheckoutTypes, Coupon, ShippingMethodResponse, ShippingProductRequest, Shops, User, UserRepository } from '@infrab4a/connect';
2
+ import { FirebaseOptions } from '@angular/fire/app';
3
+ import { Checkout, CheckoutPayloadRequest, CheckoutRepository, CheckoutResponse, CheckoutStockValidation, CheckoutTypes, Coupon, ShippingMethodResponse, ShippingProductRequest, Shops, User, UserAddress, UserRepository } from '@infrab4a/connect';
3
4
  import { Observable } from 'rxjs';
4
5
  import { DataPersistence } from '../persistence';
5
- import { CouponService } from './coupon.service';
6
6
  import { RequiredCheckoutData } from './types';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class CheckoutService {
9
- private readonly couponService;
10
9
  private readonly checkoutRepository;
11
10
  private readonly userRepository;
12
11
  private readonly defaultShop;
13
12
  private readonly dataPersistence;
13
+ private readonly firebaseOptions;
14
14
  private http;
15
15
  private checkoutUrl;
16
- constructor(couponService: CouponService, checkoutRepository: CheckoutRepository, userRepository: UserRepository, defaultShop: Shops, dataPersistence: DataPersistence, http: HttpClient);
16
+ constructor(checkoutRepository: CheckoutRepository, userRepository: UserRepository, defaultShop: Shops, dataPersistence: DataPersistence, firebaseOptions: FirebaseOptions, http: HttpClient);
17
17
  getCheckout(checkoutData?: RequiredCheckoutData): Observable<Checkout>;
18
18
  getUserByCheckout(checkoutId: string): Observable<User>;
19
19
  updateCheckoutLineItems(checkout: Partial<Checkout>): Observable<Checkout>;
20
20
  updateCheckoutUser(checkout: Partial<Checkout>): Observable<Checkout>;
21
21
  clearCheckoutFromSession(): Observable<void>;
22
- checkCoupon(nickname: string, checkoutType: CheckoutTypes): Observable<Coupon>;
23
- validateStockProducts(): Observable<{
24
- valid: boolean;
25
- outOfStock: string[];
26
- limitedStock: string[];
27
- }>;
22
+ resetCheckoutValues(): Observable<Checkout>;
23
+ applyCouponDiscount(nickname: string, checkoutType: CheckoutTypes): Observable<Coupon>;
24
+ removeCouponDiscount(): Observable<Checkout>;
25
+ validateStockProducts(): Observable<CheckoutStockValidation>;
26
+ selectShippingAddress(address: UserAddress): Observable<Checkout>;
28
27
  getAvailableShippingForProduct(productShipping: ShippingProductRequest): Observable<ShippingMethodResponse[]>;
29
28
  getAvailableShippingForCheckout(): Observable<ShippingMethodResponse[]>;
30
29
  selectShipping(option: string): Observable<Checkout>;
30
+ createOrder(checkoutPayload: CheckoutPayloadRequest, paymentProvider: string, applicationVersion: string): Observable<CheckoutResponse>;
31
31
  private createCheckout;
32
32
  static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutService, never>;
33
33
  static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutService>;
@@ -1,4 +1,4 @@
1
- import { CategoryRepository, Checkout, CheckoutSubscription, CheckoutTypes, Coupon, CouponRepository, LineItem, OrderRepository, Shops } from '@infrab4a/connect';
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 {
@@ -11,11 +11,6 @@ export declare class CouponService {
11
11
  private couponValidation;
12
12
  private couponRulesValidation;
13
13
  calcDiscountSubscription(coupon: Coupon, checkout: Partial<CheckoutSubscription>): Observable<number>;
14
- calcDiscountShopping(coupon: Coupon, checkout: Partial<Checkout>): Promise<{
15
- discount: number;
16
- lineItems: LineItem[];
17
- }>;
18
- private calcDiscountByType;
19
14
  private hasMinSubTotal;
20
15
  private hasProductCategories;
21
16
  private coupomUserValidation;
@@ -27,7 +22,6 @@ export declare class CouponService {
27
22
  private getOrdersFromUser;
28
23
  private countOrdersWithUser;
29
24
  private getCouponUseLimits;
30
- private calcLineItenDiscount;
31
25
  static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
32
26
  static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
33
27
  }