UNPKG

@agility/management-sdk

Version:
40 lines (39 loc) 3.1 kB
import { Options } from "../models/options"; import { ClientInstance } from "./clientInstance"; import { ContentItem, ContentList } from "../models/contentItem"; import { BatchMethods } from "./batchMethods"; import { ContentListFilterModel } from "../models/contentListFilterModel"; import { ContentItemHistory } from "../models/contentItemHistory"; import { ItemComments } from "../models/itemComments"; import { ListParams } from "../models/listParams"; import { WorkflowOperationType } from "../enums/workflowOperationType"; export declare class ContentMethods { _options: Options; _clientInstance: ClientInstance; _batchMethods: BatchMethods; constructor(options: Options); getContentItem(contentID: number, guid: string, locale: string): Promise<ContentItem>; publishContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>; unPublishContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>; /** * Perform a batch workflow operation on multiple content items. * Supports Publish, Unpublish, Approve, Decline, and RequestApproval operations. * @param contentIDs Array of content IDs to process * @param guid The GUID of the user making the request * @param locale The locale of the content items * @param operation The workflow operation type (Publish, Unpublish, Approve, Decline, RequestApproval) * @param returnBatchId Whether to return the batch ID immediately * @returns The IDs of the processed content items */ batchWorkflowContent(contentIDs: number[], guid: string, locale: string, operation: WorkflowOperationType, returnBatchId?: boolean): Promise<number[]>; contentRequestApproval(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>; approveContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>; declineContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>; deleteContent(contentID: number, guid: string, locale: string, comments?: string, returnBatchId?: boolean): Promise<number[]>; saveContentItem(contentItem: ContentItem, guid: string, locale: string, returnBatchId?: boolean): Promise<number[]>; saveContentItems(contentItems: ContentItem[], guid: string, locale: string, returnBatchId?: boolean): Promise<number[]>; getContentItems(referenceName: string, guid: string, locale: string, listParams: ListParams): Promise<ContentList>; getContentList(referenceName: string, guid: string, locale: string, listParams: ListParams, filterObject?: ContentListFilterModel): Promise<ContentList>; getContentHistory(locale: string, guid: string, contentID: number, take?: number, skip?: number): Promise<ContentItemHistory>; getContentComments(locale: string, guid: string, contentID: number, take?: number, skip?: number): Promise<ItemComments>; }