UNPKG

@r1tsu/payload

Version:

21 lines 921 B
import type { GeneratedTypes } from '../../..//index.js'; import type { Payload } from '../../../index.js'; import type { Document, PayloadRequestWithData, RequestContext } from '../../../types/index.js'; export type Options<TSlug extends keyof GeneratedTypes['collections']> = { collection: TSlug; /** * context, which will then be passed to req.context, which can be read by hooks */ context?: RequestContext; depth?: number; draft?: boolean; fallbackLocale?: GeneratedTypes['locale']; id: number | string; locale?: GeneratedTypes['locale']; overrideAccess?: boolean; req?: PayloadRequestWithData; showHiddenFields?: boolean; user?: Document; }; export declare function duplicate<TSlug extends keyof GeneratedTypes['collections']>(payload: Payload, options: Options<TSlug>): Promise<GeneratedTypes['collections'][TSlug]>; //# sourceMappingURL=duplicate.d.ts.map