@infrab4a/connect-angular 5.7.5-beta.0 → 5.7.5-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.
|
@@ -3,12 +3,12 @@ import { NgModule, InjectionToken, PLATFORM_ID, Injectable, Inject } from '@angu
|
|
|
3
3
|
import { FirebaseApp, provideFirebaseApp, getApp, initializeApp } from '@angular/fire/app';
|
|
4
4
|
import { provideAppCheck, initializeAppCheck } from '@angular/fire/app-check';
|
|
5
5
|
import { Storage, provideStorage, getStorage } from '@angular/fire/storage';
|
|
6
|
-
import * as
|
|
7
|
-
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ConnectFirestoreService, CategoryFirestoreRepository, ProductFirestoreRepository, ProductVariantFirestoreRepository, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, GroupFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, OrderBlockedFirestoreRepository, LogFirestoreRepository, SequenceFirestoreRepository, BrandCategoryFirestoreRepository, ShopConfigsFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, CategoryFilterHasuraGraphQLRepository, ProductReviewHasuraGraphQLRepository, VariantHasuraGraphQLRepository, ProductStockNotificationHasuraGraphQLRepository, FilterOptionHasuraGraphQLRepository, FilterHasuraGraphQLRepository, CategoryCollectionChildrenHasuraGraphQLRepository, CategoryProductHasuraGraphQLRepository, WishlistHasuraGraphQLRepository, ProductErrorsHasuraGraphQLRepository, ProductCatalogHasuraGraphQLRepository, ProductStockEntryHasuraGraphQLRepository, 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';
|
|
6
|
+
import * as i3 from '@infrab4a/connect';
|
|
7
|
+
import { ProductsIndex, AxiosAdapter, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ConnectFirestoreService, CategoryFirestoreRepository, ProductFirestoreRepository, ProductVariantFirestoreRepository, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, CampaignHashtagFirestoreRepository, CampaignDashboardFirestoreRepository, SubscriptionEditionFirestoreRepository, GroupFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ShoppingRecurrenceFirestoreRepository, ShoppingRecurrenceEditionFirestoreRepository, ShopSettingsFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, SubscriptionMaterializationFirestoreRepository, SubscriptionSummaryFirestoreRepository, 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';
|
|
8
8
|
import * as i1 from '@angular/fire/auth';
|
|
9
9
|
import { Auth, provideAuth, initializeAuth, indexedDBLocalPersistence, browserLocalPersistence, browserSessionPersistence, getAuth, getIdToken, authState } from '@angular/fire/auth';
|
|
10
10
|
import { isPlatformServer, isPlatformBrowser } from '@angular/common';
|
|
11
|
-
import * as i1$
|
|
11
|
+
import * as i1$2 from '@angular/fire/firestore';
|
|
12
12
|
import { Firestore, provideFirestore, initializeFirestore, memoryLocalCache, docSnapshots, doc } from '@angular/fire/firestore';
|
|
13
13
|
import cookie from 'js-cookie';
|
|
14
14
|
import { of, from, combineLatest, throwError, Subject, forkJoin } from 'rxjs';
|
|
@@ -367,6 +367,20 @@ class AngularFirestoreModule {
|
|
|
367
367
|
},
|
|
368
368
|
deps: ['FirestoreOptions'],
|
|
369
369
|
},
|
|
370
|
+
{
|
|
371
|
+
provide: 'ShoppingRecurrenceRepository',
|
|
372
|
+
useFactory: (options) => {
|
|
373
|
+
return new ShoppingRecurrenceFirestoreRepository(options);
|
|
374
|
+
},
|
|
375
|
+
deps: ['FirestoreOptions'],
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
provide: 'ShoppingRecurrenceEditionRepository',
|
|
379
|
+
useFactory: (options) => {
|
|
380
|
+
return new ShoppingRecurrenceEditionFirestoreRepository(options);
|
|
381
|
+
},
|
|
382
|
+
deps: ['FirestoreOptions'],
|
|
383
|
+
},
|
|
370
384
|
{
|
|
371
385
|
provide: ProductFirestoreRepository,
|
|
372
386
|
useFactory: (options) => {
|
|
@@ -640,6 +654,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
640
654
|
},
|
|
641
655
|
deps: ['FirestoreOptions'],
|
|
642
656
|
},
|
|
657
|
+
{
|
|
658
|
+
provide: 'ShoppingRecurrenceRepository',
|
|
659
|
+
useFactory: (options) => {
|
|
660
|
+
return new ShoppingRecurrenceFirestoreRepository(options);
|
|
661
|
+
},
|
|
662
|
+
deps: ['FirestoreOptions'],
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
provide: 'ShoppingRecurrenceEditionRepository',
|
|
666
|
+
useFactory: (options) => {
|
|
667
|
+
return new ShoppingRecurrenceEditionFirestoreRepository(options);
|
|
668
|
+
},
|
|
669
|
+
deps: ['FirestoreOptions'],
|
|
670
|
+
},
|
|
643
671
|
{
|
|
644
672
|
provide: ProductFirestoreRepository,
|
|
645
673
|
useFactory: (options) => {
|
|
@@ -949,6 +977,28 @@ class AngularHasuraGraphQLModule {
|
|
|
949
977
|
provide: 'ProductStockEntryRepository',
|
|
950
978
|
useExisting: ProductStockEntryHasuraGraphQLRepository,
|
|
951
979
|
},
|
|
980
|
+
{
|
|
981
|
+
provide: ProductGroupHasuraGraphQLRepository,
|
|
982
|
+
useFactory: (options) => {
|
|
983
|
+
return new ProductGroupHasuraGraphQLRepository(options);
|
|
984
|
+
},
|
|
985
|
+
deps: ['HasuraConfig'],
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
provide: 'ProductGroupRepository',
|
|
989
|
+
useExisting: ProductGroupHasuraGraphQLRepository,
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
provide: ProductPriceLogHasuraGraphQLRepository,
|
|
993
|
+
useFactory: (options) => {
|
|
994
|
+
return new ProductPriceLogHasuraGraphQLRepository(options);
|
|
995
|
+
},
|
|
996
|
+
deps: ['HasuraConfig'],
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
provide: 'ProductPriceLogRepository',
|
|
1000
|
+
useExisting: ProductPriceLogHasuraGraphQLRepository,
|
|
1001
|
+
},
|
|
952
1002
|
] }); }
|
|
953
1003
|
}
|
|
954
1004
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
|
|
@@ -1131,6 +1181,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
1131
1181
|
provide: 'ProductStockEntryRepository',
|
|
1132
1182
|
useExisting: ProductStockEntryHasuraGraphQLRepository,
|
|
1133
1183
|
},
|
|
1184
|
+
{
|
|
1185
|
+
provide: ProductGroupHasuraGraphQLRepository,
|
|
1186
|
+
useFactory: (options) => {
|
|
1187
|
+
return new ProductGroupHasuraGraphQLRepository(options);
|
|
1188
|
+
},
|
|
1189
|
+
deps: ['HasuraConfig'],
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
provide: 'ProductGroupRepository',
|
|
1193
|
+
useExisting: ProductGroupHasuraGraphQLRepository,
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
provide: ProductPriceLogHasuraGraphQLRepository,
|
|
1197
|
+
useFactory: (options) => {
|
|
1198
|
+
return new ProductPriceLogHasuraGraphQLRepository(options);
|
|
1199
|
+
},
|
|
1200
|
+
deps: ['HasuraConfig'],
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
provide: 'ProductPriceLogRepository',
|
|
1204
|
+
useExisting: ProductPriceLogHasuraGraphQLRepository,
|
|
1205
|
+
},
|
|
1134
1206
|
],
|
|
1135
1207
|
}]
|
|
1136
1208
|
}] });
|
|
@@ -1264,7 +1336,7 @@ class ConfigurationFacade {
|
|
|
1264
1336
|
}
|
|
1265
1337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ConfigurationFacade, decorators: [{
|
|
1266
1338
|
type: Injectable
|
|
1267
|
-
}], ctorParameters: () => [{ type:
|
|
1339
|
+
}], ctorParameters: () => [{ type: i3.Shops, decorators: [{
|
|
1268
1340
|
type: Inject,
|
|
1269
1341
|
args: [DEFAULT_SHOP]
|
|
1270
1342
|
}] }, { type: undefined, decorators: [{
|
|
@@ -1322,10 +1394,24 @@ class CheckoutService {
|
|
|
1322
1394
|
})));
|
|
1323
1395
|
}
|
|
1324
1396
|
selectShippingAddress(address) {
|
|
1397
|
+
const formattedAddress = {
|
|
1398
|
+
...address,
|
|
1399
|
+
zip: this.formatZip(address.zip),
|
|
1400
|
+
};
|
|
1325
1401
|
return this.getCheckout().pipe(concatMap((checkout) => {
|
|
1326
|
-
return this.repositoriesFacade.checkoutRepository.update(Checkout.toInstance({
|
|
1402
|
+
return this.repositoriesFacade.checkoutRepository.update(Checkout.toInstance({
|
|
1403
|
+
id: checkout.id,
|
|
1404
|
+
shippingAddress: formattedAddress,
|
|
1405
|
+
billingAddress: formattedAddress,
|
|
1406
|
+
}));
|
|
1327
1407
|
}));
|
|
1328
1408
|
}
|
|
1409
|
+
formatZip(zip) {
|
|
1410
|
+
if (!zip)
|
|
1411
|
+
return zip;
|
|
1412
|
+
const digits = zip.replace(/\D/g, '');
|
|
1413
|
+
return digits;
|
|
1414
|
+
}
|
|
1329
1415
|
getAvailableShippingForProduct(productShipping) {
|
|
1330
1416
|
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/checkoutGetAvailableShipping`, {
|
|
1331
1417
|
checkoutId: null,
|
|
@@ -1861,7 +1947,7 @@ class CatalogServiceFacade {
|
|
|
1861
1947
|
}
|
|
1862
1948
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CatalogServiceFacade, decorators: [{
|
|
1863
1949
|
type: Injectable
|
|
1864
|
-
}], ctorParameters: () => [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type:
|
|
1950
|
+
}], ctorParameters: () => [{ type: CatalogHelpersService }, { type: CatalogStrategiesFacade }, { type: i3.Shops, decorators: [{
|
|
1865
1951
|
type: Inject,
|
|
1866
1952
|
args: [DEFAULT_SHOP]
|
|
1867
1953
|
}] }] });
|
|
@@ -1914,7 +2000,7 @@ class CategoryService {
|
|
|
1914
2000
|
}
|
|
1915
2001
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CategoryService, decorators: [{
|
|
1916
2002
|
type: Injectable
|
|
1917
|
-
}], ctorParameters: () => [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
2003
|
+
}], ctorParameters: () => [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
1918
2004
|
type: Inject,
|
|
1919
2005
|
args: [DEFAULT_SHOP]
|
|
1920
2006
|
}] }] });
|
|
@@ -1952,7 +2038,7 @@ class CategoryServiceFacade {
|
|
|
1952
2038
|
}
|
|
1953
2039
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CategoryServiceFacade, decorators: [{
|
|
1954
2040
|
type: Injectable
|
|
1955
|
-
}], ctorParameters: () => [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type:
|
|
2041
|
+
}], ctorParameters: () => [{ type: CategoryRepositoryFacade }, { type: ProductCatalogFacade }, { type: i3.Shops, decorators: [{
|
|
1956
2042
|
type: Inject,
|
|
1957
2043
|
args: [DEFAULT_SHOP]
|
|
1958
2044
|
}] }] });
|
|
@@ -2334,7 +2420,7 @@ class CatalogService {
|
|
|
2334
2420
|
}
|
|
2335
2421
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: CatalogService, decorators: [{
|
|
2336
2422
|
type: Injectable
|
|
2337
|
-
}], ctorParameters: () => [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type:
|
|
2423
|
+
}], ctorParameters: () => [{ type: CatalogSearchContext }, { type: CatalogHelpersService }, { type: i3.Shops, decorators: [{
|
|
2338
2424
|
type: Inject,
|
|
2339
2425
|
args: [DEFAULT_SHOP]
|
|
2340
2426
|
}] }] });
|
|
@@ -2605,7 +2691,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
2605
2691
|
}] }, { type: undefined, decorators: [{
|
|
2606
2692
|
type: Inject,
|
|
2607
2693
|
args: ['LogRepository']
|
|
2608
|
-
}] }, { type:
|
|
2694
|
+
}] }, { type: i3.Shops, decorators: [{
|
|
2609
2695
|
type: Inject,
|
|
2610
2696
|
args: [DEFAULT_SHOP]
|
|
2611
2697
|
}] }] });
|
|
@@ -3020,6 +3106,17 @@ class HomeShopService {
|
|
|
3020
3106
|
getMinValueForFreeShipping() {
|
|
3021
3107
|
return this.getHomeConfiguration().pipe(map((home) => home.minValueForFreeShipping));
|
|
3022
3108
|
}
|
|
3109
|
+
/**
|
|
3110
|
+
* Retorna os thresholds de frete grátis estruturados configurados no documento
|
|
3111
|
+
* Home (`shippingThresholds`). Quando o documento ainda não possui essa
|
|
3112
|
+
* estrutura, retorna um default conservador equivalente à regra legada
|
|
3113
|
+
* (edition: 50, avulsoSp: 99, avulsoOutro: null) para que consumidores não
|
|
3114
|
+
* quebrem durante a migração.
|
|
3115
|
+
*/
|
|
3116
|
+
getShippingThresholds() {
|
|
3117
|
+
const conservativeDefault = { edition: 50, avulsoSp: 99, avulsoOutro: null };
|
|
3118
|
+
return this.getHomeConfiguration().pipe(map((home) => home.shippingThresholds ?? conservativeDefault));
|
|
3119
|
+
}
|
|
3023
3120
|
getDiscoverProducts(_gender) {
|
|
3024
3121
|
return this.getHomeConfiguration().pipe(concatMap((home) => from(this.repositoriesFacade.categoryRepository.getCategoriesForHome({
|
|
3025
3122
|
categoryIds: home.discoverCategories,
|
|
@@ -3176,7 +3273,7 @@ class OrderProductReviewService {
|
|
|
3176
3273
|
}
|
|
3177
3274
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OrderProductReviewService, decorators: [{
|
|
3178
3275
|
type: Injectable
|
|
3179
|
-
}], ctorParameters: () => [{ type:
|
|
3276
|
+
}], ctorParameters: () => [{ type: i3.OrderFirestoreRepository, decorators: [{
|
|
3180
3277
|
type: Inject,
|
|
3181
3278
|
args: ['OrderRepository']
|
|
3182
3279
|
}] }, { type: undefined, decorators: [{
|
|
@@ -3185,11 +3282,84 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
3185
3282
|
}] }, { type: undefined, decorators: [{
|
|
3186
3283
|
type: Inject,
|
|
3187
3284
|
args: ['VariantRepository']
|
|
3188
|
-
}] }, { type:
|
|
3285
|
+
}] }, { type: i3.Shops, decorators: [{
|
|
3189
3286
|
type: Inject,
|
|
3190
3287
|
args: [DEFAULT_SHOP]
|
|
3191
3288
|
}] }] });
|
|
3192
3289
|
|
|
3290
|
+
class OrderRecurrenceService {
|
|
3291
|
+
constructor(shoppingRecurrenceRepository, defaultShop, dependenciesFacade, configurationFacade) {
|
|
3292
|
+
this.shoppingRecurrenceRepository = shoppingRecurrenceRepository;
|
|
3293
|
+
this.defaultShop = defaultShop;
|
|
3294
|
+
this.dependenciesFacade = dependenciesFacade;
|
|
3295
|
+
this.configurationFacade = configurationFacade;
|
|
3296
|
+
this.checkoutUrl = null;
|
|
3297
|
+
this.checkoutUrl = this.configurationFacade.getCheckoutUrl();
|
|
3298
|
+
}
|
|
3299
|
+
getRecurrenceOrder(recurrenceId) {
|
|
3300
|
+
return from(this.shoppingRecurrenceRepository.get({ id: recurrenceId }));
|
|
3301
|
+
}
|
|
3302
|
+
createRecurrenceOrder(recurrencePayload) {
|
|
3303
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/createShoppingRecurrence`, {
|
|
3304
|
+
data: recurrencePayload,
|
|
3305
|
+
});
|
|
3306
|
+
}
|
|
3307
|
+
updatePaymentMethod(data) {
|
|
3308
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/updateShoppingRecurrencePaymentMethod`, {
|
|
3309
|
+
data,
|
|
3310
|
+
});
|
|
3311
|
+
}
|
|
3312
|
+
getRecurrenceAvailableShipping(data) {
|
|
3313
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/getShoppingRecurrenceAvailableShipping`, {
|
|
3314
|
+
data,
|
|
3315
|
+
});
|
|
3316
|
+
}
|
|
3317
|
+
updateShippingAddress(data) {
|
|
3318
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/updateShoppingRecurrenceShippingAddress`, {
|
|
3319
|
+
data,
|
|
3320
|
+
});
|
|
3321
|
+
}
|
|
3322
|
+
cancelRecurrenceOrder(data) {
|
|
3323
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/cancelShoppingRecurrence`, {
|
|
3324
|
+
data,
|
|
3325
|
+
});
|
|
3326
|
+
}
|
|
3327
|
+
enableOrDisableRecurrenceOrder(recurrenceId, active) {
|
|
3328
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/enableOrDisableShoppingRecurrence`, {
|
|
3329
|
+
recurrenceId,
|
|
3330
|
+
active,
|
|
3331
|
+
});
|
|
3332
|
+
}
|
|
3333
|
+
skipRecurrenceOrder(recurrenceEditionId) {
|
|
3334
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/skipShoppingRecurrenceEdition`, {
|
|
3335
|
+
recurrenceEditionId,
|
|
3336
|
+
});
|
|
3337
|
+
}
|
|
3338
|
+
updateFrequency(recurrenceId, frequency) {
|
|
3339
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/updateShoppingRecurrenceFrequency`, {
|
|
3340
|
+
recurrenceId,
|
|
3341
|
+
frequency,
|
|
3342
|
+
});
|
|
3343
|
+
}
|
|
3344
|
+
updateLineItems(recurrenceId, lineItems) {
|
|
3345
|
+
return this.dependenciesFacade.httpClient.post(`${this.checkoutUrl}/updateShoppingRecurrenceLineItems`, {
|
|
3346
|
+
recurrenceId,
|
|
3347
|
+
lineItems,
|
|
3348
|
+
});
|
|
3349
|
+
}
|
|
3350
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OrderRecurrenceService, deps: [{ token: 'ShoppingRecurrenceRepository' }, { token: DEFAULT_SHOP }, { token: CheckoutDependenciesFacade }, { token: ConfigurationFacade }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3351
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OrderRecurrenceService }); }
|
|
3352
|
+
}
|
|
3353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OrderRecurrenceService, decorators: [{
|
|
3354
|
+
type: Injectable
|
|
3355
|
+
}], ctorParameters: () => [{ type: i3.ShoppingRecurrenceFirestoreRepository, decorators: [{
|
|
3356
|
+
type: Inject,
|
|
3357
|
+
args: ['ShoppingRecurrenceRepository']
|
|
3358
|
+
}] }, { type: i3.Shops, decorators: [{
|
|
3359
|
+
type: Inject,
|
|
3360
|
+
args: [DEFAULT_SHOP]
|
|
3361
|
+
}] }, { type: CheckoutDependenciesFacade }, { type: ConfigurationFacade }] });
|
|
3362
|
+
|
|
3193
3363
|
class OrderService {
|
|
3194
3364
|
constructor(angularFirestore, orderRepository) {
|
|
3195
3365
|
this.angularFirestore = angularFirestore;
|
|
@@ -3202,12 +3372,12 @@ class OrderService {
|
|
|
3202
3372
|
.subscribe((doc) => this.orderSubject.next(doc));
|
|
3203
3373
|
return this.orderSubject;
|
|
3204
3374
|
}
|
|
3205
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OrderService, deps: [{ token: i1$
|
|
3375
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OrderService, deps: [{ token: i1$2.Firestore }, { token: 'OrderRepository' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3206
3376
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OrderService }); }
|
|
3207
3377
|
}
|
|
3208
3378
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: OrderService, decorators: [{
|
|
3209
3379
|
type: Injectable
|
|
3210
|
-
}], ctorParameters: () => [{ type: i1$
|
|
3380
|
+
}], ctorParameters: () => [{ type: i1$2.Firestore }, { type: i3.OrderFirestoreRepository, decorators: [{
|
|
3211
3381
|
type: Inject,
|
|
3212
3382
|
args: ['OrderRepository']
|
|
3213
3383
|
}] }] });
|
|
@@ -3356,6 +3526,7 @@ class AngularConnectModule {
|
|
|
3356
3526
|
CouponRepositoriesFacade,
|
|
3357
3527
|
HomeShopRepositoriesFacade,
|
|
3358
3528
|
OrderProductReviewService,
|
|
3529
|
+
OrderRecurrenceService
|
|
3359
3530
|
], imports: [AngularElasticSeachModule,
|
|
3360
3531
|
AngularVertexSeachModule,
|
|
3361
3532
|
AngularFirebaseAuthModule,
|
|
@@ -3470,6 +3641,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
3470
3641
|
CouponRepositoriesFacade,
|
|
3471
3642
|
HomeShopRepositoriesFacade,
|
|
3472
3643
|
OrderProductReviewService,
|
|
3644
|
+
OrderRecurrenceService
|
|
3473
3645
|
],
|
|
3474
3646
|
}]
|
|
3475
3647
|
}] });
|
|
@@ -3478,5 +3650,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
3478
3650
|
* Generated bundle index. Do not edit.
|
|
3479
3651
|
*/
|
|
3480
3652
|
|
|
3481
|
-
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CookieDataPersistence, CouponService, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderProductReviewService, OrderService, ProductSorts, UtilHelper, WishlistService };
|
|
3653
|
+
export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CatalogService, CategoryService, CategoryWithTree, CheckoutService, CheckoutSubscriptionService, CookieDataPersistence, CouponService, HomeShopService, NewCategoryStructureAdapter, OldCategoryStructureAdapter, OrderProductReviewService, OrderRecurrenceService, OrderService, ProductSorts, UtilHelper, WishlistService };
|
|
3482
3654
|
//# sourceMappingURL=infrab4a-connect-angular.mjs.map
|