@infrab4a/connect-angular 3.9.7 → 3.10.0-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/angular-connect.module.d.ts +19 -19
- 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/angular-hasura-graphql.module.d.ts +16 -16
- package/bundles/infrab4a-connect-angular.umd.js +2123 -2214
- package/bundles/infrab4a-connect-angular.umd.js.map +1 -1
- package/consts/backend-url.const.d.ts +1 -1
- package/consts/default-shop.const.d.ts +1 -1
- package/consts/es-config.const.d.ts +1 -1
- package/consts/hasura-options.const.d.ts +1 -1
- package/consts/index.d.ts +4 -4
- package/esm2015/angular-connect.module.js +52 -52
- package/esm2015/angular-elastic-search.module.js +34 -34
- package/esm2015/angular-firebase-auth.module.js +113 -113
- package/esm2015/angular-firestore.module.js +394 -394
- package/esm2015/angular-hasura-graphql.module.js +156 -156
- package/esm2015/consts/backend-url.const.js +1 -1
- package/esm2015/consts/default-shop.const.js +2 -2
- package/esm2015/consts/es-config.const.js +2 -2
- package/esm2015/consts/hasura-options.const.js +2 -2
- package/esm2015/consts/index.js +5 -5
- package/esm2015/index.js +6 -6
- package/esm2015/infrab4a-connect-angular.js +4 -4
- package/esm2015/services/auth.service.js +42 -42
- package/esm2015/services/cart.service.js +261 -281
- package/esm2015/services/checkout-subscription.service.js +53 -53
- package/esm2015/services/checkout.service.js +70 -75
- package/esm2015/services/coupon.service.js +222 -246
- package/esm2015/services/home-shop.service.js +116 -116
- package/esm2015/services/index.js +9 -9
- package/esm2015/services/order.service.js +32 -32
- package/esm2015/services/shipping.service.js +98 -98
- 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/esm2015/services/types/shipping-methods.type.js +2 -2
- package/fesm2015/infrab4a-connect-angular.js +1521 -1584
- package/fesm2015/infrab4a-connect-angular.js.map +1 -1
- package/index.d.ts +5 -5
- 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 +40 -42
- package/services/checkout-subscription.service.d.ts +18 -18
- package/services/checkout.service.d.ts +23 -23
- package/services/coupon.service.d.ts +27 -25
- package/services/home-shop.service.d.ts +25 -25
- package/services/index.d.ts +8 -8
- 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/esm2015/services/errors/group-invalid-coupon.error.js +0 -8
- package/esm2015/services/errors/index.js +0 -3
- package/esm2015/services/errors/invalid-coupon.error.js +0 -8
- package/services/errors/group-invalid-coupon.error.d.ts +0 -6
- package/services/errors/index.d.ts +0 -2
- package/services/errors/invalid-coupon.error.d.ts +0 -5
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { AngularFireAuth } from '@angular/fire/auth';
|
|
2
|
-
import { User, UserRepository } from '@infrab4a/connect';
|
|
3
|
-
import firebase from 'firebase/app';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class AuthService {
|
|
7
|
-
private readonly angularFireAuth;
|
|
8
|
-
private readonly userRepository;
|
|
9
|
-
constructor(angularFireAuth: AngularFireAuth, userRepository: UserRepository);
|
|
10
|
-
getAuthstate(): Observable<{
|
|
11
|
-
user: User;
|
|
12
|
-
isAnonymous: boolean;
|
|
13
|
-
}>;
|
|
14
|
-
getUser(): Observable<User>;
|
|
15
|
-
getTokenId(): Observable<string>;
|
|
16
|
-
getFireUser(): Observable<firebase.User>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
19
|
-
}
|
|
1
|
+
import { AngularFireAuth } from '@angular/fire/auth';
|
|
2
|
+
import { User, UserRepository } from '@infrab4a/connect';
|
|
3
|
+
import firebase from 'firebase/app';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AuthService {
|
|
7
|
+
private readonly angularFireAuth;
|
|
8
|
+
private readonly userRepository;
|
|
9
|
+
constructor(angularFireAuth: AngularFireAuth, userRepository: UserRepository);
|
|
10
|
+
getAuthstate(): Observable<{
|
|
11
|
+
user: User;
|
|
12
|
+
isAnonymous: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
getUser(): Observable<User>;
|
|
15
|
+
getTokenId(): Observable<string>;
|
|
16
|
+
getFireUser(): Observable<firebase.User>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
19
|
+
}
|
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
import { Buy2WinFirestoreRepository,
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { AuthService } from './auth.service';
|
|
4
|
-
import { CheckoutService } from './checkout.service';
|
|
5
|
-
import { RequiredCheckoutData } from './types';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export declare type Cart = {
|
|
8
|
-
[id: string]: LineItem;
|
|
9
|
-
};
|
|
10
|
-
export declare class CartService {
|
|
11
|
-
private readonly authService;
|
|
12
|
-
private readonly checkoutService;
|
|
13
|
-
private readonly defaultShop;
|
|
14
|
-
private readonly productRepository;
|
|
15
|
-
private readonly
|
|
16
|
-
private readonly
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
private
|
|
31
|
-
private
|
|
32
|
-
private
|
|
33
|
-
private
|
|
34
|
-
private
|
|
35
|
-
private
|
|
36
|
-
|
|
37
|
-
private
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
|
|
42
|
-
}
|
|
1
|
+
import { Buy2WinFirestoreRepository, LineItem, ProductRepository, Shops, User, VariantRepository } from '@infrab4a/connect';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AuthService } from './auth.service';
|
|
4
|
+
import { CheckoutService } from './checkout.service';
|
|
5
|
+
import { RequiredCheckoutData } from './types';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare type Cart = {
|
|
8
|
+
[id: string]: LineItem;
|
|
9
|
+
};
|
|
10
|
+
export declare class CartService {
|
|
11
|
+
private readonly authService;
|
|
12
|
+
private readonly checkoutService;
|
|
13
|
+
private readonly defaultShop;
|
|
14
|
+
private readonly productRepository;
|
|
15
|
+
private readonly variantRepository;
|
|
16
|
+
private readonly buy2WinRepository;
|
|
17
|
+
private cartSubject;
|
|
18
|
+
constructor(authService: AuthService, checkoutService: CheckoutService, defaultShop: Shops, productRepository: ProductRepository, variantRepository: VariantRepository, buy2WinRepository: Buy2WinFirestoreRepository);
|
|
19
|
+
addItem(item: LineItem, quantity?: number): Observable<Cart>;
|
|
20
|
+
decreaseItem(item: LineItem): Observable<Cart>;
|
|
21
|
+
getCart(checkout?: RequiredCheckoutData): Observable<Cart>;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated The method should not be used
|
|
24
|
+
*/
|
|
25
|
+
getVariantPriceDiscount(item: LineItem): Observable<number>;
|
|
26
|
+
removeItem(item: LineItem): Observable<Cart>;
|
|
27
|
+
updateUserCart(user: User): Observable<Cart>;
|
|
28
|
+
clearCart(): Observable<Cart>;
|
|
29
|
+
private buildCartFromCheckout;
|
|
30
|
+
private updateLineItemInCart;
|
|
31
|
+
private generateCartObject;
|
|
32
|
+
private buildLineItem;
|
|
33
|
+
private getProductData;
|
|
34
|
+
private getProductPrice;
|
|
35
|
+
private checkMaxStock;
|
|
36
|
+
getGifts(): Observable<Cart>;
|
|
37
|
+
private giftToLineItems;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CartService, never>;
|
|
39
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CartService>;
|
|
40
|
+
}
|
|
@@ -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,25 +1,27 @@
|
|
|
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,
|
|
11
|
-
private
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
private
|
|
19
|
-
private
|
|
20
|
-
private
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
|
|
27
|
+
}
|
|
@@ -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
|
-
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
|
-
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
|
+
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
|
+
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,8 +1,8 @@
|
|
|
1
|
-
export * from './auth.service';
|
|
2
|
-
export * from './cart.service';
|
|
3
|
-
export * from './checkout-subscription.service';
|
|
4
|
-
export * from './checkout.service';
|
|
5
|
-
export * from './coupon.service';
|
|
6
|
-
export * from './home-shop.service';
|
|
7
|
-
export * from './order.service';
|
|
8
|
-
export * from './shipping.service';
|
|
1
|
+
export * from './auth.service';
|
|
2
|
+
export * from './cart.service';
|
|
3
|
+
export * from './checkout-subscription.service';
|
|
4
|
+
export * from './checkout.service';
|
|
5
|
+
export * from './coupon.service';
|
|
6
|
+
export * from './home-shop.service';
|
|
7
|
+
export * from './order.service';
|
|
8
|
+
export * from './shipping.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,19 +1,19 @@
|
|
|
1
|
-
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { HomeShopService } from './home-shop.service';
|
|
4
|
-
import { ShippingMethodResponse } from './types/shipping-methods.type';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ShippingService {
|
|
7
|
-
private http;
|
|
8
|
-
private apiUrl;
|
|
9
|
-
private homeService;
|
|
10
|
-
constructor(http: HttpClient, apiUrl: string, homeService: HomeShopService);
|
|
11
|
-
getShippingMethods(shop: string, zip: string, weightGrams: number, totalPrice: number, personId: string, subscriptionPlan?: string): Observable<Array<ShippingMethodResponse & {
|
|
12
|
-
ShippingCompanyName?: string;
|
|
13
|
-
}>>;
|
|
14
|
-
private isFreeShippingBySubscription;
|
|
15
|
-
private isHalfShippingBySubscription;
|
|
16
|
-
private isHolidays;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ShippingService, never>;
|
|
18
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ShippingService>;
|
|
19
|
-
}
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { HomeShopService } from './home-shop.service';
|
|
4
|
+
import { ShippingMethodResponse } from './types/shipping-methods.type';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ShippingService {
|
|
7
|
+
private http;
|
|
8
|
+
private apiUrl;
|
|
9
|
+
private homeService;
|
|
10
|
+
constructor(http: HttpClient, apiUrl: string, homeService: HomeShopService);
|
|
11
|
+
getShippingMethods(shop: string, zip: string, weightGrams: number, totalPrice: number, personId: string, subscriptionPlan?: string): Observable<Array<ShippingMethodResponse & {
|
|
12
|
+
ShippingCompanyName?: string;
|
|
13
|
+
}>>;
|
|
14
|
+
private isFreeShippingBySubscription;
|
|
15
|
+
private isHalfShippingBySubscription;
|
|
16
|
+
private isHolidays;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShippingService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ShippingService>;
|
|
19
|
+
}
|
|
@@ -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'>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface ShippingMethodResponse {
|
|
2
|
-
daysToDelivery: number;
|
|
3
|
-
currency: string;
|
|
4
|
-
description: string;
|
|
5
|
-
maxDeliveryDate: string;
|
|
6
|
-
minDeliveryDate: string;
|
|
7
|
-
serviceCode: string;
|
|
8
|
-
serviceName: string;
|
|
9
|
-
totalPrice: number;
|
|
10
|
-
additionalDescription: string;
|
|
11
|
-
cnpj: string;
|
|
12
|
-
}
|
|
1
|
+
export interface ShippingMethodResponse {
|
|
2
|
+
daysToDelivery: number;
|
|
3
|
+
currency: string;
|
|
4
|
+
description: string;
|
|
5
|
+
maxDeliveryDate: string;
|
|
6
|
+
minDeliveryDate: string;
|
|
7
|
+
serviceCode: string;
|
|
8
|
+
serviceName: string;
|
|
9
|
+
totalPrice: number;
|
|
10
|
+
additionalDescription: string;
|
|
11
|
+
cnpj: string;
|
|
12
|
+
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
export class GroupInvalidCouponError extends CustomError {
|
|
3
|
-
constructor(errors) {
|
|
4
|
-
super('Many coupon errors throw');
|
|
5
|
-
this.errors = errors;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JvdXAtaW52YWxpZC1jb3Vwb24uZXJyb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0LWFuZ3VsYXIvc3JjL3NlcnZpY2VzL2Vycm9ycy9ncm91cC1pbnZhbGlkLWNvdXBvbi5lcnJvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFJN0MsTUFBTSxPQUFPLHVCQUF3QixTQUFRLFdBQVc7SUFDdEQsWUFBcUIsTUFBNEI7UUFDL0MsS0FBSyxDQUFDLDBCQUEwQixDQUFDLENBQUE7UUFEZCxXQUFNLEdBQU4sTUFBTSxDQUFzQjtJQUVqRCxDQUFDO0NBQ0YiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDdXN0b21FcnJvciB9IGZyb20gJ3RzLWN1c3RvbS1lcnJvcidcblxuaW1wb3J0IHsgSW52YWxpZENvdXBvbkVycm9yIH0gZnJvbSAnLi9pbnZhbGlkLWNvdXBvbi5lcnJvcidcblxuZXhwb3J0IGNsYXNzIEdyb3VwSW52YWxpZENvdXBvbkVycm9yIGV4dGVuZHMgQ3VzdG9tRXJyb3Ige1xuICBjb25zdHJ1Y3RvcihyZWFkb25seSBlcnJvcnM6IEludmFsaWRDb3Vwb25FcnJvcltdKSB7XG4gICAgc3VwZXIoJ01hbnkgY291cG9uIGVycm9ycyB0aHJvdycpXG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export * from './invalid-coupon.error';
|
|
2
|
-
export * from './group-invalid-coupon.error';
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0LWFuZ3VsYXIvc3JjL3NlcnZpY2VzL2Vycm9ycy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHdCQUF3QixDQUFBO0FBQ3RDLGNBQWMsOEJBQThCLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2ludmFsaWQtY291cG9uLmVycm9yJ1xuZXhwb3J0ICogZnJvbSAnLi9ncm91cC1pbnZhbGlkLWNvdXBvbi5lcnJvcidcbiJdfQ==
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CustomError } from 'ts-custom-error';
|
|
2
|
-
export class InvalidCouponError extends CustomError {
|
|
3
|
-
constructor(message) {
|
|
4
|
-
super(message);
|
|
5
|
-
this.message = message;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52YWxpZC1jb3Vwb24uZXJyb3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb25uZWN0LWFuZ3VsYXIvc3JjL3NlcnZpY2VzL2Vycm9ycy9pbnZhbGlkLWNvdXBvbi5lcnJvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0saUJBQWlCLENBQUE7QUFFN0MsTUFBTSxPQUFPLGtCQUFtQixTQUFRLFdBQVc7SUFDakQsWUFBcUIsT0FBTztRQUMxQixLQUFLLENBQUMsT0FBTyxDQUFDLENBQUE7UUFESyxZQUFPLEdBQVAsT0FBTyxDQUFBO0lBRTVCLENBQUM7Q0FDRiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEN1c3RvbUVycm9yIH0gZnJvbSAndHMtY3VzdG9tLWVycm9yJ1xuXG5leHBvcnQgY2xhc3MgSW52YWxpZENvdXBvbkVycm9yIGV4dGVuZHMgQ3VzdG9tRXJyb3Ige1xuICBjb25zdHJ1Y3RvcihyZWFkb25seSBtZXNzYWdlKSB7XG4gICAgc3VwZXIobWVzc2FnZSlcbiAgfVxufVxuIl19
|