@langchain/langgraph-sdk
Version:
Client library for interacting with the LangGraph API
75 lines (74 loc) • 2.6 kB
TypeScript
import { Item, ListNamespaceResponse, SearchItemsResponse } from "../../schema.js";
import { BaseClient } from "../base.js";
//#region src/client/store/index.d.ts
declare class StoreClient extends BaseClient {
/**
* Store or update an item.
*
* @param namespace A list of strings representing the namespace path.
* @param key The unique identifier for the item within the namespace.
* @param value A dictionary containing the item's data.
* @param options.index Controls search indexing - null (use defaults), false (disable), or list of field paths to index.
* @param options.ttl Optional time-to-live in minutes for the item, or null for no expiration.
* @returns Promise<void>
*/
putItem(namespace: string[], key: string, value: Record<string, unknown>, options?: {
index?: false | string[] | null;
ttl?: number | null;
signal?: AbortSignal;
}): Promise<void>;
/**
* Retrieve a single item.
*
* @param namespace A list of strings representing the namespace path.
* @param key The unique identifier for the item.
* @param options.refreshTtl Whether to refresh the TTL on this read operation.
* @returns Promise<Item>
*/
getItem(namespace: string[], key: string, options?: {
refreshTtl?: boolean | null;
signal?: AbortSignal;
}): Promise<Item | null>;
/**
* Delete an item.
*
* @param namespace A list of strings representing the namespace path.
* @param key The unique identifier for the item.
* @returns Promise<void>
*/
deleteItem(namespace: string[], key: string, options?: {
signal?: AbortSignal;
}): Promise<void>;
/**
* Search for items within a namespace prefix.
*
* @param namespacePrefix List of strings representing the namespace prefix.
* @param options Search options including filter, pagination, and query.
* @returns Promise<SearchItemsResponse>
*/
searchItems(namespacePrefix: string[], options?: {
filter?: Record<string, unknown>;
limit?: number;
offset?: number;
query?: string;
refreshTtl?: boolean | null;
signal?: AbortSignal;
}): Promise<SearchItemsResponse>;
/**
* List namespaces with optional match conditions.
*
* @param options Filtering and pagination options for namespaces.
* @returns Promise<ListNamespaceResponse>
*/
listNamespaces(options?: {
prefix?: string[];
suffix?: string[];
maxDepth?: number;
limit?: number;
offset?: number;
signal?: AbortSignal;
}): Promise<ListNamespaceResponse>;
}
//#endregion
export { StoreClient };
//# sourceMappingURL=index.d.ts.map