import { ContentId } from './Content'; import { AuthorResponse } from './Author'; /** * The publishing request unique id */ export type PublishingRequestId = number; /** * This enum represent the available publishing request status */ export declare enum PublishingStatus { QUEUED = "queued", PROCESSING = "processing", PUBLISHED = "published", FAILED = "failed" } /** * This type represent the data needed to make a publishing request API request */ export type PublishingRequestRequest = { /** * The content id to publish to stage */ contentId: number; /** * The content version to publish to stage */ contentVersion: number; }; /** * This type represent the data needed to make a list publishing request API request */ export type ListPublishingRequestsRequest = PublishingRequestRequest; /** * This type represent the data needed to make a create publishing request API request */ export type CreatePublishingRequestRequest = PublishingRequestRequest; /** * This type represent the model of a publishing request */ export type PublishingRequestResponse = { /** * The publishing request unique id */ id: PublishingRequestId; /** * The author of the publishing request */ author: AuthorResponse; /** * The unique content id to publish */ contentId: ContentId; /** * The content offline date */ contentOfflineDate: Date; /** * The content online date */ contentOnlineDate: Date; /** * The content payload */ contentPayload: object; /** * The content public id */ contentPublicId: string; /** * The content version */ contentVersion: number; /** * The content author */ contentAuthor: AuthorResponse; /** * The content related tags */ contentTags: string[]; /** * The publishing channels where the content will be published */ contentChannels: string[]; /** * The content definition mnemonic id related to the content */ contentDefinitionMnemonicId: string; /** * The content latest modifier */ contentLatestContributor: AuthorResponse; /** * The content creation date */ contentCreatedDate: Date; /** * The content last modified date */ contentLastModifiedDate: Date; /** * The publishing request status */ status: PublishingStatus; /** * The publishing request creation date */ createdDate: Date; /** * The publishing request last modified date */ lastModifiedDate: Date; }; /** * This type represent the response of a list publishing request API request */ export type ListPublishingRequestsResponse = PublishingRequestResponse[]; /** * This type represent the response of a create publishing request API request */ export type CreatePublishingRequestResponse = PublishingRequestResponse; /** * The maximum number of items that can be sent in a single bulk publishing request */ export declare const MAX_BULK_PUBLISHING_REQUESTS = 50; /** * This type represent a single item of a bulk publishing request */ export type BulkPublishingRequestItem = PublishingRequestRequest; /** * This type represent the data needed to make a bulk create publishing request API request */ export type CreateBulkPublishingRequestRequest = { /** * The list of contents (and their version) to create a publishing request for. * Must contain between 1 and [[MAX_BULK_PUBLISHING_REQUESTS]] items. * Duplicate content id / version pairs are deduplicated server-side. */ requests: BulkPublishingRequestItem[]; }; /** * This enum represent the outcome of a single item within a bulk publishing request */ export declare enum BulkPublishingRequestStatus { ACCEPTED = "accepted", FAILED = "failed" } /** * This type represent the error attached to a failed bulk publishing request item */ export type BulkPublishingRequestError = { /** * The error type discriminator */ type: string; /** * The human readable error message */ message: string; }; /** * This type represent the outcome of a single item within a bulk publishing request */ export type BulkPublishingRequestResult = { /** * The content id the result refers to */ contentId: number; /** * The content version the result refers to */ contentVersion: number; /** * Whether the publishing request for this item was accepted or failed */ status: BulkPublishingRequestStatus; /** * The created publishing request unique id, present only when [[status]] is `accepted` */ publishingRequestId?: PublishingRequestId; /** * The error describing why the item failed, present only when [[status]] is `failed` */ error?: BulkPublishingRequestError; }; /** * This type represent the response of a bulk create publishing request API request */ export type CreateBulkPublishingRequestResponse = BulkPublishingRequestResult[];