@infrab4a/connect-angular 5.8.3 → 5.8.5

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.
@@ -3111,6 +3111,17 @@ class HomeShopService {
3111
3111
  getMinValueForFreeShipping() {
3112
3112
  return this.getHomeConfiguration().pipe(map((home) => home.minValueForFreeShipping));
3113
3113
  }
3114
+ /**
3115
+ * Retorna os thresholds de frete grátis estruturados configurados no documento
3116
+ * Home (`shippingThresholds`). Quando o documento ainda não possui essa
3117
+ * estrutura, retorna um default conservador equivalente à regra legada
3118
+ * (edition: 50, avulsoSp: 99, avulsoOutro: null) para que consumidores não
3119
+ * quebrem durante a migração.
3120
+ */
3121
+ getShippingThresholds() {
3122
+ const conservativeDefault = { edition: 50, avulsoSp: 99, avulsoOutro: null };
3123
+ return this.getHomeConfiguration().pipe(map((home) => home.shippingThresholds ?? conservativeDefault));
3124
+ }
3114
3125
  getDiscoverProducts(_gender) {
3115
3126
  return this.getHomeConfiguration().pipe(concatMap((home) => from(this.repositoriesFacade.categoryRepository.getCategoriesForHome({
3116
3127
  categoryIds: home.discoverCategories,