@agility/management-sdk 0.1.36 → 0.1.37

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.
Files changed (259) hide show
  1. package/README.md +371 -317
  2. package/dist/apiMethods/clientInstance.d.ts +2 -0
  3. package/dist/apiMethods/clientInstance.js +11 -2
  4. package/dist/apiMethods/containerMethods.d.ts +3 -0
  5. package/dist/apiMethods/containerMethods.js +43 -9
  6. package/dist/apiMethods/contentMethods.d.ts +12 -0
  7. package/dist/apiMethods/contentMethods.js +100 -46
  8. package/dist/apiMethods/pageMethods.d.ts +12 -0
  9. package/dist/apiMethods/pageMethods.js +88 -34
  10. package/dist/enums/contentViewType.d.ts +6 -0
  11. package/dist/enums/contentViewType.js +10 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.js +2 -0
  14. package/dist/models/pagedResult.d.ts +4 -0
  15. package/dist/models/pagedResult.js +2 -0
  16. package/docs/asset-methods.md +381 -381
  17. package/docs/auth-component.md +360 -360
  18. package/docs/auth.md +593 -593
  19. package/docs/batch-methods.md +243 -243
  20. package/docs/cicd.md +606 -606
  21. package/docs/container-methods.md +267 -267
  22. package/docs/content-methods.md +491 -422
  23. package/docs/instance-methods.md +104 -104
  24. package/docs/instance-user-methods.md +230 -230
  25. package/docs/model-methods.md +433 -433
  26. package/docs/multi-instance-operations.md +191 -191
  27. package/docs/page-methods.md +737 -670
  28. package/docs/server-user-methods.md +279 -279
  29. package/docs/webhook-methods.md +451 -451
  30. package/license.txt +20 -20
  31. package/package.json +40 -40
  32. package/tsconfig.json +14 -14
  33. package/.cursor/api-coverage.md +0 -217
  34. package/.cursor/api-documentation-manifest.md +0 -275
  35. package/.cursor/api-functions-analysis.md +0 -111
  36. package/.cursor/breakout-manifest.md +0 -278
  37. package/.cursor/docs-final-check.md +0 -269
  38. package/.cursor/github-actions-improvements.md +0 -76
  39. package/.cursor/hardening.md +0 -271
  40. package/.cursor/linting-fix.md +0 -160
  41. package/.cursor/manifest.md +0 -243
  42. package/.cursor/mocks.md +0 -100
  43. package/.cursor/test-coverage.md +0 -841
  44. package/.env +0 -92
  45. package/coverage/base.css +0 -224
  46. package/coverage/block-navigation.js +0 -87
  47. package/coverage/coverage-summary.json +0 -43
  48. package/coverage/favicon.png +0 -0
  49. package/coverage/index.html +0 -161
  50. package/coverage/lcov-report/base.css +0 -224
  51. package/coverage/lcov-report/block-navigation.js +0 -87
  52. package/coverage/lcov-report/favicon.png +0 -0
  53. package/coverage/lcov-report/index.html +0 -161
  54. package/coverage/lcov-report/prettify.css +0 -1
  55. package/coverage/lcov-report/prettify.js +0 -2
  56. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  57. package/coverage/lcov-report/sorter.js +0 -210
  58. package/coverage/lcov-report/src/apiClient.ts.html +0 -199
  59. package/coverage/lcov-report/src/apiMethods/assetMethods.ts.html +0 -682
  60. package/coverage/lcov-report/src/apiMethods/batchMethods.ts.html +0 -736
  61. package/coverage/lcov-report/src/apiMethods/clientInstance.ts.html +0 -403
  62. package/coverage/lcov-report/src/apiMethods/containerMethods.ts.html +0 -460
  63. package/coverage/lcov-report/src/apiMethods/contentMethods.ts.html +0 -1183
  64. package/coverage/lcov-report/src/apiMethods/index.html +0 -266
  65. package/coverage/lcov-report/src/apiMethods/instanceMethods.ts.html +0 -160
  66. package/coverage/lcov-report/src/apiMethods/instanceUserMethods.ts.html +0 -268
  67. package/coverage/lcov-report/src/apiMethods/modelMethods.ts.html +0 -352
  68. package/coverage/lcov-report/src/apiMethods/pageMethods.ts.html +0 -1276
  69. package/coverage/lcov-report/src/apiMethods/serverUserMethods.ts.html +0 -196
  70. package/coverage/lcov-report/src/apiMethods/webhookMethods.ts.html +0 -271
  71. package/coverage/lcov-report/src/enums/batchItemType.ts.html +0 -106
  72. package/coverage/lcov-report/src/enums/batchOperationType.ts.html +0 -142
  73. package/coverage/lcov-report/src/enums/batchState..ts.html +0 -106
  74. package/coverage/lcov-report/src/enums/index.html +0 -161
  75. package/coverage/lcov-report/src/enums/workflowOperationType.ts.html +0 -175
  76. package/coverage/lcov-report/src/index.html +0 -116
  77. package/coverage/lcov-report/src/models/assetContainer.ts.html +0 -106
  78. package/coverage/lcov-report/src/models/assetGalleries.ts.html +0 -103
  79. package/coverage/lcov-report/src/models/assetMediaGrouping.ts.html +0 -136
  80. package/coverage/lcov-report/src/models/assetMediaGroupingMetaData.ts.html +0 -97
  81. package/coverage/lcov-report/src/models/batch.ts.html +0 -178
  82. package/coverage/lcov-report/src/models/batchItem.ts.html +0 -127
  83. package/coverage/lcov-report/src/models/container.ts.html +0 -232
  84. package/coverage/lcov-report/src/models/contentDefinitionTypeID.ts.html +0 -142
  85. package/coverage/lcov-report/src/models/contentItem.ts.html +0 -202
  86. package/coverage/lcov-report/src/models/contentSectionDefaultModule.ts.html +0 -106
  87. package/coverage/lcov-report/src/models/contentSectionDefinition.ts.html +0 -196
  88. package/coverage/lcov-report/src/models/contentViewColumn.ts.html +0 -109
  89. package/coverage/lcov-report/src/models/exception.ts.html +0 -109
  90. package/coverage/lcov-report/src/models/index.html +0 -476
  91. package/coverage/lcov-report/src/models/instanceRole.ts.html +0 -106
  92. package/coverage/lcov-report/src/models/instanceUser.ts.html +0 -130
  93. package/coverage/lcov-report/src/models/locales.ts.html +0 -100
  94. package/coverage/lcov-report/src/models/media.ts.html +0 -178
  95. package/coverage/lcov-report/src/models/model.ts.html +0 -172
  96. package/coverage/lcov-report/src/models/notification.ts.html +0 -124
  97. package/coverage/lcov-report/src/models/options.ts.html +0 -109
  98. package/coverage/lcov-report/src/models/pageItem.ts.html +0 -268
  99. package/coverage/lcov-report/src/models/pageModel.ts.html +0 -130
  100. package/coverage/lcov-report/src/models/sharedModule.ts.html +0 -106
  101. package/coverage/lcov-report/src/models/sitemap.ts.html +0 -148
  102. package/coverage/lcov-report/src/models/websiteUser.ts.html +0 -157
  103. package/coverage/lcov.info +0 -1459
  104. package/coverage/prettify.css +0 -1
  105. package/coverage/prettify.js +0 -2
  106. package/coverage/sort-arrow-sprite.png +0 -0
  107. package/coverage/sorter.js +0 -210
  108. package/coverage/src/apiClient.ts.html +0 -199
  109. package/coverage/src/apiMethods/assetMethods.ts.html +0 -682
  110. package/coverage/src/apiMethods/batchMethods.ts.html +0 -736
  111. package/coverage/src/apiMethods/clientInstance.ts.html +0 -403
  112. package/coverage/src/apiMethods/containerMethods.ts.html +0 -460
  113. package/coverage/src/apiMethods/contentMethods.ts.html +0 -1183
  114. package/coverage/src/apiMethods/index.html +0 -266
  115. package/coverage/src/apiMethods/instanceMethods.ts.html +0 -160
  116. package/coverage/src/apiMethods/instanceUserMethods.ts.html +0 -268
  117. package/coverage/src/apiMethods/modelMethods.ts.html +0 -352
  118. package/coverage/src/apiMethods/pageMethods.ts.html +0 -1276
  119. package/coverage/src/apiMethods/serverUserMethods.ts.html +0 -196
  120. package/coverage/src/apiMethods/webhookMethods.ts.html +0 -271
  121. package/coverage/src/enums/batchItemType.ts.html +0 -106
  122. package/coverage/src/enums/batchOperationType.ts.html +0 -142
  123. package/coverage/src/enums/batchState..ts.html +0 -106
  124. package/coverage/src/enums/index.html +0 -161
  125. package/coverage/src/enums/workflowOperationType.ts.html +0 -175
  126. package/coverage/src/index.html +0 -116
  127. package/coverage/src/models/assetContainer.ts.html +0 -106
  128. package/coverage/src/models/assetGalleries.ts.html +0 -103
  129. package/coverage/src/models/assetMediaGrouping.ts.html +0 -136
  130. package/coverage/src/models/assetMediaGroupingMetaData.ts.html +0 -97
  131. package/coverage/src/models/batch.ts.html +0 -178
  132. package/coverage/src/models/batchItem.ts.html +0 -127
  133. package/coverage/src/models/container.ts.html +0 -232
  134. package/coverage/src/models/contentDefinitionTypeID.ts.html +0 -142
  135. package/coverage/src/models/contentItem.ts.html +0 -202
  136. package/coverage/src/models/contentSectionDefaultModule.ts.html +0 -106
  137. package/coverage/src/models/contentSectionDefinition.ts.html +0 -196
  138. package/coverage/src/models/contentViewColumn.ts.html +0 -109
  139. package/coverage/src/models/exception.ts.html +0 -109
  140. package/coverage/src/models/index.html +0 -476
  141. package/coverage/src/models/instanceRole.ts.html +0 -106
  142. package/coverage/src/models/instanceUser.ts.html +0 -130
  143. package/coverage/src/models/locales.ts.html +0 -100
  144. package/coverage/src/models/media.ts.html +0 -178
  145. package/coverage/src/models/model.ts.html +0 -172
  146. package/coverage/src/models/notification.ts.html +0 -124
  147. package/coverage/src/models/options.ts.html +0 -109
  148. package/coverage/src/models/pageItem.ts.html +0 -268
  149. package/coverage/src/models/pageModel.ts.html +0 -130
  150. package/coverage/src/models/sharedModule.ts.html +0 -106
  151. package/coverage/src/models/sitemap.ts.html +0 -148
  152. package/coverage/src/models/websiteUser.ts.html +0 -157
  153. package/dist/.tsbuildinfo +0 -1
  154. package/dist/apiClient.d.ts.map +0 -1
  155. package/dist/apiClient.js.map +0 -1
  156. package/dist/apiMethods/assetMethods.d.ts.map +0 -1
  157. package/dist/apiMethods/assetMethods.js.map +0 -1
  158. package/dist/apiMethods/batchMethods.d.ts.map +0 -1
  159. package/dist/apiMethods/batchMethods.js.map +0 -1
  160. package/dist/apiMethods/clientInstance.d.ts.map +0 -1
  161. package/dist/apiMethods/clientInstance.js.map +0 -1
  162. package/dist/apiMethods/containerMethods.d.ts.map +0 -1
  163. package/dist/apiMethods/containerMethods.js.map +0 -1
  164. package/dist/apiMethods/contentMethods.d.ts.map +0 -1
  165. package/dist/apiMethods/contentMethods.js.map +0 -1
  166. package/dist/apiMethods/instanceMethods.d.ts.map +0 -1
  167. package/dist/apiMethods/instanceMethods.js.map +0 -1
  168. package/dist/apiMethods/instanceUserMethods.d.ts.map +0 -1
  169. package/dist/apiMethods/instanceUserMethods.js.map +0 -1
  170. package/dist/apiMethods/modelMethods.d.ts.map +0 -1
  171. package/dist/apiMethods/modelMethods.js.map +0 -1
  172. package/dist/apiMethods/pageMethods.d.ts.map +0 -1
  173. package/dist/apiMethods/pageMethods.js.map +0 -1
  174. package/dist/apiMethods/serverUserMethods.d.ts.map +0 -1
  175. package/dist/apiMethods/serverUserMethods.js.map +0 -1
  176. package/dist/apiMethods/webhookMethods.d.ts.map +0 -1
  177. package/dist/apiMethods/webhookMethods.js.map +0 -1
  178. package/dist/enums/assetGroupingType.d.ts.map +0 -1
  179. package/dist/enums/assetGroupingType.js.map +0 -1
  180. package/dist/enums/batchItemType.d.ts.map +0 -1
  181. package/dist/enums/batchItemType.js.map +0 -1
  182. package/dist/enums/batchOperationType.d.ts.map +0 -1
  183. package/dist/enums/batchOperationType.js.map +0 -1
  184. package/dist/enums/batchState..d.ts.map +0 -1
  185. package/dist/enums/batchState..js.map +0 -1
  186. package/dist/enums/pageItemTemplateType.d.ts.map +0 -1
  187. package/dist/enums/pageItemTemplateType.js.map +0 -1
  188. package/dist/enums/workflowOperationType.d.ts.map +0 -1
  189. package/dist/enums/workflowOperationType.js.map +0 -1
  190. package/dist/index.d.ts.map +0 -1
  191. package/dist/index.js.map +0 -1
  192. package/dist/models/assetContainer.d.ts.map +0 -1
  193. package/dist/models/assetContainer.js.map +0 -1
  194. package/dist/models/assetGalleries.d.ts.map +0 -1
  195. package/dist/models/assetGalleries.js.map +0 -1
  196. package/dist/models/assetMediaGrouping.d.ts.map +0 -1
  197. package/dist/models/assetMediaGrouping.js.map +0 -1
  198. package/dist/models/assetMediaGroupingMetaData.d.ts.map +0 -1
  199. package/dist/models/assetMediaGroupingMetaData.js.map +0 -1
  200. package/dist/models/batch.d.ts.map +0 -1
  201. package/dist/models/batch.js.map +0 -1
  202. package/dist/models/batchItem.d.ts.map +0 -1
  203. package/dist/models/batchItem.js.map +0 -1
  204. package/dist/models/batchTypes.d.ts.map +0 -1
  205. package/dist/models/batchTypes.js.map +0 -1
  206. package/dist/models/container.d.ts.map +0 -1
  207. package/dist/models/container.js.map +0 -1
  208. package/dist/models/contentDefinitionTypeID.d.ts.map +0 -1
  209. package/dist/models/contentDefinitionTypeID.js.map +0 -1
  210. package/dist/models/contentItem.d.ts.map +0 -1
  211. package/dist/models/contentItem.js.map +0 -1
  212. package/dist/models/contentItemHistory.d.ts.map +0 -1
  213. package/dist/models/contentItemHistory.js.map +0 -1
  214. package/dist/models/contentListFilterModel.d.ts.map +0 -1
  215. package/dist/models/contentListFilterModel.js.map +0 -1
  216. package/dist/models/contentSectionDefaultModule.d.ts.map +0 -1
  217. package/dist/models/contentSectionDefaultModule.js.map +0 -1
  218. package/dist/models/contentSectionDefinition.d.ts.map +0 -1
  219. package/dist/models/contentSectionDefinition.js.map +0 -1
  220. package/dist/models/contentViewColumn.d.ts.map +0 -1
  221. package/dist/models/contentViewColumn.js.map +0 -1
  222. package/dist/models/exception.d.ts.map +0 -1
  223. package/dist/models/exception.js.map +0 -1
  224. package/dist/models/instanceRole.d.ts.map +0 -1
  225. package/dist/models/instanceRole.js.map +0 -1
  226. package/dist/models/instanceUser.d.ts.map +0 -1
  227. package/dist/models/instanceUser.js.map +0 -1
  228. package/dist/models/itemComments.d.ts.map +0 -1
  229. package/dist/models/itemComments.js.map +0 -1
  230. package/dist/models/listParams.d.ts.map +0 -1
  231. package/dist/models/listParams.js.map +0 -1
  232. package/dist/models/locales.d.ts.map +0 -1
  233. package/dist/models/locales.js.map +0 -1
  234. package/dist/models/media.d.ts.map +0 -1
  235. package/dist/models/media.js.map +0 -1
  236. package/dist/models/model.d.ts.map +0 -1
  237. package/dist/models/model.js.map +0 -1
  238. package/dist/models/notification.d.ts.map +0 -1
  239. package/dist/models/notification.js.map +0 -1
  240. package/dist/models/options.d.ts.map +0 -1
  241. package/dist/models/options.js.map +0 -1
  242. package/dist/models/pageHistory.d.ts.map +0 -1
  243. package/dist/models/pageHistory.js.map +0 -1
  244. package/dist/models/pageItem.d.ts.map +0 -1
  245. package/dist/models/pageItem.js.map +0 -1
  246. package/dist/models/pageModel.d.ts.map +0 -1
  247. package/dist/models/pageModel.js.map +0 -1
  248. package/dist/models/serverUser.d.ts.map +0 -1
  249. package/dist/models/serverUser.js.map +0 -1
  250. package/dist/models/sharedModule.d.ts.map +0 -1
  251. package/dist/models/sharedModule.js.map +0 -1
  252. package/dist/models/sitemap.d.ts.map +0 -1
  253. package/dist/models/sitemap.js.map +0 -1
  254. package/dist/models/webhook.d.ts.map +0 -1
  255. package/dist/models/webhook.js.map +0 -1
  256. package/dist/models/websiteListing.d.ts.map +0 -1
  257. package/dist/models/websiteListing.js.map +0 -1
  258. package/dist/models/websiteUser.d.ts.map +0 -1
  259. package/dist/models/websiteUser.js.map +0 -1
@@ -1,7 +1,9 @@
1
1
  import { AxiosInstance } from 'axios';
2
+ import https from 'https';
2
3
  import { Options } from "../models/options";
3
4
  export declare class ClientInstance {
4
5
  _options: Options;
6
+ _httpsAgent: https.Agent | undefined;
5
7
  constructor(options: Options);
6
8
  /**
7
9
  * Figure out the Base Url, which can be overriden using options.baseUrl
@@ -41,9 +41,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
42
  exports.ClientInstance = void 0;
43
43
  var axios_1 = __importDefault(require("axios"));
44
+ var https_1 = __importDefault(require("https"));
44
45
  var ClientInstance = /** @class */ (function () {
45
46
  function ClientInstance(options) {
46
47
  this._options = options;
48
+ // Create an HTTPS agent that ignores SSL certificate errors for local development
49
+ if (process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0') {
50
+ this._httpsAgent = new https_1.default.Agent({
51
+ rejectUnauthorized: false
52
+ });
53
+ }
47
54
  }
48
55
  /**
49
56
  * Figure out the Base Url, which can be overriden using options.baseUrl
@@ -83,7 +90,8 @@ var ClientInstance = /** @class */ (function () {
83
90
  var instance = axios_1.default.create({
84
91
  baseURL: "".concat(baseUrl, "/api/v1/instance/").concat(guid),
85
92
  maxContentLength: Infinity,
86
- maxBodyLength: Infinity
93
+ maxBodyLength: Infinity,
94
+ httpsAgent: this._httpsAgent
87
95
  });
88
96
  return instance;
89
97
  };
@@ -92,7 +100,8 @@ var ClientInstance = /** @class */ (function () {
92
100
  var instance = axios_1.default.create({
93
101
  baseURL: "".concat(baseUrl, "/api/v1"),
94
102
  maxContentLength: Infinity,
95
- maxBodyLength: Infinity
103
+ maxBodyLength: Infinity,
104
+ httpsAgent: this._httpsAgent
96
105
  });
97
106
  return instance;
98
107
  };
@@ -2,6 +2,8 @@ import { Options } from "../models/options";
2
2
  import { ClientInstance } from "./clientInstance";
3
3
  import { Container } from "../models/container";
4
4
  import { Notification } from "../models/notification";
5
+ import { PagedResult } from "../models/pagedResult";
6
+ import { ContentViewType } from "../enums/contentViewType";
5
7
  export declare class ContainerMethods {
6
8
  _options: Options;
7
9
  _clientInstance: ClientInstance;
@@ -18,6 +20,7 @@ export declare class ContainerMethods {
18
20
  getContainerByReferenceName(referenceName: string, guid: string): Promise<Container | null>;
19
21
  getContainerSecurity(id: number, guid: string): Promise<Container>;
20
22
  getContainerList(guid: string): Promise<Container[]>;
23
+ getContainerListPaged(guid: string, pageSize?: number, recordOffset?: number, contentType?: ContentViewType, includeModules?: boolean, updatedSince?: Date): Promise<PagedResult<Container>>;
21
24
  getNotificationList(id: number, guid: string): Promise<Notification[]>;
22
25
  saveContainer(container: Container, guid: string, forceReferenceName?: boolean): Promise<Container>;
23
26
  deleteContainer(id: number, guid: string): Promise<string>;
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.ContainerMethods = void 0;
40
40
  var clientInstance_1 = require("./clientInstance");
41
41
  var exception_1 = require("../models/exception");
42
+ var contentViewType_1 = require("../enums/contentViewType");
42
43
  var ContainerMethods = /** @class */ (function () {
43
44
  function ContainerMethods(options) {
44
45
  this._options = options;
@@ -155,9 +156,42 @@ var ContainerMethods = /** @class */ (function () {
155
156
  });
156
157
  });
157
158
  };
159
+ ContainerMethods.prototype.getContainerListPaged = function (guid_1) {
160
+ return __awaiter(this, arguments, void 0, function (guid, pageSize, recordOffset, contentType, includeModules, updatedSince) {
161
+ var params, apiPath, resp, err_6;
162
+ if (pageSize === void 0) { pageSize = 20; }
163
+ if (recordOffset === void 0) { recordOffset = 0; }
164
+ if (contentType === void 0) { contentType = contentViewType_1.ContentViewType.All; }
165
+ if (includeModules === void 0) { includeModules = true; }
166
+ return __generator(this, function (_a) {
167
+ switch (_a.label) {
168
+ case 0:
169
+ _a.trys.push([0, 2, , 3]);
170
+ params = new URLSearchParams({
171
+ pageSize: pageSize.toString(),
172
+ recordOffset: recordOffset.toString(),
173
+ contentType: contentType.toString(),
174
+ includeModules: includeModules.toString()
175
+ });
176
+ if (updatedSince) {
177
+ params.append('updatedSince', updatedSince.toISOString());
178
+ }
179
+ apiPath = "container/list/paged?".concat(params.toString());
180
+ return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
181
+ case 1:
182
+ resp = _a.sent();
183
+ return [2 /*return*/, resp.data];
184
+ case 2:
185
+ err_6 = _a.sent();
186
+ throw new exception_1.Exception("Unable to retrieve the paged container list", err_6);
187
+ case 3: return [2 /*return*/];
188
+ }
189
+ });
190
+ });
191
+ };
158
192
  ContainerMethods.prototype.getNotificationList = function (id, guid) {
159
193
  return __awaiter(this, void 0, void 0, function () {
160
- var apiPath, resp, err_6;
194
+ var apiPath, resp, err_7;
161
195
  return __generator(this, function (_a) {
162
196
  switch (_a.label) {
163
197
  case 0:
@@ -168,8 +202,8 @@ var ContainerMethods = /** @class */ (function () {
168
202
  resp = _a.sent();
169
203
  return [2 /*return*/, resp.data];
170
204
  case 2:
171
- err_6 = _a.sent();
172
- throw new exception_1.Exception("Unable to retrieve the notifications for container id: ".concat(id), err_6);
205
+ err_7 = _a.sent();
206
+ throw new exception_1.Exception("Unable to retrieve the notifications for container id: ".concat(id), err_7);
173
207
  case 3: return [2 /*return*/];
174
208
  }
175
209
  });
@@ -177,7 +211,7 @@ var ContainerMethods = /** @class */ (function () {
177
211
  };
178
212
  ContainerMethods.prototype.saveContainer = function (container_1, guid_1) {
179
213
  return __awaiter(this, arguments, void 0, function (container, guid, forceReferenceName) {
180
- var apiPath, resp, err_7;
214
+ var apiPath, resp, err_8;
181
215
  if (forceReferenceName === void 0) { forceReferenceName = false; }
182
216
  return __generator(this, function (_a) {
183
217
  switch (_a.label) {
@@ -189,8 +223,8 @@ var ContainerMethods = /** @class */ (function () {
189
223
  resp = _a.sent();
190
224
  return [2 /*return*/, resp.data];
191
225
  case 2:
192
- err_7 = _a.sent();
193
- throw new exception_1.Exception("Unable to save the container", err_7);
226
+ err_8 = _a.sent();
227
+ throw new exception_1.Exception("Unable to save the container", err_8);
194
228
  case 3: return [2 /*return*/];
195
229
  }
196
230
  });
@@ -198,7 +232,7 @@ var ContainerMethods = /** @class */ (function () {
198
232
  };
199
233
  ContainerMethods.prototype.deleteContainer = function (id, guid) {
200
234
  return __awaiter(this, void 0, void 0, function () {
201
- var apiPath, resp, err_8;
235
+ var apiPath, resp, err_9;
202
236
  return __generator(this, function (_a) {
203
237
  switch (_a.label) {
204
238
  case 0:
@@ -209,8 +243,8 @@ var ContainerMethods = /** @class */ (function () {
209
243
  resp = _a.sent();
210
244
  return [2 /*return*/, resp.data];
211
245
  case 2:
212
- err_8 = _a.sent();
213
- throw new exception_1.Exception("Unable to delete the container for id: ".concat(id), err_8);
246
+ err_9 = _a.sent();
247
+ throw new exception_1.Exception("Unable to delete the container for id: ".concat(id), err_9);
214
248
  case 3: return [2 /*return*/];
215
249
  }
216
250
  });
@@ -6,6 +6,7 @@ import { ContentListFilterModel } from "../models/contentListFilterModel";
6
6
  import { ContentItemHistory } from "../models/contentItemHistory";
7
7
  import { ItemComments } from "../models/itemComments";
8
8
  import { ListParams } from "../models/listParams";
9
+ import { WorkflowOperationType } from "../enums/workflowOperationType";
9
10
  export declare class ContentMethods {
10
11
  _options: Options;
11
12
  _clientInstance: ClientInstance;
@@ -14,6 +15,17 @@ export declare class ContentMethods {
14
15
  getContentItem(contentID: number, guid: string, locale: string): Promise<ContentItem>;
15
16
  publishContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
16
17
  unPublishContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
18
+ /**
19
+ * Perform a batch workflow operation on multiple content items.
20
+ * Supports Publish, Unpublish, Approve, Decline, and RequestApproval operations.
21
+ * @param contentIDs Array of content IDs to process
22
+ * @param guid The GUID of the user making the request
23
+ * @param locale The locale of the content items
24
+ * @param operation The workflow operation type (Publish, Unpublish, Approve, Decline, RequestApproval)
25
+ * @param returnBatchId Whether to return the batch ID immediately
26
+ * @returns The IDs of the processed content items
27
+ */
28
+ batchWorkflowContent(contentIDs: number[], guid: string, locale: string, operation: WorkflowOperationType, returnBatchId?: boolean): Promise<number[]>;
17
29
  contentRequestApproval(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
18
30
  approveContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
19
31
  declineContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
@@ -41,6 +41,8 @@ var clientInstance_1 = require("./clientInstance");
41
41
  var batchMethods_1 = require("./batchMethods");
42
42
  var exception_1 = require("../models/exception");
43
43
  var queryString_1 = require("../util/queryString");
44
+ var batchState_1 = require("../enums/batchState.");
45
+ var workflowOperationType_1 = require("../enums/workflowOperationType");
44
46
  var ContentMethods = /** @class */ (function () {
45
47
  function ContentMethods(options) {
46
48
  this._options = options;
@@ -143,9 +145,61 @@ var ContentMethods = /** @class */ (function () {
143
145
  });
144
146
  });
145
147
  };
148
+ /**
149
+ * Perform a batch workflow operation on multiple content items.
150
+ * Supports Publish, Unpublish, Approve, Decline, and RequestApproval operations.
151
+ * @param contentIDs Array of content IDs to process
152
+ * @param guid The GUID of the user making the request
153
+ * @param locale The locale of the content items
154
+ * @param operation The workflow operation type (Publish, Unpublish, Approve, Decline, RequestApproval)
155
+ * @param returnBatchId Whether to return the batch ID immediately
156
+ * @returns The IDs of the processed content items
157
+ */
158
+ ContentMethods.prototype.batchWorkflowContent = function (contentIDs_3, guid_1, locale_1, operation_1) {
159
+ return __awaiter(this, arguments, void 0, function (contentIDs, guid, locale, operation, returnBatchId) {
160
+ var contentIDsParam, operationName, apiPath, resp, batchID_3, batch, processedContentIDs_1, err_4;
161
+ var _this = this;
162
+ if (returnBatchId === void 0) { returnBatchId = false; }
163
+ return __generator(this, function (_a) {
164
+ switch (_a.label) {
165
+ case 0:
166
+ _a.trys.push([0, 3, , 4]);
167
+ contentIDsParam = contentIDs.join(',');
168
+ operationName = workflowOperationType_1.WorkflowOperationType[operation];
169
+ apiPath = "".concat(locale, "/item/batch-workflow?contentIDs=").concat(contentIDsParam, "&operation=").concat(operationName);
170
+ return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, null)];
171
+ case 1:
172
+ resp = _a.sent();
173
+ batchID_3 = resp.data;
174
+ // If user wants batchID immediately, return it for custom polling
175
+ if (returnBatchId) {
176
+ return [2 /*return*/, [batchID_3]];
177
+ }
178
+ return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
179
+ switch (_a.label) {
180
+ case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_3, guid)];
181
+ case 1: return [2 /*return*/, _a.sent()];
182
+ }
183
+ }); }); })];
184
+ case 2:
185
+ batch = _a.sent();
186
+ if (batch.batchState === batchState_1.BatchState.Processed && batch.errorData && batch.errorData.length > 0) {
187
+ throw new exception_1.Exception("Unable to batch ".concat(operationName.toLowerCase(), " content items. Batch is not completed. Error: ").concat(batch.errorData), null);
188
+ }
189
+ processedContentIDs_1 = [];
190
+ batch.items.forEach(function (element) { return processedContentIDs_1.push(element.itemID); });
191
+ return [2 /*return*/, processedContentIDs_1];
192
+ case 3:
193
+ err_4 = _a.sent();
194
+ throw new exception_1.Exception("Unable to batch ".concat(workflowOperationType_1.WorkflowOperationType[operation].toLowerCase(), " content items."), err_4);
195
+ case 4: return [2 /*return*/];
196
+ }
197
+ });
198
+ });
199
+ };
146
200
  ContentMethods.prototype.contentRequestApproval = function (contentID_1, guid_1, locale_1) {
147
201
  return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
148
- var apiPath, resp, batchID_3, batch, contentIDs_3, err_4;
202
+ var apiPath, resp, batchID_4, batch, contentIDs_3, err_5;
149
203
  var _this = this;
150
204
  if (comments === void 0) { comments = null; }
151
205
  if (returnBatchId === void 0) { returnBatchId = false; }
@@ -157,14 +211,14 @@ var ContentMethods = /** @class */ (function () {
157
211
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
158
212
  case 1:
159
213
  resp = _a.sent();
160
- batchID_3 = resp.data;
214
+ batchID_4 = resp.data;
161
215
  // If user wants batchID immediately, return it for custom polling
162
216
  if (returnBatchId) {
163
- return [2 /*return*/, [batchID_3]];
217
+ return [2 /*return*/, [batchID_4]];
164
218
  }
165
219
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
166
220
  switch (_a.label) {
167
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_3, guid)];
221
+ case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_4, guid)];
168
222
  case 1: return [2 /*return*/, _a.sent()];
169
223
  }
170
224
  }); }); })];
@@ -174,8 +228,8 @@ var ContentMethods = /** @class */ (function () {
174
228
  batch.items.forEach(function (element) { return contentIDs_3.push(element.itemID); });
175
229
  return [2 /*return*/, contentIDs_3];
176
230
  case 3:
177
- err_4 = _a.sent();
178
- throw new exception_1.Exception("Unable to request approval the content for id: ".concat(contentID), err_4);
231
+ err_5 = _a.sent();
232
+ throw new exception_1.Exception("Unable to request approval the content for id: ".concat(contentID), err_5);
179
233
  case 4: return [2 /*return*/];
180
234
  }
181
235
  });
@@ -183,7 +237,7 @@ var ContentMethods = /** @class */ (function () {
183
237
  };
184
238
  ContentMethods.prototype.approveContent = function (contentID_1, guid_1, locale_1) {
185
239
  return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
186
- var apiPath, resp, batchID_4, batch, contentIDs_4, err_5;
240
+ var apiPath, resp, batchID_5, batch, contentIDs_4, err_6;
187
241
  var _this = this;
188
242
  if (comments === void 0) { comments = null; }
189
243
  if (returnBatchId === void 0) { returnBatchId = false; }
@@ -195,14 +249,14 @@ var ContentMethods = /** @class */ (function () {
195
249
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
196
250
  case 1:
197
251
  resp = _a.sent();
198
- batchID_4 = resp.data;
252
+ batchID_5 = resp.data;
199
253
  // If user wants batchID immediately, return it for custom polling
200
254
  if (returnBatchId) {
201
- return [2 /*return*/, [batchID_4]];
255
+ return [2 /*return*/, [batchID_5]];
202
256
  }
203
257
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
204
258
  switch (_a.label) {
205
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_4, guid)];
259
+ case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_5, guid)];
206
260
  case 1: return [2 /*return*/, _a.sent()];
207
261
  }
208
262
  }); }); })];
@@ -212,8 +266,8 @@ var ContentMethods = /** @class */ (function () {
212
266
  batch.items.forEach(function (element) { return contentIDs_4.push(element.itemID); });
213
267
  return [2 /*return*/, contentIDs_4];
214
268
  case 3:
215
- err_5 = _a.sent();
216
- throw new exception_1.Exception("Unable to approve the content for id: ".concat(contentID), err_5);
269
+ err_6 = _a.sent();
270
+ throw new exception_1.Exception("Unable to approve the content for id: ".concat(contentID), err_6);
217
271
  case 4: return [2 /*return*/];
218
272
  }
219
273
  });
@@ -221,7 +275,7 @@ var ContentMethods = /** @class */ (function () {
221
275
  };
222
276
  ContentMethods.prototype.declineContent = function (contentID_1, guid_1, locale_1) {
223
277
  return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
224
- var apiPath, resp, batchID_5, batch, contentIDs_5, err_6;
278
+ var apiPath, resp, batchID_6, batch, contentIDs_5, err_7;
225
279
  var _this = this;
226
280
  if (comments === void 0) { comments = null; }
227
281
  if (returnBatchId === void 0) { returnBatchId = false; }
@@ -233,14 +287,14 @@ var ContentMethods = /** @class */ (function () {
233
287
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
234
288
  case 1:
235
289
  resp = _a.sent();
236
- batchID_5 = resp.data;
290
+ batchID_6 = resp.data;
237
291
  // If user wants batchID immediately, return it for custom polling
238
292
  if (returnBatchId) {
239
- return [2 /*return*/, [batchID_5]];
293
+ return [2 /*return*/, [batchID_6]];
240
294
  }
241
295
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
242
296
  switch (_a.label) {
243
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_5, guid)];
297
+ case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_6, guid)];
244
298
  case 1: return [2 /*return*/, _a.sent()];
245
299
  }
246
300
  }); }); })];
@@ -250,8 +304,8 @@ var ContentMethods = /** @class */ (function () {
250
304
  batch.items.forEach(function (element) { return contentIDs_5.push(element.itemID); });
251
305
  return [2 /*return*/, contentIDs_5];
252
306
  case 3:
253
- err_6 = _a.sent();
254
- throw new exception_1.Exception("Unable to decline the content for id: ".concat(contentID), err_6);
307
+ err_7 = _a.sent();
308
+ throw new exception_1.Exception("Unable to decline the content for id: ".concat(contentID), err_7);
255
309
  case 4: return [2 /*return*/];
256
310
  }
257
311
  });
@@ -259,7 +313,7 @@ var ContentMethods = /** @class */ (function () {
259
313
  };
260
314
  ContentMethods.prototype.deleteContent = function (contentID_1, guid_1, locale_1) {
261
315
  return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
262
- var apiPath, resp, batchID_6, batch, contentIDs_6, err_7;
316
+ var apiPath, resp, batchID_7, batch, contentIDs_6, err_8;
263
317
  var _this = this;
264
318
  if (comments === void 0) { comments = null; }
265
319
  if (returnBatchId === void 0) { returnBatchId = false; }
@@ -271,14 +325,14 @@ var ContentMethods = /** @class */ (function () {
271
325
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
272
326
  case 1:
273
327
  resp = _a.sent();
274
- batchID_6 = resp.data;
328
+ batchID_7 = resp.data;
275
329
  // If user wants batchID immediately, return it for custom polling
276
330
  if (returnBatchId) {
277
- return [2 /*return*/, [batchID_6]];
331
+ return [2 /*return*/, [batchID_7]];
278
332
  }
279
333
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
280
334
  switch (_a.label) {
281
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_6, guid)];
335
+ case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_7, guid)];
282
336
  case 1: return [2 /*return*/, _a.sent()];
283
337
  }
284
338
  }); }); })];
@@ -288,8 +342,8 @@ var ContentMethods = /** @class */ (function () {
288
342
  batch.items.forEach(function (element) { return contentIDs_6.push(element.itemID); });
289
343
  return [2 /*return*/, contentIDs_6];
290
344
  case 3:
291
- err_7 = _a.sent();
292
- throw new exception_1.Exception("Unable to delete the content for id: ".concat(contentID), err_7);
345
+ err_8 = _a.sent();
346
+ throw new exception_1.Exception("Unable to delete the content for id: ".concat(contentID), err_8);
293
347
  case 4: return [2 /*return*/];
294
348
  }
295
349
  });
@@ -297,7 +351,7 @@ var ContentMethods = /** @class */ (function () {
297
351
  };
298
352
  ContentMethods.prototype.saveContentItem = function (contentItem_1, guid_1, locale_1) {
299
353
  return __awaiter(this, arguments, void 0, function (contentItem, guid, locale, returnBatchId) {
300
- var apiPath, resp, batchID_7, batch, contentIDs_7, err_8;
354
+ var apiPath, resp, batchID_8, batch, contentIDs_7, err_9;
301
355
  var _this = this;
302
356
  if (returnBatchId === void 0) { returnBatchId = false; }
303
357
  return __generator(this, function (_a) {
@@ -308,14 +362,14 @@ var ContentMethods = /** @class */ (function () {
308
362
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, contentItem)];
309
363
  case 1:
310
364
  resp = _a.sent();
311
- batchID_7 = resp.data;
365
+ batchID_8 = resp.data;
312
366
  // If user wants batchID immediately, return it for custom polling
313
367
  if (returnBatchId) {
314
- return [2 /*return*/, [batchID_7]];
368
+ return [2 /*return*/, [batchID_8]];
315
369
  }
316
370
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
317
371
  switch (_a.label) {
318
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_7, guid)];
372
+ case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_8, guid)];
319
373
  case 1: return [2 /*return*/, _a.sent()];
320
374
  }
321
375
  }); }); })];
@@ -325,8 +379,8 @@ var ContentMethods = /** @class */ (function () {
325
379
  batch.items.forEach(function (element) { return contentIDs_7.push(element.itemID); });
326
380
  return [2 /*return*/, contentIDs_7];
327
381
  case 3:
328
- err_8 = _a.sent();
329
- throw new exception_1.Exception('Unable to create content.', err_8);
382
+ err_9 = _a.sent();
383
+ throw new exception_1.Exception('Unable to create content.', err_9);
330
384
  case 4: return [2 /*return*/];
331
385
  }
332
386
  });
@@ -334,7 +388,7 @@ var ContentMethods = /** @class */ (function () {
334
388
  };
335
389
  ContentMethods.prototype.saveContentItems = function (contentItems_1, guid_1, locale_1) {
336
390
  return __awaiter(this, arguments, void 0, function (contentItems, guid, locale, returnBatchId) {
337
- var apiPath, resp, batchID_8, batch, contentIDs_8, err_9;
391
+ var apiPath, resp, batchID_9, batch, contentIDs_8, err_10;
338
392
  var _this = this;
339
393
  if (returnBatchId === void 0) { returnBatchId = false; }
340
394
  return __generator(this, function (_a) {
@@ -345,14 +399,14 @@ var ContentMethods = /** @class */ (function () {
345
399
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, contentItems)];
346
400
  case 1:
347
401
  resp = _a.sent();
348
- batchID_8 = resp.data;
402
+ batchID_9 = resp.data;
349
403
  // If user wants batchID immediately, return it for custom polling
350
404
  if (returnBatchId) {
351
- return [2 /*return*/, [batchID_8]];
405
+ return [2 /*return*/, [batchID_9]];
352
406
  }
353
407
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
354
408
  switch (_a.label) {
355
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_8, guid)];
409
+ case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_9, guid)];
356
410
  case 1: return [2 /*return*/, _a.sent()];
357
411
  }
358
412
  }); }); })];
@@ -362,8 +416,8 @@ var ContentMethods = /** @class */ (function () {
362
416
  batch.items.forEach(function (element) { return contentIDs_8.push(element.itemID); });
363
417
  return [2 /*return*/, contentIDs_8];
364
418
  case 3:
365
- err_9 = _a.sent();
366
- throw new exception_1.Exception('Unable to create contents.', err_9);
419
+ err_10 = _a.sent();
420
+ throw new exception_1.Exception('Unable to create contents.', err_10);
367
421
  case 4: return [2 /*return*/];
368
422
  }
369
423
  });
@@ -371,7 +425,7 @@ var ContentMethods = /** @class */ (function () {
371
425
  };
372
426
  ContentMethods.prototype.getContentItems = function (referenceName, guid, locale, listParams) {
373
427
  return __awaiter(this, void 0, void 0, function () {
374
- var queryParams, apiPath, resp, err_10;
428
+ var queryParams, apiPath, resp, err_11;
375
429
  return __generator(this, function (_a) {
376
430
  switch (_a.label) {
377
431
  case 0:
@@ -390,8 +444,8 @@ var ContentMethods = /** @class */ (function () {
390
444
  resp = _a.sent();
391
445
  return [2 /*return*/, resp.data];
392
446
  case 2:
393
- err_10 = _a.sent();
394
- throw new exception_1.Exception("Unable retrieve the content details for reference name: ".concat(referenceName), err_10);
447
+ err_11 = _a.sent();
448
+ throw new exception_1.Exception("Unable retrieve the content details for reference name: ".concat(referenceName), err_11);
395
449
  case 3: return [2 /*return*/];
396
450
  }
397
451
  });
@@ -399,7 +453,7 @@ var ContentMethods = /** @class */ (function () {
399
453
  };
400
454
  ContentMethods.prototype.getContentList = function (referenceName_1, guid_1, locale_1, listParams_1) {
401
455
  return __awaiter(this, arguments, void 0, function (referenceName, guid, locale, listParams, filterObject) {
402
- var queryParams, apiPath, resp, err_11;
456
+ var queryParams, apiPath, resp, err_12;
403
457
  if (filterObject === void 0) { filterObject = null; }
404
458
  return __generator(this, function (_a) {
405
459
  switch (_a.label) {
@@ -419,8 +473,8 @@ var ContentMethods = /** @class */ (function () {
419
473
  resp = _a.sent();
420
474
  return [2 /*return*/, resp.data];
421
475
  case 2:
422
- err_11 = _a.sent();
423
- throw new exception_1.Exception("Unable retrieve the content details for list with reference name: ".concat(referenceName), err_11);
476
+ err_12 = _a.sent();
477
+ throw new exception_1.Exception("Unable retrieve the content details for list with reference name: ".concat(referenceName), err_12);
424
478
  case 3: return [2 /*return*/];
425
479
  }
426
480
  });
@@ -428,7 +482,7 @@ var ContentMethods = /** @class */ (function () {
428
482
  };
429
483
  ContentMethods.prototype.getContentHistory = function (locale_1, guid_1, contentID_1) {
430
484
  return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
431
- var apiPath, resp, err_12;
485
+ var apiPath, resp, err_13;
432
486
  if (take === void 0) { take = 50; }
433
487
  if (skip === void 0) { skip = 0; }
434
488
  return __generator(this, function (_a) {
@@ -441,7 +495,7 @@ var ContentMethods = /** @class */ (function () {
441
495
  resp = _a.sent();
442
496
  return [2 /*return*/, resp.data];
443
497
  case 2:
444
- err_12 = _a.sent();
498
+ err_13 = _a.sent();
445
499
  throw new exception_1.Exception("Unable to retrieve history for contentID: ".concat(contentID));
446
500
  case 3: return [2 /*return*/];
447
501
  }
@@ -450,7 +504,7 @@ var ContentMethods = /** @class */ (function () {
450
504
  };
451
505
  ContentMethods.prototype.getContentComments = function (locale_1, guid_1, contentID_1) {
452
506
  return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
453
- var apiPath, resp, err_13;
507
+ var apiPath, resp, err_14;
454
508
  if (take === void 0) { take = 50; }
455
509
  if (skip === void 0) { skip = 0; }
456
510
  return __generator(this, function (_a) {
@@ -463,7 +517,7 @@ var ContentMethods = /** @class */ (function () {
463
517
  resp = _a.sent();
464
518
  return [2 /*return*/, resp.data];
465
519
  case 2:
466
- err_13 = _a.sent();
520
+ err_14 = _a.sent();
467
521
  throw new exception_1.Exception("Unable to retrieve comments for contentID: ".concat(contentID));
468
522
  case 3: return [2 /*return*/];
469
523
  }
@@ -7,6 +7,7 @@ import { PageModel } from "../models/pageModel";
7
7
  import { ContentSectionDefinition } from "../models/contentSectionDefinition";
8
8
  import { PageHistory } from "../models/pageHistory";
9
9
  import { ItemComments } from "../models/itemComments";
10
+ import { WorkflowOperationType } from "../enums/workflowOperationType";
10
11
  export declare class PageMethods {
11
12
  _options: Options;
12
13
  _clientInstance: ClientInstance;
@@ -22,6 +23,17 @@ export declare class PageMethods {
22
23
  getPage(pageID: number, guid: string, locale: string): Promise<PageItem>;
23
24
  publishPage(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
24
25
  unPublishPage(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
26
+ /**
27
+ * Perform a batch workflow operation on multiple pages.
28
+ * Supports Publish, Unpublish, Approve, Decline, and RequestApproval operations.
29
+ * @param pageIDs Array of page IDs to process
30
+ * @param guid The GUID of the user making the request
31
+ * @param locale The locale of the pages
32
+ * @param operation The workflow operation type (Publish, Unpublish, Approve, Decline, RequestApproval)
33
+ * @param returnBatchId Whether to return the batch ID immediately
34
+ * @returns The IDs of the processed pages
35
+ */
36
+ batchWorkflowPages(pageIDs: number[], guid: string, locale: string, operation: WorkflowOperationType, returnBatchId?: boolean): Promise<number[]>;
25
37
  pageRequestApproval(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
26
38
  approvePage(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
27
39
  declinePage(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;