UNPKG

@favdevs/payload-ai

Version:

<p align="center"> <img alt="Payload AI Plugin" src="assets/payload-ai-intro.gif" width="100%" /> </p>

14 lines (13 loc) 746 B
import type { ClientCollectionConfig, CollectionConfig, Field } from 'payload'; type AnyCollectionConfig = ClientCollectionConfig | CollectionConfig; /** * Resolve a Payload field definition by a full schemaPath like: * "{collectionSlug}.fieldA.subFieldB.blockSlug.innerField" * * Notes: * - Tabs are a UI construct and are not part of schemaPath (fields inside tabs are at the same level). * - Blocks include the block slug as part of the path (we must consume it between the block field and its inner fields). * - Rows are skipped by this plugin&#39;s schema path mapping; support added defensively. */ export declare const getFieldBySchemaPath: (collectionConfig: AnyCollectionConfig, schemaPath: string) => Field | null; export {};