diff --git a/clients/ts-sdk/src/functions/chunks/chunk.test.ts b/clients/ts-sdk/src/functions/chunks/chunk.test.ts index 307ab2e8d8..ee0bca8258 100644 --- a/clients/ts-sdk/src/functions/chunks/chunk.test.ts +++ b/clients/ts-sdk/src/functions/chunks/chunk.test.ts @@ -3,11 +3,10 @@ import { TrieveSDK } from "../../sdk"; import { ChunkReturnTypes, CountChunkQueryResponseBody, - RecommendResponseTypes, + RecommendChunksResponseBody, ReturnQueuedChunk, ScrollChunksResponseBody, SearchResponseBody, - SearchResponseTypes, } from "../../types.gen"; import { CHUNK_EXAMPLE_ID, @@ -44,7 +43,7 @@ describe("Chunk Methods Test", async () => { search_type: "fulltext", }); - expectTypeOf(data).toEqualTypeOf(); + expectTypeOf(data).toEqualTypeOf(); }); test("getRecommendedChunks", async () => { @@ -52,7 +51,7 @@ describe("Chunk Methods Test", async () => { positive_chunk_ids: [CHUNK_EXAMPLE_ID], }); - expectTypeOf(data).toEqualTypeOf(); + expectTypeOf(data).toEqualTypeOf(); }); test("ragOnChunk", async () => { diff --git a/clients/ts-sdk/src/functions/chunks/index.ts b/clients/ts-sdk/src/functions/chunks/index.ts index 1d3dfed7c6..c2b5227bc0 100644 --- a/clients/ts-sdk/src/functions/chunks/index.ts +++ b/clients/ts-sdk/src/functions/chunks/index.ts @@ -16,6 +16,7 @@ import { GetChunksData, GetTrackingChunksData, RecommendChunksRequest, + RecommendChunksResponseBody, ScrollChunksReqPayload, SearchChunksReqPayload, SearchResponseBody, @@ -114,7 +115,7 @@ export async function autocomplete( xApiVersion: "V2", }, signal - ); + ) as Promise; } /** @@ -143,7 +144,7 @@ export async function getRecommendedChunks( datasetId: this.datasetId, }, signal - ); + ) as Promise; } /** diff --git a/clients/ts-sdk/src/functions/groups/chunkGroup.test.ts b/clients/ts-sdk/src/functions/groups/chunkGroup.test.ts index ce1a9be252..a69848b366 100644 --- a/clients/ts-sdk/src/functions/groups/chunkGroup.test.ts +++ b/clients/ts-sdk/src/functions/groups/chunkGroup.test.ts @@ -11,9 +11,9 @@ import { GetChunksInGroupResponse, GroupData, GroupsForChunk, - RecommendGroupsResponse, - SearchGroupResponseTypes, - SearchOverGroupsResponseTypes, + RecommendGroupsResponseBody, + SearchOverGroupsResponseBody, + SearchWithinGroupResponseBody, } from "../../types.gen"; import { test } from "../../__tests__/utils"; @@ -37,7 +37,7 @@ describe("Chunk Groups Methods Test", async () => { search_type: "fulltext", }); - expectTypeOf(data).toEqualTypeOf(); + expectTypeOf(data).toEqualTypeOf(); }); test("searchInGroup", async () => { const data = await trieve.searchInGroup({ @@ -46,14 +46,14 @@ describe("Chunk Groups Methods Test", async () => { group_id: GROUP_EXAMPLE_ID, }); - expectTypeOf(data).toEqualTypeOf(); + expectTypeOf(data).toEqualTypeOf(); }); test("recommendedGroups", async () => { const data = await trieve.recommendedGroups({ positive_group_ids: [GROUP_EXAMPLE_ID], }); - expectTypeOf(data).toEqualTypeOf(); + expectTypeOf(data).toEqualTypeOf(); }); test("updateGroup", async () => { const data = await trieve.updateGroup({ diff --git a/clients/ts-sdk/src/functions/groups/index.ts b/clients/ts-sdk/src/functions/groups/index.ts index daeead1b73..b9a312f5df 100644 --- a/clients/ts-sdk/src/functions/groups/index.ts +++ b/clients/ts-sdk/src/functions/groups/index.ts @@ -16,9 +16,12 @@ import { GetGroupsForChunksReqPayload, GetGroupsForDatasetData, RecommendGroupsReqPayload, + RecommendGroupsResponseBody, RemoveChunkFromGroupReqPayload, SearchOverGroupsReqPayload, + SearchOverGroupsResponseBody, SearchWithinGroupReqPayload, + SearchWithinGroupResponseBody, UpdateChunkGroupReqPayload, UpdateGroupByTrackingIDReqPayload, } from "../../fetch-client"; @@ -77,7 +80,7 @@ export async function searchOverGroups( datasetId: this.datasetId, }, signal - ); + ) as Promise; } /** @@ -104,7 +107,7 @@ export async function searchInGroup( datasetId: this.datasetId, }, signal - ); + ) as Promise; } /** @@ -131,7 +134,7 @@ export async function recommendedGroups( datasetId: this.datasetId, }, signal - ); + ) as Promise; } /**