Skip to content

Commit

Permalink
Expose SO import/export APIs from the service's contract instead of e…
Browse files Browse the repository at this point in the history
…xporting static functions (#86264)

* Add user doc for SO tagging

* add link to new page

* handle review feedbacks

* second pass

* create SO exporter class

* adapt spaces code

* typo fix

* adapt tests

* some doc

* update generated doc

* fix spaces tests

* move ALL the import things

* adapt / move types

* create context, adapt core code

* adapt integration tests

* rename for consistency

* adapt spaces usages

* adapt spaces routes usages

* remove unused getImportExportObjectLimit

* fix tsdoc

* update generated doc

* doc nits

* review comments

* add test for fetchByObjects failure

* add custom errors for exporter

* remove `getImportExportObjectLimit` API

* fix IT

* update generated doc

* adapt UT

* forgot one Boom usage

* rename import error to failure

* remove Boom usages from importer

* update generated doc

* fix spaces types
  • Loading branch information
pgayvallet authored Jan 7, 2021
1 parent ba20a74 commit f597119
Show file tree
Hide file tree
Showing 173 changed files with 3,085 additions and 2,183 deletions.
2 changes: 1 addition & 1 deletion docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectsFindResponsePublic](./kibana-plugin-core-public.savedobjectsfindresponsepublic.md) | Return type of the Saved Objects <code>find()</code> method.<!-- -->\*Note\*: this type is different between the Public and Server Saved Objects clients. |
| [SavedObjectsImportAmbiguousConflictError](./kibana-plugin-core-public.savedobjectsimportambiguousconflicterror.md) | Represents a failure to import due to a conflict, which can be resolved in different ways with an overwrite. |
| [SavedObjectsImportConflictError](./kibana-plugin-core-public.savedobjectsimportconflicterror.md) | Represents a failure to import due to a conflict. |
| [SavedObjectsImportError](./kibana-plugin-core-public.savedobjectsimporterror.md) | Represents a failure to import. |
| [SavedObjectsImportFailure](./kibana-plugin-core-public.savedobjectsimportfailure.md) | Represents a failure to import. |
| [SavedObjectsImportMissingReferencesError](./kibana-plugin-core-public.savedobjectsimportmissingreferenceserror.md) | Represents a failure to import due to missing references. |
| [SavedObjectsImportResponse](./kibana-plugin-core-public.savedobjectsimportresponse.md) | The response describing the result of an import. |
| [SavedObjectsImportRetry](./kibana-plugin-core-public.savedobjectsimportretry.md) | Describes a retry operation for importing a saved object. |
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-core-public.savedobjectsimporterror.md) &gt; [error](./kibana-plugin-core-public.savedobjectsimporterror.error.md)
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportFailure](./kibana-plugin-core-public.savedobjectsimportfailure.md) &gt; [error](./kibana-plugin-core-public.savedobjectsimportfailure.error.md)

## SavedObjectsImportError.error property
## SavedObjectsImportFailure.error property

<b>Signature:</b>

Expand Down
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) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportFailure](./kibana-plugin-core-public.savedobjectsimportfailure.md) &gt; [id](./kibana-plugin-core-public.savedobjectsimportfailure.id.md)

## SavedObjectsImportFailure.id property

<b>Signature:</b>

```typescript
id: string;
```
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) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportFailure](./kibana-plugin-core-public.savedobjectsimportfailure.md)

## SavedObjectsImportFailure interface

Represents a failure to import.

<b>Signature:</b>

```typescript
export interface SavedObjectsImportFailure
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [error](./kibana-plugin-core-public.savedobjectsimportfailure.error.md) | <code>SavedObjectsImportConflictError &#124; SavedObjectsImportAmbiguousConflictError &#124; SavedObjectsImportUnsupportedTypeError &#124; SavedObjectsImportMissingReferencesError &#124; SavedObjectsImportUnknownError</code> | |
| [id](./kibana-plugin-core-public.savedobjectsimportfailure.id.md) | <code>string</code> | |
| [meta](./kibana-plugin-core-public.savedobjectsimportfailure.meta.md) | <code>{</code><br/><code> title?: string;</code><br/><code> icon?: string;</code><br/><code> }</code> | |
| [overwrite](./kibana-plugin-core-public.savedobjectsimportfailure.overwrite.md) | <code>boolean</code> | If <code>overwrite</code> is specified, an attempt was made to overwrite an existing object. |
| [title](./kibana-plugin-core-public.savedobjectsimportfailure.title.md) | <code>string</code> | |
| [type](./kibana-plugin-core-public.savedobjectsimportfailure.type.md) | <code>string</code> | |

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-core-public.savedobjectsimporterror.md) &gt; [meta](./kibana-plugin-core-public.savedobjectsimporterror.meta.md)
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportFailure](./kibana-plugin-core-public.savedobjectsimportfailure.md) &gt; [meta](./kibana-plugin-core-public.savedobjectsimportfailure.meta.md)

## SavedObjectsImportError.meta property
## SavedObjectsImportFailure.meta property

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-core-public.savedobjectsimporterror.md) &gt; [overwrite](./kibana-plugin-core-public.savedobjectsimporterror.overwrite.md)
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportFailure](./kibana-plugin-core-public.savedobjectsimportfailure.md) &gt; [overwrite](./kibana-plugin-core-public.savedobjectsimportfailure.overwrite.md)

## SavedObjectsImportError.overwrite property
## SavedObjectsImportFailure.overwrite property

If `overwrite` is specified, an attempt was made to overwrite an existing object.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportError](./kibana-plugin-core-public.savedobjectsimporterror.md) &gt; [title](./kibana-plugin-core-public.savedobjectsimporterror.title.md)
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportFailure](./kibana-plugin-core-public.savedobjectsimportfailure.md) &gt; [title](./kibana-plugin-core-public.savedobjectsimportfailure.title.md)

## SavedObjectsImportError.title property
## SavedObjectsImportFailure.title property

> Warning: This API is now obsolete.
>
Expand Down
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) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [SavedObjectsImportFailure](./kibana-plugin-core-public.savedobjectsimportfailure.md) &gt; [type](./kibana-plugin-core-public.savedobjectsimportfailure.type.md)

## SavedObjectsImportFailure.type property

<b>Signature:</b>

```typescript
type: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
errors?: SavedObjectsImportError[];
errors?: SavedObjectsImportFailure[];
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface SavedObjectsImportResponse

| Property | Type | Description |
| --- | --- | --- |
| [errors](./kibana-plugin-core-public.savedobjectsimportresponse.errors.md) | <code>SavedObjectsImportError[]</code> | |
| [errors](./kibana-plugin-core-public.savedobjectsimportresponse.errors.md) | <code>SavedObjectsImportFailure[]</code> | |
| [success](./kibana-plugin-core-public.savedobjectsimportresponse.success.md) | <code>boolean</code> | |
| [successCount](./kibana-plugin-core-public.savedobjectsimportresponse.successcount.md) | <code>number</code> | |
| [successResults](./kibana-plugin-core-public.savedobjectsimportresponse.successresults.md) | <code>SavedObjectsImportSuccess[]</code> | |
Expand Down

This file was deleted.

This file was deleted.

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) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [ISavedObjectsExporter](./kibana-plugin-core-server.isavedobjectsexporter.md)

## ISavedObjectsExporter type


<b>Signature:</b>

```typescript
export declare type ISavedObjectsExporter = PublicMethodsOf<SavedObjectsExporter>;
```
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) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [ISavedObjectsImporter](./kibana-plugin-core-server.isavedobjectsimporter.md)

## ISavedObjectsImporter type


<b>Signature:</b>

```typescript
export declare type ISavedObjectsImporter = PublicMethodsOf<SavedObjectsImporter>;
```
Loading

0 comments on commit f597119

Please sign in to comment.