API generation
This commit is contained in:
@ -524,6 +524,27 @@ SecurityApi.prototype.enableUser = function securityEnableUserApi (params, optio
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.enrollNode = function securityEnrollNodeApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
let { method, body, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
|
||||
|
||||
let path = ''
|
||||
if (method == null) method = 'GET'
|
||||
path = '/' + '_security' + '/' + 'enroll_node'
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: null,
|
||||
querystring
|
||||
}
|
||||
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
SecurityApi.prototype.getApiKey = function securityGetApiKeyApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
@ -1048,6 +1069,7 @@ Object.defineProperties(SecurityApi.prototype, {
|
||||
delete_user: { get () { return this.deleteUser } },
|
||||
disable_user: { get () { return this.disableUser } },
|
||||
enable_user: { get () { return this.enableUser } },
|
||||
enroll_node: { get () { return this.enrollNode } },
|
||||
get_api_key: { get () { return this.getApiKey } },
|
||||
get_builtin_privileges: { get () { return this.getBuiltinPrivileges } },
|
||||
get_privileges: { get () { return this.getPrivileges } },
|
||||
|
||||
@ -26,7 +26,7 @@ const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } =
|
||||
const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']
|
||||
const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }
|
||||
|
||||
function termsenumApi (params, options, callback) {
|
||||
function termsEnumApi (params, options, callback) {
|
||||
;[params, options, callback] = normalizeArguments(params, options, callback)
|
||||
|
||||
// check required parameters
|
||||
@ -53,4 +53,4 @@ function termsenumApi (params, options, callback) {
|
||||
return this.transport.request(request, options, callback)
|
||||
}
|
||||
|
||||
module.exports = termsenumApi
|
||||
module.exports = termsEnumApi
|
||||
@ -84,7 +84,7 @@ const SnapshotApi = require('./api/snapshot')
|
||||
const SqlApi = require('./api/sql')
|
||||
const SslApi = require('./api/ssl')
|
||||
const TasksApi = require('./api/tasks')
|
||||
const termsenumApi = require('./api/termsenum')
|
||||
const termsEnumApi = require('./api/terms_enum')
|
||||
const termvectorsApi = require('./api/termvectors')
|
||||
const TextStructureApi = require('./api/text_structure')
|
||||
const TransformApi = require('./api/transform')
|
||||
@ -202,7 +202,7 @@ ESAPI.prototype.scroll = scrollApi
|
||||
ESAPI.prototype.search = searchApi
|
||||
ESAPI.prototype.searchShards = searchShardsApi
|
||||
ESAPI.prototype.searchTemplate = searchTemplateApi
|
||||
ESAPI.prototype.termsenum = termsenumApi
|
||||
ESAPI.prototype.termsEnum = termsEnumApi
|
||||
ESAPI.prototype.termvectors = termvectorsApi
|
||||
ESAPI.prototype.update = updateApi
|
||||
ESAPI.prototype.updateByQuery = updateByQueryApi
|
||||
@ -464,6 +464,7 @@ Object.defineProperties(ESAPI.prototype, {
|
||||
return this[kTasks]
|
||||
}
|
||||
},
|
||||
terms_enum: { get () { return this.termsEnum } },
|
||||
textStructure: {
|
||||
get () {
|
||||
if (this[kTextStructure] === null) {
|
||||
|
||||
5
api/requestParams.d.ts
vendored
5
api/requestParams.d.ts
vendored
@ -2260,6 +2260,9 @@ export interface SecurityEnableUser extends Generic {
|
||||
refresh?: 'wait_for' | boolean;
|
||||
}
|
||||
|
||||
export interface SecurityEnrollNode extends Generic {
|
||||
}
|
||||
|
||||
export interface SecurityGetApiKey extends Generic {
|
||||
id?: string;
|
||||
name?: string;
|
||||
@ -2509,7 +2512,7 @@ export interface TasksList extends Generic {
|
||||
timeout?: string;
|
||||
}
|
||||
|
||||
export interface Termsenum<T = RequestBody> extends Generic {
|
||||
export interface TermsEnum<T = RequestBody> extends Generic {
|
||||
index: string | string[];
|
||||
body?: T;
|
||||
}
|
||||
|
||||
@ -9323,6 +9323,16 @@ link:{ref}/security-api-enable-user.html[Documentation] +
|
||||
|
||||
|===
|
||||
|
||||
[discrete]
|
||||
=== security.enrollNode
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.security.enrollNode()
|
||||
----
|
||||
link:{ref}/security-api-enroll-node.html[Documentation] +
|
||||
|
||||
|
||||
[discrete]
|
||||
=== security.getApiKey
|
||||
|
||||
@ -10346,16 +10356,16 @@ _Default:_ `nodes`
|
||||
|===
|
||||
|
||||
[discrete]
|
||||
=== termsenum
|
||||
=== termsEnum
|
||||
*Stability:* beta
|
||||
[source,ts]
|
||||
----
|
||||
client.termsenum({
|
||||
client.termsEnum({
|
||||
index: string | string[],
|
||||
body: object
|
||||
})
|
||||
----
|
||||
link:{ref}/terms-enum.html[Documentation] +
|
||||
link:{ref}/search-terms-enum.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`index`
|
||||
|
||||
20
index.d.ts
vendored
20
index.d.ts
vendored
@ -2220,6 +2220,14 @@ declare class Client {
|
||||
enableUser<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
enableUser<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityEnableUser, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
enableUser<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityEnableUser, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
enroll_node<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityEnrollNode, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
enroll_node<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
enroll_node<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityEnrollNode, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
enroll_node<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityEnrollNode, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
enrollNode<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityEnrollNode, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
enrollNode<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
enrollNode<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityEnrollNode, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
enrollNode<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityEnrollNode, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
get_api_key<TResponse = Record<string, any>, TContext = Context>(params?: RequestParams.SecurityGetApiKey, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
get_api_key<TResponse = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
get_api_key<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.SecurityGetApiKey, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
@ -2561,10 +2569,14 @@ declare class Client {
|
||||
list<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.TasksList, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
list<TResponse = Record<string, any>, TContext = Context>(params: RequestParams.TasksList, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
}
|
||||
termsenum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Termsenum<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
termsenum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
termsenum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.Termsenum<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
termsenum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.Termsenum<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
terms_enum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TermsEnum<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
terms_enum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
terms_enum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TermsEnum<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
terms_enum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TermsEnum<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
termsEnum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.TermsEnum<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
termsEnum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
termsEnum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TermsEnum<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
termsEnum<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.TermsEnum<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
termvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params?: RequestParams.Termvectors<TRequestBody>, options?: TransportRequestOptions): TransportRequestPromise<ApiResponse<TResponse, TContext>>
|
||||
termvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
termvectors<TResponse = Record<string, any>, TRequestBody extends RequestBody = Record<string, any>, TContext = Context>(params: RequestParams.Termvectors<TRequestBody>, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
|
||||
Reference in New Issue
Block a user