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 { export interface Generic {
method?: string; method?: string;
ignore?: number | number[];
filter_path?: string | string[]; filter_path?: string | string[];
pretty?: boolean; pretty?: boolean;
human?: boolean; human?: boolean;
@ -18,7 +17,7 @@ export interface Bulk<T = RequestNDBody> extends Generic {
index?: string; index?: string;
type?: string; type?: string;
wait_for_active_shards?: string; wait_for_active_shards?: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
routing?: string; routing?: string;
timeout?: string; timeout?: string;
_source?: string | string[]; _source?: string | string[];
@ -388,7 +387,7 @@ export interface Create<T = RequestBody> extends Generic {
index: string; index: string;
type?: string; type?: string;
wait_for_active_shards?: string; wait_for_active_shards?: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
routing?: string; routing?: string;
timeout?: string; timeout?: string;
version?: number; version?: number;
@ -419,7 +418,7 @@ export interface Delete extends Generic {
index: string; index: string;
type?: string; type?: string;
wait_for_active_shards?: string; wait_for_active_shards?: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
routing?: string; routing?: string;
timeout?: string; timeout?: string;
if_seq_no?: number; if_seq_no?: number;
@ -586,7 +585,7 @@ export interface Index<T = RequestBody> extends Generic {
type?: string; type?: string;
wait_for_active_shards?: string; wait_for_active_shards?: string;
op_type?: 'index' | 'create'; op_type?: 'index' | 'create';
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
routing?: string; routing?: string;
timeout?: string; timeout?: string;
version?: number; version?: number;
@ -1412,7 +1411,7 @@ export interface Update<T = RequestBody> extends Generic {
_source_excludes?: string | string[]; _source_excludes?: string | string[];
_source_includes?: string | string[]; _source_includes?: string | string[];
lang?: string; lang?: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
retry_on_conflict?: number; retry_on_conflict?: number;
routing?: string; routing?: string;
timeout?: string; timeout?: string;
@ -2283,7 +2282,7 @@ export interface SecurityAuthenticate extends Generic {
export interface SecurityChangePassword<T = RequestBody> extends Generic { export interface SecurityChangePassword<T = RequestBody> extends Generic {
username?: string; username?: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
body: T; body: T;
} }
@ -2301,39 +2300,39 @@ export interface SecurityClearCachedRoles extends Generic {
} }
export interface SecurityCreateApiKey<T = RequestBody> extends Generic { export interface SecurityCreateApiKey<T = RequestBody> extends Generic {
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
body: T; body: T;
} }
export interface SecurityDeletePrivileges extends Generic { export interface SecurityDeletePrivileges extends Generic {
application: string; application: string;
name: string; name: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
} }
export interface SecurityDeleteRole extends Generic { export interface SecurityDeleteRole extends Generic {
name: string; name: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
} }
export interface SecurityDeleteRoleMapping extends Generic { export interface SecurityDeleteRoleMapping extends Generic {
name: string; name: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
} }
export interface SecurityDeleteUser extends Generic { export interface SecurityDeleteUser extends Generic {
username: string; username: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
} }
export interface SecurityDisableUser extends Generic { export interface SecurityDisableUser extends Generic {
username: string; username: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
} }
export interface SecurityEnableUser extends Generic { export interface SecurityEnableUser extends Generic {
username: string; username: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
} }
export interface SecurityGetApiKey extends Generic { export interface SecurityGetApiKey extends Generic {
@ -2385,25 +2384,25 @@ export interface SecurityInvalidateToken<T = RequestBody> extends Generic {
} }
export interface SecurityPutPrivileges<T = RequestBody> extends Generic { export interface SecurityPutPrivileges<T = RequestBody> extends Generic {
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
body: T; body: T;
} }
export interface SecurityPutRole<T = RequestBody> extends Generic { export interface SecurityPutRole<T = RequestBody> extends Generic {
name: string; name: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
body: T; body: T;
} }
export interface SecurityPutRoleMapping<T = RequestBody> extends Generic { export interface SecurityPutRoleMapping<T = RequestBody> extends Generic {
name: string; name: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
body: T; body: T;
} }
export interface SecurityPutUser<T = RequestBody> extends Generic { export interface SecurityPutUser<T = RequestBody> extends Generic {
username: string; username: string;
refresh?: 'true' | 'false' | 'wait_for'; refresh?: 'wait_for' | boolean;
body: T; body: T;
} }