@dotcms/client 26.11.3-1 → 26.11.3-1-next.3036
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
CHANGED
|
@@ -909,6 +909,10 @@ getCollection<T = DotCMSBasicContentlet>(
|
|
|
909
909
|
| `language()` | `number \| string` | Set content language |
|
|
910
910
|
| `depth()` | `number` | Set depth of related content |
|
|
911
911
|
| `includeSystemHost()` | - | Include content from the System Host alongside the configured site |
|
|
912
|
+
| `variant()` | `string` | Filter content by variant ID (see the note below) |
|
|
913
|
+
|
|
914
|
+
> [!NOTE]
|
|
915
|
+
> Requests made without a back-end user's token (e.g.: anonymous or front-end-only users) return the default variant, even if another variant is specified.
|
|
912
916
|
|
|
913
917
|
#### Example
|
|
914
918
|
```typescript
|
package/index.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ var consola = require('consola');
|
|
|
4
4
|
var types = require('@dotcms/types');
|
|
5
5
|
var internal = require('./internal.cjs.js');
|
|
6
6
|
|
|
7
|
-
const SDK_VERSION = "26.11.3-1";
|
|
7
|
+
const SDK_VERSION = "26.11.3-1-next.3036";
|
|
8
8
|
|
|
9
9
|
const DOTCMS_VERSION_HEADER = 'x-dotcms-version';
|
|
10
10
|
const DOTCMS_MIN_SDK_HEADER = 'x-dotcms-min-sdk';
|
|
@@ -1765,6 +1765,12 @@ class CollectionBuilder extends BaseBuilder {
|
|
|
1765
1765
|
*
|
|
1766
1766
|
* More information here: {@link https://www.dotcms.com/docs/latest/content-api-retrieval-and-querying#ParamsOptional}
|
|
1767
1767
|
*
|
|
1768
|
+
* Only reaches a non-default variant when the request carries a back-end user's token. An
|
|
1769
|
+
* anonymous request, or one made with a front-end-only token, is answered with the default
|
|
1770
|
+
* variant's version of the content whatever variant it names - the call neither fails nor
|
|
1771
|
+
* comes back empty. Experiment variants of a page are unaffected: those are selected by the
|
|
1772
|
+
* page rendering path, not by this builder.
|
|
1773
|
+
*
|
|
1768
1774
|
* @example
|
|
1769
1775
|
* ```ts
|
|
1770
1776
|
* const client = new DotCMSClient(config);
|
package/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { consola } from 'consola';
|
|
|
2
2
|
import { BaseHttpClient, DISTANCE_FUNCTIONS, DotHttpError, DotErrorAISearch, DotErrorContent, DotErrorNavigation, UVE_MODE, DotErrorPage } from '@dotcms/types';
|
|
3
3
|
import { graphqlToPageEntity } from './internal.esm.js';
|
|
4
4
|
|
|
5
|
-
const SDK_VERSION = "26.11.3-1";
|
|
5
|
+
const SDK_VERSION = "26.11.3-1-next.3036";
|
|
6
6
|
|
|
7
7
|
const DOTCMS_VERSION_HEADER = 'x-dotcms-version';
|
|
8
8
|
const DOTCMS_MIN_SDK_HEADER = 'x-dotcms-min-sdk';
|
|
@@ -1763,6 +1763,12 @@ class CollectionBuilder extends BaseBuilder {
|
|
|
1763
1763
|
*
|
|
1764
1764
|
* More information here: {@link https://www.dotcms.com/docs/latest/content-api-retrieval-and-querying#ParamsOptional}
|
|
1765
1765
|
*
|
|
1766
|
+
* Only reaches a non-default variant when the request carries a back-end user's token. An
|
|
1767
|
+
* anonymous request, or one made with a front-end-only token, is answered with the default
|
|
1768
|
+
* variant's version of the content whatever variant it names - the call neither fails nor
|
|
1769
|
+
* comes back empty. Experiment variants of a page are unaffected: those are selected by the
|
|
1770
|
+
* page rendering path, not by this builder.
|
|
1771
|
+
*
|
|
1766
1772
|
* @example
|
|
1767
1773
|
* ```ts
|
|
1768
1774
|
* const client = new DotCMSClient(config);
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotcms/client",
|
|
3
|
-
"version": "26.11.3-1",
|
|
3
|
+
"version": "26.11.3-1-next.3036",
|
|
4
4
|
"description": "Official JavaScript library for interacting with DotCMS REST APIs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/dotCMS/core.git#main"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@dotcms/types": "26.11.3-1"
|
|
10
|
+
"@dotcms/types": "26.11.3-1-next.3036"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"consola": "^3.4.2"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@dotcms/types": "26.11.3-1"
|
|
16
|
+
"@dotcms/types": "26.11.3-1-next.3036"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"dotCMS",
|
|
@@ -117,6 +117,12 @@ export declare class CollectionBuilder<T = unknown> extends BaseBuilder<T> {
|
|
|
117
117
|
*
|
|
118
118
|
* More information here: {@link https://www.dotcms.com/docs/latest/content-api-retrieval-and-querying#ParamsOptional}
|
|
119
119
|
*
|
|
120
|
+
* Only reaches a non-default variant when the request carries a back-end user's token. An
|
|
121
|
+
* anonymous request, or one made with a front-end-only token, is answered with the default
|
|
122
|
+
* variant's version of the content whatever variant it names - the call neither fails nor
|
|
123
|
+
* comes back empty. Experiment variants of a page are unaffected: those are selected by the
|
|
124
|
+
* page rendering path, not by this builder.
|
|
125
|
+
*
|
|
120
126
|
* @example
|
|
121
127
|
* ```ts
|
|
122
128
|
* const client = new DotCMSClient(config);
|