API generation

This commit is contained in:
delvedor
2020-07-20 14:10:27 +02:00
parent e0fc57766d
commit 3673255959

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;
@ -18,7 +17,7 @@ export interface Bulk<T = RequestNDBody> extends Generic {
index?: string;
type?: string;
wait_for_active_shards?: string;
refresh?: 'true' | 'false' | 'wait_for';
refresh?: 'wait_for' | boolean;
routing?: string;
timeout?: string;
_source?: string | string[];
@ -388,7 +387,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;
@ -419,7 +418,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;
@ -586,7 +585,7 @@ export interface Index<T = RequestBody> extends Generic {
type?: 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;
@ -1412,7 +1411,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;
@ -2283,7 +2282,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;
}
@ -2301,39 +2300,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 {
@ -2385,25 +2384,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;
}