put(
namespace: string[],
key: string,
value: Record<string, any>,
index: false| Name | Type | Description |
|---|---|---|
namespace* | string[] | |
key* | string | |
value* | Record<string, any> | |
index | false | string[] |
Store or update an item.
Hierarchical path for the item
Unique identifier within the namespace
Object containing the item's data
Optional indexing configuration
// Simple storage
await store.put(["docs"], "report", { title: "Annual Report" });
// With specific field indexing
await store.put(
["docs"],
"report",
{
title: "Q4 Report",
chapters: [{ content: "..." }, { content: "..." }]
},
["title", "chapters[*].content"]
);