@haus-storefront-react/vendure-plugin-configs 0.0.32-1 → 0.0.32-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/elastic.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './lib/exports/elastic'
2
+ export {}
package/elastic.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CATkY-bf.js"),i=new e.VendurePluginConfig({name:"vendure-elastic-search",queryUpdates:{search:{fields:[{prices:[{range:["min","max"],rangeWithTax:["min","max"]}]}]},searchField:{fields:[{prices:[{range:["min","max"],rangeWithTax:["min","max"]}]}]}}});exports.VendureElasticSearchPlugin=i;
package/elastic.mjs ADDED
@@ -0,0 +1,25 @@
1
+ import { V as e } from "./index-Wcc0o6jA.mjs";
2
+ const i = new e({
3
+ name: "vendure-elastic-search",
4
+ queryUpdates: {
5
+ search: {
6
+ fields: [{
7
+ prices: [{
8
+ range: ["min", "max"],
9
+ rangeWithTax: ["min", "max"]
10
+ }]
11
+ }]
12
+ },
13
+ searchField: {
14
+ fields: [{
15
+ prices: [{
16
+ range: ["min", "max"],
17
+ rangeWithTax: ["min", "max"]
18
+ }]
19
+ }]
20
+ }
21
+ }
22
+ });
23
+ export {
24
+ i as VendureElasticSearchPlugin
25
+ };
@@ -0,0 +1,31 @@
1
+ declare module '@haus-storefront-react/shared-types' {
2
+ interface SearchResult {
3
+ prices: SearchResponsePriceData;
4
+ }
5
+ interface SearchInput {
6
+ priceRange?: Maybe<PriceRangeInput>;
7
+ priceRangeWithTax?: Maybe<PriceRangeInput>;
8
+ inStock?: Maybe<boolean>;
9
+ }
10
+ interface FilterInputs {
11
+ priceRange?: PriceRangeInput;
12
+ priceRangeWithTax?: PriceRangeInput;
13
+ }
14
+ interface SearchResponsePriceData {
15
+ range: PriceRange;
16
+ rangeWithTax: PriceRange;
17
+ }
18
+ interface SearchInputProps {
19
+ priceRange?: PriceRangeInput;
20
+ priceRangeWithTax?: PriceRangeInput;
21
+ }
22
+ interface PriceRangeBucket {
23
+ to: number;
24
+ count: number;
25
+ }
26
+ type PriceRangeInput = {
27
+ max: number;
28
+ min: number;
29
+ };
30
+ }
31
+ export {};
@@ -0,0 +1,38 @@
1
+ import { VendurePluginConfig } from '../plugin-config';
2
+ export declare const VendureElasticSearchPlugin: VendurePluginConfig<Partial<{
3
+ showBadges: (props: {
4
+ product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
5
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
6
+ parentComponent?: keyof import('./vendure-badge-plugin.types').BadgePluginSettings["availablePositions"];
7
+ badges: import('@haus-storefront-react/shared-types').Maybe<import('@haus-storefront-react/shared-types').Badge[]>;
8
+ }) => {
9
+ badges: import('@haus-storefront-react/shared-types').Badge[];
10
+ availablePositions?: string[];
11
+ };
12
+ showCampaignPrices: boolean;
13
+ ordinaryPrice: (props: {
14
+ product?: import('@haus-storefront-react/shared-types').Product;
15
+ searchResult?: import('@haus-storefront-react/shared-types').SearchResult;
16
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
17
+ orderLine?: import('@haus-storefront-react/shared-types').OrderLine;
18
+ identifier?: string;
19
+ }) => import('@haus-storefront-react/shared-types').Price;
20
+ changeQuantityByPackageSize: (props: {
21
+ product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
22
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
23
+ identifier: string;
24
+ }) => boolean;
25
+ showPackageSize: (props: {
26
+ product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
27
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
28
+ identifier: string;
29
+ }) => boolean;
30
+ showCostPerPackage: (props: {
31
+ product?: import('@haus-storefront-react/shared-types').Product | import('@haus-storefront-react/shared-types').SearchResult;
32
+ variant?: import('@haus-storefront-react/shared-types').ProductVariant;
33
+ identifier: string;
34
+ }) => boolean;
35
+ sortByPopularity: boolean;
36
+ }>, Record<string, (...args: any[]) => any>, {
37
+ [x: string]: any;
38
+ }, import('@haus-storefront-react/shared-types').IGraphQLSDK>;
@@ -2,3 +2,4 @@ export * from '../configs/vendure-badge-plugin.augmentation';
2
2
  export * from '../configs/vendure-campaign-plugin.augmentation';
3
3
  export * from '../configs/vendure-packagesize-plugin.augmentation';
4
4
  export * from '../configs/vendure-product-popularity-plugin.augmentation';
5
+ export * from '../configs/vendure-elastic-search-plugin.augmentation';
@@ -0,0 +1 @@
1
+ export * from '../configs/vendure-elastic-search-plugin';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haus-storefront-react/vendure-plugin-configs",
3
- "version": "0.0.32-1",
3
+ "version": "0.0.32-3",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -21,6 +21,12 @@
21
21
  "require": "./badge.js",
22
22
  "default": "./badge"
23
23
  },
24
+ "./elastic": {
25
+ "types": "./lib/exports/elastic.d.ts",
26
+ "import": "./elastic.mjs",
27
+ "require": "./elastic.js",
28
+ "default": "./elastic"
29
+ },
24
30
  "./campaign": {
25
31
  "types": "./lib/exports/campaign.d.ts",
26
32
  "import": "./campaign.mjs",
@@ -41,8 +47,8 @@
41
47
  }
42
48
  },
43
49
  "dependencies": {
44
- "@haus-storefront-react/common-utils": "0.0.32-1",
45
- "@haus-storefront-react/core": "0.0.32-1",
46
- "@haus-storefront-react/shared-types": "0.0.32-1"
50
+ "@haus-storefront-react/common-utils": "0.0.32-3",
51
+ "@haus-storefront-react/core": "0.0.32-3",
52
+ "@haus-storefront-react/shared-types": "0.0.32-3"
47
53
  }
48
54
  }