@agility/management-sdk
Version:
Agility CMS Tyescript SDK for Management API.
45 lines (44 loc) • 3.25 kB
TypeScript
import { Options } from "../models/options";
import { ClientInstance } from "./clientInstance";
import { PageItem } from "../models/pageItem";
import { Sitemap } from "../models/sitemap";
import { BatchMethods } from "./batchMethods";
import { PageModel } from "../models/pageModel";
import { ContentSectionDefinition } from "../models/contentSectionDefinition";
import { PageHistory } from "../models/pageHistory";
import { ItemComments } from "../models/itemComments";
export declare class PageMethods {
_options: Options;
_clientInstance: ClientInstance;
_batchMethods: BatchMethods;
constructor(options: Options);
getSitemap(guid: string, locale: string): Promise<Sitemap[]>;
getPageTemplates(guid: string, locale: string, includeModuleZones: boolean, searchFilter?: string): Promise<PageModel[]>;
getPageTemplate(guid: string, locale: string, pageTemplateId: number): Promise<PageModel>;
getPageTemplateName(guid: string, locale: string, templateName: string): Promise<PageModel>;
deletePageTemplate(guid: string, locale: string, pageTemplateId: number): Promise<string>;
getPageItemTemplates(guid: string, locale: string, id: number): Promise<ContentSectionDefinition[]>;
savePageTemplate(guid: string, locale: string, pageModel: PageModel): Promise<PageModel>;
getPage(pageID: number, guid: string, locale: string): Promise<PageItem>;
publishPage(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
unPublishPage(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
pageRequestApproval(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
approvePage(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
declinePage(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
deletePage(pageID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>;
/**
* Save a new page or update an existing page.
* @param pageItem The PageItem to save
* @param guid The GUID of the user making the request
* @param locale The locale of the page
* @param parentPageID The ID of the parent page
* @param placeBeforePageItemID The ID of the page item to place this page before
* @param returnBatchId Whether to return the batch ID immediately
* @param pageIDInOtherLocale The ID of the page in the other locale if you need to link it up.
* @param otherLocale The other locale to link the page to.
* @returns The IDs of the created or updated pages
*/
savePage(pageItem: PageItem, guid: string, locale: string, parentPageID?: number, placeBeforePageItemID?: number, returnBatchId?: boolean, pageIDInOtherLocale?: number, otherLocale?: string): Promise<number[]>;
getPageHistory(locale: string, guid: string, pageID: number, take?: number, skip?: number): Promise<PageHistory>;
getPageComments(locale: string, guid: string, pageID: number, take?: number, skip?: number): Promise<ItemComments>;
}