@prismicio/client 7.0.0-alpha.0 → 7.0.0-alpha.1
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 +4 -4
- package/dist/buildQueryURL.cjs +26 -8
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.ts +207 -130
- package/dist/buildQueryURL.js +25 -7
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.cjs +1 -1
- package/dist/cookie.cjs.map +1 -1
- package/dist/cookie.d.ts +5 -5
- package/dist/cookie.js.map +1 -1
- package/dist/createClient.cjs +1142 -0
- package/dist/createClient.cjs.map +1 -0
- package/dist/{client.d.ts → createClient.d.ts} +980 -908
- package/dist/createClient.js +1142 -0
- package/dist/createClient.js.map +1 -0
- package/dist/{ForbiddenError.cjs → errors/ForbiddenError.cjs} +1 -1
- package/dist/errors/ForbiddenError.cjs.map +1 -0
- package/dist/{ForbiddenError.d.ts → errors/ForbiddenError.d.ts} +11 -11
- package/dist/errors/ForbiddenError.js.map +1 -0
- package/dist/{NotFoundError.cjs → errors/NotFoundError.cjs} +1 -1
- package/dist/errors/NotFoundError.cjs.map +1 -0
- package/dist/{NotFoundError.d.ts → errors/NotFoundError.d.ts} +3 -3
- package/dist/errors/NotFoundError.js.map +1 -0
- package/dist/{ParsingError.cjs → errors/ParsingError.cjs} +1 -1
- package/dist/errors/ParsingError.cjs.map +1 -0
- package/dist/{ParsingError.d.ts → errors/ParsingError.d.ts} +12 -12
- package/dist/errors/ParsingError.js.map +1 -0
- package/dist/{PrismicError.cjs → errors/PrismicError.cjs} +1 -1
- package/dist/errors/PrismicError.cjs.map +1 -0
- package/dist/{PrismicError.d.ts → errors/PrismicError.d.ts} +5 -5
- package/dist/errors/PrismicError.js.map +1 -0
- package/dist/filter.cjs +247 -0
- package/dist/filter.cjs.map +1 -0
- package/dist/filter.d.ts +209 -0
- package/dist/filter.js +247 -0
- package/dist/filter.js.map +1 -0
- package/dist/getGraphQLEndpoint.cjs +2 -2
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.d.ts +9 -9
- package/dist/getGraphQLEndpoint.js +1 -1
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs +2 -2
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.d.ts +10 -10
- package/dist/getRepositoryEndpoint.js +1 -1
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs +2 -2
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.d.ts +13 -13
- package/dist/getRepositoryName.js +1 -1
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs +13 -0
- package/dist/getToolbarSrc.cjs.map +1 -0
- package/dist/getToolbarSrc.d.ts +34 -0
- package/dist/getToolbarSrc.js +13 -0
- package/dist/getToolbarSrc.js.map +1 -0
- package/dist/helpers/asDate.cjs +1 -1
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.d.ts +16 -16
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs +7 -6
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.ts +77 -20
- package/dist/helpers/asHTML.js +6 -5
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +52 -52
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs +1 -1
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +27 -27
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs +19 -14
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +60 -60
- package/dist/helpers/asImageWidthSrcSet.js +18 -13
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs +8 -2
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.ts +34 -24
- package/dist/helpers/asLink.js +7 -1
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs +28 -0
- package/dist/helpers/asLinkAttrs.cjs.map +1 -0
- package/dist/helpers/asLinkAttrs.d.ts +63 -0
- package/dist/helpers/asLinkAttrs.js +28 -0
- package/dist/helpers/asLinkAttrs.js.map +1 -0
- package/dist/helpers/asText.cjs +1 -1
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.ts +16 -16
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs +12 -5
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.d.ts +15 -15
- package/dist/helpers/documentToLinkField.js +11 -4
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs +1 -1
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.d.ts +172 -175
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/index.cjs +20 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +138 -92
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.cjs +1 -1
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.d.ts +10 -10
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs +1 -1
- package/dist/isRepositoryName.cjs.map +1 -1
- package/dist/isRepositoryName.d.ts +9 -9
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/appendFilters.cjs +11 -0
- package/dist/lib/appendFilters.cjs.map +1 -0
- package/dist/lib/appendFilters.d.ts +18 -0
- package/dist/lib/appendFilters.js +11 -0
- package/dist/lib/appendFilters.js.map +1 -0
- package/dist/lib/castArray.cjs +4 -2
- package/dist/lib/castArray.cjs.map +1 -1
- package/dist/lib/castArray.d.ts +11 -11
- package/dist/lib/castArray.js +3 -1
- package/dist/lib/castArray.js.map +1 -1
- package/dist/lib/castThunk.cjs +4 -2
- package/dist/lib/castThunk.cjs.map +1 -1
- package/dist/lib/castThunk.d.ts +10 -10
- package/dist/lib/castThunk.js +3 -1
- package/dist/lib/castThunk.js.map +1 -1
- package/dist/lib/devMsg.cjs +8 -0
- package/dist/lib/devMsg.cjs.map +1 -0
- package/dist/lib/devMsg.d.ts +16 -0
- package/dist/lib/devMsg.js +8 -0
- package/dist/lib/devMsg.js.map +1 -0
- package/dist/lib/escapeHTML.cjs +43 -0
- package/dist/lib/escapeHTML.cjs.map +1 -0
- package/dist/lib/escapeHTML.d.ts +1 -0
- package/dist/lib/escapeHTML.js +43 -0
- package/dist/lib/escapeHTML.js.map +1 -0
- package/dist/lib/everyTagFilter.cjs +9 -0
- package/dist/lib/everyTagFilter.cjs.map +1 -0
- package/dist/lib/everyTagFilter.d.ts +9 -0
- package/dist/lib/everyTagFilter.js +9 -0
- package/dist/lib/everyTagFilter.js.map +1 -0
- package/dist/lib/findMasterRef.cjs +1 -1
- package/dist/lib/findMasterRef.cjs.map +1 -1
- package/dist/lib/findMasterRef.d.ts +10 -10
- package/dist/lib/findMasterRef.js.map +1 -1
- package/dist/lib/findRef.cjs +4 -4
- package/dist/lib/findRef.cjs.map +1 -1
- package/dist/lib/findRef.d.ts +13 -13
- package/dist/lib/findRef.js +3 -3
- package/dist/lib/findRef.js.map +1 -1
- package/dist/lib/findRefByID.cjs +1 -1
- package/dist/lib/findRefByID.cjs.map +1 -1
- package/dist/lib/findRefByID.d.ts +11 -11
- package/dist/lib/findRefByID.js.map +1 -1
- package/dist/lib/findRefByLabel.cjs +1 -1
- package/dist/lib/findRefByLabel.cjs.map +1 -1
- package/dist/lib/findRefByLabel.d.ts +11 -11
- package/dist/lib/findRefByLabel.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs +1 -1
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.d.ts +9 -9
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/isInternalURL.cjs +9 -0
- package/dist/lib/isInternalURL.cjs.map +1 -0
- package/dist/lib/isInternalURL.d.ts +8 -0
- package/dist/lib/isInternalURL.js +9 -0
- package/dist/lib/isInternalURL.js.map +1 -0
- package/dist/lib/minifyGraphQLQuery.cjs +1 -1
- package/dist/lib/minifyGraphQLQuery.cjs.map +1 -1
- package/dist/lib/minifyGraphQLQuery.d.ts +8 -8
- package/dist/lib/minifyGraphQLQuery.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs +7 -9
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.d.ts +9 -9
- package/dist/lib/serializerHelpers.js +6 -6
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/lib/someTagsFilter.cjs +9 -0
- package/dist/lib/someTagsFilter.cjs.map +1 -0
- package/dist/lib/someTagsFilter.d.ts +9 -0
- package/dist/lib/someTagsFilter.js +9 -0
- package/dist/lib/someTagsFilter.js.map +1 -0
- package/dist/lib/typeFilter.cjs +8 -0
- package/dist/lib/typeFilter.cjs.map +1 -0
- package/dist/lib/typeFilter.d.ts +8 -0
- package/dist/lib/typeFilter.js +8 -0
- package/dist/lib/typeFilter.js.map +1 -0
- package/dist/package.json.cjs +5 -0
- package/dist/package.json.cjs.map +1 -0
- package/dist/package.json.js +5 -0
- package/dist/package.json.js.map +1 -0
- package/dist/types/api/query.d.ts +42 -42
- package/dist/types/api/ref.d.ts +32 -32
- package/dist/types/api/release.d.ts +10 -10
- package/dist/types/api/repository.d.ts +100 -100
- package/dist/types/api/tags.d.ts +8 -8
- package/dist/types/model/boolean.d.ts +15 -15
- package/dist/types/model/color.d.ts +13 -13
- package/dist/types/model/contentRelationship.d.ts +18 -18
- package/dist/types/model/customType.d.ts +42 -42
- package/dist/types/model/date.d.ts +14 -14
- package/dist/types/model/embed.d.ts +13 -13
- package/dist/types/model/geoPoint.d.ts +12 -12
- package/dist/types/model/group.d.ts +15 -15
- package/dist/types/model/image.d.ts +31 -31
- package/dist/types/model/integrationFields.d.ts +14 -14
- package/dist/types/model/keyText.d.ts +13 -13
- package/dist/types/model/link.cjs +1 -1
- package/dist/types/model/link.cjs.map +1 -1
- package/dist/types/model/link.d.ts +27 -27
- package/dist/types/model/link.js.map +1 -1
- package/dist/types/model/linkToMedia.d.ts +16 -16
- package/dist/types/model/number.d.ts +15 -15
- package/dist/types/model/range.d.ts +14 -14
- package/dist/types/model/richText.d.ts +35 -35
- package/dist/types/model/select.d.ts +18 -18
- package/dist/types/model/separator.d.ts +10 -10
- package/dist/types/model/sharedSlice.d.ts +16 -19
- package/dist/types/model/sharedSliceVariation.d.ts +19 -22
- package/dist/types/model/slice.cjs +1 -1
- package/dist/types/model/slice.cjs.map +1 -1
- package/dist/types/model/slice.d.ts +33 -33
- package/dist/types/model/slice.js.map +1 -1
- package/dist/types/model/sliceZone.cjs +1 -1
- package/dist/types/model/sliceZone.cjs.map +1 -1
- package/dist/types/model/sliceZone.d.ts +41 -44
- package/dist/types/model/sliceZone.js.map +1 -1
- package/dist/types/model/timestamp.d.ts +14 -14
- package/dist/types/model/title.d.ts +7 -7
- package/dist/types/model/types.cjs +10 -1
- package/dist/types/model/types.cjs.map +1 -1
- package/dist/types/model/types.d.ts +62 -62
- package/dist/types/model/types.js +9 -0
- package/dist/types/model/types.js.map +1 -1
- package/dist/types/model/uid.d.ts +13 -13
- package/dist/types/value/boolean.d.ts +6 -6
- package/dist/types/value/color.d.ts +8 -8
- package/dist/types/value/contentRelationship.d.ts +29 -29
- package/dist/types/value/date.d.ts +8 -8
- package/dist/types/value/document.d.ts +113 -113
- package/dist/types/value/embed.cjs +1 -1
- package/dist/types/value/embed.cjs.map +1 -1
- package/dist/types/value/embed.d.ts +167 -167
- package/dist/types/value/embed.js.map +1 -1
- package/dist/types/value/geoPoint.d.ts +11 -11
- package/dist/types/value/group.d.ts +7 -7
- package/dist/types/value/image.d.ts +36 -36
- package/dist/types/value/integrationFields.d.ts +9 -9
- package/dist/types/value/keyText.d.ts +8 -8
- package/dist/types/value/link.cjs +1 -1
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.ts +40 -40
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/linkToMedia.d.ts +20 -20
- package/dist/types/value/number.d.ts +8 -8
- package/dist/types/value/richText.cjs +1 -1
- package/dist/types/value/richText.cjs.map +1 -1
- package/dist/types/value/richText.d.ts +203 -203
- package/dist/types/value/richText.js.map +1 -1
- package/dist/types/value/select.d.ts +9 -9
- package/dist/types/value/sharedSlice.d.ts +11 -11
- package/dist/types/value/sharedSliceVariation.d.ts +7 -7
- package/dist/types/value/slice.d.ts +13 -13
- package/dist/types/value/sliceZone.d.ts +12 -12
- package/dist/types/value/timestamp.d.ts +8 -8
- package/dist/types/value/title.d.ts +12 -12
- package/dist/types/value/types.d.ts +40 -40
- package/dist/types/webhook/apiUpdate.d.ts +52 -52
- package/dist/types/webhook/testTrigger.d.ts +9 -9
- package/dist/types/webhook/types.cjs +1 -1
- package/dist/types/webhook/types.cjs.map +1 -1
- package/dist/types/webhook/types.d.ts +18 -18
- package/dist/types/webhook/types.js.map +1 -1
- package/package.json +23 -24
- package/src/buildQueryURL.ts +179 -33
- package/src/{client.ts → createClient.ts} +214 -110
- package/src/filter.ts +356 -0
- package/src/getGraphQLEndpoint.ts +2 -1
- package/src/getRepositoryEndpoint.ts +2 -1
- package/src/getRepositoryName.ts +1 -1
- package/src/getToolbarSrc.ts +50 -0
- package/src/helpers/asDate.ts +3 -3
- package/src/helpers/asHTML.ts +122 -27
- package/src/helpers/asImagePixelDensitySrcSet.ts +1 -1
- package/src/helpers/asImageSrc.ts +1 -1
- package/src/helpers/asImageWidthSrcSet.ts +1 -1
- package/src/helpers/asLink.ts +37 -18
- package/src/helpers/asLinkAttrs.ts +127 -0
- package/src/helpers/asText.ts +4 -4
- package/src/helpers/documentToLinkField.ts +3 -3
- package/src/helpers/isFilled.ts +9 -11
- package/src/index.ts +59 -29
- package/src/lib/appendFilters.ts +26 -0
- package/src/lib/castArray.ts +3 -1
- package/src/lib/castThunk.ts +3 -2
- package/src/lib/devMsg.ts +20 -0
- package/src/lib/escapeHTML.ts +51 -0
- package/src/lib/everyTagFilter.ts +15 -0
- package/src/lib/findRef.ts +5 -5
- package/src/lib/isInternalURL.ts +14 -0
- package/src/lib/serializerHelpers.ts +20 -15
- package/src/lib/someTagsFilter.ts +15 -0
- package/src/lib/typeFilter.ts +12 -0
- package/src/types/api/query.ts +1 -1
- package/src/types/api/ref.ts +2 -2
- package/src/types/api/release.ts +1 -1
- package/src/types/api/repository.ts +1 -1
- package/src/types/api/tags.ts +1 -1
- package/src/types/model/boolean.ts +1 -1
- package/src/types/model/color.ts +1 -1
- package/src/types/model/contentRelationship.ts +2 -1
- package/src/types/model/date.ts +1 -1
- package/src/types/model/embed.ts +1 -1
- package/src/types/model/geoPoint.ts +1 -1
- package/src/types/model/group.ts +2 -2
- package/src/types/model/image.ts +3 -3
- package/src/types/model/integrationFields.ts +1 -1
- package/src/types/model/keyText.ts +1 -1
- package/src/types/model/link.ts +3 -3
- package/src/types/model/linkToMedia.ts +2 -1
- package/src/types/model/number.ts +1 -1
- package/src/types/model/richText.ts +3 -3
- package/src/types/model/select.ts +1 -1
- package/src/types/model/sharedSlice.ts +2 -5
- package/src/types/model/sharedSliceVariation.ts +1 -4
- package/src/types/model/slice.ts +5 -4
- package/src/types/model/sliceZone.ts +5 -7
- package/src/types/model/timestamp.ts +1 -1
- package/src/types/model/title.ts +1 -1
- package/src/types/model/types.ts +12 -16
- package/src/types/model/uid.ts +1 -1
- package/src/types/value/boolean.ts +1 -1
- package/src/types/value/color.ts +1 -1
- package/src/types/value/contentRelationship.ts +8 -9
- package/src/types/value/date.ts +1 -1
- package/src/types/value/document.ts +6 -5
- package/src/types/value/embed.ts +2 -2
- package/src/types/value/geoPoint.ts +1 -1
- package/src/types/value/group.ts +2 -2
- package/src/types/value/image.ts +1 -1
- package/src/types/value/integrationFields.ts +1 -1
- package/src/types/value/keyText.ts +1 -1
- package/src/types/value/link.ts +8 -8
- package/src/types/value/linkToMedia.ts +2 -1
- package/src/types/value/number.ts +1 -1
- package/src/types/value/richText.ts +6 -5
- package/src/types/value/select.ts +1 -1
- package/src/types/value/sharedSlice.ts +1 -1
- package/src/types/value/slice.ts +1 -1
- package/src/types/value/sliceZone.ts +2 -1
- package/src/types/value/timestamp.ts +1 -0
- package/src/types/value/title.ts +2 -1
- package/src/types/value/types.ts +9 -11
- package/src/types/webhook/apiUpdate.ts +4 -4
- package/src/types/webhook/testTrigger.ts +1 -1
- package/src/types/webhook/types.ts +2 -2
- package/dist/ForbiddenError.cjs.map +0 -1
- package/dist/ForbiddenError.js.map +0 -1
- package/dist/NotFoundError.cjs.map +0 -1
- package/dist/NotFoundError.js.map +0 -1
- package/dist/ParsingError.cjs.map +0 -1
- package/dist/ParsingError.js.map +0 -1
- package/dist/PrismicError.cjs.map +0 -1
- package/dist/PrismicError.js.map +0 -1
- package/dist/client.cjs +0 -414
- package/dist/client.cjs.map +0 -1
- package/dist/client.js +0 -414
- package/dist/client.js.map +0 -1
- package/dist/lib/appendPredicates.cjs +0 -14
- package/dist/lib/appendPredicates.cjs.map +0 -1
- package/dist/lib/appendPredicates.d.ts +0 -18
- package/dist/lib/appendPredicates.js +0 -14
- package/dist/lib/appendPredicates.js.map +0 -1
- package/dist/predicate.cjs +0 -68
- package/dist/predicate.cjs.map +0 -1
- package/dist/predicate.d.ts +0 -209
- package/dist/predicate.js +0 -68
- package/dist/predicate.js.map +0 -1
- package/dist/types/client.d.ts +0 -128
- package/dist/types/helpers.d.ts +0 -63
- package/dist/types/utils.d.ts +0 -28
- package/src/lib/appendPredicates.ts +0 -29
- package/src/predicate.ts +0 -359
- package/src/types/client.ts +0 -157
- package/src/types/helpers.ts +0 -103
- package/src/types/utils.ts +0 -34
- /package/dist/{ForbiddenError.js → errors/ForbiddenError.js} +0 -0
- /package/dist/{NotFoundError.js → errors/NotFoundError.js} +0 -0
- /package/dist/{ParsingError.js → errors/ParsingError.js} +0 -0
- /package/dist/{PrismicError.js → errors/PrismicError.js} +0 -0
- /package/src/{ForbiddenError.ts → errors/ForbiddenError.ts} +0 -0
- /package/src/{NotFoundError.ts → errors/NotFoundError.ts} +0 -0
- /package/src/{ParsingError.ts → errors/ParsingError.ts} +0 -0
- /package/src/{PrismicError.ts → errors/PrismicError.ts} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
import type { CustomTypeModelLinkSelectType } from "./link";
|
|
3
|
-
/**
|
|
4
|
-
* A Content Relationship Custom Type field.
|
|
5
|
-
*
|
|
6
|
-
* More details:
|
|
7
|
-
* {@link https://prismic.io/docs/
|
|
8
|
-
*/
|
|
9
|
-
export interface CustomTypeModelContentRelationshipField<CustomTypeIDs extends string = string, Tags extends string = string> {
|
|
10
|
-
type: typeof CustomTypeModelFieldType.Link;
|
|
11
|
-
config?: {
|
|
12
|
-
label?: string | null;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
select: typeof CustomTypeModelLinkSelectType.Document;
|
|
15
|
-
customtypes?: readonly CustomTypeIDs[];
|
|
16
|
-
tags?: readonly Tags[];
|
|
17
|
-
};
|
|
18
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
import type { CustomTypeModelLinkSelectType } from "./link";
|
|
3
|
+
/**
|
|
4
|
+
* A Content Relationship Custom Type field.
|
|
5
|
+
*
|
|
6
|
+
* More details:
|
|
7
|
+
* {@link https://prismic.io/docs/content-relationship}
|
|
8
|
+
*/
|
|
9
|
+
export interface CustomTypeModelContentRelationshipField<CustomTypeIDs extends string = string, Tags extends string = string> {
|
|
10
|
+
type: typeof CustomTypeModelFieldType.Link;
|
|
11
|
+
config?: {
|
|
12
|
+
label?: string | null;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
select: typeof CustomTypeModelLinkSelectType.Document;
|
|
15
|
+
customtypes?: readonly CustomTypeIDs[];
|
|
16
|
+
tags?: readonly Tags[];
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { CustomTypeModelField } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* A Prismic Custom Type model.
|
|
4
|
-
*
|
|
5
|
-
* @typeParam ID - API ID of the Custom Type.
|
|
6
|
-
* @typeParam Definition - The Custom Type's tabs and their fields.
|
|
7
|
-
*/
|
|
8
|
-
export interface CustomTypeModel<ID extends string = string, Definition extends CustomTypeModelDefinition = CustomTypeModelDefinition> {
|
|
9
|
-
/**
|
|
10
|
-
* The ID of the Custom Type model.
|
|
11
|
-
*/
|
|
12
|
-
id: ID;
|
|
13
|
-
/**
|
|
14
|
-
* The human readable name of the Custom Type Model.
|
|
15
|
-
*/
|
|
16
|
-
label: string | null | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Determines if more than one document for the Custom Type can be created.
|
|
19
|
-
*/
|
|
20
|
-
repeatable: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* The Custom Type model definition.
|
|
23
|
-
*/
|
|
24
|
-
json: Definition;
|
|
25
|
-
/**
|
|
26
|
-
* Determines if new documents for the Custom Type can be created.
|
|
27
|
-
*/
|
|
28
|
-
status: boolean;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* A Prismic Custom Type's tabs and their fields.
|
|
32
|
-
*
|
|
33
|
-
* @typeParam TabName - Names of Custom Type tabs.
|
|
34
|
-
*/
|
|
35
|
-
export
|
|
36
|
-
/**
|
|
37
|
-
* A Custom Type's tab. Each tab can contain any number of fields but is limited
|
|
38
|
-
* to one Slice Zone.
|
|
39
|
-
*
|
|
40
|
-
* @typeParam FieldName - API IDs of the fields.
|
|
41
|
-
*/
|
|
42
|
-
export
|
|
1
|
+
import { CustomTypeModelField } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Prismic Custom Type model.
|
|
4
|
+
*
|
|
5
|
+
* @typeParam ID - API ID of the Custom Type.
|
|
6
|
+
* @typeParam Definition - The Custom Type's tabs and their fields.
|
|
7
|
+
*/
|
|
8
|
+
export interface CustomTypeModel<ID extends string = string, Definition extends CustomTypeModelDefinition = CustomTypeModelDefinition> {
|
|
9
|
+
/**
|
|
10
|
+
* The ID of the Custom Type model.
|
|
11
|
+
*/
|
|
12
|
+
id: ID;
|
|
13
|
+
/**
|
|
14
|
+
* The human readable name of the Custom Type Model.
|
|
15
|
+
*/
|
|
16
|
+
label: string | null | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Determines if more than one document for the Custom Type can be created.
|
|
19
|
+
*/
|
|
20
|
+
repeatable: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The Custom Type model definition.
|
|
23
|
+
*/
|
|
24
|
+
json: Definition;
|
|
25
|
+
/**
|
|
26
|
+
* Determines if new documents for the Custom Type can be created.
|
|
27
|
+
*/
|
|
28
|
+
status: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A Prismic Custom Type's tabs and their fields.
|
|
32
|
+
*
|
|
33
|
+
* @typeParam TabName - Names of Custom Type tabs.
|
|
34
|
+
*/
|
|
35
|
+
export type CustomTypeModelDefinition<TabName extends string = string> = Record<TabName, CustomTypeModelTab>;
|
|
36
|
+
/**
|
|
37
|
+
* A Custom Type's tab. Each tab can contain any number of fields but is limited
|
|
38
|
+
* to one Slice Zone.
|
|
39
|
+
*
|
|
40
|
+
* @typeParam FieldName - API IDs of the fields.
|
|
41
|
+
*/
|
|
42
|
+
export type CustomTypeModelTab<Fields extends Record<string, CustomTypeModelField> = Record<string, CustomTypeModelField>> = Fields;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* A Date Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*/
|
|
7
|
-
export interface CustomTypeModelDateField {
|
|
8
|
-
type: typeof CustomTypeModelFieldType.Date;
|
|
9
|
-
config?: {
|
|
10
|
-
label?: string | null;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
default?: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Date Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/date}
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomTypeModelDateField {
|
|
8
|
+
type: typeof CustomTypeModelFieldType.Date;
|
|
9
|
+
config?: {
|
|
10
|
+
label?: string | null;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
default?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* An Embed Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*/
|
|
7
|
-
export interface CustomTypeModelEmbedField {
|
|
8
|
-
type: typeof CustomTypeModelFieldType.Embed;
|
|
9
|
-
config?: {
|
|
10
|
-
label?: string | null;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* An Embed Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/embed}
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomTypeModelEmbedField {
|
|
8
|
+
type: typeof CustomTypeModelFieldType.Embed;
|
|
9
|
+
config?: {
|
|
10
|
+
label?: string | null;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* A GeoPoint Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*/
|
|
7
|
-
export interface CustomTypeModelGeoPointField {
|
|
8
|
-
type: typeof CustomTypeModelFieldType.GeoPoint;
|
|
9
|
-
config?: {
|
|
10
|
-
label?: string | null;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A GeoPoint Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/geopoint}
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomTypeModelGeoPointField {
|
|
8
|
+
type: typeof CustomTypeModelFieldType.GeoPoint;
|
|
9
|
+
config?: {
|
|
10
|
+
label?: string | null;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
/**
|
|
3
|
-
* A Group Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*
|
|
7
|
-
* @typeParam Fields - A record of fields that can be repeated.
|
|
8
|
-
*/
|
|
9
|
-
export interface CustomTypeModelGroupField<Fields extends Record<string, CustomTypeModelFieldForGroup> = Record<string, CustomTypeModelFieldForGroup>> {
|
|
10
|
-
type: typeof CustomTypeModelFieldType.Group;
|
|
11
|
-
config?: {
|
|
12
|
-
label?: string | null;
|
|
13
|
-
fields?: Fields;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldForGroup, CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Group Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/group}
|
|
6
|
+
*
|
|
7
|
+
* @typeParam Fields - A record of fields that can be repeated.
|
|
8
|
+
*/
|
|
9
|
+
export interface CustomTypeModelGroupField<Fields extends Record<string, CustomTypeModelFieldForGroup> = Record<string, CustomTypeModelFieldForGroup>> {
|
|
10
|
+
type: typeof CustomTypeModelFieldType.Group;
|
|
11
|
+
config?: {
|
|
12
|
+
label?: string | null;
|
|
13
|
+
fields?: Fields;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Dimension constraints for an Image Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*/
|
|
7
|
-
export interface CustomTypeModelImageConstraint {
|
|
8
|
-
width?: number | null;
|
|
9
|
-
height?: number | null;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* A thumbnail for an Image Custom Type field.
|
|
13
|
-
*
|
|
14
|
-
* More details: {@link https://prismic.io/docs/
|
|
15
|
-
*/
|
|
16
|
-
export interface CustomTypeModelImageThumbnail<Name extends string = string> extends CustomTypeModelImageConstraint {
|
|
17
|
-
name: Name;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* An Image Custom Type field.
|
|
21
|
-
*
|
|
22
|
-
* More details: {@link https://prismic.io/docs/
|
|
23
|
-
*/
|
|
24
|
-
export interface CustomTypeModelImageField<ThumbnailNames extends string = string> {
|
|
25
|
-
type: typeof CustomTypeModelFieldType.Image;
|
|
26
|
-
config?: {
|
|
27
|
-
label?: string | null;
|
|
28
|
-
constraint?: CustomTypeModelImageConstraint;
|
|
29
|
-
thumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[];
|
|
30
|
-
};
|
|
31
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Dimension constraints for an Image Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/image}
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomTypeModelImageConstraint {
|
|
8
|
+
width?: number | null;
|
|
9
|
+
height?: number | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A thumbnail for an Image Custom Type field.
|
|
13
|
+
*
|
|
14
|
+
* More details: {@link https://prismic.io/docs/image}
|
|
15
|
+
*/
|
|
16
|
+
export interface CustomTypeModelImageThumbnail<Name extends string = string> extends CustomTypeModelImageConstraint {
|
|
17
|
+
name: Name;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* An Image Custom Type field.
|
|
21
|
+
*
|
|
22
|
+
* More details: {@link https://prismic.io/docs/image}
|
|
23
|
+
*/
|
|
24
|
+
export interface CustomTypeModelImageField<ThumbnailNames extends string = string> {
|
|
25
|
+
type: typeof CustomTypeModelFieldType.Image;
|
|
26
|
+
config?: {
|
|
27
|
+
label?: string | null;
|
|
28
|
+
constraint?: CustomTypeModelImageConstraint;
|
|
29
|
+
thumbnails?: readonly CustomTypeModelImageThumbnail<ThumbnailNames>[];
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* An Integration Fields Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*/
|
|
7
|
-
export interface CustomTypeModelIntegrationFieldsField {
|
|
8
|
-
type: typeof CustomTypeModelFieldType.IntegrationFields;
|
|
9
|
-
config?: {
|
|
10
|
-
label?: string | null;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
catalog?: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* An Integration Fields Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/integration-fields}
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomTypeModelIntegrationFieldsField {
|
|
8
|
+
type: typeof CustomTypeModelFieldType.IntegrationFields;
|
|
9
|
+
config?: {
|
|
10
|
+
label?: string | null;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
catalog?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* A Key Text Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*/
|
|
7
|
-
export interface CustomTypeModelKeyTextField {
|
|
8
|
-
type: typeof CustomTypeModelFieldType.Text;
|
|
9
|
-
config?: {
|
|
10
|
-
label?: string | null;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Key Text Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/key-text}
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomTypeModelKeyTextField {
|
|
8
|
+
type: typeof CustomTypeModelFieldType.Text;
|
|
9
|
+
config?: {
|
|
10
|
+
label?: string | null;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const CustomTypeModelLinkSelectType = {
|
|
4
4
|
Document: "document",
|
|
5
5
|
Media: "media",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.cjs","sources":["
|
|
1
|
+
{"version":3,"file":"link.cjs","sources":["../../../../src/types/model/link.ts"],"sourcesContent":["import type { CustomTypeModelFieldType } from \"./types\";\n\n/**\n * A Link Custom Type field.\n *\n * More details:\n * {@link https://prismic.io/docs/link}\n */\nexport interface CustomTypeModelLinkField {\n\ttype: typeof CustomTypeModelFieldType.Link;\n\tconfig?: {\n\t\tlabel?: string | null;\n\t\tplaceholder?: string;\n\t\tselect?:\n\t\t\t| null\n\t\t\t| (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType];\n\t\tallowTargetBlank?: boolean;\n\t};\n}\n\n/**\n * Type of a Link Custom Type field.\n *\n * More details:\n * {@link https://prismic.io/docs/link}\n */\nexport const CustomTypeModelLinkSelectType = {\n\tDocument: \"document\",\n\tMedia: \"media\",\n\tWeb: \"web\",\n} as const;\n"],"names":[],"mappings":";;AA0BO,MAAM,gCAAgC;AAAA,EAC5C,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;;"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* A Link Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details:
|
|
6
|
-
* {@link https://prismic.io/docs/
|
|
7
|
-
*/
|
|
8
|
-
export interface CustomTypeModelLinkField {
|
|
9
|
-
type: typeof CustomTypeModelFieldType.Link;
|
|
10
|
-
config?: {
|
|
11
|
-
label?: string | null;
|
|
12
|
-
placeholder?: string;
|
|
13
|
-
select?: null | typeof CustomTypeModelLinkSelectType[keyof typeof CustomTypeModelLinkSelectType];
|
|
14
|
-
allowTargetBlank?: boolean;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Type of a Link Custom Type field.
|
|
19
|
-
*
|
|
20
|
-
* More details:
|
|
21
|
-
* {@link https://prismic.io/docs/
|
|
22
|
-
*/
|
|
23
|
-
export declare const CustomTypeModelLinkSelectType: {
|
|
24
|
-
readonly Document: "document";
|
|
25
|
-
readonly Media: "media";
|
|
26
|
-
readonly Web: "web";
|
|
27
|
-
};
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Link Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details:
|
|
6
|
+
* {@link https://prismic.io/docs/link}
|
|
7
|
+
*/
|
|
8
|
+
export interface CustomTypeModelLinkField {
|
|
9
|
+
type: typeof CustomTypeModelFieldType.Link;
|
|
10
|
+
config?: {
|
|
11
|
+
label?: string | null;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
select?: null | (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType];
|
|
14
|
+
allowTargetBlank?: boolean;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Type of a Link Custom Type field.
|
|
19
|
+
*
|
|
20
|
+
* More details:
|
|
21
|
+
* {@link https://prismic.io/docs/link}
|
|
22
|
+
*/
|
|
23
|
+
export declare const CustomTypeModelLinkSelectType: {
|
|
24
|
+
readonly Document: "document";
|
|
25
|
+
readonly Media: "media";
|
|
26
|
+
readonly Web: "web";
|
|
27
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sources":["
|
|
1
|
+
{"version":3,"file":"link.js","sources":["../../../../src/types/model/link.ts"],"sourcesContent":["import type { CustomTypeModelFieldType } from \"./types\";\n\n/**\n * A Link Custom Type field.\n *\n * More details:\n * {@link https://prismic.io/docs/link}\n */\nexport interface CustomTypeModelLinkField {\n\ttype: typeof CustomTypeModelFieldType.Link;\n\tconfig?: {\n\t\tlabel?: string | null;\n\t\tplaceholder?: string;\n\t\tselect?:\n\t\t\t| null\n\t\t\t| (typeof CustomTypeModelLinkSelectType)[keyof typeof CustomTypeModelLinkSelectType];\n\t\tallowTargetBlank?: boolean;\n\t};\n}\n\n/**\n * Type of a Link Custom Type field.\n *\n * More details:\n * {@link https://prismic.io/docs/link}\n */\nexport const CustomTypeModelLinkSelectType = {\n\tDocument: \"document\",\n\tMedia: \"media\",\n\tWeb: \"web\",\n} as const;\n"],"names":[],"mappings":"AA0BO,MAAM,gCAAgC;AAAA,EAC5C,UAAU;AAAA,EACV,OAAO;AAAA,EACP,KAAK;;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
import type { CustomTypeModelLinkSelectType } from "./link";
|
|
3
|
-
/**
|
|
4
|
-
* A Link to Media Custom Type field.
|
|
5
|
-
*
|
|
6
|
-
* More details:
|
|
7
|
-
* {@link https://prismic.io/docs/
|
|
8
|
-
*/
|
|
9
|
-
export interface CustomTypeModelLinkToMediaField {
|
|
10
|
-
type: typeof CustomTypeModelFieldType.Link;
|
|
11
|
-
config?: {
|
|
12
|
-
label?: string | null;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
select: typeof CustomTypeModelLinkSelectType.Media;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
import type { CustomTypeModelLinkSelectType } from "./link";
|
|
3
|
+
/**
|
|
4
|
+
* A Link to Media Custom Type field.
|
|
5
|
+
*
|
|
6
|
+
* More details:
|
|
7
|
+
* {@link https://prismic.io/docs/media}
|
|
8
|
+
*/
|
|
9
|
+
export interface CustomTypeModelLinkToMediaField {
|
|
10
|
+
type: typeof CustomTypeModelFieldType.Link;
|
|
11
|
+
config?: {
|
|
12
|
+
label?: string | null;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
select: typeof CustomTypeModelLinkSelectType.Media;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* A Number Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*/
|
|
7
|
-
export interface CustomTypeModelNumberField {
|
|
8
|
-
type: typeof CustomTypeModelFieldType.Number;
|
|
9
|
-
config?: {
|
|
10
|
-
label?: string | null;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
min?: number;
|
|
13
|
-
max?: number;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Number Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/number}
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomTypeModelNumberField {
|
|
8
|
+
type: typeof CustomTypeModelFieldType.Number;
|
|
9
|
+
config?: {
|
|
10
|
+
label?: string | null;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
min?: number;
|
|
13
|
+
max?: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* @deprecated - Legacy field. Use `CustomTypeModelNumberField` instead.
|
|
4
|
-
*/
|
|
5
|
-
export interface CustomTypeModelRangeField {
|
|
6
|
-
type: typeof CustomTypeModelFieldType.Range;
|
|
7
|
-
config?: {
|
|
8
|
-
label?: string | null;
|
|
9
|
-
placeholder?: string;
|
|
10
|
-
min?: number;
|
|
11
|
-
max?: number;
|
|
12
|
-
step?: number;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated - Legacy field. Use `CustomTypeModelNumberField` instead.
|
|
4
|
+
*/
|
|
5
|
+
export interface CustomTypeModelRangeField {
|
|
6
|
+
type: typeof CustomTypeModelFieldType.Range;
|
|
7
|
+
config?: {
|
|
8
|
+
label?: string | null;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
step?: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* A Rich Text Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*/
|
|
7
|
-
export
|
|
8
|
-
/**
|
|
9
|
-
* A Rich Text Custom Type field which supports multiple blocks of content.
|
|
10
|
-
*
|
|
11
|
-
* More details: {@link https://prismic.io/docs/
|
|
12
|
-
*/
|
|
13
|
-
export interface CustomTypeModelRichTextMultiField {
|
|
14
|
-
type: typeof CustomTypeModelFieldType.StructuredText;
|
|
15
|
-
config?: {
|
|
16
|
-
label?: string | null;
|
|
17
|
-
placeholder?: string;
|
|
18
|
-
allowTargetBlank?: boolean;
|
|
19
|
-
multi?: string;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* A Rich Text Custom Type field which supports one block of content.
|
|
24
|
-
*
|
|
25
|
-
* More details: {@link https://prismic.io/docs/
|
|
26
|
-
*/
|
|
27
|
-
export interface CustomTypeModelRichTextSingleField {
|
|
28
|
-
type: typeof CustomTypeModelFieldType.StructuredText;
|
|
29
|
-
config?: {
|
|
30
|
-
label?: string | null;
|
|
31
|
-
placeholder?: string;
|
|
32
|
-
allowTargetBlank?: boolean;
|
|
33
|
-
single?: string;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Rich Text Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/rich-text-title}
|
|
6
|
+
*/
|
|
7
|
+
export type CustomTypeModelRichTextField = CustomTypeModelRichTextMultiField | CustomTypeModelRichTextSingleField;
|
|
8
|
+
/**
|
|
9
|
+
* A Rich Text Custom Type field which supports multiple blocks of content.
|
|
10
|
+
*
|
|
11
|
+
* More details: {@link https://prismic.io/docs/rich-text-title}
|
|
12
|
+
*/
|
|
13
|
+
export interface CustomTypeModelRichTextMultiField {
|
|
14
|
+
type: typeof CustomTypeModelFieldType.StructuredText;
|
|
15
|
+
config?: {
|
|
16
|
+
label?: string | null;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
allowTargetBlank?: boolean;
|
|
19
|
+
multi?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A Rich Text Custom Type field which supports one block of content.
|
|
24
|
+
*
|
|
25
|
+
* More details: {@link https://prismic.io/docs/rich-text-title}
|
|
26
|
+
*/
|
|
27
|
+
export interface CustomTypeModelRichTextSingleField {
|
|
28
|
+
type: typeof CustomTypeModelFieldType.StructuredText;
|
|
29
|
+
config?: {
|
|
30
|
+
label?: string | null;
|
|
31
|
+
placeholder?: string;
|
|
32
|
+
allowTargetBlank?: boolean;
|
|
33
|
+
single?: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* A Select Custom Type field.
|
|
4
|
-
*
|
|
5
|
-
* More details: {@link https://prismic.io/docs/
|
|
6
|
-
*
|
|
7
|
-
* @typeParam Options - Options for the field.
|
|
8
|
-
* @typeParam DefaultValue - Default value for the field.
|
|
9
|
-
*/
|
|
10
|
-
export interface CustomTypeModelSelectField<Option extends string = string, DefaultValue extends Option = Option> {
|
|
11
|
-
type: typeof CustomTypeModelFieldType.Select;
|
|
12
|
-
config?: {
|
|
13
|
-
label?: string | null;
|
|
14
|
-
placeholder?: string;
|
|
15
|
-
options?: readonly Option[];
|
|
16
|
-
default_value?: DefaultValue;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Select Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/select}
|
|
6
|
+
*
|
|
7
|
+
* @typeParam Options - Options for the field.
|
|
8
|
+
* @typeParam DefaultValue - Default value for the field.
|
|
9
|
+
*/
|
|
10
|
+
export interface CustomTypeModelSelectField<Option extends string = string, DefaultValue extends Option = Option> {
|
|
11
|
+
type: typeof CustomTypeModelFieldType.Select;
|
|
12
|
+
config?: {
|
|
13
|
+
label?: string | null;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
options?: readonly Option[];
|
|
16
|
+
default_value?: DefaultValue;
|
|
17
|
+
};
|
|
18
|
+
}
|