Skip to content

Commit 2303013

Browse files
committed
API generation
1 parent 6020625 commit 2303013

File tree

8 files changed

+66
-66
lines changed

8 files changed

+66
-66
lines changed

api/api/cluster.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
/* eslint no-unused-vars: 0 */
2424

2525
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26-
const acceptedQuerystring = ['include_yes_decisions', 'include_disk_info', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'timeout', 'master_timeout', 'wait_for_removal', 'local', 'flat_settings', 'include_defaults', 'expand_wildcards', 'level', 'wait_for_active_shards', 'wait_for_nodes', 'wait_for_events', 'wait_for_no_relocating_shards', 'wait_for_no_initializing_shards', 'wait_for_status', 'return_200_for_cluster_health_timeout', 'node_ids', 'node_names', 'create', 'dry_run', 'explain', 'retry_failed', 'metric', 'wait_for_metadata_version', 'wait_for_timeout', 'ignore_unavailable', 'allow_no_indices']
27-
const snakeCase = { includeYesDecisions: 'include_yes_decisions', includeDiskInfo: 'include_disk_info', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', waitForRemoval: 'wait_for_removal', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', expandWildcards: 'expand_wildcards', waitForActiveShards: 'wait_for_active_shards', waitForNodes: 'wait_for_nodes', waitForEvents: 'wait_for_events', waitForNoRelocatingShards: 'wait_for_no_relocating_shards', waitForNoInitializingShards: 'wait_for_no_initializing_shards', waitForStatus: 'wait_for_status', return_200ForClusterHealthTimeout: 'return_200_for_cluster_health_timeout', nodeIds: 'node_ids', nodeNames: 'node_names', dryRun: 'dry_run', retryFailed: 'retry_failed', waitForMetadataVersion: 'wait_for_metadata_version', waitForTimeout: 'wait_for_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices' }
26+
const acceptedQuerystring = ['include_yes_decisions', 'include_disk_info', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'timeout', 'master_timeout', 'wait_for_removal', 'local', 'flat_settings', 'include_defaults', 'expand_wildcards', 'level', 'wait_for_active_shards', 'wait_for_nodes', 'wait_for_events', 'wait_for_no_relocating_shards', 'wait_for_no_initializing_shards', 'wait_for_status', 'node_ids', 'node_names', 'create', 'dry_run', 'explain', 'retry_failed', 'metric', 'wait_for_metadata_version', 'wait_for_timeout', 'ignore_unavailable', 'allow_no_indices']
27+
const snakeCase = { includeYesDecisions: 'include_yes_decisions', includeDiskInfo: 'include_disk_info', errorTrace: 'error_trace', filterPath: 'filter_path', masterTimeout: 'master_timeout', waitForRemoval: 'wait_for_removal', flatSettings: 'flat_settings', includeDefaults: 'include_defaults', expandWildcards: 'expand_wildcards', waitForActiveShards: 'wait_for_active_shards', waitForNodes: 'wait_for_nodes', waitForEvents: 'wait_for_events', waitForNoRelocatingShards: 'wait_for_no_relocating_shards', waitForNoInitializingShards: 'wait_for_no_initializing_shards', waitForStatus: 'wait_for_status', nodeIds: 'node_ids', nodeNames: 'node_names', dryRun: 'dry_run', retryFailed: 'retry_failed', waitForMetadataVersion: 'wait_for_metadata_version', waitForTimeout: 'wait_for_timeout', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices' }
2828

2929
function ClusterApi (transport, ConfigurationError) {
3030
this.transport = transport

api/api/delete_by_query.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
/* eslint no-unused-vars: 0 */
2424

2525
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26-
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
27-
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
26+
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
27+
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', terminateAfter: 'terminate_after', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
2828

2929
function deleteByQueryApi (params, options, callback) {
3030
;[params, options, callback] = normalizeArguments(params, options, callback)

api/api/open_point_in_time.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ function openPointInTimeApi (params, options, callback) {
3434
const err = new this[kConfigurationError]('Missing required parameter: index')
3535
return handleError(err, callback)
3636
}
37+
if (params.keep_alive == null && params.keepAlive == null) {
38+
const err = new this[kConfigurationError]('Missing required parameter: keep_alive or keepAlive')
39+
return handleError(err, callback)
40+
}
3741

3842
let { method, body, index, ...querystring } = params
3943
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)

api/api/transform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/* eslint no-unused-vars: 0 */
2424

2525
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26-
const acceptedQuerystring = ['force', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', 'timeout', 'wait_for_completion', 'wait_for_checkpoint', 'dry_run']
26+
const acceptedQuerystring = ['force', 'timeout', 'pretty', 'human', 'error_trace', 'source', 'filter_path', 'from', 'size', 'allow_no_match', 'exclude_generated', 'defer_validation', 'wait_for_completion', 'wait_for_checkpoint', 'dry_run']
2727
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path', allowNoMatch: 'allow_no_match', excludeGenerated: 'exclude_generated', deferValidation: 'defer_validation', waitForCompletion: 'wait_for_completion', waitForCheckpoint: 'wait_for_checkpoint', dryRun: 'dry_run' }
2828

2929
function TransformApi (transport, ConfigurationError) {

api/api/update_by_query.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
/* eslint no-unused-vars: 0 */
2424

2525
const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils')
26-
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', '_source', '_source_excludes', '_source_exclude', '_source_includes', '_source_include', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
27-
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', _sourceExcludes: '_source_excludes', _sourceExclude: '_source_exclude', _sourceIncludes: '_source_includes', _sourceInclude: '_source_include', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
26+
const acceptedQuerystring = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'from', 'ignore_unavailable', 'allow_no_indices', 'conflicts', 'expand_wildcards', 'lenient', 'pipeline', 'preference', 'q', 'routing', 'scroll', 'search_type', 'search_timeout', 'size', 'max_docs', 'sort', 'terminate_after', 'stats', 'version', 'version_type', 'request_cache', 'refresh', 'timeout', 'wait_for_active_shards', 'scroll_size', 'wait_for_completion', 'requests_per_second', 'slices', 'pretty', 'human', 'error_trace', 'source', 'filter_path']
27+
const snakeCase = { analyzeWildcard: 'analyze_wildcard', defaultOperator: 'default_operator', ignoreUnavailable: 'ignore_unavailable', allowNoIndices: 'allow_no_indices', expandWildcards: 'expand_wildcards', searchType: 'search_type', searchTimeout: 'search_timeout', maxDocs: 'max_docs', terminateAfter: 'terminate_after', versionType: 'version_type', requestCache: 'request_cache', waitForActiveShards: 'wait_for_active_shards', scrollSize: 'scroll_size', waitForCompletion: 'wait_for_completion', requestsPerSecond: 'requests_per_second', errorTrace: 'error_trace', filterPath: 'filter_path' }
2828

2929
function updateByQueryApi (params, options, callback) {
3030
;[params, options, callback] = normalizeArguments(params, options, callback)

api/requestParams.d.ts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,6 @@ export interface ClusterHealth extends Generic {
525525
wait_for_no_relocating_shards?: boolean;
526526
wait_for_no_initializing_shards?: boolean;
527527
wait_for_status?: 'green' | 'yellow' | 'red';
528-
return_200_for_cluster_health_timeout?: boolean;
529528
}
530529

531530
export interface ClusterPendingTasks extends Generic {
@@ -654,8 +653,6 @@ export interface Delete extends Generic {
654653
export interface DeleteByQuery<T = RequestBody> extends Generic {
655654
index: string | string[];
656655
type?: string | string[];
657-
_source_exclude?: string | string[];
658-
_source_include?: string | string[];
659656
analyzer?: string;
660657
analyze_wildcard?: boolean;
661658
default_operator?: 'AND' | 'OR';
@@ -675,9 +672,6 @@ export interface DeleteByQuery<T = RequestBody> extends Generic {
675672
size?: number;
676673
max_docs?: number;
677674
sort?: string | string[];
678-
_source?: string | string[];
679-
_source_excludes?: string | string[];
680-
_source_includes?: string | string[];
681675
terminate_after?: number;
682676
stats?: string | string[];
683677
version?: boolean;
@@ -1664,11 +1658,12 @@ export interface MlFlushJob<T = RequestBody> extends Generic {
16641658
body?: T;
16651659
}
16661660

1667-
export interface MlForecast extends Generic {
1661+
export interface MlForecast<T = RequestBody> extends Generic {
16681662
job_id: string;
16691663
duration?: string;
16701664
expires_in?: string;
16711665
max_model_memory?: string;
1666+
body?: T;
16721667
}
16731668

16741669
export interface MlGetBuckets<T = RequestBody> extends Generic {
@@ -1832,8 +1827,9 @@ export interface MlGetTrainedModelsStats extends Generic {
18321827
export interface MlInfo extends Generic {
18331828
}
18341829

1835-
export interface MlOpenJob extends Generic {
1830+
export interface MlOpenJob<T = RequestBody> extends Generic {
18361831
job_id: string;
1832+
body?: T;
18371833
}
18381834

18391835
export interface MlPostCalendarEvents<T = RequestBody> extends Generic {
@@ -2111,7 +2107,7 @@ export interface OpenPointInTime extends Generic {
21112107
routing?: string;
21122108
ignore_unavailable?: boolean;
21132109
expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all';
2114-
keep_alive?: string;
2110+
keep_alive: string;
21152111
}
21162112

21172113
export interface Ping extends Generic {
@@ -2771,6 +2767,7 @@ export interface TextStructureFindStructure<T = RequestNDBody> extends Generic {
27712767
export interface TransformDeleteTransform extends Generic {
27722768
transform_id: string;
27732769
force?: boolean;
2770+
timeout?: string;
27742771
}
27752772

27762773
export interface TransformGetTransform extends Generic {
@@ -2790,12 +2787,14 @@ export interface TransformGetTransformStats extends Generic {
27902787

27912788
export interface TransformPreviewTransform<T = RequestBody> extends Generic {
27922789
transform_id?: string;
2790+
timeout?: string;
27932791
body?: T;
27942792
}
27952793

27962794
export interface TransformPutTransform<T = RequestBody> extends Generic {
27972795
transform_id: string;
27982796
defer_validation?: boolean;
2797+
timeout?: string;
27992798
body: T;
28002799
}
28012800

@@ -2816,11 +2815,13 @@ export interface TransformStopTransform extends Generic {
28162815
export interface TransformUpdateTransform<T = RequestBody> extends Generic {
28172816
transform_id: string;
28182817
defer_validation?: boolean;
2818+
timeout?: string;
28192819
body: T;
28202820
}
28212821

28222822
export interface TransformUpgradeTransforms extends Generic {
28232823
dry_run?: boolean;
2824+
timeout?: string;
28242825
}
28252826

28262827
export interface Update<T = RequestBody> extends Generic {
@@ -2847,8 +2848,6 @@ export interface Update<T = RequestBody> extends Generic {
28472848
export interface UpdateByQuery<T = RequestBody> extends Generic {
28482849
index: string | string[];
28492850
type?: string | string[];
2850-
_source_exclude?: string | string[];
2851-
_source_include?: string | string[];
28522851
analyzer?: string;
28532852
analyze_wildcard?: boolean;
28542853
default_operator?: 'AND' | 'OR';
@@ -2869,9 +2868,6 @@ export interface UpdateByQuery<T = RequestBody> extends Generic {
28692868
size?: number;
28702869
max_docs?: number;
28712870
sort?: string | string[];
2872-
_source?: string | string[];
2873-
_source_excludes?: string | string[];
2874-
_source_includes?: string | string[];
28752871
terminate_after?: number;
28762872
stats?: string | string[];
28772873
version?: boolean;

0 commit comments

Comments
 (0)