@progressdb/node
v0.2.0
Published
ProgressDB backend SDK (Node.js, TypeScript) - wraps frontend SDK with automatic signature generation and caching
Downloads
12
Maintainers
Readme
@progressdb/node
Node.js TypeScript SDK for backend callers of ProgressDB. Wraps frontend SDK with automatic signature generation.
Installation
npm install @progressdb/nodeQuick Start
import ProgressDB from '@progressdb/node'
const db = ProgressDB({
baseUrl: 'https://api.example.com',
apiKey: process.env.PROGRESSDB_KEY
})
await db.createThread({ title: 'General' }, 'user-123')API
Client
ProgressDB(options: BackendClientOptions)Messages
listThreadMessages(threadKey, query, userId)- List messages in threadcreateThreadMessage(threadKey, message, userId)- Create messagegetThreadMessage(threadKey, messageKey, userId)- Get messageupdateThreadMessage(threadKey, messageKey, message, userId)- Update messagedeleteThreadMessage(threadKey, messageKey, userId)- Delete message
Threads
createThread(thread, userId)- Create threadlistThreads(query, userId)- List threadsgetThread(threadKey, userId)- Get threadupdateThread(threadKey, thread, userId)- Update threaddeleteThread(threadKey, userId)- Delete thread
Health
healthz()- Basic health checkreadyz()- Readiness check with version
Signature
signUser(userId)- Generate signature for userclearSignatureCache(userId?)- Clear signature cachegetCacheStats()- Get cache statistics
