Skip to content

Commit eda424a

Browse files
[7.x] Improve search typescript (#69333) (#71021)
* Improve search typescript (#69333) * [search] Refactor the way search strategies are registered/retrieved on the server * Fix types and tests and update docs * Fix failing test * Fix build of example plugin * Fix functional test * Make server strategies sync * Move strategy name into options * docs * Remove FE strategies * TypeScript of hell delete search explorer * Fix search interceptor OSS tests * typos * test cleanup * Delete search example fix interceptor async tests to use fake timers * docs * fix * return search wrapper * Update search interceptor tests and abort utils * ts * jest test fix * code review * change how logs consume search API Co-authored-by: Lukas Olson <olson.lukas@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> # Conflicts: # src/plugins/data/public/public.api.md * docs * Fix merge Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent f4747c1 commit eda424a

File tree

105 files changed

+1054
-3056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1054
-3056
lines changed

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.getsearchparamsfromrequest.md

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,7 @@
1010
export declare function getSearchParamsFromRequest(searchRequest: SearchRequest, dependencies: {
1111
injectedMetadata: CoreStart['injectedMetadata'];
1212
uiSettings: IUiSettingsClient;
13-
}): {
14-
rest_total_hits_as_int: boolean;
15-
ignore_unavailable: boolean;
16-
ignore_throttled: boolean;
17-
max_concurrent_shard_requests: any;
18-
preference: any;
19-
timeout: string | undefined;
20-
index: any;
21-
body: any;
22-
};
13+
}): ISearchRequestParams;
2314
```
2415

2516
## Parameters
@@ -31,14 +22,5 @@ export declare function getSearchParamsFromRequest(searchRequest: SearchRequest,
3122

3223
<b>Returns:</b>
3324

34-
`{
35-
rest_total_hits_as_int: boolean;
36-
ignore_unavailable: boolean;
37-
ignore_throttled: boolean;
38-
max_concurrent_shard_requests: any;
39-
preference: any;
40-
timeout: string | undefined;
41-
index: any;
42-
body: any;
43-
}`
25+
`ISearchRequestParams`
4426

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ export interface IEsSearchRequest extends IKibanaSearchRequest
1515
| Property | Type | Description |
1616
| --- | --- | --- |
1717
| [indexType](./kibana-plugin-plugins-data-public.iessearchrequest.indextype.md) | <code>string</code> | |
18-
| [params](./kibana-plugin-plugins-data-public.iessearchrequest.params.md) | <code>SearchParams</code> | |
18+
| [params](./kibana-plugin-plugins-data-public.iessearchrequest.params.md) | <code>ISearchRequestParams</code> | |
1919

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchrequest.params.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
<b>Signature:</b>
88

99
```typescript
10-
params: SearchParams;
10+
params?: ISearchRequestParams;
1111
```

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<b>Signature:</b>
88

99
```typescript
10-
export interface IEsSearchResponse<Hits = unknown> extends IKibanaSearchResponse
10+
export interface IEsSearchResponse extends IKibanaSearchResponse
1111
```
1212
1313
## Properties
1414
1515
| Property | Type | Description |
1616
| --- | --- | --- |
17-
| [rawResponse](./kibana-plugin-plugins-data-public.iessearchresponse.rawresponse.md) | <code>SearchResponse&lt;Hits&gt;</code> | |
17+
| [rawResponse](./kibana-plugin-plugins-data-public.iessearchresponse.rawresponse.md) | <code>SearchResponse&lt;any&gt;</code> | |
1818

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iessearchresponse.rawresponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
<b>Signature:</b>
88

99
```typescript
10-
rawResponse: SearchResponse<Hits>;
10+
rawResponse: SearchResponse<any>;
1111
```

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.es.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.irequesttypesmap.sync_search_strategy.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.es.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

docs/development/plugins/data/public/kibana-plugin-plugins-data-public.iresponsetypesmap.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)