API generation
This commit is contained in:
@ -114,7 +114,7 @@ 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 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 acceptedBody: string[] = ['aggs', 'aggregations', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
@ -42,7 +42,7 @@ 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 acceptedBody: string[] = ['query', 'slice']
|
||||
const acceptedBody: string[] = ['max_docs', 'query', 'slice']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
@ -114,7 +114,7 @@ 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 acceptedBody: string[] = ['query', 'case_sensitive', 'event_category_field', 'tiebreaker_field', 'timestamp_field', 'fetch_size', 'filter', 'size', 'fields', 'result_position']
|
||||
const acceptedBody: string[] = ['query', 'case_sensitive', 'event_category_field', 'tiebreaker_field', 'timestamp_field', 'fetch_size', 'filter', 'keep_alive', 'keep_on_completion', 'wait_for_completion_timeout', 'size', 'fields', 'result_position']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
@ -1082,7 +1082,7 @@ export default class Indices {
|
||||
async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptions): Promise<T.IndicesPutTemplateResponse>
|
||||
async putTemplate (this: That, params: T.IndicesPutTemplateRequest | TB.IndicesPutTemplateRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['name']
|
||||
const acceptedBody: string[] = ['aliases', 'index_patterns', 'mappings', 'settings', 'version']
|
||||
const acceptedBody: string[] = ['aliases', 'index_patterns', 'mappings', 'order', 'settings', 'version']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
@ -497,7 +497,7 @@ export default class Ml {
|
||||
async getBuckets (this: That, params: T.MlGetBucketsRequest | TB.MlGetBucketsRequest, options?: TransportRequestOptions): Promise<T.MlGetBucketsResponse>
|
||||
async getBuckets (this: That, params: T.MlGetBucketsRequest | TB.MlGetBucketsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['job_id', 'timestamp']
|
||||
const acceptedBody: string[] = ['anomaly_score', 'expand', 'page']
|
||||
const acceptedBody: string[] = ['anomaly_score', 'desc', 'exclude_interim', 'expand', 'page', 'sort', 'start', 'end']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
@ -920,7 +920,7 @@ export default class Ml {
|
||||
async getRecords (this: That, params: T.MlGetRecordsRequest | TB.MlGetRecordsRequest, options?: TransportRequestOptions): Promise<T.MlGetRecordsResponse>
|
||||
async getRecords (this: That, params: T.MlGetRecordsRequest | TB.MlGetRecordsRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['job_id']
|
||||
const acceptedBody: string[] = ['desc', 'page', 'record_score', 'sort']
|
||||
const acceptedBody: string[] = ['desc', 'exclude_interim', 'page', 'record_score', 'sort', 'start', 'end']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
@ -1581,7 +1581,7 @@ export default class Ml {
|
||||
async startDatafeed (this: That, params: T.MlStartDatafeedRequest | TB.MlStartDatafeedRequest, options?: TransportRequestOptions): Promise<T.MlStartDatafeedResponse>
|
||||
async startDatafeed (this: That, params: T.MlStartDatafeedRequest | TB.MlStartDatafeedRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['datafeed_id']
|
||||
const acceptedBody: string[] = ['end', 'timeout']
|
||||
const acceptedBody: string[] = ['end', 'start', 'timeout']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
@ -1653,7 +1653,7 @@ export default class Ml {
|
||||
async stopDatafeed (this: That, params: T.MlStopDatafeedRequest | TB.MlStopDatafeedRequest, options?: TransportRequestOptions): Promise<T.MlStopDatafeedResponse>
|
||||
async stopDatafeed (this: That, params: T.MlStopDatafeedRequest | TB.MlStopDatafeedRequest, options?: TransportRequestOptions): Promise<any> {
|
||||
const acceptedPath: string[] = ['datafeed_id']
|
||||
const acceptedBody: string[] = ['timeout']
|
||||
const acceptedBody: string[] = ['force', 'timeout']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
@ -42,7 +42,7 @@ 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 acceptedBody: string[] = ['docs']
|
||||
const acceptedBody: string[] = ['docs', 'ids']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
@ -42,7 +42,7 @@ 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 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 acceptedBody: string[] = ['aggs', 'aggregations', 'collapse', 'explain', 'from', 'highlight', 'track_total_hits', 'indices_boost', 'docvalue_fields', 'min_score', 'post_filter', 'profile', 'query', 'rescore', 'script_fields', 'search_after', 'size', 'slice', 'sort', '_source', 'fields', 'suggest', 'terminate_after', 'timeout', 'track_scores', 'version', 'seq_no_primary_term', 'stored_fields', 'pit', 'runtime_mappings', 'stats']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
@ -42,7 +42,7 @@ 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 acceptedBody: string[] = ['aggs', 'fields', 'query', 'runtime_mappings', 'sort']
|
||||
const acceptedBody: string[] = ['aggs', 'exact_bounds', 'extent', 'fields', 'grid_precision', 'grid_type', 'query', 'runtime_mappings', 'size', 'sort']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
@ -42,7 +42,7 @@ 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 acceptedBody: string[] = ['id', 'params', 'source']
|
||||
const acceptedBody: string[] = ['explain', 'id', 'params', 'profile', 'source']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params?.body ?? undefined
|
||||
|
||||
@ -42,7 +42,7 @@ 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 acceptedBody: string[] = ['detect_noop', 'doc', 'doc_as_upsert', 'script', 'scripted_upsert', 'upsert']
|
||||
const acceptedBody: string[] = ['detect_noop', 'doc', 'doc_as_upsert', 'script', 'scripted_upsert', '_source', 'upsert']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
@ -42,7 +42,7 @@ 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 acceptedBody: string[] = ['max_docs', 'query', 'script', 'slice']
|
||||
const acceptedBody: string[] = ['max_docs', 'query', 'script', 'slice', 'conflicts']
|
||||
const querystring: Record<string, any> = {}
|
||||
// @ts-expect-error
|
||||
let body: Record<string, any> = params.body ?? undefined
|
||||
|
||||
Reference in New Issue
Block a user