API generation

This commit is contained in:
delvedor
2020-07-20 14:08:31 +02:00
parent 58117792de
commit 944dee219a

View File

@ -6,7 +6,6 @@ import { RequestBody, RequestNDBody } from '../lib/Transport'
export interface Generic {
method?: string;
ignore?: number | number[];
filter_path?: string | string[];
pretty?: boolean;
human?: boolean;
@ -20,7 +19,7 @@ export interface Bulk<T = RequestNDBody> extends Generic {
_source_exclude?: string | string[];
_source_include?: string | string[];
wait_for_active_shards?: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
routing?: string;
timeout?: string;
_source?: string | string[];
@ -389,7 +388,7 @@ export interface Create<T = RequestBody> extends Generic {
index: string;
type?: string;
wait_for_active_shards?: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
routing?: string;
timeout?: string;
version?: number;
@ -420,7 +419,7 @@ export interface Delete extends Generic {
index: string;
type?: string;
wait_for_active_shards?: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
routing?: string;
timeout?: string;
if_seq_no?: number;
@ -592,7 +591,7 @@ export interface Index<T = RequestBody> extends Generic {
index: string;
wait_for_active_shards?: string;
op_type?: 'index' | 'create';
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
routing?: string;
timeout?: string;
version?: number;
@ -1379,7 +1378,7 @@ export interface Update<T = RequestBody> extends Generic {
_source_excludes?: string | string[];
_source_includes?: string | string[];
lang?: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
retry_on_conflict?: number;
routing?: string;
timeout?: string;
@ -2317,7 +2316,7 @@ export interface SecurityAuthenticate extends Generic {
export interface SecurityChangePassword<T = RequestBody> extends Generic {
username?: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
body: T;
}
@ -2335,39 +2334,39 @@ export interface SecurityClearCachedRoles extends Generic {
}
export interface SecurityCreateApiKey<T = RequestBody> extends Generic {
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
body: T;
}
export interface SecurityDeletePrivileges extends Generic {
application: string;
name: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
}
export interface SecurityDeleteRole extends Generic {
name: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
}
export interface SecurityDeleteRoleMapping extends Generic {
name: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
}
export interface SecurityDeleteUser extends Generic {
username: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
}
export interface SecurityDisableUser extends Generic {
username: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
}
export interface SecurityEnableUser extends Generic {
username: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
}
export interface SecurityGetApiKey extends Generic {
@ -2419,25 +2418,25 @@ export interface SecurityInvalidateToken<T = RequestBody> extends Generic {
}
export interface SecurityPutPrivileges<T = RequestBody> extends Generic {
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
body: T;
}
export interface SecurityPutRole<T = RequestBody> extends Generic {
name: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
body: T;
}
export interface SecurityPutRoleMapping<T = RequestBody> extends Generic {
name: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
body: T;
}
export interface SecurityPutUser<T = RequestBody> extends Generic {
username: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
body: T;
}