API generation
This commit is contained in:
@ -15,6 +15,7 @@ function buildRankEval (opts) {
|
||||
'ignore_unavailable',
|
||||
'allow_no_indices',
|
||||
'expand_wildcards',
|
||||
'search_type',
|
||||
'pretty',
|
||||
'human',
|
||||
'error_trace',
|
||||
@ -26,6 +27,7 @@ function buildRankEval (opts) {
|
||||
ignoreUnavailable: 'ignore_unavailable',
|
||||
allowNoIndices: 'allow_no_indices',
|
||||
expandWildcards: 'expand_wildcards',
|
||||
searchType: 'search_type',
|
||||
errorTrace: 'error_trace',
|
||||
filterPath: 'filter_path'
|
||||
}
|
||||
|
||||
@ -15,11 +15,13 @@ function buildSecurityGetApiKey (opts) {
|
||||
'id',
|
||||
'name',
|
||||
'username',
|
||||
'realm_name'
|
||||
'realm_name',
|
||||
'owner'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
realmName: 'realm_name'
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -12,14 +12,17 @@ function buildTransformStopTransform (opts) {
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
'force',
|
||||
'wait_for_completion',
|
||||
'timeout',
|
||||
'allow_no_match'
|
||||
'allow_no_match',
|
||||
'wait_for_checkpoint'
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
waitForCompletion: 'wait_for_completion',
|
||||
allowNoMatch: 'allow_no_match'
|
||||
allowNoMatch: 'allow_no_match',
|
||||
waitForCheckpoint: 'wait_for_checkpoint'
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
4
api/requestParams.d.ts
vendored
4
api/requestParams.d.ts
vendored
@ -1036,6 +1036,7 @@ export interface RankEval<T = any> extends Generic {
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
expand_wildcards?: 'open' | 'closed' | 'none' | 'all';
|
||||
search_type?: 'query_then_fetch' | 'dfs_query_then_fetch';
|
||||
body: T;
|
||||
}
|
||||
|
||||
@ -2011,6 +2012,7 @@ export interface SecurityGetApiKey extends Generic {
|
||||
name?: string;
|
||||
username?: string;
|
||||
realm_name?: string;
|
||||
owner?: boolean;
|
||||
}
|
||||
|
||||
export interface SecurityGetBuiltinPrivileges extends Generic {
|
||||
@ -2151,9 +2153,11 @@ export interface TransformStartTransform extends Generic {
|
||||
|
||||
export interface TransformStopTransform extends Generic {
|
||||
transform_id: string;
|
||||
force?: boolean;
|
||||
wait_for_completion?: boolean;
|
||||
timeout?: string;
|
||||
allow_no_match?: boolean;
|
||||
wait_for_checkpoint?: boolean;
|
||||
}
|
||||
|
||||
export interface TransformUpdateTransform<T = any> extends Generic {
|
||||
|
||||
@ -4134,6 +4134,7 @@ client.rankEval({
|
||||
ignore_unavailable: boolean,
|
||||
allow_no_indices: boolean,
|
||||
expand_wildcards: 'open' | 'closed' | 'none' | 'all',
|
||||
search_type: 'query_then_fetch' | 'dfs_query_then_fetch',
|
||||
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. +
|
||||
_Default:_ `open`
|
||||
|
||||
|`search_type` or `searchType`
|
||||
|`'query_then_fetch' \| 'dfs_query_then_fetch'` - Search operation type
|
||||
|
||||
|`body`
|
||||
|`object` - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition.
|
||||
|
||||
@ -7994,7 +7998,8 @@ client.security.getApiKey({
|
||||
id: string,
|
||||
name: string,
|
||||
username: string,
|
||||
realm_name: string
|
||||
realm_name: string,
|
||||
owner: boolean
|
||||
})
|
||||
----
|
||||
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`
|
||||
|`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
|
||||
@ -8549,9 +8557,11 @@ link:{ref}/start-transform.html[Reference]
|
||||
----
|
||||
client.transform.stopTransform({
|
||||
transform_id: string,
|
||||
force: boolean,
|
||||
wait_for_completion: boolean,
|
||||
timeout: string,
|
||||
allow_no_match: boolean
|
||||
allow_no_match: boolean,
|
||||
wait_for_checkpoint: boolean
|
||||
})
|
||||
----
|
||||
link:{ref}/stop-transform.html[Reference]
|
||||
@ -8560,6 +8570,9 @@ link:{ref}/stop-transform.html[Reference]
|
||||
|`transform_id` or `transformId`
|
||||
|`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`
|
||||
|`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`
|
||||
|`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
|
||||
|
||||
Reference in New Issue
Block a user