import { ContentId } from './Content'; import { AuthorResponse } from './Author'; /** * The unpublish request unique id */ export type UnpublishRequestId = number; /** * This type represent the data needed to make an unpublish content API request */ export type UnpublishContentRequest = { /** * The content id to unpublish. Every staged locale of the content is unpublished */ contentId: number; }; /** * This type represent the response of an unpublish content API request */ export type UnpublishContentResponse = { /** * The staged content version that has been removed. * Undefined when nothing was staged, meaning the request was a no-op */ contentVersion?: number; /** * The content locales whose staged content has actually been removed or reverted to its live version */ locales: string[]; /** * The number of release items dropped from the non archived releases containing the content */ removedReleaseItems: number; }; /** * This type represent the data needed to make a list unpublish requests API request */ export type ListUnpublishRequestsRequest = { /** * The content id to list the unpublish requests of */ contentId: number; /** * The content version to list the unpublish requests of. * When omitted the whole unpublish history of the content is returned */ contentVersion?: number; }; /** * This type represent the model of an unpublish request, the audit record of a content * having been unpublished. It is written after the unpublish has been applied, so it always * describes a completed unpublish */ export type UnpublishRequestResponse = { /** * The unpublish request unique id */ id: UnpublishRequestId; /** * The author that unpublished the content */ author: AuthorResponse; /** * The unique id of the unpublished content */ contentId: ContentId; /** * The unpublished content version */ contentVersion: number; /** * The content locales that have been unpublished */ locales: string[]; /** * The date the content has been unpublished, as opposed to [[createdDate]] * which is the date this audit record has been written */ unpublishedDate: Date; /** * The unpublish request creation date */ createdDate: Date; /** * The unpublish request last modified date */ lastModifiedDate: Date; }; /** * This type represent the response of a list unpublish requests API request, sorted by * [[UnpublishRequestResponse.unpublishedDate]] descending. * Only the [[MAX_LISTED_UNPUBLISH_REQUESTS]] most recent unpublish requests are returned */ export type ListUnpublishRequestsResponse = UnpublishRequestResponse[]; /** * The maximum number of unpublish requests returned by a list unpublish requests API request */ export const MAX_LISTED_UNPUBLISH_REQUESTS = 5;