Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Request and Response types into interfaces #944

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions api/_core/bulk.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Core_Bulk from '../_types/_core.bulk'
import * as Core_Search from '../_types/_core.search'
import * as Global from '../_types/_global'

export type Bulk_Request = Global.Params & {
export interface Bulk_Request extends Global.Params {
_source?: Core_Search.SourceConfigParam;
_source_excludes?: Common.Fields;
_source_includes?: Common.Fields;
Expand All @@ -37,7 +37,7 @@ export type Bulk_Request = Global.Params & {

export type Bulk_RequestBody = Core_Bulk.OperationContainer | Core_Bulk.UpdateAction | Record<string, any>[]

export type Bulk_Response = ApiResponse & {
export interface Bulk_Response extends ApiResponse {
body: Bulk_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/bulkStream.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Core_Bulk from '../_types/_core.bulk'
import * as Core_Search from '../_types/_core.search'
import * as Global from '../_types/_global'

export type BulkStream_Request = Global.Params & {
export interface BulkStream_Request extends Global.Params {
_source?: Core_Search.SourceConfigParam;
_source_excludes?: Common.Fields;
_source_includes?: Common.Fields;
Expand All @@ -39,7 +39,7 @@ export type BulkStream_Request = Global.Params & {

export type BulkStream_RequestBody = Core_Bulk.OperationContainer | Core_Bulk.UpdateAction | Record<string, any>[]

export type BulkStream_Response = ApiResponse & {
export interface BulkStream_Response extends ApiResponse {
body: BulkStream_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/clearScroll.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport'
import * as Common from '../_types/_common'
import * as Global from '../_types/_global'

export type ClearScroll_Request = Global.Params & {
export interface ClearScroll_Request extends Global.Params {
body?: ClearScroll_RequestBody;
scroll_id?: Common.ScrollIds;
}
Expand All @@ -27,7 +27,7 @@ export type ClearScroll_RequestBody = {
scroll_id?: Common.ScrollIds;
}

export type ClearScroll_Response = ApiResponse & {
export interface ClearScroll_Response extends ApiResponse {
body: ClearScroll_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/count.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as Common from '../_types/_common'
import * as Common_QueryDsl from '../_types/_common.query_dsl'
import * as Global from '../_types/_global'

export type Count_Request = Global.Params & {
export interface Count_Request extends Global.Params {
allow_no_indices?: boolean;
analyze_wildcard?: boolean;
analyzer?: string;
Expand All @@ -42,7 +42,7 @@ export type Count_RequestBody = {
query?: Common_QueryDsl.QueryContainer;
}

export type Count_Response = ApiResponse & {
export interface Count_Response extends ApiResponse {
body: Count_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/create.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport'
import * as Common from '../_types/_common'
import * as Global from '../_types/_global'

export type Create_Request = Global.Params & {
export interface Create_Request extends Global.Params {
body: Create_RequestBody;
id: Common.Id;
index: Common.IndexName;
Expand All @@ -33,7 +33,7 @@ export type Create_Request = Global.Params & {

export type Create_RequestBody = Record<string, any>

export type Create_Response = ApiResponse & {
export interface Create_Response extends ApiResponse {
body: Create_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/createPit.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as Common from '../_types/_common'
import * as Core_Common from '../_types/_core._common'
import * as Global from '../_types/_global'

export type CreatePit_Request = Global.Params & {
export interface CreatePit_Request extends Global.Params {
allow_partial_pit_creation?: boolean;
expand_wildcards?: Common.ExpandWildcards;
index: string[];
Expand All @@ -28,7 +28,7 @@ export type CreatePit_Request = Global.Params & {
routing?: Common.RoutingInQueryString;
}

export type CreatePit_Response = ApiResponse & {
export interface CreatePit_Response extends ApiResponse {
body: CreatePit_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/delete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport'
import * as Common from '../_types/_common'
import * as Global from '../_types/_global'

export type Delete_Request = Global.Params & {
export interface Delete_Request extends Global.Params {
id: Common.Id;
if_primary_term?: number;
if_seq_no?: Common.SequenceNumber;
Expand All @@ -31,7 +31,7 @@ export type Delete_Request = Global.Params & {
wait_for_active_shards?: Common.WaitForActiveShards;
}

export type Delete_Response = ApiResponse & {
export interface Delete_Response extends ApiResponse {
body: Delete_ResponseBody;
}

Expand Down
2 changes: 1 addition & 1 deletion api/_core/deleteAllPits.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Global from '../_types/_global'

export type DeleteAllPits_Request = Global.Params & Record<string, any>

export type DeleteAllPits_Response = ApiResponse & {
export interface DeleteAllPits_Response extends ApiResponse {
body: DeleteAllPits_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/deleteByQuery.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as Common from '../_types/_common'
import * as Common_QueryDsl from '../_types/_common.query_dsl'
import * as Global from '../_types/_global'

export type DeleteByQuery_Request = Global.Params & {
export interface DeleteByQuery_Request extends Global.Params {
_source?: string[];
_source_excludes?: string[];
_source_includes?: string[];
Expand Down Expand Up @@ -63,7 +63,7 @@ export type DeleteByQuery_RequestBody = {
slice?: Common.SlicedScroll;
}

export type DeleteByQuery_Response = ApiResponse & {
export interface DeleteByQuery_Response extends ApiResponse {
body: DeleteByQuery_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/deleteByQueryRethrottle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import * as Common from '../_types/_common'
import * as Global from '../_types/_global'
import * as Tasks_Common from '../_types/tasks._common'

export type DeleteByQueryRethrottle_Request = Global.Params & {
export interface DeleteByQueryRethrottle_Request extends Global.Params {
requests_per_second?: number;
task_id: Common.TaskId;
}

export type DeleteByQueryRethrottle_Response = ApiResponse & {
export interface DeleteByQueryRethrottle_Response extends ApiResponse {
body: DeleteByQueryRethrottle_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/deletePit.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ import { ApiResponse } from '../../lib/Transport'
import * as Core_Common from '../_types/_core._common'
import * as Global from '../_types/_global'

export type DeletePit_Request = Global.Params & {
export interface DeletePit_Request extends Global.Params {
body?: DeletePit_RequestBody;
}

export type DeletePit_RequestBody = {
pit_id: string[];
}

export type DeletePit_Response = ApiResponse & {
export interface DeletePit_Response extends ApiResponse {
body: DeletePit_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/deleteScript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ import { ApiResponse } from '../../lib/Transport'
import * as Common from '../_types/_common'
import * as Global from '../_types/_global'

export type DeleteScript_Request = Global.Params & {
export interface DeleteScript_Request extends Global.Params {
cluster_manager_timeout?: Common.Duration;
id: Common.Id;
master_timeout?: Common.Duration;
timeout?: Common.Duration;
}

export type DeleteScript_Response = ApiResponse & {
export interface DeleteScript_Response extends ApiResponse {
body: DeleteScript_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/exists.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as Common from '../_types/_common'
import * as Core_Search from '../_types/_core.search'
import * as Global from '../_types/_global'

export type Exists_Request = Global.Params & {
export interface Exists_Request extends Global.Params {
_source?: Core_Search.SourceConfigParam;
_source_excludes?: Common.Fields;
_source_includes?: Common.Fields;
Expand All @@ -34,7 +34,7 @@ export type Exists_Request = Global.Params & {
version_type?: Common.VersionType;
}

export type Exists_Response = ApiResponse & {
export interface Exists_Response extends ApiResponse {
body: Exists_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/existsSource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as Common from '../_types/_common'
import * as Core_Search from '../_types/_core.search'
import * as Global from '../_types/_global'

export type ExistsSource_Request = Global.Params & {
export interface ExistsSource_Request extends Global.Params {
_source?: Core_Search.SourceConfigParam;
_source_excludes?: Common.Fields;
_source_includes?: Common.Fields;
Expand All @@ -33,7 +33,7 @@ export type ExistsSource_Request = Global.Params & {
version_type?: Common.VersionType;
}

export type ExistsSource_Response = ApiResponse & {
export interface ExistsSource_Response extends ApiResponse {
body: ExistsSource_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/explain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as Core_Explain from '../_types/_core.explain'
import * as Core_Search from '../_types/_core.search'
import * as Global from '../_types/_global'

export type Explain_Request = Global.Params & {
export interface Explain_Request extends Global.Params {
_source?: Core_Search.SourceConfigParam;
_source_excludes?: Common.Fields;
_source_includes?: Common.Fields;
Expand All @@ -43,7 +43,7 @@ export type Explain_RequestBody = {
query?: Common_QueryDsl.QueryContainer;
}

export type Explain_Response = ApiResponse & {
export interface Explain_Response extends ApiResponse {
body: Explain_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/fieldCaps.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Common_QueryDsl from '../_types/_common.query_dsl'
import * as Core_FieldCaps from '../_types/_core.field_caps'
import * as Global from '../_types/_global'

export type FieldCaps_Request = Global.Params & {
export interface FieldCaps_Request extends Global.Params {
allow_no_indices?: boolean;
body?: FieldCaps_RequestBody;
expand_wildcards?: Common.ExpandWildcards;
Expand All @@ -35,7 +35,7 @@ export type FieldCaps_RequestBody = {
index_filter?: Common_QueryDsl.QueryContainer;
}

export type FieldCaps_Response = ApiResponse & {
export interface FieldCaps_Response extends ApiResponse {
body: FieldCaps_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/get.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Core_Get from '../_types/_core.get'
import * as Core_Search from '../_types/_core.search'
import * as Global from '../_types/_global'

export type Get_Request = Global.Params & {
export interface Get_Request extends Global.Params {
_source?: Core_Search.SourceConfigParam;
_source_excludes?: Common.Fields;
_source_includes?: Common.Fields;
Expand All @@ -35,7 +35,7 @@ export type Get_Request = Global.Params & {
version_type?: Common.VersionType;
}

export type Get_Response = ApiResponse & {
export interface Get_Response extends ApiResponse {
body: Get_ResponseBody;
}

Expand Down
2 changes: 1 addition & 1 deletion api/_core/getAllPits.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Global from '../_types/_global'

export type GetAllPits_Request = Global.Params & Record<string, any>

export type GetAllPits_Response = ApiResponse & {
export interface GetAllPits_Response extends ApiResponse {
body: GetAllPits_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/getScript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ import { ApiResponse } from '../../lib/Transport'
import * as Common from '../_types/_common'
import * as Global from '../_types/_global'

export type GetScript_Request = Global.Params & {
export interface GetScript_Request extends Global.Params {
cluster_manager_timeout?: Common.Duration;
id: Common.Id;
master_timeout?: Common.Duration;
}

export type GetScript_Response = ApiResponse & {
export interface GetScript_Response extends ApiResponse {
body: GetScript_ResponseBody;
}

Expand Down
2 changes: 1 addition & 1 deletion api/_core/getScriptContext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Global from '../_types/_global'

export type GetScriptContext_Request = Global.Params & Record<string, any>

export type GetScriptContext_Response = ApiResponse & {
export interface GetScriptContext_Response extends ApiResponse {
body: GetScriptContext_ResponseBody;
}

Expand Down
2 changes: 1 addition & 1 deletion api/_core/getScriptLanguages.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Global from '../_types/_global'

export type GetScriptLanguages_Request = Global.Params & Record<string, any>

export type GetScriptLanguages_Response = ApiResponse & {
export interface GetScriptLanguages_Response extends ApiResponse {
body: GetScriptLanguages_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/getSource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import * as Common from '../_types/_common'
import * as Core_Search from '../_types/_core.search'
import * as Global from '../_types/_global'

export type GetSource_Request = Global.Params & {
export interface GetSource_Request extends Global.Params {
_source?: Core_Search.SourceConfigParam;
_source_excludes?: Common.Fields;
_source_includes?: Common.Fields;
Expand All @@ -33,7 +33,7 @@ export type GetSource_Request = Global.Params & {
version_type?: Common.VersionType;
}

export type GetSource_Response = ApiResponse & {
export interface GetSource_Response extends ApiResponse {
body: GetSource_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { ApiResponse } from '../../lib/Transport'
import * as Common from '../_types/_common'
import * as Global from '../_types/_global'

export type Index_Request = Global.Params & {
export interface Index_Request extends Global.Params {
body: Index_RequestBody;
id?: Common.Id;
if_primary_term?: number;
Expand All @@ -37,7 +37,7 @@ export type Index_Request = Global.Params & {

export type Index_RequestBody = Record<string, any>

export type Index_Response = ApiResponse & {
export interface Index_Response extends ApiResponse {
body: Index_ResponseBody;
}

Expand Down
2 changes: 1 addition & 1 deletion api/_core/info.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Global from '../_types/_global'

export type Info_Request = Global.Params & Record<string, any>

export type Info_Response = ApiResponse & {
export interface Info_Response extends ApiResponse {
body: Info_ResponseBody;
}

Expand Down
4 changes: 2 additions & 2 deletions api/_core/mget.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as Core_Mget from '../_types/_core.mget'
import * as Core_Search from '../_types/_core.search'
import * as Global from '../_types/_global'

export type Mget_Request = Global.Params & {
export interface Mget_Request extends Global.Params {
_source?: Core_Search.SourceConfigParam;
_source_excludes?: Common.Fields;
_source_includes?: Common.Fields;
Expand All @@ -38,7 +38,7 @@ export type Mget_RequestBody = {
ids?: Common.Ids;
}

export type Mget_Response = ApiResponse & {
export interface Mget_Response extends ApiResponse {
body: Mget_ResponseBody;
}

Expand Down
Loading
Loading