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
* @description The Update a variant call updates an existing variant for the selected content type.
31
33
* @memberof Variants
@@ -131,6 +133,88 @@ export function Variants (http, data) {
131
133
returnerror(err)
132
134
}
133
135
}
136
+
137
+
/**
138
+
* @description Publishes via the entry publish endpoint (POST .../entries/{entry_uid}/publish). Pass `publishDetails` as the object nested under `entry` (environments, locales, variants, variant_rules, etc.). Optional `headers` and `params` are merged into the HTTP request.
139
+
* @memberof Variants
140
+
* @func publish
141
+
* @param {Object} options
142
+
* @param {Object} options.publishDetails - Payload for the `entry` property (e.g. environments, locales, variants, variant_rules).
143
+
* @param {String|null} [options.locale] - Top-level `locale` on the request body.
144
+
* @param {Number|null} [options.version] - Top-level `version` on the request body.
145
+
* @param {String|null} [options.scheduledAt] - Top-level `scheduled_at` (ISO) on the request body.
146
+
* @param {Object} [options.headers={}] - Extra request headers merged with stack headers.
147
+
* @param {Object} [options.params={}] - Query string parameters for the request.
148
+
* @returns {Promise<Object>} Response data (e.g. notice, job_id).
149
+
* @example
150
+
* import * as contentstack from '@contentstack/management'
* @description Unpublishes via the entry unpublish endpoint (POST .../entries/{entry_uid}/unpublish). Pass `publishDetails` as the object nested under `entry`. Optional `headers` and `params` are merged into the HTTP request.
186
+
* @memberof Variants
187
+
* @func unpublish
188
+
* @param {Object} options
189
+
* @param {Object} options.publishDetails - Payload for the `entry` property (e.g. environments, locales, variants).
190
+
* @param {String|null} [options.locale] - Top-level `locale` on the request body.
191
+
* @param {Number|null} [options.version] - Top-level `version` on the request body.
192
+
* @param {String|null} [options.scheduledAt] - Top-level `scheduled_at` (ISO) on the request body.
193
+
* @param {Object} [options.headers={}] - Extra request headers merged with stack headers.
194
+
* @param {Object} [options.params={}] - Query string parameters for the request.
195
+
* @returns {Promise<Object>} Response data (e.g. notice, job_id).
0 commit comments