-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server saved objects client through request context (#44143)
* Expose Saved Objects client in request context * API Integration test for savedobjects in req context * SavedObjectsClient docs * SavedObjectsClient#find remove dependency on indexPatterns And use the saved objects mappings instead * Review comments * Review comments, fixes and tests * Use correct type for KQL syntax check
- Loading branch information
Showing
54 changed files
with
743 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...evelopment/core/server/kibana-plugin-server.savedobjectsclient._constructor_.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) > [(constructor)](./kibana-plugin-server.savedobjectsclient._constructor_.md) | ||
|
||
## SavedObjectsClient.(constructor) | ||
|
||
Constructs a new instance of the `SavedObjectsClient` class | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
constructor(repository: SavedObjectsRepository); | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| repository | <code>SavedObjectsRepository</code> | | | ||
|
25 changes: 25 additions & 0 deletions
25
docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkcreate.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) > [bulkCreate](./kibana-plugin-server.savedobjectsclient.bulkcreate.md) | ||
|
||
## SavedObjectsClient.bulkCreate() method | ||
|
||
Persists multiple documents batched together as a single request | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
bulkCreate<T extends SavedObjectAttributes = any>(objects: Array<SavedObjectsBulkCreateObject<T>>, options?: SavedObjectsCreateOptions): Promise<SavedObjectsBulkResponse<T>>; | ||
``` | ||
## Parameters | ||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| objects | <code>Array<SavedObjectsBulkCreateObject<T>></code> | | | ||
| options | <code>SavedObjectsCreateOptions</code> | | | ||
<b>Returns:</b> | ||
`Promise<SavedObjectsBulkResponse<T>>` | ||
29 changes: 29 additions & 0 deletions
29
docs/development/core/server/kibana-plugin-server.savedobjectsclient.bulkget.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) > [bulkGet](./kibana-plugin-server.savedobjectsclient.bulkget.md) | ||
|
||
## SavedObjectsClient.bulkGet() method | ||
|
||
Returns an array of objects by id | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
bulkGet<T extends SavedObjectAttributes = any>(objects?: SavedObjectsBulkGetObject[], options?: SavedObjectsBaseOptions): Promise<SavedObjectsBulkResponse<T>>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| objects | <code>SavedObjectsBulkGetObject[]</code> | an array of ids, or an array of objects containing id, type and optionally fields | | ||
| options | <code>SavedObjectsBaseOptions</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`Promise<SavedObjectsBulkResponse<T>>` | ||
|
||
## Example | ||
|
||
bulkGet(\[ { id: 'one', type: 'config' }<!-- -->, { id: 'foo', type: 'index-pattern' } \]) | ||
|
26 changes: 26 additions & 0 deletions
26
docs/development/core/server/kibana-plugin-server.savedobjectsclient.create.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) > [create](./kibana-plugin-server.savedobjectsclient.create.md) | ||
|
||
## SavedObjectsClient.create() method | ||
|
||
Persists a SavedObject | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
create<T extends SavedObjectAttributes = any>(type: string, attributes: T, options?: SavedObjectsCreateOptions): Promise<SavedObject<T>>; | ||
``` | ||
## Parameters | ||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| type | <code>string</code> | | | ||
| attributes | <code>T</code> | | | ||
| options | <code>SavedObjectsCreateOptions</code> | | | ||
<b>Returns:</b> | ||
`Promise<SavedObject<T>>` | ||
26 changes: 26 additions & 0 deletions
26
docs/development/core/server/kibana-plugin-server.savedobjectsclient.delete.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) > [delete](./kibana-plugin-server.savedobjectsclient.delete.md) | ||
|
||
## SavedObjectsClient.delete() method | ||
|
||
Deletes a SavedObject | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
delete(type: string, id: string, options?: SavedObjectsBaseOptions): Promise<{}>; | ||
``` | ||
## Parameters | ||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| type | <code>string</code> | | | ||
| id | <code>string</code> | | | ||
| options | <code>SavedObjectsBaseOptions</code> | | | ||
<b>Returns:</b> | ||
`Promise<{}>` | ||
11 changes: 11 additions & 0 deletions
11
docs/development/core/server/kibana-plugin-server.savedobjectsclient.errors.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) > [errors](./kibana-plugin-server.savedobjectsclient.errors.md) | ||
|
||
## SavedObjectsClient.errors property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
static errors: typeof SavedObjectsErrorHelpers; | ||
``` |
24 changes: 24 additions & 0 deletions
24
docs/development/core/server/kibana-plugin-server.savedobjectsclient.find.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) > [find](./kibana-plugin-server.savedobjectsclient.find.md) | ||
|
||
## SavedObjectsClient.find() method | ||
|
||
Find all SavedObjects matching the search query | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
find<T extends SavedObjectAttributes = any>(options: SavedObjectsFindOptions): Promise<SavedObjectsFindResponse<T>>; | ||
``` | ||
## Parameters | ||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| options | <code>SavedObjectsFindOptions</code> | | | ||
<b>Returns:</b> | ||
`Promise<SavedObjectsFindResponse<T>>` | ||
Oops, something went wrong.