New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dotcms/client

Package Overview
Dependencies
Maintainers
0
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotcms/client - npm Package Compare versions

Comparing version 0.0.1-alpha.52 to 0.0.1-alpha.53

2

package.json
{
"name": "@dotcms/client",
"version": "0.0.1-alpha.52",
"version": "0.0.1-alpha.53",
"description": "Official JavaScript library for interacting with DotCMS REST APIs.",

@@ -5,0 +5,0 @@ "repository": {

@@ -1,4 +0,4 @@

# DotCMS API Client - `@dotcms/client`
# dotCMS API Client - `@dotcms/client`
The `@dotcms/client` is a JavaScript/TypeScript library for interacting with a DotCMS instance. It allows you to easily fetch pages, content, and navigation information in JSON format, as well as to make complex queries on content collections.
The `@dotcms/client` is a JavaScript/TypeScript library for interacting with a dotCMS instance. It allows you to easily fetch pages, content, and navigation information in JSON format, as well as to make complex queries on content collections.

@@ -9,7 +9,7 @@ This client library provides a streamlined, promise-based interface to fetch pages and navigation API.

- Easy-to-use methods to interact with the [DotCMS Page](https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas) and [Navigation APIs](https://www.dotcms.com/docs/latest/navigation-rest-api).
- Support for custom actions to communicate with the DotCMS page editor.
- Easy-to-use methods to interact with [dotCMS pages](https://www.dotcms.com/docs/latest/page-rest-api-layout-as-a-service-laas) and the [Navigation API](https://www.dotcms.com/docs/latest/navigation-rest-api).
- Support for custom actions to communicate with the dotCMS page editor.
- Comprehensive TypeScript typings for better development experience.
# DotCMS API Client
# dotCMS API Client

@@ -46,4 +46,6 @@ ## Installation

First, initialize the client with your DotCMS instance details.
### Initialization
First, initialize the client with your dotCMS instance details.
```javascript

@@ -59,3 +61,3 @@ const client = DotCmsClient.init({

You can retrieve the elements of any page in your DotCMS system in JSON format using the client.page.get() method.
You can retrieve the elements of any page in your dotCMS system in JSON format using the `client.page.get()` method.

@@ -72,3 +74,3 @@ ```javascript

Retrieve the DotCMS file and folder tree to get information about the navigation structure.
Retrieve the dotCMS file and folder tree to get information about the navigation structure.

@@ -85,3 +87,3 @@ ```javascript

The `getCollection` method allows you to fetch a collection of content items using a builder pattern for complex queries.
The `getCollection` method allows you to fetch a collection of content items (sometimes called "contentlets") using a builder pattern for complex queries.

@@ -133,3 +135,3 @@ #### Basic Usage

You can build more complex queries using the query builder. For example, filter by author and `title`:
You can build more complex queries using the query builder. For example, filter by `author` and `title`:

@@ -215,22 +217,23 @@ ```typescript

Initializes the DotCMS client with the specified configuration.
Initializes the dotCMS client with the specified configuration.
### `DotCmsClient.page.get(options: PageApiOptions): Promise<unknown>`
Retrieves the specified page's elements from your DotCMS system in JSON format.
Retrieves the specified page's elements from your dotCMS system in JSON format.
### `DotCmsClient.nav.get(options: NavApiOptions): Promise<unknown>`
Retrieves information about the DotCMS file and folder tree.
Retrieves information about the dotCMS file and folder tree.
### `DotCmsClient.content.getCollection(contentType: string): CollectionBuilder<T>`
Creates a builder to filter and fetch a collection of content items for a specific content type.
Creates a builder to filter and fetches a collection of content items for a specific content type.
#### Parameters
contentType (string): The content type to retrieve.
`contentType` (string): The content type to retrieve.
#### Returns
CollectionBuilder<T>: A builder instance for chaining filters and executing the query.
`CollectionBuilder<T>`: A builder instance for chaining filters and executing the query.

@@ -251,3 +254,3 @@ ## Contributing

Always refer to the official [DotCMS documentation](https://www.dotcms.com/docs/latest/) for comprehensive guides and API references.
Always refer to the official [dotCMS documentation](https://www.dotcms.com/docs/latest/) for comprehensive guides and API references.

@@ -263,2 +266,2 @@ ## Getting Help

| Twitter | @dotCMS |
| Main Site | [dotCMS.com](https://dotcms.com/) |
| Main Site | [dotCMS.com](https://dotcms.com/) |
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc