@infrab4a/connect 5.7.2 → 5.7.4

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",
3
- "version": "5.7.2",
3
+ "version": "5.7.4",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -1,5 +1,5 @@
1
1
  import { BaseModel, GenericIdentifier } from '../../generic/model';
2
- import { Banner, Benefit, HomeDataStructure, ShopSameDayNotAvailable } from './types';
2
+ import { Banner, Benefit, HomeDataStructure, ShopSameDayNotAvailable, ShippingThresholds } from './types';
3
3
  export declare class Home extends BaseModel<Home> {
4
4
  benefitsSection: Benefit[];
5
5
  blockBanners: Banner[];
@@ -15,5 +15,6 @@ export declare class Home extends BaseModel<Home> {
15
15
  data: HomeDataStructure;
16
16
  minValueForFreeShipping: number;
17
17
  sameDayNotAvaliable: ShopSameDayNotAvailable;
18
+ shippingThresholds?: ShippingThresholds;
18
19
  static get identifiersFields(): GenericIdentifier[];
19
20
  }
@@ -17,4 +17,5 @@ export * from './shop-home';
17
17
  export * from './shop-post.type';
18
18
  export * from './shop-sameday-not-available';
19
19
  export * from './shop-section.type';
20
+ export * from './shipping-thresholds.type';
20
21
  export * from './sub-menu.type';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Thresholds de frete grátis configurados no documento Home (Firestore `dms/glamshop`).
3
+ *
4
+ * - `edition`: valor mínimo para frete grátis "junto com a edição" (assinante com
5
+ * edição pendente).
6
+ * - `avulsoSp`: valor mínimo para frete grátis avulso no estado de São Paulo.
7
+ * - `avulsoOutro`: valor mínimo para frete grátis avulso nos demais estados
8
+ * (`null` quando não há frete grátis fora de SP).
9
+ *
10
+ * Todos os campos são opcionais para preservar compatibilidade com documentos
11
+ * Home que ainda não possuam essa estrutura.
12
+ */
13
+ export interface ShippingThresholds {
14
+ edition?: number;
15
+ avulsoSp?: number;
16
+ avulsoOutro?: number | null;
17
+ }