
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
@prisma-next/contract
Advanced tools
Internal package. This package is an implementation detail of
prisma-nextand is published only to support its runtime. Its API is unstable and may change without notice. Do not depend on this package directly; installprisma-nextinstead.
Core contract data types and JSON schemas for Prisma Next.
This package provides the foundational type definitions for Prisma Next data contracts:
ContractBase, DocumentContract, Source, FieldType)PlanMeta). The plan markers themselves (QueryPlan, ExecutionPlan) live in @prisma-next/framework-components/runtime; family-specific plans (SqlExecutionPlan, MongoExecutionPlan) live in their respective domains. Per ADR 205, execution metadata (codec IDs, projection refs, parameter descriptors) lives on the family AST when one is present, not on PlanMeta.StorageHashBase, ExecutionHashBase, ProfileHashBase)isDocumentContract)This package is a foundation-layer leaf — it has no framework-domain dependencies and is consumed by all layers above it.
import type {
Contract,
ContractMarkerRecord,
DocumentContract,
PlanMeta,
} from '@prisma-next/contract/types';
import { isDocumentContract, coreHash, profileHash } from '@prisma-next/contract/types';
if (isDocumentContract(contract)) {
const collections = contract.storage.document.collections;
}
Reference the appropriate JSON schema in your contract.json files to enable IDE validation:
{
"$schema": "node_modules/@prisma-next/contract/schemas/data-contract-document-v1.json",
"schemaVersion": "1",
"target": "mongodb",
"targetFamily": "document",
"storageHash": "sha256:..."
}
For SQL contracts, use @prisma-next/sql-contract-ts/schema-sql instead.
./types: Contract data types, hash types, plan types, type guards./hashing: Contract hashing utilities./testing: Test helpers for creating contract fixtures./validate-contract: Contract structure validation./validate-domain: Domain model validationnullable: false explicit for columns with defaults in emitted contracts.defaults.* capability when using function defaults like autoincrement() or now().@prisma-next/utils: Shared utility functionsFAQs
Data contract type definitions and JSON schema for Prisma Next
The npm package @prisma-next/contract receives a total of 20,163 weekly downloads. As such, @prisma-next/contract popularity was classified as popular.
We found that @prisma-next/contract demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.