payloadcms-import-export-plugin
Version:
A comprehensive Payload CMS plugin that enables seamless import and export of collection data with support for CSV and JSON formats, featuring advanced field mapping, duplicate handling, and batch processing capabilities.
32 lines (31 loc) • 785 B
TypeScript
import type { PayloadRequest, Sort, TypedUser, Where } from 'payload';
export type Export = {
collectionSlug: string;
/**
* If true, enables debug logging
*/
debug?: boolean;
drafts?: 'no' | 'yes';
exportsCollection: string;
fields?: string[];
format: 'csv' | 'json';
globals?: string[];
id: number | string;
locale?: string;
name: string;
slug: string;
sort: Sort;
user: string;
userCollection: string;
where?: Where;
};
export type CreateExportArgs = {
/**
* If true, stream the file instead of saving it
*/
download?: boolean;
input: Export;
req: PayloadRequest;
user?: TypedUser;
};
export declare const createExport: (args: CreateExportArgs) => Promise<Response | undefined>;