-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* adapt types and tests to prepare for new NP api * rename and export public types * update generated doc * first implementation of registerMappings * adapt es archiver to convert legacy mappings * update generated doc * fix more tests * add unit tests * add legacy-compat unit test * add documentation and examples * Introduce SavedObjectTypeRegistry and SavedObjectType types * add and fix tests * expose createSerializer API and fix usages * remove registerMappings API, add internal registerType * revert changes to migration guide * adapt ES-archiver migrator creation * export serializer-related types * update generated doc * add and use convertTypesToLegacySchema * remove / move to internal some mapping types * fix forEach closure context * add missing docs * fix core path * some nits * fix so_mixin tests * fix integration tests * fix integration tests for real * add documentation on serializer + restructure files and types * nit * add and use the ISavedObjectTypeRegistry interface * Add documentation, deprecates migrationLogger#warning * better typing for SavedObjectsRawDoc._source * nits * update generated doc * remove exposition of SavedObjectsTypeMappingDefinitions, update doc * creates so internal contracts mocks * improve documentation
- Loading branch information
1 parent
7efcd61
commit 181862c
Showing
104 changed files
with
3,055 additions
and
944 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
13 changes: 13 additions & 0 deletions
13
docs/development/core/server/kibana-plugin-server.savedobjectmigrationfn.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,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectMigrationFn](./kibana-plugin-server.savedobjectmigrationfn.md) | ||
|
||
## SavedObjectMigrationFn type | ||
|
||
A migration function defined for a [saved objects type](./kibana-plugin-server.savedobjectstype.md) used to migrate it's | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type SavedObjectMigrationFn = (doc: SavedObjectUnsanitizedDoc, log: SavedObjectsMigrationLogger) => SavedObjectUnsanitizedDoc; | ||
``` |
27 changes: 27 additions & 0 deletions
27
docs/development/core/server/kibana-plugin-server.savedobjectmigrationmap.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,27 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectMigrationMap](./kibana-plugin-server.savedobjectmigrationmap.md) | ||
|
||
## SavedObjectMigrationMap interface | ||
|
||
A map of [migration functions](./kibana-plugin-server.savedobjectmigrationfn.md) to be used for a given type. The map's keys must be valid semver versions. | ||
|
||
For a given document, only migrations with a higher version number than that of the document will be applied. Migrations are executed in order, starting from the lowest version and ending with the highest one. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface SavedObjectMigrationMap | ||
``` | ||
|
||
## Example | ||
|
||
|
||
```typescript | ||
const migrations: SavedObjectMigrationMap = { | ||
'1.0.0': migrateToV1, | ||
'2.1.0': migrateToV21 | ||
} | ||
|
||
``` | ||
|
12 changes: 12 additions & 0 deletions
12
docs/development/core/server/kibana-plugin-server.savedobjectsanitizeddoc.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,12 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectSanitizedDoc](./kibana-plugin-server.savedobjectsanitizeddoc.md) | ||
|
||
## SavedObjectSanitizedDoc type | ||
|
||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type SavedObjectSanitizedDoc = SavedObjectDoc & Referencable; | ||
``` |
11 changes: 11 additions & 0 deletions
11
...ent/core/server/kibana-plugin-server.savedobjectscomplexfieldmapping.dynamic.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) > [SavedObjectsComplexFieldMapping](./kibana-plugin-server.savedobjectscomplexfieldmapping.md) > [dynamic](./kibana-plugin-server.savedobjectscomplexfieldmapping.dynamic.md) | ||
|
||
## SavedObjectsComplexFieldMapping.dynamic property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
dynamic?: string; | ||
``` |
22 changes: 22 additions & 0 deletions
22
...development/core/server/kibana-plugin-server.savedobjectscomplexfieldmapping.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,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsComplexFieldMapping](./kibana-plugin-server.savedobjectscomplexfieldmapping.md) | ||
|
||
## SavedObjectsComplexFieldMapping interface | ||
|
||
See [SavedObjectsFieldMapping](./kibana-plugin-server.savedobjectsfieldmapping.md) for documentation. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface SavedObjectsComplexFieldMapping | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [dynamic](./kibana-plugin-server.savedobjectscomplexfieldmapping.dynamic.md) | <code>string</code> | | | ||
| [properties](./kibana-plugin-server.savedobjectscomplexfieldmapping.properties.md) | <code>SavedObjectsMappingProperties</code> | | | ||
| [type](./kibana-plugin-server.savedobjectscomplexfieldmapping.type.md) | <code>string</code> | | | ||
|
11 changes: 11 additions & 0 deletions
11
.../core/server/kibana-plugin-server.savedobjectscomplexfieldmapping.properties.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) > [SavedObjectsComplexFieldMapping](./kibana-plugin-server.savedobjectscomplexfieldmapping.md) > [properties](./kibana-plugin-server.savedobjectscomplexfieldmapping.properties.md) | ||
|
||
## SavedObjectsComplexFieldMapping.properties property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
properties: SavedObjectsMappingProperties; | ||
``` |
11 changes: 11 additions & 0 deletions
11
...opment/core/server/kibana-plugin-server.savedobjectscomplexfieldmapping.type.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) > [SavedObjectsComplexFieldMapping](./kibana-plugin-server.savedobjectscomplexfieldmapping.md) > [type](./kibana-plugin-server.savedobjectscomplexfieldmapping.type.md) | ||
|
||
## SavedObjectsComplexFieldMapping.type property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
type?: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
...opment/core/server/kibana-plugin-server.savedobjectscorefieldmapping.enabled.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) > [SavedObjectsCoreFieldMapping](./kibana-plugin-server.savedobjectscorefieldmapping.md) > [enabled](./kibana-plugin-server.savedobjectscorefieldmapping.enabled.md) | ||
|
||
## SavedObjectsCoreFieldMapping.enabled property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
enabled?: boolean; | ||
``` |
15 changes: 15 additions & 0 deletions
15
...lopment/core/server/kibana-plugin-server.savedobjectscorefieldmapping.fields.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,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-server.savedobjectscorefieldmapping.md) > [fields](./kibana-plugin-server.savedobjectscorefieldmapping.fields.md) | ||
|
||
## SavedObjectsCoreFieldMapping.fields property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
fields?: { | ||
[subfield: string]: { | ||
type: string; | ||
}; | ||
}; | ||
``` |
11 changes: 11 additions & 0 deletions
11
...elopment/core/server/kibana-plugin-server.savedobjectscorefieldmapping.index.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) > [SavedObjectsCoreFieldMapping](./kibana-plugin-server.savedobjectscorefieldmapping.md) > [index](./kibana-plugin-server.savedobjectscorefieldmapping.index.md) | ||
|
||
## SavedObjectsCoreFieldMapping.index property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
index?: boolean; | ||
``` |
23 changes: 23 additions & 0 deletions
23
docs/development/core/server/kibana-plugin-server.savedobjectscorefieldmapping.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,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsCoreFieldMapping](./kibana-plugin-server.savedobjectscorefieldmapping.md) | ||
|
||
## SavedObjectsCoreFieldMapping interface | ||
|
||
See [SavedObjectsFieldMapping](./kibana-plugin-server.savedobjectsfieldmapping.md) for documentation. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface SavedObjectsCoreFieldMapping | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [enabled](./kibana-plugin-server.savedobjectscorefieldmapping.enabled.md) | <code>boolean</code> | | | ||
| [fields](./kibana-plugin-server.savedobjectscorefieldmapping.fields.md) | <code>{</code><br/><code> [subfield: string]: {</code><br/><code> type: string;</code><br/><code> };</code><br/><code> }</code> | | | ||
| [index](./kibana-plugin-server.savedobjectscorefieldmapping.index.md) | <code>boolean</code> | | | ||
| [type](./kibana-plugin-server.savedobjectscorefieldmapping.type.md) | <code>string</code> | | | ||
|
11 changes: 11 additions & 0 deletions
11
...velopment/core/server/kibana-plugin-server.savedobjectscorefieldmapping.type.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) > [SavedObjectsCoreFieldMapping](./kibana-plugin-server.savedobjectscorefieldmapping.md) > [type](./kibana-plugin-server.savedobjectscorefieldmapping.type.md) | ||
|
||
## SavedObjectsCoreFieldMapping.type property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
type: string; | ||
``` |
15 changes: 15 additions & 0 deletions
15
docs/development/core/server/kibana-plugin-server.savedobjectsfieldmapping.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,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-server](./kibana-plugin-server.md) > [SavedObjectsFieldMapping](./kibana-plugin-server.savedobjectsfieldmapping.md) | ||
|
||
## SavedObjectsFieldMapping type | ||
|
||
Describe a [saved object type mapping](./kibana-plugin-server.savedobjectstypemappingdefinition.md) field. | ||
|
||
Please refer to [elasticsearch documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html) For the mapping documentation | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare type SavedObjectsFieldMapping = SavedObjectsCoreFieldMapping | SavedObjectsComplexFieldMapping; | ||
``` |
Oops, something went wrong.