@agility/management-sdk 0.1.22 → 0.1.24

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.
@@ -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,29 +53,29 @@ 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 retreive 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) {
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 () {
71
72
  var apiPath, resp, batchID_1, batch, contentIDs_1, err_2;
72
73
  var _this = this;
73
- if (comments === void 0) { comments = null; }
74
74
  return __generator(this, function (_a) {
75
75
  switch (_a.label) {
76
76
  case 0:
77
77
  _a.trys.push([0, 3, , 4]);
78
- apiPath = "".concat(locale, "/item/").concat(contentID, "/publish?comments=").concat(comments);
78
+ apiPath = locale + "/item/" + contentID + "/publish?comments=" + comments;
79
79
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
80
80
  case 1:
81
81
  resp = _a.sent();
@@ -93,22 +93,22 @@ var ContentMethods = /** @class */ (function () {
93
93
  return [2 /*return*/, contentIDs_1];
94
94
  case 3:
95
95
  err_2 = _a.sent();
96
- throw new exception_1.Exception("Unable to publish the content for id: ".concat(contentID), err_2);
96
+ throw new exception_1.Exception("Unable to publish the content for id: " + contentID, err_2);
97
97
  case 4: return [2 /*return*/];
98
98
  }
99
99
  });
100
100
  });
101
101
  };
102
- ContentMethods.prototype.unPublishContent = function (contentID_1, guid_1, locale_1) {
103
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
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 () {
104
105
  var apiPath, resp, batchID_2, batch, contentIDs_2, err_3;
105
106
  var _this = this;
106
- if (comments === void 0) { comments = null; }
107
107
  return __generator(this, function (_a) {
108
108
  switch (_a.label) {
109
109
  case 0:
110
110
  _a.trys.push([0, 3, , 4]);
111
- apiPath = "".concat(locale, "/item/").concat(contentID, "/unpublish?comments=").concat(comments);
111
+ apiPath = locale + "/item/" + contentID + "/unpublish?comments=" + comments;
112
112
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
113
113
  case 1:
114
114
  resp = _a.sent();
@@ -126,22 +126,22 @@ var ContentMethods = /** @class */ (function () {
126
126
  return [2 /*return*/, contentIDs_2];
127
127
  case 3:
128
128
  err_3 = _a.sent();
129
- throw new exception_1.Exception("Unable to un-publish the content for id: ".concat(contentID), err_3);
129
+ throw new exception_1.Exception("Unable to un-publish the content for id: " + contentID, err_3);
130
130
  case 4: return [2 /*return*/];
131
131
  }
132
132
  });
133
133
  });
134
134
  };
135
- ContentMethods.prototype.contentRequestApproval = function (contentID_1, guid_1, locale_1) {
136
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
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 () {
137
138
  var apiPath, resp, batchID_3, batch, contentIDs_3, err_4;
138
139
  var _this = this;
139
- if (comments === void 0) { comments = null; }
140
140
  return __generator(this, function (_a) {
141
141
  switch (_a.label) {
142
142
  case 0:
143
143
  _a.trys.push([0, 3, , 4]);
144
- apiPath = "".concat(locale, "/item/").concat(contentID, "/request-approval?comments=").concat(comments);
144
+ apiPath = locale + "/item/" + contentID + "/request-approval?comments=" + comments;
145
145
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
146
146
  case 1:
147
147
  resp = _a.sent();
@@ -159,22 +159,22 @@ var ContentMethods = /** @class */ (function () {
159
159
  return [2 /*return*/, contentIDs_3];
160
160
  case 3:
161
161
  err_4 = _a.sent();
162
- throw new exception_1.Exception("Unable to request approval the content for id: ".concat(contentID), err_4);
162
+ throw new exception_1.Exception("Unable to request approval the content for id: " + contentID, err_4);
163
163
  case 4: return [2 /*return*/];
164
164
  }
165
165
  });
166
166
  });
167
167
  };
168
- ContentMethods.prototype.approveContent = function (contentID_1, guid_1, locale_1) {
169
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
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 () {
170
171
  var apiPath, resp, batchID_4, batch, contentIDs_4, err_5;
171
172
  var _this = this;
172
- if (comments === void 0) { comments = null; }
173
173
  return __generator(this, function (_a) {
174
174
  switch (_a.label) {
175
175
  case 0:
176
176
  _a.trys.push([0, 3, , 4]);
177
- apiPath = "".concat(locale, "/item/").concat(contentID, "/approve?comments=").concat(comments);
177
+ apiPath = locale + "/item/" + contentID + "/approve?comments=" + comments;
178
178
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
179
179
  case 1:
180
180
  resp = _a.sent();
@@ -192,22 +192,22 @@ var ContentMethods = /** @class */ (function () {
192
192
  return [2 /*return*/, contentIDs_4];
193
193
  case 3:
194
194
  err_5 = _a.sent();
195
- throw new exception_1.Exception("Unable to approve the content for id: ".concat(contentID), err_5);
195
+ throw new exception_1.Exception("Unable to approve the content for id: " + contentID, err_5);
196
196
  case 4: return [2 /*return*/];
197
197
  }
198
198
  });
199
199
  });
200
200
  };
201
- ContentMethods.prototype.declineContent = function (contentID_1, guid_1, locale_1) {
202
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
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 () {
203
204
  var apiPath, resp, batchID_5, batch, contentIDs_5, err_6;
204
205
  var _this = this;
205
- if (comments === void 0) { comments = null; }
206
206
  return __generator(this, function (_a) {
207
207
  switch (_a.label) {
208
208
  case 0:
209
209
  _a.trys.push([0, 3, , 4]);
210
- apiPath = "".concat(locale, "/item/").concat(contentID, "/decline?comments=").concat(comments);
210
+ apiPath = locale + "/item/" + contentID + "/decline?comments=" + comments;
211
211
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
212
212
  case 1:
213
213
  resp = _a.sent();
@@ -225,22 +225,22 @@ var ContentMethods = /** @class */ (function () {
225
225
  return [2 /*return*/, contentIDs_5];
226
226
  case 3:
227
227
  err_6 = _a.sent();
228
- throw new exception_1.Exception("Unable to decline the content for id: ".concat(contentID), err_6);
228
+ throw new exception_1.Exception("Unable to decline the content for id: " + contentID, err_6);
229
229
  case 4: return [2 /*return*/];
230
230
  }
231
231
  });
232
232
  });
233
233
  };
234
- ContentMethods.prototype.deleteContent = function (contentID_1, guid_1, locale_1) {
235
- return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
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 () {
236
237
  var apiPath, resp, batchID_6, batch, contentIDs_6, err_7;
237
238
  var _this = this;
238
- if (comments === void 0) { comments = null; }
239
239
  return __generator(this, function (_a) {
240
240
  switch (_a.label) {
241
241
  case 0:
242
242
  _a.trys.push([0, 3, , 4]);
243
- apiPath = "".concat(locale, "/item/").concat(contentID, "?comments=").concat(comments);
243
+ apiPath = locale + "/item/" + contentID + "?comments=" + comments;
244
244
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
245
245
  case 1:
246
246
  resp = _a.sent();
@@ -258,7 +258,7 @@ var ContentMethods = /** @class */ (function () {
258
258
  return [2 /*return*/, contentIDs_6];
259
259
  case 3:
260
260
  err_7 = _a.sent();
261
- throw new exception_1.Exception("Unable to delete the content for id: ".concat(contentID), err_7);
261
+ throw new exception_1.Exception("Unable to delete the content for id: " + contentID, err_7);
262
262
  case 4: return [2 /*return*/];
263
263
  }
264
264
  });
@@ -272,7 +272,7 @@ var ContentMethods = /** @class */ (function () {
272
272
  switch (_a.label) {
273
273
  case 0:
274
274
  _a.trys.push([0, 3, , 4]);
275
- apiPath = "".concat(locale, "/item");
275
+ apiPath = locale + "/item";
276
276
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, contentItem)];
277
277
  case 1:
278
278
  resp = _a.sent();
@@ -285,6 +285,10 @@ var ContentMethods = /** @class */ (function () {
285
285
  }); }); })];
286
286
  case 2:
287
287
  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
+ }
288
292
  contentIDs_7 = [];
289
293
  batch.items.forEach(function (element) { return contentIDs_7.push(element.itemID); });
290
294
  return [2 /*return*/, contentIDs_7];
@@ -304,7 +308,7 @@ var ContentMethods = /** @class */ (function () {
304
308
  switch (_a.label) {
305
309
  case 0:
306
310
  _a.trys.push([0, 3, , 4]);
307
- apiPath = "".concat(locale, "/item/multi");
311
+ apiPath = locale + "/item/multi";
308
312
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, contentItems)];
309
313
  case 1:
310
314
  resp = _a.sent();
@@ -317,6 +321,10 @@ var ContentMethods = /** @class */ (function () {
317
321
  }); }); })];
318
322
  case 2:
319
323
  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
+ }
320
328
  contentIDs_8 = [];
321
329
  batch.items.forEach(function (element) { return contentIDs_8.push(element.itemID); });
322
330
  return [2 /*return*/, contentIDs_8];
@@ -335,79 +343,79 @@ var ContentMethods = /** @class */ (function () {
335
343
  switch (_a.label) {
336
344
  case 0:
337
345
  _a.trys.push([0, 2, , 3]);
338
- 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);
346
+ apiPath = locale + "/list/" + referenceName + "?filter=" + listParams.filter + "&fields=" + listParams.fields + "&sortDirection=" + listParams.sortDirection + "&sortField=" + listParams.sortField + "&take=" + listParams.take + "&skip=" + listParams.skip;
339
347
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
340
348
  case 1:
341
349
  resp = _a.sent();
342
350
  return [2 /*return*/, resp.data];
343
351
  case 2:
344
352
  err_10 = _a.sent();
345
- throw new exception_1.Exception("Unable retreive the content details for reference name: ".concat(referenceName), err_10);
353
+ throw new exception_1.Exception("Unable retrieve the content details for reference name: " + referenceName, err_10);
346
354
  case 3: return [2 /*return*/];
347
355
  }
348
356
  });
349
357
  });
350
358
  };
351
- ContentMethods.prototype.getContentList = function (referenceName_1, guid_1, locale_1, listParams_1) {
352
- return __awaiter(this, arguments, void 0, function (referenceName, guid, locale, listParams, filterObject) {
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 () {
353
362
  var apiPath, resp, err_11;
354
- if (filterObject === void 0) { filterObject = null; }
355
363
  return __generator(this, function (_a) {
356
364
  switch (_a.label) {
357
365
  case 0:
358
366
  _a.trys.push([0, 2, , 3]);
359
- 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);
367
+ apiPath = locale + "/list/" + referenceName + "?fields=" + listParams.fields + "&sortDirection=" + listParams.sortDirection + "&sortField=" + listParams.sortField + "&take=" + listParams.take + "&skip=" + listParams.skip + "&showDeleted=" + listParams.showDeleted;
360
368
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, filterObject)];
361
369
  case 1:
362
370
  resp = _a.sent();
363
371
  return [2 /*return*/, resp.data];
364
372
  case 2:
365
373
  err_11 = _a.sent();
366
- throw new exception_1.Exception("Unable retreive the content details for list with reference name: ".concat(referenceName), err_11);
374
+ throw new exception_1.Exception("Unable retrieve the content details for list with reference name: " + referenceName, err_11);
367
375
  case 3: return [2 /*return*/];
368
376
  }
369
377
  });
370
378
  });
371
379
  };
372
- ContentMethods.prototype.getContentHistory = function (locale_1, guid_1, contentID_1) {
373
- return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
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 () {
374
384
  var apiPath, resp, err_12;
375
- if (take === void 0) { take = 50; }
376
- if (skip === void 0) { skip = 0; }
377
385
  return __generator(this, function (_a) {
378
386
  switch (_a.label) {
379
387
  case 0:
380
388
  _a.trys.push([0, 2, , 3]);
381
- apiPath = "".concat(locale, "/item/").concat(contentID, "/history?take=").concat(take, "&skip=").concat(skip);
389
+ apiPath = locale + "/item/" + contentID + "/history?take=" + take + "&skip=" + skip;
382
390
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
383
391
  case 1:
384
392
  resp = _a.sent();
385
393
  return [2 /*return*/, resp.data];
386
394
  case 2:
387
395
  err_12 = _a.sent();
388
- throw new exception_1.Exception("Unable to retrieve history for contentID: ".concat(contentID));
396
+ throw new exception_1.Exception("Unable to retrieve history for contentID: " + contentID);
389
397
  case 3: return [2 /*return*/];
390
398
  }
391
399
  });
392
400
  });
393
401
  };
394
- ContentMethods.prototype.getContentComments = function (locale_1, guid_1, contentID_1) {
395
- return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
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 () {
396
406
  var apiPath, resp, err_13;
397
- if (take === void 0) { take = 50; }
398
- if (skip === void 0) { skip = 0; }
399
407
  return __generator(this, function (_a) {
400
408
  switch (_a.label) {
401
409
  case 0:
402
410
  _a.trys.push([0, 2, , 3]);
403
- apiPath = "".concat(locale, "/item/").concat(contentID, "/comments?take=").concat(take, "&skip=").concat(skip);
411
+ apiPath = locale + "/item/" + contentID + "/comments?take=" + take + "&skip=" + skip;
404
412
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
405
413
  case 1:
406
414
  resp = _a.sent();
407
415
  return [2 /*return*/, resp.data];
408
416
  case 2:
409
417
  err_13 = _a.sent();
410
- throw new exception_1.Exception("Unable to retrieve comments for contentID: ".concat(contentID));
418
+ throw new exception_1.Exception("Unable to retrieve comments for contentID: " + contentID);
411
419
  case 3: return [2 /*return*/];
412
420
  }
413
421
  });
@@ -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]) {
@@ -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]) {
@@ -58,29 +58,29 @@ var InstanceUserMethods = /** @class */ (function () {
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 retreive users.", err_1);
61
+ throw new exception_1.Exception("Unable to retrieve users.", err_1);
62
62
  case 3: return [2 /*return*/];
63
63
  }
64
64
  });
65
65
  });
66
66
  };
67
- InstanceUserMethods.prototype.saveUser = function (emailAddress_1, roles_1, guid_1) {
68
- return __awaiter(this, arguments, void 0, function (emailAddress, roles, guid, firstName, lastName) {
67
+ InstanceUserMethods.prototype.saveUser = function (emailAddress, roles, guid, firstName, lastName) {
68
+ if (firstName === void 0) { firstName = null; }
69
+ if (lastName === void 0) { lastName = null; }
70
+ return __awaiter(this, void 0, void 0, function () {
69
71
  var apiPath, resp, err_2;
70
- if (firstName === void 0) { firstName = null; }
71
- if (lastName === void 0) { lastName = null; }
72
72
  return __generator(this, function (_a) {
73
73
  switch (_a.label) {
74
74
  case 0:
75
75
  _a.trys.push([0, 2, , 3]);
76
- apiPath = "user/save?emailAddress=".concat(emailAddress, "&firstName=").concat(firstName, "&lastName=").concat(lastName);
76
+ apiPath = "user/save?emailAddress=" + emailAddress + "&firstName=" + firstName + "&lastName=" + lastName;
77
77
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, roles)];
78
78
  case 1:
79
79
  resp = _a.sent();
80
80
  return [2 /*return*/, resp.data];
81
81
  case 2:
82
82
  err_2 = _a.sent();
83
- throw new exception_1.Exception("Unable to retreive users.", err_2);
83
+ throw new exception_1.Exception("Unable to retrieve users.", err_2);
84
84
  case 3: return [2 /*return*/];
85
85
  }
86
86
  });
@@ -93,14 +93,14 @@ var InstanceUserMethods = /** @class */ (function () {
93
93
  switch (_a.label) {
94
94
  case 0:
95
95
  _a.trys.push([0, 2, , 3]);
96
- apiPath = "user/delete/".concat(userId);
96
+ apiPath = "user/delete/" + userId;
97
97
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
98
98
  case 1:
99
99
  resp = _a.sent();
100
100
  return [2 /*return*/, resp.data];
101
101
  case 2:
102
102
  err_3 = _a.sent();
103
- throw new exception_1.Exception("Unable to delete the user for id: ".concat(userId), err_3);
103
+ throw new exception_1.Exception("Unable to delete the user for id: " + userId, err_3);
104
104
  case 3: return [2 /*return*/];
105
105
  }
106
106
  });
@@ -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 ModelMethods = /** @class */ (function () {
51
51
  switch (_a.label) {
52
52
  case 0:
53
53
  _a.trys.push([0, 2, , 3]);
54
- apiPath = "model/".concat(id);
54
+ apiPath = "model/" + 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 retreive model for id: ".concat(id, "."), err_1);
61
+ throw new exception_1.Exception("Unable to retrieve model for id: " + id + ".", err_1);
62
62
  case 3: return [2 /*return*/];
63
63
  }
64
64
  });
@@ -71,35 +71,35 @@ var ModelMethods = /** @class */ (function () {
71
71
  switch (_a.label) {
72
72
  case 0:
73
73
  _a.trys.push([0, 2, , 3]);
74
- apiPath = "model/".concat(referenceName);
74
+ apiPath = "model/" + referenceName;
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 retreive model for referenceName: ".concat(referenceName, "."), err_2);
81
+ throw new exception_1.Exception("Unable to retrieve model for referenceName: " + referenceName + ".", err_2);
82
82
  case 3: return [2 /*return*/];
83
83
  }
84
84
  });
85
85
  });
86
86
  };
87
- ModelMethods.prototype.getContentModules = function (includeDefaults_1, guid_1) {
88
- return __awaiter(this, arguments, void 0, function (includeDefaults, guid, includeModules) {
87
+ ModelMethods.prototype.getContentModules = function (includeDefaults, guid, includeModules) {
88
+ if (includeModules === void 0) { includeModules = false; }
89
+ return __awaiter(this, void 0, void 0, function () {
89
90
  var apiPath, resp, err_3;
90
- if (includeModules === void 0) { includeModules = false; }
91
91
  return __generator(this, function (_a) {
92
92
  switch (_a.label) {
93
93
  case 0:
94
94
  _a.trys.push([0, 2, , 3]);
95
- apiPath = "model/list/".concat(includeDefaults, "?includeModules=").concat(includeModules);
95
+ apiPath = "model/list/" + includeDefaults + "?includeModules=" + includeModules;
96
96
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
97
97
  case 1:
98
98
  resp = _a.sent();
99
99
  return [2 /*return*/, resp.data];
100
100
  case 2:
101
101
  err_3 = _a.sent();
102
- throw new exception_1.Exception("Unable to retreive content modules.", err_3);
102
+ throw new exception_1.Exception("Unable to retrieve content modules.", err_3);
103
103
  case 3: return [2 /*return*/];
104
104
  }
105
105
  });
@@ -112,14 +112,14 @@ var ModelMethods = /** @class */ (function () {
112
112
  switch (_a.label) {
113
113
  case 0:
114
114
  _a.trys.push([0, 2, , 3]);
115
- apiPath = "model/list-page-modules/".concat(includeDefault);
115
+ apiPath = "model/list-page-modules/" + includeDefault;
116
116
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
117
117
  case 1:
118
118
  resp = _a.sent();
119
119
  return [2 /*return*/, resp.data];
120
120
  case 2:
121
121
  err_4 = _a.sent();
122
- throw new exception_1.Exception("Unable to retreive page modules.", err_4);
122
+ throw new exception_1.Exception("Unable to retrieve page modules.", err_4);
123
123
  case 3: return [2 /*return*/];
124
124
  }
125
125
  });
@@ -152,7 +152,7 @@ var ModelMethods = /** @class */ (function () {
152
152
  switch (_a.label) {
153
153
  case 0:
154
154
  _a.trys.push([0, 2, , 3]);
155
- apiPath = "model/".concat(id);
155
+ apiPath = "model/" + id;
156
156
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
157
157
  case 1:
158
158
  resp = _a.sent();
@@ -26,7 +26,7 @@ export declare class PageMethods {
26
26
  approvePage(pageID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
27
27
  declinePage(pageID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
28
28
  deletePage(pageID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
29
- savePage(pageItem: PageItem, guid: string, locale: string, parentPageID?: number, placeBeforePageItemID?: number): Promise<number[]>;
29
+ savePage(pageItem: PageItem, guid: string, locale: string, parentPageID?: number, placeBeforePageItemID?: number): Promise<import("..").Batch | number[]>;
30
30
  getPageHistory(locale: string, guid: string, pageID: number, take?: number, skip?: number): Promise<PageHistory>;
31
31
  getPageComments(locale: string, guid: string, pageID: number, take?: number, skip?: number): Promise<ItemComments>;
32
32
  }