@vendure/elasticsearch-plugin 2.1.0-next.6 → 2.1.0
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/lib/src/options.d.ts +6 -6
- package/lib/src/plugin.d.ts +3 -3
- package/lib/src/plugin.js +3 -3
- package/package.json +4 -4
package/lib/src/options.d.ts
CHANGED
|
@@ -188,7 +188,7 @@ export interface ElasticsearchOptions {
|
|
|
188
188
|
* ```
|
|
189
189
|
*
|
|
190
190
|
* @example
|
|
191
|
-
* ```
|
|
191
|
+
* ```graphql
|
|
192
192
|
* query SearchProducts($input: SearchInput!) {
|
|
193
193
|
* search(input: $input) {
|
|
194
194
|
* totalItems
|
|
@@ -220,7 +220,7 @@ export interface ElasticsearchOptions {
|
|
|
220
220
|
* the `customProductMappings` field, which is always available.
|
|
221
221
|
*
|
|
222
222
|
* @example
|
|
223
|
-
* ```
|
|
223
|
+
* ```graphql
|
|
224
224
|
* query SearchProducts($input: SearchInput!) {
|
|
225
225
|
* search(input: $input) {
|
|
226
226
|
* totalItems
|
|
@@ -310,7 +310,7 @@ export interface ElasticsearchOptions {
|
|
|
310
310
|
* This allows the search query to include these new fields:
|
|
311
311
|
*
|
|
312
312
|
* @example
|
|
313
|
-
* ```
|
|
313
|
+
* ```graphql
|
|
314
314
|
* query {
|
|
315
315
|
* search(input: {
|
|
316
316
|
* longitude: 101.7117,
|
|
@@ -414,7 +414,7 @@ export interface SearchConfig {
|
|
|
414
414
|
* The interval used to group search results into buckets according to price range. For example, setting this to
|
|
415
415
|
* `2000` will group into buckets every $20.00:
|
|
416
416
|
*
|
|
417
|
-
* ```
|
|
417
|
+
* ```json
|
|
418
418
|
* {
|
|
419
419
|
* "data": {
|
|
420
420
|
* "search": {
|
|
@@ -556,7 +556,7 @@ export interface SearchConfig {
|
|
|
556
556
|
* If neither of those are applied it will be empty.
|
|
557
557
|
*
|
|
558
558
|
* @example
|
|
559
|
-
* ```
|
|
559
|
+
* ```ts
|
|
560
560
|
* mapSort: (sort, input) => {
|
|
561
561
|
* // Assuming `extendSearchSortType: ["priority"]`
|
|
562
562
|
* // Assuming priority is never undefined
|
|
@@ -577,7 +577,7 @@ export interface SearchConfig {
|
|
|
577
577
|
*
|
|
578
578
|
* A more generic example would be a sort function based on a product location like this:
|
|
579
579
|
* @example
|
|
580
|
-
* ```
|
|
580
|
+
* ```ts
|
|
581
581
|
* extendSearchInputType: {
|
|
582
582
|
* latitude: 'Float',
|
|
583
583
|
* longitude: 'Float',
|
package/lib/src/plugin.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ import { ElasticsearchOptions } from './options';
|
|
|
46
46
|
*
|
|
47
47
|
* The [SearchResponse](/reference/graphql-api/admin/object-types/#searchresponse) type is extended with information
|
|
48
48
|
* about price ranges in the result set:
|
|
49
|
-
* ```
|
|
49
|
+
* ```graphql
|
|
50
50
|
* extend type SearchResponse {
|
|
51
51
|
* prices: SearchResponsePriceData!
|
|
52
52
|
* }
|
|
@@ -78,7 +78,7 @@ import { ElasticsearchOptions } from './options';
|
|
|
78
78
|
*
|
|
79
79
|
* ## Example Request & Response
|
|
80
80
|
*
|
|
81
|
-
* ```
|
|
81
|
+
* ```graphql
|
|
82
82
|
* {
|
|
83
83
|
* search (input: {
|
|
84
84
|
* term: "table easel"
|
|
@@ -113,7 +113,7 @@ import { ElasticsearchOptions } from './options';
|
|
|
113
113
|
* }
|
|
114
114
|
* ```
|
|
115
115
|
*
|
|
116
|
-
* ```
|
|
116
|
+
* ```json
|
|
117
117
|
*{
|
|
118
118
|
* "data": {
|
|
119
119
|
* "search": {
|
package/lib/src/plugin.js
CHANGED
|
@@ -77,7 +77,7 @@ function getCustomResolvers(options) {
|
|
|
77
77
|
*
|
|
78
78
|
* The [SearchResponse](/reference/graphql-api/admin/object-types/#searchresponse) type is extended with information
|
|
79
79
|
* about price ranges in the result set:
|
|
80
|
-
* ```
|
|
80
|
+
* ```graphql
|
|
81
81
|
* extend type SearchResponse {
|
|
82
82
|
* prices: SearchResponsePriceData!
|
|
83
83
|
* }
|
|
@@ -109,7 +109,7 @@ function getCustomResolvers(options) {
|
|
|
109
109
|
*
|
|
110
110
|
* ## Example Request & Response
|
|
111
111
|
*
|
|
112
|
-
* ```
|
|
112
|
+
* ```graphql
|
|
113
113
|
* {
|
|
114
114
|
* search (input: {
|
|
115
115
|
* term: "table easel"
|
|
@@ -144,7 +144,7 @@ function getCustomResolvers(options) {
|
|
|
144
144
|
* }
|
|
145
145
|
* ```
|
|
146
146
|
*
|
|
147
|
-
* ```
|
|
147
|
+
* ```json
|
|
148
148
|
*{
|
|
149
149
|
* "data": {
|
|
150
150
|
* "search": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/elasticsearch-plugin",
|
|
3
|
-
"version": "2.1.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"fast-deep-equal": "^3.1.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@vendure/common": "2.1.0
|
|
30
|
-
"@vendure/core": "2.1.0
|
|
29
|
+
"@vendure/common": "^2.1.0",
|
|
30
|
+
"@vendure/core": "^2.1.0",
|
|
31
31
|
"rimraf": "^3.0.2",
|
|
32
32
|
"typescript": "4.9.5"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "d476d377c93837f573d0bee5dbbf89c52f906a0f"
|
|
35
35
|
}
|