@agility/management-sdk 0.1.25 → 0.1.30

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 (154) hide show
  1. package/.cursor/manifest.md +98 -0
  2. package/.env +92 -0
  3. package/dist/apiClient.js.map +1 -0
  4. package/dist/apiMethods/assetMethods.js +38 -38
  5. package/dist/apiMethods/assetMethods.js.map +1 -0
  6. package/dist/apiMethods/batchMethods.js +5 -5
  7. package/dist/apiMethods/batchMethods.js.map +1 -0
  8. package/dist/apiMethods/clientInstance.js +9 -9
  9. package/dist/apiMethods/clientInstance.js.map +1 -0
  10. package/dist/apiMethods/containerMethods.d.ts +8 -1
  11. package/dist/apiMethods/containerMethods.js +35 -27
  12. package/dist/apiMethods/containerMethods.js.map +1 -0
  13. package/dist/apiMethods/contentMethods.d.ts +8 -8
  14. package/dist/apiMethods/contentMethods.js +100 -68
  15. package/dist/apiMethods/contentMethods.js.map +1 -0
  16. package/dist/apiMethods/instanceMethods.js +3 -3
  17. package/dist/apiMethods/instanceMethods.js.map +1 -0
  18. package/dist/apiMethods/instanceUserMethods.js +10 -10
  19. package/dist/apiMethods/instanceUserMethods.js.map +1 -0
  20. package/dist/apiMethods/modelMethods.js +13 -13
  21. package/dist/apiMethods/modelMethods.js.map +1 -0
  22. package/dist/apiMethods/pageMethods.d.ts +7 -7
  23. package/dist/apiMethods/pageMethods.js +98 -67
  24. package/dist/apiMethods/pageMethods.js.map +1 -0
  25. package/dist/apiMethods/serverUserMethods.js +4 -4
  26. package/dist/apiMethods/serverUserMethods.js.map +1 -0
  27. package/dist/apiMethods/webhookMethods.js +11 -11
  28. package/dist/apiMethods/webhookMethods.js.map +1 -0
  29. package/dist/enums/assetGroupingType.js +1 -1
  30. package/dist/enums/assetGroupingType.js.map +1 -0
  31. package/dist/enums/batchOperationType.js +1 -1
  32. package/dist/enums/batchOperationType.js.map +1 -0
  33. package/dist/enums/batchState..js +1 -1
  34. package/dist/enums/batchState.d.ts +7 -0
  35. package/dist/enums/batchState.js +12 -0
  36. package/dist/enums/batchState.js.map +1 -0
  37. package/dist/enums/pageItemTemplateType.js +1 -1
  38. package/dist/enums/pageItemTemplateType.js.map +1 -0
  39. package/dist/errors/exception.d.ts +4 -0
  40. package/dist/errors/exception.js +11 -0
  41. package/dist/errors/exception.js.map +1 -0
  42. package/dist/index.js +5 -1
  43. package/dist/index.js.map +1 -0
  44. package/dist/models/exception.js +2 -0
  45. package/dist/models/locales.js +2 -0
  46. package/dist/tests/authHelper.d.ts +2 -0
  47. package/dist/tests/authHelper.js +14 -0
  48. package/dist/tests/authHelper.js.map +1 -0
  49. package/dist/tests/config/apiClient.config.d.ts +16 -0
  50. package/dist/tests/config/apiClient.config.js +84 -0
  51. package/dist/tests/config/apiClient.config.js.map +1 -0
  52. package/dist/tests/config/test.config.d.ts +24 -0
  53. package/dist/tests/config/test.config.js +47 -0
  54. package/dist/tests/config/test.config.js.map +1 -0
  55. package/dist/types/apiResponse.d.ts +13 -0
  56. package/dist/types/apiResponse.js +3 -0
  57. package/dist/types/apiResponse.js.map +1 -0
  58. package/dist/types/assetContainer.d.ts +7 -0
  59. package/dist/types/assetContainer.js +3 -0
  60. package/dist/types/assetContainer.js.map +1 -0
  61. package/dist/types/assetGalleries.d.ts +5 -0
  62. package/dist/types/assetGalleries.js +3 -0
  63. package/dist/types/assetGalleries.js.map +1 -0
  64. package/dist/types/assetMediaGrouping.d.ts +17 -0
  65. package/dist/types/assetMediaGrouping.js +3 -0
  66. package/dist/types/assetMediaGrouping.js.map +1 -0
  67. package/dist/types/assetMediaGroupingMetaData.d.ts +4 -0
  68. package/dist/types/assetMediaGroupingMetaData.js +3 -0
  69. package/dist/types/assetMediaGroupingMetaData.js.map +1 -0
  70. package/dist/types/batch.d.ts +29 -0
  71. package/dist/types/batch.js +3 -0
  72. package/dist/types/batch.js.map +1 -0
  73. package/dist/types/batchItem.d.ts +13 -0
  74. package/dist/types/batchItem.js +3 -0
  75. package/dist/types/batchItem.js.map +1 -0
  76. package/dist/types/container.d.ts +47 -0
  77. package/dist/types/container.js +3 -0
  78. package/dist/types/container.js.map +1 -0
  79. package/dist/types/contentItem.d.ts +37 -0
  80. package/dist/types/contentItem.js +3 -0
  81. package/dist/types/contentItem.js.map +1 -0
  82. package/dist/types/contentItemHistory.d.ts +20 -0
  83. package/dist/types/contentItemHistory.js +3 -0
  84. package/dist/types/contentItemHistory.js.map +1 -0
  85. package/dist/types/contentListFilterModel.d.ts +26 -0
  86. package/dist/types/contentListFilterModel.js +3 -0
  87. package/dist/types/contentListFilterModel.js.map +1 -0
  88. package/dist/types/contentSectionDefaultModule.d.ts +7 -0
  89. package/dist/types/contentSectionDefaultModule.js +3 -0
  90. package/dist/types/contentSectionDefaultModule.js.map +1 -0
  91. package/dist/types/contentSectionDefinition.d.ts +35 -0
  92. package/dist/types/contentSectionDefinition.js +3 -0
  93. package/dist/types/contentSectionDefinition.js.map +1 -0
  94. package/dist/types/contentViewColumn.d.ts +8 -0
  95. package/dist/types/contentViewColumn.js +3 -0
  96. package/dist/types/contentViewColumn.js.map +1 -0
  97. package/dist/types/instanceRole.d.ts +7 -0
  98. package/dist/types/instanceRole.js +3 -0
  99. package/dist/types/instanceRole.js.map +1 -0
  100. package/dist/types/instanceUser.d.ts +14 -0
  101. package/dist/types/instanceUser.js +3 -0
  102. package/dist/types/instanceUser.js.map +1 -0
  103. package/dist/types/itemComments.d.ts +14 -0
  104. package/dist/types/itemComments.js +3 -0
  105. package/dist/types/itemComments.js.map +1 -0
  106. package/dist/types/listParams.d.ts +9 -0
  107. package/dist/types/listParams.js +3 -0
  108. package/dist/types/listParams.js.map +1 -0
  109. package/dist/types/locales.d.ts +1 -0
  110. package/dist/types/locales.js +3 -0
  111. package/dist/types/locales.js.map +1 -0
  112. package/dist/types/media.d.ts +30 -0
  113. package/dist/types/media.js +3 -0
  114. package/dist/types/media.js.map +1 -0
  115. package/dist/types/model.d.ts +30 -0
  116. package/dist/types/model.js +3 -0
  117. package/dist/types/model.js.map +1 -0
  118. package/dist/types/notification.d.ts +13 -0
  119. package/dist/types/notification.js +3 -0
  120. package/dist/types/notification.js.map +1 -0
  121. package/dist/types/options.d.ts +7 -0
  122. package/dist/types/options.js +3 -0
  123. package/dist/types/options.js.map +1 -0
  124. package/dist/types/pageHistory.d.ts +21 -0
  125. package/dist/types/pageHistory.js +3 -0
  126. package/dist/types/pageHistory.js.map +1 -0
  127. package/dist/types/pageItem.d.ts +56 -0
  128. package/dist/types/pageItem.js +3 -0
  129. package/dist/types/pageItem.js.map +1 -0
  130. package/dist/types/pageModel.d.ts +14 -0
  131. package/dist/types/pageModel.js +3 -0
  132. package/dist/types/pageModel.js.map +1 -0
  133. package/dist/types/serverUser.d.ts +21 -0
  134. package/dist/types/serverUser.js +3 -0
  135. package/dist/types/serverUser.js.map +1 -0
  136. package/dist/types/sharedModule.d.ts +7 -0
  137. package/dist/types/sharedModule.js +3 -0
  138. package/dist/types/sharedModule.js.map +1 -0
  139. package/dist/types/sitemap.d.ts +20 -0
  140. package/dist/types/sitemap.js +3 -0
  141. package/dist/types/sitemap.js.map +1 -0
  142. package/dist/types/tokenResponseData.d.ts +10 -0
  143. package/dist/types/tokenResponseData.js +3 -0
  144. package/dist/types/tokenResponseData.js.map +1 -0
  145. package/dist/types/webhook.d.ts +9 -0
  146. package/dist/types/webhook.js +3 -0
  147. package/dist/types/webhook.js.map +1 -0
  148. package/dist/types/websiteListing.d.ts +16 -0
  149. package/dist/types/websiteListing.js +3 -0
  150. package/dist/types/websiteListing.js.map +1 -0
  151. package/dist/types/websiteUser.d.ts +22 -0
  152. package/dist/types/websiteUser.js +3 -0
  153. package/dist/types/websiteUser.js.map +1 -0
  154. package/package.json +1 -1
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -51,14 +51,14 @@ var ContainerMethods = /** @class */ (function () {
51
51
  switch (_a.label) {
52
52
  case 0:
53
53
  _a.trys.push([0, 2, , 3]);
54
- apiPath = "container/" + id;
54
+ apiPath = "container/".concat(id);
55
55
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
56
56
  case 1:
57
57
  resp = _a.sent();
58
58
  return [2 /*return*/, resp.data];
59
59
  case 2:
60
60
  err_1 = _a.sent();
61
- throw new exception_1.Exception("Unable to retrieve the container for id: " + id, err_1);
61
+ throw new exception_1.Exception("Unable to retrieve the container for id: ".concat(id), err_1);
62
62
  case 3: return [2 /*return*/];
63
63
  }
64
64
  });
@@ -71,37 +71,45 @@ var ContainerMethods = /** @class */ (function () {
71
71
  switch (_a.label) {
72
72
  case 0:
73
73
  _a.trys.push([0, 2, , 3]);
74
- apiPath = "container/model/" + modelId;
74
+ apiPath = "container/model/".concat(modelId);
75
75
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
76
76
  case 1:
77
77
  resp = _a.sent();
78
78
  return [2 /*return*/, resp.data];
79
79
  case 2:
80
80
  err_2 = _a.sent();
81
- throw new exception_1.Exception("Unable to retrieve the containers for id: " + modelId, err_2);
81
+ throw new exception_1.Exception("Unable to retrieve the containers for id: ".concat(modelId), err_2);
82
82
  case 3: return [2 /*return*/];
83
83
  }
84
84
  });
85
85
  });
86
86
  };
87
+ /**
88
+ * Retrieves a container by its reference name.
89
+ * Returns the container if found, or null if the container does not exist (404 error).
90
+ * @param referenceName - The reference name of the container.
91
+ * @param guid - The GUID for authentication.
92
+ * @returns The container or null if not found.
93
+ */
87
94
  ContainerMethods.prototype.getContainerByReferenceName = function (referenceName, guid) {
88
95
  return __awaiter(this, void 0, void 0, function () {
89
96
  var apiPath, resp, err_3;
90
- return __generator(this, function (_a) {
91
- switch (_a.label) {
97
+ var _a;
98
+ return __generator(this, function (_b) {
99
+ switch (_b.label) {
92
100
  case 0:
93
- _a.trys.push([0, 2, , 3]);
94
- apiPath = "container/" + referenceName;
101
+ _b.trys.push([0, 2, , 3]);
102
+ apiPath = "container/".concat(referenceName);
95
103
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
96
104
  case 1:
97
- resp = _a.sent();
98
- if (resp.status === 404) {
99
- return [2 /*return*/, null]; // If the container is not found, return null
100
- }
105
+ resp = _b.sent();
101
106
  return [2 /*return*/, resp.data];
102
107
  case 2:
103
- err_3 = _a.sent();
104
- throw new exception_1.Exception("Unable to retrieve the container for referenceName: " + referenceName, err_3);
108
+ err_3 = _b.sent();
109
+ if (((_a = err_3.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
110
+ return [2 /*return*/, null]; // If the container is not found, return null
111
+ }
112
+ throw new exception_1.Exception("Unable to retrieve the container for referenceName: ".concat(referenceName), err_3);
105
113
  case 3: return [2 /*return*/];
106
114
  }
107
115
  });
@@ -114,14 +122,14 @@ var ContainerMethods = /** @class */ (function () {
114
122
  switch (_a.label) {
115
123
  case 0:
116
124
  _a.trys.push([0, 2, , 3]);
117
- apiPath = "container/" + id + "/security";
125
+ apiPath = "container/".concat(id, "/security");
118
126
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
119
127
  case 1:
120
128
  resp = _a.sent();
121
129
  return [2 /*return*/, resp.data];
122
130
  case 2:
123
131
  err_4 = _a.sent();
124
- throw new exception_1.Exception("Unable to retrieve the container for id: " + id, err_4);
132
+ throw new exception_1.Exception("Unable to retrieve the container for id: ".concat(id), err_4);
125
133
  case 3: return [2 /*return*/];
126
134
  }
127
135
  });
@@ -154,28 +162,28 @@ var ContainerMethods = /** @class */ (function () {
154
162
  switch (_a.label) {
155
163
  case 0:
156
164
  _a.trys.push([0, 2, , 3]);
157
- apiPath = "container/" + id + "/notifications";
165
+ apiPath = "container/".concat(id, "/notifications");
158
166
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
159
167
  case 1:
160
168
  resp = _a.sent();
161
169
  return [2 /*return*/, resp.data];
162
170
  case 2:
163
171
  err_6 = _a.sent();
164
- throw new exception_1.Exception("Unable to retrieve the notifications for container id: " + id, err_6);
172
+ throw new exception_1.Exception("Unable to retrieve the notifications for container id: ".concat(id), err_6);
165
173
  case 3: return [2 /*return*/];
166
174
  }
167
175
  });
168
176
  });
169
177
  };
170
- ContainerMethods.prototype.saveContainer = function (container, guid, forceReferenceName) {
171
- if (forceReferenceName === void 0) { forceReferenceName = false; }
172
- return __awaiter(this, void 0, void 0, function () {
178
+ ContainerMethods.prototype.saveContainer = function (container_1, guid_1) {
179
+ return __awaiter(this, arguments, void 0, function (container, guid, forceReferenceName) {
173
180
  var apiPath, resp, err_7;
181
+ if (forceReferenceName === void 0) { forceReferenceName = false; }
174
182
  return __generator(this, function (_a) {
175
183
  switch (_a.label) {
176
184
  case 0:
177
185
  _a.trys.push([0, 2, , 3]);
178
- apiPath = "container" + (forceReferenceName ? '?forceReferenceName=true' : '');
186
+ apiPath = "container".concat(forceReferenceName ? '?forceReferenceName=true' : '');
179
187
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, container)];
180
188
  case 1:
181
189
  resp = _a.sent();
@@ -195,14 +203,14 @@ var ContainerMethods = /** @class */ (function () {
195
203
  switch (_a.label) {
196
204
  case 0:
197
205
  _a.trys.push([0, 2, , 3]);
198
- apiPath = "container/" + id;
206
+ apiPath = "container/".concat(id);
199
207
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
200
208
  case 1:
201
209
  resp = _a.sent();
202
210
  return [2 /*return*/, resp.data];
203
211
  case 2:
204
212
  err_8 = _a.sent();
205
- throw new exception_1.Exception("Unable to delete the container for id: " + id, err_8);
213
+ throw new exception_1.Exception("Unable to delete the container for id: ".concat(id), err_8);
206
214
  case 3: return [2 /*return*/];
207
215
  }
208
216
  });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containerMethods.js","sourceRoot":"","sources":["../../src/apiMethods/containerMethods.ts"],"names":[],"mappings":"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"}
@@ -12,14 +12,14 @@ export declare class ContentMethods {
12
12
  _batchMethods: BatchMethods;
13
13
  constructor(options: Options);
14
14
  getContentItem(contentID: number, guid: string, locale: string): Promise<ContentItem>;
15
- publishContent(contentID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
16
- unPublishContent(contentID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
17
- contentRequestApproval(contentID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
18
- approveContent(contentID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
19
- declineContent(contentID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
20
- deleteContent(contentID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
21
- saveContentItem(contentItem: ContentItem, guid: string, locale: string): Promise<import("..").Batch | number[]>;
22
- saveContentItems(contentItems: ContentItem[], guid: string, locale: string): Promise<import("..").Batch | number[]>;
15
+ publishContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
16
+ unPublishContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
17
+ contentRequestApproval(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
18
+ approveContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
19
+ declineContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
20
+ deleteContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
21
+ saveContentItem(contentItem: ContentItem, guid: string, locale: string, returnBatchId?: boolean): Promise<number[]>;
22
+ saveContentItems(contentItems: ContentItem[], guid: string, locale: string, returnBatchId?: boolean): Promise<number[]>;
23
23
  getContentItems(referenceName: string, guid: string, locale: string, listParams: ListParams): Promise<ContentList>;
24
24
  getContentList(referenceName: string, guid: string, locale: string, listParams: ListParams, filterObject?: ContentListFilterModel): Promise<ContentList>;
25
25
  getContentHistory(locale: string, guid: string, contentID: number, take?: number, skip?: number): Promise<ContentItemHistory>;
@@ -9,12 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
13
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -53,33 +53,38 @@ var ContentMethods = /** @class */ (function () {
53
53
  switch (_a.label) {
54
54
  case 0:
55
55
  _a.trys.push([0, 2, , 3]);
56
- apiPath = locale + "/item/" + contentID;
56
+ apiPath = "".concat(locale, "/item/").concat(contentID);
57
57
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
58
58
  case 1:
59
59
  resp = _a.sent();
60
60
  return [2 /*return*/, resp.data];
61
61
  case 2:
62
62
  err_1 = _a.sent();
63
- throw new exception_1.Exception("Unable to retrieve the content for id: " + contentID, err_1);
63
+ throw new exception_1.Exception("Unable to retrieve the content for id: ".concat(contentID), err_1);
64
64
  case 3: return [2 /*return*/];
65
65
  }
66
66
  });
67
67
  });
68
68
  };
69
- ContentMethods.prototype.publishContent = function (contentID, guid, locale, comments) {
70
- if (comments === void 0) { comments = null; }
71
- return __awaiter(this, void 0, void 0, function () {
69
+ ContentMethods.prototype.publishContent = function (contentID_1, guid_1, locale_1) {
70
+ return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
72
71
  var apiPath, resp, batchID_1, batch, contentIDs_1, err_2;
73
72
  var _this = this;
73
+ if (comments === void 0) { comments = null; }
74
+ if (returnBatchId === void 0) { returnBatchId = false; }
74
75
  return __generator(this, function (_a) {
75
76
  switch (_a.label) {
76
77
  case 0:
77
78
  _a.trys.push([0, 3, , 4]);
78
- apiPath = locale + "/item/" + contentID + "/publish?comments=" + comments;
79
+ apiPath = "".concat(locale, "/item/").concat(contentID, "/publish?comments=").concat(comments);
79
80
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
80
81
  case 1:
81
82
  resp = _a.sent();
82
83
  batchID_1 = resp.data;
84
+ // If user wants batchID immediately, return it for custom polling
85
+ if (returnBatchId) {
86
+ return [2 /*return*/, [batchID_1]];
87
+ }
83
88
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
84
89
  switch (_a.label) {
85
90
  case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_1, guid)];
@@ -93,26 +98,31 @@ var ContentMethods = /** @class */ (function () {
93
98
  return [2 /*return*/, contentIDs_1];
94
99
  case 3:
95
100
  err_2 = _a.sent();
96
- throw new exception_1.Exception("Unable to publish the content for id: " + contentID, err_2);
101
+ throw new exception_1.Exception("Unable to publish the content for id: ".concat(contentID), err_2);
97
102
  case 4: return [2 /*return*/];
98
103
  }
99
104
  });
100
105
  });
101
106
  };
102
- ContentMethods.prototype.unPublishContent = function (contentID, guid, locale, comments) {
103
- if (comments === void 0) { comments = null; }
104
- return __awaiter(this, void 0, void 0, function () {
107
+ ContentMethods.prototype.unPublishContent = function (contentID_1, guid_1, locale_1) {
108
+ return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
105
109
  var apiPath, resp, batchID_2, batch, contentIDs_2, err_3;
106
110
  var _this = this;
111
+ if (comments === void 0) { comments = null; }
112
+ if (returnBatchId === void 0) { returnBatchId = false; }
107
113
  return __generator(this, function (_a) {
108
114
  switch (_a.label) {
109
115
  case 0:
110
116
  _a.trys.push([0, 3, , 4]);
111
- apiPath = locale + "/item/" + contentID + "/unpublish?comments=" + comments;
117
+ apiPath = "".concat(locale, "/item/").concat(contentID, "/unpublish?comments=").concat(comments);
112
118
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
113
119
  case 1:
114
120
  resp = _a.sent();
115
121
  batchID_2 = resp.data;
122
+ // If user wants batchID immediately, return it for custom polling
123
+ if (returnBatchId) {
124
+ return [2 /*return*/, [batchID_2]];
125
+ }
116
126
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
117
127
  switch (_a.label) {
118
128
  case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_2, guid)];
@@ -126,26 +136,31 @@ var ContentMethods = /** @class */ (function () {
126
136
  return [2 /*return*/, contentIDs_2];
127
137
  case 3:
128
138
  err_3 = _a.sent();
129
- throw new exception_1.Exception("Unable to un-publish the content for id: " + contentID, err_3);
139
+ throw new exception_1.Exception("Unable to un-publish the content for id: ".concat(contentID), err_3);
130
140
  case 4: return [2 /*return*/];
131
141
  }
132
142
  });
133
143
  });
134
144
  };
135
- ContentMethods.prototype.contentRequestApproval = function (contentID, guid, locale, comments) {
136
- if (comments === void 0) { comments = null; }
137
- return __awaiter(this, void 0, void 0, function () {
145
+ ContentMethods.prototype.contentRequestApproval = function (contentID_1, guid_1, locale_1) {
146
+ return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
138
147
  var apiPath, resp, batchID_3, batch, contentIDs_3, err_4;
139
148
  var _this = this;
149
+ if (comments === void 0) { comments = null; }
150
+ if (returnBatchId === void 0) { returnBatchId = false; }
140
151
  return __generator(this, function (_a) {
141
152
  switch (_a.label) {
142
153
  case 0:
143
154
  _a.trys.push([0, 3, , 4]);
144
- apiPath = locale + "/item/" + contentID + "/request-approval?comments=" + comments;
155
+ apiPath = "".concat(locale, "/item/").concat(contentID, "/request-approval?comments=").concat(comments);
145
156
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
146
157
  case 1:
147
158
  resp = _a.sent();
148
159
  batchID_3 = resp.data;
160
+ // If user wants batchID immediately, return it for custom polling
161
+ if (returnBatchId) {
162
+ return [2 /*return*/, [batchID_3]];
163
+ }
149
164
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
150
165
  switch (_a.label) {
151
166
  case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_3, guid)];
@@ -159,26 +174,31 @@ var ContentMethods = /** @class */ (function () {
159
174
  return [2 /*return*/, contentIDs_3];
160
175
  case 3:
161
176
  err_4 = _a.sent();
162
- throw new exception_1.Exception("Unable to request approval the content for id: " + contentID, err_4);
177
+ throw new exception_1.Exception("Unable to request approval the content for id: ".concat(contentID), err_4);
163
178
  case 4: return [2 /*return*/];
164
179
  }
165
180
  });
166
181
  });
167
182
  };
168
- ContentMethods.prototype.approveContent = function (contentID, guid, locale, comments) {
169
- if (comments === void 0) { comments = null; }
170
- return __awaiter(this, void 0, void 0, function () {
183
+ ContentMethods.prototype.approveContent = function (contentID_1, guid_1, locale_1) {
184
+ return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
171
185
  var apiPath, resp, batchID_4, batch, contentIDs_4, err_5;
172
186
  var _this = this;
187
+ if (comments === void 0) { comments = null; }
188
+ if (returnBatchId === void 0) { returnBatchId = false; }
173
189
  return __generator(this, function (_a) {
174
190
  switch (_a.label) {
175
191
  case 0:
176
192
  _a.trys.push([0, 3, , 4]);
177
- apiPath = locale + "/item/" + contentID + "/approve?comments=" + comments;
193
+ apiPath = "".concat(locale, "/item/").concat(contentID, "/approve?comments=").concat(comments);
178
194
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
179
195
  case 1:
180
196
  resp = _a.sent();
181
197
  batchID_4 = resp.data;
198
+ // If user wants batchID immediately, return it for custom polling
199
+ if (returnBatchId) {
200
+ return [2 /*return*/, [batchID_4]];
201
+ }
182
202
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
183
203
  switch (_a.label) {
184
204
  case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_4, guid)];
@@ -192,26 +212,31 @@ var ContentMethods = /** @class */ (function () {
192
212
  return [2 /*return*/, contentIDs_4];
193
213
  case 3:
194
214
  err_5 = _a.sent();
195
- throw new exception_1.Exception("Unable to approve the content for id: " + contentID, err_5);
215
+ throw new exception_1.Exception("Unable to approve the content for id: ".concat(contentID), err_5);
196
216
  case 4: return [2 /*return*/];
197
217
  }
198
218
  });
199
219
  });
200
220
  };
201
- ContentMethods.prototype.declineContent = function (contentID, guid, locale, comments) {
202
- if (comments === void 0) { comments = null; }
203
- return __awaiter(this, void 0, void 0, function () {
221
+ ContentMethods.prototype.declineContent = function (contentID_1, guid_1, locale_1) {
222
+ return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
204
223
  var apiPath, resp, batchID_5, batch, contentIDs_5, err_6;
205
224
  var _this = this;
225
+ if (comments === void 0) { comments = null; }
226
+ if (returnBatchId === void 0) { returnBatchId = false; }
206
227
  return __generator(this, function (_a) {
207
228
  switch (_a.label) {
208
229
  case 0:
209
230
  _a.trys.push([0, 3, , 4]);
210
- apiPath = locale + "/item/" + contentID + "/decline?comments=" + comments;
231
+ apiPath = "".concat(locale, "/item/").concat(contentID, "/decline?comments=").concat(comments);
211
232
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
212
233
  case 1:
213
234
  resp = _a.sent();
214
235
  batchID_5 = resp.data;
236
+ // If user wants batchID immediately, return it for custom polling
237
+ if (returnBatchId) {
238
+ return [2 /*return*/, [batchID_5]];
239
+ }
215
240
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
216
241
  switch (_a.label) {
217
242
  case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_5, guid)];
@@ -225,26 +250,31 @@ var ContentMethods = /** @class */ (function () {
225
250
  return [2 /*return*/, contentIDs_5];
226
251
  case 3:
227
252
  err_6 = _a.sent();
228
- throw new exception_1.Exception("Unable to decline the content for id: " + contentID, err_6);
253
+ throw new exception_1.Exception("Unable to decline the content for id: ".concat(contentID), err_6);
229
254
  case 4: return [2 /*return*/];
230
255
  }
231
256
  });
232
257
  });
233
258
  };
234
- ContentMethods.prototype.deleteContent = function (contentID, guid, locale, comments) {
235
- if (comments === void 0) { comments = null; }
236
- return __awaiter(this, void 0, void 0, function () {
259
+ ContentMethods.prototype.deleteContent = function (contentID_1, guid_1, locale_1) {
260
+ return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
237
261
  var apiPath, resp, batchID_6, batch, contentIDs_6, err_7;
238
262
  var _this = this;
263
+ if (comments === void 0) { comments = null; }
264
+ if (returnBatchId === void 0) { returnBatchId = false; }
239
265
  return __generator(this, function (_a) {
240
266
  switch (_a.label) {
241
267
  case 0:
242
268
  _a.trys.push([0, 3, , 4]);
243
- apiPath = locale + "/item/" + contentID + "?comments=" + comments;
269
+ apiPath = "".concat(locale, "/item/").concat(contentID, "?comments=").concat(comments);
244
270
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
245
271
  case 1:
246
272
  resp = _a.sent();
247
273
  batchID_6 = resp.data;
274
+ // If user wants batchID immediately, return it for custom polling
275
+ if (returnBatchId) {
276
+ return [2 /*return*/, [batchID_6]];
277
+ }
248
278
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
249
279
  switch (_a.label) {
250
280
  case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_6, guid)];
@@ -258,25 +288,30 @@ var ContentMethods = /** @class */ (function () {
258
288
  return [2 /*return*/, contentIDs_6];
259
289
  case 3:
260
290
  err_7 = _a.sent();
261
- throw new exception_1.Exception("Unable to delete the content for id: " + contentID, err_7);
291
+ throw new exception_1.Exception("Unable to delete the content for id: ".concat(contentID), err_7);
262
292
  case 4: return [2 /*return*/];
263
293
  }
264
294
  });
265
295
  });
266
296
  };
267
- ContentMethods.prototype.saveContentItem = function (contentItem, guid, locale) {
268
- return __awaiter(this, void 0, void 0, function () {
297
+ ContentMethods.prototype.saveContentItem = function (contentItem_1, guid_1, locale_1) {
298
+ return __awaiter(this, arguments, void 0, function (contentItem, guid, locale, returnBatchId) {
269
299
  var apiPath, resp, batchID_7, batch, contentIDs_7, err_8;
270
300
  var _this = this;
301
+ if (returnBatchId === void 0) { returnBatchId = false; }
271
302
  return __generator(this, function (_a) {
272
303
  switch (_a.label) {
273
304
  case 0:
274
305
  _a.trys.push([0, 3, , 4]);
275
- apiPath = locale + "/item";
306
+ apiPath = "".concat(locale, "/item");
276
307
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, contentItem)];
277
308
  case 1:
278
309
  resp = _a.sent();
279
310
  batchID_7 = resp.data;
311
+ // If user wants batchID immediately, return it for custom polling
312
+ if (returnBatchId) {
313
+ return [2 /*return*/, [batchID_7]];
314
+ }
280
315
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
281
316
  switch (_a.label) {
282
317
  case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_7, guid)];
@@ -285,10 +320,6 @@ var ContentMethods = /** @class */ (function () {
285
320
  }); }); })];
286
321
  case 2:
287
322
  batch = _a.sent();
288
- // Aaaron May 1 2025 - if the batch has error data, return the batch not just the -1 contentID
289
- if (batch.errorData) {
290
- return [2 /*return*/, batch];
291
- }
292
323
  contentIDs_7 = [];
293
324
  batch.items.forEach(function (element) { return contentIDs_7.push(element.itemID); });
294
325
  return [2 /*return*/, contentIDs_7];
@@ -300,19 +331,24 @@ var ContentMethods = /** @class */ (function () {
300
331
  });
301
332
  });
302
333
  };
303
- ContentMethods.prototype.saveContentItems = function (contentItems, guid, locale) {
304
- return __awaiter(this, void 0, void 0, function () {
334
+ ContentMethods.prototype.saveContentItems = function (contentItems_1, guid_1, locale_1) {
335
+ return __awaiter(this, arguments, void 0, function (contentItems, guid, locale, returnBatchId) {
305
336
  var apiPath, resp, batchID_8, batch, contentIDs_8, err_9;
306
337
  var _this = this;
338
+ if (returnBatchId === void 0) { returnBatchId = false; }
307
339
  return __generator(this, function (_a) {
308
340
  switch (_a.label) {
309
341
  case 0:
310
342
  _a.trys.push([0, 3, , 4]);
311
- apiPath = locale + "/item/multi";
343
+ apiPath = "".concat(locale, "/item/multi");
312
344
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, contentItems)];
313
345
  case 1:
314
346
  resp = _a.sent();
315
347
  batchID_8 = resp.data;
348
+ // If user wants batchID immediately, return it for custom polling
349
+ if (returnBatchId) {
350
+ return [2 /*return*/, [batchID_8]];
351
+ }
316
352
  return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
317
353
  switch (_a.label) {
318
354
  case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_8, guid)];
@@ -321,10 +357,6 @@ var ContentMethods = /** @class */ (function () {
321
357
  }); }); })];
322
358
  case 2:
323
359
  batch = _a.sent();
324
- // Aaaron May 1 2025 - if the batch has error data, return the batch not just the -1 contentID
325
- if (batch.errorData) {
326
- return [2 /*return*/, batch];
327
- }
328
360
  contentIDs_8 = [];
329
361
  batch.items.forEach(function (element) { return contentIDs_8.push(element.itemID); });
330
362
  return [2 /*return*/, contentIDs_8];
@@ -343,79 +375,79 @@ var ContentMethods = /** @class */ (function () {
343
375
  switch (_a.label) {
344
376
  case 0:
345
377
  _a.trys.push([0, 2, , 3]);
346
- apiPath = locale + "/list/" + referenceName + "?filter=" + listParams.filter + "&fields=" + listParams.fields + "&sortDirection=" + listParams.sortDirection + "&sortField=" + listParams.sortField + "&take=" + listParams.take + "&skip=" + listParams.skip;
378
+ apiPath = "".concat(locale, "/list/").concat(referenceName, "?filter=").concat(listParams.filter, "&fields=").concat(listParams.fields, "&sortDirection=").concat(listParams.sortDirection, "&sortField=").concat(listParams.sortField, "&take=").concat(listParams.take, "&skip=").concat(listParams.skip);
347
379
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
348
380
  case 1:
349
381
  resp = _a.sent();
350
382
  return [2 /*return*/, resp.data];
351
383
  case 2:
352
384
  err_10 = _a.sent();
353
- throw new exception_1.Exception("Unable retrieve the content details for reference name: " + referenceName, err_10);
385
+ throw new exception_1.Exception("Unable retrieve the content details for reference name: ".concat(referenceName), err_10);
354
386
  case 3: return [2 /*return*/];
355
387
  }
356
388
  });
357
389
  });
358
390
  };
359
- ContentMethods.prototype.getContentList = function (referenceName, guid, locale, listParams, filterObject) {
360
- if (filterObject === void 0) { filterObject = null; }
361
- return __awaiter(this, void 0, void 0, function () {
391
+ ContentMethods.prototype.getContentList = function (referenceName_1, guid_1, locale_1, listParams_1) {
392
+ return __awaiter(this, arguments, void 0, function (referenceName, guid, locale, listParams, filterObject) {
362
393
  var apiPath, resp, err_11;
394
+ if (filterObject === void 0) { filterObject = null; }
363
395
  return __generator(this, function (_a) {
364
396
  switch (_a.label) {
365
397
  case 0:
366
398
  _a.trys.push([0, 2, , 3]);
367
- apiPath = locale + "/list/" + referenceName + "?fields=" + listParams.fields + "&sortDirection=" + listParams.sortDirection + "&sortField=" + listParams.sortField + "&take=" + listParams.take + "&skip=" + listParams.skip + "&showDeleted=" + listParams.showDeleted;
399
+ apiPath = "".concat(locale, "/list/").concat(referenceName, "?fields=").concat(listParams.fields, "&sortDirection=").concat(listParams.sortDirection, "&sortField=").concat(listParams.sortField, "&take=").concat(listParams.take, "&skip=").concat(listParams.skip, "&showDeleted=").concat(listParams.showDeleted);
368
400
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, filterObject)];
369
401
  case 1:
370
402
  resp = _a.sent();
371
403
  return [2 /*return*/, resp.data];
372
404
  case 2:
373
405
  err_11 = _a.sent();
374
- throw new exception_1.Exception("Unable retrieve the content details for list with reference name: " + referenceName, err_11);
406
+ throw new exception_1.Exception("Unable retrieve the content details for list with reference name: ".concat(referenceName), err_11);
375
407
  case 3: return [2 /*return*/];
376
408
  }
377
409
  });
378
410
  });
379
411
  };
380
- ContentMethods.prototype.getContentHistory = function (locale, guid, contentID, take, skip) {
381
- if (take === void 0) { take = 50; }
382
- if (skip === void 0) { skip = 0; }
383
- return __awaiter(this, void 0, void 0, function () {
412
+ ContentMethods.prototype.getContentHistory = function (locale_1, guid_1, contentID_1) {
413
+ return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
384
414
  var apiPath, resp, err_12;
415
+ if (take === void 0) { take = 50; }
416
+ if (skip === void 0) { skip = 0; }
385
417
  return __generator(this, function (_a) {
386
418
  switch (_a.label) {
387
419
  case 0:
388
420
  _a.trys.push([0, 2, , 3]);
389
- apiPath = locale + "/item/" + contentID + "/history?take=" + take + "&skip=" + skip;
421
+ apiPath = "".concat(locale, "/item/").concat(contentID, "/history?take=").concat(take, "&skip=").concat(skip);
390
422
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
391
423
  case 1:
392
424
  resp = _a.sent();
393
425
  return [2 /*return*/, resp.data];
394
426
  case 2:
395
427
  err_12 = _a.sent();
396
- throw new exception_1.Exception("Unable to retrieve history for contentID: " + contentID);
428
+ throw new exception_1.Exception("Unable to retrieve history for contentID: ".concat(contentID));
397
429
  case 3: return [2 /*return*/];
398
430
  }
399
431
  });
400
432
  });
401
433
  };
402
- ContentMethods.prototype.getContentComments = function (locale, guid, contentID, take, skip) {
403
- if (take === void 0) { take = 50; }
404
- if (skip === void 0) { skip = 0; }
405
- return __awaiter(this, void 0, void 0, function () {
434
+ ContentMethods.prototype.getContentComments = function (locale_1, guid_1, contentID_1) {
435
+ return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
406
436
  var apiPath, resp, err_13;
437
+ if (take === void 0) { take = 50; }
438
+ if (skip === void 0) { skip = 0; }
407
439
  return __generator(this, function (_a) {
408
440
  switch (_a.label) {
409
441
  case 0:
410
442
  _a.trys.push([0, 2, , 3]);
411
- apiPath = locale + "/item/" + contentID + "/comments?take=" + take + "&skip=" + skip;
443
+ apiPath = "".concat(locale, "/item/").concat(contentID, "/comments?take=").concat(take, "&skip=").concat(skip);
412
444
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
413
445
  case 1:
414
446
  resp = _a.sent();
415
447
  return [2 /*return*/, resp.data];
416
448
  case 2:
417
449
  err_13 = _a.sent();
418
- throw new exception_1.Exception("Unable to retrieve comments for contentID: " + contentID);
450
+ throw new exception_1.Exception("Unable to retrieve comments for contentID: ".concat(contentID));
419
451
  case 3: return [2 /*return*/];
420
452
  }
421
453
  });