@infrab4a/connect-angular 5.8.0-beta.0 → 5.8.0-beta.2
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/esm2020/angular-connect.module.mjs +4 -2
- package/esm2020/services/checkout.service.mjs +1 -6
- package/esm2020/services/index.mjs +2 -1
- package/esm2020/services/order-recurrence.service.mjs +83 -0
- package/fesm2015/infrab4a-connect-angular.mjs +91 -19
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +89 -19
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +2 -2
- package/services/checkout.service.d.ts +0 -1
- package/services/index.d.ts +1 -0
- package/services/order-recurrence.service.d.ts +37 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { NgModule, InjectionToken, PLATFORM_ID, Injectable, Inject } from '@angular/core';
|
|
3
|
-
import * as i1$
|
|
3
|
+
import * as i1$3 from '@angular/fire/app';
|
|
4
4
|
import { FirebaseApp, provideFirebaseApp, getApp, initializeApp } from '@angular/fire/app';
|
|
5
5
|
import * as i2 from '@angular/fire/app-check';
|
|
6
6
|
import { provideAppCheck, initializeAppCheck } from '@angular/fire/app-check';
|
|
7
|
-
import * as i3 from '@angular/fire/storage';
|
|
7
|
+
import * as i3$1 from '@angular/fire/storage';
|
|
8
8
|
import { Storage, provideStorage, getStorage } from '@angular/fire/storage';
|
|
9
|
-
import * as
|
|
9
|
+
import * as i3 from '@infrab4a/connect';
|
|
10
10
|
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ConnectFirestoreService, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, GroupFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ShoppingRecurrenceFirestoreRepository, ShoppingRecurrenceEditionFirestoreRepository, ProductFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, ProductVariantFirestoreRepository, OrderBlockedFirestoreRepository, LogFirestoreRepository, SequenceFirestoreRepository, BrandCategoryFirestoreRepository, ShopConfigsFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewHasuraGraphQLRepository, VariantHasuraGraphQLRepository, ProductStockNotificationHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryProductHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, ProductErrorsHasuraGraphQLRepository, ProductCatalogHasuraGraphQLRepository, ProductStockEntryHasuraGraphQLRepository, ProductGroupHasuraGraphQLRepository, ProductPriceLogHasuraGraphQLRepository, ProductsVertexSearch, VertexAxiosAdapter, isNil, NotFoundError, Checkout, pick, LineItem, Where, isEmpty, Shops, set, InvalidArgumentError, RoundProductPricesHelper, Category, WishlistLogType, PersonTypes, Wishlist, CheckoutTypes, CouponTypes, Exclusivities, OrderStatus, CheckoutSubscription, Product, RequiredArgumentError, add, ProductReview, Order, UpdateUserImage, FirebaseFileUploaderService } from '@infrab4a/connect';
|
|
11
11
|
import * as i1 from '@angular/fire/auth';
|
|
12
12
|
import { Auth, provideAuth, initializeAuth, indexedDBLocalPersistence, browserLocalPersistence, browserSessionPersistence, getAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
@@ -1341,7 +1341,7 @@ ConfigurationFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", vers
|
|
|
1341
1341
|
ConfigurationFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ConfigurationFacade });
|
|
1342
1342
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: ConfigurationFacade, decorators: [{
|
|
1343
1343
|
type: Injectable
|
|
1344
|
-
}], ctorParameters: function () { return [{ type:
|
|
1344
|
+
}], ctorParameters: function () { return [{ type: i3.Shops, decorators: [{
|
|
1345
1345
|
type: Inject,
|
|
1346
1346
|
args: [DEFAULT_SHOP]
|
|
1347
1347
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1430,11 +1430,6 @@ class CheckoutService {
|
|
|
1430
1430
|
},
|
|
1431
1431
|
});
|
|
1432
1432
|
}
|
|
1433
|
-
createRecurrenceOrder(recurrencePayload) {
|
|
1434
|
-
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/checkoutRecurrence`, {
|
|
1435
|
-
data: recurrencePayload,
|
|
1436
|
-
});
|
|
1437
|
-
}
|
|
1438
1433
|
async createCheckout(checkoutData) {
|
|
1439
1434
|
const checkout = await this.repositoriesFacade.checkoutRepository.create({
|
|
1440
1435
|
createdAt: new Date(),
|
|
@@ -1943,7 +1938,7 @@ CatalogServiceFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", ver
|
|
|
1943
1938
|
CatalogServiceFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogServiceFacade });
|
|
1944
1939
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogServiceFacade, decorators: [{
|
|
1945
1940
|
type: Injectable
|
|
1946
|
-
}], ctorParameters: function () { return [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type:
|
|
1941
|
+
}], ctorParameters: function () { return [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type: i3.Shops, decorators: [{
|
|
1947
1942
|
type: Inject,
|
|
1948
1943
|
args: [DEFAULT_SHOP]
|
|
1949
1944
|
}] }]; } });
|
|
@@ -1996,7 +1991,7 @@ CategoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
1996
1991
|
CategoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService });
|
|
1997
1992
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryService, decorators: [{
|
|
1998
1993
|
type: Injectable
|
|
1999
|
-
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
1994
|
+
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
2000
1995
|
type: Inject,
|
|
2001
1996
|
args: [DEFAULT_SHOP]
|
|
2002
1997
|
}] }]; } });
|
|
@@ -2034,7 +2029,7 @@ CategoryServiceFacade.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", ve
|
|
|
2034
2029
|
CategoryServiceFacade.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryServiceFacade });
|
|
2035
2030
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CategoryServiceFacade, decorators: [{
|
|
2036
2031
|
type: Injectable
|
|
2037
|
-
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
2032
|
+
}], ctorParameters: function () { return [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
2038
2033
|
type: Inject,
|
|
2039
2034
|
args: [DEFAULT_SHOP]
|
|
2040
2035
|
}] }]; } });
|
|
@@ -2416,7 +2411,7 @@ CatalogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
|
|
|
2416
2411
|
CatalogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService });
|
|
2417
2412
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: CatalogService, decorators: [{
|
|
2418
2413
|
type: Injectable
|
|
2419
|
-
}], ctorParameters: function () { return [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type:
|
|
2414
|
+
}], ctorParameters: function () { return [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type: i3.Shops, decorators: [{
|
|
2420
2415
|
type: Inject,
|
|
2421
2416
|
args: [DEFAULT_SHOP]
|
|
2422
2417
|
}] }]; } });
|
|
@@ -2687,7 +2682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
2687
2682
|
}] }, { type: undefined, decorators: [{
|
|
2688
2683
|
type: Inject,
|
|
2689
2684
|
args: ['LogRepository']
|
|
2690
|
-
}] }, { type:
|
|
2685
|
+
}] }, { type: i3.Shops, decorators: [{
|
|
2691
2686
|
type: Inject,
|
|
2692
2687
|
args: [DEFAULT_SHOP]
|
|
2693
2688
|
}] }]; } });
|
|
@@ -3258,7 +3253,7 @@ OrderProductReviewService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0"
|
|
|
3258
3253
|
OrderProductReviewService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService });
|
|
3259
3254
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderProductReviewService, decorators: [{
|
|
3260
3255
|
type: Injectable
|
|
3261
|
-
}], ctorParameters: function () { return [{ type:
|
|
3256
|
+
}], ctorParameters: function () { return [{ type: i3.OrderFirestoreRepository, decorators: [{
|
|
3262
3257
|
type: Inject,
|
|
3263
3258
|
args: ['OrderRepository']
|
|
3264
3259
|
}] }, { type: undefined, decorators: [{
|
|
@@ -3267,11 +3262,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
3267
3262
|
}] }, { type: undefined, decorators: [{
|
|
3268
3263
|
type: Inject,
|
|
3269
3264
|
args: ['VariantRepository']
|
|
3270
|
-
}] }, { type:
|
|
3265
|
+
}] }, { type: i3.Shops, decorators: [{
|
|
3271
3266
|
type: Inject,
|
|
3272
3267
|
args: [DEFAULT_SHOP]
|
|
3273
3268
|
}] }]; } });
|
|
3274
3269
|
|
|
3270
|
+
class OrderRecurrenceService {
|
|
3271
|
+
constructor(shoppingRecurrenceRepository, defaultShop, dependenciesFacade, configurationFacade) {
|
|
3272
|
+
this.shoppingRecurrenceRepository = shoppingRecurrenceRepository;
|
|
3273
|
+
this.defaultShop = defaultShop;
|
|
3274
|
+
this.dependenciesFacade = dependenciesFacade;
|
|
3275
|
+
this.configurationFacade = configurationFacade;
|
|
3276
|
+
this.checkoutUrl = null;
|
|
3277
|
+
this.checkoutUrl = this.configurationFacade.getCheckoutUrl();
|
|
3278
|
+
}
|
|
3279
|
+
getRecurrenceOrder(recurrenceId) {
|
|
3280
|
+
return from(this.shoppingRecurrenceRepository.get({ id: recurrenceId }));
|
|
3281
|
+
}
|
|
3282
|
+
createRecurrenceOrder(recurrencePayload) {
|
|
3283
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/createShoppingRecurrence`, {
|
|
3284
|
+
data: recurrencePayload,
|
|
3285
|
+
});
|
|
3286
|
+
}
|
|
3287
|
+
updatePaymentMethod(data) {
|
|
3288
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/updateShoppingRecurrencePaymentMethod`, {
|
|
3289
|
+
data,
|
|
3290
|
+
});
|
|
3291
|
+
}
|
|
3292
|
+
getRecurrenceAvailableShipping(data) {
|
|
3293
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/getShoppingRecurrenceAvailableShipping`, {
|
|
3294
|
+
data,
|
|
3295
|
+
});
|
|
3296
|
+
}
|
|
3297
|
+
updateShippingAddress(data) {
|
|
3298
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/updateShoppingRecurrenceShippingAddress`, {
|
|
3299
|
+
data,
|
|
3300
|
+
});
|
|
3301
|
+
}
|
|
3302
|
+
cancelRecurrenceOrder(data) {
|
|
3303
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/cancelShoppingRecurrence`, {
|
|
3304
|
+
data,
|
|
3305
|
+
});
|
|
3306
|
+
}
|
|
3307
|
+
enableOrDisableRecurrenceOrder(recurrenceId, active) {
|
|
3308
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/enableOrDisableShoppingRecurrence`, {
|
|
3309
|
+
recurrenceId,
|
|
3310
|
+
active,
|
|
3311
|
+
});
|
|
3312
|
+
}
|
|
3313
|
+
skipRecurrenceOrder(recurrenceEditionId) {
|
|
3314
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/skipShoppingRecurrenceEdition`, {
|
|
3315
|
+
recurrenceEditionId,
|
|
3316
|
+
});
|
|
3317
|
+
}
|
|
3318
|
+
updateFrequency(recurrenceId, frequency) {
|
|
3319
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/updateShoppingRecurrenceFrequency`, {
|
|
3320
|
+
recurrenceId,
|
|
3321
|
+
frequency,
|
|
3322
|
+
});
|
|
3323
|
+
}
|
|
3324
|
+
updateLineItems(recurrenceId, lineItems) {
|
|
3325
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/updateShoppingRecurrenceLineItems`, {
|
|
3326
|
+
recurrenceId,
|
|
3327
|
+
lineItems,
|
|
3328
|
+
});
|
|
3329
|
+
}
|
|
3330
|
+
}
|
|
3331
|
+
OrderRecurrenceService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderRecurrenceService, deps: [{ token: 'ShoppingRecurrenceRepository' }, { token: DEFAULT_SHOP }, { token: CheckoutDependenciesFacade }, { token: ConfigurationFacade }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3332
|
+
OrderRecurrenceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderRecurrenceService });
|
|
3333
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderRecurrenceService, decorators: [{
|
|
3334
|
+
type: Injectable
|
|
3335
|
+
}], ctorParameters: function () { return [{ type: i3.ShoppingRecurrenceFirestoreRepository, decorators: [{
|
|
3336
|
+
type: Inject,
|
|
3337
|
+
args: ['ShoppingRecurrenceRepository']
|
|
3338
|
+
}] }, { type: i3.Shops, decorators: [{
|
|
3339
|
+
type: Inject,
|
|
3340
|
+
args: [DEFAULT_SHOP]
|
|
3341
|
+
}] }, { type: CheckoutDependenciesFacade }, { type: ConfigurationFacade }]; } });
|
|
3342
|
+
|
|
3275
3343
|
class OrderService {
|
|
3276
3344
|
constructor(angularFirestore, orderRepository) {
|
|
3277
3345
|
this.angularFirestore = angularFirestore;
|
|
@@ -3289,7 +3357,7 @@ OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
|
|
|
3289
3357
|
OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
|
|
3290
3358
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
|
|
3291
3359
|
type: Injectable
|
|
3292
|
-
}], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type:
|
|
3360
|
+
}], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type: i3.OrderFirestoreRepository, decorators: [{
|
|
3293
3361
|
type: Inject,
|
|
3294
3362
|
args: ['OrderRepository']
|
|
3295
3363
|
}] }]; } });
|
|
@@ -3336,7 +3404,7 @@ class AngularConnectModule {
|
|
|
3336
3404
|
}
|
|
3337
3405
|
}
|
|
3338
3406
|
AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3339
|
-
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$
|
|
3407
|
+
AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.0", ngImport: i0, type: AngularConnectModule, imports: [i1$3.FirebaseAppModule, i2.AppCheckModule, i3$1.StorageModule, AngularElasticSeachModule,
|
|
3340
3408
|
AngularVertexSeachModule,
|
|
3341
3409
|
AngularFirebaseAuthModule,
|
|
3342
3410
|
AngularFirestoreModule,
|
|
@@ -3409,6 +3477,7 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
3409
3477
|
CouponRepositoriesFacade,
|
|
3410
3478
|
HomeShopRepositoriesFacade,
|
|
3411
3479
|
OrderProductReviewService,
|
|
3480
|
+
OrderRecurrenceService
|
|
3412
3481
|
], imports: [provideFirebaseApp((injector) => {
|
|
3413
3482
|
const appName = injector.get(FIREBASE_APP_NAME);
|
|
3414
3483
|
try {
|
|
@@ -3552,6 +3621,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
3552
3621
|
CouponRepositoriesFacade,
|
|
3553
3622
|
HomeShopRepositoriesFacade,
|
|
3554
3623
|
OrderProductReviewService,
|
|
3624
|
+
OrderRecurrenceService
|
|
3555
3625
|
],
|
|
3556
3626
|
}]
|
|
3557
3627
|
}] });
|
|
@@ -3560,5 +3630,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
|
|
|
3560
3630
|
* Generated bundle index. Do not edit.
|
|
3561
3631
|
*/
|
|
3562
3632
|
|
|
3563
|
-
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CookieDataPersistence, CouponService, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderProductReviewService, OrderService, ProductSorts, UtilHelper, WishlistService };
|
|
3633
|
+
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CookieDataPersistence, CouponService, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderProductReviewService, OrderRecurrenceService, OrderService, ProductSorts, UtilHelper, WishlistService };
|
|
3564
3634
|
//# sourceMappingURL=infrab4a-connect-angular.mjs.map
|