4466ba436b
## Description This PR ensures that the default prettier config is used for examples and templates. This config is compatible with `prettier@3` as well (upgrading prettier is bigger change that can be a future PR). ## Changes - Updated `.prettierrc.json` in root with `"trailingComma": "es5"` (will be needed upgrading to prettier@3) - Added `examples/.prettierrc.json` with default config (this will change every example) - Added `packages/create-next-app/templates/.prettierrc.json` with default config (this will change every template) ## Related - Fixes #54402 - Closes #54409
228 lines
5.7 KiB
TypeScript
228 lines
5.7 KiB
TypeScript
// Code generated by prismic-ts-codegen. DO NOT EDIT.
|
|
|
|
import type * as prismicT from "@prismicio/types";
|
|
import type * as prismic from "@prismicio/client";
|
|
|
|
type Simplify<T> = {
|
|
[KeyType in keyof T]: T[KeyType];
|
|
};
|
|
/** Content for Author documents */
|
|
interface AuthorDocumentData {
|
|
/**
|
|
* Name field in *Author*
|
|
*
|
|
* - **Field Type**: Title
|
|
* - **Placeholder**: Name of the author
|
|
* - **API ID Path**: author.name
|
|
* - **Tab**: Main
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/rich-text-title
|
|
*
|
|
*/
|
|
name: prismicT.TitleField;
|
|
/**
|
|
* Picture field in *Author*
|
|
*
|
|
* - **Field Type**: Image
|
|
* - **Placeholder**: *None*
|
|
* - **API ID Path**: author.picture
|
|
* - **Tab**: Main
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/image
|
|
*
|
|
*/
|
|
picture: prismicT.ImageField<never>;
|
|
}
|
|
/**
|
|
* Author document from Prismic
|
|
*
|
|
* - **API ID**: `author`
|
|
* - **Repeatable**: `true`
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/custom-types
|
|
*
|
|
* @typeParam Lang - Language API ID of the document.
|
|
*/
|
|
export type AuthorDocument<Lang extends string = string> =
|
|
prismicT.PrismicDocumentWithoutUID<
|
|
Simplify<AuthorDocumentData>,
|
|
"author",
|
|
Lang
|
|
>;
|
|
/** Content for Post documents */
|
|
interface PostDocumentData {
|
|
/**
|
|
* Title field in *Post*
|
|
*
|
|
* - **Field Type**: Title
|
|
* - **Placeholder**: Title of the post
|
|
* - **API ID Path**: post.title
|
|
* - **Tab**: Main
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/rich-text-title
|
|
*
|
|
*/
|
|
title: prismicT.TitleField;
|
|
/**
|
|
* Date field in *Post*
|
|
*
|
|
* - **Field Type**: Date
|
|
* - **Placeholder**: Date of publication
|
|
* - **API ID Path**: post.date
|
|
* - **Tab**: Main
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/date
|
|
*
|
|
*/
|
|
date: prismicT.DateField;
|
|
/**
|
|
* Author field in *Post*
|
|
*
|
|
* - **Field Type**: Content Relationship
|
|
* - **Placeholder**: *None*
|
|
* - **API ID Path**: post.author
|
|
* - **Tab**: Main
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/link-content-relationship
|
|
*
|
|
*/
|
|
author: prismicT.RelationField<"author">;
|
|
/**
|
|
* Excerpt field in *Post*
|
|
*
|
|
* - **Field Type**: Text
|
|
* - **Placeholder**: Short summary of the post
|
|
* - **API ID Path**: post.excerpt
|
|
* - **Tab**: Main
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/key-text
|
|
*
|
|
*/
|
|
excerpt: prismicT.KeyTextField;
|
|
/**
|
|
* Cover Image field in *Post*
|
|
*
|
|
* - **Field Type**: Image
|
|
* - **Placeholder**: *None*
|
|
* - **API ID Path**: post.cover_image
|
|
* - **Tab**: Main
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/image
|
|
*
|
|
*/
|
|
cover_image: prismicT.ImageField<never>;
|
|
/**
|
|
* Slice Zone field in *Post*
|
|
*
|
|
* - **Field Type**: Slice Zone
|
|
* - **Placeholder**: *None*
|
|
* - **API ID Path**: post.slices[]
|
|
* - **Tab**: Main
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/slices
|
|
*
|
|
*/
|
|
slices: prismicT.SliceZone<PostDocumentDataSlicesSlice>;
|
|
}
|
|
/**
|
|
* Slice for *Post → Slice Zone*
|
|
*
|
|
*/
|
|
type PostDocumentDataSlicesSlice = TextSlice | ImageSlice;
|
|
/**
|
|
* Post document from Prismic
|
|
*
|
|
* - **API ID**: `post`
|
|
* - **Repeatable**: `true`
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/custom-types
|
|
*
|
|
* @typeParam Lang - Language API ID of the document.
|
|
*/
|
|
export type PostDocument<Lang extends string = string> =
|
|
prismicT.PrismicDocumentWithUID<Simplify<PostDocumentData>, "post", Lang>;
|
|
export type AllDocumentTypes = AuthorDocument | PostDocument;
|
|
/**
|
|
* Primary content in Image → Primary
|
|
*
|
|
*/
|
|
interface ImageSliceDefaultPrimary {
|
|
/**
|
|
* Image field in *Image → Primary*
|
|
*
|
|
* - **Field Type**: Image
|
|
* - **Placeholder**: *None*
|
|
* - **API ID Path**: image.primary.image
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/image
|
|
*
|
|
*/
|
|
image: prismicT.ImageField<never>;
|
|
}
|
|
/**
|
|
* Default variation for Image Slice
|
|
*
|
|
* - **API ID**: `default`
|
|
* - **Description**: `Image`
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/reusing-slices
|
|
*
|
|
*/
|
|
export type ImageSliceDefault = prismicT.SharedSliceVariation<
|
|
"default",
|
|
Simplify<ImageSliceDefaultPrimary>,
|
|
never
|
|
>;
|
|
/**
|
|
* Slice variation for *Image*
|
|
*
|
|
*/
|
|
type ImageSliceVariation = ImageSliceDefault;
|
|
/**
|
|
* Image Shared Slice
|
|
*
|
|
* - **API ID**: `image`
|
|
* - **Description**: `Image`
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/reusing-slices
|
|
*
|
|
*/
|
|
export type ImageSlice = prismicT.SharedSlice<"image", ImageSliceVariation>;
|
|
/**
|
|
* Primary content in Text → Primary
|
|
*
|
|
*/
|
|
interface TextSliceDefaultPrimary {
|
|
/**
|
|
* Text field in *Text → Primary*
|
|
*
|
|
* - **Field Type**: Rich Text
|
|
* - **Placeholder**: Rich text with formatting
|
|
* - **API ID Path**: text.primary.text
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/rich-text-title
|
|
*
|
|
*/
|
|
text: prismicT.RichTextField;
|
|
}
|
|
/**
|
|
* Default variation for Text Slice
|
|
*
|
|
* - **API ID**: `default`
|
|
* - **Description**: `Text`
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/reusing-slices
|
|
*
|
|
*/
|
|
export type TextSliceDefault = prismicT.SharedSliceVariation<
|
|
"default",
|
|
Simplify<TextSliceDefaultPrimary>,
|
|
never
|
|
>;
|
|
/**
|
|
* Slice variation for *Text*
|
|
*
|
|
*/
|
|
type TextSliceVariation = TextSliceDefault;
|
|
/**
|
|
* Text Shared Slice
|
|
*
|
|
* - **API ID**: `text`
|
|
* - **Description**: `Text`
|
|
* - **Documentation**: https://prismic.io/docs/core-concepts/reusing-slices
|
|
*
|
|
*/
|
|
export type TextSlice = prismicT.SharedSlice<"text", TextSliceVariation>;
|
|
declare module "@prismicio/client" {
|
|
interface CreateClient {
|
|
(
|
|
repositoryNameOrEndpoint: string,
|
|
options?: prismic.ClientConfig,
|
|
): prismic.Client<AllDocumentTypes>;
|
|
}
|
|
}
|