tinacms
Version:
> The Fastest Way to Edit Next.js Content
39 lines (38 loc) • 1.68 kB
TypeScript
/// <reference types="react" />
import { useDocumentCreatorPlugin } from './hooks/use-content-creator';
import { TinaCMSProviderDefaultProps } from './types/cms';
/**
* @deprecated since version 1.0.
* Tina no longer requires wrapping your site in the TinaProvider
* See https://tina.io/blog/upgrading-to-iframe/ for full migration details
*/
export declare const TinaCMSProvider2: ({ query, documentCreatorCallback, formifyCallback, schema, ...props }: TinaCMSProviderDefaultProps) => JSX.Element;
export declare type DocumentCreatorCallback = Parameters<typeof useDocumentCreatorPlugin>[0];
/**
* @deprecated v0.62.0: Use `staticRequest` and a "try catch" block instead. see https://tina.io/docs/features/data-fetching/#querying-tina-content-in-nextjs for more details
*
* A convenience function which makes a GraphQL request
* to a local GraphQL server and ensures the response fits
* the shape expected by Tina context in your application
*/
export declare const getStaticPropsForTina: ({ query, variables, }: {
query: string;
variables?: object;
}) => Promise<any>;
/**
* A convenience function which makes a GraphQL request
* to a local GraphQL server. Only recommended for functions
* which run at build-time like `getStaticProps` or `getStaticPaths`
*/
export declare const staticRequest: ({ query, variables, }: {
/** A GraphQL request string */
query: string;
/** GraphQL variables */
variables?: object;
}) => Promise<unknown>;
/**
* A passthru function which allows editors
* to know the temlpate string is a GraphQL
* query or muation
*/
export declare function gql(strings: TemplateStringsArray, ...args: string[]): string;