@infrab4a/connect-angular 5.7.5-beta.12 → 5.7.5-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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infrab4a/connect-angular",
|
|
3
|
-
"version": "5.7.5-beta.
|
|
3
|
+
"version": "5.7.5-beta.13",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org"
|
|
6
6
|
},
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@angular/common": ">=21.0.0 <22.0.0",
|
|
13
13
|
"@angular/core": ">=21.0.0 <22.0.0",
|
|
14
14
|
"@angular/fire": ">=21.0.0-rc.0 <22.0.0",
|
|
15
|
-
"@infrab4a/connect": "
|
|
15
|
+
"@infrab4a/connect": "5.6.0-beta.5",
|
|
16
16
|
"class-transformer": "^0.5.1",
|
|
17
17
|
"js-cookie": "^3.0.1",
|
|
18
18
|
"rxjs": "^7.5.0",
|
|
@@ -35,4 +35,4 @@
|
|
|
35
35
|
},
|
|
36
36
|
"sideEffects": false,
|
|
37
37
|
"type": "module"
|
|
38
|
-
}
|
|
38
|
+
}
|
|
@@ -3,7 +3,7 @@ import { ModuleWithProviders, Type } from '@angular/core';
|
|
|
3
3
|
import { FirebaseOptions } from '@angular/fire/app';
|
|
4
4
|
import { AppCheckOptions } from '@angular/fire/app-check';
|
|
5
5
|
import * as _infrab4a_connect from '@infrab4a/connect';
|
|
6
|
-
import { HasuraGraphQLAuthOptions, CacheConfig, AxiosElasticSearchConfig, VertexSearchConfig, FirestoreConstructorParams, Shops, UserRepository, User,
|
|
6
|
+
import { HasuraGraphQLAuthOptions, CacheConfig, AxiosElasticSearchConfig, VertexSearchConfig, FirestoreConstructorParams, Shops, UserRepository, User, CheckoutRepository, Checkout, CheckoutTypes, Coupon, CheckoutStockValidation, UserAddress, ShippingProductRequest, ShippingMethodResponse, CheckoutPayloadRequest, CheckoutResponse, LineItem, CategoryRepository, Category as Category$1, RepositoryFindFielters as RepositoryFindFielters$1, Product as Product$1, ProductGender, RepositoryCacheOptions, RepositoryFindResult, ProductStockNotificationRepository, ProductSearchIndex, CategoryFilterRepository, Filter, ProductCatalogRepository, RepositoryOrderBy, NonFunctionPropertyNames, WishlistRepository, ProductRepository, LogRepository, PersonType, Wishlist, HomeRepository, Home, Banner, ShippingThresholds, OrderFirestoreRepository, ProductReviewRepository, VariantRepository, ProductReview, ShoppingRecurrenceFirestoreRepository, ShoppingRecurrence, CreateShoppingRecurrencyPayload, UpdateShoppingRecurrencePaymentMethodPayload, GetShoppingRecurrenceAvailableShippingPayload, UpdateShoppingRecurrenceShippingAddressPayload, CancelShoppingRecurrencePayload, ShoppingRecurrenceCycle, LineItemRecurrence, Order } from '@infrab4a/connect';
|
|
7
7
|
import { Observable, Subject } from 'rxjs';
|
|
8
8
|
import { Auth, User as User$1 } from '@angular/fire/auth';
|
|
9
9
|
import { HttpClient } from '@angular/common/http';
|
|
@@ -107,6 +107,32 @@ declare class AuthService {
|
|
|
107
107
|
static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
declare class CheckoutRepositoriesFacade {
|
|
111
|
+
readonly checkoutRepository: CheckoutRepository;
|
|
112
|
+
readonly userRepository: UserRepository;
|
|
113
|
+
constructor(checkoutRepository: CheckoutRepository, userRepository: UserRepository);
|
|
114
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutRepositoriesFacade, never>;
|
|
115
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutRepositoriesFacade>;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
declare class CheckoutDependenciesFacade {
|
|
119
|
+
readonly dataPersistence: DataPersistence;
|
|
120
|
+
readonly httpClient: HttpClient;
|
|
121
|
+
constructor(dataPersistence: DataPersistence, httpClient: HttpClient);
|
|
122
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutDependenciesFacade, never>;
|
|
123
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutDependenciesFacade>;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare class ConfigurationFacade {
|
|
127
|
+
readonly defaultShop: Shops;
|
|
128
|
+
readonly firebaseOptions: FirebaseOptions;
|
|
129
|
+
constructor(defaultShop: Shops, firebaseOptions: FirebaseOptions);
|
|
130
|
+
getCheckoutUrl(): string;
|
|
131
|
+
getProjectId(): string;
|
|
132
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationFacade, never>;
|
|
133
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationFacade>;
|
|
134
|
+
}
|
|
135
|
+
|
|
110
136
|
type PendingProductReview = {
|
|
111
137
|
id: string;
|
|
112
138
|
isEdition: boolean;
|
|
@@ -136,34 +162,6 @@ type ProductReviewCreate = {
|
|
|
136
162
|
|
|
137
163
|
type RequiredCheckoutData = Partial<Pick<Checkout, 'id' | 'user' | 'shop' | 'lineItems'>>;
|
|
138
164
|
|
|
139
|
-
type RequiredCheckoutSubscriptionData = Partial<Pick<CheckoutSubscription, 'id'>>;
|
|
140
|
-
|
|
141
|
-
declare class CheckoutRepositoriesFacade {
|
|
142
|
-
readonly checkoutRepository: CheckoutRepository;
|
|
143
|
-
readonly userRepository: UserRepository;
|
|
144
|
-
constructor(checkoutRepository: CheckoutRepository, userRepository: UserRepository);
|
|
145
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutRepositoriesFacade, never>;
|
|
146
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutRepositoriesFacade>;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
declare class CheckoutDependenciesFacade {
|
|
150
|
-
readonly dataPersistence: DataPersistence;
|
|
151
|
-
readonly httpClient: HttpClient;
|
|
152
|
-
constructor(dataPersistence: DataPersistence, httpClient: HttpClient);
|
|
153
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutDependenciesFacade, never>;
|
|
154
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutDependenciesFacade>;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
declare class ConfigurationFacade {
|
|
158
|
-
readonly defaultShop: Shops;
|
|
159
|
-
readonly firebaseOptions: FirebaseOptions;
|
|
160
|
-
constructor(defaultShop: Shops, firebaseOptions: FirebaseOptions);
|
|
161
|
-
getCheckoutUrl(): string;
|
|
162
|
-
getProjectId(): string;
|
|
163
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigurationFacade, never>;
|
|
164
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigurationFacade>;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
165
|
declare class CheckoutService {
|
|
168
166
|
private readonly repositoriesFacade;
|
|
169
167
|
private readonly dependenciesFacade;
|
|
@@ -178,8 +176,11 @@ declare class CheckoutService {
|
|
|
178
176
|
resetCheckoutValues(): Observable<Checkout>;
|
|
179
177
|
applyCouponDiscount(nickname: string, checkoutType: CheckoutTypes): Observable<Coupon>;
|
|
180
178
|
removeCouponDiscount(): Observable<Checkout>;
|
|
179
|
+
applyPointsDiscount(points: number): Observable<Checkout>;
|
|
180
|
+
removePointsDiscount(): Observable<Checkout>;
|
|
181
181
|
validateStockProducts(): Observable<CheckoutStockValidation>;
|
|
182
182
|
selectShippingAddress(address: UserAddress): Observable<Checkout>;
|
|
183
|
+
private formatZip;
|
|
183
184
|
getAvailableShippingForProduct(productShipping: ShippingProductRequest): Observable<ShippingMethodResponse[]>;
|
|
184
185
|
getAvailableShippingForCheckout(): Observable<ShippingMethodResponse[]>;
|
|
185
186
|
selectShipping(option: string): Observable<Checkout>;
|
|
@@ -207,7 +208,8 @@ declare class CartService {
|
|
|
207
208
|
private cartSubject;
|
|
208
209
|
private checkoutUrl;
|
|
209
210
|
constructor(servicesFacade: CartServicesFacade, configurationFacade: ConfigurationFacade);
|
|
210
|
-
addItem(item: LineItem, quantity?: number): Observable<Cart>;
|
|
211
|
+
addItem(item: LineItem, quantity?: number, recurrence?: boolean, recurrenceCycle?: string): Observable<Cart>;
|
|
212
|
+
updateItemRecurrence(item: LineItem, recurrence?: boolean, recurrenceCycle?: string): Observable<Cart>;
|
|
211
213
|
decreaseItem(item: LineItem): Observable<Cart>;
|
|
212
214
|
removeItem(item: LineItem): Observable<Cart>;
|
|
213
215
|
updateUserCart(user: User): Observable<Cart>;
|
|
@@ -303,6 +305,7 @@ declare class CategorySearchStrategy implements CatalogSearchStrategy {
|
|
|
303
305
|
private getProductIds;
|
|
304
306
|
private findAndSortByMostRelevant;
|
|
305
307
|
private sortProductsByRelevance;
|
|
308
|
+
private isCreatedWithinLastDays;
|
|
306
309
|
static ɵfac: i0.ɵɵFactoryDeclaration<CategorySearchStrategy, never>;
|
|
307
310
|
static ɵprov: i0.ɵɵInjectableDeclaration<CategorySearchStrategy>;
|
|
308
311
|
}
|
|
@@ -633,67 +636,6 @@ declare class WishlistService {
|
|
|
633
636
|
static ɵprov: i0.ɵɵInjectableDeclaration<WishlistService>;
|
|
634
637
|
}
|
|
635
638
|
|
|
636
|
-
declare class CouponRepositoriesFacade {
|
|
637
|
-
readonly couponRepository: CouponRepository;
|
|
638
|
-
readonly orderRepository: OrderRepository;
|
|
639
|
-
readonly categoryRepository: CategoryRepository;
|
|
640
|
-
constructor(couponRepository: CouponRepository, orderRepository: OrderRepository, categoryRepository: CategoryRepository);
|
|
641
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CouponRepositoriesFacade, never>;
|
|
642
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CouponRepositoriesFacade>;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
type CheckCouponParams = {
|
|
646
|
-
nickname: string;
|
|
647
|
-
checkoutType: CheckoutTypes;
|
|
648
|
-
checkout: Partial<Checkout>;
|
|
649
|
-
plan: string;
|
|
650
|
-
};
|
|
651
|
-
|
|
652
|
-
declare class CouponService {
|
|
653
|
-
private readonly repositoriesFacade;
|
|
654
|
-
private readonly configurationFacade;
|
|
655
|
-
constructor(repositoriesFacade: CouponRepositoriesFacade, configurationFacade: ConfigurationFacade);
|
|
656
|
-
checkCoupon(params: CheckCouponParams): Observable<Coupon>;
|
|
657
|
-
private couponValidation;
|
|
658
|
-
private couponRulesValidation;
|
|
659
|
-
private validateSubscriptionCoupon;
|
|
660
|
-
private validateEcommerceCoupon;
|
|
661
|
-
private validateUserEligibility;
|
|
662
|
-
private validateUsageLimits;
|
|
663
|
-
private validateFirstOrderLimit;
|
|
664
|
-
private validateCouponUsageLimits;
|
|
665
|
-
private validateProductEligibility;
|
|
666
|
-
private throwMinSubTotalError;
|
|
667
|
-
calcDiscountSubscription(coupon: Coupon, checkout: Partial<CheckoutSubscription>): Observable<number>;
|
|
668
|
-
private hasMinSubTotal;
|
|
669
|
-
private hasProductCategories;
|
|
670
|
-
private coupomUserValidation;
|
|
671
|
-
private getCouponCategoriesId;
|
|
672
|
-
private emailIsFromCollaborator;
|
|
673
|
-
private getLineItensEligebleForDiscount;
|
|
674
|
-
private calcCheckoutSubtotal;
|
|
675
|
-
private getOrdersWithCoupon;
|
|
676
|
-
private getOrdersFromUser;
|
|
677
|
-
private countOrdersWithUser;
|
|
678
|
-
private getCouponUseLimits;
|
|
679
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
|
|
680
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
declare class CheckoutSubscriptionService {
|
|
684
|
-
private readonly checkoutSubscriptionRepository;
|
|
685
|
-
private readonly dataPersistence;
|
|
686
|
-
private readonly couponService;
|
|
687
|
-
constructor(checkoutSubscriptionRepository: CheckoutSubscriptionRepository, dataPersistence: DataPersistence, couponService: CouponService);
|
|
688
|
-
getCheckoutSubscription(checkoutData?: RequiredCheckoutSubscriptionData): Observable<CheckoutSubscription>;
|
|
689
|
-
clearCheckoutSubscriptionFromSession(): Observable<void>;
|
|
690
|
-
checkCoupon(nickname: string, _userEmail: string): Observable<Coupon>;
|
|
691
|
-
calcDiscountSubscription(coupon: Coupon): Observable<number>;
|
|
692
|
-
private createCheckoutSubscription;
|
|
693
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutSubscriptionService, never>;
|
|
694
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutSubscriptionService>;
|
|
695
|
-
}
|
|
696
|
-
|
|
697
639
|
declare class UtilHelper {
|
|
698
640
|
static createSlug(name: string): string;
|
|
699
641
|
}
|
|
@@ -717,6 +659,14 @@ declare class HomeShopService {
|
|
|
717
659
|
getHomeData(): Observable<Home>;
|
|
718
660
|
getBanners(type: BannerType): Observable<Banner[]>;
|
|
719
661
|
getMinValueForFreeShipping(): Observable<number>;
|
|
662
|
+
/**
|
|
663
|
+
* Retorna os thresholds de frete grátis estruturados configurados no documento
|
|
664
|
+
* Home (`shippingThresholds`). Quando o documento ainda não possui essa
|
|
665
|
+
* estrutura, retorna um default conservador equivalente à regra legada
|
|
666
|
+
* (edition: 50, avulsoSp: 99, avulsoOutro: null) para que consumidores não
|
|
667
|
+
* quebrem durante a migração.
|
|
668
|
+
*/
|
|
669
|
+
getShippingThresholds(): Observable<ShippingThresholds>;
|
|
720
670
|
private getDiscoverProducts;
|
|
721
671
|
private getFeaturedProducts;
|
|
722
672
|
private getVerticalProducts;
|
|
@@ -744,6 +694,27 @@ declare class OrderProductReviewService {
|
|
|
744
694
|
static ɵprov: i0.ɵɵInjectableDeclaration<OrderProductReviewService>;
|
|
745
695
|
}
|
|
746
696
|
|
|
697
|
+
declare class OrderRecurrenceService {
|
|
698
|
+
private readonly shoppingRecurrenceRepository;
|
|
699
|
+
readonly defaultShop: Shops;
|
|
700
|
+
private readonly dependenciesFacade;
|
|
701
|
+
private readonly configurationFacade;
|
|
702
|
+
private checkoutUrl;
|
|
703
|
+
constructor(shoppingRecurrenceRepository: ShoppingRecurrenceFirestoreRepository, defaultShop: Shops, dependenciesFacade: CheckoutDependenciesFacade, configurationFacade: ConfigurationFacade);
|
|
704
|
+
getRecurrenceOrder(recurrenceId: string): Observable<ShoppingRecurrence>;
|
|
705
|
+
createRecurrenceOrder(recurrencePayload: CreateShoppingRecurrencyPayload): Observable<ShoppingRecurrence[]>;
|
|
706
|
+
updatePaymentMethod(data: UpdateShoppingRecurrencePaymentMethodPayload): Observable<ShoppingRecurrence>;
|
|
707
|
+
getRecurrenceAvailableShipping(data: GetShoppingRecurrenceAvailableShippingPayload): Observable<ShippingMethodResponse[]>;
|
|
708
|
+
updateShippingAddress(data: UpdateShoppingRecurrenceShippingAddressPayload): Observable<ShoppingRecurrence>;
|
|
709
|
+
cancelRecurrenceOrder(data: CancelShoppingRecurrencePayload): Observable<ShoppingRecurrence>;
|
|
710
|
+
enableOrDisableRecurrenceOrder(recurrenceId: string, active: boolean): Observable<ShoppingRecurrence>;
|
|
711
|
+
skipRecurrenceOrder(recurrenceEditionId: string): Observable<ShoppingRecurrence>;
|
|
712
|
+
updateFrequency(recurrenceId: string, frequency: ShoppingRecurrenceCycle): Observable<ShoppingRecurrence>;
|
|
713
|
+
updateLineItems(recurrenceId: string, lineItems: LineItemRecurrence[]): Observable<ShoppingRecurrence>;
|
|
714
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrderRecurrenceService, never>;
|
|
715
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OrderRecurrenceService>;
|
|
716
|
+
}
|
|
717
|
+
|
|
747
718
|
declare class OrderService {
|
|
748
719
|
private readonly angularFirestore;
|
|
749
720
|
private readonly orderRepository;
|
|
@@ -754,5 +725,5 @@ declare class OrderService {
|
|
|
754
725
|
static ɵprov: i0.ɵɵInjectableDeclaration<OrderService>;
|
|
755
726
|
}
|
|
756
727
|
|
|
757
|
-
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService,
|
|
728
|
+
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CookieDataPersistence, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderProductReviewService, OrderRecurrenceService, OrderService, ProductSorts, UtilHelper, WishlistService };
|
|
758
729
|
export type { BuildResponseParams, Cart, CategoryStructureAdapter, DataPersistence, FetchProductsMainParams, FetchProductsOptions, FetchProductsParams, FetchProductsResponse, FirestoreOptions, HasuraGraphQLOptions, ProductSort, StockNotificationParams };
|