fix: type waitForSearchResults options as SearchMemoryOptions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Soumil Rathi
2026-04-13 13:32:00 -07:00
co-authored by Claude Opus 4.6
parent 2da2ded2d8
commit 015aa2c866
@@ -7,7 +7,7 @@
* All helpers use only the SDK's public API — no internal method access. * All helpers use only the SDK's public API — no internal method access.
*/ */
import { MemoryClient } from "../../mem0"; import { MemoryClient } from "../../mem0";
import type { Memory } from "../../mem0.types"; import type { Memory, SearchMemoryOptions } from "../../mem0.types";
import { NetworkError, RateLimitError } from "../../../common/exceptions"; import { NetworkError, RateLimitError } from "../../../common/exceptions";
// ─── Environment gate ──────────────────────────────────── // ─── Environment gate ────────────────────────────────────
@@ -88,7 +88,7 @@ export async function waitForMemories(
export async function waitForSearchResults( export async function waitForSearchResults(
client: MemoryClient, client: MemoryClient,
query: string, query: string,
options: Record<string, any>, options: SearchMemoryOptions,
maxRetries = 4, maxRetries = 4,
): Promise<Memory[]> { ): Promise<Memory[]> {
for (let attempt = 1; attempt <= maxRetries; attempt++) { for (let attempt = 1; attempt <= maxRetries; attempt++) {