@opra/elastic 1.12.1 → 1.12.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.
|
@@ -337,6 +337,7 @@ class ElasticEntityService extends elastic_service_js_1.ElasticService {
|
|
|
337
337
|
* @param operation - The operation to retrieve the encoder for. Valid values are 'create' and 'update'.
|
|
338
338
|
*/
|
|
339
339
|
_getInputCodec(operation) {
|
|
340
|
+
const dataType = this.dataType;
|
|
340
341
|
const cacheKey = operation + (this._dataTypeScope ? ':' + this._dataTypeScope : '');
|
|
341
342
|
let validator = this._inputCodecs[cacheKey];
|
|
342
343
|
if (validator)
|
|
@@ -349,7 +350,6 @@ class ElasticEntityService extends elastic_service_js_1.ElasticService {
|
|
|
349
350
|
options.partial = 'deep';
|
|
350
351
|
options.keepKeyFields = true;
|
|
351
352
|
}
|
|
352
|
-
const dataType = this.dataType;
|
|
353
353
|
validator = dataType.generateCodec('decode', options);
|
|
354
354
|
this._inputCodecs[cacheKey] = validator;
|
|
355
355
|
return validator;
|
|
@@ -334,6 +334,7 @@ export class ElasticEntityService extends ElasticService {
|
|
|
334
334
|
* @param operation - The operation to retrieve the encoder for. Valid values are 'create' and 'update'.
|
|
335
335
|
*/
|
|
336
336
|
_getInputCodec(operation) {
|
|
337
|
+
const dataType = this.dataType;
|
|
337
338
|
const cacheKey = operation + (this._dataTypeScope ? ':' + this._dataTypeScope : '');
|
|
338
339
|
let validator = this._inputCodecs[cacheKey];
|
|
339
340
|
if (validator)
|
|
@@ -346,7 +347,6 @@ export class ElasticEntityService extends ElasticService {
|
|
|
346
347
|
options.partial = 'deep';
|
|
347
348
|
options.keepKeyFields = true;
|
|
348
349
|
}
|
|
349
|
-
const dataType = this.dataType;
|
|
350
350
|
validator = dataType.generateCodec('decode', options);
|
|
351
351
|
this._inputCodecs[cacheKey] = validator;
|
|
352
352
|
return validator;
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opra/elastic",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.3",
|
|
4
4
|
"description": "Opra Elastic Search adapter package",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@jsopen/objects": "^1.5.2",
|
|
9
9
|
"tslib": "^2.8.1",
|
|
10
|
-
"valgen": "^5.13.
|
|
10
|
+
"valgen": "^5.13.3"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"@elastic/elasticsearch": ">=8.7.0 <9",
|
|
14
|
-
"@opra/common": "^1.12.
|
|
15
|
-
"@opra/core": "^1.12.
|
|
14
|
+
"@opra/common": "^1.12.3",
|
|
15
|
+
"@opra/core": "^1.12.3"
|
|
16
16
|
},
|
|
17
17
|
"type": "module",
|
|
18
18
|
"exports": {
|
|
@@ -30,7 +30,7 @@ export declare namespace ElasticEntityService {
|
|
|
30
30
|
* @interface
|
|
31
31
|
*/
|
|
32
32
|
interface CreateOptions {
|
|
33
|
-
request?: CreateRequest
|
|
33
|
+
request?: StrictOmit<CreateRequest, 'id' | 'index' | 'document'>;
|
|
34
34
|
transport?: TransportRequestOptions;
|
|
35
35
|
replaceIfExists?: boolean;
|
|
36
36
|
}
|
|
@@ -42,7 +42,7 @@ export declare namespace ElasticEntityService {
|
|
|
42
42
|
*/
|
|
43
43
|
interface CountOptions {
|
|
44
44
|
filter?: ElasticAdapter.FilterInput;
|
|
45
|
-
request?: CountRequest
|
|
45
|
+
request?: StrictOmit<CountRequest, 'index'>;
|
|
46
46
|
transport?: TransportRequestOptions;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
@@ -53,7 +53,7 @@ export declare namespace ElasticEntityService {
|
|
|
53
53
|
*/
|
|
54
54
|
interface DeleteOptions {
|
|
55
55
|
filter?: ElasticAdapter.FilterInput;
|
|
56
|
-
request?: DeleteByQueryRequest
|
|
56
|
+
request?: StrictOmit<DeleteByQueryRequest, 'index'>;
|
|
57
57
|
transport?: TransportRequestOptions;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
@@ -64,7 +64,7 @@ export declare namespace ElasticEntityService {
|
|
|
64
64
|
*/
|
|
65
65
|
interface DeleteManyOptions {
|
|
66
66
|
filter?: ElasticAdapter.FilterInput;
|
|
67
|
-
request?: DeleteByQueryRequest
|
|
67
|
+
request?: StrictOmit<DeleteByQueryRequest, 'index'>;
|
|
68
68
|
transport?: TransportRequestOptions;
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -87,7 +87,7 @@ export declare namespace ElasticEntityService {
|
|
|
87
87
|
sort?: string[];
|
|
88
88
|
limit?: number;
|
|
89
89
|
skip?: number;
|
|
90
|
-
request?: SearchRequest
|
|
90
|
+
request?: StrictOmit<SearchRequest, 'index' | 'from' | 'size' | 'sort' | '_source'>;
|
|
91
91
|
transport?: TransportRequestOptions;
|
|
92
92
|
noDecode?: boolean;
|
|
93
93
|
}
|
|
@@ -108,7 +108,7 @@ export declare namespace ElasticEntityService {
|
|
|
108
108
|
*/
|
|
109
109
|
interface UpdateOneOptions {
|
|
110
110
|
filter?: ElasticAdapter.FilterInput;
|
|
111
|
-
request?: UpdateByQueryRequest
|
|
111
|
+
request?: StrictOmit<UpdateByQueryRequest, 'index'>;
|
|
112
112
|
transport?: TransportRequestOptions;
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
@@ -119,7 +119,7 @@ export declare namespace ElasticEntityService {
|
|
|
119
119
|
*/
|
|
120
120
|
interface UpdateManyOptions {
|
|
121
121
|
filter?: ElasticAdapter.FilterInput;
|
|
122
|
-
request?: UpdateByQueryRequest
|
|
122
|
+
request?: StrictOmit<UpdateByQueryRequest, 'index'>;
|
|
123
123
|
transport?: TransportRequestOptions;
|
|
124
124
|
}
|
|
125
125
|
interface CreateCommand extends StrictOmit<RequiredSome<CommandInfo, 'input'>, 'documentId'> {
|