Skip to content

Commit

Permalink
chore(sanity): generated types
Browse files Browse the repository at this point in the history
  • Loading branch information
scottrippey committed Jul 15, 2024
1 parent 2856051 commit 5af961d
Show file tree
Hide file tree
Showing 2 changed files with 2,455 additions and 0 deletions.
363 changes: 363 additions & 0 deletions packages/nextjs/sanity-studio/generated/sanity.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,363 @@
/**
* ---------------------------------------------------------------------------------
* This file has been generated by Sanity TypeGen.
* Command: `sanity typegen generate`
*
* Any modifications made directly to this file will be overwritten the next time
* the TypeScript definitions are generated. Please make changes to the Sanity
* schema definitions and/or GROQ queries if you need to update these types.
*
* For more information on how to use Sanity TypeGen, visit the official documentation:
* https://www.sanity.io/docs/sanity-typegen
* ---------------------------------------------------------------------------------
*/

// Source: schema.json
export type SanityImagePaletteSwatch = {
_type: "sanity.imagePaletteSwatch";
background?: string;
foreground?: string;
population?: number;
title?: string;
};

export type SanityImagePalette = {
_type: "sanity.imagePalette";
darkMuted?: SanityImagePaletteSwatch;
lightVibrant?: SanityImagePaletteSwatch;
darkVibrant?: SanityImagePaletteSwatch;
vibrant?: SanityImagePaletteSwatch;
dominant?: SanityImagePaletteSwatch;
lightMuted?: SanityImagePaletteSwatch;
muted?: SanityImagePaletteSwatch;
};

export type SanityImageDimensions = {
_type: "sanity.imageDimensions";
height?: number;
width?: number;
aspectRatio?: number;
};

export type SanityFileAsset = {
_id: string;
_type: "sanity.fileAsset";
_createdAt: string;
_updatedAt: string;
_rev: string;
originalFilename?: string;
label?: string;
title?: string;
description?: string;
altText?: string;
sha1hash?: string;
extension?: string;
mimeType?: string;
size?: number;
assetId?: string;
uploadId?: string;
path?: string;
url?: string;
source?: SanityAssetSourceData;
};

export type Geopoint = {
_type: "geopoint";
lat?: number;
lng?: number;
alt?: number;
};

export type Variant = {
_id: string;
_type: "variant";
_createdAt: string;
_updatedAt: string;
_rev: string;
name?: string;
slug?: Slug;
description?: Array<{
children?: Array<{
marks?: Array<string>;
text?: string;
_type: "span";
_key: string;
}>;
style?: "normal" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "blockquote";
listItem?: "bullet" | "number";
markDefs?: Array<{
href?: string;
_type: "link";
_key: string;
}>;
level?: number;
_type: "block";
_key: string;
}>;
id?: string;
msrp?: number;
price?: number;
images?: Array<{
asset?: {
_ref: string;
_type: "reference";
_weak?: boolean;
[internalGroqTypeReferenceTo]?: "sanity.imageAsset";
};
hotspot?: SanityImageHotspot;
crop?: SanityImageCrop;
name?: string;
description?: string;
_type: "productImage";
_key: string;
}>;
flavour?: Array<{
_ref: string;
_type: "reference";
_weak?: boolean;
_key: string;
[internalGroqTypeReferenceTo]?: "flavour";
}>;
style?: Array<{
_ref: string;
_type: "reference";
_weak?: boolean;
_key: string;
[internalGroqTypeReferenceTo]?: "style";
}>;
};

export type Style = {
_id: string;
_type: "style";
_createdAt: string;
_updatedAt: string;
_rev: string;
name?: string;
slug?: Slug;
};

export type SiteSettings = {
_id: string;
_type: "siteSettings";
_createdAt: string;
_updatedAt: string;
_rev: string;
title?: string;
description?: string;
};

export type ProductImage = {
_type: "productImage";
asset?: {
_ref: string;
_type: "reference";
_weak?: boolean;
[internalGroqTypeReferenceTo]?: "sanity.imageAsset";
};
hotspot?: SanityImageHotspot;
crop?: SanityImageCrop;
name?: string;
description?: string;
};

export type Product = {
_id: string;
_type: "product";
_createdAt: string;
_updatedAt: string;
_rev: string;
name?: string;
description?: Array<{
children?: Array<{
marks?: Array<string>;
text?: string;
_type: "span";
_key: string;
}>;
style?: "normal" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "blockquote";
listItem?: "bullet" | "number";
markDefs?: Array<{
href?: string;
_type: "link";
_key: string;
}>;
level?: number;
_type: "block";
_key: string;
}>;
slug?: Slug;
categories?: Array<{
_ref: string;
_type: "reference";
_weak?: boolean;
_key: string;
[internalGroqTypeReferenceTo]?: "category";
}>;
images?: Array<
{
_key: string;
} & ProductImage
>;
variants?: Array<{
_ref: string;
_type: "reference";
_weak?: boolean;
_key: string;
[internalGroqTypeReferenceTo]?: "variant";
}>;
};

export type Flavour = {
_id: string;
_type: "flavour";
_createdAt: string;
_updatedAt: string;
_rev: string;
name?: string;
slug?: Slug;
};

export type Description = Array<{
children?: Array<{
marks?: Array<string>;
text?: string;
_type: "span";
_key: string;
}>;
style?: "normal" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "blockquote";
listItem?: "bullet" | "number";
markDefs?: Array<{
href?: string;
_type: "link";
_key: string;
}>;
level?: number;
_type: "block";
_key: string;
}>;

export type CategoryImage = {
_id: string;
_type: "categoryImage";
_createdAt: string;
_updatedAt: string;
_rev: string;
name?: string;
description?: string;
images?: {
asset?: {
_ref: string;
_type: "reference";
_weak?: boolean;
[internalGroqTypeReferenceTo]?: "sanity.imageAsset";
};
hotspot?: SanityImageHotspot;
crop?: SanityImageCrop;
_type: "image";
};
};

export type SanityImageCrop = {
_type: "sanity.imageCrop";
top?: number;
bottom?: number;
left?: number;
right?: number;
};

export type SanityImageHotspot = {
_type: "sanity.imageHotspot";
x?: number;
y?: number;
height?: number;
width?: number;
};

export type SanityImageAsset = {
_id: string;
_type: "sanity.imageAsset";
_createdAt: string;
_updatedAt: string;
_rev: string;
originalFilename?: string;
label?: string;
title?: string;
description?: string;
altText?: string;
sha1hash?: string;
extension?: string;
mimeType?: string;
size?: number;
assetId?: string;
uploadId?: string;
path?: string;
url?: string;
metadata?: SanityImageMetadata;
source?: SanityAssetSourceData;
};

export type SanityAssetSourceData = {
_type: "sanity.assetSourceData";
name?: string;
id?: string;
url?: string;
};

export type SanityImageMetadata = {
_type: "sanity.imageMetadata";
location?: Geopoint;
dimensions?: SanityImageDimensions;
palette?: SanityImagePalette;
lqip?: string;
blurHash?: string;
hasAlpha?: boolean;
isOpaque?: boolean;
};

export type Category = {
_id: string;
_type: "category";
_createdAt: string;
_updatedAt: string;
_rev: string;
name?: string;
description?: string;
slug?: Slug;
images?: Array<{
_ref: string;
_type: "reference";
_weak?: boolean;
_key: string;
[internalGroqTypeReferenceTo]?: "categoryImage";
}>;
};

export type Slug = {
_type: "slug";
current?: string;
source?: string;
};

export type AllSanitySchemaTypes =
| SanityImagePaletteSwatch
| SanityImagePalette
| SanityImageDimensions
| SanityFileAsset
| Geopoint
| Variant
| Style
| SiteSettings
| ProductImage
| Product
| Flavour
| Description
| CategoryImage
| SanityImageCrop
| SanityImageHotspot
| SanityImageAsset
| SanityAssetSourceData
| SanityImageMetadata
| Category
| Slug;
export declare const internalGroqTypeReferenceTo: unique symbol;
Loading

0 comments on commit 5af961d

Please sign in to comment.