API generation

This commit is contained in:
delvedor
2020-05-14 18:16:26 +02:00
parent 191b8fb9fb
commit e3e4be3a5e
12 changed files with 6 additions and 51 deletions

View File

@ -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'
}

View File

@ -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'
}

View File

@ -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'
}

View File

@ -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'
}

View File

@ -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'
}

View File

@ -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 || {}

View File

@ -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 || {}

View File

@ -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'
}

View File

@ -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 || {}

View File

@ -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'
}

View File

@ -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;
}