@agility/management-sdk 0.1.34 → 0.1.35
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.
|
@@ -36,10 +36,10 @@ export declare class PageMethods {
|
|
|
36
36
|
* @param returnBatchId Whether to return the batch ID immediately
|
|
37
37
|
* @param pageIDInOtherLocale The ID of the page in the other locale if you need to link it up.
|
|
38
38
|
* @param otherLocale The other locale to link the page to.
|
|
39
|
-
* @param
|
|
39
|
+
* @param linkExistingComponents Whether to link existing components to the page. If not set, the page save will create new components for each content zone.
|
|
40
40
|
* @returns The IDs of the created or updated pages
|
|
41
41
|
*/
|
|
42
|
-
savePage(pageItem: PageItem, guid: string, locale: string, parentPageID?: number, placeBeforePageItemID?: number, returnBatchId?: boolean, pageIDInOtherLocale?: number, otherLocale?: string,
|
|
42
|
+
savePage(pageItem: PageItem, guid: string, locale: string, parentPageID?: number, placeBeforePageItemID?: number, returnBatchId?: boolean, pageIDInOtherLocale?: number, otherLocale?: string, linkExistingComponents?: boolean): Promise<number[]>;
|
|
43
43
|
getPageHistory(locale: string, guid: string, pageID: number, take?: number, skip?: number): Promise<PageHistory>;
|
|
44
44
|
getPageComments(locale: string, guid: string, pageID: number, take?: number, skip?: number): Promise<ItemComments>;
|
|
45
45
|
}
|
|
@@ -447,11 +447,11 @@ var PageMethods = /** @class */ (function () {
|
|
|
447
447
|
* @param returnBatchId Whether to return the batch ID immediately
|
|
448
448
|
* @param pageIDInOtherLocale The ID of the page in the other locale if you need to link it up.
|
|
449
449
|
* @param otherLocale The other locale to link the page to.
|
|
450
|
-
* @param
|
|
450
|
+
* @param linkExistingComponents Whether to link existing components to the page. If not set, the page save will create new components for each content zone.
|
|
451
451
|
* @returns The IDs of the created or updated pages
|
|
452
452
|
*/
|
|
453
453
|
PageMethods.prototype.savePage = function (pageItem_1, guid_1, locale_1) {
|
|
454
|
-
return __awaiter(this, arguments, void 0, function (pageItem, guid, locale, parentPageID, placeBeforePageItemID, returnBatchId, pageIDInOtherLocale, otherLocale,
|
|
454
|
+
return __awaiter(this, arguments, void 0, function (pageItem, guid, locale, parentPageID, placeBeforePageItemID, returnBatchId, pageIDInOtherLocale, otherLocale, linkExistingComponents) {
|
|
455
455
|
var apiPath, resp, batchID_7, batch, pageIDs_7, err_15;
|
|
456
456
|
var _this = this;
|
|
457
457
|
if (parentPageID === void 0) { parentPageID = -1; }
|
|
@@ -459,7 +459,7 @@ var PageMethods = /** @class */ (function () {
|
|
|
459
459
|
if (returnBatchId === void 0) { returnBatchId = false; }
|
|
460
460
|
if (pageIDInOtherLocale === void 0) { pageIDInOtherLocale = -1; }
|
|
461
461
|
if (otherLocale === void 0) { otherLocale = null; }
|
|
462
|
-
if (
|
|
462
|
+
if (linkExistingComponents === void 0) { linkExistingComponents = false; }
|
|
463
463
|
return __generator(this, function (_a) {
|
|
464
464
|
switch (_a.label) {
|
|
465
465
|
case 0:
|
|
@@ -470,8 +470,8 @@ var PageMethods = /** @class */ (function () {
|
|
|
470
470
|
apiPath += "&pageIDInOtherLocale=".concat(pageIDInOtherLocale, "&otherLocale=").concat(otherLocale);
|
|
471
471
|
}
|
|
472
472
|
// if not set, the page save will create new components for each content zone.
|
|
473
|
-
if (
|
|
474
|
-
apiPath += "&
|
|
473
|
+
if (linkExistingComponents) {
|
|
474
|
+
apiPath += "&linkExistingComponents=true";
|
|
475
475
|
}
|
|
476
476
|
return [4 /*yield*/, this._clientInstance.executePost(apiPath, guid, this._options.token, pageItem)];
|
|
477
477
|
case 1:
|