@agility/management-sdk 0.1.23 → 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.
Files changed (38) hide show
  1. package/dist/apiMethods/assetMethods.js +38 -38
  2. package/dist/apiMethods/batchMethods.js +5 -5
  3. package/dist/apiMethods/clientInstance.js +9 -9
  4. package/dist/apiMethods/containerMethods.js +21 -21
  5. package/dist/apiMethods/contentMethods.js +56 -56
  6. package/dist/apiMethods/instanceMethods.js +3 -3
  7. package/dist/apiMethods/instanceUserMethods.js +12 -12
  8. package/dist/apiMethods/modelMethods.js +15 -15
  9. package/dist/apiMethods/pageMethods.js +68 -68
  10. package/dist/apiMethods/serverUserMethods.js +4 -4
  11. package/dist/apiMethods/webhookMethods.js +11 -11
  12. package/dist/enums/assetGroupingType.js +1 -1
  13. package/dist/enums/batchOperationType.js +1 -1
  14. package/dist/enums/batchState..js +1 -1
  15. package/dist/enums/pageItemTemplateType.js +1 -1
  16. package/dist/index.js +1 -5
  17. package/dist/models/exception.js +0 -2
  18. package/dist/models/locales.js +0 -2
  19. package/package.json +2 -2
  20. package/.cursor/manifest.md +0 -65
  21. package/.cursor/rules/agility_cms_sdk_rules.mdc +0 -155
  22. package/.cursor/rules/asset_management.mdc +0 -97
  23. package/.cursor/rules/common_patterns.mdc +0 -5
  24. package/.cursor/rules/configuration.mdc +0 -5
  25. package/.cursor/rules/content_management.mdc +0 -5
  26. package/.cursor/rules/page_management.mdc +0 -5
  27. package/.cursor/rules/security.mdc +0 -5
  28. package/.cursor/rules/setup_and_auth.mdc +0 -5
  29. package/.cursor/rules/testing_and_debugging.mdc +0 -5
  30. package/.cursor/rules/webhook_management.mdc +0 -61
  31. package/.env +0 -11
  32. package/dist/models/tokenResponseData.d.ts +0 -11
  33. package/dist/models/tokenResponseData.js +0 -13
  34. package/dist/tests/instance.test.d.ts +0 -1
  35. package/dist/tests/instance.test.js +0 -99
  36. package/dist/tests/sdk.test.d.ts +0 -1
  37. package/dist/tests/sdk.test.js +0 -78
  38. package/environment.example +0 -12
@@ -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,37 +53,37 @@ var PageMethods = /** @class */ (function () {
53
53
  switch (_a.label) {
54
54
  case 0:
55
55
  _a.trys.push([0, 2, , 3]);
56
- apiPath = "".concat(locale, "/sitemap");
56
+ apiPath = locale + "/sitemap";
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 sitemap.", err_1);
63
+ throw new exception_1.Exception("Unable to retrieve sitemap.", err_1);
64
64
  case 3: return [2 /*return*/];
65
65
  }
66
66
  });
67
67
  });
68
68
  };
69
- PageMethods.prototype.getPageTemplates = function (guid_1, locale_1, includeModuleZones_1) {
70
- return __awaiter(this, arguments, void 0, function (guid, locale, includeModuleZones, searchFilter) {
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 () {
71
72
  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 = "".concat(locale, "/page/templates?includeModuleZones=").concat(includeModuleZones, "&searchFilter=").concat(searchFilter);
79
+ apiPath = locale + "/page/templates?includeModuleZones=" + includeModuleZones + "&searchFilter=" + searchFilter;
80
80
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
81
81
  case 1:
82
82
  resp = _a.sent();
83
83
  return [2 /*return*/, resp.data];
84
84
  case 2:
85
85
  err_2 = _a.sent();
86
- throw new exception_1.Exception("Unable to retreive Page Templates.", err_2);
86
+ throw new exception_1.Exception("Unable to retrieve Page Templates.", err_2);
87
87
  case 3: return [2 /*return*/];
88
88
  }
89
89
  });
@@ -96,14 +96,14 @@ var PageMethods = /** @class */ (function () {
96
96
  switch (_a.label) {
97
97
  case 0:
98
98
  _a.trys.push([0, 2, , 3]);
99
- apiPath = "".concat(locale, "/page/template/").concat(pageTemplateId);
99
+ apiPath = locale + "/page/template/" + pageTemplateId;
100
100
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
101
101
  case 1:
102
102
  resp = _a.sent();
103
103
  return [2 /*return*/, resp.data];
104
104
  case 2:
105
105
  err_3 = _a.sent();
106
- throw new exception_1.Exception("Unable to retreive Page Template.", err_3);
106
+ throw new exception_1.Exception("Unable to retrieve Page Template.", err_3);
107
107
  case 3: return [2 /*return*/];
108
108
  }
109
109
  });
@@ -116,14 +116,14 @@ var PageMethods = /** @class */ (function () {
116
116
  switch (_a.label) {
117
117
  case 0:
118
118
  _a.trys.push([0, 2, , 3]);
119
- apiPath = "".concat(locale, "/page/template/").concat(templateName);
119
+ apiPath = locale + "/page/template/" + templateName;
120
120
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
121
121
  case 1:
122
122
  resp = _a.sent();
123
123
  return [2 /*return*/, resp.data];
124
124
  case 2:
125
125
  err_4 = _a.sent();
126
- throw new exception_1.Exception("Unable to retreive Page Template.", err_4);
126
+ throw new exception_1.Exception("Unable to retrieve Page Template.", err_4);
127
127
  case 3: return [2 /*return*/];
128
128
  }
129
129
  });
@@ -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 = "".concat(locale, "/page/template/").concat(pageTemplateId);
139
+ apiPath = locale + "/page/template/" + pageTemplateId;
140
140
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
141
141
  case 1:
142
142
  resp = _a.sent();
@@ -156,14 +156,14 @@ var PageMethods = /** @class */ (function () {
156
156
  switch (_a.label) {
157
157
  case 0:
158
158
  _a.trys.push([0, 2, , 3]);
159
- apiPath = "".concat(locale, "/page/template/items/").concat(id);
159
+ apiPath = locale + "/page/template/items/" + id;
160
160
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
161
161
  case 1:
162
162
  resp = _a.sent();
163
163
  return [2 /*return*/, resp.data];
164
164
  case 2:
165
165
  err_6 = _a.sent();
166
- throw new exception_1.Exception("Unable to retreive Page Template Items.", err_6);
166
+ throw new exception_1.Exception("Unable to retrieve Page Template Items.", err_6);
167
167
  case 3: return [2 /*return*/];
168
168
  }
169
169
  });
@@ -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 = "".concat(locale, "/page/template");
179
+ apiPath = 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,29 +196,29 @@ var PageMethods = /** @class */ (function () {
196
196
  switch (_a.label) {
197
197
  case 0:
198
198
  _a.trys.push([0, 2, , 3]);
199
- apiPath = "".concat(locale, "/page/").concat(pageID);
199
+ apiPath = locale + "/page/" + 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 retreive page for id ".concat(pageID, "."), err_8);
206
+ throw new exception_1.Exception("Unable to retrieve page for id " + pageID + ".", err_8);
207
207
  case 3: return [2 /*return*/];
208
208
  }
209
209
  });
210
210
  });
211
211
  };
212
- PageMethods.prototype.publishPage = function (pageID_1, guid_1, locale_1) {
213
- return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments) {
212
+ PageMethods.prototype.publishPage = function (pageID, guid, locale, comments) {
213
+ if (comments === void 0) { comments = null; }
214
+ return __awaiter(this, void 0, void 0, function () {
214
215
  var apiPath, resp, batchID_1, batch, pageIDs_1, err_9;
215
216
  var _this = this;
216
- if (comments === void 0) { comments = null; }
217
217
  return __generator(this, function (_a) {
218
218
  switch (_a.label) {
219
219
  case 0:
220
220
  _a.trys.push([0, 3, , 4]);
221
- apiPath = "".concat(locale, "/page/").concat(pageID, "/publish?comments=").concat(comments);
221
+ apiPath = locale + "/page/" + pageID + "/publish?comments=" + comments;
222
222
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
223
223
  case 1:
224
224
  resp = _a.sent();
@@ -236,22 +236,22 @@ var PageMethods = /** @class */ (function () {
236
236
  return [2 /*return*/, pageIDs_1];
237
237
  case 3:
238
238
  err_9 = _a.sent();
239
- throw new exception_1.Exception("Unable to publish the page for id: ".concat(pageID), err_9);
239
+ throw new exception_1.Exception("Unable to publish the page for id: " + pageID, err_9);
240
240
  case 4: return [2 /*return*/];
241
241
  }
242
242
  });
243
243
  });
244
244
  };
245
- PageMethods.prototype.unPublishPage = function (pageID_1, guid_1, locale_1) {
246
- return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments) {
245
+ PageMethods.prototype.unPublishPage = function (pageID, guid, locale, comments) {
246
+ if (comments === void 0) { comments = null; }
247
+ return __awaiter(this, void 0, void 0, function () {
247
248
  var apiPath, resp, batchID_2, batch, pageIDs_2, err_10;
248
249
  var _this = this;
249
- if (comments === void 0) { comments = null; }
250
250
  return __generator(this, function (_a) {
251
251
  switch (_a.label) {
252
252
  case 0:
253
253
  _a.trys.push([0, 3, , 4]);
254
- apiPath = "".concat(locale, "/page/").concat(pageID, "/unpublish?comments=").concat(comments);
254
+ apiPath = locale + "/page/" + pageID + "/unpublish?comments=" + comments;
255
255
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
256
256
  case 1:
257
257
  resp = _a.sent();
@@ -269,22 +269,22 @@ var PageMethods = /** @class */ (function () {
269
269
  return [2 /*return*/, pageIDs_2];
270
270
  case 3:
271
271
  err_10 = _a.sent();
272
- throw new exception_1.Exception("Unable to un-publish the page for id: ".concat(pageID), err_10);
272
+ throw new exception_1.Exception("Unable to un-publish the page for id: " + pageID, err_10);
273
273
  case 4: return [2 /*return*/];
274
274
  }
275
275
  });
276
276
  });
277
277
  };
278
- PageMethods.prototype.pageRequestApproval = function (pageID_1, guid_1, locale_1) {
279
- return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments) {
278
+ PageMethods.prototype.pageRequestApproval = function (pageID, guid, locale, comments) {
279
+ if (comments === void 0) { comments = null; }
280
+ return __awaiter(this, void 0, void 0, function () {
280
281
  var apiPath, resp, batchID_3, batch, pageIDs_3, err_11;
281
282
  var _this = this;
282
- if (comments === void 0) { comments = null; }
283
283
  return __generator(this, function (_a) {
284
284
  switch (_a.label) {
285
285
  case 0:
286
286
  _a.trys.push([0, 3, , 4]);
287
- apiPath = "".concat(locale, "/page/").concat(pageID, "/request-approval?comments=").concat(comments);
287
+ apiPath = locale + "/page/" + pageID + "/request-approval?comments=" + comments;
288
288
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
289
289
  case 1:
290
290
  resp = _a.sent();
@@ -302,22 +302,22 @@ var PageMethods = /** @class */ (function () {
302
302
  return [2 /*return*/, pageIDs_3];
303
303
  case 3:
304
304
  err_11 = _a.sent();
305
- throw new exception_1.Exception("Unable to request approval the page for id: ".concat(pageID), err_11);
305
+ throw new exception_1.Exception("Unable to request approval the page for id: " + pageID, err_11);
306
306
  case 4: return [2 /*return*/];
307
307
  }
308
308
  });
309
309
  });
310
310
  };
311
- PageMethods.prototype.approvePage = function (pageID_1, guid_1, locale_1) {
312
- return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments) {
311
+ PageMethods.prototype.approvePage = function (pageID, guid, locale, comments) {
312
+ if (comments === void 0) { comments = null; }
313
+ return __awaiter(this, void 0, void 0, function () {
313
314
  var apiPath, resp, batchID_4, batch, pageIDs_4, err_12;
314
315
  var _this = this;
315
- if (comments === void 0) { comments = null; }
316
316
  return __generator(this, function (_a) {
317
317
  switch (_a.label) {
318
318
  case 0:
319
319
  _a.trys.push([0, 3, , 4]);
320
- apiPath = "".concat(locale, "/page/").concat(pageID, "/approve?comments=").concat(comments);
320
+ apiPath = locale + "/page/" + pageID + "/approve?comments=" + comments;
321
321
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
322
322
  case 1:
323
323
  resp = _a.sent();
@@ -335,22 +335,22 @@ var PageMethods = /** @class */ (function () {
335
335
  return [2 /*return*/, pageIDs_4];
336
336
  case 3:
337
337
  err_12 = _a.sent();
338
- throw new exception_1.Exception("Unable to approve the page for id: ".concat(pageID), err_12);
338
+ throw new exception_1.Exception("Unable to approve the page for id: " + pageID, err_12);
339
339
  case 4: return [2 /*return*/];
340
340
  }
341
341
  });
342
342
  });
343
343
  };
344
- PageMethods.prototype.declinePage = function (pageID_1, guid_1, locale_1) {
345
- return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments) {
344
+ PageMethods.prototype.declinePage = function (pageID, guid, locale, comments) {
345
+ if (comments === void 0) { comments = null; }
346
+ return __awaiter(this, void 0, void 0, function () {
346
347
  var apiPath, resp, batchID_5, batch, pageIDs_5, err_13;
347
348
  var _this = this;
348
- if (comments === void 0) { comments = null; }
349
349
  return __generator(this, function (_a) {
350
350
  switch (_a.label) {
351
351
  case 0:
352
352
  _a.trys.push([0, 3, , 4]);
353
- apiPath = "".concat(locale, "/page/").concat(pageID, "/decline?comments=").concat(comments);
353
+ apiPath = locale + "/page/" + pageID + "/decline?comments=" + comments;
354
354
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
355
355
  case 1:
356
356
  resp = _a.sent();
@@ -368,22 +368,22 @@ var PageMethods = /** @class */ (function () {
368
368
  return [2 /*return*/, pageIDs_5];
369
369
  case 3:
370
370
  err_13 = _a.sent();
371
- throw new exception_1.Exception("Unable to decline the page for id: ".concat(pageID), err_13);
371
+ throw new exception_1.Exception("Unable to decline the page for id: " + pageID, err_13);
372
372
  case 4: return [2 /*return*/];
373
373
  }
374
374
  });
375
375
  });
376
376
  };
377
- PageMethods.prototype.deletePage = function (pageID_1, guid_1, locale_1) {
378
- return __awaiter(this, arguments, void 0, function (pageID, guid, locale, comments) {
377
+ PageMethods.prototype.deletePage = function (pageID, guid, locale, comments) {
378
+ if (comments === void 0) { comments = null; }
379
+ return __awaiter(this, void 0, void 0, function () {
379
380
  var apiPath, resp, batchID_6, batch, pageIDs_6, err_14;
380
381
  var _this = this;
381
- if (comments === void 0) { comments = null; }
382
382
  return __generator(this, function (_a) {
383
383
  switch (_a.label) {
384
384
  case 0:
385
385
  _a.trys.push([0, 3, , 4]);
386
- apiPath = "".concat(locale, "/page/").concat(pageID, "?comments=").concat(comments);
386
+ apiPath = locale + "/page/" + pageID + "?comments=" + comments;
387
387
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
388
388
  case 1:
389
389
  resp = _a.sent();
@@ -401,23 +401,23 @@ var PageMethods = /** @class */ (function () {
401
401
  return [2 /*return*/, pageIDs_6];
402
402
  case 3:
403
403
  err_14 = _a.sent();
404
- throw new exception_1.Exception("Unable to delete the page for id: ".concat(pageID), err_14);
404
+ throw new exception_1.Exception("Unable to delete the page for id: " + pageID, err_14);
405
405
  case 4: return [2 /*return*/];
406
406
  }
407
407
  });
408
408
  });
409
409
  };
410
- PageMethods.prototype.savePage = function (pageItem_1, guid_1, locale_1) {
411
- return __awaiter(this, arguments, void 0, function (pageItem, guid, locale, parentPageID, placeBeforePageItemID) {
410
+ PageMethods.prototype.savePage = function (pageItem, guid, locale, parentPageID, placeBeforePageItemID) {
411
+ if (parentPageID === void 0) { parentPageID = -1; }
412
+ if (placeBeforePageItemID === void 0) { placeBeforePageItemID = -1; }
413
+ return __awaiter(this, void 0, void 0, function () {
412
414
  var apiPath, resp, batchID_7, batch, pageIDs_7, err_15;
413
415
  var _this = this;
414
- if (parentPageID === void 0) { parentPageID = -1; }
415
- if (placeBeforePageItemID === void 0) { placeBeforePageItemID = -1; }
416
416
  return __generator(this, function (_a) {
417
417
  switch (_a.label) {
418
418
  case 0:
419
419
  _a.trys.push([0, 3, , 4]);
420
- apiPath = "".concat(locale, "/page?parentPageID=").concat(parentPageID, "&placeBeforePageItemID=").concat(placeBeforePageItemID);
420
+ apiPath = locale + "/page?parentPageID=" + parentPageID + "&placeBeforePageItemID=" + placeBeforePageItemID;
421
421
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, pageItem)];
422
422
  case 1:
423
423
  resp = _a.sent();
@@ -439,51 +439,51 @@ var PageMethods = /** @class */ (function () {
439
439
  return [2 /*return*/, pageIDs_7];
440
440
  case 3:
441
441
  err_15 = _a.sent();
442
- throw new exception_1.Exception("Unable to create page. ".concat(err_15), err_15);
442
+ throw new exception_1.Exception("Unable to create page. " + err_15, err_15);
443
443
  case 4: return [2 /*return*/];
444
444
  }
445
445
  });
446
446
  });
447
447
  };
448
- PageMethods.prototype.getPageHistory = function (locale_1, guid_1, pageID_1) {
449
- return __awaiter(this, arguments, void 0, function (locale, guid, pageID, take, skip) {
448
+ PageMethods.prototype.getPageHistory = function (locale, guid, pageID, take, skip) {
449
+ if (take === void 0) { take = 50; }
450
+ if (skip === void 0) { skip = 0; }
451
+ return __awaiter(this, void 0, void 0, function () {
450
452
  var apiPath, resp, err_16;
451
- if (take === void 0) { take = 50; }
452
- if (skip === void 0) { skip = 0; }
453
453
  return __generator(this, function (_a) {
454
454
  switch (_a.label) {
455
455
  case 0:
456
456
  _a.trys.push([0, 2, , 3]);
457
- apiPath = "".concat(locale, "/item/").concat(pageID, "/history?take=").concat(take, "&skip=").concat(skip);
457
+ apiPath = locale + "/item/" + pageID + "/history?take=" + take + "&skip=" + skip;
458
458
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
459
459
  case 1:
460
460
  resp = _a.sent();
461
461
  return [2 /*return*/, resp.data];
462
462
  case 2:
463
463
  err_16 = _a.sent();
464
- throw new exception_1.Exception("Unable to retrieve history for pageID: ".concat(pageID));
464
+ throw new exception_1.Exception("Unable to retrieve history for pageID: " + pageID);
465
465
  case 3: return [2 /*return*/];
466
466
  }
467
467
  });
468
468
  });
469
469
  };
470
- PageMethods.prototype.getPageComments = function (locale_1, guid_1, pageID_1) {
471
- return __awaiter(this, arguments, void 0, function (locale, guid, pageID, take, skip) {
470
+ PageMethods.prototype.getPageComments = function (locale, guid, pageID, take, skip) {
471
+ if (take === void 0) { take = 50; }
472
+ if (skip === void 0) { skip = 0; }
473
+ return __awaiter(this, void 0, void 0, function () {
472
474
  var apiPath, resp, err_17;
473
- if (take === void 0) { take = 50; }
474
- if (skip === void 0) { skip = 0; }
475
475
  return __generator(this, function (_a) {
476
476
  switch (_a.label) {
477
477
  case 0:
478
478
  _a.trys.push([0, 2, , 3]);
479
- apiPath = "".concat(locale, "/item/").concat(pageID, "/history?take=").concat(take, "&skip=").concat(skip);
479
+ apiPath = locale + "/item/" + pageID + "/history?take=" + take + "&skip=" + skip;
480
480
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
481
481
  case 1:
482
482
  resp = _a.sent();
483
483
  return [2 /*return*/, resp.data];
484
484
  case 2:
485
485
  err_17 = _a.sent();
486
- throw new exception_1.Exception("Unable to retrieve history for pageID: ".concat(pageID));
486
+ throw new exception_1.Exception("Unable to retrieve history for pageID: " + pageID);
487
487
  case 3: return [2 /*return*/];
488
488
  }
489
489
  });
@@ -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]) {
@@ -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=".concat(serverUserID);
74
+ apiPath = "users/you?srvUserID=" + 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 = 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]) {
@@ -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_1) {
48
- return __awaiter(this, arguments, void 0, function (guid, take, token) {
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 () {
49
51
  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/".concat(webhookID);
96
+ apiPath = "webhook/" + 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: ".concat(webhookID, ","), err_3);
103
+ throw new exception_1.Exception("Unable to retrieve webhook for webhookID: " + 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/".concat(webhookID);
116
+ apiPath = "webhook/" + 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: ".concat(webhookID, "."), err_4);
123
+ throw new exception_1.Exception("Unable to delete webhook for webhookID: " + 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 = AssetGroupingType = {}));
7
+ })(AssetGroupingType = exports.AssetGroupingType || (exports.AssetGroupingType = {}));
@@ -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 = BatchOperationType = {}));
23
+ })(BatchOperationType = exports.BatchOperationType || (exports.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 = BatchState = {}));
11
+ })(BatchState = exports.BatchState || (exports.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 = PageItemTemplateType = {}));
8
+ })(PageItemTemplateType = exports.PageItemTemplateType || (exports.PageItemTemplateType = {}));
package/dist/index.js CHANGED
@@ -1,11 +1,7 @@
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
- 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);
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
9
5
  }) : (function(o, m, k, k2) {
10
6
  if (k2 === undefined) k2 = k;
11
7
  o[k2] = m[k];
@@ -7,8 +7,6 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
10
  extendStatics(d, b);
13
11
  function __() { this.constructor = d; }
14
12
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -7,8 +7,6 @@ var __extends = (this && this.__extends) || (function () {
7
7
  return extendStatics(d, b);
8
8
  };
9
9
  return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
10
  extendStatics(d, b);
13
11
  function __() { this.constructor = d; }
14
12
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agility/management-sdk",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "Agility CMS Tyescript SDK for Management API.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,4 +38,4 @@
38
38
  "devDependencies": {
39
39
  "@types/node": "^18.11.9"
40
40
  }
41
- }
41
+ }