@inferedge-rest/moss
v1.0.0-beta.3
Published
`@inferedge-rest/moss` provides a TypeScript SDK for cloud-based document management and index operations.
Downloads
158
Maintainers
Readme
MOSS - Document Management SDK
@inferedge-rest/moss provides a TypeScript SDK for cloud-based document management and index operations.
Built for developers who need reliable document indexing and management with a cloud-first approach.
✨ Features
- 🗂️ Index Management - Create, update, and delete document indexes
- � Document Operations - Add, update, retrieve, and delete documents
- � Cloud-First - All operations handled via secure cloud API
- 🛠️ TypeScript Support - Full type safety and IntelliSense
- � Index Monitoring - Get detailed information about your indexes
📦 Installation
npm install @inferedge-rest/moss🚀 Quick Start
import { MossRestClient, DocumentInfo } from "@inferedge-rest/moss";
async function main() {
// Initialize client with project credentials
const mossClient = new MossRestClient(
"your-project-id",
"your-project-key"
);
// Prepare documents to index
const documents: DocumentInfo[] = [
{
id: "doc1",
text: "How do I track my order? You can track your order by logging into your account.",
},
{
id: "doc2",
text: "What is your return policy? We offer a 30-day return policy for most items.",
},
{
id: "doc3",
text: "How can I change my shipping address? Contact our customer service team.",
},
];
// Create an index with documents and model
const indexName = "customer-faqs";
const created = await mossClient.createIndex(
indexName,
documents,
"moss-minilm"
);
console.log("Index created:", created);
// Get index information
const indexInfo = await mossClient.getIndex(indexName);
console.log(`Index has ${indexInfo.docCount} documents`);
// Add more documents
const additionalDocs: DocumentInfo[] = [
{
id: "doc4",
text: "What payment methods do you accept? We accept all major credit cards and PayPal.",
},
];
const addResult = await mossClient.addDocs(indexName, additionalDocs);
console.log(`Added ${addResult.added} documents`);
// Retrieve documents
const allDocs = await mossClient.getDocs(indexName);
console.log(`Total documents in index: ${allDocs.length}`);
}
main().catch(console.error);🔥 Example Use Cases
- Document management systems
- Content management platforms
- Knowledge base backends
- Customer support systems
- E-commerce product catalogs
📄 License
This package is licensed under the PolyForm Shield License 1.0.0.
- ✅ Free for testing, evaluation, internal use, and modifications.
- ❌ Not permitted for production or competing commercial use.
- 📩 For commercial licenses, contact: [email protected]
📬 Contact
For support, commercial licensing, or partnership inquiries, contact us: [email protected]
