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
Copy file name to clipboardExpand all lines: lib/stack/contentType/entry/index.js
+60-3Lines changed: 60 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ import { create,
12
12
importFormDatafrom'form-data'
13
13
import{createReadStream}from'fs'
14
14
importerrorfrom'../../../core/contentstackError'
15
+
import{Variants}from'./variants/index'
15
16
16
17
/**
17
18
* An entry is the actual piece of content created using one of the defined content types. Read more about <a href='https://www.contentstack.com/docs/guide/content-management'>Entries</a>.
@@ -268,14 +269,69 @@ export function Entry (http, data) {
268
269
}
269
270
270
271
/**
271
-
* @description The get locales request allows to get the languages of an entry.
272
+
* @description The variants requestan entry call is used to fetch a specific entry with variants from a content type.
272
273
* @memberof Entry
273
-
* @funclocales
274
+
* @funcvariants
274
275
* @returns {Promise<Object>} Response Object.
276
+
* @param {Object} publishing_rule Details for the publish request
277
+
* @param {String} locale Enter the code of the locale that the entry belongs to.
275
278
* @example
276
279
* import * as contentstack from '@contentstack/management'
* An variants is the actual piece of content created using one of the defined content types. Read more about <a href='https://www.contentstack.com/docs/guide/content-management'>Entries</a>.
* @description The Query on Variants will allow to fetch details of all or specific Variants
129
+
* @memberof Variants
130
+
* @func query
131
+
* @param {Int} locale Enter the code of the language of which the entries need to be included. Only the entries published in this locale will be displayed.
132
+
* @param {Object} query Queries that you can use to fetch filtered results.
133
+
* @returns {Array<Variants>} Array of Variants.
134
+
*
135
+
* @example
136
+
* import * as contentstack from '@contentstack/management'
Copy file name to clipboardExpand all lines: lib/stack/index.js
+47Lines changed: 47 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,8 @@ import { BranchAlias } from './branchAlias'
20
20
import{AuditLog}from'./auditlog'
21
21
import{Taxonomy}from'./taxonomy'
22
22
import{ManagementToken}from'./managementToken'
23
+
import{Variants}from'./variants'
24
+
import{VariantGroup}from'./variantGroup'
23
25
24
26
/**
25
27
* A stack is a space that stores the content of a project (a web or mobile property). Within a stack, you can create content structures, content entries, users, etc. related to the project. Read more about <a href='https://www.contentstack.com/docs/guide/stack'>Stacks</a>.
@@ -368,6 +370,29 @@ export function Stack (http, data) {
368
370
returnnewLabel(http,data)
369
371
}
370
372
373
+
/**
374
+
* @description For creating ungrouped variants.
375
+
* @param {String} uid The UID of the variants you want to get details.
376
+
* @returns {Variants} Instance of variants.
377
+
* @example
378
+
* import * as contentstack from '@contentstack/management'
* @description You can pin a set of entries and assets (along with the deploy action, i.e., publish/unpublish) to a ‘release’, and then deploy this release to an environment.
373
398
* @param {String} releaseUid The UID of the Releases you want to get details.
@@ -676,6 +701,28 @@ export function Stack (http, data) {
676
701
}
677
702
}
678
703
704
+
/**
705
+
* @description Variant Group allows you to create a variant groups.
706
+
* @param {String} uid The UID of the variant group you want to get details.
707
+
* @returns {VariantGroup} Instance of VariantGroup.
708
+
* @example
709
+
* import * as contentstack from '@contentstack/management'
0 commit comments