@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
2 lines • 2.65 kB
JavaScript
import e from"./media.mjs";import t from"./index.mjs";const n=t=>t.id?{id:t.id,email:t.email??null,username:t.username??null,firstName:t.firstName??null,lastName:t.lastName??null,profilePicture:e.formatProfilePicture({poster:t.profilePicture?.[0],host:t.host})}:null,r=r=>({id:r.operation.id,collectionKey:r.operation.collection_key,documentId:r.operation.document_id,documentLabel:r.documentLabel??null,target:r.operation.target,operationType:r.operation.operation_type,status:r.operation.status,executionStatus:r.operation.execution_status,sourceVersionId:r.operation.source_version_id,sourceContentId:r.operation.source_content_id,snapshotVersionId:r.operation.snapshot_version_id,isOutdated:r.latestContentId!==void 0&&r.latestContentId!==null&&r.latestContentId!==r.operation.source_content_id,requestedBy:n({id:r.operation.requested_by,email:r.operation.requested_by_email,username:r.operation.requested_by_username,firstName:r.operation.requested_by_first_name,lastName:r.operation.requested_by_last_name,profilePicture:r.operation.requested_by_profile_picture,host:r.host}),requestComment:r.operation.request_comment,decidedBy:n({id:r.operation.decided_by,email:r.operation.decided_by_email,username:r.operation.decided_by_username,firstName:r.operation.decided_by_first_name,lastName:r.operation.decided_by_last_name,profilePicture:r.operation.decided_by_profile_picture,host:r.host}),decisionComment:r.operation.decision_comment,decidedAt:t.formatDate(r.operation.decided_at),scheduledAt:t.formatDate(r.operation.scheduled_at),scheduledTimezone:r.operation.scheduled_timezone,executedAt:t.formatDate(r.operation.executed_at),failedAt:t.formatDate(r.operation.failed_at),executionErrorMessage:r.operation.execution_error_message,executionErrorData:r.operation.execution_error_data,scheduledJobId:r.operation.scheduled_job_id,createdAt:t.formatDate(r.operation.created_at),updatedAt:t.formatDate(r.operation.updated_at),permissions:r.permissions??{review:!1,cancel:!1,reschedule:!1,retry:!1,updateReviewers:!1},assignees:(r.operation.assignees??[]).map(n=>({id:n.id,user:{id:n.user_id,email:n.email??null,username:n.username??null,firstName:n.first_name??null,lastName:n.last_name??null,profilePicture:e.formatProfilePicture({poster:n.profile_picture?.[0],host:r.host})},assignedBy:n.assigned_by,assignedAt:t.formatDate(n.assigned_at)})),events:(r.operation.events??[]).map(e=>({id:e.id,type:e.event_type,userId:e.user_id,comment:e.comment,metadata:e.metadata,createdAt:t.formatDate(e.created_at)}))});var i={formatMultiple:e=>e.operations.map(e=>r(e)),formatSingle:r};export{i as default};
//# sourceMappingURL=document-publish-operations.mjs.map