You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Entry variants: `contentType(...).entry(...).variants(variantUidOrUids, branchName?)` — optional second argument sets the CMA `branch` header for that variants scope (branch UID or alias). First argument accepts a variant UID string or an array of UIDs (comma-separated in the request path). Omitting `branchName` preserves previous behavior.
7
+
- Test
8
+
- Unit tests and sanity API tests for entry variants with an explicit branch.
Copy file name to clipboardExpand all lines: lib/stack/contentType/entry/index.js
+45-7Lines changed: 45 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -285,22 +285,60 @@ export function Entry (http, data) {
285
285
* @description The variants call returns a Variants instance for managing variants of an entry.
286
286
* @memberof Entry
287
287
* @func variants
288
-
* @param {String=} uid - Variant UID. If not provided, returns Variants instance for querying all variants.
288
+
* @param {string|string[]=} variantUidOrUids - Variant UID, list of UIDs (comma-separated in the path), or omit to query all variants.
289
+
* @param {string=} branchName - Optional branch UID or alias for this variants scope (sent as the branch header). Omit to use the stack default branch.
289
290
* @returns {Variants} Instance of Variants.
290
291
* @example
291
292
* import * as contentstack from '@contentstack/management'
0 commit comments