Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Mar 16, 2020
1 parent 2ad3292 commit 400a167
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Gets the metadata about all uiSettings, including the type, default value, and u
<b>Signature:</b>

```typescript
getAll: () => Readonly<Record<string, UiSettingsParams & UserProvidedValues>>;
getAll: () => Readonly<Record<string, PublicUiSettingsParams & UserProvidedValues>>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface IUiSettingsClient
| --- | --- | --- |
| [get](./kibana-plugin-core-public.iuisettingsclient.get.md) | <code>&lt;T = any&gt;(key: string, defaultOverride?: T) =&gt; T</code> | Gets the value for a specific uiSetting. If this setting has no user-defined value then the <code>defaultOverride</code> parameter is returned (and parsed if setting is of type "json" or "number). If the parameter is not defined and the key is not registered by any plugin then an error is thrown, otherwise reads the default value defined by a plugin. |
| [get$](./kibana-plugin-core-public.iuisettingsclient.get_.md) | <code>&lt;T = any&gt;(key: string, defaultOverride?: T) =&gt; Observable&lt;T&gt;</code> | Gets an observable of the current value for a config key, and all updates to that config key in the future. Providing a <code>defaultOverride</code> argument behaves the same as it does in \#get() |
| [getAll](./kibana-plugin-core-public.iuisettingsclient.getall.md) | <code>() =&gt; Readonly&lt;Record&lt;string, UiSettingsParams &amp; UserProvidedValues&gt;&gt;</code> | Gets the metadata about all uiSettings, including the type, default value, and user value for each key. |
| [getAll](./kibana-plugin-core-public.iuisettingsclient.getall.md) | <code>() =&gt; Readonly&lt;Record&lt;string, PublicUiSettingsParams &amp; UserProvidedValues&gt;&gt;</code> | Gets the metadata about all uiSettings, including the type, default value, and user value for each key. |
| [getSaved$](./kibana-plugin-core-public.iuisettingsclient.getsaved_.md) | <code>&lt;T = any&gt;() =&gt; Observable&lt;{</code><br/><code> key: string;</code><br/><code> newValue: T;</code><br/><code> oldValue: T;</code><br/><code> }&gt;</code> | Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed. |
| [getUpdate$](./kibana-plugin-core-public.iuisettingsclient.getupdate_.md) | <code>&lt;T = any&gt;() =&gt; Observable&lt;{</code><br/><code> key: string;</code><br/><code> newValue: T;</code><br/><code> oldValue: T;</code><br/><code> }&gt;</code> | Returns an Observable that notifies subscribers of each update to the uiSettings, including the key, newValue, and oldValue of the setting that changed. |
| [getUpdateErrors$](./kibana-plugin-core-public.iuisettingsclient.getupdateerrors_.md) | <code>() =&gt; Observable&lt;Error&gt;</code> | Returns an Observable that notifies subscribers of each error while trying to update the settings, containing the actual Error class. |
Expand Down
1 change: 1 addition & 0 deletions docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [MountPoint](./kibana-plugin-core-public.mountpoint.md) | A function that should mount DOM content inside the provided container element and return a handler to unmount it. |
| [PluginInitializer](./kibana-plugin-core-public.plugininitializer.md) | The <code>plugin</code> export at the root of a plugin's <code>public</code> directory should conform to this interface. |
| [PluginOpaqueId](./kibana-plugin-core-public.pluginopaqueid.md) | |
| [PublicUiSettingsParams](./kibana-plugin-core-public.publicuisettingsparams.md) | A sub-set of [UiSettingsParams](./kibana-plugin-core-public.uisettingsparams.md) exposed to the client-side. |
| [RecursiveReadonly](./kibana-plugin-core-public.recursivereadonly.md) | |
| [SavedObjectAttribute](./kibana-plugin-core-public.savedobjectattribute.md) | Type definition for a Saved Object attribute value |
| [SavedObjectAttributeSingle](./kibana-plugin-core-public.savedobjectattributesingle.md) | Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-core-public.savedobjectattribute.md) |
Expand Down
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) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [PublicUiSettingsParams](./kibana-plugin-core-public.publicuisettingsparams.md)

## PublicUiSettingsParams type

A sub-set of [UiSettingsParams](./kibana-plugin-core-public.uisettingsparams.md) exposed to the client-side.

<b>Signature:</b>

```typescript
export declare type PublicUiSettingsParams = Omit<UiSettingsParams, 'schema'>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
schema?: Type<T>;
schema: Type<T>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
schema?: Type<T>;
schema: Type<T>;
```
11 changes: 7 additions & 4 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import { Location } from 'history';
import { LocationDescriptorObject } from 'history';
import { MaybePromise } from '@kbn/utility-types';
import { Observable } from 'rxjs';
import { PublicUiSettingsParams as PublicUiSettingsParams_2 } from 'src/core/server/types';
import React from 'react';
import * as Rx from 'rxjs';
import { ShallowPromise } from '@kbn/utility-types';
import { Type } from '@kbn/config-schema';
import { UiSettingsParams as UiSettingsParams_2 } from 'src/core/server/types';
import { UnregisterCallback } from 'history';
import { UserProvidedValues as UserProvidedValues_2 } from 'src/core/server/types';

Expand Down Expand Up @@ -785,7 +785,7 @@ export type IToasts = Pick<ToastsApi, 'get$' | 'add' | 'remove' | 'addSuccess' |
export interface IUiSettingsClient {
get$: <T = any>(key: string, defaultOverride?: T) => Observable<T>;
get: <T = any>(key: string, defaultOverride?: T) => T;
getAll: () => Readonly<Record<string, UiSettingsParams_2 & UserProvidedValues_2>>;
getAll: () => Readonly<Record<string, PublicUiSettingsParams_2 & UserProvidedValues_2>>;
getSaved$: <T = any>() => Observable<{
key: string;
newValue: T;
Expand Down Expand Up @@ -934,6 +934,9 @@ export interface PluginInitializerContext<ConfigSchema extends object = object>
// @public (undocumented)
export type PluginOpaqueId = symbol;

// @public
export type PublicUiSettingsParams = Omit<UiSettingsParams, 'schema'>;

// Warning: (ae-forgotten-export) The symbol "RecursiveReadonlyArray" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
Expand Down Expand Up @@ -1303,7 +1306,7 @@ export interface UiSettingsParams<T = unknown> {
readonly?: boolean;
requiresPageReload?: boolean;
// (undocumented)
schema?: Type<T>;
schema: Type<T>;
type?: UiSettingsType;
// (undocumented)
validation?: ImageValidation | StringValidation;
Expand All @@ -1313,7 +1316,7 @@ export interface UiSettingsParams<T = unknown> {
// @public (undocumented)
export interface UiSettingsState {
// (undocumented)
[key: string]: UiSettingsParams_2 & UserProvidedValues_2;
[key: string]: PublicUiSettingsParams_2 & UserProvidedValues_2;
}

// @public
Expand Down
2 changes: 1 addition & 1 deletion src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2297,7 +2297,7 @@ export interface UiSettingsParams<T = unknown> {
readonly?: boolean;
requiresPageReload?: boolean;
// (undocumented)
schema?: Type<T>;
schema: Type<T>;
type?: UiSettingsType;
// (undocumented)
validation?: ImageValidation | StringValidation;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { Observable } from 'rxjs';
import { Plugin as Plugin_2 } from 'src/core/public';
import { PluginInitializerContext as PluginInitializerContext_2 } from 'src/core/public';
import { PopoverAnchorPosition } from '@elastic/eui';
import { PublicUiSettingsParams } from 'src/core/server/types';
import React from 'react';
import * as React_2 from 'react';
import { Required } from '@kbn/utility-types';
Expand All @@ -49,7 +50,6 @@ import { SearchResponse as SearchResponse_2 } from 'elasticsearch';
import { SimpleSavedObject } from 'src/core/public';
import { UiActionsSetup } from 'src/plugins/ui_actions/public';
import { UiActionsStart } from 'src/plugins/ui_actions/public';
import { UiSettingsParams } from 'src/core/server/types';
import { Unit } from '@elastic/datemath';
import { UnregisterCallback } from 'history';
import { UserProvidedValues } from 'src/core/server/types';
Expand Down

0 comments on commit 400a167

Please sign in to comment.