@infrab4a/connect 4.1.3-beta.0 → 4.1.3

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/index.cjs.js CHANGED
@@ -2524,12 +2524,10 @@ class ProductsIndex {
2524
2524
  'rate',
2525
2525
  ];
2526
2526
  const filter = [{ term: { published: true } }];
2527
- if (size > 9) {
2528
- fields.push(...['pricePaid', 'isGift', 'stock', 'weight', 'tags']);
2529
- }
2530
- else {
2527
+ if (shop && shop !== exports.Shops.ALL)
2531
2528
  filter.push({ term: { tags: shop == exports.Shops.GLAMSHOP ? 'feminino' : 'masculino' } });
2532
- }
2529
+ if (size > 9)
2530
+ fields.push(...['pricePaid', 'isGift', 'stock', 'weight', 'tags']);
2533
2531
  const search = await this.adapter.query(this.index, {
2534
2532
  size,
2535
2533
  _source: fields,
@@ -2538,18 +2536,7 @@ class ProductsIndex {
2538
2536
  must: {
2539
2537
  multi_match: {
2540
2538
  query: `${searchTerm}`,
2541
- type: 'bool_prefix',
2542
- fields: [
2543
- 'name',
2544
- 'name.folded',
2545
- 'name.search',
2546
- 'description',
2547
- 'description.search',
2548
- 'description.folded',
2549
- 'brand',
2550
- 'brand.search',
2551
- 'brand.folded',
2552
- ],
2539
+ fields: ['name', 'name.folded', 'name.search', 'description', 'brand'],
2553
2540
  fuzziness: 2,
2554
2541
  },
2555
2542
  },
package/index.esm.js CHANGED
@@ -2500,12 +2500,10 @@ class ProductsIndex {
2500
2500
  'rate',
2501
2501
  ];
2502
2502
  const filter = [{ term: { published: true } }];
2503
- if (size > 9) {
2504
- fields.push(...['pricePaid', 'isGift', 'stock', 'weight', 'tags']);
2505
- }
2506
- else {
2503
+ if (shop && shop !== Shops.ALL)
2507
2504
  filter.push({ term: { tags: shop == Shops.GLAMSHOP ? 'feminino' : 'masculino' } });
2508
- }
2505
+ if (size > 9)
2506
+ fields.push(...['pricePaid', 'isGift', 'stock', 'weight', 'tags']);
2509
2507
  const search = await this.adapter.query(this.index, {
2510
2508
  size,
2511
2509
  _source: fields,
@@ -2514,18 +2512,7 @@ class ProductsIndex {
2514
2512
  must: {
2515
2513
  multi_match: {
2516
2514
  query: `${searchTerm}`,
2517
- type: 'bool_prefix',
2518
- fields: [
2519
- 'name',
2520
- 'name.folded',
2521
- 'name.search',
2522
- 'description',
2523
- 'description.search',
2524
- 'description.folded',
2525
- 'brand',
2526
- 'brand.search',
2527
- 'brand.folded',
2528
- ],
2515
+ fields: ['name', 'name.folded', 'name.search', 'description', 'brand'],
2529
2516
  fuzziness: 2,
2530
2517
  },
2531
2518
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.1.3-beta.0",
3
+ "version": "4.1.3",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -2,7 +2,6 @@ export * from './banner.type';
2
2
  export * from './benefit.type';
3
3
  export * from './campaign-page';
4
4
  export * from './home-data.type';
5
- export * from './landing-page';
6
5
  export * from './menu-nav.type';
7
6
  export * from './sections.type';
8
7
  export * from './shop-banner.type';
@@ -10,7 +9,6 @@ export * from './shop-brands.type';
10
9
  export * from './shop-carousel.type';
11
10
  export * from './shop-collection.type';
12
11
  export * from './shop-gift.type';
13
- export * from './shop-home';
14
12
  export * from './shop-post.type';
15
13
  export * from './shop-section.type';
16
14
  export * from './sub-menu.type';
@@ -1,4 +1,3 @@
1
- import { LandingPage } from './landing-page';
2
1
  import { ShopBanner } from './shop-banner.type';
3
2
  import { ShopCarousel } from './shop-carousel.type';
4
3
  import { ShopGift } from './shop-gift.type';
@@ -18,7 +17,6 @@ export type GlampointsVitrineShopSection = [ShopBanner];
18
17
  export type SimpleLPShopSection = [(ShopBanner & {
19
18
  carouselColor?: string;
20
19
  })[]];
21
- export type LandingPageSection = [LandingPage<any>];
22
20
  export type SectionList = {
23
21
  HomeSection: HomeSection;
24
22
  LPClubeShopSection: LPClubeShopSection;
@@ -29,6 +27,5 @@ export type SectionList = {
29
27
  PostsShopSection: PostsShopSection;
30
28
  GlampointsVitrineShopSection: GlampointsVitrineShopSection;
31
29
  SimpleLPShopSection: SimpleLPShopSection;
32
- LandingPageSection: LandingPageSection;
33
30
  };
34
31
  export type Section<T extends keyof SectionList> = SectionList[T];
@@ -1,8 +0,0 @@
1
- import { ShopBanner } from './shop-banner.type';
2
- import { ShopCarousel } from './shop-carousel.type';
3
- import { ShopSection } from './shop-section.type';
4
- export type LandingPageList = {
5
- ShopCarousel: ShopCarousel;
6
- ShopBanner: ShopBanner;
7
- };
8
- export type LandingPage<T extends keyof LandingPageList> = LandingPageList[T] & ShopSection;
package/teste2.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};