API generation
This commit is contained in:
@ -27,6 +27,7 @@ function buildCatMlDatafeeds (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'allow_no_datafeeds',
|
||||
'format',
|
||||
'h',
|
||||
@ -37,6 +38,7 @@ function buildCatMlDatafeeds (opts) {
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match',
|
||||
allowNoDatafeeds: 'allow_no_datafeeds'
|
||||
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ function buildCatMlJobs (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'allow_no_jobs',
|
||||
'bytes',
|
||||
'format',
|
||||
@ -38,6 +39,7 @@ function buildCatMlJobs (opts) {
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match',
|
||||
allowNoJobs: 'allow_no_jobs'
|
||||
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ function buildIndicesAddBlock (opts) {
|
||||
/**
|
||||
* Perform a indices.add_block request
|
||||
* Adds a block to an index.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-blocks.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html
|
||||
*/
|
||||
return function indicesAddBlock (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -36,7 +36,7 @@ function buildIndicesCreateDataStream (opts) {
|
||||
|
||||
/**
|
||||
* Perform a indices.create_data_stream request
|
||||
* Creates or updates a data stream
|
||||
* Creates a data stream
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
|
||||
*/
|
||||
return function indicesCreateDataStream (params, options, callback) {
|
||||
|
||||
@ -79,13 +79,8 @@ function buildIndicesFlushSynced (opts) {
|
||||
|
||||
var path = ''
|
||||
|
||||
if ((index) != null) {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced'
|
||||
} else {
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + '_flush' + '/' + 'synced'
|
||||
}
|
||||
if (method == null) method = body == null ? 'GET' : 'POST'
|
||||
path = '/' + encodeURIComponent(index) + '/' + '_flush' + '/' + 'synced'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
|
||||
@ -44,7 +44,7 @@ function buildIndicesResolveIndex (opts) {
|
||||
/**
|
||||
* Perform a indices.resolve_index request
|
||||
* Returns information about any matching indices, aliases, and data streams
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-resolve-index-api.html
|
||||
*/
|
||||
return function indicesResolveIndex (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -27,12 +27,14 @@ function buildMlCloseJob (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'allow_no_jobs',
|
||||
'force',
|
||||
'timeout'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match',
|
||||
allowNoJobs: 'allow_no_jobs'
|
||||
|
||||
}
|
||||
|
||||
@ -27,10 +27,12 @@ function buildMlGetDatafeedStats (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'allow_no_datafeeds'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match',
|
||||
allowNoDatafeeds: 'allow_no_datafeeds'
|
||||
}
|
||||
|
||||
|
||||
@ -27,10 +27,12 @@ function buildMlGetDatafeeds (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'allow_no_datafeeds'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match',
|
||||
allowNoDatafeeds: 'allow_no_datafeeds'
|
||||
}
|
||||
|
||||
|
||||
@ -27,10 +27,12 @@ function buildMlGetJobStats (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'allow_no_jobs'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match',
|
||||
allowNoJobs: 'allow_no_jobs'
|
||||
}
|
||||
|
||||
|
||||
@ -27,10 +27,12 @@ function buildMlGetJobs (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'allow_no_jobs'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match',
|
||||
allowNoJobs: 'allow_no_jobs'
|
||||
}
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ function buildMlGetOverallBuckets (opts) {
|
||||
'exclude_interim',
|
||||
'start',
|
||||
'end',
|
||||
'allow_no_match',
|
||||
'allow_no_jobs'
|
||||
]
|
||||
|
||||
@ -41,6 +42,7 @@ function buildMlGetOverallBuckets (opts) {
|
||||
bucketSpan: 'bucket_span',
|
||||
overallScore: 'overall_score',
|
||||
excludeInterim: 'exclude_interim',
|
||||
allowNoMatch: 'allow_no_match',
|
||||
allowNoJobs: 'allow_no_jobs'
|
||||
}
|
||||
|
||||
|
||||
@ -27,12 +27,14 @@ function buildMlStopDatafeed (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'allow_no_match',
|
||||
'allow_no_datafeeds',
|
||||
'force',
|
||||
'timeout'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
allowNoMatch: 'allow_no_match',
|
||||
allowNoDatafeeds: 'allow_no_datafeeds'
|
||||
|
||||
}
|
||||
|
||||
4
api/kibana.d.ts
vendored
4
api/kibana.d.ts
vendored
@ -202,7 +202,7 @@ interface KibanaClient {
|
||||
clone<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClone<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
close<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesClose, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
create<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesCreate<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
createDataStream<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesCreateDataStream<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
createDataStream<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesCreateDataStream, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
dataStreamsStats<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDataStreamsStats, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
delete<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDelete, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
deleteAlias<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.IndicesDeleteAlias, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
@ -324,7 +324,7 @@ interface KibanaClient {
|
||||
startDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStartDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
startDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStartDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stopDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStopDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stopDatafeed<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.MlStopDatafeed, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
stopDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlStopDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateDataFrameAnalytics<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateDataFrameAnalytics<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateDatafeed<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateDatafeed<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
updateFilter<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.MlUpdateFilter<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
|
||||
15
api/requestParams.d.ts
vendored
15
api/requestParams.d.ts
vendored
@ -1552,6 +1552,7 @@ export interface CatMlDataFrameAnalytics extends Generic {
|
||||
|
||||
export interface CatMlDatafeeds extends Generic {
|
||||
datafeed_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_datafeeds?: boolean;
|
||||
format?: string;
|
||||
h?: string | string[];
|
||||
@ -1563,6 +1564,7 @@ export interface CatMlDatafeeds extends Generic {
|
||||
|
||||
export interface CatMlJobs extends Generic {
|
||||
job_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_jobs?: boolean;
|
||||
bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb';
|
||||
format?: string;
|
||||
@ -1744,9 +1746,8 @@ export interface IlmStart extends Generic {
|
||||
export interface IlmStop extends Generic {
|
||||
}
|
||||
|
||||
export interface IndicesCreateDataStream<T = RequestBody> extends Generic {
|
||||
export interface IndicesCreateDataStream extends Generic {
|
||||
name: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface IndicesDataStreamsStats extends Generic {
|
||||
@ -1822,6 +1823,7 @@ export interface MigrationDeprecations extends Generic {
|
||||
|
||||
export interface MlCloseJob<T = RequestBody> extends Generic {
|
||||
job_id: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_jobs?: boolean;
|
||||
force?: boolean;
|
||||
timeout?: string;
|
||||
@ -1991,11 +1993,13 @@ export interface MlGetDataFrameAnalyticsStats extends Generic {
|
||||
|
||||
export interface MlGetDatafeedStats extends Generic {
|
||||
datafeed_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_datafeeds?: boolean;
|
||||
}
|
||||
|
||||
export interface MlGetDatafeeds extends Generic {
|
||||
datafeed_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_datafeeds?: boolean;
|
||||
}
|
||||
|
||||
@ -2020,11 +2024,13 @@ export interface MlGetInfluencers<T = RequestBody> extends Generic {
|
||||
|
||||
export interface MlGetJobStats extends Generic {
|
||||
job_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_jobs?: boolean;
|
||||
}
|
||||
|
||||
export interface MlGetJobs extends Generic {
|
||||
job_id?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_jobs?: boolean;
|
||||
}
|
||||
|
||||
@ -2048,6 +2054,7 @@ export interface MlGetOverallBuckets<T = RequestBody> extends Generic {
|
||||
exclude_interim?: boolean;
|
||||
start?: string;
|
||||
end?: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_jobs?: boolean;
|
||||
body?: T;
|
||||
}
|
||||
@ -2179,11 +2186,13 @@ export interface MlStopDataFrameAnalytics<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface MlStopDatafeed extends Generic {
|
||||
export interface MlStopDatafeed<T = RequestBody> extends Generic {
|
||||
datafeed_id: string;
|
||||
allow_no_match?: boolean;
|
||||
allow_no_datafeeds?: boolean;
|
||||
force?: boolean;
|
||||
timeout?: string;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface MlUpdateDataFrameAnalytics<T = RequestBody> extends Generic {
|
||||
|
||||
Reference in New Issue
Block a user