@mixpeek/sanity
v1.0.0
Published
Sanity.io integration for Mixpeek — webhook handling, document enrichment, and GROQ-powered queries
Readme
@mixpeek/sanity
Sanity.io integration for Mixpeek — webhook handling, document enrichment, and GROQ-powered queries
Installation
npm install @mixpeek/sanity @sanity/clientQuick Start
import webhookHandler from '@mixpeek/sanity';
const instance = webhookHandler({
apiKey: process.env.MIXPEEK_API_KEY
});Modules
WebhookHandler
Handles Sanity GROQ-powered webhooks and triggers Mixpeek enrichment
import { createWebhookHandler } from '@mixpeek/sanity';
const webhookHandler = createWebhookHandler({
apiKey: process.env.MIXPEEK_API_KEY
});DocumentEnricher
Enriches Sanity documents with Mixpeek multimodal analysis stored in custom fields
import { createDocumentEnricher } from '@mixpeek/sanity';
const documentEnricher = createDocumentEnricher({
apiKey: process.env.MIXPEEK_API_KEY
});SanityClient
Sanity client wrapper for reading/writing enrichment data via GROQ and mutations
import { createSanityClient } from '@mixpeek/sanity';
const sanityClient = createSanityClient({
apiKey: process.env.MIXPEEK_API_KEY
});Testing
npm test # Unit tests
npm run test:e2e # End-to-end tests
npm run test:live # Live API tests (requires MIXPEEK_API_KEY)
npm run test:coverage # Coverage reportLicense
MIT
