@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.
Files changed (41) hide show
  1. package/README.md +17 -6
  2. package/index.cjs.d.ts +1 -0
  3. package/index.cjs.default.js +1 -0
  4. package/index.cjs.js +1953 -0
  5. package/index.cjs.mjs +2 -0
  6. package/index.esm.d.ts +1 -0
  7. package/index.esm.js +1944 -0
  8. package/package.json +19 -7
  9. package/src/index.d.ts +6 -2
  10. package/src/lib/client/content/builders/collection/collection.d.ts +226 -0
  11. package/src/lib/client/content/content-api.d.ts +129 -0
  12. package/src/lib/client/content/shared/const.d.ts +13 -0
  13. package/src/lib/client/content/shared/types.d.ts +138 -0
  14. package/src/lib/client/content/shared/utils.d.ts +20 -0
  15. package/src/lib/client/models/index.d.ts +12 -0
  16. package/src/lib/client/models/types.d.ts +13 -0
  17. package/src/lib/client/sdk-js-client.d.ts +276 -0
  18. package/src/lib/editor/listeners/listeners.d.ts +50 -0
  19. package/src/lib/{postMessageToEditor.d.ts → editor/models/client.model.d.ts} +33 -2
  20. package/src/lib/editor/models/editor.model.d.ts +49 -0
  21. package/src/lib/editor/models/listeners.model.d.ts +47 -0
  22. package/src/lib/editor/sdk-editor-vtl.d.ts +6 -0
  23. package/src/lib/editor/sdk-editor.d.ts +54 -0
  24. package/src/lib/editor/utils/editor.utils.d.ts +159 -0
  25. package/src/lib/query-builder/lucene-syntax/Equals.d.ts +114 -0
  26. package/src/lib/query-builder/lucene-syntax/Field.d.ts +32 -0
  27. package/src/lib/query-builder/lucene-syntax/NotOperand.d.ts +26 -0
  28. package/src/lib/query-builder/lucene-syntax/Operand.d.ts +44 -0
  29. package/src/lib/query-builder/lucene-syntax/index.d.ts +4 -0
  30. package/src/lib/query-builder/sdk-query-builder.d.ts +76 -0
  31. package/src/lib/query-builder/utils/index.d.ts +142 -0
  32. package/src/lib/utils/graphql/transforms.d.ts +24 -0
  33. package/src/lib/utils/index.d.ts +2 -0
  34. package/src/lib/utils/page/common-utils.d.ts +33 -0
  35. package/src/index.js +0 -3
  36. package/src/index.js.map +0 -1
  37. package/src/lib/postMessageToEditor.js +0 -42
  38. package/src/lib/postMessageToEditor.js.map +0 -1
  39. package/src/lib/sdk-js-client.d.ts +0 -183
  40. package/src/lib/sdk-js-client.js +0 -145
  41. 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
- First, initialize the client with your DotCMS instance details.
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
- import { dotcmsClient } from '@dotcms/client';
40
+ const { DotCmsClient } = require('@dotcms/client');
41
+ ```
33
42
 
34
- const client = dotcmsClient.init({
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
- ### `dotcmsClient.init(config: ClientConfig): DotCmsClient`
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;