Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
14 lines
741 B
Plaintext
14 lines
741 B
Plaintext
import type { PaginatedDocs, PayloadRequest, SanitizedCollectionConfig } from 'payload';
|
|
/**
|
|
* Enriches list view documents with correct draft status display.
|
|
* When draft=true is used in the query, Payload returns the latest draft version if it exists.
|
|
* This function checks if draft documents also have a published version to determine "changed" status.
|
|
*
|
|
* Performance: Uses a single query to find all documents with "changed" status instead of N queries.
|
|
*/
|
|
export declare function enrichDocsWithVersionStatus({ collectionConfig, data, req, }: {
|
|
collectionConfig: SanitizedCollectionConfig;
|
|
data: PaginatedDocs;
|
|
req: PayloadRequest;
|
|
}): Promise<PaginatedDocs>;
|
|
//# sourceMappingURL=enrichDocsWithVersionStatus.d.ts.map |