API generation

This commit is contained in:
delvedor
2021-04-07 19:23:36 +02:00
parent 1db476f716
commit d6dbaf1ab9
5 changed files with 37 additions and 35 deletions

View File

@ -524,7 +524,9 @@ MlApi.prototype.findFileStructure = function mlFindFileStructureApi (params, opt
let { method, body, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
const path = ''
let path = ''
if (method == null) method = 'POST'
path = '/' + '_ml' + '/' + 'find_file_structure'
// build request object
const request = {
@ -1176,7 +1178,7 @@ MlApi.prototype.postData = function mlPostDataApi (params, options, callback) {
const request = {
method,
path,
body: body || '',
bulkBody: body,
querystring
}

View File

@ -56,7 +56,7 @@ MonitoringApi.prototype.bulk = function monitoringBulkApi (params, options, call
const request = {
method,
path,
bulkBody: body,
body: body || '',
querystring
}

View File

@ -51,7 +51,7 @@ TextStructureApi.prototype.findStructure = function textStructureFindStructureAp
const request = {
method,
path,
body: body || '',
bulkBody: body,
querystring
}

View File

@ -1786,7 +1786,7 @@ export interface MlPostCalendarEvents<T = RequestBody> extends Generic {
body: T;
}
export interface MlPostData<T = RequestBody> extends Generic {
export interface MlPostData<T = RequestNDBody> extends Generic {
job_id: string;
reset_start?: string;
reset_end?: string;
@ -1936,7 +1936,7 @@ export interface MlValidateDetector<T = RequestBody> extends Generic {
body: T;
}
export interface MonitoringBulk<T = RequestNDBody> extends Generic {
export interface MonitoringBulk<T = RequestBody> extends Generic {
type?: string;
system_id?: string;
system_api_version?: string;
@ -2560,7 +2560,7 @@ export interface Termvectors<T = RequestBody> extends Generic {
body?: T;
}
export interface TextStructureFindStructure<T = RequestBody> extends Generic {
export interface TextStructureFindStructure<T = RequestNDBody> extends Generic {
lines_to_sample?: number;
line_merge_size_limit?: number;
timeout?: string;