@agility/management-sdk 0.1.0 → 0.1.1
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 +395 -397
- package/dist/apiMethods/assetMethods.d.ts +14 -14
- package/dist/apiMethods/assetMethods.js +95 -95
- package/dist/apiMethods/batchMethods.d.ts +11 -11
- package/dist/apiMethods/batchMethods.js +65 -65
- package/dist/apiMethods/clientInstance.d.ts +8 -8
- package/dist/apiMethods/clientInstance.js +77 -77
- package/dist/apiMethods/containerMethods.d.ts +16 -16
- package/dist/apiMethods/containerMethods.js +105 -105
- package/dist/apiMethods/contentMethods.d.ts +20 -20
- package/dist/apiMethods/contentMethods.js +175 -175
- package/dist/apiMethods/instanceUserMethods.d.ts +13 -13
- package/dist/apiMethods/instanceUserMethods.js +57 -57
- package/dist/apiMethods/modelMethods.d.ts +13 -13
- package/dist/apiMethods/modelMethods.js +81 -81
- package/dist/apiMethods/pageMethods.d.ts +20 -20
- package/dist/apiMethods/pageMethods.js +159 -159
- package/dist/enums/batchOperationType.d.ts +19 -19
- package/dist/enums/batchOperationType.js +23 -23
- package/dist/enums/batchState..d.ts +7 -7
- package/dist/enums/batchState..js +11 -11
- package/dist/index.d.ts +21 -21
- package/dist/index.js +37 -33
- package/dist/models/batch.d.ts +29 -29
- package/dist/models/batch.js +6 -6
- package/dist/models/batchItem.d.ts +13 -13
- package/dist/models/batchItem.js +6 -6
- package/dist/models/container.d.ts +47 -47
- package/dist/models/container.js +6 -6
- package/dist/models/contentItem.d.ts +37 -37
- package/dist/models/contentItem.js +18 -18
- package/dist/models/contentViewColumn.d.ts +8 -8
- package/dist/models/contentViewColumn.js +6 -6
- package/dist/models/exception.d.ts +4 -4
- package/dist/models/exception.js +10 -10
- package/dist/models/instanceRole.d.ts +7 -7
- package/dist/models/instanceRole.js +6 -6
- package/dist/models/instanceUser.d.ts +14 -14
- package/dist/models/instanceUser.js +6 -6
- package/dist/models/media.d.ts +30 -30
- package/dist/models/media.js +9 -9
- package/dist/models/model.d.ts +30 -30
- package/dist/models/model.js +9 -9
- package/dist/models/notification.d.ts +13 -13
- package/dist/models/notification.js +6 -6
- package/dist/models/options.d.ts +10 -10
- package/dist/models/options.js +25 -25
- package/dist/models/pageItem.d.ts +56 -56
- package/dist/models/pageItem.js +21 -21
- package/dist/models/sitemap.d.ts +20 -20
- package/dist/models/sitemap.js +9 -9
- package/dist/models/websiteUser.d.ts +22 -22
- package/dist/models/websiteUser.js +9 -9
- package/license.txt +20 -20
- package/package.json +39 -39
- package/tsconfig.json +14 -14
|
@@ -1,57 +1,57 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.InstanceUserMethods = void 0;
|
|
13
|
-
const clientInstance_1 = require("./clientInstance");
|
|
14
|
-
const exception_1 = require("../models/exception");
|
|
15
|
-
class InstanceUserMethods {
|
|
16
|
-
constructor(options) {
|
|
17
|
-
this._options = options;
|
|
18
|
-
this._clientInstance = new clientInstance_1.ClientInstance();
|
|
19
|
-
}
|
|
20
|
-
getUsers() {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
try {
|
|
23
|
-
let apiPath = `user/list`;
|
|
24
|
-
const resp = yield this._clientInstance.executeGet(apiPath, this._options);
|
|
25
|
-
return resp.data;
|
|
26
|
-
}
|
|
27
|
-
catch (err) {
|
|
28
|
-
throw new exception_1.Exception(`Unable to retreive users.`, err);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
saveUser(emailAddress, roles, firstName = null, lastName = null) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
try {
|
|
35
|
-
let apiPath = `user/save?emailAddress=${emailAddress}&firstName=${firstName}&lastName=${lastName}`;
|
|
36
|
-
const resp = yield this._clientInstance.executePost(apiPath, this._options, roles);
|
|
37
|
-
return resp.data;
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
throw new exception_1.Exception(`Unable to retreive users.`, err);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
deleteUser(userId) {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
try {
|
|
47
|
-
let apiPath = `user/delete/${userId}`;
|
|
48
|
-
const resp = yield this._clientInstance.executeDelete(apiPath, this._options);
|
|
49
|
-
return resp.data;
|
|
50
|
-
}
|
|
51
|
-
catch (err) {
|
|
52
|
-
throw new exception_1.Exception(`Unable to delete the user for id: ${userId}`, err);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.InstanceUserMethods = void 0;
|
|
13
|
+
const clientInstance_1 = require("./clientInstance");
|
|
14
|
+
const exception_1 = require("../models/exception");
|
|
15
|
+
class InstanceUserMethods {
|
|
16
|
+
constructor(options) {
|
|
17
|
+
this._options = options;
|
|
18
|
+
this._clientInstance = new clientInstance_1.ClientInstance();
|
|
19
|
+
}
|
|
20
|
+
getUsers() {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
try {
|
|
23
|
+
let apiPath = `user/list`;
|
|
24
|
+
const resp = yield this._clientInstance.executeGet(apiPath, this._options);
|
|
25
|
+
return resp.data;
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
throw new exception_1.Exception(`Unable to retreive users.`, err);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
saveUser(emailAddress, roles, firstName = null, lastName = null) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
try {
|
|
35
|
+
let apiPath = `user/save?emailAddress=${emailAddress}&firstName=${firstName}&lastName=${lastName}`;
|
|
36
|
+
const resp = yield this._clientInstance.executePost(apiPath, this._options, roles);
|
|
37
|
+
return resp.data;
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
throw new exception_1.Exception(`Unable to retreive users.`, err);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
deleteUser(userId) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
try {
|
|
47
|
+
let apiPath = `user/delete/${userId}`;
|
|
48
|
+
const resp = yield this._clientInstance.executeDelete(apiPath, this._options);
|
|
49
|
+
return resp.data;
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
throw new exception_1.Exception(`Unable to delete the user for id: ${userId}`, err);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.InstanceUserMethods = InstanceUserMethods;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Options } from "../models/options";
|
|
2
|
-
import { ClientInstance } from "./clientInstance";
|
|
3
|
-
import { Model } from "../models/model";
|
|
4
|
-
export declare class ModelMethods {
|
|
5
|
-
_options: Options;
|
|
6
|
-
_clientInstance: ClientInstance;
|
|
7
|
-
constructor(options: Options);
|
|
8
|
-
getContentModel(id: number): Promise<Model>;
|
|
9
|
-
getContentModules(includeDefaults: boolean, includeModules?: boolean): Promise<Model[]>;
|
|
10
|
-
getPageModules(includeDefault: boolean): Promise<Model[]>;
|
|
11
|
-
saveModel(model: Model): Promise<Model>;
|
|
12
|
-
deleteModel(id: number): Promise<string>;
|
|
13
|
-
}
|
|
1
|
+
import { Options } from "../models/options";
|
|
2
|
+
import { ClientInstance } from "./clientInstance";
|
|
3
|
+
import { Model } from "../models/model";
|
|
4
|
+
export declare class ModelMethods {
|
|
5
|
+
_options: Options;
|
|
6
|
+
_clientInstance: ClientInstance;
|
|
7
|
+
constructor(options: Options);
|
|
8
|
+
getContentModel(id: number): Promise<Model>;
|
|
9
|
+
getContentModules(includeDefaults: boolean, includeModules?: boolean): Promise<Model[]>;
|
|
10
|
+
getPageModules(includeDefault: boolean): Promise<Model[]>;
|
|
11
|
+
saveModel(model: Model): Promise<Model>;
|
|
12
|
+
deleteModel(id: number): Promise<string>;
|
|
13
|
+
}
|
|
@@ -1,81 +1,81 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.ModelMethods = void 0;
|
|
13
|
-
const clientInstance_1 = require("./clientInstance");
|
|
14
|
-
const exception_1 = require("../models/exception");
|
|
15
|
-
class ModelMethods {
|
|
16
|
-
constructor(options) {
|
|
17
|
-
this._options = options;
|
|
18
|
-
this._clientInstance = new clientInstance_1.ClientInstance();
|
|
19
|
-
}
|
|
20
|
-
getContentModel(id) {
|
|
21
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
-
try {
|
|
23
|
-
let apiPath = `model/${id}`;
|
|
24
|
-
const resp = yield this._clientInstance.executeGet(apiPath, this._options);
|
|
25
|
-
return resp.data;
|
|
26
|
-
}
|
|
27
|
-
catch (err) {
|
|
28
|
-
throw new exception_1.Exception(`Unable to retreive model for id: ${id}.`, err);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
getContentModules(includeDefaults, includeModules = false) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
try {
|
|
35
|
-
let apiPath = `model/list/${includeDefaults}?includeModules=${includeModules}`;
|
|
36
|
-
const resp = yield this._clientInstance.executeGet(apiPath, this._options);
|
|
37
|
-
return resp.data;
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
throw new exception_1.Exception(`Unable to retreive content modules.`, err);
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
getPageModules(includeDefault) {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
try {
|
|
47
|
-
let apiPath = `model/list-page-modules/${includeDefault}`;
|
|
48
|
-
const resp = yield this._clientInstance.executeGet(apiPath, this._options);
|
|
49
|
-
return resp.data;
|
|
50
|
-
}
|
|
51
|
-
catch (err) {
|
|
52
|
-
throw new exception_1.Exception(`Unable to retreive page modules.`, err);
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
saveModel(model) {
|
|
57
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
try {
|
|
59
|
-
let apiPath = `model`;
|
|
60
|
-
const resp = yield this._clientInstance.executePost(apiPath, this._options, model);
|
|
61
|
-
return resp.data;
|
|
62
|
-
}
|
|
63
|
-
catch (err) {
|
|
64
|
-
throw new exception_1.Exception(`Unable to save the model.`, err);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
deleteModel(id) {
|
|
69
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
try {
|
|
71
|
-
let apiPath = `model/${id}`;
|
|
72
|
-
const resp = yield this._clientInstance.executeDelete(apiPath, this._options);
|
|
73
|
-
return resp.data;
|
|
74
|
-
}
|
|
75
|
-
catch (err) {
|
|
76
|
-
throw new exception_1.Exception(`Unable to delete the model`, err);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
exports.ModelMethods = ModelMethods;
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ModelMethods = void 0;
|
|
13
|
+
const clientInstance_1 = require("./clientInstance");
|
|
14
|
+
const exception_1 = require("../models/exception");
|
|
15
|
+
class ModelMethods {
|
|
16
|
+
constructor(options) {
|
|
17
|
+
this._options = options;
|
|
18
|
+
this._clientInstance = new clientInstance_1.ClientInstance();
|
|
19
|
+
}
|
|
20
|
+
getContentModel(id) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
try {
|
|
23
|
+
let apiPath = `model/${id}`;
|
|
24
|
+
const resp = yield this._clientInstance.executeGet(apiPath, this._options);
|
|
25
|
+
return resp.data;
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
throw new exception_1.Exception(`Unable to retreive model for id: ${id}.`, err);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
getContentModules(includeDefaults, includeModules = false) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
try {
|
|
35
|
+
let apiPath = `model/list/${includeDefaults}?includeModules=${includeModules}`;
|
|
36
|
+
const resp = yield this._clientInstance.executeGet(apiPath, this._options);
|
|
37
|
+
return resp.data;
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
throw new exception_1.Exception(`Unable to retreive content modules.`, err);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
getPageModules(includeDefault) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
try {
|
|
47
|
+
let apiPath = `model/list-page-modules/${includeDefault}`;
|
|
48
|
+
const resp = yield this._clientInstance.executeGet(apiPath, this._options);
|
|
49
|
+
return resp.data;
|
|
50
|
+
}
|
|
51
|
+
catch (err) {
|
|
52
|
+
throw new exception_1.Exception(`Unable to retreive page modules.`, err);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
saveModel(model) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
try {
|
|
59
|
+
let apiPath = `model`;
|
|
60
|
+
const resp = yield this._clientInstance.executePost(apiPath, this._options, model);
|
|
61
|
+
return resp.data;
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
throw new exception_1.Exception(`Unable to save the model.`, err);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
deleteModel(id) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
try {
|
|
71
|
+
let apiPath = `model/${id}`;
|
|
72
|
+
const resp = yield this._clientInstance.executeDelete(apiPath, this._options);
|
|
73
|
+
return resp.data;
|
|
74
|
+
}
|
|
75
|
+
catch (err) {
|
|
76
|
+
throw new exception_1.Exception(`Unable to delete the model`, err);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.ModelMethods = ModelMethods;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { Options } from "../models/options";
|
|
2
|
-
import { ClientInstance } from "./clientInstance";
|
|
3
|
-
import { PageItem } from "../models/pageItem";
|
|
4
|
-
import { Sitemap } from "../models/sitemap";
|
|
5
|
-
import { BatchMethods } from "./batchMethods";
|
|
6
|
-
export declare class PageMethods {
|
|
7
|
-
_options: Options;
|
|
8
|
-
_clientInstance: ClientInstance;
|
|
9
|
-
_batchMethods: BatchMethods;
|
|
10
|
-
constructor(options: Options);
|
|
11
|
-
getSitemap(): Promise<Sitemap[]>;
|
|
12
|
-
getPage(pageID: number): Promise<PageItem>;
|
|
13
|
-
publishPage(pageID: number, comments?: string): Promise<number[]>;
|
|
14
|
-
unPublishPage(pageID: number, comments?: string): Promise<number[]>;
|
|
15
|
-
pageRequestApproval(pageID: number, comments?: string): Promise<number[]>;
|
|
16
|
-
approvePage(pageID: number, comments?: string): Promise<number[]>;
|
|
17
|
-
declinePage(pageID: number, comments?: string): Promise<number[]>;
|
|
18
|
-
deletePage(pageID: number, comments?: string): Promise<number[]>;
|
|
19
|
-
savePage(pageItem: PageItem, parentPageID?: number, placeBeforePageItemID?: number): Promise<number[]>;
|
|
20
|
-
}
|
|
1
|
+
import { Options } from "../models/options";
|
|
2
|
+
import { ClientInstance } from "./clientInstance";
|
|
3
|
+
import { PageItem } from "../models/pageItem";
|
|
4
|
+
import { Sitemap } from "../models/sitemap";
|
|
5
|
+
import { BatchMethods } from "./batchMethods";
|
|
6
|
+
export declare class PageMethods {
|
|
7
|
+
_options: Options;
|
|
8
|
+
_clientInstance: ClientInstance;
|
|
9
|
+
_batchMethods: BatchMethods;
|
|
10
|
+
constructor(options: Options);
|
|
11
|
+
getSitemap(): Promise<Sitemap[]>;
|
|
12
|
+
getPage(pageID: number): Promise<PageItem>;
|
|
13
|
+
publishPage(pageID: number, comments?: string): Promise<number[]>;
|
|
14
|
+
unPublishPage(pageID: number, comments?: string): Promise<number[]>;
|
|
15
|
+
pageRequestApproval(pageID: number, comments?: string): Promise<number[]>;
|
|
16
|
+
approvePage(pageID: number, comments?: string): Promise<number[]>;
|
|
17
|
+
declinePage(pageID: number, comments?: string): Promise<number[]>;
|
|
18
|
+
deletePage(pageID: number, comments?: string): Promise<number[]>;
|
|
19
|
+
savePage(pageItem: PageItem, parentPageID?: number, placeBeforePageItemID?: number): Promise<number[]>;
|
|
20
|
+
}
|