
Security News
Open VSX Begins Implementing Pre-Publish Security Checks After Repeated Supply Chain Incidents
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.
@dotcms/types
Advanced tools
📦 [@dotcms/types on npm](https://www.npmjs.com/package/@dotcms/types) 🛠️ [View source on GitHub](https://github.com/dotCMS/core/tree/main/core-web/libs/sdk/types)
📦 @dotcms/types on npm 🛠️ View source on GitHub
npm install @dotcms/types@latest --save-dev
This 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.
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.
This package is maintained as part of the dotCMS core repository.
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 implementationsFAQs
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 666 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
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.

Security News
Lodash 4.17.23 marks a security reset, with maintainers rebuilding governance and infrastructure to support long-term, sustainable maintenance.