@agility/management-sdk 0.1.32 → 0.1.33

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;
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 ModelMethods = /** @class */ (function () {
51
51
  switch (_a.label) {
52
52
  case 0:
53
53
  _a.trys.push([0, 2, , 3]);
54
- apiPath = "model/" + id;
54
+ apiPath = "model/".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 model for id: " + id + ".", err_1);
61
+ throw new exception_1.Exception("Unable to retrieve model for id: ".concat(id, "."), err_1);
62
62
  case 3: return [2 /*return*/];
63
63
  }
64
64
  });
@@ -71,28 +71,28 @@ var ModelMethods = /** @class */ (function () {
71
71
  switch (_a.label) {
72
72
  case 0:
73
73
  _a.trys.push([0, 2, , 3]);
74
- apiPath = "model/" + referenceName;
74
+ apiPath = "model/".concat(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 retrieve model for referenceName: " + referenceName + ".", err_2);
81
+ throw new exception_1.Exception("Unable to retrieve model for referenceName: ".concat(referenceName, "."), err_2);
82
82
  case 3: return [2 /*return*/];
83
83
  }
84
84
  });
85
85
  });
86
86
  };
87
- ModelMethods.prototype.getContentModules = function (includeDefaults, guid, includeModules) {
88
- if (includeModules === void 0) { includeModules = false; }
89
- return __awaiter(this, void 0, void 0, function () {
87
+ ModelMethods.prototype.getContentModules = function (includeDefaults_1, guid_1) {
88
+ return __awaiter(this, arguments, void 0, function (includeDefaults, guid, includeModules) {
90
89
  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/" + includeDefaults + "?includeModules=" + includeModules;
95
+ apiPath = "model/list/".concat(includeDefaults, "?includeModules=").concat(includeModules);
96
96
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
97
97
  case 1:
98
98
  resp = _a.sent();
@@ -112,7 +112,7 @@ 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/" + includeDefault;
115
+ apiPath = "model/list-page-modules/".concat(includeDefault);
116
116
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
117
117
  case 1:
118
118
  resp = _a.sent();
@@ -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/" + id;
155
+ apiPath = "model/".concat(id);
156
156
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
157
157
  case 1:
158
158
  resp = _a.sent();
@@ -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,7 +53,7 @@ var PageMethods = /** @class */ (function () {
53
53
  switch (_a.label) {
54
54
  case 0:
55
55
  _a.trys.push([0, 2, , 3]);
56
- apiPath = locale + "/sitemap";
56
+ apiPath = "".concat(locale, "/sitemap");
57
57
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
58
58
  case 1:
59
59
  resp = _a.sent();
@@ -66,17 +66,17 @@ var PageMethods = /** @class */ (function () {
66
66
  });
67
67
  });
68
68
  };
69
- PageMethods.prototype.getPageTemplates = function (guid, locale, includeModuleZones, searchFilter) {
70
- if (searchFilter === void 0) { searchFilter = null; }
71
- return __awaiter(this, void 0, void 0, function () {
69
+ PageMethods.prototype.getPageTemplates = function (guid_1, locale_1, includeModuleZones_1) {
70
+ return __awaiter(this, arguments, void 0, function (guid, locale, includeModuleZones, searchFilter) {
72
71
  var apiPath, resp, err_2;
72
+ if (searchFilter === void 0) { searchFilter = null; }
73
73
  return __generator(this, function (_a) {
74
74
  switch (_a.label) {
75
75
  case 0:
76
76
  _a.trys.push([0, 2, , 3]);
77
77
  if (!searchFilter)
78
78
  searchFilter = '';
79
- apiPath = locale + "/page/templates?includeModuleZones=" + includeModuleZones + "&searchFilter=" + searchFilter;
79
+ apiPath = "".concat(locale, "/page/templates?includeModuleZones=").concat(includeModuleZones, "&searchFilter=").concat(searchFilter);
80
80
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
81
81
  case 1:
82
82
  resp = _a.sent();
@@ -96,7 +96,7 @@ var PageMethods = /** @class */ (function () {
96
96
  switch (_a.label) {
97
97
  case 0:
98
98
  _a.trys.push([0, 2, , 3]);
99
- apiPath = locale + "/page/template/" + pageTemplateId;
99
+ apiPath = "".concat(locale, "/page/template/").concat(pageTemplateId);
100
100
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
101
101
  case 1:
102
102
  resp = _a.sent();
@@ -116,7 +116,7 @@ var PageMethods = /** @class */ (function () {
116
116
  switch (_a.label) {
117
117
  case 0:
118
118
  _a.trys.push([0, 2, , 3]);
119
- apiPath = locale + "/page/template/" + templateName;
119
+ apiPath = "".concat(locale, "/page/template/").concat(templateName);
120
120
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
121
121
  case 1:
122
122
  resp = _a.sent();
@@ -136,7 +136,7 @@ var PageMethods = /** @class */ (function () {
136
136
  switch (_a.label) {
137
137
  case 0:
138
138
  _a.trys.push([0, 2, , 3]);
139
- apiPath = locale + "/page/template/" + pageTemplateId;
139
+ apiPath = "".concat(locale, "/page/template/").concat(pageTemplateId);
140
140
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
141
141
  case 1:
142
142
  resp = _a.sent();
@@ -156,7 +156,7 @@ var PageMethods = /** @class */ (function () {
156
156
  switch (_a.label) {
157
157
  case 0:
158
158
  _a.trys.push([0, 2, , 3]);
159
- apiPath = locale + "/page/template/items/" + id;
159
+ apiPath = "".concat(locale, "/page/template/items/").concat(id);
160
160
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
161
161
  case 1:
162
162
  resp = _a.sent();
@@ -176,7 +176,7 @@ var PageMethods = /** @class */ (function () {
176
176
  switch (_a.label) {
177
177
  case 0:
178
178
  _a.trys.push([0, 2, , 3]);
179
- apiPath = locale + "/page/template";
179
+ apiPath = "".concat(locale, "/page/template");
180
180
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, pageModel)];
181
181
  case 1:
182
182
  resp = _a.sent();
@@ -196,30 +196,30 @@ var PageMethods = /** @class */ (function () {
196
196
  switch (_a.label) {
197
197
  case 0:
198
198
  _a.trys.push([0, 2, , 3]);
199
- apiPath = locale + "/page/" + pageID;
199
+ apiPath = "".concat(locale, "/page/").concat(pageID);
200
200
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
201
201
  case 1:
202
202
  resp = _a.sent();
203
203
  return [2 /*return*/, resp.data];
204
204
  case 2:
205
205
  err_8 = _a.sent();
206
- throw new exception_1.Exception("Unable to retrieve page for id " + pageID + ".", err_8);
206
+ throw new exception_1.Exception("Unable to retrieve page for id ".concat(pageID, "."), err_8);
207
207
  case 3: return [2 /*return*/];
208
208
  }
209
209
  });
210
210
  });
211
211
  };
212
- PageMethods.prototype.publishPage = function (pageID, guid, locale, comments, returnBatchId) {
213
- if (comments === void 0) { comments = null; }
214
- if (returnBatchId === void 0) { returnBatchId = false; }
215
- return __awaiter(this, void 0, void 0, function () {
212
+ PageMethods.prototype.publishPage = function (pageID_1, guid_1, locale_1) {
213
+ return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments, returnBatchId) {
216
214
  var apiPath, resp, batchID_1, batch, pageIDs_1, err_9;
217
215
  var _this = this;
216
+ if (comments === void 0) { comments = null; }
217
+ if (returnBatchId === void 0) { returnBatchId = false; }
218
218
  return __generator(this, function (_a) {
219
219
  switch (_a.label) {
220
220
  case 0:
221
221
  _a.trys.push([0, 3, , 4]);
222
- apiPath = locale + "/page/" + pageID + "/publish?comments=" + comments;
222
+ apiPath = "".concat(locale, "/page/").concat(pageID, "/publish?comments=").concat(comments);
223
223
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
224
224
  case 1:
225
225
  resp = _a.sent();
@@ -241,23 +241,23 @@ var PageMethods = /** @class */ (function () {
241
241
  return [2 /*return*/, pageIDs_1];
242
242
  case 3:
243
243
  err_9 = _a.sent();
244
- throw new exception_1.Exception("Unable to publish the page for id: " + pageID, err_9);
244
+ throw new exception_1.Exception("Unable to publish the page for id: ".concat(pageID), err_9);
245
245
  case 4: return [2 /*return*/];
246
246
  }
247
247
  });
248
248
  });
249
249
  };
250
- PageMethods.prototype.unPublishPage = function (pageID, guid, locale, comments, returnBatchId) {
251
- if (comments === void 0) { comments = null; }
252
- if (returnBatchId === void 0) { returnBatchId = false; }
253
- return __awaiter(this, void 0, void 0, function () {
250
+ PageMethods.prototype.unPublishPage = function (pageID_1, guid_1, locale_1) {
251
+ return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments, returnBatchId) {
254
252
  var apiPath, resp, batchID_2, batch, pageIDs_2, err_10;
255
253
  var _this = this;
254
+ if (comments === void 0) { comments = null; }
255
+ if (returnBatchId === void 0) { returnBatchId = false; }
256
256
  return __generator(this, function (_a) {
257
257
  switch (_a.label) {
258
258
  case 0:
259
259
  _a.trys.push([0, 3, , 4]);
260
- apiPath = locale + "/page/" + pageID + "/unpublish?comments=" + comments;
260
+ apiPath = "".concat(locale, "/page/").concat(pageID, "/unpublish?comments=").concat(comments);
261
261
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
262
262
  case 1:
263
263
  resp = _a.sent();
@@ -279,23 +279,23 @@ var PageMethods = /** @class */ (function () {
279
279
  return [2 /*return*/, pageIDs_2];
280
280
  case 3:
281
281
  err_10 = _a.sent();
282
- throw new exception_1.Exception("Unable to un-publish the page for id: " + pageID, err_10);
282
+ throw new exception_1.Exception("Unable to un-publish the page for id: ".concat(pageID), err_10);
283
283
  case 4: return [2 /*return*/];
284
284
  }
285
285
  });
286
286
  });
287
287
  };
288
- PageMethods.prototype.pageRequestApproval = function (pageID, guid, locale, comments, returnBatchId) {
289
- if (comments === void 0) { comments = null; }
290
- if (returnBatchId === void 0) { returnBatchId = false; }
291
- return __awaiter(this, void 0, void 0, function () {
288
+ PageMethods.prototype.pageRequestApproval = function (pageID_1, guid_1, locale_1) {
289
+ return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments, returnBatchId) {
292
290
  var apiPath, resp, batchID_3, batch, pageIDs_3, err_11;
293
291
  var _this = this;
292
+ if (comments === void 0) { comments = null; }
293
+ if (returnBatchId === void 0) { returnBatchId = false; }
294
294
  return __generator(this, function (_a) {
295
295
  switch (_a.label) {
296
296
  case 0:
297
297
  _a.trys.push([0, 3, , 4]);
298
- apiPath = locale + "/page/" + pageID + "/request-approval?comments=" + comments;
298
+ apiPath = "".concat(locale, "/page/").concat(pageID, "/request-approval?comments=").concat(comments);
299
299
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
300
300
  case 1:
301
301
  resp = _a.sent();
@@ -317,23 +317,23 @@ var PageMethods = /** @class */ (function () {
317
317
  return [2 /*return*/, pageIDs_3];
318
318
  case 3:
319
319
  err_11 = _a.sent();
320
- throw new exception_1.Exception("Unable to request approval the page for id: " + pageID, err_11);
320
+ throw new exception_1.Exception("Unable to request approval the page for id: ".concat(pageID), err_11);
321
321
  case 4: return [2 /*return*/];
322
322
  }
323
323
  });
324
324
  });
325
325
  };
326
- PageMethods.prototype.approvePage = function (pageID, guid, locale, comments, returnBatchId) {
327
- if (comments === void 0) { comments = null; }
328
- if (returnBatchId === void 0) { returnBatchId = false; }
329
- return __awaiter(this, void 0, void 0, function () {
326
+ PageMethods.prototype.approvePage = function (pageID_1, guid_1, locale_1) {
327
+ return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments, returnBatchId) {
330
328
  var apiPath, resp, batchID_4, batch, pageIDs_4, err_12;
331
329
  var _this = this;
330
+ if (comments === void 0) { comments = null; }
331
+ if (returnBatchId === void 0) { returnBatchId = false; }
332
332
  return __generator(this, function (_a) {
333
333
  switch (_a.label) {
334
334
  case 0:
335
335
  _a.trys.push([0, 3, , 4]);
336
- apiPath = locale + "/page/" + pageID + "/approve?comments=" + comments;
336
+ apiPath = "".concat(locale, "/page/").concat(pageID, "/approve?comments=").concat(comments);
337
337
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
338
338
  case 1:
339
339
  resp = _a.sent();
@@ -355,23 +355,23 @@ var PageMethods = /** @class */ (function () {
355
355
  return [2 /*return*/, pageIDs_4];
356
356
  case 3:
357
357
  err_12 = _a.sent();
358
- throw new exception_1.Exception("Unable to approve the page for id: " + pageID, err_12);
358
+ throw new exception_1.Exception("Unable to approve the page for id: ".concat(pageID), err_12);
359
359
  case 4: return [2 /*return*/];
360
360
  }
361
361
  });
362
362
  });
363
363
  };
364
- PageMethods.prototype.declinePage = function (pageID, guid, locale, comments, returnBatchId) {
365
- if (comments === void 0) { comments = null; }
366
- if (returnBatchId === void 0) { returnBatchId = false; }
367
- return __awaiter(this, void 0, void 0, function () {
364
+ PageMethods.prototype.declinePage = function (pageID_1, guid_1, locale_1) {
365
+ return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments, returnBatchId) {
368
366
  var apiPath, resp, batchID_5, batch, pageIDs_5, err_13;
369
367
  var _this = this;
368
+ if (comments === void 0) { comments = null; }
369
+ if (returnBatchId === void 0) { returnBatchId = false; }
370
370
  return __generator(this, function (_a) {
371
371
  switch (_a.label) {
372
372
  case 0:
373
373
  _a.trys.push([0, 3, , 4]);
374
- apiPath = locale + "/page/" + pageID + "/decline?comments=" + comments;
374
+ apiPath = "".concat(locale, "/page/").concat(pageID, "/decline?comments=").concat(comments);
375
375
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
376
376
  case 1:
377
377
  resp = _a.sent();
@@ -393,23 +393,23 @@ var PageMethods = /** @class */ (function () {
393
393
  return [2 /*return*/, pageIDs_5];
394
394
  case 3:
395
395
  err_13 = _a.sent();
396
- throw new exception_1.Exception("Unable to decline the page for id: " + pageID, err_13);
396
+ throw new exception_1.Exception("Unable to decline the page for id: ".concat(pageID), err_13);
397
397
  case 4: return [2 /*return*/];
398
398
  }
399
399
  });
400
400
  });
401
401
  };
402
- PageMethods.prototype.deletePage = function (pageID, guid, locale, comments, returnBatchId) {
403
- if (comments === void 0) { comments = null; }
404
- if (returnBatchId === void 0) { returnBatchId = false; }
405
- return __awaiter(this, void 0, void 0, function () {
402
+ PageMethods.prototype.deletePage = function (pageID_1, guid_1, locale_1) {
403
+ return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments, returnBatchId) {
406
404
  var apiPath, resp, batchID_6, batch, pageIDs_6, err_14;
407
405
  var _this = this;
406
+ if (comments === void 0) { comments = null; }
407
+ if (returnBatchId === void 0) { returnBatchId = false; }
408
408
  return __generator(this, function (_a) {
409
409
  switch (_a.label) {
410
410
  case 0:
411
411
  _a.trys.push([0, 3, , 4]);
412
- apiPath = locale + "/page/" + pageID + "?comments=" + comments;
412
+ apiPath = "".concat(locale, "/page/").concat(pageID, "?comments=").concat(comments);
413
413
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
414
414
  case 1:
415
415
  resp = _a.sent();
@@ -431,7 +431,7 @@ var PageMethods = /** @class */ (function () {
431
431
  return [2 /*return*/, pageIDs_6];
432
432
  case 3:
433
433
  err_14 = _a.sent();
434
- throw new exception_1.Exception("Unable to delete the page for id: " + pageID, err_14);
434
+ throw new exception_1.Exception("Unable to delete the page for id: ".concat(pageID), err_14);
435
435
  case 4: return [2 /*return*/];
436
436
  }
437
437
  });
@@ -449,23 +449,23 @@ var PageMethods = /** @class */ (function () {
449
449
  * @param otherLocale The other locale to link the page to.
450
450
  * @returns The IDs of the created or updated pages
451
451
  */
452
- PageMethods.prototype.savePage = function (pageItem, guid, locale, parentPageID, placeBeforePageItemID, returnBatchId, pageIDInOtherLocale, otherLocale) {
453
- if (parentPageID === void 0) { parentPageID = -1; }
454
- if (placeBeforePageItemID === void 0) { placeBeforePageItemID = -1; }
455
- if (returnBatchId === void 0) { returnBatchId = false; }
456
- if (pageIDInOtherLocale === void 0) { pageIDInOtherLocale = -1; }
457
- if (otherLocale === void 0) { otherLocale = null; }
458
- return __awaiter(this, void 0, void 0, function () {
452
+ PageMethods.prototype.savePage = function (pageItem_1, guid_1, locale_1) {
453
+ return __awaiter(this, arguments, void 0, function (pageItem, guid, locale, parentPageID, placeBeforePageItemID, returnBatchId, pageIDInOtherLocale, otherLocale) {
459
454
  var apiPath, resp, batchID_7, batch, pageIDs_7, err_15;
460
455
  var _this = this;
456
+ if (parentPageID === void 0) { parentPageID = -1; }
457
+ if (placeBeforePageItemID === void 0) { placeBeforePageItemID = -1; }
458
+ if (returnBatchId === void 0) { returnBatchId = false; }
459
+ if (pageIDInOtherLocale === void 0) { pageIDInOtherLocale = -1; }
460
+ if (otherLocale === void 0) { otherLocale = null; }
461
461
  return __generator(this, function (_a) {
462
462
  switch (_a.label) {
463
463
  case 0:
464
464
  _a.trys.push([0, 3, , 4]);
465
- apiPath = locale + "/page?parentPageID=" + parentPageID + "&placeBeforePageItemID=" + placeBeforePageItemID;
465
+ apiPath = "".concat(locale, "/page?parentPageID=").concat(parentPageID, "&placeBeforePageItemID=").concat(placeBeforePageItemID);
466
466
  if (pageIDInOtherLocale > -1 && otherLocale) {
467
467
  // If we have the other locale and the pageID in that locale, we need to link it up.
468
- apiPath += "&pageIDInOtherLocale=" + pageIDInOtherLocale + "&otherLocale=" + otherLocale;
468
+ apiPath += "&pageIDInOtherLocale=".concat(pageIDInOtherLocale, "&otherLocale=").concat(otherLocale);
469
469
  }
470
470
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, pageItem)];
471
471
  case 1:
@@ -488,51 +488,51 @@ var PageMethods = /** @class */ (function () {
488
488
  return [2 /*return*/, pageIDs_7];
489
489
  case 3:
490
490
  err_15 = _a.sent();
491
- throw new exception_1.Exception("Unable to create page. " + err_15, err_15);
491
+ throw new exception_1.Exception("Unable to create page. ".concat(err_15), err_15);
492
492
  case 4: return [2 /*return*/];
493
493
  }
494
494
  });
495
495
  });
496
496
  };
497
- PageMethods.prototype.getPageHistory = function (locale, guid, pageID, take, skip) {
498
- if (take === void 0) { take = 50; }
499
- if (skip === void 0) { skip = 0; }
500
- return __awaiter(this, void 0, void 0, function () {
497
+ PageMethods.prototype.getPageHistory = function (locale_1, guid_1, pageID_1) {
498
+ return __awaiter(this, arguments, void 0, function (locale, guid, pageID, take, skip) {
501
499
  var apiPath, resp, err_16;
500
+ if (take === void 0) { take = 50; }
501
+ if (skip === void 0) { skip = 0; }
502
502
  return __generator(this, function (_a) {
503
503
  switch (_a.label) {
504
504
  case 0:
505
505
  _a.trys.push([0, 2, , 3]);
506
- apiPath = locale + "/item/" + pageID + "/history?take=" + take + "&skip=" + skip;
506
+ apiPath = "".concat(locale, "/item/").concat(pageID, "/history?take=").concat(take, "&skip=").concat(skip);
507
507
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
508
508
  case 1:
509
509
  resp = _a.sent();
510
510
  return [2 /*return*/, resp.data];
511
511
  case 2:
512
512
  err_16 = _a.sent();
513
- throw new exception_1.Exception("Unable to retrieve history for pageID: " + pageID);
513
+ throw new exception_1.Exception("Unable to retrieve history for pageID: ".concat(pageID));
514
514
  case 3: return [2 /*return*/];
515
515
  }
516
516
  });
517
517
  });
518
518
  };
519
- PageMethods.prototype.getPageComments = function (locale, guid, pageID, take, skip) {
520
- if (take === void 0) { take = 50; }
521
- if (skip === void 0) { skip = 0; }
522
- return __awaiter(this, void 0, void 0, function () {
519
+ PageMethods.prototype.getPageComments = function (locale_1, guid_1, pageID_1) {
520
+ return __awaiter(this, arguments, void 0, function (locale, guid, pageID, take, skip) {
523
521
  var apiPath, resp, err_17;
522
+ if (take === void 0) { take = 50; }
523
+ if (skip === void 0) { skip = 0; }
524
524
  return __generator(this, function (_a) {
525
525
  switch (_a.label) {
526
526
  case 0:
527
527
  _a.trys.push([0, 2, , 3]);
528
- apiPath = locale + "/item/" + pageID + "/history?take=" + take + "&skip=" + skip;
528
+ apiPath = "".concat(locale, "/item/").concat(pageID, "/history?take=").concat(take, "&skip=").concat(skip);
529
529
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
530
530
  case 1:
531
531
  resp = _a.sent();
532
532
  return [2 /*return*/, resp.data];
533
533
  case 2:
534
534
  err_17 = _a.sent();
535
- throw new exception_1.Exception("Unable to retrieve history for pageID: " + pageID);
535
+ throw new exception_1.Exception("Unable to retrieve history for pageID: ".concat(pageID));
536
536
  case 3: return [2 /*return*/];
537
537
  }
538
538
  });
@@ -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]) {
@@ -71,7 +71,7 @@ var ServerUserMethods = /** @class */ (function () {
71
71
  switch (_a.label) {
72
72
  case 0:
73
73
  _a.trys.push([0, 2, , 3]);
74
- apiPath = "users/you?srvUserID=" + serverUserID;
74
+ apiPath = "users/you?srvUserID=".concat(serverUserID);
75
75
  return [4 /*yield*/, this._clientInstance.executeServerGet(apiPath, guid, this._options.token)];
76
76
  case 1:
77
77
  resp = _a.sent();
@@ -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]) {
@@ -44,11 +44,11 @@ var WebhookMethods = /** @class */ (function () {
44
44
  this._options = options;
45
45
  this._cleintInstance = new clientInstance_1.ClientInstance(this._options);
46
46
  }
47
- WebhookMethods.prototype.webhookList = function (guid, take, token) {
48
- if (take === void 0) { take = 20; }
49
- if (token === void 0) { token = null; }
50
- return __awaiter(this, void 0, void 0, function () {
47
+ WebhookMethods.prototype.webhookList = function (guid_1) {
48
+ return __awaiter(this, arguments, void 0, function (guid, take, token) {
51
49
  var apiPath, resp, err_1;
50
+ if (take === void 0) { take = 20; }
51
+ if (token === void 0) { token = null; }
52
52
  return __generator(this, function (_a) {
53
53
  switch (_a.label) {
54
54
  case 0:
@@ -93,14 +93,14 @@ var WebhookMethods = /** @class */ (function () {
93
93
  switch (_a.label) {
94
94
  case 0:
95
95
  _a.trys.push([0, 2, , 3]);
96
- apiPath = "webhook/" + webhookID;
96
+ apiPath = "webhook/".concat(webhookID);
97
97
  return [4 /*yield*/, this._cleintInstance.executeGet(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 retrieve webhook for webhookID: " + webhookID + ",", err_3);
103
+ throw new exception_1.Exception("Unable to retrieve webhook for webhookID: ".concat(webhookID, ","), err_3);
104
104
  case 3: return [2 /*return*/];
105
105
  }
106
106
  });
@@ -113,14 +113,14 @@ var WebhookMethods = /** @class */ (function () {
113
113
  switch (_a.label) {
114
114
  case 0:
115
115
  _a.trys.push([0, 2, , 3]);
116
- apiPath = "webhook/" + webhookID;
116
+ apiPath = "webhook/".concat(webhookID);
117
117
  return [4 /*yield*/, this._cleintInstance.executeDelete(apiPath, guid, this._options.token)];
118
118
  case 1:
119
119
  _a.sent();
120
120
  return [3 /*break*/, 3];
121
121
  case 2:
122
122
  err_4 = _a.sent();
123
- throw new exception_1.Exception("Unable to delete webhook for webhookID: " + webhookID + ".", err_4);
123
+ throw new exception_1.Exception("Unable to delete webhook for webhookID: ".concat(webhookID, "."), err_4);
124
124
  case 3: return [2 /*return*/];
125
125
  }
126
126
  });
@@ -4,4 +4,4 @@ exports.AssetGroupingType = void 0;
4
4
  var AssetGroupingType;
5
5
  (function (AssetGroupingType) {
6
6
  AssetGroupingType[AssetGroupingType["Gallery"] = 1] = "Gallery";
7
- })(AssetGroupingType = exports.AssetGroupingType || (exports.AssetGroupingType = {}));
7
+ })(AssetGroupingType || (exports.AssetGroupingType = AssetGroupingType = {}));
@@ -8,4 +8,4 @@ var BatchItemType;
8
8
  BatchItemType[BatchItemType["ContentList"] = 3] = "ContentList";
9
9
  BatchItemType[BatchItemType["Tag"] = 4] = "Tag";
10
10
  BatchItemType[BatchItemType["ModuleDef"] = 5] = "ModuleDef";
11
- })(BatchItemType = exports.BatchItemType || (exports.BatchItemType = {}));
11
+ })(BatchItemType || (exports.BatchItemType = BatchItemType = {}));
@@ -20,4 +20,4 @@ var BatchOperationType;
20
20
  BatchOperationType[BatchOperationType["DeleteContent"] = 15] = "DeleteContent";
21
21
  BatchOperationType[BatchOperationType["SavePage"] = 16] = "SavePage";
22
22
  BatchOperationType[BatchOperationType["DeletePage"] = 17] = "DeletePage";
23
- })(BatchOperationType = exports.BatchOperationType || (exports.BatchOperationType = {}));
23
+ })(BatchOperationType || (exports.BatchOperationType = BatchOperationType = {}));
@@ -8,4 +8,4 @@ var BatchState;
8
8
  BatchState[BatchState["InProcess"] = 2] = "InProcess";
9
9
  BatchState[BatchState["Processed"] = 3] = "Processed";
10
10
  BatchState[BatchState["Deleted"] = 4] = "Deleted";
11
- })(BatchState = exports.BatchState || (exports.BatchState = {}));
11
+ })(BatchState || (exports.BatchState = BatchState = {}));
@@ -5,4 +5,4 @@ var PageItemTemplateType;
5
5
  (function (PageItemTemplateType) {
6
6
  PageItemTemplateType[PageItemTemplateType["Variable"] = 0] = "Variable";
7
7
  PageItemTemplateType[PageItemTemplateType["FixedModule"] = 1] = "FixedModule";
8
- })(PageItemTemplateType = exports.PageItemTemplateType || (exports.PageItemTemplateType = {}));
8
+ })(PageItemTemplateType || (exports.PageItemTemplateType = PageItemTemplateType = {}));
@@ -27,4 +27,4 @@ var WorkflowOperationType;
27
27
  * Request approval for the items in the batch.
28
28
  */
29
29
  WorkflowOperationType[WorkflowOperationType["RequestApproval"] = 5] = "RequestApproval";
30
- })(WorkflowOperationType = exports.WorkflowOperationType || (exports.WorkflowOperationType = {}));
30
+ })(WorkflowOperationType || (exports.WorkflowOperationType = WorkflowOperationType = {}));
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];