@prismicio/client 7.7.3 → 7.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.ts +1 -1
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.cjs.map +1 -1
- package/dist/cookie.js.map +1 -1
- package/dist/createClient.cjs +31 -31
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.ts +35 -35
- package/dist/createClient.js +31 -31
- package/dist/createClient.js.map +1 -1
- package/dist/errors/ForbiddenError.cjs.map +1 -1
- package/dist/errors/ForbiddenError.js.map +1 -1
- package/dist/errors/NotFoundError.cjs.map +1 -1
- package/dist/errors/NotFoundError.js.map +1 -1
- package/dist/errors/ParsingError.cjs.map +1 -1
- package/dist/errors/ParsingError.js.map +1 -1
- package/dist/errors/PreviewTokenExpired.cjs.map +1 -1
- package/dist/errors/PreviewTokenExpired.js.map +1 -1
- package/dist/errors/PrismicError.cjs.map +1 -1
- package/dist/errors/PrismicError.js.map +1 -1
- package/dist/errors/PrismicRichTextSerializerError.cjs.map +1 -1
- package/dist/errors/PrismicRichTextSerializerError.js.map +1 -1
- package/dist/errors/RefExpiredError.cjs.map +1 -1
- package/dist/errors/RefExpiredError.js.map +1 -1
- package/dist/errors/RefNotFoundError.cjs.map +1 -1
- package/dist/errors/RefNotFoundError.js.map +1 -1
- package/dist/errors/RepositoryNotFoundError.cjs.map +1 -1
- package/dist/errors/RepositoryNotFoundError.js.map +1 -1
- package/dist/filter.cjs.map +1 -1
- package/dist/filter.js.map +1 -1
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs.map +1 -1
- package/dist/getToolbarSrc.js.map +1 -1
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.ts +2 -2
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +2 -2
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +2 -2
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +2 -2
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.ts +2 -4
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.ts +2 -2
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.ts +1 -1
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/helpers/mapSliceZone.cjs.map +1 -1
- package/dist/helpers/mapSliceZone.d.ts +1 -1
- package/dist/helpers/mapSliceZone.js.map +1 -1
- package/dist/helpers/unstable_htmlAsRichText.cjs.map +1 -1
- package/dist/helpers/unstable_htmlAsRichText.d.ts +4 -4
- package/dist/helpers/unstable_htmlAsRichText.js.map +1 -1
- package/dist/helpers/unstable_markdownAsRichText.cjs.map +1 -1
- package/dist/helpers/unstable_markdownAsRichText.d.ts +2 -2
- package/dist/helpers/unstable_markdownAsRichText.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs.map +1 -1
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/RichTextFieldBuilder.cjs.map +1 -1
- package/dist/lib/RichTextFieldBuilder.d.ts +1 -1
- package/dist/lib/RichTextFieldBuilder.js.map +1 -1
- package/dist/lib/appendFilters.cjs.map +1 -1
- package/dist/lib/appendFilters.js.map +1 -1
- package/dist/lib/castArray.cjs.map +1 -1
- package/dist/lib/castArray.js.map +1 -1
- package/dist/lib/castThunk.cjs.map +1 -1
- package/dist/lib/castThunk.js.map +1 -1
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.d.ts +1 -1
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/escapeHTML.cjs.map +1 -1
- package/dist/lib/escapeHTML.js.map +1 -1
- package/dist/lib/everyTagFilter.cjs.map +1 -1
- package/dist/lib/everyTagFilter.js.map +1 -1
- package/dist/lib/filterRichTextField.cjs.map +1 -1
- package/dist/lib/filterRichTextField.d.ts +3 -3
- package/dist/lib/filterRichTextField.js.map +1 -1
- package/dist/lib/findMasterRef.cjs.map +1 -1
- package/dist/lib/findMasterRef.d.ts +1 -1
- package/dist/lib/findMasterRef.js.map +1 -1
- package/dist/lib/findRef.cjs.map +1 -1
- package/dist/lib/findRef.d.ts +1 -1
- package/dist/lib/findRef.js.map +1 -1
- package/dist/lib/findRefByID.cjs.map +1 -1
- package/dist/lib/findRefByID.d.ts +1 -1
- package/dist/lib/findRefByID.js.map +1 -1
- package/dist/lib/findRefByLabel.cjs.map +1 -1
- package/dist/lib/findRefByLabel.d.ts +1 -1
- package/dist/lib/findRefByLabel.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/hastSerializerHelpers.cjs.map +1 -1
- package/dist/lib/hastSerializerHelpers.d.ts +3 -3
- package/dist/lib/hastSerializerHelpers.js.map +1 -1
- package/dist/lib/hastToRichText.cjs +1 -2
- package/dist/lib/hastToRichText.cjs.map +1 -1
- package/dist/lib/hastToRichText.d.ts +4 -4
- package/dist/lib/hastToRichText.js +1 -2
- package/dist/lib/hastToRichText.js.map +1 -1
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/minifyGraphQLQuery.cjs.map +1 -1
- package/dist/lib/minifyGraphQLQuery.js.map +1 -1
- package/dist/lib/rehypeRichText.cjs.map +1 -1
- package/dist/lib/rehypeRichText.d.ts +5 -5
- package/dist/lib/rehypeRichText.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.d.ts +2 -2
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/lib/someTagsFilter.cjs.map +1 -1
- package/dist/lib/someTagsFilter.js.map +1 -1
- package/dist/lib/typeFilter.cjs.map +1 -1
- package/dist/lib/typeFilter.js.map +1 -1
- package/dist/package.json.cjs +1 -1
- package/dist/package.json.js +1 -1
- package/dist/richtext/asText.cjs.map +1 -1
- package/dist/richtext/asText.d.ts +1 -1
- package/dist/richtext/asText.js.map +1 -1
- package/dist/richtext/asTree.cjs.map +1 -1
- package/dist/richtext/asTree.d.ts +2 -2
- package/dist/richtext/asTree.js.map +1 -1
- package/dist/richtext/composeSerializers.cjs.map +1 -1
- package/dist/richtext/composeSerializers.d.ts +1 -1
- package/dist/richtext/composeSerializers.js.map +1 -1
- package/dist/richtext/serialize.cjs.map +1 -1
- package/dist/richtext/serialize.d.ts +1 -1
- package/dist/richtext/serialize.js.map +1 -1
- package/dist/richtext/types.cjs.map +1 -1
- package/dist/richtext/types.d.ts +1 -1
- package/dist/richtext/types.js.map +1 -1
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.ts +1 -1
- package/dist/richtext/wrapMapSerializer.js.map +1 -1
- package/dist/types/api/query.d.ts +1 -1
- package/dist/types/api/release.d.ts +1 -1
- package/dist/types/api/repository.d.ts +1 -1
- package/dist/types/model/customType.d.ts +1 -1
- package/dist/types/model/link.cjs.map +1 -1
- package/dist/types/model/link.js.map +1 -1
- package/dist/types/model/slice.cjs.map +1 -1
- package/dist/types/model/slice.js.map +1 -1
- package/dist/types/model/sliceZone.cjs.map +1 -1
- package/dist/types/model/sliceZone.js.map +1 -1
- package/dist/types/model/title.d.ts +1 -1
- package/dist/types/model/types.cjs.map +1 -1
- package/dist/types/model/types.js.map +1 -1
- package/dist/types/value/document.d.ts +4 -4
- package/dist/types/value/embed.cjs.map +1 -1
- package/dist/types/value/embed.js.map +1 -1
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/richText.cjs.map +1 -1
- package/dist/types/value/richText.js.map +1 -1
- package/dist/types/webhook/apiUpdate.d.ts +1 -1
- package/dist/types/webhook/testTrigger.d.ts +1 -1
- package/dist/types/webhook/types.cjs.map +1 -1
- package/dist/types/webhook/types.d.ts +2 -2
- package/dist/types/webhook/types.js.map +1 -1
- package/package.json +1 -1
- package/src/buildQueryURL.ts +51 -51
- package/src/cookie.ts +1 -1
- package/src/createClient.ts +293 -293
- package/src/errors/ForbiddenError.ts +6 -6
- package/src/errors/NotFoundError.ts +1 -1
- package/src/errors/ParsingError.ts +8 -8
- package/src/errors/PreviewTokenExpired.ts +4 -4
- package/src/errors/PrismicError.ts +5 -5
- package/src/errors/PrismicRichTextSerializerError.ts +1 -1
- package/src/errors/RefExpiredError.ts +4 -4
- package/src/errors/RefNotFoundError.ts +4 -4
- package/src/errors/RepositoryNotFoundError.ts +1 -1
- package/src/filter.ts +22 -22
- package/src/getGraphQLEndpoint.ts +5 -5
- package/src/getRepositoryEndpoint.ts +5 -5
- package/src/getRepositoryName.ts +4 -4
- package/src/getToolbarSrc.ts +5 -5
- package/src/helpers/asDate.ts +7 -7
- package/src/helpers/asHTML.ts +54 -56
- package/src/helpers/asImagePixelDensitySrcSet.ts +14 -17
- package/src/helpers/asImageSrc.ts +9 -8
- package/src/helpers/asImageWidthSrcSet.ts +19 -22
- package/src/helpers/asLink.ts +26 -27
- package/src/helpers/asLinkAttrs.ts +30 -29
- package/src/helpers/asText.ts +15 -15
- package/src/helpers/documentToLinkField.ts +6 -6
- package/src/helpers/isFilled.ts +53 -53
- package/src/helpers/mapSliceZone.ts +34 -34
- package/src/helpers/unstable_htmlAsRichText.ts +23 -22
- package/src/helpers/unstable_markdownAsRichText.ts +14 -13
- package/src/index.ts +119 -119
- package/src/isRepositoryEndpoint.ts +4 -4
- package/src/isRepositoryName.ts +2 -2
- package/src/lib/RichTextFieldBuilder.ts +36 -41
- package/src/lib/appendFilters.ts +4 -4
- package/src/lib/castArray.ts +2 -2
- package/src/lib/castThunk.ts +2 -2
- package/src/lib/devMsg.ts +4 -4
- package/src/lib/escapeHTML.ts +24 -24
- package/src/lib/everyTagFilter.ts +4 -4
- package/src/lib/filterRichTextField.ts +31 -31
- package/src/lib/findMasterRef.ts +4 -4
- package/src/lib/findRef.ts +6 -6
- package/src/lib/findRefByID.ts +4 -4
- package/src/lib/findRefByLabel.ts +4 -4
- package/src/lib/getPreviewCookie.ts +11 -11
- package/src/lib/hastSerializerHelpers.ts +41 -37
- package/src/lib/hastToRichText.ts +74 -73
- package/src/lib/isInternalURL.ts +4 -4
- package/src/lib/minifyGraphQLQuery.ts +2 -2
- package/src/lib/rehypeRichText.ts +42 -41
- package/src/lib/serializerHelpers.ts +53 -54
- package/src/lib/someTagsFilter.ts +4 -4
- package/src/lib/typeFilter.ts +3 -3
- package/src/richtext/asText.ts +5 -5
- package/src/richtext/asTree.ts +53 -53
- package/src/richtext/composeSerializers.ts +6 -6
- package/src/richtext/index.ts +7 -7
- package/src/richtext/serialize.ts +11 -11
- package/src/richtext/types.ts +38 -38
- package/src/richtext/wrapMapSerializer.ts +6 -9
- package/src/types/api/query.ts +9 -9
- package/src/types/api/ref.ts +5 -5
- package/src/types/api/release.ts +2 -2
- package/src/types/api/repository.ts +24 -24
- package/src/types/api/tags.ts +1 -1
- package/src/types/model/boolean.ts +7 -7
- package/src/types/model/color.ts +5 -5
- package/src/types/model/contentRelationship.ts +9 -9
- package/src/types/model/customType.ts +9 -9
- package/src/types/model/date.ts +6 -6
- package/src/types/model/embed.ts +5 -5
- package/src/types/model/geoPoint.ts +4 -4
- package/src/types/model/group.ts +6 -6
- package/src/types/model/image.ts +9 -9
- package/src/types/model/integration.ts +6 -6
- package/src/types/model/keyText.ts +5 -5
- package/src/types/model/link.ts +8 -8
- package/src/types/model/linkToMedia.ts +7 -7
- package/src/types/model/number.ts +7 -7
- package/src/types/model/range.ts +8 -8
- package/src/types/model/richText.ts +16 -16
- package/src/types/model/select.ts +7 -7
- package/src/types/model/separator.ts +4 -4
- package/src/types/model/sharedSlice.ts +7 -7
- package/src/types/model/sharedSliceVariation.ts +9 -9
- package/src/types/model/slice.ts +12 -12
- package/src/types/model/sliceZone.ts +11 -11
- package/src/types/model/timestamp.ts +6 -6
- package/src/types/model/title.ts +2 -2
- package/src/types/model/types.ts +26 -26
- package/src/types/model/uid.ts +5 -5
- package/src/types/value/boolean.ts +1 -1
- package/src/types/value/color.ts +2 -2
- package/src/types/value/contentRelationship.ts +15 -15
- package/src/types/value/date.ts +2 -2
- package/src/types/value/document.ts +23 -23
- package/src/types/value/embed.ts +33 -33
- package/src/types/value/geoPoint.ts +4 -4
- package/src/types/value/group.ts +3 -3
- package/src/types/value/image.ts +21 -21
- package/src/types/value/integration.ts +2 -2
- package/src/types/value/keyText.ts +2 -2
- package/src/types/value/link.ts +12 -12
- package/src/types/value/linkToMedia.ts +11 -11
- package/src/types/value/number.ts +2 -2
- package/src/types/value/richText.ts +58 -58
- package/src/types/value/select.ts +2 -2
- package/src/types/value/sharedSlice.ts +5 -5
- package/src/types/value/sharedSliceVariation.ts +5 -5
- package/src/types/value/slice.ts +6 -6
- package/src/types/value/sliceZone.ts +4 -4
- package/src/types/value/timestamp.ts +3 -3
- package/src/types/value/title.ts +4 -4
- package/src/types/value/types.ts +22 -22
- package/src/types/webhook/apiUpdate.ts +18 -18
- package/src/types/webhook/testTrigger.ts +2 -2
- package/src/types/webhook/types.ts +8 -8
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs +0 -11
- package/dist/_node_modules/hast-util-whitespace/lib/index.cjs.map +0 -1
- package/dist/_node_modules/hast-util-whitespace/lib/index.js +0 -11
- package/dist/_node_modules/hast-util-whitespace/lib/index.js.map +0 -1
package/src/types/model/image.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Dimension constraints for an image custom type field.
|
|
@@ -6,8 +6,8 @@ import type { CustomTypeModelFieldType } from "./types";
|
|
|
6
6
|
* More details: {@link https://prismic.io/docs/image}
|
|
7
7
|
*/
|
|
8
8
|
export interface CustomTypeModelImageConstraint {
|
|
9
|
-
width?: number | null
|
|
10
|
-
height?: number | null
|
|
9
|
+
width?: number | null
|
|
10
|
+
height?: number | null
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -17,7 +17,7 @@ export interface CustomTypeModelImageConstraint {
|
|
|
17
17
|
*/
|
|
18
18
|
export interface CustomTypeModelImageThumbnail<Name extends string = string>
|
|
19
19
|
extends CustomTypeModelImageConstraint {
|
|
20
|
-
name: Name
|
|
20
|
+
name: Name
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/**
|
|
@@ -28,10 +28,10 @@ export interface CustomTypeModelImageThumbnail<Name extends string = string>
|
|
|
28
28
|
export interface CustomTypeModelImageField<
|
|
29
29
|
ThumbnailNames extends string = string,
|
|
30
30
|
> {
|
|
31
|
-
type: typeof CustomTypeModelFieldType.Image
|
|
31
|
+
type: typeof CustomTypeModelFieldType.Image
|
|
32
32
|
config?: {
|
|
33
|
-
label?: string | null
|
|
34
|
-
constraint?: CustomTypeModelImageConstraint
|
|
35
|
-
thumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[]
|
|
36
|
-
}
|
|
33
|
+
label?: string | null
|
|
34
|
+
constraint?: CustomTypeModelImageConstraint
|
|
35
|
+
thumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[]
|
|
36
|
+
}
|
|
37
37
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* An integration custom type field.
|
|
@@ -6,10 +6,10 @@ import type { CustomTypeModelFieldType } from "./types";
|
|
|
6
6
|
* More details: {@link https://prismic.io/docs/integration-fields}
|
|
7
7
|
*/
|
|
8
8
|
export interface CustomTypeModelIntegrationField {
|
|
9
|
-
type: typeof CustomTypeModelFieldType.Integration
|
|
9
|
+
type: typeof CustomTypeModelFieldType.Integration
|
|
10
10
|
config?: {
|
|
11
|
-
label?: string | null
|
|
12
|
-
placeholder?: string
|
|
13
|
-
catalog?: string
|
|
14
|
-
}
|
|
11
|
+
label?: string | null
|
|
12
|
+
placeholder?: string
|
|
13
|
+
catalog?: string
|
|
14
|
+
}
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A key text custom type field.
|
|
@@ -6,9 +6,9 @@ import type { CustomTypeModelFieldType } from "./types";
|
|
|
6
6
|
* More details: {@link https://prismic.io/docs/key-text}
|
|
7
7
|
*/
|
|
8
8
|
export interface CustomTypeModelKeyTextField {
|
|
9
|
-
type: typeof CustomTypeModelFieldType.Text
|
|
9
|
+
type: typeof CustomTypeModelFieldType.Text
|
|
10
10
|
config?: {
|
|
11
|
-
label?: string | null
|
|
12
|
-
placeholder?: string
|
|
13
|
-
}
|
|
11
|
+
label?: string | null
|
|
12
|
+
placeholder?: string
|
|
13
|
+
}
|
|
14
14
|
}
|
package/src/types/model/link.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A link custom type field.
|
|
@@ -6,15 +6,15 @@ import type { CustomTypeModelFieldType } from "./types";
|
|
|
6
6
|
* More details: {@link https://prismic.io/docs/link}
|
|
7
7
|
*/
|
|
8
8
|
export interface CustomTypeModelLinkField {
|
|
9
|
-
type: typeof CustomTypeModelFieldType.Link
|
|
9
|
+
type: typeof CustomTypeModelFieldType.Link
|
|
10
10
|
config?: {
|
|
11
|
-
label?: string | null
|
|
12
|
-
placeholder?: string
|
|
11
|
+
label?: string | null
|
|
12
|
+
placeholder?: string
|
|
13
13
|
select?:
|
|
14
14
|
| null
|
|
15
|
-
| (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType]
|
|
16
|
-
allowTargetBlank?: boolean
|
|
17
|
-
}
|
|
15
|
+
| (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType]
|
|
16
|
+
allowTargetBlank?: boolean
|
|
17
|
+
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -26,4 +26,4 @@ export const CustomTypeModelLinkSelectType = {
|
|
|
26
26
|
Document: "document",
|
|
27
27
|
Media: "media",
|
|
28
28
|
Web: "web",
|
|
29
|
-
} as const
|
|
29
|
+
} as const
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
|
-
import type { CustomTypeModelLinkSelectType } from "./link"
|
|
3
|
+
import type { CustomTypeModelLinkSelectType } from "./link"
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A link to media custom type field.
|
|
@@ -8,10 +8,10 @@ import type { CustomTypeModelLinkSelectType } from "./link";
|
|
|
8
8
|
* More details: {@link https://prismic.io/docs/media}
|
|
9
9
|
*/
|
|
10
10
|
export interface CustomTypeModelLinkToMediaField {
|
|
11
|
-
type: typeof CustomTypeModelFieldType.Link
|
|
11
|
+
type: typeof CustomTypeModelFieldType.Link
|
|
12
12
|
config?: {
|
|
13
|
-
label?: string | null
|
|
14
|
-
placeholder?: string
|
|
15
|
-
select: typeof CustomTypeModelLinkSelectType.Media
|
|
16
|
-
}
|
|
13
|
+
label?: string | null
|
|
14
|
+
placeholder?: string
|
|
15
|
+
select: typeof CustomTypeModelLinkSelectType.Media
|
|
16
|
+
}
|
|
17
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A number custom type field.
|
|
@@ -6,11 +6,11 @@ import type { CustomTypeModelFieldType } from "./types";
|
|
|
6
6
|
* More details: {@link https://prismic.io/docs/number}
|
|
7
7
|
*/
|
|
8
8
|
export interface CustomTypeModelNumberField {
|
|
9
|
-
type: typeof CustomTypeModelFieldType.Number
|
|
9
|
+
type: typeof CustomTypeModelFieldType.Number
|
|
10
10
|
config?: {
|
|
11
|
-
label?: string | null
|
|
12
|
-
placeholder?: string
|
|
13
|
-
min?: number
|
|
14
|
-
max?: number
|
|
15
|
-
}
|
|
11
|
+
label?: string | null
|
|
12
|
+
placeholder?: string
|
|
13
|
+
min?: number
|
|
14
|
+
max?: number
|
|
15
|
+
}
|
|
16
16
|
}
|
package/src/types/model/range.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated - Legacy field. Use `CustomTypeModelNumberField` instead.
|
|
5
5
|
*/
|
|
6
6
|
export interface CustomTypeModelRangeField {
|
|
7
|
-
type: typeof CustomTypeModelFieldType.Range
|
|
7
|
+
type: typeof CustomTypeModelFieldType.Range
|
|
8
8
|
config?: {
|
|
9
|
-
label?: string | null
|
|
10
|
-
placeholder?: string
|
|
11
|
-
min?: number
|
|
12
|
-
max?: number
|
|
13
|
-
step?: number
|
|
14
|
-
}
|
|
9
|
+
label?: string | null
|
|
10
|
+
placeholder?: string
|
|
11
|
+
min?: number
|
|
12
|
+
max?: number
|
|
13
|
+
step?: number
|
|
14
|
+
}
|
|
15
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A rich text custom type field.
|
|
@@ -7,7 +7,7 @@ import type { CustomTypeModelFieldType } from "./types";
|
|
|
7
7
|
*/
|
|
8
8
|
export type CustomTypeModelRichTextField =
|
|
9
9
|
| CustomTypeModelRichTextMultiField
|
|
10
|
-
| CustomTypeModelRichTextSingleField
|
|
10
|
+
| CustomTypeModelRichTextSingleField
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* A rich text custom type field which supports multiple blocks of content.
|
|
@@ -15,15 +15,15 @@ export type CustomTypeModelRichTextField =
|
|
|
15
15
|
* More details: {@link https://prismic.io/docs/rich-text-title}
|
|
16
16
|
*/
|
|
17
17
|
export interface CustomTypeModelRichTextMultiField {
|
|
18
|
-
type: typeof CustomTypeModelFieldType.StructuredText
|
|
18
|
+
type: typeof CustomTypeModelFieldType.StructuredText
|
|
19
19
|
config?: {
|
|
20
|
-
label?: string | null
|
|
21
|
-
placeholder?: string
|
|
22
|
-
allowTargetBlank?: boolean
|
|
23
|
-
multi?: string
|
|
20
|
+
label?: string | null
|
|
21
|
+
placeholder?: string
|
|
22
|
+
allowTargetBlank?: boolean
|
|
23
|
+
multi?: string
|
|
24
24
|
// @prismicio/types-internal types `labels` as readonly.
|
|
25
|
-
labels?: readonly string[]
|
|
26
|
-
}
|
|
25
|
+
labels?: readonly string[]
|
|
26
|
+
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -32,13 +32,13 @@ export interface CustomTypeModelRichTextMultiField {
|
|
|
32
32
|
* More details: {@link https://prismic.io/docs/rich-text-title}
|
|
33
33
|
*/
|
|
34
34
|
export interface CustomTypeModelRichTextSingleField {
|
|
35
|
-
type: typeof CustomTypeModelFieldType.StructuredText
|
|
35
|
+
type: typeof CustomTypeModelFieldType.StructuredText
|
|
36
36
|
config?: {
|
|
37
|
-
label?: string | null
|
|
38
|
-
placeholder?: string
|
|
39
|
-
allowTargetBlank?: boolean
|
|
40
|
-
single?: string
|
|
37
|
+
label?: string | null
|
|
38
|
+
placeholder?: string
|
|
39
|
+
allowTargetBlank?: boolean
|
|
40
|
+
single?: string
|
|
41
41
|
// @prismicio/types-internal types `labels` as readonly.
|
|
42
|
-
labels?: readonly string[]
|
|
43
|
-
}
|
|
42
|
+
labels?: readonly string[]
|
|
43
|
+
}
|
|
44
44
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A select custom type field.
|
|
@@ -12,11 +12,11 @@ export interface CustomTypeModelSelectField<
|
|
|
12
12
|
Option extends string = string,
|
|
13
13
|
DefaultValue extends Option = Option,
|
|
14
14
|
> {
|
|
15
|
-
type: typeof CustomTypeModelFieldType.Select
|
|
15
|
+
type: typeof CustomTypeModelFieldType.Select
|
|
16
16
|
config?: {
|
|
17
|
-
label?: string | null
|
|
18
|
-
placeholder?: string
|
|
19
|
-
options?: readonly Option[]
|
|
20
|
-
default_value?: DefaultValue
|
|
21
|
-
}
|
|
17
|
+
label?: string | null
|
|
18
|
+
placeholder?: string
|
|
19
|
+
options?: readonly Option[]
|
|
20
|
+
default_value?: DefaultValue
|
|
21
|
+
}
|
|
22
22
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @deprecated - Legacy field. Do not use.
|
|
5
5
|
*/
|
|
6
6
|
export interface CustomTypeModelSeparatorField {
|
|
7
|
-
type: typeof CustomTypeModelFieldType.Separator
|
|
7
|
+
type: typeof CustomTypeModelFieldType.Separator
|
|
8
8
|
config?: {
|
|
9
|
-
label?: string | null
|
|
10
|
-
}
|
|
9
|
+
label?: string | null
|
|
10
|
+
}
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SharedSliceModelVariation } from "./sharedSliceVariation"
|
|
2
|
-
import type { CustomTypeModelSliceType } from "./sliceZone"
|
|
1
|
+
import type { SharedSliceModelVariation } from "./sharedSliceVariation"
|
|
2
|
+
import type { CustomTypeModelSliceType } from "./sliceZone"
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A Prismic shared Slice model.
|
|
@@ -12,9 +12,9 @@ export interface SharedSliceModel<
|
|
|
12
12
|
ID extends string = string,
|
|
13
13
|
Variation extends SharedSliceModelVariation = SharedSliceModelVariation,
|
|
14
14
|
> {
|
|
15
|
-
type: typeof CustomTypeModelSliceType.SharedSlice
|
|
16
|
-
id: ID
|
|
17
|
-
name: string
|
|
18
|
-
description?: string
|
|
19
|
-
variations: readonly Variation[]
|
|
15
|
+
type: typeof CustomTypeModelSliceType.SharedSlice
|
|
16
|
+
id: ID
|
|
17
|
+
name: string
|
|
18
|
+
description?: string
|
|
19
|
+
variations: readonly Variation[]
|
|
20
20
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
CustomTypeModelFieldForNestedGroup,
|
|
3
3
|
CustomTypeModelFieldForSlicePrimary,
|
|
4
|
-
} from "./types"
|
|
4
|
+
} from "./types"
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A shared Slice variation.
|
|
@@ -22,12 +22,12 @@ export interface SharedSliceModelVariation<
|
|
|
22
22
|
CustomTypeModelFieldForNestedGroup
|
|
23
23
|
> = Record<string, CustomTypeModelFieldForNestedGroup>,
|
|
24
24
|
> {
|
|
25
|
-
id: ID
|
|
26
|
-
name: string
|
|
27
|
-
docURL: string
|
|
28
|
-
version: string
|
|
29
|
-
description: string
|
|
30
|
-
primary?: PrimaryFields
|
|
31
|
-
items?: ItemFields
|
|
32
|
-
imageUrl: string
|
|
25
|
+
id: ID
|
|
26
|
+
name: string
|
|
27
|
+
docURL: string
|
|
28
|
+
version: string
|
|
29
|
+
description: string
|
|
30
|
+
primary?: PrimaryFields
|
|
31
|
+
items?: ItemFields
|
|
32
|
+
imageUrl: string
|
|
33
33
|
}
|
package/src/types/model/slice.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldForNestedGroup } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldForNestedGroup } from "./types"
|
|
2
2
|
|
|
3
|
-
import type { CustomTypeModelNestedGroupField } from "./group"
|
|
4
|
-
import type { CustomTypeModelSliceType } from "./sliceZone"
|
|
3
|
+
import type { CustomTypeModelNestedGroupField } from "./group"
|
|
4
|
+
import type { CustomTypeModelSliceType } from "./sliceZone"
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A Slice for a custom type.
|
|
@@ -21,15 +21,15 @@ export interface CustomTypeModelSlice<
|
|
|
21
21
|
CustomTypeModelFieldForNestedGroup
|
|
22
22
|
> = Record<string, CustomTypeModelFieldForNestedGroup>,
|
|
23
23
|
> {
|
|
24
|
-
type: typeof CustomTypeModelSliceType.Slice
|
|
25
|
-
fieldset?: string | null
|
|
26
|
-
description?: string
|
|
27
|
-
icon?: string
|
|
24
|
+
type: typeof CustomTypeModelSliceType.Slice
|
|
25
|
+
fieldset?: string | null
|
|
26
|
+
description?: string
|
|
27
|
+
icon?: string
|
|
28
28
|
display?:
|
|
29
29
|
| (typeof CustomTypeModelSliceDisplay)[keyof typeof CustomTypeModelSliceDisplay]
|
|
30
|
-
| string
|
|
31
|
-
"non-repeat"?: NonRepeatFields
|
|
32
|
-
repeat?: RepeatFields
|
|
30
|
+
| string
|
|
31
|
+
"non-repeat"?: NonRepeatFields
|
|
32
|
+
repeat?: RepeatFields
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -40,11 +40,11 @@ export interface CustomTypeModelSlice<
|
|
|
40
40
|
export const CustomTypeModelSliceDisplay = {
|
|
41
41
|
List: "list",
|
|
42
42
|
Grid: "grid",
|
|
43
|
-
} as const
|
|
43
|
+
} as const
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* @deprecated - Legacy slice type. Do not use.
|
|
47
47
|
*/
|
|
48
48
|
export type CustomTypeModelLegacySlice =
|
|
49
49
|
| CustomTypeModelNestedGroupField
|
|
50
|
-
| CustomTypeModelFieldForNestedGroup
|
|
50
|
+
| CustomTypeModelFieldForNestedGroup
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
|
-
import type { CustomTypeModelLegacySlice, CustomTypeModelSlice } from "./slice"
|
|
3
|
+
import type { CustomTypeModelLegacySlice, CustomTypeModelSlice } from "./slice"
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A Slice Zone custom type field.
|
|
@@ -22,12 +22,12 @@ export interface CustomTypeModelSliceZoneField<
|
|
|
22
22
|
> {
|
|
23
23
|
type:
|
|
24
24
|
| typeof CustomTypeModelFieldType.Slices
|
|
25
|
-
| typeof CustomTypeModelFieldType.LegacySlices
|
|
26
|
-
fieldset?: string | null
|
|
25
|
+
| typeof CustomTypeModelFieldType.LegacySlices
|
|
26
|
+
fieldset?: string | null
|
|
27
27
|
config?: {
|
|
28
|
-
labels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null
|
|
29
|
-
choices?: Slices
|
|
30
|
-
}
|
|
28
|
+
labels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null
|
|
29
|
+
choices?: Slices
|
|
30
|
+
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
/**
|
|
@@ -36,8 +36,8 @@ export interface CustomTypeModelSliceZoneField<
|
|
|
36
36
|
* More details: {@link https://prismic.io/docs/slice}
|
|
37
37
|
*/
|
|
38
38
|
export interface CustomTypeModelSliceLabel {
|
|
39
|
-
name: string
|
|
40
|
-
display?: string
|
|
39
|
+
name: string
|
|
40
|
+
display?: string
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -48,7 +48,7 @@ export interface CustomTypeModelSliceLabel {
|
|
|
48
48
|
export const CustomTypeModelSliceType = {
|
|
49
49
|
Slice: "Slice",
|
|
50
50
|
SharedSlice: "SharedSlice",
|
|
51
|
-
} as const
|
|
51
|
+
} as const
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* A shared Slice for a custom type.
|
|
@@ -56,5 +56,5 @@ export const CustomTypeModelSliceType = {
|
|
|
56
56
|
* More details: {@link https://prismic.io/docs/slice}
|
|
57
57
|
*/
|
|
58
58
|
export interface CustomTypeModelSharedSlice {
|
|
59
|
-
type: typeof CustomTypeModelSliceType.SharedSlice
|
|
59
|
+
type: typeof CustomTypeModelSliceType.SharedSlice
|
|
60
60
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A timestamp custom type field.
|
|
@@ -6,10 +6,10 @@ import type { CustomTypeModelFieldType } from "./types";
|
|
|
6
6
|
* More details: {@link https://prismic.io/docs/timestamp}
|
|
7
7
|
*/
|
|
8
8
|
export interface CustomTypeModelTimestampField {
|
|
9
|
-
type: typeof CustomTypeModelFieldType.Timestamp
|
|
9
|
+
type: typeof CustomTypeModelFieldType.Timestamp
|
|
10
10
|
config?: {
|
|
11
|
-
label?: string | null
|
|
12
|
-
placeholder?: string
|
|
13
|
-
default?: string
|
|
14
|
-
}
|
|
11
|
+
label?: string | null
|
|
12
|
+
placeholder?: string
|
|
13
|
+
default?: string
|
|
14
|
+
}
|
|
15
15
|
}
|
package/src/types/model/title.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CustomTypeModelRichTextSingleField } from "./richText"
|
|
1
|
+
import type { CustomTypeModelRichTextSingleField } from "./richText"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A title custom type field.
|
|
5
5
|
*
|
|
6
6
|
* More details: {@link https://prismic.io/docs/rich-text-title}
|
|
7
7
|
*/
|
|
8
|
-
export type CustomTypeModelTitleField = CustomTypeModelRichTextSingleField
|
|
8
|
+
export type CustomTypeModelTitleField = CustomTypeModelRichTextSingleField
|
package/src/types/model/types.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { CustomTypeModelBooleanField } from "./boolean"
|
|
2
|
-
import type { CustomTypeModelColorField } from "./color"
|
|
3
|
-
import type { CustomTypeModelContentRelationshipField } from "./contentRelationship"
|
|
4
|
-
import type { CustomTypeModelDateField } from "./date"
|
|
5
|
-
import type { CustomTypeModelEmbedField } from "./embed"
|
|
6
|
-
import type { CustomTypeModelGeoPointField } from "./geoPoint"
|
|
1
|
+
import type { CustomTypeModelBooleanField } from "./boolean"
|
|
2
|
+
import type { CustomTypeModelColorField } from "./color"
|
|
3
|
+
import type { CustomTypeModelContentRelationshipField } from "./contentRelationship"
|
|
4
|
+
import type { CustomTypeModelDateField } from "./date"
|
|
5
|
+
import type { CustomTypeModelEmbedField } from "./embed"
|
|
6
|
+
import type { CustomTypeModelGeoPointField } from "./geoPoint"
|
|
7
7
|
import type {
|
|
8
8
|
CustomTypeModelGroupField,
|
|
9
9
|
CustomTypeModelNestedGroupField,
|
|
10
|
-
} from "./group"
|
|
11
|
-
import type { CustomTypeModelImageField } from "./image"
|
|
12
|
-
import type { CustomTypeModelIntegrationField } from "./integration"
|
|
13
|
-
import type { CustomTypeModelKeyTextField } from "./keyText"
|
|
14
|
-
import type { CustomTypeModelLinkField } from "./link"
|
|
15
|
-
import type { CustomTypeModelLinkToMediaField } from "./linkToMedia"
|
|
16
|
-
import type { CustomTypeModelNumberField } from "./number"
|
|
17
|
-
import type { CustomTypeModelRangeField } from "./range"
|
|
18
|
-
import type { CustomTypeModelRichTextField } from "./richText"
|
|
19
|
-
import type { CustomTypeModelSelectField } from "./select"
|
|
20
|
-
import type { CustomTypeModelSeparatorField } from "./separator"
|
|
21
|
-
import type { CustomTypeModelSliceZoneField } from "./sliceZone"
|
|
22
|
-
import type { CustomTypeModelTimestampField } from "./timestamp"
|
|
23
|
-
import type { CustomTypeModelTitleField } from "./title"
|
|
24
|
-
import type { CustomTypeModelUIDField } from "./uid"
|
|
10
|
+
} from "./group"
|
|
11
|
+
import type { CustomTypeModelImageField } from "./image"
|
|
12
|
+
import type { CustomTypeModelIntegrationField } from "./integration"
|
|
13
|
+
import type { CustomTypeModelKeyTextField } from "./keyText"
|
|
14
|
+
import type { CustomTypeModelLinkField } from "./link"
|
|
15
|
+
import type { CustomTypeModelLinkToMediaField } from "./linkToMedia"
|
|
16
|
+
import type { CustomTypeModelNumberField } from "./number"
|
|
17
|
+
import type { CustomTypeModelRangeField } from "./range"
|
|
18
|
+
import type { CustomTypeModelRichTextField } from "./richText"
|
|
19
|
+
import type { CustomTypeModelSelectField } from "./select"
|
|
20
|
+
import type { CustomTypeModelSeparatorField } from "./separator"
|
|
21
|
+
import type { CustomTypeModelSliceZoneField } from "./sliceZone"
|
|
22
|
+
import type { CustomTypeModelTimestampField } from "./timestamp"
|
|
23
|
+
import type { CustomTypeModelTitleField } from "./title"
|
|
24
|
+
import type { CustomTypeModelUIDField } from "./uid"
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Type identifier for a custom type field.
|
|
@@ -59,7 +59,7 @@ export const CustomTypeModelFieldType = {
|
|
|
59
59
|
* @deprecated - Legacy field type. Use `Slices` instead.
|
|
60
60
|
*/
|
|
61
61
|
LegacySlices: "Choice",
|
|
62
|
-
} as const
|
|
62
|
+
} as const
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* A custom type field.
|
|
@@ -68,21 +68,21 @@ export type CustomTypeModelField =
|
|
|
68
68
|
| CustomTypeModelUIDField
|
|
69
69
|
| CustomTypeModelGroupField
|
|
70
70
|
| CustomTypeModelSliceZoneField
|
|
71
|
-
| CustomTypeModelFieldForNestedGroup
|
|
71
|
+
| CustomTypeModelFieldForNestedGroup
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Any custom type field that is valid for a slice's primary section.
|
|
75
75
|
*/
|
|
76
76
|
export type CustomTypeModelFieldForSlicePrimary =
|
|
77
77
|
| CustomTypeModelGroupField
|
|
78
|
-
| CustomTypeModelFieldForNestedGroup
|
|
78
|
+
| CustomTypeModelFieldForNestedGroup
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* Any custom type field that is valid for a group field.
|
|
82
82
|
*/
|
|
83
83
|
export type CustomTypeModelFieldForGroup =
|
|
84
84
|
| CustomTypeModelNestedGroupField
|
|
85
|
-
| CustomTypeModelFieldForNestedGroup
|
|
85
|
+
| CustomTypeModelFieldForNestedGroup
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* Any custom type field that is valid for a nested group field.
|
|
@@ -105,4 +105,4 @@ export type CustomTypeModelFieldForNestedGroup =
|
|
|
105
105
|
| CustomTypeModelTitleField
|
|
106
106
|
| CustomTypeModelKeyTextField
|
|
107
107
|
| CustomTypeModelTimestampField
|
|
108
|
-
| CustomTypeModelSeparatorField
|
|
108
|
+
| CustomTypeModelSeparatorField
|
package/src/types/model/uid.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types"
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A UID custom type field.
|
|
@@ -6,9 +6,9 @@ import type { CustomTypeModelFieldType } from "./types";
|
|
|
6
6
|
* More details: {@link https://prismic.io/docs/uid}
|
|
7
7
|
*/
|
|
8
8
|
export interface CustomTypeModelUIDField {
|
|
9
|
-
type: typeof CustomTypeModelFieldType.UID
|
|
9
|
+
type: typeof CustomTypeModelFieldType.UID
|
|
10
10
|
config?: {
|
|
11
|
-
label?: string | null
|
|
12
|
-
placeholder?: string
|
|
13
|
-
}
|
|
11
|
+
label?: string | null
|
|
12
|
+
placeholder?: string
|
|
13
|
+
}
|
|
14
14
|
}
|
package/src/types/value/color.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FieldState } from "./types"
|
|
1
|
+
import type { FieldState } from "./types"
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A color field.
|
|
@@ -8,4 +8,4 @@ import type { FieldState } from "./types";
|
|
|
8
8
|
* @see More details: {@link https://prismic.io/docs/color}
|
|
9
9
|
*/
|
|
10
10
|
export type ColorField<State extends FieldState = FieldState> =
|
|
11
|
-
State extends "empty" ? null : `#${string}
|
|
11
|
+
State extends "empty" ? null : `#${string}`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { AnyRegularField, FieldState } from "./types"
|
|
1
|
+
import type { AnyRegularField, FieldState } from "./types"
|
|
2
2
|
|
|
3
|
-
import type { GroupField } from "./group"
|
|
4
|
-
import type { EmptyLinkField, LinkType } from "./link"
|
|
5
|
-
import type { SliceZone } from "./sliceZone"
|
|
3
|
+
import type { GroupField } from "./group"
|
|
4
|
+
import type { EmptyLinkField, LinkType } from "./link"
|
|
5
|
+
import type { SliceZone } from "./sliceZone"
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Field for related documents
|
|
@@ -22,7 +22,7 @@ export type ContentRelationshipField<
|
|
|
22
22
|
State extends FieldState = FieldState,
|
|
23
23
|
> = State extends "empty"
|
|
24
24
|
? EmptyLinkField<typeof LinkType.Document>
|
|
25
|
-
: FilledContentRelationshipField<TypeEnum, LangEnum, DataInterface
|
|
25
|
+
: FilledContentRelationshipField<TypeEnum, LangEnum, DataInterface>
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Links that refer to documents
|
|
@@ -34,14 +34,14 @@ export interface FilledContentRelationshipField<
|
|
|
34
34
|
| Record<string, AnyRegularField | GroupField | SliceZone>
|
|
35
35
|
| unknown = unknown,
|
|
36
36
|
> {
|
|
37
|
-
link_type: typeof LinkType.Document
|
|
38
|
-
id: string
|
|
39
|
-
uid?: string
|
|
40
|
-
type: TypeEnum
|
|
41
|
-
tags: string[]
|
|
42
|
-
lang: LangEnum
|
|
43
|
-
url?: string
|
|
44
|
-
slug?: string
|
|
45
|
-
isBroken?: boolean
|
|
46
|
-
data?: DataInterface
|
|
37
|
+
link_type: typeof LinkType.Document
|
|
38
|
+
id: string
|
|
39
|
+
uid?: string
|
|
40
|
+
type: TypeEnum
|
|
41
|
+
tags: string[]
|
|
42
|
+
lang: LangEnum
|
|
43
|
+
url?: string
|
|
44
|
+
slug?: string
|
|
45
|
+
isBroken?: boolean
|
|
46
|
+
data?: DataInterface
|
|
47
47
|
}
|