API generation
This commit is contained in:
@ -23,7 +23,6 @@ function buildBulk (opts) {
|
||||
'_source_includes',
|
||||
'_source_include',
|
||||
'pipeline',
|
||||
'prefer_v2_templates',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -37,7 +36,6 @@ function buildBulk (opts) {
|
||||
_sourceExclude: '_source_exclude',
|
||||
_sourceIncludes: '_source_includes',
|
||||
_sourceInclude: '_source_include',
|
||||
preferV2Templates: 'prefer_v2_templates',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -19,7 +19,6 @@ function buildCreate (opts) {
|
||||
'version',
|
||||
'version_type',
|
||||
'pipeline',
|
||||
'prefer_v2_templates',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -30,7 +29,6 @@ function buildCreate (opts) {
|
||||
const snakeCase = {
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
versionType: 'version_type',
|
||||
preferV2Templates: 'prefer_v2_templates',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -22,7 +22,6 @@ function buildIndex (opts) {
|
||||
'if_seq_no',
|
||||
'if_primary_term',
|
||||
'pipeline',
|
||||
'prefer_v2_templates',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -36,7 +35,6 @@ function buildIndex (opts) {
|
||||
versionType: 'version_type',
|
||||
ifSeqNo: 'if_seq_no',
|
||||
ifPrimaryTerm: 'if_primary_term',
|
||||
preferV2Templates: 'prefer_v2_templates',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@ function buildIndicesCreate (opts) {
|
||||
'wait_for_active_shards',
|
||||
'timeout',
|
||||
'master_timeout',
|
||||
'prefer_v2_templates',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -26,7 +25,6 @@ function buildIndicesCreate (opts) {
|
||||
const snakeCase = {
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
masterTimeout: 'master_timeout',
|
||||
preferV2Templates: 'prefer_v2_templates',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -16,7 +16,6 @@ function buildIndicesRollover (opts) {
|
||||
'dry_run',
|
||||
'master_timeout',
|
||||
'wait_for_active_shards',
|
||||
'prefer_v2_templates',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -28,7 +27,6 @@ function buildIndicesRollover (opts) {
|
||||
dryRun: 'dry_run',
|
||||
masterTimeout: 'master_timeout',
|
||||
waitForActiveShards: 'wait_for_active_shards',
|
||||
preferV2Templates: 'prefer_v2_templates',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ function buildMlValidate (opts) {
|
||||
/**
|
||||
* Perform a ml.validate request
|
||||
* Validates an anomaly detection job.
|
||||
* https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html
|
||||
*/
|
||||
return function mlValidate (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -22,6 +22,7 @@ function buildMlValidateDetector (opts) {
|
||||
/**
|
||||
* Perform a ml.validate_detector request
|
||||
* Validates an anomaly detection detector.
|
||||
* https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html
|
||||
*/
|
||||
return function mlValidateDetector (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -20,7 +20,6 @@ function buildReindex (opts) {
|
||||
'scroll',
|
||||
'slices',
|
||||
'max_docs',
|
||||
'prefer_v2_templates',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -33,7 +32,6 @@ function buildReindex (opts) {
|
||||
waitForCompletion: 'wait_for_completion',
|
||||
requestsPerSecond: 'requests_per_second',
|
||||
maxDocs: 'max_docs',
|
||||
preferV2Templates: 'prefer_v2_templates',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@ function buildSnapshotCleanupRepository (opts) {
|
||||
/**
|
||||
* Perform a snapshot.cleanup_repository request
|
||||
* Removes stale data from repository.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/master/clean-up-snapshot-repo-api.html
|
||||
*/
|
||||
return function snapshotCleanupRepository (params, options, callback) {
|
||||
options = options || {}
|
||||
|
||||
@ -25,7 +25,6 @@ function buildUpdate (opts) {
|
||||
'timeout',
|
||||
'if_seq_no',
|
||||
'if_primary_term',
|
||||
'prefer_v2_templates',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -42,7 +41,6 @@ function buildUpdate (opts) {
|
||||
retryOnConflict: 'retry_on_conflict',
|
||||
ifSeqNo: 'if_seq_no',
|
||||
ifPrimaryTerm: 'if_primary_term',
|
||||
preferV2Templates: 'prefer_v2_templates',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
7
api/requestParams.d.ts
vendored
7
api/requestParams.d.ts
vendored
@ -27,7 +27,6 @@ export interface Bulk<T = RequestNDBody> extends Generic {
|
||||
_source_excludes?: string | string[];
|
||||
_source_includes?: string | string[];
|
||||
pipeline?: string;
|
||||
prefer_v2_templates?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
@ -395,7 +394,6 @@ export interface Create<T = RequestBody> extends Generic {
|
||||
version?: number;
|
||||
version_type?: 'internal' | 'external' | 'external_gte';
|
||||
pipeline?: string;
|
||||
prefer_v2_templates?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
@ -583,7 +581,6 @@ export interface Index<T = RequestBody> extends Generic {
|
||||
if_seq_no?: number;
|
||||
if_primary_term?: number;
|
||||
pipeline?: string;
|
||||
prefer_v2_templates?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
@ -627,7 +624,6 @@ export interface IndicesCreate<T = RequestBody> extends Generic {
|
||||
wait_for_active_shards?: string;
|
||||
timeout?: string;
|
||||
master_timeout?: string;
|
||||
prefer_v2_templates?: boolean;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
@ -881,7 +877,6 @@ export interface IndicesRollover<T = RequestBody> extends Generic {
|
||||
dry_run?: boolean;
|
||||
master_timeout?: string;
|
||||
wait_for_active_shards?: string;
|
||||
prefer_v2_templates?: boolean;
|
||||
body?: T;
|
||||
}
|
||||
|
||||
@ -1131,7 +1126,6 @@ export interface Reindex<T = RequestBody> extends Generic {
|
||||
scroll?: string;
|
||||
slices?: number|string;
|
||||
max_docs?: number;
|
||||
prefer_v2_templates?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
@ -1360,7 +1354,6 @@ export interface Update<T = RequestBody> extends Generic {
|
||||
timeout?: string;
|
||||
if_seq_no?: number;
|
||||
if_primary_term?: number;
|
||||
prefer_v2_templates?: boolean;
|
||||
body: T;
|
||||
}
|
||||
|
||||
|
||||
@ -110,7 +110,6 @@ client.bulk({
|
||||
_source_excludes: string | string[],
|
||||
_source_includes: string | string[],
|
||||
pipeline: string,
|
||||
prefer_v2_templates: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
@ -148,9 +147,6 @@ link:{ref}/docs-bulk.html[Documentation] +
|
||||
|`pipeline`
|
||||
|`string` - The pipeline id to preprocess incoming documents with
|
||||
|
||||
|`prefer_v2_templates` or `preferV2Templates`
|
||||
|`boolean` - favor V2 templates instead of V1 templates during automatic index creation
|
||||
|
||||
|`body`
|
||||
|`object` - The operation definition and data (action-data pairs), separated by newlines
|
||||
|
||||
@ -1592,7 +1588,6 @@ client.create({
|
||||
version: number,
|
||||
version_type: 'internal' | 'external' | 'external_gte',
|
||||
pipeline: string,
|
||||
prefer_v2_templates: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
@ -1631,9 +1626,6 @@ WARNING: This parameter has been deprecated.
|
||||
|`pipeline`
|
||||
|`string` - The pipeline id to preprocess incoming documents with
|
||||
|
||||
|`prefer_v2_templates` or `preferV2Templates`
|
||||
|`boolean` - favor V2 templates instead of V1 templates during automatic index creation
|
||||
|
||||
|`body`
|
||||
|`object` - The document
|
||||
|
||||
@ -2301,7 +2293,6 @@ client.index({
|
||||
if_seq_no: number,
|
||||
if_primary_term: number,
|
||||
pipeline: string,
|
||||
prefer_v2_templates: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
@ -2344,9 +2335,6 @@ link:{ref}/docs-index_.html[Documentation] +
|
||||
|`pipeline`
|
||||
|`string` - The pipeline id to preprocess incoming documents with
|
||||
|
||||
|`prefer_v2_templates` or `preferV2Templates`
|
||||
|`boolean` - favor V2 templates instead of V1 templates during automatic index creation
|
||||
|
||||
|`body`
|
||||
|`object` - The document
|
||||
|
||||
@ -2503,7 +2491,6 @@ client.indices.create({
|
||||
wait_for_active_shards: string,
|
||||
timeout: string,
|
||||
master_timeout: string,
|
||||
prefer_v2_templates: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
@ -2522,9 +2509,6 @@ link:{ref}/indices-create-index.html[Documentation] +
|
||||
|`master_timeout` or `masterTimeout`
|
||||
|`string` - Specify timeout for connection to master
|
||||
|
||||
|`prefer_v2_templates` or `preferV2Templates`
|
||||
|`boolean` - favor V2 templates instead of V1 templates during index creation
|
||||
|
||||
|`body`
|
||||
|`object` - The configuration for the index (`settings` and `mappings`)
|
||||
|
||||
@ -3529,7 +3513,6 @@ client.indices.rollover({
|
||||
dry_run: boolean,
|
||||
master_timeout: string,
|
||||
wait_for_active_shards: string,
|
||||
prefer_v2_templates: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
@ -3554,9 +3537,6 @@ link:{ref}/indices-rollover-index.html[Documentation] +
|
||||
|`wait_for_active_shards` or `waitForActiveShards`
|
||||
|`string` - Set the number of active shards to wait for on the newly created rollover index before the operation returns.
|
||||
|
||||
|`prefer_v2_templates` or `preferV2Templates`
|
||||
|`boolean` - favor V2 templates instead of V1 templates during automatic index creation
|
||||
|
||||
|`body`
|
||||
|`object` - The conditions that needs to be met for executing rollover
|
||||
|
||||
@ -4526,7 +4506,6 @@ client.reindex({
|
||||
scroll: string,
|
||||
slices: number|string,
|
||||
max_docs: number,
|
||||
prefer_v2_templates: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
@ -4562,9 +4541,6 @@ _Default:_ `1`
|
||||
|`max_docs` or `maxDocs`
|
||||
|`number` - Maximum number of documents to process (default: all documents)
|
||||
|
||||
|`prefer_v2_templates` or `preferV2Templates`
|
||||
|`boolean` - favor V2 templates instead of V1 templates during index creation
|
||||
|
||||
|`body`
|
||||
|`object` - The search definition using the Query DSL and the prototype for the index request.
|
||||
|
||||
@ -4978,7 +4954,7 @@ client.snapshot.cleanupRepository({
|
||||
timeout: string
|
||||
})
|
||||
----
|
||||
link:{ref}/modules-snapshots.html[Documentation] +
|
||||
link:{ref}/clean-up-snapshot-repo-api.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`repository`
|
||||
@ -5432,7 +5408,6 @@ client.update({
|
||||
timeout: string,
|
||||
if_seq_no: number,
|
||||
if_primary_term: number,
|
||||
prefer_v2_templates: boolean,
|
||||
body: object
|
||||
})
|
||||
----
|
||||
@ -5484,9 +5459,6 @@ WARNING: This parameter has been deprecated.
|
||||
|`if_primary_term` or `ifPrimaryTerm`
|
||||
|`number` - only perform the update operation if the last operation that has changed the document has the specified primary term
|
||||
|
||||
|`prefer_v2_templates` or `preferV2Templates`
|
||||
|`boolean` - favor V2 templates instead of V1 templates during automatic index creation
|
||||
|
||||
|`body`
|
||||
|`object` - The request definition requires either `script` or partial `doc`
|
||||
|
||||
@ -8693,6 +8665,7 @@ client.ml.validate({
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`body`
|
||||
@ -8708,6 +8681,7 @@ client.ml.validateDetector({
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`body`
|
||||
|
||||
Reference in New Issue
Block a user