Skip to content

Commit 9d0c36d

Browse files
Merge pull request #429 from contentstack/staging
DX | 01-09-2025 | Release
2 parents 681833d + d2eb4a5 commit 9d0c36d

File tree

6 files changed

+330
-5
lines changed

6 files changed

+330
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [v1.25.0](https://github.com/contentstack/contentstack-management-javascript/tree/v1.25.0) (2025-09-03)
4+
- Enhancement
5+
- Added publish_all_localized param in bulk publish/unpublish
6+
37
## [v1.24.0](https://github.com/contentstack/contentstack-management-javascript/tree/v1.24.0) (2025-08-18)
48
- Feat
59
- Added Support for MFA

lib/stack/bulkOperation/index.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export function BulkOperation (http, data = {}) {
187187
*
188188
*/
189189
// eslint-disable-next-line camelcase
190-
this.publish = async ({ details, skip_workflow_stage = false, approvals = false, is_nested = false, api_version = '' }) => {
190+
this.publish = async ({ details, skip_workflow_stage = false, approvals = false, is_nested = false, api_version = '', publishAllLocalized = false }) => {
191191
var httpBody = {}
192192
if (details) {
193193
httpBody = cloneDeep(details)
@@ -212,6 +212,12 @@ export function BulkOperation (http, data = {}) {
212212
if (approvals) {
213213
headers.headers.approvals = approvals
214214
}
215+
if (publishAllLocalized) {
216+
if (!headers.params) {
217+
headers.params = {}
218+
}
219+
headers.params.publish_all_localized = publishAllLocalized
220+
}
215221

216222
// eslint-disable-next-line camelcase
217223
if (api_version) headers.headers.api_version = api_version
@@ -279,7 +285,7 @@ export function BulkOperation (http, data = {}) {
279285
* .then((response) => { console.log(response.notice) })
280286
*/
281287
// eslint-disable-next-line camelcase
282-
this.unpublish = async ({ details, skip_workflow_stage = false, approvals = false, is_nested = false, api_version = '' }) => {
288+
this.unpublish = async ({ details, skip_workflow_stage = false, approvals = false, is_nested = false, api_version = '', unpublishAllLocalized = false }) => {
283289
var httpBody = {}
284290
if (details) {
285291
httpBody = cloneDeep(details)
@@ -306,6 +312,13 @@ export function BulkOperation (http, data = {}) {
306312
}
307313
// eslint-disable-next-line camelcase
308314
if (api_version) headers.headers.api_version = api_version
315+
316+
if (unpublishAllLocalized) {
317+
if (!headers.params) {
318+
headers.params = {}
319+
}
320+
headers.params.publish_all_localized = unpublishAllLocalized
321+
}
309322
return publishUnpublish(http, '/bulk/unpublish', httpBody, headers)
310323
}
311324

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/management",
3-
"version": "1.24.0",
3+
"version": "1.25.0",
44
"description": "The Content Management API is used to manage the content of your Contentstack account",
55
"main": "./dist/node/contentstack-management.js",
66
"browser": "./dist/web/contentstack-management.js",

0 commit comments

Comments
 (0)