@infrab4a/connect-angular 5.8.0-beta.0 → 5.8.0-beta.1

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.
@@ -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$4 from '@angular/fire/app';
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 i1$3 from '@infrab4a/connect';
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: i1$3.Shops, decorators: [{
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: i1$3.Shops, decorators: [{
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: i1$3.Shops, decorators: [{
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: i1$3.Shops, decorators: [{
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: i1$3.Shops, decorators: [{
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: i1$3.Shops, decorators: [{
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: i1$3.OrderFirestoreRepository, decorators: [{
3256
+ }], ctorParameters: function () { return [{ type: i3.OrderFirestoreRepository, decorators: [{
3262
3257
  type: Inject,
3263
3258
  args: ['OrderRepository']
3264
3259
  }] }, { type: undefined, decorators: [{
@@ -3267,11 +3262,53 @@ 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: i1$3.Shops, decorators: [{
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
+ createRecurrenceOrder(recurrencePayload) {
3280
+ return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/createShoppingRecurrence`, {
3281
+ data: recurrencePayload,
3282
+ });
3283
+ }
3284
+ updatePaymentMethod(data) {
3285
+ return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/shoppingRecurrenceUpdatePaymentMethod`, {
3286
+ data,
3287
+ });
3288
+ }
3289
+ getRecurrenceAvailableShipping(data) {
3290
+ return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/getShoppingRecurrenceAvailableShipping`, {
3291
+ data,
3292
+ });
3293
+ }
3294
+ updateShippingAddress(data) {
3295
+ return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/updateShoppingRecurrenceShippingAddress`, {
3296
+ data,
3297
+ });
3298
+ }
3299
+ }
3300
+ 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 });
3301
+ OrderRecurrenceService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderRecurrenceService });
3302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderRecurrenceService, decorators: [{
3303
+ type: Injectable
3304
+ }], ctorParameters: function () { return [{ type: i3.ShoppingRecurrenceFirestoreRepository, decorators: [{
3305
+ type: Inject,
3306
+ args: ['ShoppingRecurrenceRepository']
3307
+ }] }, { type: i3.Shops, decorators: [{
3308
+ type: Inject,
3309
+ args: [DEFAULT_SHOP]
3310
+ }] }, { type: CheckoutDependenciesFacade }, { type: ConfigurationFacade }]; } });
3311
+
3275
3312
  class OrderService {
3276
3313
  constructor(angularFirestore, orderRepository) {
3277
3314
  this.angularFirestore = angularFirestore;
@@ -3289,7 +3326,7 @@ OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
3289
3326
  OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService });
3290
3327
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImport: i0, type: OrderService, decorators: [{
3291
3328
  type: Injectable
3292
- }], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type: i1$3.OrderFirestoreRepository, decorators: [{
3329
+ }], ctorParameters: function () { return [{ type: i1$1.Firestore }, { type: i3.OrderFirestoreRepository, decorators: [{
3293
3330
  type: Inject,
3294
3331
  args: ['OrderRepository']
3295
3332
  }] }]; } });
@@ -3336,7 +3373,7 @@ class AngularConnectModule {
3336
3373
  }
3337
3374
  }
3338
3375
  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$4.FirebaseAppModule, i2.AppCheckModule, i3.StorageModule, AngularElasticSeachModule,
3376
+ 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
3377
  AngularVertexSeachModule,
3341
3378
  AngularFirebaseAuthModule,
3342
3379
  AngularFirestoreModule,
@@ -3409,6 +3446,7 @@ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
3409
3446
  CouponRepositoriesFacade,
3410
3447
  HomeShopRepositoriesFacade,
3411
3448
  OrderProductReviewService,
3449
+ OrderRecurrenceService
3412
3450
  ], imports: [provideFirebaseApp((injector) => {
3413
3451
  const appName = injector.get(FIREBASE_APP_NAME);
3414
3452
  try {
@@ -3552,6 +3590,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
3552
3590
  CouponRepositoriesFacade,
3553
3591
  HomeShopRepositoriesFacade,
3554
3592
  OrderProductReviewService,
3593
+ OrderRecurrenceService
3555
3594
  ],
3556
3595
  }]
3557
3596
  }] });
@@ -3560,5 +3599,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.0", ngImpor
3560
3599
  * Generated bundle index. Do not edit.
3561
3600
  */
3562
3601
 
3563
- export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CookieDataPersistence, CouponService, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderProductReviewService, OrderService, ProductSorts, UtilHelper, WishlistService };
3602
+ export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CookieDataPersistence, CouponService, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderProductReviewService, OrderRecurrenceService, OrderService, ProductSorts, UtilHelper, WishlistService };
3564
3603
  //# sourceMappingURL=infrab4a-connect-angular.mjs.map