UNPKG

dc-management-sdk-js

Version:
160 lines (159 loc) 4.93 kB
import { Pageable, Sortable } from '../..'; import { HalResource } from '../hal/models/HalResource'; import { EditionSlot } from './EditionSlot'; import { EditionSlotRequest } from './EditionSlotRequest'; import { Event } from './Event'; import { Page } from './Page'; import { PublishingStatus } from './PublishingStatus'; /** * Interface representing a projected [Event](https://amplience.com/docs/api/dynamic-content/management/#resources-events) resource. * An Event represents a major date in the calendar, such as Christmas or Black Friday. An Event may span multiple days and start and end at any given UTC time. */ interface ProjectedEvent { /** * Unique id generated on creation */ id?: string; /** * Friendly name for the event */ name?: string; /** * Textual comment to describe the event */ comment?: string; /** * Date when the event should begin in ISO 8601 format */ start?: string; /** * Date when the event should end in ISO 8601 format */ end?: string; /** * Hyperlink to a document describing the requirements for the Event */ brief?: string; } /** * Class representing the [Edition](https://amplience.com/docs/api/dynamic-content/management/#tag/Editions) resource. * An Edition is the main way of scheduling content to be published on a specific date. * It holds the association between slots and content items. Once all slots are valid and * there are no conflicts, it is ready to be scheduled. */ export declare class Edition extends HalResource { /** * Unique id generated on creation */ id?: string; /** * Friendly name for the edition */ name?: string; /** * Textual comment to describe the edition */ comment?: string; /** * Date when the edition should begin in ISO 8601 format */ start?: string; /** * Date when the edition should end in ISO 8601 format */ end?: string; /** * Boolean flag indicating if the content should become invalid after the end date. * This does not cause the content to become unpublished but instead acts as a flag * for your application to decide if the content should be displayed after the end date. */ activeEndDate?: boolean; /** * Id of the event the edition is associated with. */ eventId?: string; /** * Current publishing status of the edition */ publishingStatus?: PublishingStatus; /** * Id of the job responsible for publishing the content in this edition. * This will be <tt>undefined</tt> if the edition is in a state * where a publish is yet to occur. */ publishingJobId?: string; /** * Id of the publish manifest generated when the edition was scheduled. * This will be <tt>undefined</tt> if the edition is in a state * where a schedule is yet to occur. */ publishManifestId?: string; /** * Id of the user responsible for originally creating the edition */ createdBy?: string; /** * Timestamp representing when the edition was originally created in ISO 8601 format */ createdDate?: string; /** * Id of the user responsible for the last update to the edition */ lastModifiedBy?: string; /** * Timestamp representing when the edition was last updated in ISO 8601 format */ lastModifiedDate?: string; /** * Projected event */ event?: ProjectedEvent; /** * Resources and actions related to an Edition */ readonly related: { /** * Archive Edition */ archive: () => Promise<Edition>; /** * Delete Edition */ delete: () => Promise<void>; /** * Retrieves the Event associated with this Edition */ event: () => Promise<Event>; slots: { /** * Retrieves a list of slots associated with this Edition * @param options Pagination options */ list: (options?: Pageable & Sortable) => Promise<Page<EditionSlot>>; /** * Creates new edition slots from a list of content IDs */ create: (slots: EditionSlotRequest[]) => Promise<Page<EditionSlot>>; }; /** * Schedule Edition */ schedule: (ignoreWarnings?: boolean, lastModifiedDate?: string) => Promise<void>; /** * Unschedule Edition */ unschedule: () => Promise<void>; /** * Updates this Edition with the changes in the mutation parameter. * @param mutation Mutated edition */ update: (mutation: Edition) => Promise<Edition>; }; } /** * @hidden */ export declare class EditionsPage extends Page<Edition> { constructor(data?: any); } export {};