@infrab4a/connect-angular 5.7.5-beta.1 → 5.7.5-beta.10
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.10",
|
|
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": "5.5.6-beta.
|
|
15
|
+
"@infrab4a/connect": "5.5.6-beta.10",
|
|
16
16
|
"class-transformer": "^0.5.1",
|
|
17
17
|
"js-cookie": "^3.0.1",
|
|
18
18
|
"rxjs": "^7.5.0",
|
|
@@ -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,6 +176,8 @@ 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
183
|
private formatZip;
|
|
@@ -208,7 +208,8 @@ declare class CartService {
|
|
|
208
208
|
private cartSubject;
|
|
209
209
|
private checkoutUrl;
|
|
210
210
|
constructor(servicesFacade: CartServicesFacade, configurationFacade: ConfigurationFacade);
|
|
211
|
-
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>;
|
|
212
213
|
decreaseItem(item: LineItem): Observable<Cart>;
|
|
213
214
|
removeItem(item: LineItem): Observable<Cart>;
|
|
214
215
|
updateUserCart(user: User): Observable<Cart>;
|
|
@@ -634,67 +635,6 @@ declare class WishlistService {
|
|
|
634
635
|
static ɵprov: i0.ɵɵInjectableDeclaration<WishlistService>;
|
|
635
636
|
}
|
|
636
637
|
|
|
637
|
-
declare class CouponRepositoriesFacade {
|
|
638
|
-
readonly couponRepository: CouponRepository;
|
|
639
|
-
readonly orderRepository: OrderRepository;
|
|
640
|
-
readonly categoryRepository: CategoryRepository;
|
|
641
|
-
constructor(couponRepository: CouponRepository, orderRepository: OrderRepository, categoryRepository: CategoryRepository);
|
|
642
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CouponRepositoriesFacade, never>;
|
|
643
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CouponRepositoriesFacade>;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
type CheckCouponParams = {
|
|
647
|
-
nickname: string;
|
|
648
|
-
checkoutType: CheckoutTypes;
|
|
649
|
-
checkout: Partial<Checkout>;
|
|
650
|
-
plan: string;
|
|
651
|
-
};
|
|
652
|
-
|
|
653
|
-
declare class CouponService {
|
|
654
|
-
private readonly repositoriesFacade;
|
|
655
|
-
private readonly configurationFacade;
|
|
656
|
-
constructor(repositoriesFacade: CouponRepositoriesFacade, configurationFacade: ConfigurationFacade);
|
|
657
|
-
checkCoupon(params: CheckCouponParams): Observable<Coupon>;
|
|
658
|
-
private couponValidation;
|
|
659
|
-
private couponRulesValidation;
|
|
660
|
-
private validateSubscriptionCoupon;
|
|
661
|
-
private validateEcommerceCoupon;
|
|
662
|
-
private validateUserEligibility;
|
|
663
|
-
private validateUsageLimits;
|
|
664
|
-
private validateFirstOrderLimit;
|
|
665
|
-
private validateCouponUsageLimits;
|
|
666
|
-
private validateProductEligibility;
|
|
667
|
-
private throwMinSubTotalError;
|
|
668
|
-
calcDiscountSubscription(coupon: Coupon, checkout: Partial<CheckoutSubscription>): Observable<number>;
|
|
669
|
-
private hasMinSubTotal;
|
|
670
|
-
private hasProductCategories;
|
|
671
|
-
private coupomUserValidation;
|
|
672
|
-
private getCouponCategoriesId;
|
|
673
|
-
private emailIsFromCollaborator;
|
|
674
|
-
private getLineItensEligebleForDiscount;
|
|
675
|
-
private calcCheckoutSubtotal;
|
|
676
|
-
private getOrdersWithCoupon;
|
|
677
|
-
private getOrdersFromUser;
|
|
678
|
-
private countOrdersWithUser;
|
|
679
|
-
private getCouponUseLimits;
|
|
680
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CouponService, never>;
|
|
681
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CouponService>;
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
declare class CheckoutSubscriptionService {
|
|
685
|
-
private readonly checkoutSubscriptionRepository;
|
|
686
|
-
private readonly dataPersistence;
|
|
687
|
-
private readonly couponService;
|
|
688
|
-
constructor(checkoutSubscriptionRepository: CheckoutSubscriptionRepository, dataPersistence: DataPersistence, couponService: CouponService);
|
|
689
|
-
getCheckoutSubscription(checkoutData?: RequiredCheckoutSubscriptionData): Observable<CheckoutSubscription>;
|
|
690
|
-
clearCheckoutSubscriptionFromSession(): Observable<void>;
|
|
691
|
-
checkCoupon(nickname: string, _userEmail: string): Observable<Coupon>;
|
|
692
|
-
calcDiscountSubscription(coupon: Coupon): Observable<number>;
|
|
693
|
-
private createCheckoutSubscription;
|
|
694
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CheckoutSubscriptionService, never>;
|
|
695
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CheckoutSubscriptionService>;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
638
|
declare class UtilHelper {
|
|
699
639
|
static createSlug(name: string): string;
|
|
700
640
|
}
|
|
@@ -761,27 +701,15 @@ declare class OrderRecurrenceService {
|
|
|
761
701
|
private checkoutUrl;
|
|
762
702
|
constructor(shoppingRecurrenceRepository: ShoppingRecurrenceFirestoreRepository, defaultShop: Shops, dependenciesFacade: CheckoutDependenciesFacade, configurationFacade: ConfigurationFacade);
|
|
763
703
|
getRecurrenceOrder(recurrenceId: string): Observable<ShoppingRecurrence>;
|
|
764
|
-
createRecurrenceOrder(recurrencePayload: CreateShoppingRecurrencyPayload): Observable<ShoppingRecurrence>;
|
|
765
|
-
updatePaymentMethod(data:
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
getRecurrenceAvailableShipping(data: {
|
|
770
|
-
recurrenceId: string;
|
|
771
|
-
shippingAddress?: UserAddress;
|
|
772
|
-
}): Observable<ShippingMethodResponse[]>;
|
|
773
|
-
updateShippingAddress(data: {
|
|
774
|
-
recurrenceId: string;
|
|
775
|
-
shippingAddress: UserAddress;
|
|
776
|
-
shippingOption: string;
|
|
777
|
-
}): Observable<ShoppingRecurrence>;
|
|
778
|
-
cancelRecurrenceOrder(data: {
|
|
779
|
-
recurrenceId: string;
|
|
780
|
-
}): Observable<ShoppingRecurrence>;
|
|
704
|
+
createRecurrenceOrder(recurrencePayload: CreateShoppingRecurrencyPayload): Observable<ShoppingRecurrence[]>;
|
|
705
|
+
updatePaymentMethod(data: UpdateShoppingRecurrencePaymentMethodPayload): Observable<ShoppingRecurrence>;
|
|
706
|
+
getRecurrenceAvailableShipping(data: GetShoppingRecurrenceAvailableShippingPayload): Observable<ShippingMethodResponse[]>;
|
|
707
|
+
updateShippingAddress(data: UpdateShoppingRecurrenceShippingAddressPayload): Observable<ShoppingRecurrence>;
|
|
708
|
+
cancelRecurrenceOrder(data: CancelShoppingRecurrencePayload): Observable<ShoppingRecurrence>;
|
|
781
709
|
enableOrDisableRecurrenceOrder(recurrenceId: string, active: boolean): Observable<ShoppingRecurrence>;
|
|
782
710
|
skipRecurrenceOrder(recurrenceEditionId: string): Observable<ShoppingRecurrence>;
|
|
783
711
|
updateFrequency(recurrenceId: string, frequency: ShoppingRecurrenceCycle): Observable<ShoppingRecurrence>;
|
|
784
|
-
updateLineItems(recurrenceId: string, lineItems:
|
|
712
|
+
updateLineItems(recurrenceId: string, lineItems: LineItemRecurrence[]): Observable<ShoppingRecurrence>;
|
|
785
713
|
static ɵfac: i0.ɵɵFactoryDeclaration<OrderRecurrenceService, never>;
|
|
786
714
|
static ɵprov: i0.ɵɵInjectableDeclaration<OrderRecurrenceService>;
|
|
787
715
|
}
|
|
@@ -796,5 +724,5 @@ declare class OrderService {
|
|
|
796
724
|
static ɵprov: i0.ɵɵInjectableDeclaration<OrderService>;
|
|
797
725
|
}
|
|
798
726
|
|
|
799
|
-
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService,
|
|
727
|
+
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CookieDataPersistence, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderProductReviewService, OrderRecurrenceService, OrderService, ProductSorts, UtilHelper, WishlistService };
|
|
800
728
|
export type { BuildResponseParams, Cart, CategoryStructureAdapter, DataPersistence, FetchProductsMainParams, FetchProductsOptions, FetchProductsParams, FetchProductsResponse, FirestoreOptions, HasuraGraphQLOptions, ProductSort, StockNotificationParams };
|