gatsby-source-payload-cms
Version:
Source data from Payload CMS
27 lines (26 loc) • 887 B
TypeScript
import { type LocaleObject, type LocaleString } from "./types";
export type CollectionOptions = {
endpoint: string;
/** `type` is set on the returned entity for Gatsby to use when creating nodes. */
type: string;
/** If locales are set, return an array of entities each with an additional `locale` key. */
locales?: Array<LocaleString> | Array<LocaleObject>;
params?: {
[key: string]: unknown;
};
limit?: number;
imageSize?: string;
repopulate?: boolean;
};
export declare const fetchEntity: (query: CollectionOptions, context: any) => Promise<{
payloadImageSize: string;
locale: string;
id: unknown;
gatsbyNodeType: string;
}[]>;
export declare const fetchEntities: (query: CollectionOptions, context: any) => Promise<{
payloadImageSize: string;
locale: string;
id: unknown;
gatsbyNodeType: string;
}[]>;