@dotcms/client 0.0.1-alpha.4 → 0.0.1-alpha.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -6
- package/index.cjs.d.ts +1 -0
- package/index.cjs.default.js +1 -0
- package/index.cjs.js +1953 -0
- package/index.cjs.mjs +2 -0
- package/index.esm.d.ts +1 -0
- package/index.esm.js +1944 -0
- package/package.json +19 -7
- package/src/index.d.ts +6 -2
- package/src/lib/client/content/builders/collection/collection.d.ts +226 -0
- package/src/lib/client/content/content-api.d.ts +129 -0
- package/src/lib/client/content/shared/const.d.ts +13 -0
- package/src/lib/client/content/shared/types.d.ts +138 -0
- package/src/lib/client/content/shared/utils.d.ts +20 -0
- package/src/lib/client/models/index.d.ts +12 -0
- package/src/lib/client/models/types.d.ts +13 -0
- package/src/lib/client/sdk-js-client.d.ts +276 -0
- package/src/lib/editor/listeners/listeners.d.ts +50 -0
- package/src/lib/{postMessageToEditor.d.ts → editor/models/client.model.d.ts} +33 -2
- package/src/lib/editor/models/editor.model.d.ts +49 -0
- package/src/lib/editor/models/listeners.model.d.ts +47 -0
- package/src/lib/editor/sdk-editor-vtl.d.ts +6 -0
- package/src/lib/editor/sdk-editor.d.ts +54 -0
- package/src/lib/editor/utils/editor.utils.d.ts +159 -0
- package/src/lib/query-builder/lucene-syntax/Equals.d.ts +114 -0
- package/src/lib/query-builder/lucene-syntax/Field.d.ts +32 -0
- package/src/lib/query-builder/lucene-syntax/NotOperand.d.ts +26 -0
- package/src/lib/query-builder/lucene-syntax/Operand.d.ts +44 -0
- package/src/lib/query-builder/lucene-syntax/index.d.ts +4 -0
- package/src/lib/query-builder/sdk-query-builder.d.ts +76 -0
- package/src/lib/query-builder/utils/index.d.ts +142 -0
- package/src/lib/utils/graphql/transforms.d.ts +24 -0
- package/src/lib/utils/index.d.ts +2 -0
- package/src/lib/utils/page/common-utils.d.ts +33 -0
- package/src/index.js +0 -3
- package/src/index.js.map +0 -1
- package/src/lib/postMessageToEditor.js +0 -42
- package/src/lib/postMessageToEditor.js.map +0 -1
- package/src/lib/sdk-js-client.d.ts +0 -183
- package/src/lib/sdk-js-client.js +0 -145
- package/src/lib/sdk-js-client.js.map +0 -1
package/README.md
CHANGED
|
@@ -26,12 +26,24 @@ yarn add @dotcms/client
|
|
|
26
26
|
|
|
27
27
|
## Usage
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
`@dotcms/client` supports both ES modules and CommonJS. You can import it using either syntax:
|
|
30
|
+
|
|
31
|
+
### ES Modules
|
|
32
|
+
|
|
33
|
+
```javascript
|
|
34
|
+
import { DotCmsClient } from '@dotcms/client';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### CommonJS
|
|
30
38
|
|
|
31
39
|
```javascript
|
|
32
|
-
|
|
40
|
+
const { DotCmsClient } = require('@dotcms/client');
|
|
41
|
+
```
|
|
33
42
|
|
|
34
|
-
|
|
43
|
+
First, initialize the client with your DotCMS instance details.
|
|
44
|
+
|
|
45
|
+
```javascript
|
|
46
|
+
const client = DotCmsClient.init({
|
|
35
47
|
dotcmsUrl: 'https://your-dotcms-instance.com',
|
|
36
48
|
authToken: 'your-auth-token',
|
|
37
49
|
siteId: 'your-site-id'
|
|
@@ -70,7 +82,7 @@ console.log(navData);
|
|
|
70
82
|
|
|
71
83
|
Detailed documentation of the `@dotcms/client` methods, parameters, and types can be found below:
|
|
72
84
|
|
|
73
|
-
### `
|
|
85
|
+
### `DotCmsClient.init(config: ClientConfig): DotCmsClient`
|
|
74
86
|
|
|
75
87
|
Initializes the DotCMS client with the specified configuration.
|
|
76
88
|
|
|
@@ -105,7 +117,6 @@ Always refer to the official [DotCMS documentation](https://www.dotcms.com/docs/
|
|
|
105
117
|
| Installation | [Installation](https://dotcms.com/docs/latest/installation) |
|
|
106
118
|
| Documentation | [Documentation](https://dotcms.com/docs/latest/table-of-contents) |
|
|
107
119
|
| Videos | [Helpful Videos](http://dotcms.com/videos/) |
|
|
108
|
-
| Code Examples | [Codeshare](https://dotcms.com/codeshare/) |
|
|
109
120
|
| Forums/Listserv | [via Google Groups](https://groups.google.com/forum/#!forum/dotCMS) |
|
|
110
121
|
| Twitter | @dotCMS |
|
|
111
|
-
| Main Site | [dotCMS.com](https://dotcms.com/) |
|
|
122
|
+
| Main Site | [dotCMS.com](https://dotcms.com/) |
|
package/index.cjs.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src/index";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
exports._default = require('./index.cjs.js').default;
|