@prismicio/types
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -0,0 +0,0 @@ declare enum LinkType { |
@@ -1,4 +0,2 @@ | ||
declare type EmptyObjectField = { | ||
[key: string]: never; | ||
}; | ||
declare type EmptyObjectField = Record<string, never>; | ||
interface RichTextSpan { | ||
@@ -17,3 +15,3 @@ start: number; | ||
declare type RichTextField = RichTextBlock[]; | ||
interface ImageField { | ||
interface ImageField extends Record<string, unknown> { | ||
dimensions: { | ||
@@ -26,3 +24,2 @@ width: number; | ||
url: string | null; | ||
[key: string]: unknown; | ||
} | ||
@@ -99,12 +96,4 @@ declare enum LinkType { | ||
declare type AnyRegularField = TitleField | RichTextField | ImageField | RelationField | LinkField | LinkToMediaField | DateField | TimestampField | ColorField | NumberField | KeyTextField | SelectField | BooleanField | EmbedField | GeoPointField; | ||
declare type GroupField = AnyRegularField[]; | ||
interface Slice<SliceType = string, PrimaryFields extends { | ||
[key: string]: AnyRegularField; | ||
} = { | ||
[key: string]: AnyRegularField; | ||
}, ItemsFields extends { | ||
[key: string]: AnyRegularField; | ||
} = { | ||
[key: string]: AnyRegularField; | ||
}> { | ||
declare type GroupField<Fields extends Record<string, AnyRegularField> = Record<string, AnyRegularField>> = Fields[]; | ||
interface Slice<SliceType = string, PrimaryFields extends Record<string, AnyRegularField> = Record<string, AnyRegularField>, ItemsFields extends Record<string, AnyRegularField> = Record<string, AnyRegularField>> { | ||
slice_type: SliceType; | ||
@@ -137,5 +126,3 @@ slice_label: string | null; | ||
} | ||
interface PrismicDocument<DataInterface = { | ||
[key: string]: AnyRegularField | GroupField | SliceZone; | ||
}, TypeEnum = string, LangEnum = string> extends PrismicDocumentHeader<TypeEnum, LangEnum> { | ||
interface PrismicDocument<DataInterface = Record<string, AnyRegularField | GroupField | SliceZone>, TypeEnum = string, LangEnum = string> extends PrismicDocumentHeader<TypeEnum, LangEnum> { | ||
data: DataInterface; | ||
@@ -142,0 +129,0 @@ } |
{ | ||
"name": "@prismicio/types", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Type definitions for Prismic related structure", | ||
@@ -18,13 +18,14 @@ "keywords": [ | ||
"author": "Prismic <contact@prismic.io> (https://prismic.io)", | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.js", | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.es.js" | ||
}, | ||
"./graphql": { | ||
"require": "./dist/graphql/index.js", | ||
"require": "./dist/graphql/index.cjs", | ||
"import": "./dist/graphql/index.es.js" | ||
}, | ||
"./dist/graphql": { | ||
"require": "./dist/graphql/index.js", | ||
"require": "./dist/graphql/index.cjs", | ||
"import": "./dist/graphql/index.es.js" | ||
@@ -34,3 +35,3 @@ }, | ||
}, | ||
"main": "dist/index.js", | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.es.js", | ||
@@ -37,0 +38,0 @@ "types": "dist/index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
24755
9
193
1