@agility/management-sdk 0.1.18 → 0.1.19
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.
- package/README.md +695 -695
- package/dist/apiMethods/assetMethods.js +16 -16
- package/dist/apiMethods/batchMethods.js +2 -2
- package/dist/apiMethods/clientInstance.js +2 -2
- package/dist/apiMethods/containerMethods.js +2 -2
- package/dist/apiMethods/contentMethods.js +31 -31
- package/dist/apiMethods/instanceMethods.d.ts +9 -0
- package/dist/{src/apiMethods/instanceUserMethods.js → apiMethods/instanceMethods.js} +69 -111
- package/dist/apiMethods/instanceUserMethods.js +6 -6
- package/dist/apiMethods/modelMethods.js +5 -5
- package/dist/apiMethods/pageMethods.js +35 -35
- package/dist/apiMethods/serverUserMethods.js +2 -2
- package/dist/apiMethods/webhookMethods.js +6 -6
- package/dist/enums/assetGroupingType.js +1 -1
- package/dist/enums/batchOperationType.js +1 -1
- package/dist/enums/batchState..js +1 -1
- package/dist/enums/pageItemTemplateType.js +1 -1
- package/dist/models/locales.d.ts +3 -0
- package/dist/{src/models/exception.js → models/locales.js} +30 -28
- package/license.txt +20 -20
- package/package.json +41 -40
- package/tsconfig.json +14 -14
- package/dist/apiMethods/apiClient.d.ts +0 -19
- package/dist/apiMethods/apiClient.js +0 -24
- package/dist/src/apiMethods/assetMethods.d.ts +0 -14
- package/dist/src/apiMethods/assetMethods.js +0 -172
- package/dist/src/apiMethods/batchMethods.d.ts +0 -11
- package/dist/src/apiMethods/batchMethods.js +0 -117
- package/dist/src/apiMethods/clientInstance.d.ts +0 -8
- package/dist/src/apiMethods/clientInstance.js +0 -156
- package/dist/src/apiMethods/containerMethods.d.ts +0 -16
- package/dist/src/apiMethods/containerMethods.js +0 -189
- package/dist/src/apiMethods/contentMethods.d.ts +0 -20
- package/dist/src/apiMethods/contentMethods.js +0 -359
- package/dist/src/apiMethods/instanceUserMethods.d.ts +0 -13
- package/dist/src/apiMethods/modelMethods.d.ts +0 -13
- package/dist/src/apiMethods/modelMethods.js +0 -150
- package/dist/src/apiMethods/pageMethods.d.ts +0 -20
- package/dist/src/apiMethods/pageMethods.js +0 -323
- package/dist/src/enums/batchOperationType.d.ts +0 -19
- package/dist/src/enums/batchOperationType.js +0 -23
- package/dist/src/enums/batchState..d.ts +0 -7
- package/dist/src/enums/batchState..js +0 -11
- package/dist/src/index.d.ts +0 -14
- package/dist/src/index.js +0 -30
- package/dist/src/models/batch.d.ts +0 -29
- package/dist/src/models/batch.js +0 -9
- package/dist/src/models/batchItem.d.ts +0 -13
- package/dist/src/models/batchItem.js +0 -9
- package/dist/src/models/container.d.ts +0 -47
- package/dist/src/models/container.js +0 -9
- package/dist/src/models/contentItem.d.ts +0 -37
- package/dist/src/models/contentItem.js +0 -33
- package/dist/src/models/contentViewColumn.d.ts +0 -8
- package/dist/src/models/contentViewColumn.js +0 -9
- package/dist/src/models/exception.d.ts +0 -4
- package/dist/src/models/instanceRole.d.ts +0 -7
- package/dist/src/models/instanceRole.js +0 -9
- package/dist/src/models/instanceUser.d.ts +0 -14
- package/dist/src/models/instanceUser.js +0 -9
- package/dist/src/models/media.d.ts +0 -30
- package/dist/src/models/media.js +0 -15
- package/dist/src/models/model.d.ts +0 -30
- package/dist/src/models/model.js +0 -15
- package/dist/src/models/notification.d.ts +0 -13
- package/dist/src/models/notification.js +0 -9
- package/dist/src/models/options.d.ts +0 -7
- package/dist/src/models/options.js +0 -9
- package/dist/src/models/pageItem.d.ts +0 -56
- package/dist/src/models/pageItem.js +0 -39
- package/dist/src/models/sitemap.d.ts +0 -20
- package/dist/src/models/sitemap.js +0 -15
- package/dist/src/models/websiteUser.d.ts +0 -22
- package/dist/src/models/websiteUser.js +0 -15
|
@@ -9,8 +9,8 @@ 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 =
|
|
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.");
|
|
@@ -106,12 +106,12 @@ var AssetMethods = /** @class */ (function () {
|
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
};
|
|
109
|
-
AssetMethods.prototype.getGalleries = function (
|
|
110
|
-
|
|
111
|
-
if (pageSize === void 0) { pageSize = null; }
|
|
112
|
-
if (rowIndex === void 0) { rowIndex = null; }
|
|
113
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
109
|
+
AssetMethods.prototype.getGalleries = function (guid_1) {
|
|
110
|
+
return __awaiter(this, arguments, void 0, function (guid, search, pageSize, rowIndex) {
|
|
114
111
|
var apiPath, resp, err_4;
|
|
112
|
+
if (search === void 0) { search = null; }
|
|
113
|
+
if (pageSize === void 0) { pageSize = null; }
|
|
114
|
+
if (rowIndex === void 0) { rowIndex = null; }
|
|
115
115
|
return __generator(this, function (_a) {
|
|
116
116
|
switch (_a.label) {
|
|
117
117
|
case 0:
|
|
@@ -279,10 +279,10 @@ var AssetMethods = /** @class */ (function () {
|
|
|
279
279
|
* @returns
|
|
280
280
|
* @memberof AssetMethods
|
|
281
281
|
*/
|
|
282
|
-
AssetMethods.prototype.upload = function (
|
|
283
|
-
|
|
284
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
282
|
+
AssetMethods.prototype.upload = function (formData_1, agilityFolderPath_1, guid_1) {
|
|
283
|
+
return __awaiter(this, arguments, void 0, function (formData, agilityFolderPath, guid, groupingID) {
|
|
285
284
|
var apiPath, resp, err_12;
|
|
285
|
+
if (groupingID === void 0) { groupingID = -1; }
|
|
286
286
|
return __generator(this, function (_a) {
|
|
287
287
|
switch (_a.label) {
|
|
288
288
|
case 0:
|
|
@@ -320,10 +320,10 @@ var AssetMethods = /** @class */ (function () {
|
|
|
320
320
|
});
|
|
321
321
|
});
|
|
322
322
|
};
|
|
323
|
-
AssetMethods.prototype.deleteFolder = function (
|
|
324
|
-
|
|
325
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
323
|
+
AssetMethods.prototype.deleteFolder = function (originKey_1, guid_1) {
|
|
324
|
+
return __awaiter(this, arguments, void 0, function (originKey, guid, mediaID) {
|
|
326
325
|
var apiPath, err_14;
|
|
326
|
+
if (mediaID === void 0) { mediaID = 0; }
|
|
327
327
|
return __generator(this, function (_a) {
|
|
328
328
|
switch (_a.label) {
|
|
329
329
|
case 0:
|
|
@@ -341,10 +341,10 @@ var AssetMethods = /** @class */ (function () {
|
|
|
341
341
|
});
|
|
342
342
|
});
|
|
343
343
|
};
|
|
344
|
-
AssetMethods.prototype.renameFolder = function (
|
|
345
|
-
|
|
346
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
344
|
+
AssetMethods.prototype.renameFolder = function (folderName_1, newFolderName_1, guid_1) {
|
|
345
|
+
return __awaiter(this, arguments, void 0, function (folderName, newFolderName, guid, mediaID) {
|
|
347
346
|
var apiPath, err_15;
|
|
347
|
+
if (mediaID === void 0) { mediaID = 0; }
|
|
348
348
|
return __generator(this, function (_a) {
|
|
349
349
|
switch (_a.label) {
|
|
350
350
|
case 0:
|
|
@@ -9,8 +9,8 @@ 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 =
|
|
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.");
|
|
@@ -9,8 +9,8 @@ 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 =
|
|
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.");
|
|
@@ -9,8 +9,8 @@ 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 =
|
|
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.");
|
|
@@ -9,8 +9,8 @@ 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 =
|
|
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.");
|
|
@@ -66,11 +66,11 @@ var ContentMethods = /** @class */ (function () {
|
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
-
ContentMethods.prototype.publishContent = function (
|
|
70
|
-
|
|
71
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
69
|
+
ContentMethods.prototype.publishContent = function (contentID_1, guid_1, locale_1) {
|
|
70
|
+
return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
|
|
72
71
|
var apiPath, resp, batchID_1, batch, contentIDs_1, err_2;
|
|
73
72
|
var _this = this;
|
|
73
|
+
if (comments === void 0) { comments = null; }
|
|
74
74
|
return __generator(this, function (_a) {
|
|
75
75
|
switch (_a.label) {
|
|
76
76
|
case 0:
|
|
@@ -99,11 +99,11 @@ var ContentMethods = /** @class */ (function () {
|
|
|
99
99
|
});
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
|
-
ContentMethods.prototype.unPublishContent = function (
|
|
103
|
-
|
|
104
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
102
|
+
ContentMethods.prototype.unPublishContent = function (contentID_1, guid_1, locale_1) {
|
|
103
|
+
return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
|
|
105
104
|
var apiPath, resp, batchID_2, batch, contentIDs_2, err_3;
|
|
106
105
|
var _this = this;
|
|
106
|
+
if (comments === void 0) { comments = null; }
|
|
107
107
|
return __generator(this, function (_a) {
|
|
108
108
|
switch (_a.label) {
|
|
109
109
|
case 0:
|
|
@@ -132,11 +132,11 @@ var ContentMethods = /** @class */ (function () {
|
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
134
|
};
|
|
135
|
-
ContentMethods.prototype.contentRequestApproval = function (
|
|
136
|
-
|
|
137
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
135
|
+
ContentMethods.prototype.contentRequestApproval = function (contentID_1, guid_1, locale_1) {
|
|
136
|
+
return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
|
|
138
137
|
var apiPath, resp, batchID_3, batch, contentIDs_3, err_4;
|
|
139
138
|
var _this = this;
|
|
139
|
+
if (comments === void 0) { comments = null; }
|
|
140
140
|
return __generator(this, function (_a) {
|
|
141
141
|
switch (_a.label) {
|
|
142
142
|
case 0:
|
|
@@ -165,11 +165,11 @@ var ContentMethods = /** @class */ (function () {
|
|
|
165
165
|
});
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
|
-
ContentMethods.prototype.approveContent = function (
|
|
169
|
-
|
|
170
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
168
|
+
ContentMethods.prototype.approveContent = function (contentID_1, guid_1, locale_1) {
|
|
169
|
+
return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
|
|
171
170
|
var apiPath, resp, batchID_4, batch, contentIDs_4, err_5;
|
|
172
171
|
var _this = this;
|
|
172
|
+
if (comments === void 0) { comments = null; }
|
|
173
173
|
return __generator(this, function (_a) {
|
|
174
174
|
switch (_a.label) {
|
|
175
175
|
case 0:
|
|
@@ -198,11 +198,11 @@ var ContentMethods = /** @class */ (function () {
|
|
|
198
198
|
});
|
|
199
199
|
});
|
|
200
200
|
};
|
|
201
|
-
ContentMethods.prototype.declineContent = function (
|
|
202
|
-
|
|
203
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
201
|
+
ContentMethods.prototype.declineContent = function (contentID_1, guid_1, locale_1) {
|
|
202
|
+
return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
|
|
204
203
|
var apiPath, resp, batchID_5, batch, contentIDs_5, err_6;
|
|
205
204
|
var _this = this;
|
|
205
|
+
if (comments === void 0) { comments = null; }
|
|
206
206
|
return __generator(this, function (_a) {
|
|
207
207
|
switch (_a.label) {
|
|
208
208
|
case 0:
|
|
@@ -231,11 +231,11 @@ var ContentMethods = /** @class */ (function () {
|
|
|
231
231
|
});
|
|
232
232
|
});
|
|
233
233
|
};
|
|
234
|
-
ContentMethods.prototype.deleteContent = function (
|
|
235
|
-
|
|
236
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
234
|
+
ContentMethods.prototype.deleteContent = function (contentID_1, guid_1, locale_1) {
|
|
235
|
+
return __awaiter(this, arguments, void 0, function (contentID, guid, locale, comments) {
|
|
237
236
|
var apiPath, resp, batchID_6, batch, contentIDs_6, err_7;
|
|
238
237
|
var _this = this;
|
|
238
|
+
if (comments === void 0) { comments = null; }
|
|
239
239
|
return __generator(this, function (_a) {
|
|
240
240
|
switch (_a.label) {
|
|
241
241
|
case 0:
|
|
@@ -348,10 +348,10 @@ var ContentMethods = /** @class */ (function () {
|
|
|
348
348
|
});
|
|
349
349
|
});
|
|
350
350
|
};
|
|
351
|
-
ContentMethods.prototype.getContentList = function (
|
|
352
|
-
|
|
353
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
351
|
+
ContentMethods.prototype.getContentList = function (referenceName_1, guid_1, locale_1, listParams_1) {
|
|
352
|
+
return __awaiter(this, arguments, void 0, function (referenceName, guid, locale, listParams, filterObject) {
|
|
354
353
|
var apiPath, resp, err_11;
|
|
354
|
+
if (filterObject === void 0) { filterObject = null; }
|
|
355
355
|
return __generator(this, function (_a) {
|
|
356
356
|
switch (_a.label) {
|
|
357
357
|
case 0:
|
|
@@ -369,11 +369,11 @@ var ContentMethods = /** @class */ (function () {
|
|
|
369
369
|
});
|
|
370
370
|
});
|
|
371
371
|
};
|
|
372
|
-
ContentMethods.prototype.getContentHistory = function (
|
|
373
|
-
|
|
374
|
-
if (skip === void 0) { skip = 0; }
|
|
375
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
372
|
+
ContentMethods.prototype.getContentHistory = function (locale_1, guid_1, contentID_1) {
|
|
373
|
+
return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
|
|
376
374
|
var apiPath, resp, err_12;
|
|
375
|
+
if (take === void 0) { take = 50; }
|
|
376
|
+
if (skip === void 0) { skip = 0; }
|
|
377
377
|
return __generator(this, function (_a) {
|
|
378
378
|
switch (_a.label) {
|
|
379
379
|
case 0:
|
|
@@ -391,11 +391,11 @@ var ContentMethods = /** @class */ (function () {
|
|
|
391
391
|
});
|
|
392
392
|
});
|
|
393
393
|
};
|
|
394
|
-
ContentMethods.prototype.getContentComments = function (
|
|
395
|
-
|
|
396
|
-
if (skip === void 0) { skip = 0; }
|
|
397
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
394
|
+
ContentMethods.prototype.getContentComments = function (locale_1, guid_1, contentID_1) {
|
|
395
|
+
return __awaiter(this, arguments, void 0, function (locale, guid, contentID, take, skip) {
|
|
398
396
|
var apiPath, resp, err_13;
|
|
397
|
+
if (take === void 0) { take = 50; }
|
|
398
|
+
if (skip === void 0) { skip = 0; }
|
|
399
399
|
return __generator(this, function (_a) {
|
|
400
400
|
switch (_a.label) {
|
|
401
401
|
case 0:
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Options } from "../models/options";
|
|
2
|
+
import { ClientInstance } from "./clientInstance";
|
|
3
|
+
import { Locales } from "../models/locales";
|
|
4
|
+
export declare class InstanceMethods {
|
|
5
|
+
_options: Options;
|
|
6
|
+
_clientInstance: ClientInstance;
|
|
7
|
+
constructor(options: Options);
|
|
8
|
+
getLocales(guid: string): Promise<Locales[]>;
|
|
9
|
+
}
|
|
@@ -1,111 +1,69 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
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 =
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
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
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.
|
|
40
|
-
var clientInstance_1 = require("./clientInstance");
|
|
41
|
-
var exception_1 = require("../models/exception");
|
|
42
|
-
var
|
|
43
|
-
function
|
|
44
|
-
this._options = options;
|
|
45
|
-
this._clientInstance = new clientInstance_1.ClientInstance();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
49
|
-
var apiPath, resp, err_1;
|
|
50
|
-
return __generator(this, function (_a) {
|
|
51
|
-
switch (_a.label) {
|
|
52
|
-
case 0:
|
|
53
|
-
_a.trys.push([0, 2, , 3]);
|
|
54
|
-
apiPath = "
|
|
55
|
-
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
56
|
-
case 1:
|
|
57
|
-
resp = _a.sent();
|
|
58
|
-
return [2 /*return*/, resp.data];
|
|
59
|
-
case 2:
|
|
60
|
-
err_1 = _a.sent();
|
|
61
|
-
throw new exception_1.Exception("Unable to
|
|
62
|
-
case 3: return [2 /*return*/];
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
71
|
-
var apiPath, resp, err_2;
|
|
72
|
-
return __generator(this, function (_a) {
|
|
73
|
-
switch (_a.label) {
|
|
74
|
-
case 0:
|
|
75
|
-
_a.trys.push([0, 2, , 3]);
|
|
76
|
-
apiPath = "user/save?emailAddress=".concat(emailAddress, "&firstName=").concat(firstName, "&lastName=").concat(lastName);
|
|
77
|
-
return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, roles)];
|
|
78
|
-
case 1:
|
|
79
|
-
resp = _a.sent();
|
|
80
|
-
return [2 /*return*/, resp.data];
|
|
81
|
-
case 2:
|
|
82
|
-
err_2 = _a.sent();
|
|
83
|
-
throw new exception_1.Exception("Unable to retreive users.", err_2);
|
|
84
|
-
case 3: return [2 /*return*/];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
InstanceUserMethods.prototype.deleteUser = function (userId, guid) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
-
var apiPath, resp, err_3;
|
|
92
|
-
return __generator(this, function (_a) {
|
|
93
|
-
switch (_a.label) {
|
|
94
|
-
case 0:
|
|
95
|
-
_a.trys.push([0, 2, , 3]);
|
|
96
|
-
apiPath = "user/delete/".concat(userId);
|
|
97
|
-
return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
|
|
98
|
-
case 1:
|
|
99
|
-
resp = _a.sent();
|
|
100
|
-
return [2 /*return*/, resp.data];
|
|
101
|
-
case 2:
|
|
102
|
-
err_3 = _a.sent();
|
|
103
|
-
throw new exception_1.Exception("Unable to delete the user for id: ".concat(userId), err_3);
|
|
104
|
-
case 3: return [2 /*return*/];
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
};
|
|
109
|
-
return InstanceUserMethods;
|
|
110
|
-
}());
|
|
111
|
-
exports.InstanceUserMethods = InstanceUserMethods;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
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;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
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
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.InstanceMethods = void 0;
|
|
40
|
+
var clientInstance_1 = require("./clientInstance");
|
|
41
|
+
var exception_1 = require("../models/exception");
|
|
42
|
+
var InstanceMethods = /** @class */ (function () {
|
|
43
|
+
function InstanceMethods(options) {
|
|
44
|
+
this._options = options;
|
|
45
|
+
this._clientInstance = new clientInstance_1.ClientInstance(this._options);
|
|
46
|
+
}
|
|
47
|
+
InstanceMethods.prototype.getLocales = function (guid) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
49
|
+
var apiPath, resp, err_1;
|
|
50
|
+
return __generator(this, function (_a) {
|
|
51
|
+
switch (_a.label) {
|
|
52
|
+
case 0:
|
|
53
|
+
_a.trys.push([0, 2, , 3]);
|
|
54
|
+
apiPath = "instance/".concat(guid, "/locales");
|
|
55
|
+
return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
|
|
56
|
+
case 1:
|
|
57
|
+
resp = _a.sent();
|
|
58
|
+
return [2 /*return*/, resp.data];
|
|
59
|
+
case 2:
|
|
60
|
+
err_1 = _a.sent();
|
|
61
|
+
throw new exception_1.Exception("Unable to retrieve locales.", err_1);
|
|
62
|
+
case 3: return [2 /*return*/];
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
return InstanceMethods;
|
|
68
|
+
}());
|
|
69
|
+
exports.InstanceMethods = InstanceMethods;
|
|
@@ -9,8 +9,8 @@ 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 =
|
|
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.");
|
|
@@ -64,11 +64,11 @@ var InstanceUserMethods = /** @class */ (function () {
|
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
|
-
InstanceUserMethods.prototype.saveUser = function (
|
|
68
|
-
|
|
69
|
-
if (lastName === void 0) { lastName = null; }
|
|
70
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
67
|
+
InstanceUserMethods.prototype.saveUser = function (emailAddress_1, roles_1, guid_1) {
|
|
68
|
+
return __awaiter(this, arguments, void 0, function (emailAddress, roles, guid, firstName, lastName) {
|
|
71
69
|
var apiPath, resp, err_2;
|
|
70
|
+
if (firstName === void 0) { firstName = null; }
|
|
71
|
+
if (lastName === void 0) { lastName = null; }
|
|
72
72
|
return __generator(this, function (_a) {
|
|
73
73
|
switch (_a.label) {
|
|
74
74
|
case 0:
|
|
@@ -9,8 +9,8 @@ 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 =
|
|
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.");
|
|
@@ -84,10 +84,10 @@ var ModelMethods = /** @class */ (function () {
|
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
|
-
ModelMethods.prototype.getContentModules = function (
|
|
88
|
-
|
|
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:
|