Update unknown parameter handling. (#1568)
This commit is contained in:
committed by
GitHub
parent
070b9d75b9
commit
4492532727
52
index.js
52
index.js
@ -20,34 +20,34 @@
|
||||
'use strict'
|
||||
|
||||
const {
|
||||
Diagnostic,
|
||||
Transport,
|
||||
WeightedConnectionPool,
|
||||
ClusterConnectionPool,
|
||||
BaseConnectionPool,
|
||||
CloudConnectionPool,
|
||||
BaseConnection,
|
||||
HttpConnection,
|
||||
UndiciConnection,
|
||||
Serializer,
|
||||
errors,
|
||||
events
|
||||
Diagnostic,
|
||||
Transport,
|
||||
WeightedConnectionPool,
|
||||
ClusterConnectionPool,
|
||||
BaseConnectionPool,
|
||||
CloudConnectionPool,
|
||||
BaseConnection,
|
||||
HttpConnection,
|
||||
UndiciConnection,
|
||||
Serializer,
|
||||
errors,
|
||||
events
|
||||
} = require('@elastic/transport')
|
||||
|
||||
const { default: Client } = require('./lib/client')
|
||||
|
||||
module.exports = {
|
||||
Client,
|
||||
Diagnostic,
|
||||
Transport,
|
||||
WeightedConnectionPool,
|
||||
ClusterConnectionPool,
|
||||
BaseConnectionPool,
|
||||
CloudConnectionPool,
|
||||
BaseConnection,
|
||||
HttpConnection,
|
||||
UndiciConnection,
|
||||
Serializer,
|
||||
errors,
|
||||
events
|
||||
module.exports = {
|
||||
Client,
|
||||
Diagnostic,
|
||||
Transport,
|
||||
WeightedConnectionPool,
|
||||
ClusterConnectionPool,
|
||||
BaseConnectionPool,
|
||||
CloudConnectionPool,
|
||||
BaseConnection,
|
||||
HttpConnection,
|
||||
UndiciConnection,
|
||||
Serializer,
|
||||
errors,
|
||||
events
|
||||
}
|
||||
|
||||
@ -48,21 +48,15 @@ export default class AsyncSearch {
|
||||
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchDeleteResponse>
|
||||
async delete (this: That, params: T.AsyncSearchDeleteRequest | TB.AsyncSearchDeleteRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,21 +70,15 @@ export default class AsyncSearch {
|
||||
async get<TDocument = unknown> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchGetResponse<TDocument>>
|
||||
async get<TDocument = unknown> (this: That, params: T.AsyncSearchGetRequest | TB.AsyncSearchGetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['keep_alive', 'typed_keys', 'wait_for_completion_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,21 +92,15 @@ export default class AsyncSearch {
|
||||
async status<TDocument = unknown> (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchStatusResponse<TDocument>>
|
||||
async status<TDocument = unknown> (this: That, params: T.AsyncSearchStatusRequest | TB.AsyncSearchStatusRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,22 +114,22 @@ export default class AsyncSearch {
|
||||
async submit<TDocument = unknown> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise<T.AsyncSearchSubmitResponse<TDocument>>
|
||||
async submit<TDocument = unknown> (this: That, params?: T.AsyncSearchSubmitRequest | TB.AsyncSearchSubmitRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['batched_reduce_size', 'wait_for_completion_timeout', 'keep_on_completion', 'typed_keys', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['aggs', 'aggregations', 'collapse', 'highlight', 'indices_boost', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'slice', 'fields', 'suggest', 'pit', 'runtime_mappings']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Autoscaling {
|
||||
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingDeleteAutoscalingPolicyResponse>
|
||||
async deleteAutoscalingPolicy (this: That, params: T.AutoscalingDeleteAutoscalingPolicyRequest | TB.AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,22 +70,16 @@ export default class Autoscaling {
|
||||
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions): Promise<T.AutoscalingGetAutoscalingCapacityResponse>
|
||||
async getAutoscalingCapacity (this: That, params?: T.AutoscalingGetAutoscalingCapacityRequest | TB.AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,21 +93,15 @@ export default class Autoscaling {
|
||||
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingGetAutoscalingPolicyResponse>
|
||||
async getAutoscalingPolicy (this: That, params: T.AutoscalingGetAutoscalingPolicyRequest | TB.AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,20 +115,20 @@ export default class Autoscaling {
|
||||
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<T.AutoscalingPutAutoscalingPolicyResponse>
|
||||
async putAutoscalingPolicy (this: That, params: T.AutoscalingPutAutoscalingPolicyRequest | TB.AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['policy']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,20 +42,20 @@ export default async function BulkApi<TSource = unknown> (this: That, params: T.
|
||||
export default async function BulkApi<TSource = unknown> (this: That, params: T.BulkRequest<TSource> | TB.BulkRequest<TSource>, options?: TransportRequestOptions): Promise<T.BulkResponse>
|
||||
export default async function BulkApi<TSource = unknown> (this: That, params: T.BulkRequest<TSource> | TB.BulkRequest<TSource>, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index', 'type']
|
||||
const acceptedQuery: string[] = ['pipeline', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'timeout', 'type', 'wait_for_active_shards', 'require_alias', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['operations']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,22 +48,16 @@ export default class Cat {
|
||||
async aliases (this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptions): Promise<T.CatAliasesResponse>
|
||||
async aliases (this: That, params?: T.CatAliasesRequest | TB.CatAliasesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['expand_wildcards', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,22 +78,16 @@ export default class Cat {
|
||||
async allocation (this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptions): Promise<T.CatAllocationResponse>
|
||||
async allocation (this: That, params?: T.CatAllocationRequest | TB.CatAllocationRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedQuery: string[] = ['bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,22 +108,16 @@ export default class Cat {
|
||||
async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptions): Promise<T.CatCountResponse>
|
||||
async count (this: That, params?: T.CatCountRequest | TB.CatCountRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -156,22 +138,16 @@ export default class Cat {
|
||||
async fielddata (this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptions): Promise<T.CatFielddataResponse>
|
||||
async fielddata (this: That, params?: T.CatFielddataRequest | TB.CatFielddataRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['fields']
|
||||
const acceptedQuery: string[] = ['bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,22 +168,16 @@ export default class Cat {
|
||||
async health (this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptions): Promise<T.CatHealthResponse>
|
||||
async health (this: That, params?: T.CatHealthRequest | TB.CatHealthRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['include_timestamp', 'ts', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -221,22 +191,16 @@ export default class Cat {
|
||||
async help (this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptions): Promise<T.CatHelpResponse>
|
||||
async help (this: That, params?: T.CatHelpRequest | TB.CatHelpRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -250,22 +214,16 @@ export default class Cat {
|
||||
async indices (this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptions): Promise<T.CatIndicesResponse>
|
||||
async indices (this: That, params?: T.CatIndicesRequest | TB.CatIndicesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['bytes', 'expand_wildcards', 'health', 'include_unloaded_segments', 'pri', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -286,22 +244,16 @@ export default class Cat {
|
||||
async master (this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptions): Promise<T.CatMasterResponse>
|
||||
async master (this: That, params?: T.CatMasterRequest | TB.CatMasterRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,22 +267,16 @@ export default class Cat {
|
||||
async mlDataFrameAnalytics (this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<T.CatMlDataFrameAnalyticsResponse>
|
||||
async mlDataFrameAnalytics (this: That, params?: T.CatMlDataFrameAnalyticsRequest | TB.CatMlDataFrameAnalyticsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['allow_no_match', 'bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -351,22 +297,16 @@ export default class Cat {
|
||||
async mlDatafeeds (this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptions): Promise<T.CatMlDatafeedsResponse>
|
||||
async mlDatafeeds (this: That, params?: T.CatMlDatafeedsRequest | TB.CatMlDatafeedsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['datafeed_id']
|
||||
const acceptedQuery: string[] = ['allow_no_datafeeds', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -387,22 +327,16 @@ export default class Cat {
|
||||
async mlJobs (this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptions): Promise<T.CatMlJobsResponse>
|
||||
async mlJobs (this: That, params?: T.CatMlJobsRequest | TB.CatMlJobsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['job_id']
|
||||
const acceptedQuery: string[] = ['allow_no_jobs', 'bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -423,22 +357,16 @@ export default class Cat {
|
||||
async mlTrainedModels (this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptions): Promise<T.CatMlTrainedModelsResponse>
|
||||
async mlTrainedModels (this: That, params?: T.CatMlTrainedModelsRequest | TB.CatMlTrainedModelsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['model_id']
|
||||
const acceptedQuery: string[] = ['allow_no_match', 'bytes', 'from', 'size', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -459,22 +387,16 @@ export default class Cat {
|
||||
async nodeattrs (this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptions): Promise<T.CatNodeattrsResponse>
|
||||
async nodeattrs (this: That, params?: T.CatNodeattrsRequest | TB.CatNodeattrsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -488,22 +410,16 @@ export default class Cat {
|
||||
async nodes (this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptions): Promise<T.CatNodesResponse>
|
||||
async nodes (this: That, params?: T.CatNodesRequest | TB.CatNodesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['bytes', 'full_id', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -517,22 +433,16 @@ export default class Cat {
|
||||
async pendingTasks (this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptions): Promise<T.CatPendingTasksResponse>
|
||||
async pendingTasks (this: That, params?: T.CatPendingTasksRequest | TB.CatPendingTasksRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -546,22 +456,16 @@ export default class Cat {
|
||||
async plugins (this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptions): Promise<T.CatPluginsResponse>
|
||||
async plugins (this: That, params?: T.CatPluginsRequest | TB.CatPluginsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -575,22 +479,16 @@ export default class Cat {
|
||||
async recovery (this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptions): Promise<T.CatRecoveryResponse>
|
||||
async recovery (this: That, params?: T.CatRecoveryRequest | TB.CatRecoveryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['active_only', 'bytes', 'detailed', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -611,22 +509,16 @@ export default class Cat {
|
||||
async repositories (this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptions): Promise<T.CatRepositoriesResponse>
|
||||
async repositories (this: That, params?: T.CatRepositoriesRequest | TB.CatRepositoriesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -640,22 +532,16 @@ export default class Cat {
|
||||
async segments (this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptions): Promise<T.CatSegmentsResponse>
|
||||
async segments (this: That, params?: T.CatSegmentsRequest | TB.CatSegmentsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -676,22 +562,16 @@ export default class Cat {
|
||||
async shards (this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptions): Promise<T.CatShardsResponse>
|
||||
async shards (this: That, params?: T.CatShardsRequest | TB.CatShardsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['bytes', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -712,22 +592,16 @@ export default class Cat {
|
||||
async snapshots (this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptions): Promise<T.CatSnapshotsResponse>
|
||||
async snapshots (this: That, params?: T.CatSnapshotsRequest | TB.CatSnapshotsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository']
|
||||
const acceptedQuery: string[] = ['ignore_unavailable', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -748,22 +622,16 @@ export default class Cat {
|
||||
async tasks (this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptions): Promise<T.CatTasksResponse>
|
||||
async tasks (this: That, params?: T.CatTasksRequest | TB.CatTasksRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['actions', 'detailed', 'node_id', 'parent_task', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -777,22 +645,16 @@ export default class Cat {
|
||||
async templates (this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptions): Promise<T.CatTemplatesResponse>
|
||||
async templates (this: That, params?: T.CatTemplatesRequest | TB.CatTemplatesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -813,22 +675,16 @@ export default class Cat {
|
||||
async threadPool (this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptions): Promise<T.CatThreadPoolResponse>
|
||||
async threadPool (this: That, params?: T.CatThreadPoolRequest | TB.CatThreadPoolRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['thread_pool_patterns']
|
||||
const acceptedQuery: string[] = ['size', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -849,22 +705,16 @@ export default class Cat {
|
||||
async transforms (this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptions): Promise<T.CatTransformsResponse>
|
||||
async transforms (this: That, params?: T.CatTransformsRequest | TB.CatTransformsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id']
|
||||
const acceptedQuery: string[] = ['allow_no_match', 'from', 'size', 'format', 'h', 'help', 'local', 'master_timeout', 's', 'v', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Ccr {
|
||||
async deleteAutoFollowPattern (this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrDeleteAutoFollowPatternResponse>
|
||||
async deleteAutoFollowPattern (this: That, params: T.CcrDeleteAutoFollowPatternRequest | TB.CcrDeleteAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,21 +70,21 @@ export default class Ccr {
|
||||
async follow (this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptions): Promise<T.CcrFollowResponse>
|
||||
async follow (this: That, params: T.CcrFollowRequest | TB.CcrFollowRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['wait_for_active_shards', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['leader_index', 'max_outstanding_read_requests', 'max_outstanding_write_requests', 'max_read_request_operation_count', 'max_read_request_size', 'max_retry_delay', 'max_write_buffer_count', 'max_write_buffer_size', 'max_write_request_operation_count', 'max_write_request_size', 'read_poll_timeout', 'remote_cluster']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,21 +98,15 @@ export default class Ccr {
|
||||
async followInfo (this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptions): Promise<T.CcrFollowInfoResponse>
|
||||
async followInfo (this: That, params: T.CcrFollowInfoRequest | TB.CcrFollowInfoRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,21 +120,15 @@ export default class Ccr {
|
||||
async followStats (this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptions): Promise<T.CcrFollowStatsResponse>
|
||||
async followStats (this: That, params: T.CcrFollowStatsRequest | TB.CcrFollowStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,21 +142,21 @@ export default class Ccr {
|
||||
async forgetFollower (this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptions): Promise<T.CcrForgetFollowerResponse>
|
||||
async forgetFollower (this: That, params: T.CcrForgetFollowerRequest | TB.CcrForgetFollowerRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['follower_cluster', 'follower_index', 'follower_index_uuid', 'leader_remote_cluster']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,22 +170,16 @@ export default class Ccr {
|
||||
async getAutoFollowPattern (this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrGetAutoFollowPatternResponse>
|
||||
async getAutoFollowPattern (this: That, params?: T.CcrGetAutoFollowPatternRequest | TB.CcrGetAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -224,21 +200,15 @@ export default class Ccr {
|
||||
async pauseAutoFollowPattern (this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrPauseAutoFollowPatternResponse>
|
||||
async pauseAutoFollowPattern (this: That, params: T.CcrPauseAutoFollowPatternRequest | TB.CcrPauseAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -252,21 +222,15 @@ export default class Ccr {
|
||||
async pauseFollow (this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptions): Promise<T.CcrPauseFollowResponse>
|
||||
async pauseFollow (this: That, params: T.CcrPauseFollowRequest | TB.CcrPauseFollowRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -280,21 +244,21 @@ export default class Ccr {
|
||||
async putAutoFollowPattern (this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrPutAutoFollowPatternResponse>
|
||||
async putAutoFollowPattern (this: That, params: T.CcrPutAutoFollowPatternRequest | TB.CcrPutAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['remote_cluster', 'follow_index_pattern', 'leader_index_patterns', 'leader_index_exclusion_patterns', 'max_outstanding_read_requests', 'settings', 'max_outstanding_write_requests', 'read_poll_timeout', 'max_read_request_operation_count', 'max_read_request_size', 'max_retry_delay', 'max_write_buffer_count', 'max_write_buffer_size', 'max_write_request_operation_count', 'max_write_request_size']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -308,21 +272,15 @@ export default class Ccr {
|
||||
async resumeAutoFollowPattern (this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<T.CcrResumeAutoFollowPatternResponse>
|
||||
async resumeAutoFollowPattern (this: That, params: T.CcrResumeAutoFollowPatternRequest | TB.CcrResumeAutoFollowPatternRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -336,21 +294,21 @@ export default class Ccr {
|
||||
async resumeFollow (this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptions): Promise<T.CcrResumeFollowResponse>
|
||||
async resumeFollow (this: That, params: T.CcrResumeFollowRequest | TB.CcrResumeFollowRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['max_outstanding_read_requests', 'max_outstanding_write_requests', 'max_read_request_operation_count', 'max_read_request_size', 'max_retry_delay', 'max_write_buffer_count', 'max_write_buffer_size', 'max_write_request_operation_count', 'max_write_request_size', 'read_poll_timeout']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -364,22 +322,16 @@ export default class Ccr {
|
||||
async stats (this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptions): Promise<T.CcrStatsResponse>
|
||||
async stats (this: That, params?: T.CcrStatsRequest | TB.CcrStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -393,21 +345,15 @@ export default class Ccr {
|
||||
async unfollow (this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptions): Promise<T.CcrUnfollowResponse>
|
||||
async unfollow (this: That, params: T.CcrUnfollowRequest | TB.CcrUnfollowRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function ClearScrollApi (this: That, params?: T.ClearScroll
|
||||
export default async function ClearScrollApi (this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptions): Promise<T.ClearScrollResponse>
|
||||
export default async function ClearScrollApi (this: That, params?: T.ClearScrollRequest | TB.ClearScrollRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['scroll_id']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function ClosePointInTimeApi (this: That, params: T.ClosePo
|
||||
export default async function ClosePointInTimeApi (this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptions): Promise<T.ClosePointInTimeResponse>
|
||||
export default async function ClosePointInTimeApi (this: That, params: T.ClosePointInTimeRequest | TB.ClosePointInTimeRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['id']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,22 +48,22 @@ export default class Cluster {
|
||||
async allocationExplain (this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptions): Promise<T.ClusterAllocationExplainResponse>
|
||||
async allocationExplain (this: That, params?: T.ClusterAllocationExplainRequest | TB.ClusterAllocationExplainRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['include_disk_info', 'include_yes_decisions', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['current_node', 'index', 'primary', 'shard']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,21 +77,15 @@ export default class Cluster {
|
||||
async deleteComponentTemplate (this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterDeleteComponentTemplateResponse>
|
||||
async deleteComponentTemplate (this: That, params: T.ClusterDeleteComponentTemplateRequest | TB.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,22 +99,16 @@ export default class Cluster {
|
||||
async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptions): Promise<T.ClusterDeleteVotingConfigExclusionsResponse>
|
||||
async deleteVotingConfigExclusions (this: That, params?: T.ClusterDeleteVotingConfigExclusionsRequest | TB.ClusterDeleteVotingConfigExclusionsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['wait_for_removal', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,21 +122,15 @@ export default class Cluster {
|
||||
async existsComponentTemplate (this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterExistsComponentTemplateResponse>
|
||||
async existsComponentTemplate (this: That, params: T.ClusterExistsComponentTemplateRequest | TB.ClusterExistsComponentTemplateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'local', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,22 +144,16 @@ export default class Cluster {
|
||||
async getComponentTemplate (this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterGetComponentTemplateResponse>
|
||||
async getComponentTemplate (this: That, params?: T.ClusterGetComponentTemplateRequest | TB.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['flat_settings', 'local', 'master_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,22 +174,16 @@ export default class Cluster {
|
||||
async getSettings (this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptions): Promise<T.ClusterGetSettingsResponse>
|
||||
async getSettings (this: That, params?: T.ClusterGetSettingsRequest | TB.ClusterGetSettingsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['flat_settings', 'include_defaults', 'master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,22 +197,16 @@ export default class Cluster {
|
||||
async health (this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptions): Promise<T.ClusterHealthResponse>
|
||||
async health (this: That, params?: T.ClusterHealthRequest | TB.ClusterHealthRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['expand_wildcards', 'level', 'local', 'master_timeout', 'timeout', 'wait_for_active_shards', 'wait_for_events', 'wait_for_nodes', 'wait_for_no_initializing_shards', 'wait_for_no_relocating_shards', 'wait_for_status', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -263,22 +227,16 @@ export default class Cluster {
|
||||
async pendingTasks (this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptions): Promise<T.ClusterPendingTasksResponse>
|
||||
async pendingTasks (this: That, params?: T.ClusterPendingTasksRequest | TB.ClusterPendingTasksRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['local', 'master_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,22 +250,16 @@ export default class Cluster {
|
||||
async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptions): Promise<T.ClusterPostVotingConfigExclusionsResponse>
|
||||
async postVotingConfigExclusions (this: That, params?: T.ClusterPostVotingConfigExclusionsRequest | TB.ClusterPostVotingConfigExclusionsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['node_names', 'node_ids', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -321,21 +273,21 @@ export default class Cluster {
|
||||
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterPutComponentTemplateResponse>
|
||||
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['create', 'master_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['template', 'aliases', 'mappings', 'settings', 'version', '_meta']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -349,22 +301,22 @@ export default class Cluster {
|
||||
async putSettings (this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptions): Promise<T.ClusterPutSettingsResponse>
|
||||
async putSettings (this: That, params?: T.ClusterPutSettingsRequest | TB.ClusterPutSettingsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['flat_settings', 'master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['persistent', 'transient']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -378,22 +330,16 @@ export default class Cluster {
|
||||
async remoteInfo (this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptions): Promise<T.ClusterRemoteInfoResponse>
|
||||
async remoteInfo (this: That, params?: T.ClusterRemoteInfoRequest | TB.ClusterRemoteInfoRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -407,22 +353,22 @@ export default class Cluster {
|
||||
async reroute (this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptions): Promise<T.ClusterRerouteResponse>
|
||||
async reroute (this: That, params?: T.ClusterRerouteRequest | TB.ClusterRerouteRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['dry_run', 'explain', 'metric', 'retry_failed', 'master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['commands']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -436,22 +382,16 @@ export default class Cluster {
|
||||
async state (this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptions): Promise<T.ClusterStateResponse>
|
||||
async state (this: That, params?: T.ClusterStateRequest | TB.ClusterStateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['metric', 'index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'expand_wildcards', 'flat_settings', 'ignore_unavailable', 'local', 'master_timeout', 'wait_for_metadata_version', 'wait_for_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -475,22 +415,16 @@ export default class Cluster {
|
||||
async stats (this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptions): Promise<T.ClusterStatsResponse>
|
||||
async stats (this: That, params?: T.ClusterStatsRequest | TB.ClusterStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedQuery: string[] = ['flat_settings', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function CountApi (this: That, params?: T.CountRequest | TB
|
||||
export default async function CountApi (this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptions): Promise<T.CountResponse>
|
||||
export default async function CountApi (this: That, params?: T.CountRequest | TB.CountRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'expand_wildcards', 'ignore_throttled', 'ignore_unavailable', 'lenient', 'min_score', 'preference', 'routing', 'terminate_after', 'q', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['query']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,20 +42,20 @@ export default async function CreateApi<TDocument = unknown> (this: That, params
|
||||
export default async function CreateApi<TDocument = unknown> (this: That, params: T.CreateRequest<TDocument> | TB.CreateRequest<TDocument>, options?: TransportRequestOptions): Promise<T.CreateResponse>
|
||||
export default async function CreateApi<TDocument = unknown> (this: That, params: T.CreateRequest<TDocument> | TB.CreateRequest<TDocument>, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'index', 'type']
|
||||
const acceptedQuery: string[] = ['pipeline', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'wait_for_active_shards', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['document']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class DanglingIndices {
|
||||
async deleteDanglingIndex (this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptions): Promise<T.DanglingIndicesDeleteDanglingIndexResponse>
|
||||
async deleteDanglingIndex (this: That, params: T.DanglingIndicesDeleteDanglingIndexRequest | TB.DanglingIndicesDeleteDanglingIndexRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index_uuid']
|
||||
const acceptedQuery: string[] = ['accept_data_loss', 'master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,21 +70,15 @@ export default class DanglingIndices {
|
||||
async importDanglingIndex (this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptions): Promise<T.DanglingIndicesImportDanglingIndexResponse>
|
||||
async importDanglingIndex (this: That, params: T.DanglingIndicesImportDanglingIndexRequest | TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index_uuid']
|
||||
const acceptedQuery: string[] = ['accept_data_loss', 'master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,22 +92,16 @@ export default class DanglingIndices {
|
||||
async listDanglingIndices (this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptions): Promise<T.DanglingIndicesListDanglingIndicesResponse>
|
||||
async listDanglingIndices (this: That, params?: T.DanglingIndicesListDanglingIndicesRequest | TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function DeleteApi (this: That, params: T.DeleteRequest | T
|
||||
export default async function DeleteApi (this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptions): Promise<T.DeleteResponse>
|
||||
export default async function DeleteApi (this: That, params: T.DeleteRequest | TB.DeleteRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'index', 'type']
|
||||
const acceptedQuery: string[] = ['if_primary_term', 'if_seq_no', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'wait_for_active_shards', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function DeleteByQueryApi (this: That, params: T.DeleteByQu
|
||||
export default async function DeleteByQueryApi (this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptions): Promise<T.DeleteByQueryResponse>
|
||||
export default async function DeleteByQueryApi (this: That, params: T.DeleteByQueryRequest | TB.DeleteByQueryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'analyzer', 'analyze_wildcard', 'conflicts', 'default_operator', 'df', 'expand_wildcards', 'from', 'ignore_unavailable', 'lenient', 'preference', 'refresh', 'request_cache', 'requests_per_second', 'routing', 'q', 'scroll', 'scroll_size', 'search_timeout', 'search_type', 'size', 'slices', 'sort', '_source', '_source_excludes', '_source_includes', 'stats', 'terminate_after', 'timeout', 'version', 'wait_for_active_shards', 'wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['query', 'slice']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function DeleteByQueryRethrottleApi (this: That, params: T.
|
||||
export default async function DeleteByQueryRethrottleApi (this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions): Promise<T.DeleteByQueryRethrottleResponse>
|
||||
export default async function DeleteByQueryRethrottleApi (this: That, params: T.DeleteByQueryRethrottleRequest | TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['task_id']
|
||||
const acceptedQuery: string[] = ['requests_per_second', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function DeleteScriptApi (this: That, params: T.DeleteScrip
|
||||
export default async function DeleteScriptApi (this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptions): Promise<T.DeleteScriptResponse>
|
||||
export default async function DeleteScriptApi (this: That, params: T.DeleteScriptRequest | TB.DeleteScriptRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Enrich {
|
||||
async deletePolicy (this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptions): Promise<T.EnrichDeletePolicyResponse>
|
||||
async deletePolicy (this: That, params: T.EnrichDeletePolicyRequest | TB.EnrichDeletePolicyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,21 +70,15 @@ export default class Enrich {
|
||||
async executePolicy (this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptions): Promise<T.EnrichExecutePolicyResponse>
|
||||
async executePolicy (this: That, params: T.EnrichExecutePolicyRequest | TB.EnrichExecutePolicyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,22 +92,16 @@ export default class Enrich {
|
||||
async getPolicy (this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptions): Promise<T.EnrichGetPolicyResponse>
|
||||
async getPolicy (this: That, params?: T.EnrichGetPolicyRequest | TB.EnrichGetPolicyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,21 +122,21 @@ export default class Enrich {
|
||||
async putPolicy (this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptions): Promise<T.EnrichPutPolicyResponse>
|
||||
async putPolicy (this: That, params: T.EnrichPutPolicyRequest | TB.EnrichPutPolicyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['geo_match', 'match']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,22 +150,16 @@ export default class Enrich {
|
||||
async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptions): Promise<T.EnrichStatsResponse>
|
||||
async stats (this: That, params?: T.EnrichStatsRequest | TB.EnrichStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Eql {
|
||||
async delete (this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptions): Promise<T.EqlDeleteResponse>
|
||||
async delete (this: That, params: T.EqlDeleteRequest | TB.EqlDeleteRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,21 +70,15 @@ export default class Eql {
|
||||
async get<TEvent = unknown> (this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptions): Promise<T.EqlGetResponse<TEvent>>
|
||||
async get<TEvent = unknown> (this: That, params: T.EqlGetRequest | TB.EqlGetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['keep_alive', 'wait_for_completion_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,21 +92,15 @@ export default class Eql {
|
||||
async getStatus (this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptions): Promise<T.EqlGetStatusResponse>
|
||||
async getStatus (this: That, params: T.EqlGetStatusRequest | TB.EqlGetStatusRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,21 +114,21 @@ export default class Eql {
|
||||
async search<TEvent = unknown> (this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptions): Promise<T.EqlSearchResponse<TEvent>>
|
||||
async search<TEvent = unknown> (this: That, params: T.EqlSearchRequest | TB.EqlSearchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'expand_wildcards', 'ignore_unavailable', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['query', 'case_sensitive', 'event_category_field', 'tiebreaker_field', 'timestamp_field', 'fetch_size', 'filter', 'size', 'fields', 'result_position']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function ExistsApi (this: That, params: T.ExistsRequest | T
|
||||
export default async function ExistsApi (this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptions): Promise<T.ExistsResponse>
|
||||
export default async function ExistsApi (this: That, params: T.ExistsRequest | TB.ExistsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'index']
|
||||
const acceptedQuery: string[] = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'stored_fields', 'version', 'version_type', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function ExistsSourceApi (this: That, params: T.ExistsSourc
|
||||
export default async function ExistsSourceApi (this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptions): Promise<T.ExistsSourceResponse>
|
||||
export default async function ExistsSourceApi (this: That, params: T.ExistsSourceRequest | TB.ExistsSourceRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'index', 'type']
|
||||
const acceptedQuery: string[] = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'version', 'version_type', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function ExplainApi<TDocument = unknown> (this: That, param
|
||||
export default async function ExplainApi<TDocument = unknown> (this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptions): Promise<T.ExplainResponse<TDocument>>
|
||||
export default async function ExplainApi<TDocument = unknown> (this: That, params: T.ExplainRequest | TB.ExplainRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'index']
|
||||
const acceptedQuery: string[] = ['analyzer', 'analyze_wildcard', 'default_operator', 'df', 'lenient', 'preference', 'routing', '_source', '_source_excludes', '_source_includes', 'stored_fields', 'q', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['query']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,22 +48,16 @@ export default class Features {
|
||||
async getFeatures (this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptions): Promise<T.FeaturesGetFeaturesResponse>
|
||||
async getFeatures (this: That, params?: T.FeaturesGetFeaturesRequest | TB.FeaturesGetFeaturesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,22 +71,16 @@ export default class Features {
|
||||
async resetFeatures (this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptions): Promise<T.FeaturesResetFeaturesResponse>
|
||||
async resetFeatures (this: That, params?: T.FeaturesResetFeaturesRequest | TB.FeaturesResetFeaturesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequ
|
||||
export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<T.FieldCapsResponse>
|
||||
export default async function FieldCapsApi (this: That, params?: T.FieldCapsRequest | TB.FieldCapsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'expand_wildcards', 'fields', 'ignore_unavailable', 'include_unmapped', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['index_filter', 'runtime_mappings']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,19 +48,15 @@ export default class Fleet {
|
||||
async globalCheckpoints (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async globalCheckpoints (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['wait_for_advance', 'wait_for_index', 'checkpoints', 'timeout']
|
||||
const querystring: Record<string, any> = {}
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function GetApi<TDocument = unknown> (this: That, params: T
|
||||
export default async function GetApi<TDocument = unknown> (this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptions): Promise<T.GetResponse<TDocument>>
|
||||
export default async function GetApi<TDocument = unknown> (this: That, params: T.GetRequest | TB.GetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'index']
|
||||
const acceptedQuery: string[] = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'stored_fields', 'version', 'version_type', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function GetScriptApi (this: That, params: T.GetScriptReque
|
||||
export default async function GetScriptApi (this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptions): Promise<T.GetScriptResponse>
|
||||
export default async function GetScriptApi (this: That, params: T.GetScriptRequest | TB.GetScriptRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,16 @@ export default async function GetScriptContextApi (this: That, params?: T.GetScr
|
||||
export default async function GetScriptContextApi (this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptions): Promise<T.GetScriptContextResponse>
|
||||
export default async function GetScriptContextApi (this: That, params?: T.GetScriptContextRequest | TB.GetScriptContextRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,16 @@ export default async function GetScriptLanguagesApi (this: That, params?: T.GetS
|
||||
export default async function GetScriptLanguagesApi (this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptions): Promise<T.GetScriptLanguagesResponse>
|
||||
export default async function GetScriptLanguagesApi (this: That, params?: T.GetScriptLanguagesRequest | TB.GetScriptLanguagesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function GetSourceApi<TDocument = unknown> (this: That, par
|
||||
export default async function GetSourceApi<TDocument = unknown> (this: That, params: T.GetSourceRequest | TB.GetSourceRequest, options?: TransportRequestOptions): Promise<T.GetSourceResponse<TDocument>>
|
||||
export default async function GetSourceApi<TDocument = unknown> (this: That, params: T.GetSourceRequest | TB.GetSourceRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'index']
|
||||
const acceptedQuery: string[] = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'stored_fields', 'version', 'version_type', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,21 @@ export default class Graph {
|
||||
async explore (this: That, params: T.GraphExploreRequest | TB.GraphExploreRequest, options?: TransportRequestOptions): Promise<T.GraphExploreResponse>
|
||||
async explore (this: That, params: T.GraphExploreRequest | TB.GraphExploreRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['routing', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['connections', 'controls', 'query', 'vertices']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Ilm {
|
||||
async deleteLifecycle (this: That, params: T.IlmDeleteLifecycleRequest | TB.IlmDeleteLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmDeleteLifecycleResponse>
|
||||
async deleteLifecycle (this: That, params: T.IlmDeleteLifecycleRequest | TB.IlmDeleteLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['policy']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,21 +70,15 @@ export default class Ilm {
|
||||
async explainLifecycle (this: That, params: T.IlmExplainLifecycleRequest | TB.IlmExplainLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmExplainLifecycleResponse>
|
||||
async explainLifecycle (this: That, params: T.IlmExplainLifecycleRequest | TB.IlmExplainLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['only_errors', 'only_managed', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,22 +92,16 @@ export default class Ilm {
|
||||
async getLifecycle (this: That, params?: T.IlmGetLifecycleRequest | TB.IlmGetLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmGetLifecycleResponse>
|
||||
async getLifecycle (this: That, params?: T.IlmGetLifecycleRequest | TB.IlmGetLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['policy']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,22 +122,16 @@ export default class Ilm {
|
||||
async getStatus (this: That, params?: T.IlmGetStatusRequest | TB.IlmGetStatusRequest, options?: TransportRequestOptions): Promise<T.IlmGetStatusResponse>
|
||||
async getStatus (this: That, params?: T.IlmGetStatusRequest | TB.IlmGetStatusRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -169,19 +145,15 @@ export default class Ilm {
|
||||
async migrateToDataTiers (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async migrateToDataTiers (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['dry_run']
|
||||
const querystring: Record<string, any> = {}
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -195,21 +167,21 @@ export default class Ilm {
|
||||
async moveToStep (this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptions): Promise<T.IlmMoveToStepResponse>
|
||||
async moveToStep (this: That, params: T.IlmMoveToStepRequest | TB.IlmMoveToStepRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['current_step', 'next_step']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -223,21 +195,21 @@ export default class Ilm {
|
||||
async putLifecycle (this: That, params: T.IlmPutLifecycleRequest | TB.IlmPutLifecycleRequest, options?: TransportRequestOptions): Promise<T.IlmPutLifecycleResponse>
|
||||
async putLifecycle (this: That, params: T.IlmPutLifecycleRequest | TB.IlmPutLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['policy']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -251,21 +223,15 @@ export default class Ilm {
|
||||
async removePolicy (this: That, params: T.IlmRemovePolicyRequest | TB.IlmRemovePolicyRequest, options?: TransportRequestOptions): Promise<T.IlmRemovePolicyResponse>
|
||||
async removePolicy (this: That, params: T.IlmRemovePolicyRequest | TB.IlmRemovePolicyRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -279,21 +245,15 @@ export default class Ilm {
|
||||
async retry (this: That, params: T.IlmRetryRequest | TB.IlmRetryRequest, options?: TransportRequestOptions): Promise<T.IlmRetryResponse>
|
||||
async retry (this: That, params: T.IlmRetryRequest | TB.IlmRetryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,22 +267,16 @@ export default class Ilm {
|
||||
async start (this: That, params?: T.IlmStartRequest | TB.IlmStartRequest, options?: TransportRequestOptions): Promise<T.IlmStartResponse>
|
||||
async start (this: That, params?: T.IlmStartRequest | TB.IlmStartRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -336,22 +290,16 @@ export default class Ilm {
|
||||
async stop (this: That, params?: T.IlmStopRequest | TB.IlmStopRequest, options?: TransportRequestOptions): Promise<T.IlmStopResponse>
|
||||
async stop (this: That, params?: T.IlmStopRequest | TB.IlmStopRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,20 +42,20 @@ export default async function IndexApi<TDocument = unknown> (this: That, params:
|
||||
export default async function IndexApi<TDocument = unknown> (this: That, params: T.IndexRequest<TDocument> | TB.IndexRequest<TDocument>, options?: TransportRequestOptions): Promise<T.IndexResponse>
|
||||
export default async function IndexApi<TDocument = unknown> (this: That, params: T.IndexRequest<TDocument> | TB.IndexRequest<TDocument>, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'index']
|
||||
const acceptedQuery: string[] = ['if_primary_term', 'if_seq_no', 'op_type', 'pipeline', 'refresh', 'routing', 'timeout', 'version', 'version_type', 'wait_for_active_shards', 'require_alias', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['document']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -42,22 +42,16 @@ export default async function InfoApi (this: That, params?: T.InfoRequest | TB.I
|
||||
export default async function InfoApi (this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptions): Promise<T.InfoResponse>
|
||||
export default async function InfoApi (this: That, params?: T.InfoRequest | TB.InfoRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Ingest {
|
||||
async deletePipeline (this: That, params: T.IngestDeletePipelineRequest | TB.IngestDeletePipelineRequest, options?: TransportRequestOptions): Promise<T.IngestDeletePipelineResponse>
|
||||
async deletePipeline (this: That, params: T.IngestDeletePipelineRequest | TB.IngestDeletePipelineRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,22 +70,16 @@ export default class Ingest {
|
||||
async geoIpStats (this: That, params?: T.IngestGeoIpStatsRequest | TB.IngestGeoIpStatsRequest, options?: TransportRequestOptions): Promise<T.IngestGeoIpStatsResponse>
|
||||
async geoIpStats (this: That, params?: T.IngestGeoIpStatsRequest | TB.IngestGeoIpStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,22 +93,16 @@ export default class Ingest {
|
||||
async getPipeline (this: That, params?: T.IngestGetPipelineRequest | TB.IngestGetPipelineRequest, options?: TransportRequestOptions): Promise<T.IngestGetPipelineResponse>
|
||||
async getPipeline (this: That, params?: T.IngestGetPipelineRequest | TB.IngestGetPipelineRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'summary', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,22 +123,16 @@ export default class Ingest {
|
||||
async processorGrok (this: That, params?: T.IngestProcessorGrokRequest | TB.IngestProcessorGrokRequest, options?: TransportRequestOptions): Promise<T.IngestProcessorGrokResponse>
|
||||
async processorGrok (this: That, params?: T.IngestProcessorGrokRequest | TB.IngestProcessorGrokRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,21 +146,21 @@ export default class Ingest {
|
||||
async putPipeline (this: That, params: T.IngestPutPipelineRequest | TB.IngestPutPipelineRequest, options?: TransportRequestOptions): Promise<T.IngestPutPipelineResponse>
|
||||
async putPipeline (this: That, params: T.IngestPutPipelineRequest | TB.IngestPutPipelineRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['_meta', 'description', 'on_failure', 'processors', 'version']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,22 +174,22 @@ export default class Ingest {
|
||||
async simulate (this: That, params?: T.IngestSimulateRequest | TB.IngestSimulateRequest, options?: TransportRequestOptions): Promise<T.IngestSimulateResponse>
|
||||
async simulate (this: That, params?: T.IngestSimulateRequest | TB.IngestSimulateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['verbose', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['docs', 'pipeline']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,22 +48,16 @@ export default class License {
|
||||
async delete (this: That, params?: T.LicenseDeleteRequest | TB.LicenseDeleteRequest, options?: TransportRequestOptions): Promise<T.LicenseDeleteResponse>
|
||||
async delete (this: That, params?: T.LicenseDeleteRequest | TB.LicenseDeleteRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,22 +71,16 @@ export default class License {
|
||||
async get (this: That, params?: T.LicenseGetRequest | TB.LicenseGetRequest, options?: TransportRequestOptions): Promise<T.LicenseGetResponse>
|
||||
async get (this: That, params?: T.LicenseGetRequest | TB.LicenseGetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['accept_enterprise', 'local', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,22 +94,16 @@ export default class License {
|
||||
async getBasicStatus (this: That, params?: T.LicenseGetBasicStatusRequest | TB.LicenseGetBasicStatusRequest, options?: TransportRequestOptions): Promise<T.LicenseGetBasicStatusResponse>
|
||||
async getBasicStatus (this: That, params?: T.LicenseGetBasicStatusRequest | TB.LicenseGetBasicStatusRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,22 +117,16 @@ export default class License {
|
||||
async getTrialStatus (this: That, params?: T.LicenseGetTrialStatusRequest | TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptions): Promise<T.LicenseGetTrialStatusResponse>
|
||||
async getTrialStatus (this: That, params?: T.LicenseGetTrialStatusRequest | TB.LicenseGetTrialStatusRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -164,22 +140,22 @@ export default class License {
|
||||
async post (this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise<T.LicensePostResponse>
|
||||
async post (this: That, params?: T.LicensePostRequest | TB.LicensePostRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['acknowledge', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['license', 'licenses']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -193,22 +169,16 @@ export default class License {
|
||||
async postStartBasic (this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptions): Promise<T.LicensePostStartBasicResponse>
|
||||
async postStartBasic (this: That, params?: T.LicensePostStartBasicRequest | TB.LicensePostStartBasicRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['acknowledge', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -222,22 +192,16 @@ export default class License {
|
||||
async postStartTrial (this: That, params?: T.LicensePostStartTrialRequest | TB.LicensePostStartTrialRequest, options?: TransportRequestOptions): Promise<T.LicensePostStartTrialResponse>
|
||||
async postStartTrial (this: That, params?: T.LicensePostStartTrialRequest | TB.LicensePostStartTrialRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['acknowledge', 'type_query_string', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Logstash {
|
||||
async deletePipeline (this: That, params: T.LogstashDeletePipelineRequest | TB.LogstashDeletePipelineRequest, options?: TransportRequestOptions): Promise<T.LogstashDeletePipelineResponse>
|
||||
async deletePipeline (this: That, params: T.LogstashDeletePipelineRequest | TB.LogstashDeletePipelineRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,21 +70,15 @@ export default class Logstash {
|
||||
async getPipeline (this: That, params: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptions): Promise<T.LogstashGetPipelineResponse>
|
||||
async getPipeline (this: That, params: T.LogstashGetPipelineRequest | TB.LogstashGetPipelineRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,20 +92,20 @@ export default class Logstash {
|
||||
async putPipeline (this: That, params: T.LogstashPutPipelineRequest | TB.LogstashPutPipelineRequest, options?: TransportRequestOptions): Promise<T.LogstashPutPipelineResponse>
|
||||
async putPipeline (this: That, params: T.LogstashPutPipelineRequest | TB.LogstashPutPipelineRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['pipeline']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function MgetApi<TDocument = unknown> (this: That, params?:
|
||||
export default async function MgetApi<TDocument = unknown> (this: That, params?: T.MgetRequest | TB.MgetRequest, options?: TransportRequestOptions): Promise<T.MgetResponse<TDocument>>
|
||||
export default async function MgetApi<TDocument = unknown> (this: That, params?: T.MgetRequest | TB.MgetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['preference', 'realtime', 'refresh', 'routing', '_source', '_source_excludes', '_source_includes', 'stored_fields', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['docs', 'ids']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,22 +48,16 @@ export default class Migration {
|
||||
async deprecations (this: That, params?: T.MigrationDeprecationsRequest | TB.MigrationDeprecationsRequest, options?: TransportRequestOptions): Promise<T.MigrationDeprecationsResponse>
|
||||
async deprecations (this: That, params?: T.MigrationDeprecationsRequest | TB.MigrationDeprecationsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,4 +72,48 @@ export default class Migration {
|
||||
}
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async getFeatureUpgradeStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'GET'
|
||||
const path = '/_migration/system_features'
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async postFeatureUpgrade (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async postFeatureUpgrade (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async postFeatureUpgrade (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async postFeatureUpgrade (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = '/_migration/system_features'
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -48,20 +48,20 @@ export default class Monitoring {
|
||||
async bulk<TSource = unknown> (this: That, params: T.MonitoringBulkRequest<TSource> | TB.MonitoringBulkRequest<TSource>, options?: TransportRequestOptions): Promise<T.MonitoringBulkResponse>
|
||||
async bulk<TSource = unknown> (this: That, params: T.MonitoringBulkRequest<TSource> | TB.MonitoringBulkRequest<TSource>, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['type']
|
||||
const acceptedQuery: string[] = ['system_id', 'system_api_version', 'interval', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['operations']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,20 +42,20 @@ export default async function MsearchApi<TDocument = unknown> (this: That, param
|
||||
export default async function MsearchApi<TDocument = unknown> (this: That, params: T.MsearchRequest | TB.MsearchRequest, options?: TransportRequestOptions): Promise<T.MsearchResponse<TDocument>>
|
||||
export default async function MsearchApi<TDocument = unknown> (this: That, params: T.MsearchRequest | TB.MsearchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'ccs_minimize_roundtrips', 'expand_wildcards', 'ignore_throttled', 'ignore_unavailable', 'max_concurrent_searches', 'max_concurrent_shard_requests', 'pre_filter_shard_size', 'search_type', 'rest_total_hits_as_int', 'typed_keys', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['searches']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,20 +42,20 @@ export default async function MsearchTemplateApi<TDocument = unknown> (this: Tha
|
||||
export default async function MsearchTemplateApi<TDocument = unknown> (this: That, params: T.MsearchTemplateRequest | TB.MsearchTemplateRequest, options?: TransportRequestOptions): Promise<T.MsearchTemplateResponse<TDocument>>
|
||||
export default async function MsearchTemplateApi<TDocument = unknown> (this: That, params: T.MsearchTemplateRequest | TB.MsearchTemplateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['ccs_minimize_roundtrips', 'max_concurrent_searches', 'search_type', 'rest_total_hits_as_int', 'typed_keys', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['search_templates']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function MtermvectorsApi (this: That, params?: T.Mtermvecto
|
||||
export default async function MtermvectorsApi (this: That, params?: T.MtermvectorsRequest | TB.MtermvectorsRequest, options?: TransportRequestOptions): Promise<T.MtermvectorsResponse>
|
||||
export default async function MtermvectorsApi (this: That, params?: T.MtermvectorsRequest | TB.MtermvectorsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['fields', 'field_statistics', 'offsets', 'payloads', 'positions', 'preference', 'realtime', 'routing', 'term_statistics', 'version', 'version_type', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['docs']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,19 +48,15 @@ export default class Nodes {
|
||||
async clearRepositoriesMeteringArchive (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async clearRepositoriesMeteringArchive (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id', 'max_archive_version']
|
||||
const acceptedQuery: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,19 +70,15 @@ export default class Nodes {
|
||||
async getRepositoriesMeteringInfo (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async getRepositoriesMeteringInfo (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedQuery: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,22 +92,16 @@ export default class Nodes {
|
||||
async hotThreads (this: That, params?: T.NodesHotThreadsRequest | TB.NodesHotThreadsRequest, options?: TransportRequestOptions): Promise<T.NodesHotThreadsResponse>
|
||||
async hotThreads (this: That, params?: T.NodesHotThreadsRequest | TB.NodesHotThreadsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedQuery: string[] = ['ignore_idle_threads', 'interval', 'snapshots', 'threads', 'thread_type', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,22 +122,16 @@ export default class Nodes {
|
||||
async info (this: That, params?: T.NodesInfoRequest | TB.NodesInfoRequest, options?: TransportRequestOptions): Promise<T.NodesInfoResponse>
|
||||
async info (this: That, params?: T.NodesInfoRequest | TB.NodesInfoRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id', 'metric']
|
||||
const acceptedQuery: string[] = ['flat_settings', 'master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,22 +158,22 @@ export default class Nodes {
|
||||
async reloadSecureSettings (this: That, params?: T.NodesReloadSecureSettingsRequest | TB.NodesReloadSecureSettingsRequest, options?: TransportRequestOptions): Promise<T.NodesReloadSecureSettingsResponse>
|
||||
async reloadSecureSettings (this: That, params?: T.NodesReloadSecureSettingsRequest | TB.NodesReloadSecureSettingsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedQuery: string[] = ['timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['secure_settings_password']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,22 +194,16 @@ export default class Nodes {
|
||||
async stats (this: That, params?: T.NodesStatsRequest | TB.NodesStatsRequest, options?: TransportRequestOptions): Promise<T.NodesStatsResponse>
|
||||
async stats (this: That, params?: T.NodesStatsRequest | TB.NodesStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id', 'metric', 'index_metric']
|
||||
const acceptedQuery: string[] = ['completion_fields', 'fielddata_fields', 'fields', 'groups', 'include_segment_file_sizes', 'level', 'master_timeout', 'timeout', 'types', 'include_unloaded_segments', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,22 +236,16 @@ export default class Nodes {
|
||||
async usage (this: That, params?: T.NodesUsageRequest | TB.NodesUsageRequest, options?: TransportRequestOptions): Promise<T.NodesUsageResponse>
|
||||
async usage (this: That, params?: T.NodesUsageRequest | TB.NodesUsageRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id', 'metric']
|
||||
const acceptedQuery: string[] = ['timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function OpenPointInTimeApi (this: That, params: T.OpenPoin
|
||||
export default async function OpenPointInTimeApi (this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptions): Promise<T.OpenPointInTimeResponse>
|
||||
export default async function OpenPointInTimeApi (this: That, params: T.OpenPointInTimeRequest | TB.OpenPointInTimeRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['keep_alive', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,16 @@ export default async function PingApi (this: That, params?: T.PingRequest | TB.P
|
||||
export default async function PingApi (this: That, params?: T.PingRequest | TB.PingRequest, options?: TransportRequestOptions): Promise<T.PingResponse>
|
||||
export default async function PingApi (this: That, params?: T.PingRequest | TB.PingRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function PutScriptApi (this: That, params: T.PutScriptReque
|
||||
export default async function PutScriptApi (this: That, params: T.PutScriptRequest | TB.PutScriptRequest, options?: TransportRequestOptions): Promise<T.PutScriptResponse>
|
||||
export default async function PutScriptApi (this: That, params: T.PutScriptRequest | TB.PutScriptRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'context']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['script']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function RankEvalApi (this: That, params: T.RankEvalRequest
|
||||
export default async function RankEvalApi (this: That, params: T.RankEvalRequest | TB.RankEvalRequest, options?: TransportRequestOptions): Promise<T.RankEvalResponse>
|
||||
export default async function RankEvalApi (this: That, params: T.RankEvalRequest | TB.RankEvalRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'expand_wildcards', 'ignore_unavailable', 'search_type', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['requests', 'metric']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function ReindexApi (this: That, params?: T.ReindexRequest
|
||||
export default async function ReindexApi (this: That, params?: T.ReindexRequest | TB.ReindexRequest, options?: TransportRequestOptions): Promise<T.ReindexResponse>
|
||||
export default async function ReindexApi (this: That, params?: T.ReindexRequest | TB.ReindexRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['refresh', 'requests_per_second', 'scroll', 'slices', 'timeout', 'wait_for_active_shards', 'wait_for_completion', 'require_alias', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['conflicts', 'dest', 'max_docs', 'script', 'size', 'source']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function ReindexRethrottleApi (this: That, params: T.Reinde
|
||||
export default async function ReindexRethrottleApi (this: That, params: T.ReindexRethrottleRequest | TB.ReindexRethrottleRequest, options?: TransportRequestOptions): Promise<T.ReindexRethrottleResponse>
|
||||
export default async function ReindexRethrottleApi (this: That, params: T.ReindexRethrottleRequest | TB.ReindexRethrottleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['task_id']
|
||||
const acceptedQuery: string[] = ['requests_per_second', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function RenderSearchTemplateApi (this: That, params?: T.Re
|
||||
export default async function RenderSearchTemplateApi (this: That, params?: T.RenderSearchTemplateRequest | TB.RenderSearchTemplateRequest, options?: TransportRequestOptions): Promise<T.RenderSearchTemplateResponse>
|
||||
export default async function RenderSearchTemplateApi (this: That, params?: T.RenderSearchTemplateRequest | TB.RenderSearchTemplateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['file', 'params', 'source']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Rollup {
|
||||
async deleteJob (this: That, params: T.RollupDeleteJobRequest | TB.RollupDeleteJobRequest, options?: TransportRequestOptions): Promise<T.RollupDeleteJobResponse>
|
||||
async deleteJob (this: That, params: T.RollupDeleteJobRequest | TB.RollupDeleteJobRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,22 +70,16 @@ export default class Rollup {
|
||||
async getJobs (this: That, params?: T.RollupGetJobsRequest | TB.RollupGetJobsRequest, options?: TransportRequestOptions): Promise<T.RollupGetJobsResponse>
|
||||
async getJobs (this: That, params?: T.RollupGetJobsRequest | TB.RollupGetJobsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,22 +100,16 @@ export default class Rollup {
|
||||
async getRollupCaps (this: That, params?: T.RollupGetRollupCapsRequest | TB.RollupGetRollupCapsRequest, options?: TransportRequestOptions): Promise<T.RollupGetRollupCapsResponse>
|
||||
async getRollupCaps (this: That, params?: T.RollupGetRollupCapsRequest | TB.RollupGetRollupCapsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,21 +130,15 @@ export default class Rollup {
|
||||
async getRollupIndexCaps (this: That, params: T.RollupGetRollupIndexCapsRequest | TB.RollupGetRollupIndexCapsRequest, options?: TransportRequestOptions): Promise<T.RollupGetRollupIndexCapsResponse>
|
||||
async getRollupIndexCaps (this: That, params: T.RollupGetRollupIndexCapsRequest | TB.RollupGetRollupIndexCapsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,21 +152,21 @@ export default class Rollup {
|
||||
async putJob (this: That, params: T.RollupPutJobRequest | TB.RollupPutJobRequest, options?: TransportRequestOptions): Promise<T.RollupPutJobResponse>
|
||||
async putJob (this: That, params: T.RollupPutJobRequest | TB.RollupPutJobRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['cron', 'groups', 'index_pattern', 'metrics', 'page_size', 'rollup_index']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,20 +180,20 @@ export default class Rollup {
|
||||
async rollup (this: That, params: T.RollupRollupRequest | TB.RollupRollupRequest, options?: TransportRequestOptions): Promise<T.RollupRollupResponse>
|
||||
async rollup (this: That, params: T.RollupRollupRequest | TB.RollupRollupRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index', 'rollup_index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['config']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -231,21 +207,21 @@ export default class Rollup {
|
||||
async rollupSearch<TDocument = unknown> (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptions): Promise<T.RollupRollupSearchResponse<TDocument>>
|
||||
async rollupSearch<TDocument = unknown> (this: That, params: T.RollupRollupSearchRequest | TB.RollupRollupSearchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index', 'type']
|
||||
const acceptedQuery: string[] = ['rest_total_hits_as_int', 'typed_keys', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['aggs', 'query', 'size']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -259,21 +235,15 @@ export default class Rollup {
|
||||
async startJob (this: That, params: T.RollupStartJobRequest | TB.RollupStartJobRequest, options?: TransportRequestOptions): Promise<T.RollupStartJobResponse>
|
||||
async startJob (this: That, params: T.RollupStartJobRequest | TB.RollupStartJobRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,21 +257,15 @@ export default class Rollup {
|
||||
async stopJob (this: That, params: T.RollupStopJobRequest | TB.RollupStopJobRequest, options?: TransportRequestOptions): Promise<T.RollupStopJobResponse>
|
||||
async stopJob (this: That, params: T.RollupStopJobRequest | TB.RollupStopJobRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['timeout', 'wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function ScriptsPainlessExecuteApi<TResult = unknown> (this
|
||||
export default async function ScriptsPainlessExecuteApi<TResult = unknown> (this: That, params?: T.ScriptsPainlessExecuteRequest | TB.ScriptsPainlessExecuteRequest, options?: TransportRequestOptions): Promise<T.ScriptsPainlessExecuteResponse<TResult>>
|
||||
export default async function ScriptsPainlessExecuteApi<TResult = unknown> (this: That, params?: T.ScriptsPainlessExecuteRequest | TB.ScriptsPainlessExecuteRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['context', 'context_setup', 'script']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function ScrollApi<TDocument = unknown> (this: That, params
|
||||
export default async function ScrollApi<TDocument = unknown> (this: That, params: T.ScrollRequest | TB.ScrollRequest, options?: TransportRequestOptions): Promise<T.ScrollResponse<TDocument>>
|
||||
export default async function ScrollApi<TDocument = unknown> (this: That, params: T.ScrollRequest | TB.ScrollRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['rest_total_hits_as_int', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function SearchApi<TDocument = unknown> (this: That, params
|
||||
export default async function SearchApi<TDocument = unknown> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise<T.SearchResponse<TDocument>>
|
||||
export default async function SearchApi<TDocument = unknown> (this: That, params?: T.SearchRequest | TB.SearchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'allow_partial_search_results', 'analyzer', 'analyze_wildcard', 'batched_reduce_size', 'ccs_minimize_roundtrips', 'default_operator', 'df', 'expand_wildcards', 'ignore_throttled', 'ignore_unavailable', 'lenient', 'max_concurrent_shard_requests', 'min_compatible_shard_node', 'preference', 'pre_filter_shard_size', 'request_cache', 'routing', 'scroll', 'search_type', 'suggest_field', 'suggest_mode', 'suggest_size', 'suggest_text', 'typed_keys', 'rest_total_hits_as_int', '_source_excludes', '_source_includes', 'q', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['aggs', 'aggregations', 'collapse', 'highlight', 'indices_boost', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'slice', 'fields', 'suggest', 'pit', 'runtime_mappings']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function SearchMvtApi (this: That, params: T.SearchMvtReque
|
||||
export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptions): Promise<T.SearchMvtResponse>
|
||||
export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index', 'field', 'zoom', 'x', 'y']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['aggs', 'fields', 'query', 'runtime_mappings', 'sort']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,16 @@ export default async function SearchShardsApi (this: That, params?: T.SearchShar
|
||||
export default async function SearchShardsApi (this: That, params?: T.SearchShardsRequest | TB.SearchShardsRequest, options?: TransportRequestOptions): Promise<T.SearchShardsResponse>
|
||||
export default async function SearchShardsApi (this: That, params?: T.SearchShardsRequest | TB.SearchShardsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'expand_wildcards', 'ignore_unavailable', 'local', 'preference', 'routing', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,22 +42,22 @@ export default async function SearchTemplateApi<TDocument = unknown> (this: That
|
||||
export default async function SearchTemplateApi<TDocument = unknown> (this: That, params?: T.SearchTemplateRequest | TB.SearchTemplateRequest, options?: TransportRequestOptions): Promise<T.SearchTemplateResponse<TDocument>>
|
||||
export default async function SearchTemplateApi<TDocument = unknown> (this: That, params?: T.SearchTemplateRequest | TB.SearchTemplateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'ccs_minimize_roundtrips', 'expand_wildcards', 'ignore_throttled', 'ignore_unavailable', 'preference', 'routing', 'scroll', 'search_type', 'rest_total_hits_as_int', 'typed_keys', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['id', 'params', 'source']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,19 +48,15 @@ export default class SearchableSnapshots {
|
||||
async cacheStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async cacheStats (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedQuery: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,22 +77,16 @@ export default class SearchableSnapshots {
|
||||
async clearCache (this: That, params?: T.SearchableSnapshotsClearCacheRequest | TB.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptions): Promise<T.SearchableSnapshotsClearCacheResponse>
|
||||
async clearCache (this: That, params?: T.SearchableSnapshotsClearCacheRequest | TB.SearchableSnapshotsClearCacheRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['expand_wildcards', 'allow_no_indices', 'ignore_unavailable', 'pretty', 'human', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,21 +107,21 @@ export default class SearchableSnapshots {
|
||||
async mount (this: That, params: T.SearchableSnapshotsMountRequest | TB.SearchableSnapshotsMountRequest, options?: TransportRequestOptions): Promise<T.SearchableSnapshotsMountResponse>
|
||||
async mount (this: That, params: T.SearchableSnapshotsMountRequest | TB.SearchableSnapshotsMountRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository', 'snapshot']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'wait_for_completion', 'storage', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['index', 'renamed_index', 'index_settings', 'ignore_index_settings']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,22 +135,16 @@ export default class SearchableSnapshots {
|
||||
async stats (this: That, params?: T.SearchableSnapshotsStatsRequest | TB.SearchableSnapshotsStatsRequest, options?: TransportRequestOptions): Promise<T.SearchableSnapshotsStatsResponse>
|
||||
async stats (this: That, params?: T.SearchableSnapshotsStatsRequest | TB.SearchableSnapshotsStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['level', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -48,21 +48,15 @@ export default class Shutdown {
|
||||
async deleteNode (this: That, params: T.ShutdownDeleteNodeRequest | TB.ShutdownDeleteNodeRequest, options?: TransportRequestOptions): Promise<T.ShutdownDeleteNodeResponse>
|
||||
async deleteNode (this: That, params: T.ShutdownDeleteNodeRequest | TB.ShutdownDeleteNodeRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,22 +70,16 @@ export default class Shutdown {
|
||||
async getNode (this: That, params?: T.ShutdownGetNodeRequest | TB.ShutdownGetNodeRequest, options?: TransportRequestOptions): Promise<T.ShutdownGetNodeResponse>
|
||||
async getNode (this: That, params?: T.ShutdownGetNodeRequest | TB.ShutdownGetNodeRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,21 +100,15 @@ export default class Shutdown {
|
||||
async putNode (this: That, params: T.ShutdownPutNodeRequest | TB.ShutdownPutNodeRequest, options?: TransportRequestOptions): Promise<T.ShutdownPutNodeResponse>
|
||||
async putNode (this: That, params: T.ShutdownPutNodeRequest | TB.ShutdownPutNodeRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['node_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Slm {
|
||||
async deleteLifecycle (this: That, params: T.SlmDeleteLifecycleRequest | TB.SlmDeleteLifecycleRequest, options?: TransportRequestOptions): Promise<T.SlmDeleteLifecycleResponse>
|
||||
async deleteLifecycle (this: That, params: T.SlmDeleteLifecycleRequest | TB.SlmDeleteLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['policy_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,21 +70,15 @@ export default class Slm {
|
||||
async executeLifecycle (this: That, params: T.SlmExecuteLifecycleRequest | TB.SlmExecuteLifecycleRequest, options?: TransportRequestOptions): Promise<T.SlmExecuteLifecycleResponse>
|
||||
async executeLifecycle (this: That, params: T.SlmExecuteLifecycleRequest | TB.SlmExecuteLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['policy_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,22 +92,16 @@ export default class Slm {
|
||||
async executeRetention (this: That, params?: T.SlmExecuteRetentionRequest | TB.SlmExecuteRetentionRequest, options?: TransportRequestOptions): Promise<T.SlmExecuteRetentionResponse>
|
||||
async executeRetention (this: That, params?: T.SlmExecuteRetentionRequest | TB.SlmExecuteRetentionRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,22 +115,16 @@ export default class Slm {
|
||||
async getLifecycle (this: That, params?: T.SlmGetLifecycleRequest | TB.SlmGetLifecycleRequest, options?: TransportRequestOptions): Promise<T.SlmGetLifecycleResponse>
|
||||
async getLifecycle (this: That, params?: T.SlmGetLifecycleRequest | TB.SlmGetLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['policy_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -169,22 +145,16 @@ export default class Slm {
|
||||
async getStats (this: That, params?: T.SlmGetStatsRequest | TB.SlmGetStatsRequest, options?: TransportRequestOptions): Promise<T.SlmGetStatsResponse>
|
||||
async getStats (this: That, params?: T.SlmGetStatsRequest | TB.SlmGetStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,22 +168,16 @@ export default class Slm {
|
||||
async getStatus (this: That, params?: T.SlmGetStatusRequest | TB.SlmGetStatusRequest, options?: TransportRequestOptions): Promise<T.SlmGetStatusResponse>
|
||||
async getStatus (this: That, params?: T.SlmGetStatusRequest | TB.SlmGetStatusRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,21 +191,21 @@ export default class Slm {
|
||||
async putLifecycle (this: That, params: T.SlmPutLifecycleRequest | TB.SlmPutLifecycleRequest, options?: TransportRequestOptions): Promise<T.SlmPutLifecycleResponse>
|
||||
async putLifecycle (this: That, params: T.SlmPutLifecycleRequest | TB.SlmPutLifecycleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['policy_id']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['config', 'name', 'repository', 'retention', 'schedule']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,22 +219,16 @@ export default class Slm {
|
||||
async start (this: That, params?: T.SlmStartRequest | TB.SlmStartRequest, options?: TransportRequestOptions): Promise<T.SlmStartResponse>
|
||||
async start (this: That, params?: T.SlmStartRequest | TB.SlmStartRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -284,22 +242,16 @@ export default class Slm {
|
||||
async stop (this: That, params?: T.SlmStopRequest | TB.SlmStopRequest, options?: TransportRequestOptions): Promise<T.SlmStopResponse>
|
||||
async stop (this: That, params?: T.SlmStopRequest | TB.SlmStopRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Snapshot {
|
||||
async cleanupRepository (this: That, params: T.SnapshotCleanupRepositoryRequest | TB.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotCleanupRepositoryResponse>
|
||||
async cleanupRepository (this: That, params: T.SnapshotCleanupRepositoryRequest | TB.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,21 +70,21 @@ export default class Snapshot {
|
||||
async clone (this: That, params: T.SnapshotCloneRequest | TB.SnapshotCloneRequest, options?: TransportRequestOptions): Promise<T.SnapshotCloneResponse>
|
||||
async clone (this: That, params: T.SnapshotCloneRequest | TB.SnapshotCloneRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository', 'snapshot', 'target_snapshot']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['indices']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,21 +98,21 @@ export default class Snapshot {
|
||||
async create (this: That, params: T.SnapshotCreateRequest | TB.SnapshotCreateRequest, options?: TransportRequestOptions): Promise<T.SnapshotCreateResponse>
|
||||
async create (this: That, params: T.SnapshotCreateRequest | TB.SnapshotCreateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository', 'snapshot']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['ignore_unavailable', 'include_global_state', 'indices', 'feature_states', 'metadata', 'partial']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,21 +126,21 @@ export default class Snapshot {
|
||||
async createRepository (this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotCreateRepositoryResponse>
|
||||
async createRepository (this: That, params: T.SnapshotCreateRepositoryRequest | TB.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'verify', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['repository', 'type', 'settings']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -160,21 +154,15 @@ export default class Snapshot {
|
||||
async delete (this: That, params: T.SnapshotDeleteRequest | TB.SnapshotDeleteRequest, options?: TransportRequestOptions): Promise<T.SnapshotDeleteResponse>
|
||||
async delete (this: That, params: T.SnapshotDeleteRequest | TB.SnapshotDeleteRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository', 'snapshot']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,21 +176,15 @@ export default class Snapshot {
|
||||
async deleteRepository (this: That, params: T.SnapshotDeleteRepositoryRequest | TB.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotDeleteRepositoryResponse>
|
||||
async deleteRepository (this: That, params: T.SnapshotDeleteRepositoryRequest | TB.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -216,21 +198,15 @@ export default class Snapshot {
|
||||
async get (this: That, params: T.SnapshotGetRequest | TB.SnapshotGetRequest, options?: TransportRequestOptions): Promise<T.SnapshotGetResponse>
|
||||
async get (this: That, params: T.SnapshotGetRequest | TB.SnapshotGetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository', 'snapshot']
|
||||
const acceptedQuery: string[] = ['ignore_unavailable', 'master_timeout', 'verbose', 'index_details', 'human', 'include_repository', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,22 +220,16 @@ export default class Snapshot {
|
||||
async getRepository (this: That, params?: T.SnapshotGetRepositoryRequest | TB.SnapshotGetRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotGetRepositoryResponse>
|
||||
async getRepository (this: That, params?: T.SnapshotGetRepositoryRequest | TB.SnapshotGetRepositoryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository']
|
||||
const acceptedQuery: string[] = ['local', 'master_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -280,19 +250,15 @@ export default class Snapshot {
|
||||
async repositoryAnalyze (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async repositoryAnalyze (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository']
|
||||
const acceptedQuery: string[] = ['blob_count', 'concurrency', 'read_node_count', 'early_read_node_count', 'seed', 'rare_action_probability', 'max_blob_size', 'max_total_data_size', 'timeout', 'detailed', 'rarely_abort_writes']
|
||||
const querystring: Record<string, any> = {}
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,21 +272,21 @@ export default class Snapshot {
|
||||
async restore (this: That, params: T.SnapshotRestoreRequest | TB.SnapshotRestoreRequest, options?: TransportRequestOptions): Promise<T.SnapshotRestoreResponse>
|
||||
async restore (this: That, params: T.SnapshotRestoreRequest | TB.SnapshotRestoreRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository', 'snapshot']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['ignore_index_settings', 'ignore_unavailable', 'include_aliases', 'include_global_state', 'index_settings', 'indices', 'partial', 'rename_pattern', 'rename_replacement']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -334,22 +300,16 @@ export default class Snapshot {
|
||||
async status (this: That, params?: T.SnapshotStatusRequest | TB.SnapshotStatusRequest, options?: TransportRequestOptions): Promise<T.SnapshotStatusResponse>
|
||||
async status (this: That, params?: T.SnapshotStatusRequest | TB.SnapshotStatusRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository', 'snapshot']
|
||||
const acceptedQuery: string[] = ['ignore_unavailable', 'master_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -373,21 +333,15 @@ export default class Snapshot {
|
||||
async verifyRepository (this: That, params: T.SnapshotVerifyRepositoryRequest | TB.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptions): Promise<T.SnapshotVerifyRepositoryResponse>
|
||||
async verifyRepository (this: That, params: T.SnapshotVerifyRepositoryRequest | TB.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['repository']
|
||||
const acceptedQuery: string[] = ['master_timeout', 'timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,21 @@ export default class Sql {
|
||||
async clearCursor (this: That, params: T.SqlClearCursorRequest | TB.SqlClearCursorRequest, options?: TransportRequestOptions): Promise<T.SqlClearCursorResponse>
|
||||
async clearCursor (this: That, params: T.SqlClearCursorRequest | TB.SqlClearCursorRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['cursor']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,19 +76,15 @@ export default class Sql {
|
||||
async deleteAsync (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async deleteAsync (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,19 +98,15 @@ export default class Sql {
|
||||
async getAsync (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async getAsync (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['delimiter', 'format', 'keep_alive', 'wait_for_completion_timeout']
|
||||
const querystring: Record<string, any> = {}
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,19 +120,15 @@ export default class Sql {
|
||||
async getAsyncStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async getAsyncStatus (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -154,22 +142,22 @@ export default class Sql {
|
||||
async query (this: That, params?: T.SqlQueryRequest | TB.SqlQueryRequest, options?: TransportRequestOptions): Promise<T.SqlQueryResponse>
|
||||
async query (this: That, params?: T.SqlQueryRequest | TB.SqlQueryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['format', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['columnar', 'cursor', 'fetch_size', 'filter', 'query', 'request_timeout', 'page_timeout', 'time_zone', 'field_multi_value_leniency']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,21 +171,21 @@ export default class Sql {
|
||||
async translate (this: That, params: T.SqlTranslateRequest | TB.SqlTranslateRequest, options?: TransportRequestOptions): Promise<T.SqlTranslateResponse>
|
||||
async translate (this: That, params: T.SqlTranslateRequest | TB.SqlTranslateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['fetch_size', 'filter', 'query', 'time_zone']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,22 +48,16 @@ export default class Ssl {
|
||||
async certificates (this: That, params?: T.SslCertificatesRequest | TB.SslCertificatesRequest, options?: TransportRequestOptions): Promise<T.SslCertificatesResponse>
|
||||
async certificates (this: That, params?: T.SslCertificatesRequest | TB.SslCertificatesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,22 +48,16 @@ export default class Tasks {
|
||||
async cancel (this: That, params?: T.TasksCancelRequest | TB.TasksCancelRequest, options?: TransportRequestOptions): Promise<T.TasksCancelResponse>
|
||||
async cancel (this: That, params?: T.TasksCancelRequest | TB.TasksCancelRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['task_id']
|
||||
const acceptedQuery: string[] = ['actions', 'nodes', 'parent_task_id', 'wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,21 +78,15 @@ export default class Tasks {
|
||||
async get (this: That, params: T.TasksGetRequest | TB.TasksGetRequest, options?: TransportRequestOptions): Promise<T.TasksGetResponse>
|
||||
async get (this: That, params: T.TasksGetRequest | TB.TasksGetRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['task_id']
|
||||
const acceptedQuery: string[] = ['timeout', 'wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,22 +100,16 @@ export default class Tasks {
|
||||
async list (this: That, params?: T.TasksListRequest | TB.TasksListRequest, options?: TransportRequestOptions): Promise<T.TasksListResponse>
|
||||
async list (this: That, params?: T.TasksListRequest | TB.TasksListRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['actions', 'detailed', 'group_by', 'nodes', 'parent_task_id', 'timeout', 'wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function TermsEnumApi (this: That, params: T.TermsEnumReque
|
||||
export default async function TermsEnumApi (this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptions): Promise<T.TermsEnumResponse>
|
||||
export default async function TermsEnumApi (this: That, params: T.TermsEnumRequest | TB.TermsEnumRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['field', 'size', 'timeout', 'case_insensitive', 'index_filter', 'string', 'search_after']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function TermvectorsApi<TDocument = unknown> (this: That, p
|
||||
export default async function TermvectorsApi<TDocument = unknown> (this: That, params: T.TermvectorsRequest<TDocument> | TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptions): Promise<T.TermvectorsResponse>
|
||||
export default async function TermvectorsApi<TDocument = unknown> (this: That, params: T.TermvectorsRequest<TDocument> | TB.TermvectorsRequest<TDocument>, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index', 'id']
|
||||
const acceptedQuery: string[] = ['fields', 'field_statistics', 'offsets', 'payloads', 'positions', 'preference', 'realtime', 'routing', 'term_statistics', 'version', 'version_type', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['doc', 'filter', 'per_field_analyzer']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,20 +48,20 @@ export default class TextStructure {
|
||||
async findStructure<TJsonDocument = unknown> (this: That, params: T.TextStructureFindStructureRequest<TJsonDocument> | TB.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptions): Promise<T.TextStructureFindStructureResponse>
|
||||
async findStructure<TJsonDocument = unknown> (this: That, params: T.TextStructureFindStructureRequest<TJsonDocument> | TB.TextStructureFindStructureRequest<TJsonDocument>, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['charset', 'column_names', 'delimiter', 'explain', 'format', 'grok_pattern', 'has_header_row', 'line_merge_size_limit', 'lines_to_sample', 'quote', 'should_trim_fields', 'timeout', 'timestamp_field', 'timestamp_format']
|
||||
const acceptedBody: string[] = ['text_files']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: any = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
if (acceptedBody.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
body = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
body = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Transform {
|
||||
async deleteTransform (this: That, params: T.TransformDeleteTransformRequest | TB.TransformDeleteTransformRequest, options?: TransportRequestOptions): Promise<T.TransformDeleteTransformResponse>
|
||||
async deleteTransform (this: That, params: T.TransformDeleteTransformRequest | TB.TransformDeleteTransformRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id']
|
||||
const acceptedQuery: string[] = ['force', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,22 +70,16 @@ export default class Transform {
|
||||
async getTransform (this: That, params?: T.TransformGetTransformRequest | TB.TransformGetTransformRequest, options?: TransportRequestOptions): Promise<T.TransformGetTransformResponse>
|
||||
async getTransform (this: That, params?: T.TransformGetTransformRequest | TB.TransformGetTransformRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id']
|
||||
const acceptedQuery: string[] = ['allow_no_match', 'from', 'size', 'exclude_generated', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -112,21 +100,15 @@ export default class Transform {
|
||||
async getTransformStats (this: That, params: T.TransformGetTransformStatsRequest | TB.TransformGetTransformStatsRequest, options?: TransportRequestOptions): Promise<T.TransformGetTransformStatsResponse>
|
||||
async getTransformStats (this: That, params: T.TransformGetTransformStatsRequest | TB.TransformGetTransformStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id']
|
||||
const acceptedQuery: string[] = ['allow_no_match', 'from', 'size', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,22 +122,22 @@ export default class Transform {
|
||||
async previewTransform<TTransform = unknown> (this: That, params?: T.TransformPreviewTransformRequest | TB.TransformPreviewTransformRequest, options?: TransportRequestOptions): Promise<T.TransformPreviewTransformResponse<TTransform>>
|
||||
async previewTransform<TTransform = unknown> (this: That, params?: T.TransformPreviewTransformRequest | TB.TransformPreviewTransformRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['dest', 'description', 'frequency', 'pivot', 'source', 'settings', 'sync', 'retention_policy', 'latest']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,21 +158,15 @@ export default class Transform {
|
||||
async putTransform (this: That, params: T.TransformPutTransformRequest | TB.TransformPutTransformRequest, options?: TransportRequestOptions): Promise<T.TransformPutTransformResponse>
|
||||
async putTransform (this: That, params: T.TransformPutTransformRequest | TB.TransformPutTransformRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id', 'transform_id']
|
||||
const acceptedQuery: string[] = ['defer_validation', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,21 +180,15 @@ export default class Transform {
|
||||
async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptions): Promise<T.TransformStartTransformResponse>
|
||||
async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id']
|
||||
const acceptedQuery: string[] = ['timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -232,21 +202,15 @@ export default class Transform {
|
||||
async stopTransform (this: That, params: T.TransformStopTransformRequest | TB.TransformStopTransformRequest, options?: TransportRequestOptions): Promise<T.TransformStopTransformResponse>
|
||||
async stopTransform (this: That, params: T.TransformStopTransformRequest | TB.TransformStopTransformRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id']
|
||||
const acceptedQuery: string[] = ['allow_no_match', 'force', 'timeout', 'wait_for_checkpoint', 'wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -260,21 +224,15 @@ export default class Transform {
|
||||
async updateTransform (this: That, params: T.TransformUpdateTransformRequest | TB.TransformUpdateTransformRequest, options?: TransportRequestOptions): Promise<T.TransformUpdateTransformResponse>
|
||||
async updateTransform (this: That, params: T.TransformUpdateTransformRequest | TB.TransformUpdateTransformRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['transform_id', 'transform_id']
|
||||
const acceptedQuery: string[] = ['defer_validation', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -282,4 +240,26 @@ export default class Transform {
|
||||
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}/_update`
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
|
||||
async upgradeTransforms (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
|
||||
async upgradeTransforms (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
|
||||
async upgradeTransforms (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
|
||||
async upgradeTransforms (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const querystring: Record<string, any> = {}
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
const method = 'POST'
|
||||
const path = '/_transform/_upgrade'
|
||||
return await this.transport.request({ path, method, querystring, body }, options)
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function UpdateApi<TDocument = unknown, TPartialDocument =
|
||||
export default async function UpdateApi<TDocument = unknown, TPartialDocument = unknown, TDocumentR = unknown> (this: That, params: T.UpdateRequest<TDocument, TPartialDocument> | TB.UpdateRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): Promise<T.UpdateResponse<TDocumentR>>
|
||||
export default async function UpdateApi<TDocument = unknown, TPartialDocument = unknown, TDocumentR = unknown> (this: That, params: T.UpdateRequest<TDocument, TPartialDocument> | TB.UpdateRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id', 'index', 'type']
|
||||
const acceptedQuery: string[] = ['if_primary_term', 'if_seq_no', 'lang', 'refresh', 'require_alias', 'retry_on_conflict', 'routing', 'timeout', 'wait_for_active_shards', '_source_excludes', '_source_includes', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['detect_noop', 'doc', 'doc_as_upsert', 'script', 'scripted_upsert', 'upsert']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,21 @@ export default async function UpdateByQueryApi (this: That, params: T.UpdateByQu
|
||||
export default async function UpdateByQueryApi (this: That, params: T.UpdateByQueryRequest | TB.UpdateByQueryRequest, options?: TransportRequestOptions): Promise<T.UpdateByQueryResponse>
|
||||
export default async function UpdateByQueryApi (this: That, params: T.UpdateByQueryRequest | TB.UpdateByQueryRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['index']
|
||||
const acceptedQuery: string[] = ['allow_no_indices', 'analyzer', 'analyze_wildcard', 'default_operator', 'df', 'expand_wildcards', 'from', 'ignore_unavailable', 'lenient', 'pipeline', 'preference', 'refresh', 'request_cache', 'requests_per_second', 'routing', 'scroll', 'scroll_size', 'search_timeout', 'search_type', 'size', 'slices', 'sort', '_source', '_source_excludes', '_source_includes', 'stats', 'terminate_after', 'timeout', 'version', 'version_type', 'wait_for_active_shards', 'wait_for_completion', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['max_docs', 'query', 'script', 'slice']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,21 +42,15 @@ export default async function UpdateByQueryRethrottleApi (this: That, params: T.
|
||||
export default async function UpdateByQueryRethrottleApi (this: That, params: T.UpdateByQueryRethrottleRequest | TB.UpdateByQueryRethrottleRequest, options?: TransportRequestOptions): Promise<T.UpdateByQueryRethrottleResponse>
|
||||
export default async function UpdateByQueryRethrottleApi (this: That, params: T.UpdateByQueryRethrottleRequest | TB.UpdateByQueryRethrottleRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['task_id']
|
||||
const acceptedQuery: string[] = ['requests_per_second', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,21 +48,15 @@ export default class Watcher {
|
||||
async ackWatch (this: That, params: T.WatcherAckWatchRequest | TB.WatcherAckWatchRequest, options?: TransportRequestOptions): Promise<T.WatcherAckWatchResponse>
|
||||
async ackWatch (this: That, params: T.WatcherAckWatchRequest | TB.WatcherAckWatchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['watch_id', 'action_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -83,21 +77,15 @@ export default class Watcher {
|
||||
async activateWatch (this: That, params: T.WatcherActivateWatchRequest | TB.WatcherActivateWatchRequest, options?: TransportRequestOptions): Promise<T.WatcherActivateWatchResponse>
|
||||
async activateWatch (this: That, params: T.WatcherActivateWatchRequest | TB.WatcherActivateWatchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['watch_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,21 +99,15 @@ export default class Watcher {
|
||||
async deactivateWatch (this: That, params: T.WatcherDeactivateWatchRequest | TB.WatcherDeactivateWatchRequest, options?: TransportRequestOptions): Promise<T.WatcherDeactivateWatchResponse>
|
||||
async deactivateWatch (this: That, params: T.WatcherDeactivateWatchRequest | TB.WatcherDeactivateWatchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['watch_id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,21 +121,15 @@ export default class Watcher {
|
||||
async deleteWatch (this: That, params: T.WatcherDeleteWatchRequest | TB.WatcherDeleteWatchRequest, options?: TransportRequestOptions): Promise<T.WatcherDeleteWatchResponse>
|
||||
async deleteWatch (this: That, params: T.WatcherDeleteWatchRequest | TB.WatcherDeleteWatchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,22 +143,22 @@ export default class Watcher {
|
||||
async executeWatch (this: That, params?: T.WatcherExecuteWatchRequest | TB.WatcherExecuteWatchRequest, options?: TransportRequestOptions): Promise<T.WatcherExecuteWatchResponse>
|
||||
async executeWatch (this: That, params?: T.WatcherExecuteWatchRequest | TB.WatcherExecuteWatchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['debug', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['action_modes', 'alternative_input', 'ignore_condition', 'record_execution', 'simulated_actions', 'trigger_data', 'watch']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -203,21 +179,15 @@ export default class Watcher {
|
||||
async getWatch (this: That, params: T.WatcherGetWatchRequest | TB.WatcherGetWatchRequest, options?: TransportRequestOptions): Promise<T.WatcherGetWatchResponse>
|
||||
async getWatch (this: That, params: T.WatcherGetWatchRequest | TB.WatcherGetWatchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -231,21 +201,21 @@ export default class Watcher {
|
||||
async putWatch (this: That, params: T.WatcherPutWatchRequest | TB.WatcherPutWatchRequest, options?: TransportRequestOptions): Promise<T.WatcherPutWatchResponse>
|
||||
async putWatch (this: That, params: T.WatcherPutWatchRequest | TB.WatcherPutWatchRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['id']
|
||||
const acceptedQuery: string[] = ['active', 'if_primary_term', 'if_sequence_number', 'version', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['actions', 'condition', 'input', 'metadata', 'throttle_period', 'transform', 'trigger']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -259,22 +229,22 @@ export default class Watcher {
|
||||
async queryWatches (this: That, params?: T.WatcherQueryWatchesRequest | TB.WatcherQueryWatchesRequest, options?: TransportRequestOptions): Promise<T.WatcherQueryWatchesResponse>
|
||||
async queryWatches (this: That, params?: T.WatcherQueryWatchesRequest | TB.WatcherQueryWatchesRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const acceptedBody: string[] = ['from', 'size', 'query', 'sort', 'search_after']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
if (acceptedBody.includes(key)) {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -288,22 +258,16 @@ export default class Watcher {
|
||||
async start (this: That, params?: T.WatcherStartRequest | TB.WatcherStartRequest, options?: TransportRequestOptions): Promise<T.WatcherStartResponse>
|
||||
async start (this: That, params?: T.WatcherStartRequest | TB.WatcherStartRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -317,22 +281,16 @@ export default class Watcher {
|
||||
async stats (this: That, params?: T.WatcherStatsRequest | TB.WatcherStatsRequest, options?: TransportRequestOptions): Promise<T.WatcherStatsResponse>
|
||||
async stats (this: That, params?: T.WatcherStatsRequest | TB.WatcherStatsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['metric']
|
||||
const acceptedQuery: string[] = ['emit_stacktraces', 'metric', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -353,22 +311,16 @@ export default class Watcher {
|
||||
async stop (this: That, params?: T.WatcherStopRequest | TB.WatcherStopRequest, options?: TransportRequestOptions): Promise<T.WatcherStopResponse>
|
||||
async stop (this: That, params?: T.WatcherStopRequest | TB.WatcherStopRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -48,22 +48,16 @@ export default class Xpack {
|
||||
async info (this: That, params?: T.XpackInfoRequest | TB.XpackInfoRequest, options?: TransportRequestOptions): Promise<T.XpackInfoResponse>
|
||||
async info (this: That, params?: T.XpackInfoRequest | TB.XpackInfoRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['categories', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
@ -77,22 +71,16 @@ export default class Xpack {
|
||||
async usage (this: That, params?: T.XpackUsageRequest | TB.XpackUsageRequest, options?: TransportRequestOptions): Promise<T.XpackUsageResponse>
|
||||
async usage (this: That, params?: T.XpackUsageRequest | TB.XpackUsageRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = []
|
||||
const acceptedQuery: string[] = ['master_timeout', 'error_trace', 'filter_path', 'human', 'pretty', 'source_query_string']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
const body = undefined
|
||||
|
||||
params = params ?? {}
|
||||
for (const key in params) {
|
||||
if (acceptedQuery.includes(key)) {
|
||||
// @ts-expect-error
|
||||
querystring[key] = params[key]
|
||||
} else if (acceptedPath.includes(key)) {
|
||||
if (acceptedPath.includes(key)) {
|
||||
continue
|
||||
} else if (key !== 'body') {
|
||||
body = body ?? {}
|
||||
// @ts-expect-error
|
||||
body[key] = params[key]
|
||||
querystring[key] = params[key]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -30,6 +30,7 @@ import {
|
||||
Serializer,
|
||||
Diagnostic,
|
||||
BaseConnectionPool,
|
||||
TransportRequestParams,
|
||||
TransportRequestOptions,
|
||||
TransportResult
|
||||
} from '@elastic/transport'
|
||||
@ -43,7 +44,9 @@ interface KibanaClient {
|
||||
diagnostic: Diagnostic
|
||||
name: string | symbol
|
||||
connectionPool: BaseConnectionPool
|
||||
transport: SniffingTransport
|
||||
transport: Omit<SniffingTransport, 'request'> & {
|
||||
request: <TResponse = unknown, TContext = any>(params: TransportRequestParams, options?: TransportRequestOptions) => Promise<TransportResult<TResponse, TContext>>
|
||||
}
|
||||
serializer: Serializer
|
||||
helpers: Helpers
|
||||
child: (opts?: ClientOptions) => KibanaClient
|
||||
@ -129,16 +132,6 @@ interface KibanaClient {
|
||||
importDanglingIndex: <TContext = unknown>(params: T.DanglingIndicesImportDanglingIndexRequest| TB.DanglingIndicesImportDanglingIndexRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DanglingIndicesImportDanglingIndexResponse, TContext>>
|
||||
listDanglingIndices: <TContext = unknown>(params?: T.DanglingIndicesListDanglingIndicesRequest| TB.DanglingIndicesListDanglingIndicesRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DanglingIndicesListDanglingIndicesResponse, TContext>>
|
||||
}
|
||||
dataFrameTransformDeprecated: {
|
||||
deleteTransform: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
getTransform: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
getTransformStats: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
previewTransform: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
putTransform: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
startTransform: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
stopTransform: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
updateTransform: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
}
|
||||
delete: <TContext = unknown>(params: T.DeleteRequest| TB.DeleteRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DeleteResponse, TContext>>
|
||||
deleteByQuery: <TContext = unknown>(params: T.DeleteByQueryRequest| TB.DeleteByQueryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DeleteByQueryResponse, TContext>>
|
||||
deleteByQueryRethrottle: <TContext = unknown>(params: T.DeleteByQueryRethrottleRequest| TB.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.DeleteByQueryRethrottleResponse, TContext>>
|
||||
@ -271,6 +264,8 @@ interface KibanaClient {
|
||||
mget: <TDocument = unknown, TContext = unknown>(params?: T.MgetRequest| TB.MgetRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MgetResponse<TDocument>, TContext>>
|
||||
migration: {
|
||||
deprecations: <TContext = unknown>(params?: T.MigrationDeprecationsRequest| TB.MigrationDeprecationsRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MigrationDeprecationsResponse, TContext>>
|
||||
getFeatureUpgradeStatus: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
postFeatureUpgrade: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
}
|
||||
ml: {
|
||||
closeJob: <TContext = unknown>(params: T.MlCloseJobRequest| TB.MlCloseJobRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.MlCloseJobResponse, TContext>>
|
||||
@ -494,6 +489,7 @@ interface KibanaClient {
|
||||
startTransform: <TContext = unknown>(params: T.TransformStartTransformRequest| TB.TransformStartTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformStartTransformResponse, TContext>>
|
||||
stopTransform: <TContext = unknown>(params: T.TransformStopTransformRequest| TB.TransformStopTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformStopTransformResponse, TContext>>
|
||||
updateTransform: <TContext = unknown>(params?: T.TransformUpdateTransformRequest| TB.TransformUpdateTransformRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.TransformUpdateTransformResponse, TContext>>
|
||||
upgradeTransforms: <TContext = unknown>(params?: T.TODO, options?: TransportRequestOptions) => Promise<TransportResult<T.TODO, unknown>>
|
||||
}
|
||||
update: <TDocumentR = unknown, TDocument = unknown, TPartialDocument = unknown, TContext = unknown>(params: T.UpdateRequest<TDocument, TPartialDocument>| TB.UpdateRequest<TDocument, TPartialDocument>, options?: TransportRequestOptions) => Promise<TransportResult<T.UpdateResponse<TDocumentR>, TContext>>
|
||||
updateByQuery: <TContext = unknown>(params: T.UpdateByQueryRequest| TB.UpdateByQueryRequest, options?: TransportRequestOptions) => Promise<TransportResult<T.UpdateByQueryResponse, TContext>>
|
||||
|
||||
202
src/api/types.ts
202
src/api/types.ts
@ -28,29 +28,21 @@
|
||||
*/
|
||||
export type TODO = Record<string, any>
|
||||
|
||||
export interface BulkCreateOperation extends BulkOperation {
|
||||
export interface BulkCreateOperation extends BulkWriteOperation {
|
||||
}
|
||||
|
||||
export interface BulkCreateResponseItem extends BulkResponseItemBase {
|
||||
export interface BulkDeleteOperation extends BulkOperationBase {
|
||||
}
|
||||
|
||||
export interface BulkDeleteOperation extends BulkOperation {
|
||||
export interface BulkIndexOperation extends BulkWriteOperation {
|
||||
}
|
||||
|
||||
export interface BulkDeleteResponseItem extends BulkResponseItemBase {
|
||||
}
|
||||
|
||||
export interface BulkIndexOperation extends BulkOperation {
|
||||
}
|
||||
|
||||
export interface BulkIndexResponseItem extends BulkResponseItemBase {
|
||||
}
|
||||
|
||||
export interface BulkOperation {
|
||||
export interface BulkOperationBase {
|
||||
_id?: Id
|
||||
_index?: IndexName
|
||||
retry_on_conflict?: integer
|
||||
routing?: Routing
|
||||
if_primary_term?: long
|
||||
if_seq_no?: SequenceNumber
|
||||
version?: VersionNumber
|
||||
version_type?: VersionType
|
||||
}
|
||||
@ -62,6 +54,8 @@ export interface BulkOperationContainer {
|
||||
delete?: BulkDeleteOperation
|
||||
}
|
||||
|
||||
export type BulkOperationType = 'index' | 'create' | 'update' | 'delete'
|
||||
|
||||
export interface BulkRequest<TSource = unknown> extends RequestBase {
|
||||
index?: IndexName
|
||||
type?: Type
|
||||
@ -79,12 +73,12 @@ export interface BulkRequest<TSource = unknown> extends RequestBase {
|
||||
|
||||
export interface BulkResponse {
|
||||
errors: boolean
|
||||
items: BulkResponseItemContainer[]
|
||||
items: Partial<Record<BulkOperationType, BulkResponseItem>>[]
|
||||
took: long
|
||||
ingest_took?: long
|
||||
}
|
||||
|
||||
export interface BulkResponseItemBase {
|
||||
export interface BulkResponseItem {
|
||||
_id?: string | null
|
||||
_index: string
|
||||
status: integer
|
||||
@ -99,17 +93,15 @@ export interface BulkResponseItemBase {
|
||||
get?: InlineGet<Record<string, any>>
|
||||
}
|
||||
|
||||
export interface BulkResponseItemContainer {
|
||||
index?: BulkIndexResponseItem
|
||||
create?: BulkCreateResponseItem
|
||||
update?: BulkUpdateResponseItem
|
||||
delete?: BulkDeleteResponseItem
|
||||
export interface BulkUpdateOperation extends BulkOperationBase {
|
||||
require_alias?: boolean
|
||||
retry_on_conflict?: integer
|
||||
}
|
||||
|
||||
export interface BulkUpdateOperation extends BulkOperation {
|
||||
}
|
||||
|
||||
export interface BulkUpdateResponseItem extends BulkResponseItemBase {
|
||||
export interface BulkWriteOperation extends BulkOperationBase {
|
||||
dynamic_templates?: Record<string, string>
|
||||
pipeline?: string
|
||||
require_alias?: boolean
|
||||
}
|
||||
|
||||
export interface ClearScrollRequest extends RequestBase {
|
||||
@ -589,7 +581,7 @@ export interface MsearchTemplateTemplateItem {
|
||||
export interface MtermvectorsOperation {
|
||||
_id: Id
|
||||
_index?: IndexName
|
||||
doc?: object
|
||||
doc?: any
|
||||
fields?: Fields
|
||||
field_statistics?: boolean
|
||||
filter?: TermvectorsFilter
|
||||
@ -1660,7 +1652,7 @@ export interface UpdateRequest<TDocument = unknown, TPartialDocument = unknown>
|
||||
lang?: string
|
||||
refresh?: Refresh
|
||||
require_alias?: boolean
|
||||
retry_on_conflict?: long
|
||||
retry_on_conflict?: integer
|
||||
routing?: Routing
|
||||
timeout?: Time
|
||||
wait_for_active_shards?: WaitForActiveShards
|
||||
@ -1980,14 +1972,16 @@ export interface IndicesResponseBase extends AcknowledgedResponseBase {
|
||||
_shards?: ShardStatistics
|
||||
}
|
||||
|
||||
export interface InlineGet<TDocument = unknown> {
|
||||
export interface InlineGetKeys<TDocument = unknown> {
|
||||
fields?: Record<string, any>
|
||||
found: boolean
|
||||
_seq_no: SequenceNumber
|
||||
_primary_term: long
|
||||
_seq_no?: SequenceNumber
|
||||
_primary_term?: long
|
||||
_routing?: Routing
|
||||
_source: TDocument
|
||||
}
|
||||
export type InlineGet<TDocument = unknown> = InlineGetKeys<TDocument> |
|
||||
{ [property: string]: any }
|
||||
|
||||
export interface InlineScript extends ScriptBase {
|
||||
source: string
|
||||
@ -2224,7 +2218,7 @@ export interface SegmentsStats {
|
||||
version_map_memory_in_bytes: integer
|
||||
}
|
||||
|
||||
export type SequenceNumber = integer
|
||||
export type SequenceNumber = long
|
||||
|
||||
export type Service = string
|
||||
|
||||
@ -3914,7 +3908,7 @@ export interface MappingFieldAliasProperty extends MappingPropertyBase {
|
||||
|
||||
export interface MappingFieldMapping {
|
||||
full_name: string
|
||||
mapping: Record<string, MappingProperty>
|
||||
mapping: Partial<Record<string, MappingProperty>>
|
||||
}
|
||||
|
||||
export interface MappingFieldNamesField {
|
||||
@ -3955,7 +3949,7 @@ export interface MappingGenericProperty extends MappingDocValuesPropertyBase {
|
||||
type: string
|
||||
}
|
||||
|
||||
export type MappingGeoOrientation = 'right' | 'left'
|
||||
export type MappingGeoOrientation = 'right' | 'RIGHT' | 'counterclockwise' | 'ccw' | 'left' | 'LEFT' | 'clockwise' | 'cw'
|
||||
|
||||
export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase {
|
||||
ignore_malformed?: boolean
|
||||
@ -4685,14 +4679,14 @@ export interface QueryDslQueryBase {
|
||||
export interface QueryDslQueryContainer {
|
||||
bool?: QueryDslBoolQuery
|
||||
boosting?: QueryDslBoostingQuery
|
||||
common?: Record<Field, QueryDslCommonTermsQuery | string>
|
||||
common?: Partial<Record<Field, QueryDslCommonTermsQuery | string>>
|
||||
combined_fields?: QueryDslCombinedFieldsQuery
|
||||
constant_score?: QueryDslConstantScoreQuery
|
||||
dis_max?: QueryDslDisMaxQuery
|
||||
distance_feature?: QueryDslDistanceFeatureQuery
|
||||
exists?: QueryDslExistsQuery
|
||||
function_score?: QueryDslFunctionScoreQuery
|
||||
fuzzy?: Record<Field, QueryDslFuzzyQuery | string | double | boolean>
|
||||
fuzzy?: Partial<Record<Field, QueryDslFuzzyQuery | string | double | boolean>>
|
||||
geo_bounding_box?: QueryDslGeoBoundingBoxQuery
|
||||
geo_distance?: QueryDslGeoDistanceQuery
|
||||
geo_polygon?: QueryDslGeoPolygonQuery
|
||||
@ -4700,24 +4694,24 @@ export interface QueryDslQueryContainer {
|
||||
has_child?: QueryDslHasChildQuery
|
||||
has_parent?: QueryDslHasParentQuery
|
||||
ids?: QueryDslIdsQuery
|
||||
intervals?: Record<Field, QueryDslIntervalsQuery>
|
||||
match?: Record<Field, QueryDslMatchQuery | string | float | boolean>
|
||||
intervals?: Partial<Record<Field, QueryDslIntervalsQuery>>
|
||||
match?: Partial<Record<Field, QueryDslMatchQuery | string | float | boolean>>
|
||||
match_all?: QueryDslMatchAllQuery
|
||||
match_bool_prefix?: Record<Field, QueryDslMatchBoolPrefixQuery | string>
|
||||
match_bool_prefix?: Partial<Record<Field, QueryDslMatchBoolPrefixQuery | string>>
|
||||
match_none?: QueryDslMatchNoneQuery
|
||||
match_phrase?: Record<Field, QueryDslMatchPhraseQuery | string>
|
||||
match_phrase_prefix?: Record<Field, QueryDslMatchPhrasePrefixQuery | string>
|
||||
match_phrase?: Partial<Record<Field, QueryDslMatchPhraseQuery | string>>
|
||||
match_phrase_prefix?: Partial<Record<Field, QueryDslMatchPhrasePrefixQuery | string>>
|
||||
more_like_this?: QueryDslMoreLikeThisQuery
|
||||
multi_match?: QueryDslMultiMatchQuery
|
||||
nested?: QueryDslNestedQuery
|
||||
parent_id?: QueryDslParentIdQuery
|
||||
percolate?: QueryDslPercolateQuery
|
||||
pinned?: QueryDslPinnedQuery
|
||||
prefix?: Record<Field, QueryDslPrefixQuery | string>
|
||||
prefix?: Partial<Record<Field, QueryDslPrefixQuery | string>>
|
||||
query_string?: QueryDslQueryStringQuery
|
||||
range?: Record<Field, QueryDslRangeQuery>
|
||||
range?: Partial<Record<Field, QueryDslRangeQuery>>
|
||||
rank_feature?: QueryDslRankFeatureQuery
|
||||
regexp?: Record<Field, QueryDslRegexpQuery | string>
|
||||
regexp?: Partial<Record<Field, QueryDslRegexpQuery | string>>
|
||||
script?: QueryDslScriptQuery
|
||||
script_score?: QueryDslScriptScoreQuery
|
||||
shape?: QueryDslShapeQuery
|
||||
@ -4729,12 +4723,12 @@ export interface QueryDslQueryContainer {
|
||||
span_near?: QueryDslSpanNearQuery
|
||||
span_not?: QueryDslSpanNotQuery
|
||||
span_or?: QueryDslSpanOrQuery
|
||||
span_term?: Record<Field, QueryDslSpanTermQuery | string>
|
||||
span_term?: Partial<Record<Field, QueryDslSpanTermQuery | string>>
|
||||
span_within?: QueryDslSpanWithinQuery
|
||||
term?: Record<Field, QueryDslTermQuery | string | float | boolean>
|
||||
term?: Partial<Record<Field, QueryDslTermQuery | string | float | boolean>>
|
||||
terms?: QueryDslTermsQuery
|
||||
terms_set?: Record<Field, QueryDslTermsSetQuery>
|
||||
wildcard?: Record<Field, QueryDslWildcardQuery | string>
|
||||
terms_set?: Partial<Record<Field, QueryDslTermsSetQuery>>
|
||||
wildcard?: Partial<Record<Field, QueryDslWildcardQuery | string>>
|
||||
type?: QueryDslTypeQuery
|
||||
}
|
||||
|
||||
@ -4880,7 +4874,7 @@ export interface QueryDslSpanFirstQuery extends QueryDslQueryBase {
|
||||
match: QueryDslSpanQuery
|
||||
}
|
||||
|
||||
export type QueryDslSpanGapQuery = Record<Field, integer>
|
||||
export type QueryDslSpanGapQuery = Partial<Record<Field, integer>>
|
||||
|
||||
export interface QueryDslSpanMultiTermQuery extends QueryDslQueryBase {
|
||||
match: QueryDslQueryContainer
|
||||
@ -4913,7 +4907,7 @@ export interface QueryDslSpanQuery {
|
||||
span_near?: QueryDslSpanNearQuery
|
||||
span_not?: QueryDslSpanNotQuery
|
||||
span_or?: QueryDslSpanOrQuery
|
||||
span_term?: Record<Field, QueryDslSpanTermQuery | string>
|
||||
span_term?: Partial<Record<Field, QueryDslSpanTermQuery | string>>
|
||||
span_within?: QueryDslSpanWithinQuery
|
||||
}
|
||||
|
||||
@ -4943,17 +4937,12 @@ export interface QueryDslTermsQueryKeys extends QueryDslQueryBase {
|
||||
export type QueryDslTermsQuery = QueryDslTermsQueryKeys |
|
||||
{ [property: string]: string[] | long[] | QueryDslTermsLookup }
|
||||
|
||||
export interface QueryDslTermsSetFieldQuery {
|
||||
export interface QueryDslTermsSetQuery extends QueryDslQueryBase {
|
||||
minimum_should_match_field?: Field
|
||||
minimum_should_match_script?: Script
|
||||
terms: string[]
|
||||
}
|
||||
|
||||
export interface QueryDslTermsSetQueryKeys extends QueryDslQueryBase {
|
||||
}
|
||||
export type QueryDslTermsSetQuery = QueryDslTermsSetQueryKeys |
|
||||
{ [property: string]: QueryDslTermsSetFieldQuery }
|
||||
|
||||
export type QueryDslTextQueryType = 'best_fields' | 'most_fields' | 'cross_fields' | 'phrase' | 'phrase_prefix' | 'bool_prefix'
|
||||
|
||||
export interface QueryDslThreeDimensionalPoint {
|
||||
@ -5036,58 +5025,68 @@ export interface AsyncSearchStatusResponse<TDocument = unknown> extends AsyncSea
|
||||
|
||||
export interface AsyncSearchSubmitRequest extends RequestBase {
|
||||
index?: Indices
|
||||
batched_reduce_size?: long
|
||||
wait_for_completion_timeout?: Time
|
||||
keep_on_completion?: boolean
|
||||
typed_keys?: boolean
|
||||
aggs?: Record<string, AggregationsAggregationContainer>
|
||||
keep_alive?: Time
|
||||
allow_no_indices?: boolean
|
||||
allow_partial_search_results?: boolean
|
||||
analyzer?: string
|
||||
analyze_wildcard?: boolean
|
||||
collapse?: SearchFieldCollapse
|
||||
batched_reduce_size?: long
|
||||
ccs_minimize_roundtrips?: boolean
|
||||
default_operator?: DefaultOperator
|
||||
df?: string
|
||||
docvalue_fields?: Fields
|
||||
expand_wildcards?: ExpandWildcards
|
||||
explain?: boolean
|
||||
from?: integer
|
||||
highlight?: SearchHighlight
|
||||
ignore_throttled?: boolean
|
||||
ignore_unavailable?: boolean
|
||||
indices_boost?: Record<IndexName, double>[]
|
||||
keep_alive?: Time
|
||||
lenient?: boolean
|
||||
max_concurrent_shard_requests?: long
|
||||
min_score?: double
|
||||
post_filter?: QueryDslQueryContainer
|
||||
min_compatible_shard_node?: VersionString
|
||||
preference?: string
|
||||
profile?: boolean
|
||||
pit?: SearchPointInTimeReference
|
||||
query?: QueryDslQueryContainer
|
||||
pre_filter_shard_size?: long
|
||||
request_cache?: boolean
|
||||
rescore?: SearchRescore[]
|
||||
routing?: Routing
|
||||
script_fields?: Record<string, ScriptField>
|
||||
search_after?: SearchSortResults
|
||||
scroll?: Time
|
||||
search_type?: SearchType
|
||||
sequence_number_primary_term?: boolean
|
||||
size?: integer
|
||||
sort?: SearchSort
|
||||
_source?: boolean | SearchSourceFilter
|
||||
stats?: string[]
|
||||
stored_fields?: Fields
|
||||
suggest?: Record<string, SearchSuggestContainer>
|
||||
suggest_field?: Field
|
||||
suggest_mode?: SuggestMode
|
||||
suggest_size?: long
|
||||
suggest_text?: string
|
||||
terminate_after?: long
|
||||
timeout?: string
|
||||
timeout?: Time
|
||||
track_total_hits?: boolean | integer
|
||||
track_scores?: boolean
|
||||
track_total_hits?: boolean
|
||||
typed_keys?: boolean
|
||||
rest_total_hits_as_int?: boolean
|
||||
version?: boolean
|
||||
_source?: boolean | Fields
|
||||
_source_excludes?: Fields
|
||||
_source_includes?: Fields
|
||||
seq_no_primary_term?: boolean
|
||||
q?: string
|
||||
size?: integer
|
||||
from?: integer
|
||||
sort?: string | string[]
|
||||
aggs?: Record<string, AggregationsAggregationContainer>
|
||||
aggregations?: Record<string, AggregationsAggregationContainer>
|
||||
collapse?: SearchFieldCollapse
|
||||
highlight?: SearchHighlight
|
||||
indices_boost?: Record<IndexName, double>[]
|
||||
min_score?: double
|
||||
post_filter?: QueryDslQueryContainer
|
||||
profile?: boolean
|
||||
query?: QueryDslQueryContainer
|
||||
rescore?: SearchRescore | SearchRescore[]
|
||||
script_fields?: Record<string, ScriptField>
|
||||
search_after?: SearchSortResults
|
||||
slice?: SlicedScroll
|
||||
fields?: (Field | DateField)[]
|
||||
suggest?: SearchSuggestContainer | Record<string, SearchSuggestContainer>
|
||||
pit?: SearchPointInTimeReference
|
||||
runtime_mappings?: MappingRuntimeFields
|
||||
}
|
||||
|
||||
@ -8831,7 +8830,7 @@ export interface IndicesGetFieldMappingResponse extends DictionaryResponseBase<I
|
||||
}
|
||||
|
||||
export interface IndicesGetFieldMappingTypeFieldMappings {
|
||||
mappings: Record<Field, MappingFieldMapping>
|
||||
mappings: Partial<Record<Field, MappingFieldMapping>>
|
||||
}
|
||||
|
||||
export interface IndicesGetIndexTemplateIndexTemplate {
|
||||
@ -9525,14 +9524,42 @@ export interface IndicesUnfreezeResponse extends AcknowledgedResponseBase {
|
||||
shards_acknowledged: boolean
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesIndicesUpdateAliasBulk {
|
||||
[key: string]: never
|
||||
export interface IndicesUpdateAliasesAction {
|
||||
add?: IndicesUpdateAliasesAddAction
|
||||
remove?: IndicesUpdateAliasesRemoveAction
|
||||
remove_index?: IndicesUpdateAliasesRemoveIndexAction
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesAddAction {
|
||||
alias?: IndexAlias
|
||||
aliases?: IndexAlias | IndexAlias[]
|
||||
filter?: QueryDslQueryContainer
|
||||
index?: IndexName
|
||||
indices?: Indices
|
||||
index_routing?: Routing
|
||||
is_hidden?: boolean
|
||||
is_write_index?: boolean
|
||||
routing?: Routing
|
||||
search_routing?: Routing
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesRemoveAction {
|
||||
alias?: IndexAlias
|
||||
aliases?: IndexAlias | IndexAlias[]
|
||||
index?: IndexName
|
||||
indices?: Indices
|
||||
must_exist?: boolean
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesRemoveIndexAction {
|
||||
index?: IndexName
|
||||
indices?: Indices
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesRequest extends RequestBase {
|
||||
master_timeout?: Time
|
||||
timeout?: Time
|
||||
actions?: IndicesUpdateAliasesIndicesUpdateAliasBulk[]
|
||||
actions?: IndicesUpdateAliasesAction[]
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesResponse extends AcknowledgedResponseBase {
|
||||
@ -11220,6 +11247,7 @@ export interface MlForecastRequest extends RequestBase {
|
||||
job_id: Id
|
||||
duration?: Time
|
||||
expires_in?: Time
|
||||
max_model_memory?: string
|
||||
}
|
||||
|
||||
export interface MlForecastResponse extends AcknowledgedResponseBase {
|
||||
@ -15243,7 +15271,7 @@ export interface XpackUsageKibanaUrlConfig extends XpackUsageBaseUrlConfig {
|
||||
|
||||
export interface XpackUsageMachineLearning extends XpackUsageBase {
|
||||
datafeeds: Record<string, XpackUsageDatafeed>
|
||||
jobs: Record<string, MlJob> | Record<string, XpackUsageAllJobs>
|
||||
jobs: Record<string, MlJob> | Partial<Record<string, XpackUsageAllJobs>>
|
||||
node_count: integer
|
||||
data_frame_analytics_jobs: XpackUsageMlDataFrameAnalyticsJobs
|
||||
inference: XpackUsageMlInference
|
||||
@ -15491,6 +15519,10 @@ export interface XpackUsageWatcherWatchTriggerSchedule extends XpackUsageCounter
|
||||
_all: XpackUsageCounter
|
||||
}
|
||||
|
||||
export interface SpecUtilsAdditionalProperty<TKey = unknown, TValue = unknown> {
|
||||
[key: string]: never
|
||||
}
|
||||
|
||||
export interface SpecUtilsAdditionalProperties<TKey = unknown, TValue = unknown> {
|
||||
[key: string]: never
|
||||
}
|
||||
@ -15503,10 +15535,6 @@ export interface SpecUtilsCommonQueryParameters {
|
||||
source_query_string?: string
|
||||
}
|
||||
|
||||
export interface SpecUtilsAdditionalProperty<TKey = unknown, TValue = unknown> {
|
||||
[key: string]: never
|
||||
}
|
||||
|
||||
export interface SpecUtilsCommonCatQueryParameters {
|
||||
format?: string
|
||||
h?: Names
|
||||
|
||||
@ -28,29 +28,21 @@
|
||||
*/
|
||||
export type TODO = Record<string, any>
|
||||
|
||||
export interface BulkCreateOperation extends BulkOperation {
|
||||
export interface BulkCreateOperation extends BulkWriteOperation {
|
||||
}
|
||||
|
||||
export interface BulkCreateResponseItem extends BulkResponseItemBase {
|
||||
export interface BulkDeleteOperation extends BulkOperationBase {
|
||||
}
|
||||
|
||||
export interface BulkDeleteOperation extends BulkOperation {
|
||||
export interface BulkIndexOperation extends BulkWriteOperation {
|
||||
}
|
||||
|
||||
export interface BulkDeleteResponseItem extends BulkResponseItemBase {
|
||||
}
|
||||
|
||||
export interface BulkIndexOperation extends BulkOperation {
|
||||
}
|
||||
|
||||
export interface BulkIndexResponseItem extends BulkResponseItemBase {
|
||||
}
|
||||
|
||||
export interface BulkOperation {
|
||||
export interface BulkOperationBase {
|
||||
_id?: Id
|
||||
_index?: IndexName
|
||||
retry_on_conflict?: integer
|
||||
routing?: Routing
|
||||
if_primary_term?: long
|
||||
if_seq_no?: SequenceNumber
|
||||
version?: VersionNumber
|
||||
version_type?: VersionType
|
||||
}
|
||||
@ -62,6 +54,8 @@ export interface BulkOperationContainer {
|
||||
delete?: BulkDeleteOperation
|
||||
}
|
||||
|
||||
export type BulkOperationType = 'index' | 'create' | 'update' | 'delete'
|
||||
|
||||
export interface BulkRequest<TSource = unknown> extends RequestBase {
|
||||
index?: IndexName
|
||||
type?: Type
|
||||
@ -80,12 +74,12 @@ export interface BulkRequest<TSource = unknown> extends RequestBase {
|
||||
|
||||
export interface BulkResponse {
|
||||
errors: boolean
|
||||
items: BulkResponseItemContainer[]
|
||||
items: Partial<Record<BulkOperationType, BulkResponseItem>>[]
|
||||
took: long
|
||||
ingest_took?: long
|
||||
}
|
||||
|
||||
export interface BulkResponseItemBase {
|
||||
export interface BulkResponseItem {
|
||||
_id?: string | null
|
||||
_index: string
|
||||
status: integer
|
||||
@ -100,17 +94,15 @@ export interface BulkResponseItemBase {
|
||||
get?: InlineGet<Record<string, any>>
|
||||
}
|
||||
|
||||
export interface BulkResponseItemContainer {
|
||||
index?: BulkIndexResponseItem
|
||||
create?: BulkCreateResponseItem
|
||||
update?: BulkUpdateResponseItem
|
||||
delete?: BulkDeleteResponseItem
|
||||
export interface BulkUpdateOperation extends BulkOperationBase {
|
||||
require_alias?: boolean
|
||||
retry_on_conflict?: integer
|
||||
}
|
||||
|
||||
export interface BulkUpdateOperation extends BulkOperation {
|
||||
}
|
||||
|
||||
export interface BulkUpdateResponseItem extends BulkResponseItemBase {
|
||||
export interface BulkWriteOperation extends BulkOperationBase {
|
||||
dynamic_templates?: Record<string, string>
|
||||
pipeline?: string
|
||||
require_alias?: boolean
|
||||
}
|
||||
|
||||
export interface ClearScrollRequest extends RequestBase {
|
||||
@ -617,7 +609,7 @@ export interface MsearchTemplateTemplateItem {
|
||||
export interface MtermvectorsOperation {
|
||||
_id: Id
|
||||
_index?: IndexName
|
||||
doc?: object
|
||||
doc?: any
|
||||
fields?: Fields
|
||||
field_statistics?: boolean
|
||||
filter?: TermvectorsFilter
|
||||
@ -1748,7 +1740,7 @@ export interface UpdateRequest<TDocument = unknown, TPartialDocument = unknown>
|
||||
lang?: string
|
||||
refresh?: Refresh
|
||||
require_alias?: boolean
|
||||
retry_on_conflict?: long
|
||||
retry_on_conflict?: integer
|
||||
routing?: Routing
|
||||
timeout?: Time
|
||||
wait_for_active_shards?: WaitForActiveShards
|
||||
@ -2076,14 +2068,16 @@ export interface IndicesResponseBase extends AcknowledgedResponseBase {
|
||||
_shards?: ShardStatistics
|
||||
}
|
||||
|
||||
export interface InlineGet<TDocument = unknown> {
|
||||
export interface InlineGetKeys<TDocument = unknown> {
|
||||
fields?: Record<string, any>
|
||||
found: boolean
|
||||
_seq_no: SequenceNumber
|
||||
_primary_term: long
|
||||
_seq_no?: SequenceNumber
|
||||
_primary_term?: long
|
||||
_routing?: Routing
|
||||
_source: TDocument
|
||||
}
|
||||
export type InlineGet<TDocument = unknown> = InlineGetKeys<TDocument> |
|
||||
{ [property: string]: any }
|
||||
|
||||
export interface InlineScript extends ScriptBase {
|
||||
source: string
|
||||
@ -2320,7 +2314,7 @@ export interface SegmentsStats {
|
||||
version_map_memory_in_bytes: integer
|
||||
}
|
||||
|
||||
export type SequenceNumber = integer
|
||||
export type SequenceNumber = long
|
||||
|
||||
export type Service = string
|
||||
|
||||
@ -4010,7 +4004,7 @@ export interface MappingFieldAliasProperty extends MappingPropertyBase {
|
||||
|
||||
export interface MappingFieldMapping {
|
||||
full_name: string
|
||||
mapping: Record<string, MappingProperty>
|
||||
mapping: Partial<Record<string, MappingProperty>>
|
||||
}
|
||||
|
||||
export interface MappingFieldNamesField {
|
||||
@ -4051,7 +4045,7 @@ export interface MappingGenericProperty extends MappingDocValuesPropertyBase {
|
||||
type: string
|
||||
}
|
||||
|
||||
export type MappingGeoOrientation = 'right' | 'left'
|
||||
export type MappingGeoOrientation = 'right' | 'RIGHT' | 'counterclockwise' | 'ccw' | 'left' | 'LEFT' | 'clockwise' | 'cw'
|
||||
|
||||
export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase {
|
||||
ignore_malformed?: boolean
|
||||
@ -4781,14 +4775,14 @@ export interface QueryDslQueryBase {
|
||||
export interface QueryDslQueryContainer {
|
||||
bool?: QueryDslBoolQuery
|
||||
boosting?: QueryDslBoostingQuery
|
||||
common?: Record<Field, QueryDslCommonTermsQuery | string>
|
||||
common?: Partial<Record<Field, QueryDslCommonTermsQuery | string>>
|
||||
combined_fields?: QueryDslCombinedFieldsQuery
|
||||
constant_score?: QueryDslConstantScoreQuery
|
||||
dis_max?: QueryDslDisMaxQuery
|
||||
distance_feature?: QueryDslDistanceFeatureQuery
|
||||
exists?: QueryDslExistsQuery
|
||||
function_score?: QueryDslFunctionScoreQuery
|
||||
fuzzy?: Record<Field, QueryDslFuzzyQuery | string | double | boolean>
|
||||
fuzzy?: Partial<Record<Field, QueryDslFuzzyQuery | string | double | boolean>>
|
||||
geo_bounding_box?: QueryDslGeoBoundingBoxQuery
|
||||
geo_distance?: QueryDslGeoDistanceQuery
|
||||
geo_polygon?: QueryDslGeoPolygonQuery
|
||||
@ -4796,24 +4790,24 @@ export interface QueryDslQueryContainer {
|
||||
has_child?: QueryDslHasChildQuery
|
||||
has_parent?: QueryDslHasParentQuery
|
||||
ids?: QueryDslIdsQuery
|
||||
intervals?: Record<Field, QueryDslIntervalsQuery>
|
||||
match?: Record<Field, QueryDslMatchQuery | string | float | boolean>
|
||||
intervals?: Partial<Record<Field, QueryDslIntervalsQuery>>
|
||||
match?: Partial<Record<Field, QueryDslMatchQuery | string | float | boolean>>
|
||||
match_all?: QueryDslMatchAllQuery
|
||||
match_bool_prefix?: Record<Field, QueryDslMatchBoolPrefixQuery | string>
|
||||
match_bool_prefix?: Partial<Record<Field, QueryDslMatchBoolPrefixQuery | string>>
|
||||
match_none?: QueryDslMatchNoneQuery
|
||||
match_phrase?: Record<Field, QueryDslMatchPhraseQuery | string>
|
||||
match_phrase_prefix?: Record<Field, QueryDslMatchPhrasePrefixQuery | string>
|
||||
match_phrase?: Partial<Record<Field, QueryDslMatchPhraseQuery | string>>
|
||||
match_phrase_prefix?: Partial<Record<Field, QueryDslMatchPhrasePrefixQuery | string>>
|
||||
more_like_this?: QueryDslMoreLikeThisQuery
|
||||
multi_match?: QueryDslMultiMatchQuery
|
||||
nested?: QueryDslNestedQuery
|
||||
parent_id?: QueryDslParentIdQuery
|
||||
percolate?: QueryDslPercolateQuery
|
||||
pinned?: QueryDslPinnedQuery
|
||||
prefix?: Record<Field, QueryDslPrefixQuery | string>
|
||||
prefix?: Partial<Record<Field, QueryDslPrefixQuery | string>>
|
||||
query_string?: QueryDslQueryStringQuery
|
||||
range?: Record<Field, QueryDslRangeQuery>
|
||||
range?: Partial<Record<Field, QueryDslRangeQuery>>
|
||||
rank_feature?: QueryDslRankFeatureQuery
|
||||
regexp?: Record<Field, QueryDslRegexpQuery | string>
|
||||
regexp?: Partial<Record<Field, QueryDslRegexpQuery | string>>
|
||||
script?: QueryDslScriptQuery
|
||||
script_score?: QueryDslScriptScoreQuery
|
||||
shape?: QueryDslShapeQuery
|
||||
@ -4825,12 +4819,12 @@ export interface QueryDslQueryContainer {
|
||||
span_near?: QueryDslSpanNearQuery
|
||||
span_not?: QueryDslSpanNotQuery
|
||||
span_or?: QueryDslSpanOrQuery
|
||||
span_term?: Record<Field, QueryDslSpanTermQuery | string>
|
||||
span_term?: Partial<Record<Field, QueryDslSpanTermQuery | string>>
|
||||
span_within?: QueryDslSpanWithinQuery
|
||||
term?: Record<Field, QueryDslTermQuery | string | float | boolean>
|
||||
term?: Partial<Record<Field, QueryDslTermQuery | string | float | boolean>>
|
||||
terms?: QueryDslTermsQuery
|
||||
terms_set?: Record<Field, QueryDslTermsSetQuery>
|
||||
wildcard?: Record<Field, QueryDslWildcardQuery | string>
|
||||
terms_set?: Partial<Record<Field, QueryDslTermsSetQuery>>
|
||||
wildcard?: Partial<Record<Field, QueryDslWildcardQuery | string>>
|
||||
type?: QueryDslTypeQuery
|
||||
}
|
||||
|
||||
@ -4976,7 +4970,7 @@ export interface QueryDslSpanFirstQuery extends QueryDslQueryBase {
|
||||
match: QueryDslSpanQuery
|
||||
}
|
||||
|
||||
export type QueryDslSpanGapQuery = Record<Field, integer>
|
||||
export type QueryDslSpanGapQuery = Partial<Record<Field, integer>>
|
||||
|
||||
export interface QueryDslSpanMultiTermQuery extends QueryDslQueryBase {
|
||||
match: QueryDslQueryContainer
|
||||
@ -5009,7 +5003,7 @@ export interface QueryDslSpanQuery {
|
||||
span_near?: QueryDslSpanNearQuery
|
||||
span_not?: QueryDslSpanNotQuery
|
||||
span_or?: QueryDslSpanOrQuery
|
||||
span_term?: Record<Field, QueryDslSpanTermQuery | string>
|
||||
span_term?: Partial<Record<Field, QueryDslSpanTermQuery | string>>
|
||||
span_within?: QueryDslSpanWithinQuery
|
||||
}
|
||||
|
||||
@ -5039,17 +5033,12 @@ export interface QueryDslTermsQueryKeys extends QueryDslQueryBase {
|
||||
export type QueryDslTermsQuery = QueryDslTermsQueryKeys |
|
||||
{ [property: string]: string[] | long[] | QueryDslTermsLookup }
|
||||
|
||||
export interface QueryDslTermsSetFieldQuery {
|
||||
export interface QueryDslTermsSetQuery extends QueryDslQueryBase {
|
||||
minimum_should_match_field?: Field
|
||||
minimum_should_match_script?: Script
|
||||
terms: string[]
|
||||
}
|
||||
|
||||
export interface QueryDslTermsSetQueryKeys extends QueryDslQueryBase {
|
||||
}
|
||||
export type QueryDslTermsSetQuery = QueryDslTermsSetQueryKeys |
|
||||
{ [property: string]: QueryDslTermsSetFieldQuery }
|
||||
|
||||
export type QueryDslTextQueryType = 'best_fields' | 'most_fields' | 'cross_fields' | 'phrase' | 'phrase_prefix' | 'bool_prefix'
|
||||
|
||||
export interface QueryDslThreeDimensionalPoint {
|
||||
@ -5132,61 +5121,85 @@ export interface AsyncSearchStatusResponse<TDocument = unknown> extends AsyncSea
|
||||
|
||||
export interface AsyncSearchSubmitRequest extends RequestBase {
|
||||
index?: Indices
|
||||
batched_reduce_size?: long
|
||||
wait_for_completion_timeout?: Time
|
||||
keep_on_completion?: boolean
|
||||
keep_alive?: Time
|
||||
allow_no_indices?: boolean
|
||||
allow_partial_search_results?: boolean
|
||||
analyzer?: string
|
||||
analyze_wildcard?: boolean
|
||||
batched_reduce_size?: long
|
||||
ccs_minimize_roundtrips?: boolean
|
||||
default_operator?: DefaultOperator
|
||||
df?: string
|
||||
docvalue_fields?: Fields
|
||||
expand_wildcards?: ExpandWildcards
|
||||
explain?: boolean
|
||||
ignore_throttled?: boolean
|
||||
ignore_unavailable?: boolean
|
||||
lenient?: boolean
|
||||
max_concurrent_shard_requests?: long
|
||||
min_compatible_shard_node?: VersionString
|
||||
preference?: string
|
||||
pre_filter_shard_size?: long
|
||||
request_cache?: boolean
|
||||
routing?: Routing
|
||||
scroll?: Time
|
||||
search_type?: SearchType
|
||||
stats?: string[]
|
||||
stored_fields?: Fields
|
||||
suggest_field?: Field
|
||||
suggest_mode?: SuggestMode
|
||||
suggest_size?: long
|
||||
suggest_text?: string
|
||||
terminate_after?: long
|
||||
timeout?: Time
|
||||
track_total_hits?: boolean | integer
|
||||
track_scores?: boolean
|
||||
typed_keys?: boolean
|
||||
rest_total_hits_as_int?: boolean
|
||||
version?: boolean
|
||||
_source?: boolean | Fields
|
||||
_source_excludes?: Fields
|
||||
_source_includes?: Fields
|
||||
seq_no_primary_term?: boolean
|
||||
q?: string
|
||||
size?: integer
|
||||
from?: integer
|
||||
sort?: string | string[]
|
||||
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
|
||||
body?: {
|
||||
aggs?: Record<string, AggregationsAggregationContainer>
|
||||
allow_no_indices?: boolean
|
||||
allow_partial_search_results?: boolean
|
||||
analyzer?: string
|
||||
analyze_wildcard?: boolean
|
||||
aggregations?: Record<string, AggregationsAggregationContainer>
|
||||
collapse?: SearchFieldCollapse
|
||||
default_operator?: DefaultOperator
|
||||
df?: string
|
||||
docvalue_fields?: Fields
|
||||
expand_wildcards?: ExpandWildcards
|
||||
explain?: boolean
|
||||
from?: integer
|
||||
highlight?: SearchHighlight
|
||||
ignore_throttled?: boolean
|
||||
ignore_unavailable?: boolean
|
||||
track_total_hits?: boolean | integer
|
||||
indices_boost?: Record<IndexName, double>[]
|
||||
keep_alive?: Time
|
||||
lenient?: boolean
|
||||
max_concurrent_shard_requests?: long
|
||||
docvalue_fields?: SearchDocValueField | (Field | SearchDocValueField)[]
|
||||
min_score?: double
|
||||
post_filter?: QueryDslQueryContainer
|
||||
preference?: string
|
||||
profile?: boolean
|
||||
pit?: SearchPointInTimeReference
|
||||
query?: QueryDslQueryContainer
|
||||
request_cache?: boolean
|
||||
rescore?: SearchRescore[]
|
||||
routing?: Routing
|
||||
rescore?: SearchRescore | SearchRescore[]
|
||||
script_fields?: Record<string, ScriptField>
|
||||
search_after?: SearchSortResults
|
||||
search_type?: SearchType
|
||||
sequence_number_primary_term?: boolean
|
||||
size?: integer
|
||||
slice?: SlicedScroll
|
||||
sort?: SearchSort
|
||||
_source?: boolean | SearchSourceFilter
|
||||
stats?: string[]
|
||||
stored_fields?: Fields
|
||||
suggest?: Record<string, SearchSuggestContainer>
|
||||
suggest_field?: Field
|
||||
suggest_mode?: SuggestMode
|
||||
suggest_size?: long
|
||||
suggest_text?: string
|
||||
_source?: boolean | Fields | SearchSourceFilter
|
||||
fields?: (Field | DateField)[]
|
||||
suggest?: SearchSuggestContainer | Record<string, SearchSuggestContainer>
|
||||
terminate_after?: long
|
||||
timeout?: string
|
||||
track_scores?: boolean
|
||||
track_total_hits?: boolean
|
||||
version?: boolean
|
||||
fields?: (Field | DateField)[]
|
||||
seq_no_primary_term?: boolean
|
||||
stored_fields?: Fields
|
||||
pit?: SearchPointInTimeReference
|
||||
runtime_mappings?: MappingRuntimeFields
|
||||
stats?: string[]
|
||||
}
|
||||
}
|
||||
|
||||
@ -8983,7 +8996,7 @@ export interface IndicesGetFieldMappingResponse extends DictionaryResponseBase<I
|
||||
}
|
||||
|
||||
export interface IndicesGetFieldMappingTypeFieldMappings {
|
||||
mappings: Record<Field, MappingFieldMapping>
|
||||
mappings: Partial<Record<Field, MappingFieldMapping>>
|
||||
}
|
||||
|
||||
export interface IndicesGetIndexTemplateIndexTemplate {
|
||||
@ -9704,8 +9717,36 @@ export interface IndicesUnfreezeResponse extends AcknowledgedResponseBase {
|
||||
shards_acknowledged: boolean
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesIndicesUpdateAliasBulk {
|
||||
[key: string]: never
|
||||
export interface IndicesUpdateAliasesAction {
|
||||
add?: IndicesUpdateAliasesAddAction
|
||||
remove?: IndicesUpdateAliasesRemoveAction
|
||||
remove_index?: IndicesUpdateAliasesRemoveIndexAction
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesAddAction {
|
||||
alias?: IndexAlias
|
||||
aliases?: IndexAlias | IndexAlias[]
|
||||
filter?: QueryDslQueryContainer
|
||||
index?: IndexName
|
||||
indices?: Indices
|
||||
index_routing?: Routing
|
||||
is_hidden?: boolean
|
||||
is_write_index?: boolean
|
||||
routing?: Routing
|
||||
search_routing?: Routing
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesRemoveAction {
|
||||
alias?: IndexAlias
|
||||
aliases?: IndexAlias | IndexAlias[]
|
||||
index?: IndexName
|
||||
indices?: Indices
|
||||
must_exist?: boolean
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesRemoveIndexAction {
|
||||
index?: IndexName
|
||||
indices?: Indices
|
||||
}
|
||||
|
||||
export interface IndicesUpdateAliasesRequest extends RequestBase {
|
||||
@ -9713,7 +9754,7 @@ export interface IndicesUpdateAliasesRequest extends RequestBase {
|
||||
timeout?: Time
|
||||
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
|
||||
body?: {
|
||||
actions?: IndicesUpdateAliasesIndicesUpdateAliasBulk[]
|
||||
actions?: IndicesUpdateAliasesAction[]
|
||||
}
|
||||
}
|
||||
|
||||
@ -11434,6 +11475,7 @@ export interface MlForecastRequest extends RequestBase {
|
||||
body?: {
|
||||
duration?: Time
|
||||
expires_in?: Time
|
||||
max_model_memory?: string
|
||||
}
|
||||
}
|
||||
|
||||
@ -15631,7 +15673,7 @@ export interface XpackUsageKibanaUrlConfig extends XpackUsageBaseUrlConfig {
|
||||
|
||||
export interface XpackUsageMachineLearning extends XpackUsageBase {
|
||||
datafeeds: Record<string, XpackUsageDatafeed>
|
||||
jobs: Record<string, MlJob> | Record<string, XpackUsageAllJobs>
|
||||
jobs: Record<string, MlJob> | Partial<Record<string, XpackUsageAllJobs>>
|
||||
node_count: integer
|
||||
data_frame_analytics_jobs: XpackUsageMlDataFrameAnalyticsJobs
|
||||
inference: XpackUsageMlInference
|
||||
@ -15879,6 +15921,10 @@ export interface XpackUsageWatcherWatchTriggerSchedule extends XpackUsageCounter
|
||||
_all: XpackUsageCounter
|
||||
}
|
||||
|
||||
export interface SpecUtilsAdditionalProperty<TKey = unknown, TValue = unknown> {
|
||||
[key: string]: never
|
||||
}
|
||||
|
||||
export interface SpecUtilsAdditionalProperties<TKey = unknown, TValue = unknown> {
|
||||
[key: string]: never
|
||||
}
|
||||
@ -15891,10 +15937,6 @@ export interface SpecUtilsCommonQueryParameters {
|
||||
source_query_string?: string
|
||||
}
|
||||
|
||||
export interface SpecUtilsAdditionalProperty<TKey = unknown, TValue = unknown> {
|
||||
[key: string]: never
|
||||
}
|
||||
|
||||
export interface SpecUtilsCommonCatQueryParameters {
|
||||
format?: string
|
||||
h?: Names
|
||||
|
||||
@ -821,6 +821,7 @@ export default class Helpers {
|
||||
for (let i = 0, len = items.length; i < len; i++) {
|
||||
const action = items[i]
|
||||
const operation = Object.keys(action)[0]
|
||||
// @ts-expect-error
|
||||
const responseItem = action[operation as keyof T.BulkResponseItemContainer]
|
||||
assert(responseItem !== undefined, 'The responseItem is undefined, please file a bug report')
|
||||
const indexSlice = operation !== 'delete' ? i * 2 : i
|
||||
@ -838,7 +839,6 @@ export default class Helpers {
|
||||
} else {
|
||||
onDrop({
|
||||
status: responseItem.status,
|
||||
// @ts-expect-error
|
||||
error: responseItem.error ?? null,
|
||||
operation: serializer.deserialize(bulkBody[indexSlice]),
|
||||
document: operation !== 'delete'
|
||||
|
||||
@ -88,6 +88,7 @@ function isXPackTemplate (name) {
|
||||
case '.deprecation-indexing-mappings':
|
||||
case '.deprecation-indexing-settings':
|
||||
case 'data-streams-mappings':
|
||||
case '.logs-deprecation.elasticsearch-default':
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
@ -103,7 +103,7 @@ function build (opts = {}) {
|
||||
|
||||
if (isXPack) {
|
||||
// clean data streams
|
||||
await client.indices.deleteDataStream({ name: '*' })
|
||||
await client.indices.deleteDataStream({ name: '*', expand_wildcards: 'all' })
|
||||
}
|
||||
|
||||
// clean all indices
|
||||
|
||||
136
test/unit/api.test.ts
Normal file
136
test/unit/api.test.ts
Normal file
@ -0,0 +1,136 @@
|
||||
/*
|
||||
* Licensed to Elasticsearch B.V. under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch B.V. licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { test } from 'tap'
|
||||
import { connection } from '../utils'
|
||||
import { Client } from '../..'
|
||||
|
||||
test('Api without body key and top level body', async t => {
|
||||
t.plan(2)
|
||||
|
||||
const Connection = connection.buildMockConnection({
|
||||
onRequest (opts) {
|
||||
// @ts-expect-error
|
||||
t.same(JSON.parse(opts.body), { query: { match_all: {} } })
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: { took: 42 }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const client = new Client({
|
||||
node: 'http://localhost:9200',
|
||||
Connection
|
||||
})
|
||||
|
||||
const response = await client.search({
|
||||
index: 'test',
|
||||
allow_no_indices: true,
|
||||
query: { match_all: {} }
|
||||
})
|
||||
|
||||
t.equal(response.took, 42)
|
||||
})
|
||||
|
||||
test('Api with body key and top level body', async t => {
|
||||
t.plan(2)
|
||||
|
||||
const Connection = connection.buildMockConnection({
|
||||
onRequest (opts) {
|
||||
// @ts-expect-error
|
||||
t.same(JSON.parse(opts.body), { query: { match_all: {} } })
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: { took: 42 }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const client = new Client({
|
||||
node: 'http://localhost:9200',
|
||||
Connection
|
||||
})
|
||||
|
||||
const response = await client.search({
|
||||
index: 'test',
|
||||
allow_no_indices: true,
|
||||
body: {
|
||||
query: { match_all: {} }
|
||||
}
|
||||
})
|
||||
|
||||
t.equal(response.took, 42)
|
||||
})
|
||||
|
||||
test('Api without body key and keyed body', async t => {
|
||||
t.plan(2)
|
||||
|
||||
const Connection = connection.buildMockConnection({
|
||||
onRequest (opts) {
|
||||
// @ts-expect-error
|
||||
t.same(JSON.parse(opts.body), { foo: 'bar' })
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: { result: 'created' }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const client = new Client({
|
||||
node: 'http://localhost:9200',
|
||||
Connection
|
||||
})
|
||||
|
||||
const response = await client.create({
|
||||
index: 'test',
|
||||
id: '1',
|
||||
document: { foo: 'bar' }
|
||||
})
|
||||
|
||||
t.equal(response.result, 'created')
|
||||
})
|
||||
|
||||
test('Api with body key and keyed body', async t => {
|
||||
t.plan(2)
|
||||
|
||||
const Connection = connection.buildMockConnection({
|
||||
onRequest (opts) {
|
||||
// @ts-expect-error
|
||||
t.same(JSON.parse(opts.body), { foo: 'bar' })
|
||||
return {
|
||||
statusCode: 200,
|
||||
body: { result: 'created' }
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const client = new Client({
|
||||
node: 'http://localhost:9200',
|
||||
Connection
|
||||
})
|
||||
|
||||
const response = await client.create({
|
||||
index: 'test',
|
||||
id: '1',
|
||||
body: { foo: 'bar' }
|
||||
})
|
||||
|
||||
t.equal(response.result, 'created')
|
||||
})
|
||||
@ -297,7 +297,7 @@ test('Scroll search documents', async t => {
|
||||
t.equal(params.querystring, 'filter_path=hits.hits._source%2C_scroll_id&scroll=1m')
|
||||
} else {
|
||||
if (params.method !== 'DELETE') {
|
||||
t.equal(params.body, '{"scroll":"1m","scroll_id":"id"}')
|
||||
t.equal(params.querystring, 'scroll=1m&scroll_id=id')
|
||||
}
|
||||
}
|
||||
return {
|
||||
@ -381,7 +381,7 @@ test('Fix querystring for scroll search', async t => {
|
||||
const MockConnection = connection.buildMockConnection({
|
||||
onRequest (params) {
|
||||
if (count === 0) {
|
||||
t.equal(params.querystring, 'scroll=1m')
|
||||
t.equal(params.querystring, 'size=1&scroll=1m')
|
||||
} else {
|
||||
if (params.method !== 'DELETE') {
|
||||
if (params.method === 'POST') {
|
||||
|
||||
Reference in New Issue
Block a user