Add PluginManfiest to generated docs (#42795)

This commit is contained in:
Josh Dover 2019-08-07 13:50:10 -05:00 committed by GitHub
parent 541045c498
commit 53abbcdc9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 182 additions and 5 deletions

View file

@ -0,0 +1,12 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [ConfigPath](./kibana-plugin-server.configpath.md)
## ConfigPath type
<b>Signature:</b>
```typescript
export declare type ConfigPath = string | string[];
```

View file

@ -6,6 +6,8 @@
The Kibana Core APIs for server-side plugins.
A plugin requires a `kibana.json` file at it's root directory that follows [the manfiest schema](./kibana-plugin-server.pluginmanifest.md) to define static plugin information required to load the plugin.
A plugin's `server/index` file must contain a named import, `plugin`<!-- -->, that implements [PluginInitializer](./kibana-plugin-server.plugininitializer.md) which returns an object that implements [Plugin](./kibana-plugin-server.plugin.md)<!-- -->.
The plugin integrates with the core system via lifecycle events: `setup`<!-- -->, `start`<!-- -->, and `stop`<!-- -->. In each lifecycle method, the plugin will receive the corresponding core services available (either [CoreSetup](./kibana-plugin-server.coresetup.md) or [CoreStart](./kibana-plugin-server.corestart.md)<!-- -->) and any interfaces returned by dependency plugins' lifecycle method. Anything returned by the plugin's lifecycle method will be exposed to downstream dependencies when their corresponding lifecycle methods are invoked.
@ -57,6 +59,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. |
| [Plugin](./kibana-plugin-server.plugin.md) | The interface that should be returned by a <code>PluginInitializer</code>. |
| [PluginInitializerContext](./kibana-plugin-server.plugininitializercontext.md) | Context that's available to plugins during initialization stage. |
| [PluginManifest](./kibana-plugin-server.pluginmanifest.md) | Describes the set of required and optional properties plugin can define in its mandatory JSON manifest file. |
| [PluginsServiceSetup](./kibana-plugin-server.pluginsservicesetup.md) | |
| [PluginsServiceStart](./kibana-plugin-server.pluginsservicestart.md) | |
| [ResponseErrorMeta](./kibana-plugin-server.responseerrormeta.md) | Additional metadata to enhance error output or provide error details. |
@ -107,6 +110,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [APICaller](./kibana-plugin-server.apicaller.md) | |
| [AuthenticationHandler](./kibana-plugin-server.authenticationhandler.md) | |
| [AuthHeaders](./kibana-plugin-server.authheaders.md) | Auth Headers map |
| [ConfigPath](./kibana-plugin-server.configpath.md) | |
| [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md) | |
| [GetAuthHeaders](./kibana-plugin-server.getauthheaders.md) | Get headers to authenticate a user against Elasticsearch. |
| [GetAuthState](./kibana-plugin-server.getauthstate.md) | Get authentication state for a request. Returned by <code>auth</code> interceptor. |

View file

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [PluginManifest](./kibana-plugin-server.pluginmanifest.md) &gt; [configPath](./kibana-plugin-server.pluginmanifest.configpath.md)
## PluginManifest.configPath property
Root [configuration path](./kibana-plugin-server.configpath.md) used by the plugin, defaults to "id".
<b>Signature:</b>
```typescript
readonly configPath: ConfigPath;
```

View file

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [PluginManifest](./kibana-plugin-server.pluginmanifest.md) &gt; [id](./kibana-plugin-server.pluginmanifest.id.md)
## PluginManifest.id property
Identifier of the plugin.
<b>Signature:</b>
```typescript
readonly id: PluginName;
```

View file

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [PluginManifest](./kibana-plugin-server.pluginmanifest.md) &gt; [kibanaVersion](./kibana-plugin-server.pluginmanifest.kibanaversion.md)
## PluginManifest.kibanaVersion property
The version of Kibana the plugin is compatible with, defaults to "version".
<b>Signature:</b>
```typescript
readonly kibanaVersion: string;
```

View file

@ -0,0 +1,31 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [PluginManifest](./kibana-plugin-server.pluginmanifest.md)
## PluginManifest interface
Describes the set of required and optional properties plugin can define in its mandatory JSON manifest file.
<b>Signature:</b>
```typescript
export interface PluginManifest
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [configPath](./kibana-plugin-server.pluginmanifest.configpath.md) | <code>ConfigPath</code> | Root [configuration path](./kibana-plugin-server.configpath.md) used by the plugin, defaults to "id". |
| [id](./kibana-plugin-server.pluginmanifest.id.md) | <code>PluginName</code> | Identifier of the plugin. |
| [kibanaVersion](./kibana-plugin-server.pluginmanifest.kibanaversion.md) | <code>string</code> | The version of Kibana the plugin is compatible with, defaults to "version". |
| [optionalPlugins](./kibana-plugin-server.pluginmanifest.optionalplugins.md) | <code>readonly PluginName[]</code> | An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly. |
| [requiredPlugins](./kibana-plugin-server.pluginmanifest.requiredplugins.md) | <code>readonly PluginName[]</code> | An optional list of the other plugins that \*\*must be\*\* installed and enabled for this plugin to function properly. |
| [server](./kibana-plugin-server.pluginmanifest.server.md) | <code>boolean</code> | Specifies whether plugin includes some server-side specific functionality. |
| [ui](./kibana-plugin-server.pluginmanifest.ui.md) | <code>boolean</code> | Specifies whether plugin includes some client/browser specific functionality that should be included into client bundle via <code>public/ui_plugin.js</code> file. |
| [version](./kibana-plugin-server.pluginmanifest.version.md) | <code>string</code> | Version of the plugin. |
## Remarks
Should never be used in code outside of Core but is exported for documentation purposes.

View file

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [PluginManifest](./kibana-plugin-server.pluginmanifest.md) &gt; [optionalPlugins](./kibana-plugin-server.pluginmanifest.optionalplugins.md)
## PluginManifest.optionalPlugins property
An optional list of the other plugins that if installed and enabled \*\*may be\*\* leveraged by this plugin for some additional functionality but otherwise are not required for this plugin to work properly.
<b>Signature:</b>
```typescript
readonly optionalPlugins: readonly PluginName[];
```

View file

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [PluginManifest](./kibana-plugin-server.pluginmanifest.md) &gt; [requiredPlugins](./kibana-plugin-server.pluginmanifest.requiredplugins.md)
## PluginManifest.requiredPlugins property
An optional list of the other plugins that \*\*must be\*\* installed and enabled for this plugin to function properly.
<b>Signature:</b>
```typescript
readonly requiredPlugins: readonly PluginName[];
```

View file

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [PluginManifest](./kibana-plugin-server.pluginmanifest.md) &gt; [server](./kibana-plugin-server.pluginmanifest.server.md)
## PluginManifest.server property
Specifies whether plugin includes some server-side specific functionality.
<b>Signature:</b>
```typescript
readonly server: boolean;
```

View file

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [PluginManifest](./kibana-plugin-server.pluginmanifest.md) &gt; [ui](./kibana-plugin-server.pluginmanifest.ui.md)
## PluginManifest.ui property
Specifies whether plugin includes some client/browser specific functionality that should be included into client bundle via `public/ui_plugin.js` file.
<b>Signature:</b>
```typescript
readonly ui: boolean;
```

View file

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [PluginManifest](./kibana-plugin-server.pluginmanifest.md) &gt; [version](./kibana-plugin-server.pluginmanifest.version.md)
## PluginManifest.version property
Version of the plugin.
<b>Signature:</b>
```typescript
readonly version: string;
```

View file

@ -17,6 +17,7 @@
* under the License.
*/
/** @public */
export type ConfigPath = string | string[];
/**

View file

@ -20,6 +20,10 @@
/**
* The Kibana Core APIs for server-side plugins.
*
* A plugin requires a `kibana.json` file at it's root directory that follows
* {@link PluginManifest | the manfiest schema} to define static plugin
* information required to load the plugin.
*
* A plugin's `server/index` file must contain a named import, `plugin`, that
* implements {@link PluginInitializer} which returns an object that implements
* {@link Plugin}.
@ -46,7 +50,7 @@ import { PluginsServiceSetup, PluginsServiceStart, PluginOpaqueId } from './plug
import { ContextSetup } from './context';
export { bootstrap } from './bootstrap';
export { ConfigService } from './config';
export { ConfigPath, ConfigService } from './config';
export { CoreId } from './core_context';
export {
CallAPIOptions,
@ -101,6 +105,7 @@ export {
Plugin,
PluginInitializer,
PluginInitializerContext,
PluginManifest,
PluginName,
} from './plugins';

View file

@ -40,7 +40,12 @@ export type PluginOpaqueId = symbol;
/**
* Describes the set of required and optional properties plugin can define in its
* mandatory JSON manifest file.
* @internal
*
* @remarks
* Should never be used in code outside of Core but is exported for
* documentation purposes.
*
* @public
*/
export interface PluginManifest {
/**
@ -59,7 +64,8 @@ export interface PluginManifest {
readonly kibanaVersion: string;
/**
* Root configuration path used by the plugin, defaults to "id".
* Root {@link ConfigPath | configuration path} used by the plugin, defaults
* to "id".
*/
readonly configPath: ConfigPath;

View file

@ -74,6 +74,9 @@ export class ClusterClient {
close(): void;
}
// @public (undocumented)
export type ConfigPath = string | string[];
// @internal (undocumented)
export class ConfigService {
// Warning: (ae-forgotten-export) The symbol "Config" needs to be exported by the entry point index.d.ts
@ -88,7 +91,6 @@ export class ConfigService {
// (undocumented)
isEnabledAtPath(path: ConfigPath): Promise<boolean>;
optionalAtPath<TSchema>(path: ConfigPath): Observable<TSchema | undefined>;
// Warning: (ae-forgotten-export) The symbol "ConfigPath" needs to be exported by the entry point index.d.ts
setSchema(path: ConfigPath, schema: Type<unknown>): Promise<void>;
}
@ -458,6 +460,18 @@ export interface PluginInitializerContext<ConfigSchema = unknown> {
opaqueId: PluginOpaqueId;
}
// @public
export interface PluginManifest {
readonly configPath: ConfigPath;
readonly id: PluginName;
readonly kibanaVersion: string;
readonly optionalPlugins: readonly PluginName[];
readonly requiredPlugins: readonly PluginName[];
readonly server: boolean;
readonly ui: boolean;
readonly version: string;
}
// @public
export type PluginName = string;
@ -1017,6 +1031,6 @@ export interface SessionStorageFactory<T> {
//
// src/core/server/http/router/response.ts:188:3 - (ae-forgotten-export) The symbol "KibanaResponse" needs to be exported by the entry point index.d.ts
// src/core/server/plugins/plugins_service.ts:39:5 - (ae-forgotten-export) The symbol "DiscoveredPluginInternal" needs to be exported by the entry point index.d.ts
// src/core/server/plugins/types.ts:156:10 - (ae-forgotten-export) The symbol "EnvironmentMode" needs to be exported by the entry point index.d.ts
// src/core/server/plugins/types.ts:162:10 - (ae-forgotten-export) The symbol "EnvironmentMode" needs to be exported by the entry point index.d.ts
```