@opra/elastic 1.12.0 → 1.12.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opra/elastic",
3
- "version": "1.12.0",
3
+ "version": "1.12.1",
4
4
  "description": "Opra Elastic Search adapter package",
5
5
  "author": "Panates",
6
6
  "license": "MIT",
@@ -11,8 +11,8 @@
11
11
  },
12
12
  "peerDependencies": {
13
13
  "@elastic/elasticsearch": ">=8.7.0 <9",
14
- "@opra/common": "^1.12.0",
15
- "@opra/core": "^1.12.0"
14
+ "@opra/common": "^1.12.1",
15
+ "@opra/core": "^1.12.1"
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?: estypes.CreateRequest;
33
+ request?: CreateRequest;
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?: estypes.CountRequest;
45
+ request?: CountRequest;
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?: estypes.DeleteByQueryRequest;
56
+ request?: DeleteByQueryRequest;
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?: estypes.DeleteByQueryRequest;
67
+ request?: DeleteByQueryRequest;
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?: estypes.SearchRequest;
90
+ request?: SearchRequest;
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?: estypes.UpdateByQueryRequest;
111
+ request?: UpdateByQueryRequest;
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?: estypes.UpdateByQueryRequest;
122
+ request?: UpdateByQueryRequest;
123
123
  transport?: TransportRequestOptions;
124
124
  }
125
125
  interface CreateCommand extends StrictOmit<RequiredSome<CommandInfo, 'input'>, 'documentId'> {
@@ -144,7 +144,7 @@ export declare namespace ElasticEntityService {
144
144
  }
145
145
  interface SearchCommand extends StrictOmit<CommandInfo, 'input'> {
146
146
  crud: 'read';
147
- request: estypes.SearchRequest;
147
+ request: SearchRequest;
148
148
  options?: SearchOptions;
149
149
  }
150
150
  interface UpdateCommand<T> extends CommandInfo {
@@ -152,7 +152,18 @@ export declare namespace ElasticEntityService {
152
152
  input: PatchDTO<T>;
153
153
  options?: UpdateOneOptions;
154
154
  }
155
+ type CreateRequest = estypes.CreateRequest;
156
+ type CreateResponse = estypes.CreateResponse;
157
+ type CountRequest = estypes.CountRequest;
158
+ type CountResponse = estypes.CountResponse;
159
+ type DeleteByQueryRequest = estypes.DeleteByQueryRequest;
160
+ type DeleteByQueryResponse = estypes.DeleteByQueryResponse;
161
+ type SearchRequest = estypes.SearchRequest;
155
162
  type SearchResponse<T> = estypes.SearchResponse<T>;
163
+ type UpdateByQueryRequest = estypes.UpdateByQueryRequest;
164
+ type UpdateByQueryResponse = estypes.UpdateByQueryResponse;
165
+ type QueryDslQueryContainer = estypes.QueryDslQueryContainer;
166
+ type Script = estypes.Script;
156
167
  }
157
168
  /**
158
169
  * @class ElasticEntityService
@@ -220,28 +231,28 @@ export declare class ElasticEntityService<T extends object = any> extends Elasti
220
231
  * @param {ElasticEntityService.CreateCommand} command
221
232
  * @protected
222
233
  */
223
- protected _create(command: ElasticEntityService.CreateCommand): Promise<estypes.CreateResponse>;
234
+ protected _create(command: ElasticEntityService.CreateCommand): Promise<ElasticEntityService.CreateResponse>;
224
235
  /**
225
236
  * Returns the count of documents in the collection based on the provided options.
226
237
  *
227
238
  * @param {ElasticEntityService.CountCommand} command
228
239
  * @protected
229
240
  */
230
- protected _count(command: ElasticEntityService.CountCommand): Promise<estypes.CountResponse>;
241
+ protected _count(command: ElasticEntityService.CountCommand): Promise<ElasticEntityService.CountResponse>;
231
242
  /**
232
243
  * Deletes a document from the collection.
233
244
  *
234
245
  * @param {ElasticEntityService.DeleteCommand} command
235
246
  * @protected
236
247
  */
237
- protected _delete(command: ElasticEntityService.DeleteCommand): Promise<estypes.DeleteByQueryResponse>;
248
+ protected _delete(command: ElasticEntityService.DeleteCommand): Promise<ElasticEntityService.DeleteByQueryResponse>;
238
249
  /**
239
250
  * Deletes multiple documents from the collection that meet the specified filter criteria.
240
251
  *
241
252
  * @param {ElasticEntityService.DeleteManyCommand} command
242
253
  * @protected
243
254
  */
244
- protected _deleteMany(command: ElasticEntityService.DeleteManyCommand): Promise<estypes.DeleteByQueryResponse>;
255
+ protected _deleteMany(command: ElasticEntityService.DeleteManyCommand): Promise<ElasticEntityService.DeleteByQueryResponse>;
245
256
  /**
246
257
  * Returns search hits that match the query defined in the request
247
258
  *
@@ -260,7 +271,7 @@ export declare class ElasticEntityService<T extends object = any> extends Elasti
260
271
  *
261
272
  * @param {ElasticEntityService.UpdateCommand<T>} command
262
273
  */
263
- protected _updateMany(command: ElasticEntityService.UpdateCommand<T>): Promise<estypes.UpdateByQueryResponse>;
274
+ protected _updateMany(command: ElasticEntityService.UpdateCommand<T>): Promise<ElasticEntityService.UpdateByQueryResponse>;
264
275
  /**
265
276
  * Generates an ID.
266
277
  *
@@ -279,7 +290,7 @@ export declare class ElasticEntityService<T extends object = any> extends Elasti
279
290
  */
280
291
  getOutputCodec(operation: string): IsObject.Validator<T>;
281
292
  protected _executeCommand(command: ElasticEntityService.CommandInfo, commandFn: () => any): Promise<any>;
282
- protected _mergeQueries(requestQuery?: estypes.QueryDslQueryContainer, filterQuery?: estypes.QueryDslQueryContainer): estypes.QueryDslQueryContainer | undefined;
293
+ protected _mergeQueries(requestQuery?: ElasticEntityService.QueryDslQueryContainer, filterQuery?: ElasticEntityService.QueryDslQueryContainer): ElasticEntityService.QueryDslQueryContainer | undefined;
283
294
  protected _beforeCreate(command: ElasticEntityService.CreateCommand): Promise<void>;
284
295
  protected _beforeUpdate(command: ElasticEntityService.UpdateCommand<T>): Promise<void>;
285
296
  protected _beforeUpdateMany(command: ElasticEntityService.UpdateCommand<T>): Promise<void>;