Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mshustov committed Sep 7, 2020
1 parent 3c5dd03 commit c9b2342
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ Set of helpers used to create `KibanaResponse` to form HTTP response on an incom

```typescript
kibanaResponseFactory: {
custom: <T extends string | Error | Buffer | Stream | Record<string, any> | {
custom: <T extends string | Error | Record<string, any> | {
message: string | Error;
attributes?: Record<string, any> | undefined;
} | undefined>(options: CustomHttpResponseOptions<T>) => KibanaResponse<T>;
} | Buffer | Stream | undefined>(options: CustomHttpResponseOptions<T>) => KibanaResponse<T>;
badRequest: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
unauthorized: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
forbidden: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
notFound: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
conflict: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
internalError: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
customError: (options: CustomHttpResponseOptions<ResponseError>) => KibanaResponse<ResponseError>;
redirected: (options: RedirectResponseOptions) => KibanaResponse<string | Buffer | Stream | Record<string, any>>;
ok: (options?: HttpResponseOptions) => KibanaResponse<string | Buffer | Stream | Record<string, any>>;
accepted: (options?: HttpResponseOptions) => KibanaResponse<string | Buffer | Stream | Record<string, any>>;
redirected: (options: RedirectResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
ok: (options?: HttpResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
accepted: (options?: HttpResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
noContent: (options?: HttpResponseOptions) => KibanaResponse<undefined>;
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
baseFormattersPublic: (import("../../common").FieldFormatInstanceType | typeof DateFormat | typeof DateNanosFormat)[]
baseFormattersPublic: (import("../../common").FieldFormatInstanceType | typeof DateNanosFormat | typeof DateFormat)[]
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
FilterBar: React.ComponentClass<Pick<Props, "className" | "filters" | "indexPatterns" | "onFiltersUpdated">, any> & {
FilterBar: React.ComponentClass<Pick<Props, "indexPatterns" | "className" | "filters" | "onFiltersUpdated">, any> & {
WrappedComponent: React.ComponentType<Props & ReactIntl.InjectedIntlProps>;
}
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
QueryStringInput: React.FC<Pick<Props, "query" | "prepend" | "size" | "placeholder" | "onChange" | "onBlur" | "onSubmit" | "indexPatterns" | "dataTestSubj" | "screenTitle" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">>
QueryStringInput: React.FC<Pick<Props, "query" | "indexPatterns" | "className" | "placeholder" | "onBlur" | "onChange" | "onSubmit" | "prepend" | "size" | "dataTestSubj" | "screenTitle" | "disableAutoFocus" | "persistedLog" | "bubbleSubmitEvent" | "languageSwitcherPopoverAnchorPosition" | "onChangeQueryInputFocus">>
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<b>Signature:</b>

```typescript
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "timeHistory" | "onFiltersUpdated">, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "indexPatterns" | "dataTestSubj" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "timeHistory" | "onFiltersUpdated">, any> & {
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "indexPatterns" | "dataTestSubj" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "timeHistory" | "onFiltersUpdated"> & ReactIntl.InjectedIntlProps>;
SearchBar: React.ComponentClass<Pick<Pick<SearchBarProps, "query" | "indexPatterns" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "dataTestSubj" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "timeHistory" | "onFiltersUpdated">, "query" | "indexPatterns" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "dataTestSubj" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "timeHistory" | "onFiltersUpdated">, any> & {
WrappedComponent: React.ComponentType<Pick<SearchBarProps, "query" | "indexPatterns" | "isLoading" | "filters" | "onRefresh" | "onRefreshChange" | "refreshInterval" | "intl" | "dataTestSubj" | "customSubmitButton" | "screenTitle" | "showQueryBar" | "showQueryInput" | "showFilterBar" | "showDatePicker" | "showAutoRefreshOnly" | "isRefreshPaused" | "dateRangeFrom" | "dateRangeTo" | "showSaveQuery" | "savedQuery" | "onQueryChange" | "onQuerySubmit" | "onSaved" | "onSavedQueryUpdated" | "onClearSavedQuery" | "indicateNoData" | "timeHistory" | "onFiltersUpdated"> & ReactIntl.InjectedIntlProps>;
}
```
4 changes: 1 addition & 3 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import { Action } from 'history';
import { ApiResponse } from '@elastic/elasticsearch/lib/Transport';
import Boom from 'boom';
import { ErrorToastOptions as ErrorToastOptions_2 } from 'src/core/public/notifications';
import { EuiBreadcrumb } from '@elastic/eui';
import { EuiButtonEmptyProps } from '@elastic/eui';
import { EuiConfirmModalProps } from '@elastic/eui';
Expand All @@ -24,13 +23,12 @@ import { MaybePromise } from '@kbn/utility-types';
import { Observable } from 'rxjs';
import { ParsedQuery } from 'query-string';
import { Path } from 'history';
import { PublicMethodsOf } from '@kbn/utility-types';
import { PublicUiSettingsParams as PublicUiSettingsParams_2 } from 'src/core/server/types';
import React from 'react';
import { RecursiveReadonly } from '@kbn/utility-types';
import * as Rx from 'rxjs';
import { SavedObject as SavedObject_2 } from 'src/core/server';
import { ShallowPromise } from '@kbn/utility-types';
import { ToastInputFields as ToastInputFields_2 } from 'src/core/public/notifications';
import { TransportRequestOptions } from '@elastic/elasticsearch/lib/Transport';
import { TransportRequestParams } from '@elastic/elasticsearch/lib/Transport';
import { TransportRequestPromise } from '@elastic/elasticsearch/lib/Transport';
Expand Down
31 changes: 14 additions & 17 deletions src/core/server/server.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import { DeleteScriptParams } from 'elasticsearch';
import { DeleteTemplateParams } from 'elasticsearch';
import { DetailedPeerCertificate } from 'tls';
import { Duration } from 'moment';
import { ErrorToastOptions } from 'src/core/public/notifications';
import { ExistsParams } from 'elasticsearch';
import { ExplainParams } from 'elasticsearch';
import { FieldStatsParams } from 'elasticsearch';
Expand Down Expand Up @@ -119,7 +118,6 @@ import { RenderSearchTemplateParams } from 'elasticsearch';
import { Request } from 'hapi';
import { ResponseObject } from 'hapi';
import { ResponseToolkit } from 'hapi';
import { SavedObject as SavedObject_2 } from 'src/core/server';
import { SchemaTypeError } from '@kbn/config-schema';
import { ScrollParams } from 'elasticsearch';
import { SearchParams } from 'elasticsearch';
Expand All @@ -143,7 +141,6 @@ import { TasksCancelParams } from 'elasticsearch';
import { TasksGetParams } from 'elasticsearch';
import { TasksListParams } from 'elasticsearch';
import { TermvectorsParams } from 'elasticsearch';
import { ToastInputFields } from 'src/core/public/notifications';
import { TransportRequestOptions } from '@elastic/elasticsearch/lib/Transport';
import { TransportRequestParams } from '@elastic/elasticsearch/lib/Transport';
import { TransportRequestPromise } from '@elastic/elasticsearch/lib/Transport';
Expand Down Expand Up @@ -328,11 +325,11 @@ export const config: {
sniffOnStart: import("@kbn/config-schema").Type<boolean>;
sniffInterval: import("@kbn/config-schema").Type<false | import("moment").Duration>;
sniffOnConnectionFault: import("@kbn/config-schema").Type<boolean>;
hosts: import("@kbn/config-schema").Type<string | string[]>;
hosts: import("@kbn/config-schema").Type<import("./config").ConfigPath>;
preserveHost: import("@kbn/config-schema").Type<boolean>;
username: import("@kbn/config-schema").Type<string | undefined>;
password: import("@kbn/config-schema").Type<string | undefined>;
requestHeadersWhitelist: import("@kbn/config-schema").Type<string | string[]>;
requestHeadersWhitelist: import("@kbn/config-schema").Type<import("./config").ConfigPath>;
customHeaders: import("@kbn/config-schema").Type<Record<string, string>>;
shardTimeout: import("@kbn/config-schema").Type<import("moment").Duration>;
requestTimeout: import("@kbn/config-schema").Type<import("moment").Duration>;
Expand Down Expand Up @@ -364,6 +361,7 @@ export const config: {
};
logging: {
appenders: import("@kbn/config-schema").Type<Readonly<{} & {
kind: "console";
layout: Readonly<{} & {
kind: "json";
}> | Readonly<{
Expand All @@ -372,9 +370,9 @@ export const config: {
} & {
kind: "pattern";
}>;
kind: "console";
}> | Readonly<{} & {
path: string;
kind: "file";
layout: Readonly<{} & {
kind: "json";
}> | Readonly<{
Expand All @@ -383,7 +381,6 @@ export const config: {
} & {
kind: "pattern";
}>;
kind: "file";
}> | Readonly<{
legacyLoggingConfig?: any;
} & {
Expand All @@ -392,10 +389,11 @@ export const config: {
loggers: import("@kbn/config-schema").ObjectType<{
appenders: import("@kbn/config-schema").Type<string[]>;
context: import("@kbn/config-schema").Type<string>;
level: import("@kbn/config-schema").Type<import("./logging/log_level").LogLevelId>;
level: import("@kbn/config-schema").Type<"off" | "info" | "all" | "fatal" | "error" | "warn" | "debug" | "trace">;
}>;
loggerContext: import("@kbn/config-schema").ObjectType<{
appenders: import("@kbn/config-schema").Type<Map<string, Readonly<{} & {
kind: "console";
layout: Readonly<{} & {
kind: "json";
}> | Readonly<{
Expand All @@ -404,9 +402,9 @@ export const config: {
} & {
kind: "pattern";
}>;
kind: "console";
}> | Readonly<{} & {
path: string;
kind: "file";
layout: Readonly<{} & {
kind: "json";
}> | Readonly<{
Expand All @@ -415,16 +413,15 @@ export const config: {
} & {
kind: "pattern";
}>;
kind: "file";
}> | Readonly<{
legacyLoggingConfig?: any;
} & {
kind: "legacy-appender";
}>>>;
loggers: import("@kbn/config-schema").Type<Readonly<{} & {
context: string;
appenders: string[];
level: import("./logging/log_level").LogLevelId;
context: string;
level: "off" | "info" | "all" | "fatal" | "error" | "warn" | "debug" | "trace";
}>[]>;
}>;
};
Expand Down Expand Up @@ -1096,20 +1093,20 @@ export type KibanaResponseFactory = typeof kibanaResponseFactory;

// @public
export const kibanaResponseFactory: {
custom: <T extends string | Error | Buffer | Stream | Record<string, any> | {
custom: <T extends string | Error | Record<string, any> | {
message: string | Error;
attributes?: Record<string, any> | undefined;
} | undefined>(options: CustomHttpResponseOptions<T>) => KibanaResponse<T>;
} | Buffer | Stream | undefined>(options: CustomHttpResponseOptions<T>) => KibanaResponse<T>;
badRequest: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
unauthorized: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
forbidden: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
notFound: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
conflict: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
internalError: (options?: ErrorHttpResponseOptions) => KibanaResponse<ResponseError>;
customError: (options: CustomHttpResponseOptions<ResponseError>) => KibanaResponse<ResponseError>;
redirected: (options: RedirectResponseOptions) => KibanaResponse<string | Buffer | Stream | Record<string, any>>;
ok: (options?: HttpResponseOptions) => KibanaResponse<string | Buffer | Stream | Record<string, any>>;
accepted: (options?: HttpResponseOptions) => KibanaResponse<string | Buffer | Stream | Record<string, any>>;
redirected: (options: RedirectResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
ok: (options?: HttpResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
accepted: (options?: HttpResponseOptions) => KibanaResponse<string | Record<string, any> | Buffer | Stream>;
noContent: (options?: HttpResponseOptions) => KibanaResponse<undefined>;
};

Expand Down
Loading

0 comments on commit c9b2342

Please sign in to comment.