
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
@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
} from '@dotcms/types';
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 |
import {
DotHttpError,
DotErrorPage,
DotErrorContent,
DotErrorNavigation
} 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}`);
}
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.
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 605 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.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.