@infrab4a/connect 4.3.6-beta.6 → 4.3.6-beta.7

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
@@ -2602,37 +2602,21 @@ class ProductsIndex {
2602
2602
  _source: fields,
2603
2603
  query: {
2604
2604
  bool: {
2605
- should: [
2606
- {
2607
- multi_match: {
2608
- query: `${searchTerm}`,
2609
- fields: ['name', 'name.folded', 'name.search'],
2610
- operator: 'AND',
2611
- },
2612
- },
2613
- {
2614
- match_phrase: {
2615
- name: {
2616
- query: `${searchTerm}`,
2617
- boost: 2,
2618
- },
2619
- },
2605
+ must: {
2606
+ multi_match: {
2607
+ query: `${searchTerm}`,
2608
+ fields: ['name', 'name.folded', 'name.search', 'description', 'brand'],
2609
+ fuzziness: 2,
2620
2610
  },
2621
- {
2622
- match: {
2623
- brand: {
2624
- query: `${searchTerm}`,
2625
- },
2626
- },
2627
- },
2628
- {
2629
- multi_match: {
2611
+ },
2612
+ should: {
2613
+ match_phrase_prefix: {
2614
+ 'name.search': {
2630
2615
  query: `${searchTerm}`,
2631
- fields: ['name', 'name.folded', 'name.search'],
2632
- operator: 'OR',
2616
+ slop: 10,
2633
2617
  },
2634
2618
  },
2635
- ],
2619
+ },
2636
2620
  filter,
2637
2621
  },
2638
2622
  },
@@ -4755,7 +4739,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4755
4739
  }
4756
4740
  }
4757
4741
  async getChildren(parentId) {
4758
- const { category_tree } = await this.query('category_tree', ['id', 'name', 'parent_id'], {
4742
+ const { category_tree } = await this.query('category_tree', ['id', 'name', 'parent_id', 'slug'], {
4759
4743
  args: {
4760
4744
  type: 'category_tree_args',
4761
4745
  value: { parentid: parentId },
package/index.esm.js CHANGED
@@ -2578,37 +2578,21 @@ class ProductsIndex {
2578
2578
  _source: fields,
2579
2579
  query: {
2580
2580
  bool: {
2581
- should: [
2582
- {
2583
- multi_match: {
2584
- query: `${searchTerm}`,
2585
- fields: ['name', 'name.folded', 'name.search'],
2586
- operator: 'AND',
2587
- },
2588
- },
2589
- {
2590
- match_phrase: {
2591
- name: {
2592
- query: `${searchTerm}`,
2593
- boost: 2,
2594
- },
2595
- },
2581
+ must: {
2582
+ multi_match: {
2583
+ query: `${searchTerm}`,
2584
+ fields: ['name', 'name.folded', 'name.search', 'description', 'brand'],
2585
+ fuzziness: 2,
2596
2586
  },
2597
- {
2598
- match: {
2599
- brand: {
2600
- query: `${searchTerm}`,
2601
- },
2602
- },
2603
- },
2604
- {
2605
- multi_match: {
2587
+ },
2588
+ should: {
2589
+ match_phrase_prefix: {
2590
+ 'name.search': {
2606
2591
  query: `${searchTerm}`,
2607
- fields: ['name', 'name.folded', 'name.search'],
2608
- operator: 'OR',
2592
+ slop: 10,
2609
2593
  },
2610
2594
  },
2611
- ],
2595
+ },
2612
2596
  filter,
2613
2597
  },
2614
2598
  },
@@ -4731,7 +4715,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
4731
4715
  }
4732
4716
  }
4733
4717
  async getChildren(parentId) {
4734
- const { category_tree } = await this.query('category_tree', ['id', 'name', 'parent_id'], {
4718
+ const { category_tree } = await this.query('category_tree', ['id', 'name', 'parent_id', 'slug'], {
4735
4719
  args: {
4736
4720
  type: 'category_tree_args',
4737
4721
  value: { parentid: parentId },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infrab4a/connect",
3
- "version": "4.3.6-beta.6",
3
+ "version": "4.3.6-beta.7",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org"
6
6
  },
@@ -1,6 +1,7 @@
1
1
  export * from './campaign';
2
2
  export * from './campaign-banner';
3
3
  export * from './home';
4
+ export * from './menu';
4
5
  export * from './shop-menu';
5
6
  export * from './shop-settings';
6
7
  export * from './types';
@@ -0,0 +1,8 @@
1
+ type MenuChildren = {
2
+ id: string;
3
+ name: string;
4
+ slug: string;
5
+ children?: MenuChildren;
6
+ };
7
+ export type Menu = MenuChildren[];
8
+ export {};
@@ -11,6 +11,7 @@ export declare class CheckoutSubscription extends BaseModel<CheckoutSubscription
11
11
  userId?: string;
12
12
  discount?: number;
13
13
  subTotalPrice?: number;
14
+ shippingPrice?: number;
14
15
  totalPrice?: number;
15
16
  shippingAddress: UserAddress;
16
17
  billingAddress?: UserAddress;