
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
@prisma-next/contract
Advanced tools
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)ExecutionPlan, PlanMeta, ParamDescriptor)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,
ExecutionPlan,
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 validationParamDescriptor describes a single parameter in an execution plan:
source: Origin of the parameter ('dsl', 'raw', or 'lane')index (optional): 1-based position into plan.paramsname (optional): Parameter name for codec resolutioncodecId, nativeType, nullable (optional): Type metadata from contractrefs (optional): { table, column } when the param is used against a known columnnullable: 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 18,469 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.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.