@agility/management-sdk 0.1.30 → 0.1.32

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 (165) hide show
  1. package/README.md +238 -471
  2. package/dist/apiMethods/assetMethods.js +38 -38
  3. package/dist/apiMethods/batchMethods.d.ts +32 -1
  4. package/dist/apiMethods/batchMethods.js +238 -8
  5. package/dist/apiMethods/clientInstance.d.ts +1 -1
  6. package/dist/apiMethods/clientInstance.js +12 -11
  7. package/dist/apiMethods/containerMethods.js +20 -20
  8. package/dist/apiMethods/contentMethods.js +68 -68
  9. package/dist/apiMethods/instanceMethods.js +3 -3
  10. package/dist/apiMethods/instanceUserMethods.js +10 -10
  11. package/dist/apiMethods/modelMethods.js +13 -13
  12. package/dist/apiMethods/pageMethods.d.ts +13 -1
  13. package/dist/apiMethods/pageMethods.js +88 -70
  14. package/dist/apiMethods/serverUserMethods.js +4 -4
  15. package/dist/apiMethods/webhookMethods.js +11 -11
  16. package/dist/enums/assetGroupingType.js +1 -1
  17. package/dist/enums/batchItemType.d.ts +7 -0
  18. package/dist/enums/batchItemType.js +11 -0
  19. package/dist/enums/batchOperationType.js +1 -1
  20. package/dist/enums/batchState..js +1 -1
  21. package/dist/enums/pageItemTemplateType.js +1 -1
  22. package/dist/enums/workflowOperationType.d.ts +26 -0
  23. package/dist/enums/workflowOperationType.js +30 -0
  24. package/dist/index.d.ts +6 -0
  25. package/dist/index.js +7 -5
  26. package/dist/models/batchItem.d.ts +1 -0
  27. package/dist/models/batchTypes.d.ts +34 -0
  28. package/dist/{types/media.js → models/batchTypes.js} +0 -1
  29. package/dist/models/container.d.ts +2 -1
  30. package/dist/models/contentDefinitionTypeID.d.ts +17 -0
  31. package/dist/models/contentDefinitionTypeID.js +21 -0
  32. package/dist/models/exception.js +0 -2
  33. package/dist/models/locales.js +0 -2
  34. package/package.json +1 -1
  35. package/.cursor/manifest.md +0 -98
  36. package/.env +0 -92
  37. package/dist/apiClient.js.map +0 -1
  38. package/dist/apiMethods/assetMethods.js.map +0 -1
  39. package/dist/apiMethods/batchMethods.js.map +0 -1
  40. package/dist/apiMethods/clientInstance.js.map +0 -1
  41. package/dist/apiMethods/containerMethods.js.map +0 -1
  42. package/dist/apiMethods/contentMethods.js.map +0 -1
  43. package/dist/apiMethods/instanceMethods.js.map +0 -1
  44. package/dist/apiMethods/instanceUserMethods.js.map +0 -1
  45. package/dist/apiMethods/modelMethods.js.map +0 -1
  46. package/dist/apiMethods/pageMethods.js.map +0 -1
  47. package/dist/apiMethods/serverUserMethods.js.map +0 -1
  48. package/dist/apiMethods/webhookMethods.js.map +0 -1
  49. package/dist/enums/assetGroupingType.js.map +0 -1
  50. package/dist/enums/batchOperationType.js.map +0 -1
  51. package/dist/enums/batchState.d.ts +0 -7
  52. package/dist/enums/batchState.js +0 -12
  53. package/dist/enums/batchState.js.map +0 -1
  54. package/dist/enums/pageItemTemplateType.js.map +0 -1
  55. package/dist/errors/exception.d.ts +0 -4
  56. package/dist/errors/exception.js +0 -11
  57. package/dist/errors/exception.js.map +0 -1
  58. package/dist/index.js.map +0 -1
  59. package/dist/tests/authHelper.d.ts +0 -2
  60. package/dist/tests/authHelper.js +0 -14
  61. package/dist/tests/authHelper.js.map +0 -1
  62. package/dist/tests/config/apiClient.config.d.ts +0 -16
  63. package/dist/tests/config/apiClient.config.js +0 -84
  64. package/dist/tests/config/apiClient.config.js.map +0 -1
  65. package/dist/tests/config/test.config.d.ts +0 -24
  66. package/dist/tests/config/test.config.js +0 -47
  67. package/dist/tests/config/test.config.js.map +0 -1
  68. package/dist/types/apiResponse.d.ts +0 -13
  69. package/dist/types/apiResponse.js +0 -3
  70. package/dist/types/apiResponse.js.map +0 -1
  71. package/dist/types/assetContainer.d.ts +0 -7
  72. package/dist/types/assetContainer.js +0 -3
  73. package/dist/types/assetContainer.js.map +0 -1
  74. package/dist/types/assetGalleries.d.ts +0 -5
  75. package/dist/types/assetGalleries.js +0 -3
  76. package/dist/types/assetGalleries.js.map +0 -1
  77. package/dist/types/assetMediaGrouping.d.ts +0 -17
  78. package/dist/types/assetMediaGrouping.js +0 -3
  79. package/dist/types/assetMediaGrouping.js.map +0 -1
  80. package/dist/types/assetMediaGroupingMetaData.d.ts +0 -4
  81. package/dist/types/assetMediaGroupingMetaData.js +0 -3
  82. package/dist/types/assetMediaGroupingMetaData.js.map +0 -1
  83. package/dist/types/batch.d.ts +0 -29
  84. package/dist/types/batch.js +0 -3
  85. package/dist/types/batch.js.map +0 -1
  86. package/dist/types/batchItem.d.ts +0 -13
  87. package/dist/types/batchItem.js +0 -3
  88. package/dist/types/batchItem.js.map +0 -1
  89. package/dist/types/container.d.ts +0 -47
  90. package/dist/types/container.js +0 -3
  91. package/dist/types/container.js.map +0 -1
  92. package/dist/types/contentItem.d.ts +0 -37
  93. package/dist/types/contentItem.js +0 -3
  94. package/dist/types/contentItem.js.map +0 -1
  95. package/dist/types/contentItemHistory.d.ts +0 -20
  96. package/dist/types/contentItemHistory.js +0 -3
  97. package/dist/types/contentItemHistory.js.map +0 -1
  98. package/dist/types/contentListFilterModel.d.ts +0 -26
  99. package/dist/types/contentListFilterModel.js +0 -3
  100. package/dist/types/contentListFilterModel.js.map +0 -1
  101. package/dist/types/contentSectionDefaultModule.d.ts +0 -7
  102. package/dist/types/contentSectionDefaultModule.js +0 -3
  103. package/dist/types/contentSectionDefaultModule.js.map +0 -1
  104. package/dist/types/contentSectionDefinition.d.ts +0 -35
  105. package/dist/types/contentSectionDefinition.js +0 -3
  106. package/dist/types/contentSectionDefinition.js.map +0 -1
  107. package/dist/types/contentViewColumn.d.ts +0 -8
  108. package/dist/types/contentViewColumn.js +0 -3
  109. package/dist/types/contentViewColumn.js.map +0 -1
  110. package/dist/types/instanceRole.d.ts +0 -7
  111. package/dist/types/instanceRole.js +0 -3
  112. package/dist/types/instanceRole.js.map +0 -1
  113. package/dist/types/instanceUser.d.ts +0 -14
  114. package/dist/types/instanceUser.js +0 -3
  115. package/dist/types/instanceUser.js.map +0 -1
  116. package/dist/types/itemComments.d.ts +0 -14
  117. package/dist/types/itemComments.js +0 -3
  118. package/dist/types/itemComments.js.map +0 -1
  119. package/dist/types/listParams.d.ts +0 -9
  120. package/dist/types/listParams.js +0 -3
  121. package/dist/types/listParams.js.map +0 -1
  122. package/dist/types/locales.d.ts +0 -1
  123. package/dist/types/locales.js +0 -3
  124. package/dist/types/locales.js.map +0 -1
  125. package/dist/types/media.d.ts +0 -30
  126. package/dist/types/media.js.map +0 -1
  127. package/dist/types/model.d.ts +0 -30
  128. package/dist/types/model.js +0 -3
  129. package/dist/types/model.js.map +0 -1
  130. package/dist/types/notification.d.ts +0 -13
  131. package/dist/types/notification.js +0 -3
  132. package/dist/types/notification.js.map +0 -1
  133. package/dist/types/options.d.ts +0 -7
  134. package/dist/types/options.js +0 -3
  135. package/dist/types/options.js.map +0 -1
  136. package/dist/types/pageHistory.d.ts +0 -21
  137. package/dist/types/pageHistory.js +0 -3
  138. package/dist/types/pageHistory.js.map +0 -1
  139. package/dist/types/pageItem.d.ts +0 -56
  140. package/dist/types/pageItem.js +0 -3
  141. package/dist/types/pageItem.js.map +0 -1
  142. package/dist/types/pageModel.d.ts +0 -14
  143. package/dist/types/pageModel.js +0 -3
  144. package/dist/types/pageModel.js.map +0 -1
  145. package/dist/types/serverUser.d.ts +0 -21
  146. package/dist/types/serverUser.js +0 -3
  147. package/dist/types/serverUser.js.map +0 -1
  148. package/dist/types/sharedModule.d.ts +0 -7
  149. package/dist/types/sharedModule.js +0 -3
  150. package/dist/types/sharedModule.js.map +0 -1
  151. package/dist/types/sitemap.d.ts +0 -20
  152. package/dist/types/sitemap.js +0 -3
  153. package/dist/types/sitemap.js.map +0 -1
  154. package/dist/types/tokenResponseData.d.ts +0 -10
  155. package/dist/types/tokenResponseData.js +0 -3
  156. package/dist/types/tokenResponseData.js.map +0 -1
  157. package/dist/types/webhook.d.ts +0 -9
  158. package/dist/types/webhook.js +0 -3
  159. package/dist/types/webhook.js.map +0 -1
  160. package/dist/types/websiteListing.d.ts +0 -16
  161. package/dist/types/websiteListing.js +0 -3
  162. package/dist/types/websiteListing.js.map +0 -1
  163. package/dist/types/websiteUser.d.ts +0 -22
  164. package/dist/types/websiteUser.js +0 -3
  165. package/dist/types/websiteUser.js.map +0 -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 = 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;
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;
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 (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ while (_) 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]) {
@@ -78,7 +78,7 @@ var ClientInstance = /** @class */ (function () {
78
78
  ClientInstance.prototype.getInstance = function (guid) {
79
79
  var baseUrl = this.determineBaseUrl(guid);
80
80
  var instance = axios_1.default.create({
81
- baseURL: "".concat(baseUrl, "/api/v1/instance/").concat(guid),
81
+ baseURL: baseUrl + "/api/v1/instance/" + guid,
82
82
  maxContentLength: Infinity,
83
83
  maxBodyLength: Infinity
84
84
  });
@@ -87,7 +87,7 @@ var ClientInstance = /** @class */ (function () {
87
87
  ClientInstance.prototype.getAxiosInstance = function (guid) {
88
88
  var baseUrl = this.determineBaseUrl(guid);
89
89
  var instance = axios_1.default.create({
90
- baseURL: "".concat(baseUrl, "/api/v1"),
90
+ baseURL: baseUrl + "/api/v1",
91
91
  maxContentLength: Infinity,
92
92
  maxBodyLength: Infinity
93
93
  });
@@ -105,7 +105,7 @@ var ClientInstance = /** @class */ (function () {
105
105
  _a.trys.push([1, 3, , 4]);
106
106
  return [4 /*yield*/, instance.get(apiPath, {
107
107
  headers: {
108
- 'Authorization': "Bearer ".concat(token),
108
+ 'Authorization': "Bearer " + token,
109
109
  'Cache-Control': 'no-cache'
110
110
  }
111
111
  })];
@@ -132,7 +132,7 @@ var ClientInstance = /** @class */ (function () {
132
132
  _a.trys.push([1, 3, , 4]);
133
133
  return [4 /*yield*/, instance.get(apiPath, {
134
134
  headers: {
135
- 'Authorization': "Bearer ".concat(token),
135
+ 'Authorization': "Bearer " + token,
136
136
  'Cache-Control': 'no-cache'
137
137
  }
138
138
  })];
@@ -147,7 +147,7 @@ var ClientInstance = /** @class */ (function () {
147
147
  });
148
148
  });
149
149
  };
150
- ClientInstance.prototype.executeDelete = function (apiPath, guid, token) {
150
+ ClientInstance.prototype.executeDelete = function (apiPath, guid, token, data) {
151
151
  return __awaiter(this, void 0, void 0, function () {
152
152
  var instance, resp, err_3;
153
153
  return __generator(this, function (_a) {
@@ -159,9 +159,10 @@ var ClientInstance = /** @class */ (function () {
159
159
  _a.trys.push([1, 3, , 4]);
160
160
  return [4 /*yield*/, instance.delete(apiPath, {
161
161
  headers: {
162
- 'Authorization': "Bearer ".concat(token),
162
+ 'Authorization': "Bearer " + token,
163
163
  'Cache-Control': 'no-cache'
164
- }
164
+ },
165
+ data: data
165
166
  })];
166
167
  case 2:
167
168
  resp = _a.sent();
@@ -186,7 +187,7 @@ var ClientInstance = /** @class */ (function () {
186
187
  _a.trys.push([1, 3, , 4]);
187
188
  return [4 /*yield*/, instance.post(apiPath, data, {
188
189
  headers: {
189
- 'Authorization': "Bearer ".concat(token),
190
+ 'Authorization': "Bearer " + token,
190
191
  'Cache-Control': 'no-cache'
191
192
  }
192
193
  })];
@@ -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 = 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;
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;
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 (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ while (_) 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/".concat(id);
54
+ apiPath = "container/" + 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: ".concat(id), err_1);
61
+ throw new exception_1.Exception("Unable to retrieve the container for id: " + id, err_1);
62
62
  case 3: return [2 /*return*/];
63
63
  }
64
64
  });
@@ -71,14 +71,14 @@ 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/".concat(modelId);
74
+ apiPath = "container/model/" + 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: ".concat(modelId), err_2);
81
+ throw new exception_1.Exception("Unable to retrieve the containers for id: " + modelId, err_2);
82
82
  case 3: return [2 /*return*/];
83
83
  }
84
84
  });
@@ -92,14 +92,14 @@ var ContainerMethods = /** @class */ (function () {
92
92
  * @returns The container or null if not found.
93
93
  */
94
94
  ContainerMethods.prototype.getContainerByReferenceName = function (referenceName, guid) {
95
+ var _a;
95
96
  return __awaiter(this, void 0, void 0, function () {
96
97
  var apiPath, resp, err_3;
97
- var _a;
98
98
  return __generator(this, function (_b) {
99
99
  switch (_b.label) {
100
100
  case 0:
101
101
  _b.trys.push([0, 2, , 3]);
102
- apiPath = "container/".concat(referenceName);
102
+ apiPath = "container/" + referenceName;
103
103
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
104
104
  case 1:
105
105
  resp = _b.sent();
@@ -109,7 +109,7 @@ var ContainerMethods = /** @class */ (function () {
109
109
  if (((_a = err_3.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
110
110
  return [2 /*return*/, null]; // If the container is not found, return null
111
111
  }
112
- throw new exception_1.Exception("Unable to retrieve the container for referenceName: ".concat(referenceName), err_3);
112
+ throw new exception_1.Exception("Unable to retrieve the container for referenceName: " + referenceName, err_3);
113
113
  case 3: return [2 /*return*/];
114
114
  }
115
115
  });
@@ -122,14 +122,14 @@ var ContainerMethods = /** @class */ (function () {
122
122
  switch (_a.label) {
123
123
  case 0:
124
124
  _a.trys.push([0, 2, , 3]);
125
- apiPath = "container/".concat(id, "/security");
125
+ apiPath = "container/" + id + "/security";
126
126
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
127
127
  case 1:
128
128
  resp = _a.sent();
129
129
  return [2 /*return*/, resp.data];
130
130
  case 2:
131
131
  err_4 = _a.sent();
132
- throw new exception_1.Exception("Unable to retrieve the container for id: ".concat(id), err_4);
132
+ throw new exception_1.Exception("Unable to retrieve the container for id: " + id, err_4);
133
133
  case 3: return [2 /*return*/];
134
134
  }
135
135
  });
@@ -162,28 +162,28 @@ var ContainerMethods = /** @class */ (function () {
162
162
  switch (_a.label) {
163
163
  case 0:
164
164
  _a.trys.push([0, 2, , 3]);
165
- apiPath = "container/".concat(id, "/notifications");
165
+ apiPath = "container/" + id + "/notifications";
166
166
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
167
167
  case 1:
168
168
  resp = _a.sent();
169
169
  return [2 /*return*/, resp.data];
170
170
  case 2:
171
171
  err_6 = _a.sent();
172
- throw new exception_1.Exception("Unable to retrieve the notifications for container id: ".concat(id), err_6);
172
+ throw new exception_1.Exception("Unable to retrieve the notifications for container id: " + id, err_6);
173
173
  case 3: return [2 /*return*/];
174
174
  }
175
175
  });
176
176
  });
177
177
  };
178
- ContainerMethods.prototype.saveContainer = function (container_1, guid_1) {
179
- return __awaiter(this, arguments, void 0, function (container, guid, forceReferenceName) {
178
+ ContainerMethods.prototype.saveContainer = function (container, guid, forceReferenceName) {
179
+ if (forceReferenceName === void 0) { forceReferenceName = false; }
180
+ return __awaiter(this, void 0, void 0, function () {
180
181
  var apiPath, resp, err_7;
181
- if (forceReferenceName === void 0) { forceReferenceName = false; }
182
182
  return __generator(this, function (_a) {
183
183
  switch (_a.label) {
184
184
  case 0:
185
185
  _a.trys.push([0, 2, , 3]);
186
- apiPath = "container".concat(forceReferenceName ? '?forceReferenceName=true' : '');
186
+ apiPath = "container" + (forceReferenceName ? '?forceReferenceName=true' : '');
187
187
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, container)];
188
188
  case 1:
189
189
  resp = _a.sent();
@@ -203,14 +203,14 @@ var ContainerMethods = /** @class */ (function () {
203
203
  switch (_a.label) {
204
204
  case 0:
205
205
  _a.trys.push([0, 2, , 3]);
206
- apiPath = "container/".concat(id);
206
+ apiPath = "container/" + id;
207
207
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
208
208
  case 1:
209
209
  resp = _a.sent();
210
210
  return [2 /*return*/, resp.data];
211
211
  case 2:
212
212
  err_8 = _a.sent();
213
- throw new exception_1.Exception("Unable to delete the container for id: ".concat(id), err_8);
213
+ throw new exception_1.Exception("Unable to delete the container for id: " + id, err_8);
214
214
  case 3: return [2 /*return*/];
215
215
  }
216
216
  });
@@ -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 = 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;
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;
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 (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ while (_) 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,30 +53,30 @@ var ContentMethods = /** @class */ (function () {
53
53
  switch (_a.label) {
54
54
  case 0:
55
55
  _a.trys.push([0, 2, , 3]);
56
- apiPath = "".concat(locale, "/item/").concat(contentID);
56
+ apiPath = locale + "/item/" + 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: ".concat(contentID), err_1);
63
+ throw new exception_1.Exception("Unable to retrieve the content for id: " + contentID, err_1);
64
64
  case 3: return [2 /*return*/];
65
65
  }
66
66
  });
67
67
  });
68
68
  };
69
- ContentMethods.prototype.publishContent = function (contentID_1, guid_1, locale_1) {
70
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
69
+ ContentMethods.prototype.publishContent = function (contentID, guid, locale, comments, returnBatchId) {
70
+ if (comments === void 0) { comments = null; }
71
+ if (returnBatchId === void 0) { returnBatchId = false; }
72
+ return __awaiter(this, void 0, void 0, function () {
71
73
  var apiPath, resp, batchID_1, batch, contentIDs_1, err_2;
72
74
  var _this = this;
73
- if (comments === void 0) { comments = null; }
74
- if (returnBatchId === void 0) { returnBatchId = false; }
75
75
  return __generator(this, function (_a) {
76
76
  switch (_a.label) {
77
77
  case 0:
78
78
  _a.trys.push([0, 3, , 4]);
79
- apiPath = "".concat(locale, "/item/").concat(contentID, "/publish?comments=").concat(comments);
79
+ apiPath = locale + "/item/" + contentID + "/publish?comments=" + comments;
80
80
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
81
81
  case 1:
82
82
  resp = _a.sent();
@@ -98,23 +98,23 @@ var ContentMethods = /** @class */ (function () {
98
98
  return [2 /*return*/, contentIDs_1];
99
99
  case 3:
100
100
  err_2 = _a.sent();
101
- throw new exception_1.Exception("Unable to publish the content for id: ".concat(contentID), err_2);
101
+ throw new exception_1.Exception("Unable to publish the content for id: " + contentID, err_2);
102
102
  case 4: return [2 /*return*/];
103
103
  }
104
104
  });
105
105
  });
106
106
  };
107
- ContentMethods.prototype.unPublishContent = function (contentID_1, guid_1, locale_1) {
108
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
107
+ ContentMethods.prototype.unPublishContent = function (contentID, guid, locale, comments, returnBatchId) {
108
+ if (comments === void 0) { comments = null; }
109
+ if (returnBatchId === void 0) { returnBatchId = false; }
110
+ return __awaiter(this, void 0, void 0, function () {
109
111
  var apiPath, resp, batchID_2, batch, contentIDs_2, err_3;
110
112
  var _this = this;
111
- if (comments === void 0) { comments = null; }
112
- if (returnBatchId === void 0) { returnBatchId = false; }
113
113
  return __generator(this, function (_a) {
114
114
  switch (_a.label) {
115
115
  case 0:
116
116
  _a.trys.push([0, 3, , 4]);
117
- apiPath = "".concat(locale, "/item/").concat(contentID, "/unpublish?comments=").concat(comments);
117
+ apiPath = locale + "/item/" + contentID + "/unpublish?comments=" + comments;
118
118
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
119
119
  case 1:
120
120
  resp = _a.sent();
@@ -136,23 +136,23 @@ var ContentMethods = /** @class */ (function () {
136
136
  return [2 /*return*/, contentIDs_2];
137
137
  case 3:
138
138
  err_3 = _a.sent();
139
- throw new exception_1.Exception("Unable to un-publish the content for id: ".concat(contentID), err_3);
139
+ throw new exception_1.Exception("Unable to un-publish the content for id: " + contentID, err_3);
140
140
  case 4: return [2 /*return*/];
141
141
  }
142
142
  });
143
143
  });
144
144
  };
145
- ContentMethods.prototype.contentRequestApproval = function (contentID_1, guid_1, locale_1) {
146
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
145
+ ContentMethods.prototype.contentRequestApproval = function (contentID, guid, locale, comments, returnBatchId) {
146
+ if (comments === void 0) { comments = null; }
147
+ if (returnBatchId === void 0) { returnBatchId = false; }
148
+ return __awaiter(this, void 0, void 0, function () {
147
149
  var apiPath, resp, batchID_3, batch, contentIDs_3, err_4;
148
150
  var _this = this;
149
- if (comments === void 0) { comments = null; }
150
- if (returnBatchId === void 0) { returnBatchId = false; }
151
151
  return __generator(this, function (_a) {
152
152
  switch (_a.label) {
153
153
  case 0:
154
154
  _a.trys.push([0, 3, , 4]);
155
- apiPath = "".concat(locale, "/item/").concat(contentID, "/request-approval?comments=").concat(comments);
155
+ apiPath = locale + "/item/" + contentID + "/request-approval?comments=" + comments;
156
156
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
157
157
  case 1:
158
158
  resp = _a.sent();
@@ -174,23 +174,23 @@ var ContentMethods = /** @class */ (function () {
174
174
  return [2 /*return*/, contentIDs_3];
175
175
  case 3:
176
176
  err_4 = _a.sent();
177
- throw new exception_1.Exception("Unable to request approval the content for id: ".concat(contentID), err_4);
177
+ throw new exception_1.Exception("Unable to request approval the content for id: " + contentID, err_4);
178
178
  case 4: return [2 /*return*/];
179
179
  }
180
180
  });
181
181
  });
182
182
  };
183
- ContentMethods.prototype.approveContent = function (contentID_1, guid_1, locale_1) {
184
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
183
+ ContentMethods.prototype.approveContent = function (contentID, guid, locale, comments, returnBatchId) {
184
+ if (comments === void 0) { comments = null; }
185
+ if (returnBatchId === void 0) { returnBatchId = false; }
186
+ return __awaiter(this, void 0, void 0, function () {
185
187
  var apiPath, resp, batchID_4, batch, contentIDs_4, err_5;
186
188
  var _this = this;
187
- if (comments === void 0) { comments = null; }
188
- if (returnBatchId === void 0) { returnBatchId = false; }
189
189
  return __generator(this, function (_a) {
190
190
  switch (_a.label) {
191
191
  case 0:
192
192
  _a.trys.push([0, 3, , 4]);
193
- apiPath = "".concat(locale, "/item/").concat(contentID, "/approve?comments=").concat(comments);
193
+ apiPath = locale + "/item/" + contentID + "/approve?comments=" + comments;
194
194
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
195
195
  case 1:
196
196
  resp = _a.sent();
@@ -212,23 +212,23 @@ var ContentMethods = /** @class */ (function () {
212
212
  return [2 /*return*/, contentIDs_4];
213
213
  case 3:
214
214
  err_5 = _a.sent();
215
- throw new exception_1.Exception("Unable to approve the content for id: ".concat(contentID), err_5);
215
+ throw new exception_1.Exception("Unable to approve the content for id: " + contentID, err_5);
216
216
  case 4: return [2 /*return*/];
217
217
  }
218
218
  });
219
219
  });
220
220
  };
221
- ContentMethods.prototype.declineContent = function (contentID_1, guid_1, locale_1) {
222
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
221
+ ContentMethods.prototype.declineContent = function (contentID, guid, locale, comments, returnBatchId) {
222
+ if (comments === void 0) { comments = null; }
223
+ if (returnBatchId === void 0) { returnBatchId = false; }
224
+ return __awaiter(this, void 0, void 0, function () {
223
225
  var apiPath, resp, batchID_5, batch, contentIDs_5, err_6;
224
226
  var _this = this;
225
- if (comments === void 0) { comments = null; }
226
- if (returnBatchId === void 0) { returnBatchId = false; }
227
227
  return __generator(this, function (_a) {
228
228
  switch (_a.label) {
229
229
  case 0:
230
230
  _a.trys.push([0, 3, , 4]);
231
- apiPath = "".concat(locale, "/item/").concat(contentID, "/decline?comments=").concat(comments);
231
+ apiPath = locale + "/item/" + contentID + "/decline?comments=" + comments;
232
232
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
233
233
  case 1:
234
234
  resp = _a.sent();
@@ -250,23 +250,23 @@ var ContentMethods = /** @class */ (function () {
250
250
  return [2 /*return*/, contentIDs_5];
251
251
  case 3:
252
252
  err_6 = _a.sent();
253
- throw new exception_1.Exception("Unable to decline the content for id: ".concat(contentID), err_6);
253
+ throw new exception_1.Exception("Unable to decline the content for id: " + contentID, err_6);
254
254
  case 4: return [2 /*return*/];
255
255
  }
256
256
  });
257
257
  });
258
258
  };
259
- ContentMethods.prototype.deleteContent = function (contentID_1, guid_1, locale_1) {
260
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments, returnBatchId) {
259
+ ContentMethods.prototype.deleteContent = function (contentID, guid, locale, comments, returnBatchId) {
260
+ if (comments === void 0) { comments = null; }
261
+ if (returnBatchId === void 0) { returnBatchId = false; }
262
+ return __awaiter(this, void 0, void 0, function () {
261
263
  var apiPath, resp, batchID_6, batch, contentIDs_6, err_7;
262
264
  var _this = this;
263
- if (comments === void 0) { comments = null; }
264
- if (returnBatchId === void 0) { returnBatchId = false; }
265
265
  return __generator(this, function (_a) {
266
266
  switch (_a.label) {
267
267
  case 0:
268
268
  _a.trys.push([0, 3, , 4]);
269
- apiPath = "".concat(locale, "/item/").concat(contentID, "?comments=").concat(comments);
269
+ apiPath = locale + "/item/" + contentID + "?comments=" + comments;
270
270
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
271
271
  case 1:
272
272
  resp = _a.sent();
@@ -288,22 +288,22 @@ var ContentMethods = /** @class */ (function () {
288
288
  return [2 /*return*/, contentIDs_6];
289
289
  case 3:
290
290
  err_7 = _a.sent();
291
- throw new exception_1.Exception("Unable to delete the content for id: ".concat(contentID), err_7);
291
+ throw new exception_1.Exception("Unable to delete the content for id: " + contentID, err_7);
292
292
  case 4: return [2 /*return*/];
293
293
  }
294
294
  });
295
295
  });
296
296
  };
297
- ContentMethods.prototype.saveContentItem = function (contentItem_1, guid_1, locale_1) {
298
- return __awaiter(this, arguments, void 0, function (contentItem, guid, locale, returnBatchId) {
297
+ ContentMethods.prototype.saveContentItem = function (contentItem, guid, locale, returnBatchId) {
298
+ if (returnBatchId === void 0) { returnBatchId = false; }
299
+ return __awaiter(this, void 0, void 0, function () {
299
300
  var apiPath, resp, batchID_7, batch, contentIDs_7, err_8;
300
301
  var _this = this;
301
- if (returnBatchId === void 0) { returnBatchId = false; }
302
302
  return __generator(this, function (_a) {
303
303
  switch (_a.label) {
304
304
  case 0:
305
305
  _a.trys.push([0, 3, , 4]);
306
- apiPath = "".concat(locale, "/item");
306
+ apiPath = locale + "/item";
307
307
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, contentItem)];
308
308
  case 1:
309
309
  resp = _a.sent();
@@ -331,16 +331,16 @@ var ContentMethods = /** @class */ (function () {
331
331
  });
332
332
  });
333
333
  };
334
- ContentMethods.prototype.saveContentItems = function (contentItems_1, guid_1, locale_1) {
335
- return __awaiter(this, arguments, void 0, function (contentItems, guid, locale, returnBatchId) {
334
+ ContentMethods.prototype.saveContentItems = function (contentItems, guid, locale, returnBatchId) {
335
+ if (returnBatchId === void 0) { returnBatchId = false; }
336
+ return __awaiter(this, void 0, void 0, function () {
336
337
  var apiPath, resp, batchID_8, batch, contentIDs_8, err_9;
337
338
  var _this = this;
338
- if (returnBatchId === void 0) { returnBatchId = false; }
339
339
  return __generator(this, function (_a) {
340
340
  switch (_a.label) {
341
341
  case 0:
342
342
  _a.trys.push([0, 3, , 4]);
343
- apiPath = "".concat(locale, "/item/multi");
343
+ apiPath = locale + "/item/multi";
344
344
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, contentItems)];
345
345
  case 1:
346
346
  resp = _a.sent();
@@ -375,79 +375,79 @@ var ContentMethods = /** @class */ (function () {
375
375
  switch (_a.label) {
376
376
  case 0:
377
377
  _a.trys.push([0, 2, , 3]);
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);
378
+ apiPath = locale + "/list/" + referenceName + "?filter=" + listParams.filter + "&fields=" + listParams.fields + "&sortDirection=" + listParams.sortDirection + "&sortField=" + listParams.sortField + "&take=" + listParams.take + "&skip=" + listParams.skip;
379
379
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
380
380
  case 1:
381
381
  resp = _a.sent();
382
382
  return [2 /*return*/, resp.data];
383
383
  case 2:
384
384
  err_10 = _a.sent();
385
- throw new exception_1.Exception("Unable retrieve the content details for reference name: ".concat(referenceName), err_10);
385
+ throw new exception_1.Exception("Unable retrieve the content details for reference name: " + referenceName, err_10);
386
386
  case 3: return [2 /*return*/];
387
387
  }
388
388
  });
389
389
  });
390
390
  };
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) {
391
+ ContentMethods.prototype.getContentList = function (referenceName, guid, locale, listParams, filterObject) {
392
+ if (filterObject === void 0) { filterObject = null; }
393
+ return __awaiter(this, void 0, void 0, function () {
393
394
  var apiPath, resp, err_11;
394
- if (filterObject === void 0) { filterObject = null; }
395
395
  return __generator(this, function (_a) {
396
396
  switch (_a.label) {
397
397
  case 0:
398
398
  _a.trys.push([0, 2, , 3]);
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);
399
+ apiPath = locale + "/list/" + referenceName + "?fields=" + listParams.fields + "&sortDirection=" + listParams.sortDirection + "&sortField=" + listParams.sortField + "&take=" + listParams.take + "&skip=" + listParams.skip + "&showDeleted=" + listParams.showDeleted;
400
400
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, filterObject)];
401
401
  case 1:
402
402
  resp = _a.sent();
403
403
  return [2 /*return*/, resp.data];
404
404
  case 2:
405
405
  err_11 = _a.sent();
406
- throw new exception_1.Exception("Unable retrieve the content details for list with reference name: ".concat(referenceName), err_11);
406
+ throw new exception_1.Exception("Unable retrieve the content details for list with reference name: " + referenceName, err_11);
407
407
  case 3: return [2 /*return*/];
408
408
  }
409
409
  });
410
410
  });
411
411
  };
412
- ContentMethods.prototype.getContentHistory = function (locale_1, guid_1, contentID_1) {
413
- return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
412
+ ContentMethods.prototype.getContentHistory = function (locale, guid, contentID, take, skip) {
413
+ if (take === void 0) { take = 50; }
414
+ if (skip === void 0) { skip = 0; }
415
+ return __awaiter(this, void 0, void 0, function () {
414
416
  var apiPath, resp, err_12;
415
- if (take === void 0) { take = 50; }
416
- if (skip === void 0) { skip = 0; }
417
417
  return __generator(this, function (_a) {
418
418
  switch (_a.label) {
419
419
  case 0:
420
420
  _a.trys.push([0, 2, , 3]);
421
- apiPath = "".concat(locale, "/item/").concat(contentID, "/history?take=").concat(take, "&skip=").concat(skip);
421
+ apiPath = locale + "/item/" + contentID + "/history?take=" + take + "&skip=" + skip;
422
422
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
423
423
  case 1:
424
424
  resp = _a.sent();
425
425
  return [2 /*return*/, resp.data];
426
426
  case 2:
427
427
  err_12 = _a.sent();
428
- throw new exception_1.Exception("Unable to retrieve history for contentID: ".concat(contentID));
428
+ throw new exception_1.Exception("Unable to retrieve history for contentID: " + contentID);
429
429
  case 3: return [2 /*return*/];
430
430
  }
431
431
  });
432
432
  });
433
433
  };
434
- ContentMethods.prototype.getContentComments = function (locale_1, guid_1, contentID_1) {
435
- return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
434
+ ContentMethods.prototype.getContentComments = function (locale, guid, contentID, take, skip) {
435
+ if (take === void 0) { take = 50; }
436
+ if (skip === void 0) { skip = 0; }
437
+ return __awaiter(this, void 0, void 0, function () {
436
438
  var apiPath, resp, err_13;
437
- if (take === void 0) { take = 50; }
438
- if (skip === void 0) { skip = 0; }
439
439
  return __generator(this, function (_a) {
440
440
  switch (_a.label) {
441
441
  case 0:
442
442
  _a.trys.push([0, 2, , 3]);
443
- apiPath = "".concat(locale, "/item/").concat(contentID, "/comments?take=").concat(take, "&skip=").concat(skip);
443
+ apiPath = locale + "/item/" + contentID + "/comments?take=" + take + "&skip=" + skip;
444
444
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
445
445
  case 1:
446
446
  resp = _a.sent();
447
447
  return [2 /*return*/, resp.data];
448
448
  case 2:
449
449
  err_13 = _a.sent();
450
- throw new exception_1.Exception("Unable to retrieve comments for contentID: ".concat(contentID));
450
+ throw new exception_1.Exception("Unable to retrieve comments for contentID: " + contentID);
451
451
  case 3: return [2 /*return*/];
452
452
  }
453
453
  });
@@ -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 = 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;
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;
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 (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ while (_) 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]) {