
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@dotcms/types
Advanced tools
The `@dotcms/types` package contains TypeScript type definitions for the dotCMS ecosystem. Use it to enable type safety and an enhanced developer experience when working with dotCMS APIs and structured content.
The @dotcms/types package contains TypeScript type definitions for the dotCMS ecosystem. Use it to enable type safety and an enhanced developer experience when working with dotCMS APIs and structured content.
📦 @dotcms/types on npm 🛠️ View source on GitHub
npm install @dotcms/types@latest --save-dev
import {
DotCMSPageAsset,
DotCMSPageResponse,
UVEEventType,
DotCMSInlineEditingPayload,
DotHttpClient,
DotHttpError,
DotErrorPage,
DotErrorContent,
DotErrorNavigation,
DotErrorAISearch,
DotCMSAISearchParams,
DISTANCE_FUNCTIONS
} from '@dotcms/types';
⚠️ Experimental: The AI Search types are experimental and may undergo breaking changes in future releases.
AI Search Parameters:
| Type | Description |
|---|---|
| DotCMSAISearchParams | Complete AI search parameters including query and AI config |
| DotCMSAISearchQuery | Query parameters (limit, offset, contentType, etc.) |
| DotCMSAIConfig | AI configuration (threshold, distanceFunction, responseLength) |
| DISTANCE_FUNCTIONS | Available distance functions for vector similarity |
AI Search Response:
| Type | Description |
|---|---|
| DotCMSAISearchResponse | AI search API response structure |
| DotCMSAISearchContentletData | Contentlet with AI match information |
| DotCMSAISearchMatch | Individual match with distance score and extracted text |
AI Search Errors:
| Type | Description |
|---|---|
| DotErrorAISearch | AI Search API specific error with prompt, indexName and params context |
Page:
| Type | Description |
|---|---|
| DotCMSPageAsset | Complete page with layout and content |
| DotCMSPage | Core page data |
| DotCMSPageResponse | API response for page requests |
| DotGraphQLApiResponse | GraphQL API response structure |
Content:
| Type | Description |
|---|---|
| DotCMSBasicContentlet | Basic contentlet structure |
Site & Layout:
| Type | Description |
|---|---|
| DotCMSSite | Site information |
| DotCMSTemplate | Page templates |
| DotCMSLayout | Page layout structure |
| DotCMSPageAssetContainer | Container definitions |
Navigation:
| Type | Description |
|---|---|
| DotCMSNavigationItem | Navigation structure item with hierarchy support |
| DotCMSVanityUrl | URL rewrites and vanity URLs |
| DotCMSURLContentMap | URL to content mapping |
Editor State:
| Type | Description |
|---|---|
| UVEState | Current editor state |
| UVE_MODE | Editor modes (EDIT, PREVIEW, PUBLISHED) |
| DotCMSPageRendererMode | Page rendering modes |
Editor Events:
| Type | Description |
|---|---|
| UVEEventHandler | Event handler functions |
| UVEEventSubscriber | Event subscription management |
| UVEEventType | Available event types |
| UVEEventPayloadMap | Event payload definitions |
Inline Editing:
| Type | Description |
|---|---|
| DotCMSInlineEditingPayload | Inline editing data |
| DotCMSInlineEditingType | Types of inline editing |
| Type | Description |
|---|---|
| BlockEditorContent | Block editor content structure |
| BlockEditorNode | Individual blocks/nodes |
| BlockEditorMark | Text formatting marks |
HTTP Client:
| Type | Description |
|---|---|
| DotHttpClient | HTTP client interface for custom implementations |
| BaseHttpClient | Abstract base class with error handling utilities |
Client Configuration:
| Type | Description |
|---|---|
| DotCMSClientConfig | Client configuration options |
| DotRequestOptions | HTTP request options |
| DotCMSPageRequestParams | Page request parameters |
| DotCMSGraphQLParams | GraphQL query parameters |
| DotCMSNavigationRequestParams | Navigation request options |
Base Error Types:
| Type | Description |
|---|---|
| HttpErrorDetails | HTTP error details interface |
| DotHttpError | Standardized HTTP error class |
Domain-Specific Errors:
| Type | Description |
|---|---|
| DotErrorPage | Page API errors with GraphQL context |
| DotErrorContent | Content API specific error handling |
| DotErrorNavigation | Navigation API error handling |
| DotErrorAISearch | AI Search API error handling with prompt and params |
import {
DotHttpError,
DotErrorPage,
DotErrorContent,
DotErrorNavigation,
DotErrorAISearch
} from '@dotcms/types';
// Type-safe error handling
if (error instanceof DotHttpError) {
// Access standardized HTTP error properties
console.error(`HTTP ${error.status}: ${error.statusText}`);
console.error('Response data:', error.data);
}
if (error instanceof DotErrorPage) {
// Page-specific error with GraphQL context
console.error('GraphQL query:', error.graphql?.query);
}
if (error instanceof DotErrorContent) {
// Content-specific error context
console.error(`${error.operation} failed for ${error.contentType}`);
}
if (error instanceof DotErrorAISearch) {
// AI Search-specific error context
console.error('AI Search failed for prompt:', error.prompt);
console.error('Index name:', error.indexName);
console.error('Search params:', error.params);
}
Note: For complete implementation examples and usage patterns, see the @dotcms/client package documentation.
We offer multiple channels to get help with the dotCMS Types library:
dotcms-types when posting questionsWhen reporting issues, please include:
GitHub pull requests are the preferred method to contribute code to dotCMS. We welcome contributions to the dotCMS Types library! If you'd like to contribute, please follow these steps:
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)Please ensure your code follows the existing style and includes appropriate tests.
⚠️ Experimental: AI Search types are experimental and may undergo breaking changes in future releases.
New AI Search Types:
DotCMSAISearchParams - Complete AI search parameters including query and AI configDotCMSAISearchQuery - Query parameters (limit, offset, contentType, etc.)DotCMSAIConfig - AI configuration (threshold, distanceFunction, responseLength)DotCMSAISearchResponse<T> - AI search API response structureDotCMSAISearchContentletData<T> - Contentlet with AI match informationDotCMSAISearchMatch - Individual match with distance score and extracted textDotErrorAISearch - AI Search API specific error with prompt, indexName, and params contextDISTANCE_FUNCTIONS - Available distance functions for vector similarity (cosine, L2, inner product, etc.)DotHttpClient interface for custom HTTP client implementationsBaseHttpClient abstract class with built-in error handling utilitiesDotHttpError class for standardized HTTP error handlingDotErrorPage class for page-specific errors with GraphQL query contextDotErrorContent class for content API errors with operation detailsDotErrorNavigation class for navigation-specific error handlingDotGraphQLApiResponse interface for GraphQL API responsesHttpErrorDetails interface for HTTP error standardizationtoJSON() methods for easy logging and serializationRequestOptions to DotRequestOptions for better naming consistencyDotCMSGraphQLPageResponse to DotGraphQLApiResponse for clarityDotCMSClientConfig to support custom httpClient implementationsdotCMS comes in multiple editions and as such is dual-licensed. The dotCMS Community Edition is licensed under the GPL 3.0 and is freely available for download, customization, and deployment for use within organizations of all stripes. dotCMS Enterprise Editions (EE) adds several enterprise features and is available via a supported, indemnified commercial license from dotCMS. For the differences between the editions, see the feature page.
This package is part of dotCMS's dual-licensed platform (GPL 3.0 for Community, commercial license for Enterprise).
FAQs
The `@dotcms/types` package contains TypeScript type definitions for the dotCMS ecosystem. Use it to enable type safety and an enhanced developer experience when working with dotCMS APIs and structured content.
The npm package @dotcms/types receives a total of 532 weekly downloads. As such, @dotcms/types popularity was classified as not popular.
We found that @dotcms/types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.