@agility/management-sdk 0.1.13 → 0.1.15

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 (132) hide show
  1. package/README.md +522 -522
  2. package/dist/apiClient.d.ts +19 -19
  3. package/dist/apiClient.js +24 -24
  4. package/dist/apiMethods/assetMethods.d.ts +34 -24
  5. package/dist/apiMethods/assetMethods.js +325 -315
  6. package/dist/apiMethods/batchMethods.d.ts +11 -11
  7. package/dist/apiMethods/batchMethods.js +117 -117
  8. package/dist/apiMethods/clientInstance.d.ts +18 -18
  9. package/dist/apiMethods/clientInstance.js +168 -168
  10. package/dist/apiMethods/containerMethods.d.ts +17 -16
  11. package/dist/apiMethods/containerMethods.js +209 -189
  12. package/dist/apiMethods/contentMethods.d.ts +20 -20
  13. package/dist/apiMethods/contentMethods.js +359 -359
  14. package/dist/apiMethods/instanceUserMethods.d.ts +13 -13
  15. package/dist/apiMethods/instanceUserMethods.js +111 -111
  16. package/dist/apiMethods/modelMethods.d.ts +14 -14
  17. package/dist/apiMethods/modelMethods.js +170 -170
  18. package/dist/apiMethods/pageMethods.d.ts +28 -28
  19. package/dist/apiMethods/pageMethods.js +446 -446
  20. package/dist/enums/assetGroupingType.d.ts +3 -3
  21. package/dist/enums/assetGroupingType.js +7 -7
  22. package/dist/enums/batchOperationType.d.ts +19 -19
  23. package/dist/enums/batchOperationType.js +23 -23
  24. package/dist/enums/batchState..d.ts +7 -7
  25. package/dist/enums/batchState..js +11 -11
  26. package/dist/enums/pageItemTemplateType.d.ts +4 -4
  27. package/dist/enums/pageItemTemplateType.js +8 -8
  28. package/dist/index.d.ts +23 -23
  29. package/dist/index.js +35 -39
  30. package/dist/models/assetContainer.d.ts +7 -7
  31. package/dist/models/assetContainer.js +9 -9
  32. package/dist/models/assetGalleries.d.ts +5 -5
  33. package/dist/models/assetGalleries.js +9 -9
  34. package/dist/models/assetMediaGrouping.d.ts +17 -17
  35. package/dist/models/assetMediaGrouping.js +9 -9
  36. package/dist/models/assetMediaGroupingMetaData.d.ts +4 -4
  37. package/dist/models/assetMediaGroupingMetaData.js +9 -9
  38. package/dist/models/batch.d.ts +29 -29
  39. package/dist/models/batch.js +9 -9
  40. package/dist/models/batchItem.d.ts +13 -13
  41. package/dist/models/batchItem.js +9 -9
  42. package/dist/models/container.d.ts +47 -47
  43. package/dist/models/container.js +9 -9
  44. package/dist/models/contentItem.d.ts +37 -37
  45. package/dist/models/contentItem.js +33 -33
  46. package/dist/models/contentSectionDefaultModule.d.ts +7 -7
  47. package/dist/models/contentSectionDefaultModule.js +9 -9
  48. package/dist/models/contentSectionDefinition.d.ts +35 -35
  49. package/dist/models/contentSectionDefinition.js +9 -9
  50. package/dist/models/contentViewColumn.d.ts +8 -8
  51. package/dist/models/contentViewColumn.js +9 -9
  52. package/dist/models/exception.d.ts +4 -4
  53. package/dist/models/exception.js +26 -28
  54. package/dist/models/instanceRole.d.ts +7 -7
  55. package/dist/models/instanceRole.js +9 -9
  56. package/dist/models/instanceUser.d.ts +14 -14
  57. package/dist/models/instanceUser.js +9 -9
  58. package/dist/models/media.d.ts +30 -30
  59. package/dist/models/media.js +15 -15
  60. package/dist/models/model.d.ts +30 -30
  61. package/dist/models/model.js +15 -15
  62. package/dist/models/notification.d.ts +13 -13
  63. package/dist/models/notification.js +9 -9
  64. package/dist/models/options.d.ts +7 -7
  65. package/dist/models/options.js +9 -9
  66. package/dist/models/pageItem.d.ts +56 -56
  67. package/dist/models/pageItem.js +39 -39
  68. package/dist/models/pageModel.d.ts +14 -14
  69. package/dist/models/pageModel.js +9 -9
  70. package/dist/models/sharedModule.d.ts +7 -7
  71. package/dist/models/sharedModule.js +9 -9
  72. package/dist/models/sitemap.d.ts +20 -20
  73. package/dist/models/sitemap.js +15 -15
  74. package/dist/models/websiteUser.d.ts +22 -22
  75. package/dist/models/websiteUser.js +15 -15
  76. package/license.txt +20 -20
  77. package/package.json +39 -39
  78. package/tsconfig.json +14 -14
  79. package/dist/apiMethods/apiClient.d.ts +0 -19
  80. package/dist/apiMethods/apiClient.js +0 -24
  81. package/dist/src/apiMethods/assetMethods.d.ts +0 -14
  82. package/dist/src/apiMethods/assetMethods.js +0 -172
  83. package/dist/src/apiMethods/batchMethods.d.ts +0 -11
  84. package/dist/src/apiMethods/batchMethods.js +0 -117
  85. package/dist/src/apiMethods/clientInstance.d.ts +0 -8
  86. package/dist/src/apiMethods/clientInstance.js +0 -156
  87. package/dist/src/apiMethods/containerMethods.d.ts +0 -16
  88. package/dist/src/apiMethods/containerMethods.js +0 -189
  89. package/dist/src/apiMethods/contentMethods.d.ts +0 -20
  90. package/dist/src/apiMethods/contentMethods.js +0 -359
  91. package/dist/src/apiMethods/instanceUserMethods.d.ts +0 -13
  92. package/dist/src/apiMethods/instanceUserMethods.js +0 -111
  93. package/dist/src/apiMethods/modelMethods.d.ts +0 -13
  94. package/dist/src/apiMethods/modelMethods.js +0 -150
  95. package/dist/src/apiMethods/pageMethods.d.ts +0 -20
  96. package/dist/src/apiMethods/pageMethods.js +0 -323
  97. package/dist/src/enums/batchOperationType.d.ts +0 -19
  98. package/dist/src/enums/batchOperationType.js +0 -23
  99. package/dist/src/enums/batchState..d.ts +0 -7
  100. package/dist/src/enums/batchState..js +0 -11
  101. package/dist/src/index.d.ts +0 -14
  102. package/dist/src/index.js +0 -30
  103. package/dist/src/models/batch.d.ts +0 -29
  104. package/dist/src/models/batch.js +0 -9
  105. package/dist/src/models/batchItem.d.ts +0 -13
  106. package/dist/src/models/batchItem.js +0 -9
  107. package/dist/src/models/container.d.ts +0 -47
  108. package/dist/src/models/container.js +0 -9
  109. package/dist/src/models/contentItem.d.ts +0 -37
  110. package/dist/src/models/contentItem.js +0 -33
  111. package/dist/src/models/contentViewColumn.d.ts +0 -8
  112. package/dist/src/models/contentViewColumn.js +0 -9
  113. package/dist/src/models/exception.d.ts +0 -4
  114. package/dist/src/models/exception.js +0 -28
  115. package/dist/src/models/instanceRole.d.ts +0 -7
  116. package/dist/src/models/instanceRole.js +0 -9
  117. package/dist/src/models/instanceUser.d.ts +0 -14
  118. package/dist/src/models/instanceUser.js +0 -9
  119. package/dist/src/models/media.d.ts +0 -30
  120. package/dist/src/models/media.js +0 -15
  121. package/dist/src/models/model.d.ts +0 -30
  122. package/dist/src/models/model.js +0 -15
  123. package/dist/src/models/notification.d.ts +0 -13
  124. package/dist/src/models/notification.js +0 -9
  125. package/dist/src/models/options.d.ts +0 -7
  126. package/dist/src/models/options.js +0 -9
  127. package/dist/src/models/pageItem.d.ts +0 -56
  128. package/dist/src/models/pageItem.js +0 -39
  129. package/dist/src/models/sitemap.d.ts +0 -20
  130. package/dist/src/models/sitemap.js +0 -15
  131. package/dist/src/models/websiteUser.d.ts +0 -22
  132. package/dist/src/models/websiteUser.js +0 -15
@@ -1,20 +0,0 @@
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(guid: string, locale: string): Promise<Sitemap[]>;
12
- getPage(pageID: number, guid: string, locale: string): Promise<PageItem>;
13
- publishPage(pageID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
14
- unPublishPage(pageID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
15
- pageRequestApproval(pageID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
16
- approvePage(pageID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
17
- declinePage(pageID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
18
- deletePage(pageID: number, guid: string, locale: string, comments?: string): Promise<number[]>;
19
- savePage(pageItem: PageItem, guid: string, locale: string, parentPageID?: number, placeBeforePageItemID?: number): Promise<number[]>;
20
- }
@@ -1,323 +0,0 @@
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 = { next: verb(0), "throw": verb(1), "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 (_) 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.PageMethods = void 0;
40
- var clientInstance_1 = require("./clientInstance");
41
- var batchMethods_1 = require("./batchMethods");
42
- var exception_1 = require("../models/exception");
43
- var PageMethods = /** @class */ (function () {
44
- function PageMethods(options) {
45
- this._options = options;
46
- this._clientInstance = new clientInstance_1.ClientInstance();
47
- this._batchMethods = new batchMethods_1.BatchMethods(this._options);
48
- }
49
- PageMethods.prototype.getSitemap = function (guid, locale) {
50
- return __awaiter(this, void 0, void 0, function () {
51
- var apiPath, resp, err_1;
52
- return __generator(this, function (_a) {
53
- switch (_a.label) {
54
- case 0:
55
- _a.trys.push([0, 2, , 3]);
56
- apiPath = "".concat(locale, "/sitemap");
57
- return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
58
- case 1:
59
- resp = _a.sent();
60
- return [2 /*return*/, resp.data];
61
- case 2:
62
- err_1 = _a.sent();
63
- throw new exception_1.Exception("Unable to retreive sitemap.", err_1);
64
- case 3: return [2 /*return*/];
65
- }
66
- });
67
- });
68
- };
69
- PageMethods.prototype.getPage = function (pageID, guid, locale) {
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 = "".concat(locale, "/page/").concat(pageID);
77
- return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
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 page for id ".concat(pageID, "."), err_2);
84
- case 3: return [2 /*return*/];
85
- }
86
- });
87
- });
88
- };
89
- PageMethods.prototype.publishPage = function (pageID, guid, locale, comments) {
90
- if (comments === void 0) { comments = null; }
91
- return __awaiter(this, void 0, void 0, function () {
92
- var apiPath, resp, batchID_1, batch, pageIDs_1, err_3;
93
- var _this = this;
94
- return __generator(this, function (_a) {
95
- switch (_a.label) {
96
- case 0:
97
- _a.trys.push([0, 3, , 4]);
98
- apiPath = "".concat(locale, "/page/").concat(pageID, "/publish?comments=").concat(comments);
99
- return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
100
- case 1:
101
- resp = _a.sent();
102
- batchID_1 = resp.data;
103
- return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
104
- switch (_a.label) {
105
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_1, guid)];
106
- case 1: return [2 /*return*/, _a.sent()];
107
- }
108
- }); }); })];
109
- case 2:
110
- batch = _a.sent();
111
- pageIDs_1 = [];
112
- batch.items.forEach(function (element) { return pageIDs_1.push(element.itemID); });
113
- return [2 /*return*/, pageIDs_1];
114
- case 3:
115
- err_3 = _a.sent();
116
- throw new exception_1.Exception("Unable to publish the page for id: ".concat(pageID), err_3);
117
- case 4: return [2 /*return*/];
118
- }
119
- });
120
- });
121
- };
122
- PageMethods.prototype.unPublishPage = function (pageID, guid, locale, comments) {
123
- if (comments === void 0) { comments = null; }
124
- return __awaiter(this, void 0, void 0, function () {
125
- var apiPath, resp, batchID_2, batch, pageIDs_2, err_4;
126
- var _this = this;
127
- return __generator(this, function (_a) {
128
- switch (_a.label) {
129
- case 0:
130
- _a.trys.push([0, 3, , 4]);
131
- apiPath = "".concat(locale, "/page/").concat(pageID, "/unpublish?comments=").concat(comments);
132
- return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
133
- case 1:
134
- resp = _a.sent();
135
- batchID_2 = resp.data;
136
- return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
137
- switch (_a.label) {
138
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_2, guid)];
139
- case 1: return [2 /*return*/, _a.sent()];
140
- }
141
- }); }); })];
142
- case 2:
143
- batch = _a.sent();
144
- pageIDs_2 = [];
145
- batch.items.forEach(function (element) { return pageIDs_2.push(element.itemID); });
146
- return [2 /*return*/, pageIDs_2];
147
- case 3:
148
- err_4 = _a.sent();
149
- throw new exception_1.Exception("Unable to un-publish the page for id: ".concat(pageID), err_4);
150
- case 4: return [2 /*return*/];
151
- }
152
- });
153
- });
154
- };
155
- PageMethods.prototype.pageRequestApproval = function (pageID, guid, locale, comments) {
156
- if (comments === void 0) { comments = null; }
157
- return __awaiter(this, void 0, void 0, function () {
158
- var apiPath, resp, batchID_3, batch, pageIDs_3, err_5;
159
- var _this = this;
160
- return __generator(this, function (_a) {
161
- switch (_a.label) {
162
- case 0:
163
- _a.trys.push([0, 3, , 4]);
164
- apiPath = "".concat(locale, "/page/").concat(pageID, "/request-approval?comments=").concat(comments);
165
- return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
166
- case 1:
167
- resp = _a.sent();
168
- batchID_3 = resp.data;
169
- return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
170
- switch (_a.label) {
171
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_3, guid)];
172
- case 1: return [2 /*return*/, _a.sent()];
173
- }
174
- }); }); })];
175
- case 2:
176
- batch = _a.sent();
177
- pageIDs_3 = [];
178
- batch.items.forEach(function (element) { return pageIDs_3.push(element.itemID); });
179
- return [2 /*return*/, pageIDs_3];
180
- case 3:
181
- err_5 = _a.sent();
182
- throw new exception_1.Exception("Unable to request approval the page for id: ".concat(pageID), err_5);
183
- case 4: return [2 /*return*/];
184
- }
185
- });
186
- });
187
- };
188
- PageMethods.prototype.approvePage = function (pageID, guid, locale, comments) {
189
- if (comments === void 0) { comments = null; }
190
- return __awaiter(this, void 0, void 0, function () {
191
- var apiPath, resp, batchID_4, batch, pageIDs_4, err_6;
192
- var _this = this;
193
- return __generator(this, function (_a) {
194
- switch (_a.label) {
195
- case 0:
196
- _a.trys.push([0, 3, , 4]);
197
- apiPath = "".concat(locale, "/page/").concat(pageID, "/approve?comments=").concat(comments);
198
- return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
199
- case 1:
200
- resp = _a.sent();
201
- batchID_4 = resp.data;
202
- return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
203
- switch (_a.label) {
204
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_4, guid)];
205
- case 1: return [2 /*return*/, _a.sent()];
206
- }
207
- }); }); })];
208
- case 2:
209
- batch = _a.sent();
210
- pageIDs_4 = [];
211
- batch.items.forEach(function (element) { return pageIDs_4.push(element.itemID); });
212
- return [2 /*return*/, pageIDs_4];
213
- case 3:
214
- err_6 = _a.sent();
215
- throw new exception_1.Exception("Unable to approve the page for id: ".concat(pageID), err_6);
216
- case 4: return [2 /*return*/];
217
- }
218
- });
219
- });
220
- };
221
- PageMethods.prototype.declinePage = function (pageID, guid, locale, comments) {
222
- if (comments === void 0) { comments = null; }
223
- return __awaiter(this, void 0, void 0, function () {
224
- var apiPath, resp, batchID_5, batch, pageIDs_5, err_7;
225
- var _this = this;
226
- return __generator(this, function (_a) {
227
- switch (_a.label) {
228
- case 0:
229
- _a.trys.push([0, 3, , 4]);
230
- apiPath = "".concat(locale, "/page/").concat(pageID, "/decline?comments=").concat(comments);
231
- return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
232
- case 1:
233
- resp = _a.sent();
234
- batchID_5 = resp.data;
235
- return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
236
- switch (_a.label) {
237
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_5, guid)];
238
- case 1: return [2 /*return*/, _a.sent()];
239
- }
240
- }); }); })];
241
- case 2:
242
- batch = _a.sent();
243
- pageIDs_5 = [];
244
- batch.items.forEach(function (element) { return pageIDs_5.push(element.itemID); });
245
- return [2 /*return*/, pageIDs_5];
246
- case 3:
247
- err_7 = _a.sent();
248
- throw new exception_1.Exception("Unable to decline the page for id: ".concat(pageID), err_7);
249
- case 4: return [2 /*return*/];
250
- }
251
- });
252
- });
253
- };
254
- PageMethods.prototype.deletePage = function (pageID, guid, locale, comments) {
255
- if (comments === void 0) { comments = null; }
256
- return __awaiter(this, void 0, void 0, function () {
257
- var apiPath, resp, batchID_6, batch, pageIDs_6, err_8;
258
- var _this = this;
259
- return __generator(this, function (_a) {
260
- switch (_a.label) {
261
- case 0:
262
- _a.trys.push([0, 3, , 4]);
263
- apiPath = "".concat(locale, "/page/").concat(pageID, "?comments=").concat(comments);
264
- return [4 /*yield*/, this._clientInstance.executeDelete(apiPath, guid, this._options.token)];
265
- case 1:
266
- resp = _a.sent();
267
- batchID_6 = resp.data;
268
- return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
269
- switch (_a.label) {
270
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_6, guid)];
271
- case 1: return [2 /*return*/, _a.sent()];
272
- }
273
- }); }); })];
274
- case 2:
275
- batch = _a.sent();
276
- pageIDs_6 = [];
277
- batch.items.forEach(function (element) { return pageIDs_6.push(element.itemID); });
278
- return [2 /*return*/, pageIDs_6];
279
- case 3:
280
- err_8 = _a.sent();
281
- throw new exception_1.Exception("Unable to delete the page for id: ".concat(pageID), err_8);
282
- case 4: return [2 /*return*/];
283
- }
284
- });
285
- });
286
- };
287
- PageMethods.prototype.savePage = function (pageItem, guid, locale, parentPageID, placeBeforePageItemID) {
288
- if (parentPageID === void 0) { parentPageID = -1; }
289
- if (placeBeforePageItemID === void 0) { placeBeforePageItemID = -1; }
290
- return __awaiter(this, void 0, void 0, function () {
291
- var apiPath, resp, batchID_7, batch, pageIDs_7, err_9;
292
- var _this = this;
293
- return __generator(this, function (_a) {
294
- switch (_a.label) {
295
- case 0:
296
- _a.trys.push([0, 3, , 4]);
297
- apiPath = "".concat(locale, "/page?parentPageID=").concat(parentPageID, "&placeBeforePageItemID=").concat(placeBeforePageItemID);
298
- return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, pageItem)];
299
- case 1:
300
- resp = _a.sent();
301
- batchID_7 = resp.data;
302
- return [4 /*yield*/, this._batchMethods.Retry(function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
303
- switch (_a.label) {
304
- case 0: return [4 /*yield*/, this._batchMethods.getBatch(batchID_7, guid)];
305
- case 1: return [2 /*return*/, _a.sent()];
306
- }
307
- }); }); })];
308
- case 2:
309
- batch = _a.sent();
310
- pageIDs_7 = [];
311
- batch.items.forEach(function (element) { return pageIDs_7.push(element.itemID); });
312
- return [2 /*return*/, pageIDs_7];
313
- case 3:
314
- err_9 = _a.sent();
315
- throw new exception_1.Exception("Unable to create page. ".concat(err_9), err_9);
316
- case 4: return [2 /*return*/];
317
- }
318
- });
319
- });
320
- };
321
- return PageMethods;
322
- }());
323
- exports.PageMethods = PageMethods;
@@ -1,19 +0,0 @@
1
- export declare enum BatchOperationType {
2
- Publish = 1,
3
- Unpublish = 2,
4
- Approve = 3,
5
- Decline = 4,
6
- RequestApproval = 5,
7
- Copy = 6,
8
- ClonePageTemplate = 7,
9
- Sync = 8,
10
- TagExport = 9,
11
- TagImport = 10,
12
- ContentExport = 11,
13
- ContentImport = 12,
14
- InstanctTemplateImport = 13,
15
- InsertContent = 14,
16
- DeleteContent = 15,
17
- SavePage = 16,
18
- DeletePage = 17
19
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BatchOperationType = void 0;
4
- var BatchOperationType;
5
- (function (BatchOperationType) {
6
- BatchOperationType[BatchOperationType["Publish"] = 1] = "Publish";
7
- BatchOperationType[BatchOperationType["Unpublish"] = 2] = "Unpublish";
8
- BatchOperationType[BatchOperationType["Approve"] = 3] = "Approve";
9
- BatchOperationType[BatchOperationType["Decline"] = 4] = "Decline";
10
- BatchOperationType[BatchOperationType["RequestApproval"] = 5] = "RequestApproval";
11
- BatchOperationType[BatchOperationType["Copy"] = 6] = "Copy";
12
- BatchOperationType[BatchOperationType["ClonePageTemplate"] = 7] = "ClonePageTemplate";
13
- BatchOperationType[BatchOperationType["Sync"] = 8] = "Sync";
14
- BatchOperationType[BatchOperationType["TagExport"] = 9] = "TagExport";
15
- BatchOperationType[BatchOperationType["TagImport"] = 10] = "TagImport";
16
- BatchOperationType[BatchOperationType["ContentExport"] = 11] = "ContentExport";
17
- BatchOperationType[BatchOperationType["ContentImport"] = 12] = "ContentImport";
18
- BatchOperationType[BatchOperationType["InstanctTemplateImport"] = 13] = "InstanctTemplateImport";
19
- BatchOperationType[BatchOperationType["InsertContent"] = 14] = "InsertContent";
20
- BatchOperationType[BatchOperationType["DeleteContent"] = 15] = "DeleteContent";
21
- BatchOperationType[BatchOperationType["SavePage"] = 16] = "SavePage";
22
- BatchOperationType[BatchOperationType["DeletePage"] = 17] = "DeletePage";
23
- })(BatchOperationType = exports.BatchOperationType || (exports.BatchOperationType = {}));
@@ -1,7 +0,0 @@
1
- export declare enum BatchState {
2
- None = 0,
3
- Pending = 1,
4
- InProcess = 2,
5
- Processed = 3,
6
- Deleted = 4
7
- }
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BatchState = void 0;
4
- var BatchState;
5
- (function (BatchState) {
6
- BatchState[BatchState["None"] = 0] = "None";
7
- BatchState[BatchState["Pending"] = 1] = "Pending";
8
- BatchState[BatchState["InProcess"] = 2] = "InProcess";
9
- BatchState[BatchState["Processed"] = 3] = "Processed";
10
- BatchState[BatchState["Deleted"] = 4] = "Deleted";
11
- })(BatchState = exports.BatchState || (exports.BatchState = {}));
@@ -1,14 +0,0 @@
1
- export * from "./models/options";
2
- export * from "./models/batch";
3
- export * from "./models/batchItem";
4
- export * from "./models/container";
5
- export * from "./models/contentItem";
6
- export * from "./models/contentViewColumn";
7
- export * from "./models/instanceRole";
8
- export * from "./models/instanceUser";
9
- export * from "./models/media";
10
- export * from "./models/model";
11
- export * from "./models/notification";
12
- export * from "./models/pageItem";
13
- export * from "./models/sitemap";
14
- export * from "../apiClient";
package/dist/src/index.js DELETED
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
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);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./models/options"), exports);
18
- __exportStar(require("./models/batch"), exports);
19
- __exportStar(require("./models/batchItem"), exports);
20
- __exportStar(require("./models/container"), exports);
21
- __exportStar(require("./models/contentItem"), exports);
22
- __exportStar(require("./models/contentViewColumn"), exports);
23
- __exportStar(require("./models/instanceRole"), exports);
24
- __exportStar(require("./models/instanceUser"), exports);
25
- __exportStar(require("./models/media"), exports);
26
- __exportStar(require("./models/model"), exports);
27
- __exportStar(require("./models/notification"), exports);
28
- __exportStar(require("./models/pageItem"), exports);
29
- __exportStar(require("./models/sitemap"), exports);
30
- __exportStar(require("../apiClient"), exports);
@@ -1,29 +0,0 @@
1
- import { BatchState } from "../enums/batchState.";
2
- import { BatchOperationType } from "../enums/batchOperationType";
3
- import { BatchItem } from "./batchItem";
4
- export declare class Batch {
5
- batchID: number | null;
6
- batchItemID: number | null;
7
- batchName: string;
8
- batchState: BatchState;
9
- operationType: BatchOperationType;
10
- ownerUserID: number | null;
11
- createdDate: string;
12
- modifiedDate: string;
13
- processDate: string | null;
14
- queueDate: string | null;
15
- isPrivate: boolean;
16
- modifiedByUserID: number;
17
- queuedByUserID: number | null;
18
- ownerName: string;
19
- modifiedByName: string;
20
- queuedByName: string;
21
- additionalData: string;
22
- errorData: string;
23
- percentComplete: number | null;
24
- numItemsProcessed: number | null;
25
- abortYN: boolean | null;
26
- statusMessage: string;
27
- batchItemCount: number;
28
- items: BatchItem[];
29
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Batch = void 0;
4
- var Batch = /** @class */ (function () {
5
- function Batch() {
6
- }
7
- return Batch;
8
- }());
9
- exports.Batch = Batch;
@@ -1,13 +0,0 @@
1
- export declare class BatchItem {
2
- batchItemID: number | null;
3
- batchID: number | null;
4
- itemTypeName: string;
5
- itemID: number;
6
- languageCode: string;
7
- processedItemVersionID: number | null;
8
- itemTitle: string;
9
- itemNull: boolean;
10
- createdOn: string;
11
- createdBy: number;
12
- createdByName: string;
13
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BatchItem = void 0;
4
- var BatchItem = /** @class */ (function () {
5
- function BatchItem() {
6
- }
7
- return BatchItem;
8
- }());
9
- exports.BatchItem = BatchItem;
@@ -1,47 +0,0 @@
1
- import { ContentViewColumn } from "./contentViewColumn";
2
- export declare class Container {
3
- columns: ContentViewColumn[];
4
- contentViewID: number | null;
5
- contentDefinitionID: number | null;
6
- contentDefinitionName: string | null;
7
- referenceName: string | null;
8
- contentViewName: string | null;
9
- contentDefinitionType: number;
10
- requiresApproval: boolean | null;
11
- lastModifiedDate: string | null;
12
- lastModifiedOn: string | null;
13
- lastModifiedBy: string | null;
14
- isShared: boolean | null;
15
- isDynamicPageList: boolean | null;
16
- disablePublishFromList: boolean | null;
17
- contentViewCategoryID: number | null;
18
- contentViewCategoryReferenceName: string | null;
19
- contentViewCategoryName: string | null;
20
- title: string | null;
21
- defaultPage: string | null;
22
- isPublished: boolean | null;
23
- schemaTitle: string | null;
24
- allowClientSideSave: boolean | null;
25
- defaultSortColumn: string | null;
26
- defaultSortDirection: string | null;
27
- usageCount: number | null;
28
- isDeleted: boolean | null;
29
- enableRSSOutput: boolean | null;
30
- enableAPIOutput: boolean | null;
31
- commentsRecordTypeName: string | null;
32
- numRowsInListing: number | null;
33
- contentDefinitionTypeID: number | null;
34
- fullSyncModDate: string | null;
35
- confirmSharingOnPublish: boolean | null;
36
- contentTemplateName: string | null;
37
- currentUserCanDelete: boolean | null;
38
- currentUserCanEdit: boolean | null;
39
- currentUserCanDesign: boolean | null;
40
- currentUserCanManage: boolean | null;
41
- currentUserCanContribute: boolean | null;
42
- currentUserCanPublish: boolean | null;
43
- defaultListingPage: string | null;
44
- defaultDetailsPage: string | null;
45
- defaultDetailsPageQueryString: string;
46
- isListItem: boolean | null;
47
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Container = void 0;
4
- var Container = /** @class */ (function () {
5
- function Container() {
6
- }
7
- return Container;
8
- }());
9
- exports.Container = Container;
@@ -1,37 +0,0 @@
1
- export declare class ContentItem {
2
- contentID: number;
3
- properties: ContentItemProperties;
4
- fields: {
5
- [key: string]: any;
6
- };
7
- seo: SeoProperties | null;
8
- scripts: ContentScripts | null;
9
- }
10
- export declare class ContentItemProperties {
11
- state: number | null;
12
- modifiedBy: number | null;
13
- modified: string | null;
14
- pullDate: string | null;
15
- releaseDate: string | null;
16
- versionID: number | null;
17
- referenceName: string | null;
18
- definitionName: string | null;
19
- itemOrder: number | null;
20
- }
21
- export declare class SeoProperties {
22
- metaDescription: string | null;
23
- metaKeywords: string | null;
24
- metaHTML: string | null;
25
- menuVisible: boolean | null;
26
- sitemapVisible: boolean | null;
27
- }
28
- export declare class ContentScripts {
29
- top: string | null;
30
- bottom: string | null;
31
- }
32
- export declare class ContentList {
33
- recordOffset: number | null;
34
- totalCount: number | null;
35
- pageSize: number | null;
36
- items: any[] | null;
37
- }
@@ -1,33 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContentList = exports.ContentScripts = exports.SeoProperties = exports.ContentItemProperties = exports.ContentItem = void 0;
4
- var ContentItem = /** @class */ (function () {
5
- function ContentItem() {
6
- }
7
- return ContentItem;
8
- }());
9
- exports.ContentItem = ContentItem;
10
- var ContentItemProperties = /** @class */ (function () {
11
- function ContentItemProperties() {
12
- }
13
- return ContentItemProperties;
14
- }());
15
- exports.ContentItemProperties = ContentItemProperties;
16
- var SeoProperties = /** @class */ (function () {
17
- function SeoProperties() {
18
- }
19
- return SeoProperties;
20
- }());
21
- exports.SeoProperties = SeoProperties;
22
- var ContentScripts = /** @class */ (function () {
23
- function ContentScripts() {
24
- }
25
- return ContentScripts;
26
- }());
27
- exports.ContentScripts = ContentScripts;
28
- var ContentList = /** @class */ (function () {
29
- function ContentList() {
30
- }
31
- return ContentList;
32
- }());
33
- exports.ContentList = ContentList;
@@ -1,8 +0,0 @@
1
- export declare class ContentViewColumn {
2
- sortOrder: number | null;
3
- fieldName: string | null;
4
- label: string | null;
5
- isDefaultSort: boolean | null;
6
- sortDirection: string | null;
7
- typeName: string | null;
8
- }