@agility/management-sdk 0.1.15 → 0.1.17

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 (93) hide show
  1. package/README.md +680 -522
  2. package/dist/apiClient.d.ts +4 -0
  3. package/dist/apiClient.js +4 -0
  4. package/dist/apiMethods/apiClient.d.ts +19 -0
  5. package/dist/apiMethods/apiClient.js +24 -0
  6. package/dist/apiMethods/assetMethods.js +20 -20
  7. package/dist/apiMethods/batchMethods.js +3 -3
  8. package/dist/apiMethods/clientInstance.d.ts +2 -0
  9. package/dist/apiMethods/clientInstance.js +49 -11
  10. package/dist/apiMethods/containerMethods.js +13 -13
  11. package/dist/apiMethods/contentMethods.d.ts +8 -1
  12. package/dist/apiMethods/contentMethods.js +85 -26
  13. package/dist/apiMethods/instanceUserMethods.js +4 -4
  14. package/dist/apiMethods/modelMethods.js +8 -8
  15. package/dist/apiMethods/pageMethods.d.ts +4 -0
  16. package/dist/apiMethods/pageMethods.js +68 -24
  17. package/dist/apiMethods/serverUserMethods.d.ts +10 -0
  18. package/dist/apiMethods/serverUserMethods.js +89 -0
  19. package/dist/apiMethods/webhookMethods.d.ts +12 -0
  20. package/dist/apiMethods/webhookMethods.js +131 -0
  21. package/dist/index.js +5 -1
  22. package/dist/models/contentItemHistory.d.ts +20 -0
  23. package/dist/models/contentItemHistory.js +15 -0
  24. package/dist/models/contentListFilterModel.d.ts +26 -0
  25. package/dist/models/contentListFilterModel.js +33 -0
  26. package/dist/models/exception.js +2 -0
  27. package/dist/models/itemComments.d.ts +14 -0
  28. package/dist/models/itemComments.js +15 -0
  29. package/dist/models/listParams.d.ts +9 -0
  30. package/dist/models/listParams.js +16 -0
  31. package/dist/models/pageHistory.d.ts +21 -0
  32. package/dist/models/pageHistory.js +15 -0
  33. package/dist/models/serverUser.d.ts +21 -0
  34. package/dist/models/serverUser.js +9 -0
  35. package/dist/models/webhook.d.ts +9 -0
  36. package/dist/models/webhook.js +9 -0
  37. package/dist/models/websiteListing.d.ts +16 -0
  38. package/dist/models/websiteListing.js +9 -0
  39. package/dist/src/apiMethods/assetMethods.d.ts +14 -0
  40. package/dist/src/apiMethods/assetMethods.js +172 -0
  41. package/dist/src/apiMethods/batchMethods.d.ts +11 -0
  42. package/dist/src/apiMethods/batchMethods.js +117 -0
  43. package/dist/src/apiMethods/clientInstance.d.ts +8 -0
  44. package/dist/src/apiMethods/clientInstance.js +156 -0
  45. package/dist/src/apiMethods/containerMethods.d.ts +16 -0
  46. package/dist/src/apiMethods/containerMethods.js +189 -0
  47. package/dist/src/apiMethods/contentMethods.d.ts +20 -0
  48. package/dist/src/apiMethods/contentMethods.js +359 -0
  49. package/dist/src/apiMethods/instanceUserMethods.d.ts +13 -0
  50. package/dist/src/apiMethods/instanceUserMethods.js +111 -0
  51. package/dist/src/apiMethods/modelMethods.d.ts +13 -0
  52. package/dist/src/apiMethods/modelMethods.js +150 -0
  53. package/dist/src/apiMethods/pageMethods.d.ts +20 -0
  54. package/dist/src/apiMethods/pageMethods.js +323 -0
  55. package/dist/src/enums/batchOperationType.d.ts +19 -0
  56. package/dist/src/enums/batchOperationType.js +23 -0
  57. package/dist/src/enums/batchState..d.ts +7 -0
  58. package/dist/src/enums/batchState..js +11 -0
  59. package/dist/src/index.d.ts +14 -0
  60. package/dist/src/index.js +30 -0
  61. package/dist/src/models/batch.d.ts +29 -0
  62. package/dist/src/models/batch.js +9 -0
  63. package/dist/src/models/batchItem.d.ts +13 -0
  64. package/dist/src/models/batchItem.js +9 -0
  65. package/dist/src/models/container.d.ts +47 -0
  66. package/dist/src/models/container.js +9 -0
  67. package/dist/src/models/contentItem.d.ts +37 -0
  68. package/dist/src/models/contentItem.js +33 -0
  69. package/dist/src/models/contentViewColumn.d.ts +8 -0
  70. package/dist/src/models/contentViewColumn.js +9 -0
  71. package/dist/src/models/exception.d.ts +4 -0
  72. package/dist/src/models/exception.js +28 -0
  73. package/dist/src/models/instanceRole.d.ts +7 -0
  74. package/dist/src/models/instanceRole.js +9 -0
  75. package/dist/src/models/instanceUser.d.ts +14 -0
  76. package/dist/src/models/instanceUser.js +9 -0
  77. package/dist/src/models/media.d.ts +30 -0
  78. package/dist/src/models/media.js +15 -0
  79. package/dist/src/models/model.d.ts +30 -0
  80. package/dist/src/models/model.js +15 -0
  81. package/dist/src/models/notification.d.ts +13 -0
  82. package/dist/src/models/notification.js +9 -0
  83. package/dist/src/models/options.d.ts +7 -0
  84. package/dist/src/models/options.js +9 -0
  85. package/dist/src/models/pageItem.d.ts +56 -0
  86. package/dist/src/models/pageItem.js +39 -0
  87. package/dist/src/models/sitemap.d.ts +20 -0
  88. package/dist/src/models/sitemap.js +15 -0
  89. package/dist/src/models/websiteUser.d.ts +22 -0
  90. package/dist/src/models/websiteUser.js +15 -0
  91. package/license.txt +20 -20
  92. package/package.json +40 -39
  93. package/tsconfig.json +14 -14
@@ -6,6 +6,8 @@ import { InstanceUserMethods } from "./apiMethods/instanceUserMethods";
6
6
  import { ModelMethods } from "./apiMethods/modelMethods";
7
7
  import { PageMethods } from "./apiMethods/pageMethods";
8
8
  import { Options } from "./models/options";
9
+ import { ServerUserMethods } from "./apiMethods/serverUserMethods";
10
+ import { WebhookMethods } from "./apiMethods/webhookMethods";
9
11
  export declare class ApiClient {
10
12
  _options: Options;
11
13
  contentMethods: ContentMethods;
@@ -15,5 +17,7 @@ export declare class ApiClient {
15
17
  instanceUserMethods: InstanceUserMethods;
16
18
  modelMethods: ModelMethods;
17
19
  pageMethods: PageMethods;
20
+ serverUserMethods: ServerUserMethods;
21
+ webhookMethods: WebhookMethods;
18
22
  constructor(options: Options);
19
23
  }
package/dist/apiClient.js CHANGED
@@ -8,6 +8,8 @@ var containerMethods_1 = require("./apiMethods/containerMethods");
8
8
  var instanceUserMethods_1 = require("./apiMethods/instanceUserMethods");
9
9
  var modelMethods_1 = require("./apiMethods/modelMethods");
10
10
  var pageMethods_1 = require("./apiMethods/pageMethods");
11
+ var serverUserMethods_1 = require("./apiMethods/serverUserMethods");
12
+ var webhookMethods_1 = require("./apiMethods/webhookMethods");
11
13
  var ApiClient = /** @class */ (function () {
12
14
  function ApiClient(options) {
13
15
  this._options = options;
@@ -18,6 +20,8 @@ var ApiClient = /** @class */ (function () {
18
20
  this.instanceUserMethods = new instanceUserMethods_1.InstanceUserMethods(this._options);
19
21
  this.modelMethods = new modelMethods_1.ModelMethods(this._options);
20
22
  this.pageMethods = new pageMethods_1.PageMethods(this._options);
23
+ this.serverUserMethods = new serverUserMethods_1.ServerUserMethods(this._options);
24
+ this.webhookMethods = new webhookMethods_1.WebhookMethods(this._options);
21
25
  }
22
26
  return ApiClient;
23
27
  }());
@@ -0,0 +1,19 @@
1
+ import { ContentMethods } from "./contentMethods";
2
+ import { AssetMethods } from "./assetMethods";
3
+ import { BatchMethods } from "./batchMethods";
4
+ import { ContainerMethods } from "./containerMethods";
5
+ import { InstanceUserMethods } from "./instanceUserMethods";
6
+ import { ModelMethods } from "./modelMethods";
7
+ import { PageMethods } from "./pageMethods";
8
+ import { Options } from "../models/options";
9
+ export declare class ApiClient {
10
+ _options: Options;
11
+ contentMethods: ContentMethods;
12
+ assetMethods: AssetMethods;
13
+ batchMethods: BatchMethods;
14
+ containerMethods: ContainerMethods;
15
+ instanceUserMethods: InstanceUserMethods;
16
+ modelMethods: ModelMethods;
17
+ pageMethods: PageMethods;
18
+ constructor(options: Options);
19
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApiClient = void 0;
4
+ var contentMethods_1 = require("./contentMethods");
5
+ var assetMethods_1 = require("./assetMethods");
6
+ var batchMethods_1 = require("./batchMethods");
7
+ var containerMethods_1 = require("./containerMethods");
8
+ var instanceUserMethods_1 = require("./instanceUserMethods");
9
+ var modelMethods_1 = require("./modelMethods");
10
+ var pageMethods_1 = require("./pageMethods");
11
+ var ApiClient = /** @class */ (function () {
12
+ function ApiClient(options) {
13
+ this._options = options;
14
+ this.contentMethods = new contentMethods_1.ContentMethods(this._options);
15
+ this.assetMethods = new assetMethods_1.AssetMethods(this._options);
16
+ this.batchMethods = new batchMethods_1.BatchMethods(this._options);
17
+ this.containerMethods = new containerMethods_1.ContainerMethods(this._options);
18
+ this.instanceUserMethods = new instanceUserMethods_1.InstanceUserMethods(this._options);
19
+ this.modelMethods = new modelMethods_1.ModelMethods(this._options);
20
+ this.pageMethods = new pageMethods_1.PageMethods(this._options);
21
+ }
22
+ return ApiClient;
23
+ }());
24
+ exports.ApiClient = ApiClient;
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
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,7 +51,7 @@ var AssetMethods = /** @class */ (function () {
51
51
  switch (_a.label) {
52
52
  case 0:
53
53
  _a.trys.push([0, 2, , 3]);
54
- apiPath = "asset/delete/" + mediaID;
54
+ apiPath = "asset/delete/".concat(mediaID);
55
55
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
56
56
  case 1:
57
57
  resp = _a.sent();
@@ -59,7 +59,7 @@ var AssetMethods = /** @class */ (function () {
59
59
  return [2 /*return*/, resp.data];
60
60
  case 2:
61
61
  err_1 = _a.sent();
62
- throw new exception_1.Exception("Unable to delete the media for mediaID: " + mediaID, err_1);
62
+ throw new exception_1.Exception("Unable to delete the media for mediaID: ".concat(mediaID), err_1);
63
63
  case 3: return [2 /*return*/];
64
64
  }
65
65
  });
@@ -73,14 +73,14 @@ var AssetMethods = /** @class */ (function () {
73
73
  case 0:
74
74
  _a.trys.push([0, 2, , 3]);
75
75
  folder = encodeURIComponent(newFolder);
76
- apiPath = "asset/move/" + mediaID + "?newFolder=" + folder;
76
+ apiPath = "asset/move/".concat(mediaID, "?newFolder=").concat(folder);
77
77
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, null)];
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 move the media for mediaID: " + mediaID, err_2);
83
+ throw new exception_1.Exception("Unable to move the media for mediaID: ".concat(mediaID), err_2);
84
84
  case 3: return [2 /*return*/];
85
85
  }
86
86
  });
@@ -93,7 +93,7 @@ var AssetMethods = /** @class */ (function () {
93
93
  switch (_a.label) {
94
94
  case 0:
95
95
  _a.trys.push([0, 2, , 3]);
96
- apiPath = "asset/list?pageSize=" + pageSize + "&recordOffset=" + recordOffset;
96
+ apiPath = "asset/list?pageSize=".concat(pageSize, "&recordOffset=").concat(recordOffset);
97
97
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
98
98
  case 1:
99
99
  resp = _a.sent();
@@ -116,7 +116,7 @@ var AssetMethods = /** @class */ (function () {
116
116
  switch (_a.label) {
117
117
  case 0:
118
118
  _a.trys.push([0, 2, , 3]);
119
- apiPath = "asset/galleries?search=" + search + "&pageSize=" + pageSize + "&rowIndex=" + rowIndex;
119
+ apiPath = "asset/galleries?search=".concat(search, "&pageSize=").concat(pageSize, "&rowIndex=").concat(rowIndex);
120
120
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
121
121
  case 1:
122
122
  resp = _a.sent();
@@ -136,14 +136,14 @@ var AssetMethods = /** @class */ (function () {
136
136
  switch (_a.label) {
137
137
  case 0:
138
138
  _a.trys.push([0, 2, , 3]);
139
- apiPath = "/asset/gallery/" + id;
139
+ apiPath = "/asset/gallery/".concat(id);
140
140
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
141
141
  case 1:
142
142
  resp = _a.sent();
143
143
  return [2 /*return*/, resp.data];
144
144
  case 2:
145
145
  err_5 = _a.sent();
146
- throw new exception_1.Exception("Unable to retrieve gallery for id " + id, err_5);
146
+ throw new exception_1.Exception("Unable to retrieve gallery for id ".concat(id), err_5);
147
147
  case 3: return [2 /*return*/];
148
148
  }
149
149
  });
@@ -156,14 +156,14 @@ var AssetMethods = /** @class */ (function () {
156
156
  switch (_a.label) {
157
157
  case 0:
158
158
  _a.trys.push([0, 2, , 3]);
159
- apiPath = "/asset/gallery?galleryName=" + galleryName;
159
+ apiPath = "/asset/gallery?galleryName=".concat(galleryName);
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 retrieve gallery for name " + galleryName, err_6);
166
+ throw new exception_1.Exception("Unable to retrieve gallery for name ".concat(galleryName), err_6);
167
167
  case 3: return [2 /*return*/];
168
168
  }
169
169
  });
@@ -183,7 +183,7 @@ var AssetMethods = /** @class */ (function () {
183
183
  return [2 /*return*/, resp.data];
184
184
  case 2:
185
185
  err_7 = _a.sent();
186
- throw new exception_1.Exception("Unable to retrieve container for guid " + guid, err_7);
186
+ throw new exception_1.Exception("Unable to retrieve container for guid ".concat(guid), err_7);
187
187
  case 3: return [2 /*return*/];
188
188
  }
189
189
  });
@@ -216,14 +216,14 @@ var AssetMethods = /** @class */ (function () {
216
216
  switch (_a.label) {
217
217
  case 0:
218
218
  _a.trys.push([0, 2, , 3]);
219
- apiPath = "/asset/gallery/" + id;
219
+ apiPath = "/asset/gallery/".concat(id);
220
220
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
221
221
  case 1:
222
222
  resp = _a.sent();
223
223
  return [2 /*return*/, resp.data];
224
224
  case 2:
225
225
  err_9 = _a.sent();
226
- throw new exception_1.Exception("Unable to delete gallery for id " + id, err_9);
226
+ throw new exception_1.Exception("Unable to delete gallery for id ".concat(id), err_9);
227
227
  case 3: return [2 /*return*/];
228
228
  }
229
229
  });
@@ -236,14 +236,14 @@ var AssetMethods = /** @class */ (function () {
236
236
  switch (_a.label) {
237
237
  case 0:
238
238
  _a.trys.push([0, 2, , 3]);
239
- apiPath = "asset/" + mediaID;
239
+ apiPath = "asset/".concat(mediaID);
240
240
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
241
241
  case 1:
242
242
  resp = _a.sent();
243
243
  return [2 /*return*/, resp.data];
244
244
  case 2:
245
245
  err_10 = _a.sent();
246
- throw new exception_1.Exception("Unable to retrieve asset for mediaID " + mediaID, err_10);
246
+ throw new exception_1.Exception("Unable to retrieve asset for mediaID ".concat(mediaID), err_10);
247
247
  case 3: return [2 /*return*/];
248
248
  }
249
249
  });
@@ -256,14 +256,14 @@ var AssetMethods = /** @class */ (function () {
256
256
  switch (_a.label) {
257
257
  case 0:
258
258
  _a.trys.push([0, 2, , 3]);
259
- apiPath = "asset?url=" + url;
259
+ apiPath = "asset?url=".concat(url);
260
260
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
261
261
  case 1:
262
262
  resp = _a.sent();
263
263
  return [2 /*return*/, resp.data];
264
264
  case 2:
265
265
  err_11 = _a.sent();
266
- throw new exception_1.Exception("Unable to retrieve asset for url " + url, err_11);
266
+ throw new exception_1.Exception("Unable to retrieve asset for url ".concat(url), err_11);
267
267
  case 3: return [2 /*return*/];
268
268
  }
269
269
  });
@@ -287,7 +287,7 @@ var AssetMethods = /** @class */ (function () {
287
287
  switch (_a.label) {
288
288
  case 0:
289
289
  _a.trys.push([0, 2, , 3]);
290
- apiPath = "asset/upload?folderPath=" + agilityFolderPath + "&groupingID=" + groupingID;
290
+ apiPath = "asset/upload?folderPath=".concat(agilityFolderPath, "&groupingID=").concat(groupingID);
291
291
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, formData)];
292
292
  case 1:
293
293
  resp = _a.sent();
@@ -307,7 +307,7 @@ var AssetMethods = /** @class */ (function () {
307
307
  switch (_a.label) {
308
308
  case 0:
309
309
  _a.trys.push([0, 2, , 3]);
310
- apiPath = "asset/folder?originKey=" + originKey;
310
+ apiPath = "asset/folder?originKey=".concat(originKey);
311
311
  return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, null)];
312
312
  case 1:
313
313
  resp = _a.sent();
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
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]) {
@@ -52,14 +52,14 @@ var BatchMethods = /** @class */ (function () {
52
52
  switch (_a.label) {
53
53
  case 0:
54
54
  _a.trys.push([0, 2, , 3]);
55
- apiPath = "batch/" + batchID;
55
+ apiPath = "batch/".concat(batchID);
56
56
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
57
57
  case 1:
58
58
  resp = _a.sent();
59
59
  return [2 /*return*/, resp.data];
60
60
  case 2:
61
61
  err_1 = _a.sent();
62
- throw new exception_1.Exception("Unable to retreive the batch for id: " + batchID, err_1);
62
+ throw new exception_1.Exception("Unable to retreive the batch for id: ".concat(batchID), err_1);
63
63
  case 3: return [2 /*return*/];
64
64
  }
65
65
  });
@@ -12,6 +12,8 @@ export declare class ClientInstance {
12
12
  */
13
13
  determineBaseUrl(guid: string): string;
14
14
  getInstance(guid: string): AxiosInstance;
15
+ getAxiosInstance(guid: string): AxiosInstance;
16
+ executeServerGet(apiPath: string, guid: string, token: string): Promise<import("axios").AxiosResponse<any, any>>;
15
17
  executeGet(apiPath: string, guid: string, token: string): Promise<import("axios").AxiosResponse<any, any>>;
16
18
  executeDelete(apiPath: string, guid: string, token: string): Promise<import("axios").AxiosResponse<any, any>>;
17
19
  executePost(apiPath: string, guid: string, token: string, data: any): Promise<import("axios").AxiosResponse<any, any>>;
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
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]) {
@@ -78,23 +78,34 @@ var ClientInstance = /** @class */ (function () {
78
78
  ClientInstance.prototype.getInstance = function (guid) {
79
79
  var baseUrl = this.determineBaseUrl(guid);
80
80
  var instance = axios_1.default.create({
81
- baseURL: baseUrl + "/api/v1/instance/" + guid
81
+ baseURL: "".concat(baseUrl, "/api/v1/instance/").concat(guid),
82
+ maxContentLength: Infinity,
83
+ maxBodyLength: Infinity
82
84
  });
83
85
  return instance;
84
86
  };
85
- ClientInstance.prototype.executeGet = function (apiPath, guid, token) {
87
+ ClientInstance.prototype.getAxiosInstance = function (guid) {
88
+ var baseUrl = this.determineBaseUrl(guid);
89
+ var instance = axios_1.default.create({
90
+ baseURL: "".concat(baseUrl, "/api/v1"),
91
+ maxContentLength: Infinity,
92
+ maxBodyLength: Infinity
93
+ });
94
+ return instance;
95
+ };
96
+ ClientInstance.prototype.executeServerGet = function (apiPath, guid, token) {
86
97
  return __awaiter(this, void 0, void 0, function () {
87
98
  var instance, resp, err_1;
88
99
  return __generator(this, function (_a) {
89
100
  switch (_a.label) {
90
101
  case 0:
91
- instance = this.getInstance(guid);
102
+ instance = this.getAxiosInstance(guid);
92
103
  _a.label = 1;
93
104
  case 1:
94
105
  _a.trys.push([1, 3, , 4]);
95
106
  return [4 /*yield*/, instance.get(apiPath, {
96
107
  headers: {
97
- 'Authorization': "Bearer " + token,
108
+ 'Authorization': "Bearer ".concat(token),
98
109
  'Cache-Control': 'no-cache'
99
110
  }
100
111
  })];
@@ -109,7 +120,7 @@ var ClientInstance = /** @class */ (function () {
109
120
  });
110
121
  });
111
122
  };
112
- ClientInstance.prototype.executeDelete = function (apiPath, guid, token) {
123
+ ClientInstance.prototype.executeGet = function (apiPath, guid, token) {
113
124
  return __awaiter(this, void 0, void 0, function () {
114
125
  var instance, resp, err_2;
115
126
  return __generator(this, function (_a) {
@@ -119,9 +130,9 @@ var ClientInstance = /** @class */ (function () {
119
130
  _a.label = 1;
120
131
  case 1:
121
132
  _a.trys.push([1, 3, , 4]);
122
- return [4 /*yield*/, instance.delete(apiPath, {
133
+ return [4 /*yield*/, instance.get(apiPath, {
123
134
  headers: {
124
- 'Authorization': "Bearer " + token,
135
+ 'Authorization': "Bearer ".concat(token),
125
136
  'Cache-Control': 'no-cache'
126
137
  }
127
138
  })];
@@ -136,7 +147,7 @@ var ClientInstance = /** @class */ (function () {
136
147
  });
137
148
  });
138
149
  };
139
- ClientInstance.prototype.executePost = function (apiPath, guid, token, data) {
150
+ ClientInstance.prototype.executeDelete = function (apiPath, guid, token) {
140
151
  return __awaiter(this, void 0, void 0, function () {
141
152
  var instance, resp, err_3;
142
153
  return __generator(this, function (_a) {
@@ -146,9 +157,9 @@ var ClientInstance = /** @class */ (function () {
146
157
  _a.label = 1;
147
158
  case 1:
148
159
  _a.trys.push([1, 3, , 4]);
149
- return [4 /*yield*/, instance.post(apiPath, data, {
160
+ return [4 /*yield*/, instance.delete(apiPath, {
150
161
  headers: {
151
- 'Authorization': "Bearer " + token,
162
+ 'Authorization': "Bearer ".concat(token),
152
163
  'Cache-Control': 'no-cache'
153
164
  }
154
165
  })];
@@ -163,6 +174,33 @@ var ClientInstance = /** @class */ (function () {
163
174
  });
164
175
  });
165
176
  };
177
+ ClientInstance.prototype.executePost = function (apiPath, guid, token, data) {
178
+ return __awaiter(this, void 0, void 0, function () {
179
+ var instance, resp, err_4;
180
+ return __generator(this, function (_a) {
181
+ switch (_a.label) {
182
+ case 0:
183
+ instance = this.getInstance(guid);
184
+ _a.label = 1;
185
+ case 1:
186
+ _a.trys.push([1, 3, , 4]);
187
+ return [4 /*yield*/, instance.post(apiPath, data, {
188
+ headers: {
189
+ 'Authorization': "Bearer ".concat(token),
190
+ 'Cache-Control': 'no-cache'
191
+ }
192
+ })];
193
+ case 2:
194
+ resp = _a.sent();
195
+ return [2 /*return*/, resp];
196
+ case 3:
197
+ err_4 = _a.sent();
198
+ throw err_4;
199
+ case 4: return [2 /*return*/];
200
+ }
201
+ });
202
+ });
203
+ };
166
204
  return ClientInstance;
167
205
  }());
168
206
  exports.ClientInstance = ClientInstance;
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -51,14 +51,14 @@ var ContainerMethods = /** @class */ (function () {
51
51
  switch (_a.label) {
52
52
  case 0:
53
53
  _a.trys.push([0, 2, , 3]);
54
- apiPath = "container/" + id;
54
+ apiPath = "container/".concat(id);
55
55
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
56
56
  case 1:
57
57
  resp = _a.sent();
58
58
  return [2 /*return*/, resp.data];
59
59
  case 2:
60
60
  err_1 = _a.sent();
61
- throw new exception_1.Exception("Unable to retreive the contianer for id: " + id, err_1);
61
+ throw new exception_1.Exception("Unable to retreive the contianer for id: ".concat(id), err_1);
62
62
  case 3: return [2 /*return*/];
63
63
  }
64
64
  });
@@ -71,14 +71,14 @@ var ContainerMethods = /** @class */ (function () {
71
71
  switch (_a.label) {
72
72
  case 0:
73
73
  _a.trys.push([0, 2, , 3]);
74
- apiPath = "container/model/" + modelId;
74
+ apiPath = "container/model/".concat(modelId);
75
75
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
76
76
  case 1:
77
77
  resp = _a.sent();
78
78
  return [2 /*return*/, resp.data];
79
79
  case 2:
80
80
  err_2 = _a.sent();
81
- throw new exception_1.Exception("Unable to retreive the containers for id: " + modelId, err_2);
81
+ throw new exception_1.Exception("Unable to retreive the containers for id: ".concat(modelId), err_2);
82
82
  case 3: return [2 /*return*/];
83
83
  }
84
84
  });
@@ -91,14 +91,14 @@ var ContainerMethods = /** @class */ (function () {
91
91
  switch (_a.label) {
92
92
  case 0:
93
93
  _a.trys.push([0, 2, , 3]);
94
- apiPath = "container/" + referenceName;
94
+ apiPath = "container/".concat(referenceName);
95
95
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
96
96
  case 1:
97
97
  resp = _a.sent();
98
98
  return [2 /*return*/, resp.data];
99
99
  case 2:
100
100
  err_3 = _a.sent();
101
- throw new exception_1.Exception("Unable to retreive the contianer for referenceName: " + referenceName, err_3);
101
+ throw new exception_1.Exception("Unable to retreive the contianer for referenceName: ".concat(referenceName), err_3);
102
102
  case 3: return [2 /*return*/];
103
103
  }
104
104
  });
@@ -111,14 +111,14 @@ var ContainerMethods = /** @class */ (function () {
111
111
  switch (_a.label) {
112
112
  case 0:
113
113
  _a.trys.push([0, 2, , 3]);
114
- apiPath = "container/" + id + "/security";
114
+ apiPath = "container/".concat(id, "/security");
115
115
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
116
116
  case 1:
117
117
  resp = _a.sent();
118
118
  return [2 /*return*/, resp.data];
119
119
  case 2:
120
120
  err_4 = _a.sent();
121
- throw new exception_1.Exception("Unable to retreive the contianer for id: " + id, err_4);
121
+ throw new exception_1.Exception("Unable to retreive the contianer for id: ".concat(id), err_4);
122
122
  case 3: return [2 /*return*/];
123
123
  }
124
124
  });
@@ -151,14 +151,14 @@ var ContainerMethods = /** @class */ (function () {
151
151
  switch (_a.label) {
152
152
  case 0:
153
153
  _a.trys.push([0, 2, , 3]);
154
- apiPath = "container/" + id + "/notifications";
154
+ apiPath = "container/".concat(id, "/notifications");
155
155
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
156
156
  case 1:
157
157
  resp = _a.sent();
158
158
  return [2 /*return*/, resp.data];
159
159
  case 2:
160
160
  err_6 = _a.sent();
161
- throw new exception_1.Exception("Unable to retreive the notifications for contianer id: " + id, err_6);
161
+ throw new exception_1.Exception("Unable to retreive the notifications for contianer id: ".concat(id), err_6);
162
162
  case 3: return [2 /*return*/];
163
163
  }
164
164
  });
@@ -191,14 +191,14 @@ var ContainerMethods = /** @class */ (function () {
191
191
  switch (_a.label) {
192
192
  case 0:
193
193
  _a.trys.push([0, 2, , 3]);
194
- apiPath = "container/" + id;
194
+ apiPath = "container/".concat(id);
195
195
  return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
196
196
  case 1:
197
197
  resp = _a.sent();
198
198
  return [2 /*return*/, resp.data];
199
199
  case 2:
200
200
  err_8 = _a.sent();
201
- throw new exception_1.Exception("Unable to delete the contianer for id: " + id, err_8);
201
+ throw new exception_1.Exception("Unable to delete the contianer for id: ".concat(id), err_8);
202
202
  case 3: return [2 /*return*/];
203
203
  }
204
204
  });
@@ -2,6 +2,10 @@ import { Options } from "../models/options";
2
2
  import { ClientInstance } from "./clientInstance";
3
3
  import { ContentItem, ContentList } from "../models/contentItem";
4
4
  import { BatchMethods } from "./batchMethods";
5
+ import { ContentListFilterModel } from "../models/contentListFilterModel";
6
+ import { ContentItemHistory } from "../models/contentItemHistory";
7
+ import { ItemComments } from "../models/itemComments";
8
+ import { ListParams } from "../models/listParams";
5
9
  export declare class ContentMethods {
6
10
  _options: Options;
7
11
  _clientInstance: ClientInstance;
@@ -16,5 +20,8 @@ export declare class ContentMethods {
16
20
  deleteContent(contentID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
17
21
  saveContentItem(contentItem: ContentItem, guid: string, locale: string): Promise<number[]>;
18
22
  saveContentItems(contentItems: ContentItem[], guid: string, locale: string): Promise<number[]>;
19
- getContentItems(referenceName: string, guid: string, locale: string, filter?: string, fields?: string, sortDirection?: string, sortField?: string, take?: number, skip?: number): Promise<ContentList>;
23
+ getContentItems(referenceName: string, guid: string, locale: string, listParams: ListParams): Promise<ContentList>;
24
+ getContentList(referenceName: string, guid: string, locale: string, listParams: ListParams, filterObject?: ContentListFilterModel): Promise<ContentList>;
25
+ getContentHistory(locale: string, guid: string, contentID: number, take?: number, skip?: number): Promise<ContentItemHistory>;
26
+ getContentComments(locale: string, guid: string, contentID: number, take?: number, skip?: number): Promise<ItemComments>;
20
27
  }