1010from hyperspell import Hyperspell , AsyncHyperspell
1111from tests .utils import assert_matches_type
1212from hyperspell .types import (
13- Query ,
1413 Memory ,
1514 MemoryStatus ,
1615 MemoryDeleteResponse ,
1716 MemoryStatusResponse ,
1817)
1918from hyperspell ._utils import parse_datetime
2019from hyperspell .pagination import SyncCursorPage , AsyncCursorPage
20+ from hyperspell .types .shared import QueryResult
2121
2222base_url = os .environ .get ("TEST_API_BASE_URL" , "http://127.0.0.1:4010" )
2323
@@ -191,7 +191,7 @@ def test_method_search(self, client: Hyperspell) -> None:
191191 memory = client .memories .search (
192192 query = "query" ,
193193 )
194- assert_matches_type (Query , memory , path = ["response" ])
194+ assert_matches_type (QueryResult , memory , path = ["response" ])
195195
196196 @parametrize
197197 def test_method_search_with_all_params (self , client : Hyperspell ) -> None :
@@ -265,7 +265,7 @@ def test_method_search_with_all_params(self, client: Hyperspell) -> None:
265265 },
266266 sources = ["collections" ],
267267 )
268- assert_matches_type (Query , memory , path = ["response" ])
268+ assert_matches_type (QueryResult , memory , path = ["response" ])
269269
270270 @parametrize
271271 def test_raw_response_search (self , client : Hyperspell ) -> None :
@@ -276,7 +276,7 @@ def test_raw_response_search(self, client: Hyperspell) -> None:
276276 assert response .is_closed is True
277277 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
278278 memory = response .parse ()
279- assert_matches_type (Query , memory , path = ["response" ])
279+ assert_matches_type (QueryResult , memory , path = ["response" ])
280280
281281 @parametrize
282282 def test_streaming_response_search (self , client : Hyperspell ) -> None :
@@ -287,7 +287,7 @@ def test_streaming_response_search(self, client: Hyperspell) -> None:
287287 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
288288
289289 memory = response .parse ()
290- assert_matches_type (Query , memory , path = ["response" ])
290+ assert_matches_type (QueryResult , memory , path = ["response" ])
291291
292292 assert cast (Any , response .is_closed ) is True
293293
@@ -527,7 +527,7 @@ async def test_method_search(self, async_client: AsyncHyperspell) -> None:
527527 memory = await async_client .memories .search (
528528 query = "query" ,
529529 )
530- assert_matches_type (Query , memory , path = ["response" ])
530+ assert_matches_type (QueryResult , memory , path = ["response" ])
531531
532532 @parametrize
533533 async def test_method_search_with_all_params (self , async_client : AsyncHyperspell ) -> None :
@@ -601,7 +601,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncHyperspell
601601 },
602602 sources = ["collections" ],
603603 )
604- assert_matches_type (Query , memory , path = ["response" ])
604+ assert_matches_type (QueryResult , memory , path = ["response" ])
605605
606606 @parametrize
607607 async def test_raw_response_search (self , async_client : AsyncHyperspell ) -> None :
@@ -612,7 +612,7 @@ async def test_raw_response_search(self, async_client: AsyncHyperspell) -> None:
612612 assert response .is_closed is True
613613 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
614614 memory = await response .parse ()
615- assert_matches_type (Query , memory , path = ["response" ])
615+ assert_matches_type (QueryResult , memory , path = ["response" ])
616616
617617 @parametrize
618618 async def test_streaming_response_search (self , async_client : AsyncHyperspell ) -> None :
@@ -623,7 +623,7 @@ async def test_streaming_response_search(self, async_client: AsyncHyperspell) ->
623623 assert response .http_request .headers .get ("X-Stainless-Lang" ) == "python"
624624
625625 memory = await response .parse ()
626- assert_matches_type (Query , memory , path = ["response" ])
626+ assert_matches_type (QueryResult , memory , path = ["response" ])
627627
628628 assert cast (Any , response .is_closed ) is True
629629
0 commit comments