API generation

This commit is contained in:
delvedor
2019-10-30 09:50:17 +01:00
parent 850a40b116
commit def4be92c6
5 changed files with 32 additions and 5 deletions

View File

@ -15,6 +15,7 @@ function buildRankEval (opts) {
'ignore_unavailable', 'ignore_unavailable',
'allow_no_indices', 'allow_no_indices',
'expand_wildcards', 'expand_wildcards',
'search_type',
'pretty', 'pretty',
'human', 'human',
'error_trace', 'error_trace',
@ -26,6 +27,7 @@ function buildRankEval (opts) {
ignoreUnavailable: 'ignore_unavailable', ignoreUnavailable: 'ignore_unavailable',
allowNoIndices: 'allow_no_indices', allowNoIndices: 'allow_no_indices',
expandWildcards: 'expand_wildcards', expandWildcards: 'expand_wildcards',
searchType: 'search_type',
errorTrace: 'error_trace', errorTrace: 'error_trace',
filterPath: 'filter_path' filterPath: 'filter_path'
} }

View File

@ -15,11 +15,13 @@ function buildSecurityGetApiKey (opts) {
'id', 'id',
'name', 'name',
'username', 'username',
'realm_name' 'realm_name',
'owner'
] ]
const snakeCase = { const snakeCase = {
realmName: 'realm_name' realmName: 'realm_name'
} }
/** /**

View File

@ -12,14 +12,17 @@ function buildTransformStopTransform (opts) {
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
const acceptedQuerystring = [ const acceptedQuerystring = [
'force',
'wait_for_completion', 'wait_for_completion',
'timeout', 'timeout',
'allow_no_match' 'allow_no_match',
'wait_for_checkpoint'
] ]
const snakeCase = { const snakeCase = {
waitForCompletion: 'wait_for_completion', waitForCompletion: 'wait_for_completion',
allowNoMatch: 'allow_no_match' allowNoMatch: 'allow_no_match',
waitForCheckpoint: 'wait_for_checkpoint'
} }
/** /**

View File

@ -1036,6 +1036,7 @@ export interface RankEval<T = any> extends Generic {
ignore_unavailable?: boolean; ignore_unavailable?: boolean;
allow_no_indices?: boolean; allow_no_indices?: boolean;
expand_wildcards?: 'open' | 'closed' | 'none' | 'all'; expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
body: T; body: T;
} }
@ -2011,6 +2012,7 @@ export interface SecurityGetApiKey extends Generic {
name?: string; name?: string;
username?: string; username?: string;
realm_name?: string; realm_name?: string;
owner?: boolean;
} }
export interface SecurityGetBuiltinPrivileges extends Generic { export interface SecurityGetBuiltinPrivileges extends Generic {
@ -2151,9 +2153,11 @@ export interface TransformStartTransform extends Generic {
export interface TransformStopTransform extends Generic { export interface TransformStopTransform extends Generic {
transform_id: string; transform_id: string;
force?: boolean;
wait_for_completion?: boolean; wait_for_completion?: boolean;
timeout?: string; timeout?: string;
allow_no_match?: boolean; allow_no_match?: boolean;
wait_for_checkpoint?: boolean;
} }
export interface TransformUpdateTransform<T = any> extends Generic { export interface TransformUpdateTransform<T = any> extends Generic {

View File

@ -4134,6 +4134,7 @@ client.rankEval({
ignore_unavailable: boolean, ignore_unavailable: boolean,
allow_no_indices: boolean, allow_no_indices: boolean,
expand_wildcards: 'open' | 'closed' | 'none' | 'all', expand_wildcards: 'open' | 'closed' | 'none' | 'all',
search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
body: object body: object
}) })
---- ----
@ -4153,6 +4154,9 @@ link:{ref}/search-rank-eval.html[Reference]
|`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. + |`'open' \| 'closed' \| 'none' \| 'all'` - Whether to expand wildcard expression to concrete indices that are open, closed or both. +
_Default:_ `open` _Default:_ `open`
|`search_type` or `searchType`
|`'query_then_fetch' \| 'dfs_query_then_fetch'` - Search operation type
|`body` |`body`
|`object` - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. |`object` - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.
@ -7994,7 +7998,8 @@ client.security.getApiKey({
id: string, id: string,
name: string, name: string,
username: string, username: string,
realm_name: string realm_name: string,
owner: boolean
}) })
---- ----
link:{ref}/security-api-get-api-key.html[Reference] link:{ref}/security-api-get-api-key.html[Reference]
@ -8012,6 +8017,9 @@ link:{ref}/security-api-get-api-key.html[Reference]
|`realm_name` or `realmName` |`realm_name` or `realmName`
|`string` - realm name of the user who created this API key to be retrieved |`string` - realm name of the user who created this API key to be retrieved
|`owner`
|`boolean` - flag to query API keys owned by the currently authenticated user
|=== |===
=== security.getBuiltinPrivileges === security.getBuiltinPrivileges
@ -8549,9 +8557,11 @@ link:{ref}/start-transform.html[Reference]
---- ----
client.transform.stopTransform({ client.transform.stopTransform({
transform_id: string, transform_id: string,
force: boolean,
wait_for_completion: boolean, wait_for_completion: boolean,
timeout: string, timeout: string,
allow_no_match: boolean allow_no_match: boolean,
wait_for_checkpoint: boolean
}) })
---- ----
link:{ref}/stop-transform.html[Reference] link:{ref}/stop-transform.html[Reference]
@ -8560,6 +8570,9 @@ link:{ref}/stop-transform.html[Reference]
|`transform_id` or `transformId` |`transform_id` or `transformId`
|`string` - The id of the transform to stop |`string` - The id of the transform to stop
|`force`
|`boolean` - Whether to force stop a failed transform or not. Default to false
|`wait_for_completion` or `waitForCompletion` |`wait_for_completion` or `waitForCompletion`
|`boolean` - Whether to wait for the transform to fully stop before returning or not. Default to false |`boolean` - Whether to wait for the transform to fully stop before returning or not. Default to false
@ -8569,6 +8582,9 @@ link:{ref}/stop-transform.html[Reference]
|`allow_no_match` or `allowNoMatch` |`allow_no_match` or `allowNoMatch`
|`boolean` - Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified) |`boolean` - Whether to ignore if a wildcard expression matches no transforms. (This includes `_all` string or when no transforms have been specified)
|`wait_for_checkpoint` or `waitForCheckpoint`
|`boolean` - Whether to wait for the transform to reach a checkpoint before stopping. Default to false
|=== |===
=== transform.updateTransform === transform.updateTransform