Multi-search response type mismatch (`collection_name` missing from `request_params`)
rosslavery opened this issue · 2 comments
rosslavery commented
Description
When making a multi-search request, the response from the server contains collection_name
This is absent from the Typescript types that repurpose the SearchResponse
type which references SearchParams
, which has no collection_name
property.
export interface MultiSearchResponse<T extends DocumentSchema[] = []> {
results: {
[Index in keyof T]: SearchResponse<T[Index]>;
} & {
length: T["length"];
};
}
export interface SearchResponse<T extends DocumentSchema> {
facet_counts?: SearchResponseFacetCountSchema<T>[];
found: number;
out_of: number;
page: number;
request_params: SearchParams | SearchParamsWithPreset;
search_time_ms: number;
hits?: SearchResponseHit<T>[];
grouped_hits?: {
group_key: string[];
hits: SearchResponseHit<T>[];
}[];
}
Expected Behavior
To have the types be correct :D
Actual Behavior
Wrong types!
jasonbosco commented
@rosslavery Could you try with 1.7.2-4
?
rosslavery commented
Resolved in this PR + 1.7.2, closing this out. Thank you!