@prismicio/client 6.7.3 → 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 +25 -6
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.ts +207 -130
- package/dist/buildQueryURL.js +25 -6
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.d.ts +5 -5
- package/dist/createClient.cjs +1142 -0
- package/dist/createClient.cjs.map +1 -0
- package/dist/{client.d.ts → createClient.d.ts} +980 -929
- package/dist/createClient.js +1142 -0
- package/dist/createClient.js.map +1 -0
- 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/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/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/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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +14 -0
- package/dist/helpers/asDate.cjs.map +1 -0
- package/dist/helpers/asDate.d.ts +16 -0
- package/dist/helpers/asDate.js +14 -0
- package/dist/helpers/asDate.js.map +1 -0
- package/dist/helpers/asHTML.cjs +80 -0
- package/dist/helpers/asHTML.cjs.map +1 -0
- package/dist/helpers/asHTML.d.ts +77 -0
- package/dist/helpers/asHTML.js +80 -0
- package/dist/helpers/asHTML.js.map +1 -0
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +21 -0
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -0
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +52 -0
- package/dist/helpers/asImagePixelDensitySrcSet.js +21 -0
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -0
- package/dist/helpers/asImageSrc.cjs +13 -0
- package/dist/helpers/asImageSrc.cjs.map +1 -0
- package/dist/helpers/asImageSrc.d.ts +27 -0
- package/dist/helpers/asImageSrc.js +13 -0
- package/dist/helpers/asImageSrc.js.map +1 -0
- package/dist/helpers/asImageWidthSrcSet.cjs +45 -0
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -0
- package/dist/helpers/asImageWidthSrcSet.d.ts +60 -0
- package/dist/helpers/asImageWidthSrcSet.js +45 -0
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -0
- package/dist/helpers/asLink.cjs +38 -0
- package/dist/helpers/asLink.cjs.map +1 -0
- package/dist/helpers/asLink.d.ts +34 -0
- package/dist/helpers/asLink.js +38 -0
- package/dist/helpers/asLink.js.map +1 -0
- 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 +12 -0
- package/dist/helpers/asText.cjs.map +1 -0
- package/dist/helpers/asText.d.ts +16 -0
- package/dist/helpers/asText.js +12 -0
- package/dist/helpers/asText.js.map +1 -0
- package/dist/helpers/documentToLinkField.cjs +26 -0
- package/dist/helpers/documentToLinkField.cjs.map +1 -0
- package/dist/helpers/documentToLinkField.d.ts +15 -0
- package/dist/helpers/documentToLinkField.js +26 -0
- package/dist/helpers/documentToLinkField.js.map +1 -0
- package/dist/helpers/isFilled.cjs +67 -0
- package/dist/helpers/isFilled.cjs.map +1 -0
- package/dist/helpers/isFilled.d.ts +172 -0
- package/dist/helpers/isFilled.js +67 -0
- package/dist/helpers/isFilled.js.map +1 -0
- package/dist/index.cjs +56 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +138 -88
- package/dist/index.js +50 -16
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.d.ts +10 -10
- package/dist/isRepositoryName.d.ts +9 -9
- 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 +3 -1
- 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 +3 -1
- 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.map +1 -1
- package/dist/lib/findMasterRef.d.ts +10 -10
- package/dist/lib/findMasterRef.js.map +1 -1
- package/dist/lib/findRef.cjs +3 -3
- 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.map +1 -1
- package/dist/lib/findRefByID.d.ts +11 -11
- package/dist/lib/findRefByID.js.map +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 +1 -1
- 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.d.ts +8 -8
- package/dist/lib/serializerHelpers.cjs +54 -0
- package/dist/lib/serializerHelpers.cjs.map +1 -0
- package/dist/lib/serializerHelpers.d.ts +9 -0
- package/dist/lib/serializerHelpers.js +54 -0
- package/dist/lib/serializerHelpers.js.map +1 -0
- 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 -0
- package/dist/types/api/ref.d.ts +32 -0
- package/dist/types/api/release.d.ts +10 -0
- package/dist/types/api/repository.d.ts +100 -0
- package/dist/types/api/tags.d.ts +8 -0
- package/dist/types/model/boolean.d.ts +15 -0
- package/dist/types/model/color.d.ts +13 -0
- package/dist/types/model/contentRelationship.d.ts +18 -0
- package/dist/types/model/customType.d.ts +42 -0
- package/dist/types/model/date.d.ts +14 -0
- package/dist/types/model/embed.d.ts +13 -0
- package/dist/types/model/geoPoint.d.ts +12 -0
- package/dist/types/model/group.d.ts +15 -0
- package/dist/types/model/image.d.ts +31 -0
- package/dist/types/model/integrationFields.d.ts +14 -0
- package/dist/types/model/keyText.d.ts +13 -0
- package/dist/types/model/link.cjs +9 -0
- package/dist/types/model/link.cjs.map +1 -0
- package/dist/types/model/link.d.ts +27 -0
- package/dist/types/model/link.js +9 -0
- package/dist/types/model/link.js.map +1 -0
- package/dist/types/model/linkToMedia.d.ts +16 -0
- package/dist/types/model/number.d.ts +15 -0
- package/dist/types/model/range.d.ts +14 -0
- package/dist/types/model/richText.d.ts +35 -0
- package/dist/types/model/select.d.ts +18 -0
- package/dist/types/model/separator.d.ts +10 -0
- package/dist/types/model/sharedSlice.d.ts +16 -0
- package/dist/types/model/sharedSliceVariation.d.ts +19 -0
- package/dist/types/model/slice.cjs +8 -0
- package/dist/types/model/slice.cjs.map +1 -0
- package/dist/types/model/slice.d.ts +33 -0
- package/dist/types/model/slice.js +8 -0
- package/dist/types/model/slice.js.map +1 -0
- package/dist/types/model/sliceZone.cjs +8 -0
- package/dist/types/model/sliceZone.cjs.map +1 -0
- package/dist/types/model/sliceZone.d.ts +41 -0
- package/dist/types/model/sliceZone.js +8 -0
- package/dist/types/model/sliceZone.js.map +1 -0
- package/dist/types/model/timestamp.d.ts +14 -0
- package/dist/types/model/title.d.ts +7 -0
- package/dist/types/model/types.cjs +34 -0
- package/dist/types/model/types.cjs.map +1 -0
- package/dist/types/model/types.d.ts +62 -0
- package/dist/types/model/types.js +34 -0
- package/dist/types/model/types.js.map +1 -0
- package/dist/types/model/uid.d.ts +13 -0
- package/dist/types/value/boolean.d.ts +6 -0
- package/dist/types/value/color.d.ts +8 -0
- package/dist/types/value/contentRelationship.d.ts +29 -0
- package/dist/types/value/date.d.ts +8 -0
- package/dist/types/value/document.d.ts +113 -0
- package/dist/types/value/embed.cjs +10 -0
- package/dist/types/value/embed.cjs.map +1 -0
- package/dist/types/value/embed.d.ts +167 -0
- package/dist/types/value/embed.js +10 -0
- package/dist/types/value/embed.js.map +1 -0
- package/dist/types/value/geoPoint.d.ts +11 -0
- package/dist/types/value/group.d.ts +7 -0
- package/dist/types/value/image.d.ts +36 -0
- package/dist/types/value/integrationFields.d.ts +9 -0
- package/dist/types/value/keyText.d.ts +8 -0
- package/dist/types/value/link.cjs +10 -0
- package/dist/types/value/link.cjs.map +1 -0
- package/dist/types/value/link.d.ts +40 -0
- package/dist/types/value/link.js +10 -0
- package/dist/types/value/link.js.map +1 -0
- package/dist/types/value/linkToMedia.d.ts +20 -0
- package/dist/types/value/number.d.ts +8 -0
- package/dist/types/value/richText.cjs +25 -0
- package/dist/types/value/richText.cjs.map +1 -0
- package/dist/types/value/richText.d.ts +203 -0
- package/dist/types/value/richText.js +25 -0
- package/dist/types/value/richText.js.map +1 -0
- package/dist/types/value/select.d.ts +9 -0
- package/dist/types/value/sharedSlice.d.ts +11 -0
- package/dist/types/value/sharedSliceVariation.d.ts +7 -0
- package/dist/types/value/slice.d.ts +13 -0
- package/dist/types/value/sliceZone.d.ts +12 -0
- package/dist/types/value/timestamp.d.ts +8 -0
- package/dist/types/value/title.d.ts +12 -0
- package/dist/types/value/types.d.ts +40 -0
- package/dist/types/webhook/apiUpdate.d.ts +52 -0
- package/dist/types/webhook/testTrigger.d.ts +9 -0
- package/dist/types/webhook/types.cjs +8 -0
- package/dist/types/webhook/types.cjs.map +1 -0
- package/dist/types/webhook/types.d.ts +18 -0
- package/dist/types/webhook/types.js +8 -0
- package/dist/types/webhook/types.js.map +1 -0
- package/package.json +42 -36
- package/src/buildQueryURL.ts +179 -32
- package/src/{client.ts → createClient.ts} +248 -186
- 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 +48 -0
- package/src/helpers/asHTML.ts +249 -0
- package/src/helpers/asImagePixelDensitySrcSet.ts +96 -0
- package/src/helpers/asImageSrc.ts +41 -0
- package/src/helpers/asImageWidthSrcSet.ts +139 -0
- package/src/helpers/asLink.ts +118 -0
- package/src/helpers/asLinkAttrs.ts +127 -0
- package/src/helpers/asText.ts +29 -0
- package/src/helpers/documentToLinkField.ts +47 -0
- package/src/helpers/isFilled.ts +288 -0
- package/src/index.ts +277 -31
- 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/findMasterRef.ts +2 -2
- package/src/lib/findRef.ts +6 -9
- package/src/lib/findRefByID.ts +2 -2
- package/src/lib/findRefByLabel.ts +2 -5
- package/src/lib/getPreviewCookie.ts +1 -1
- package/src/lib/isInternalURL.ts +14 -0
- package/src/lib/serializerHelpers.ts +101 -0
- package/src/lib/someTagsFilter.ts +15 -0
- package/src/lib/typeFilter.ts +12 -0
- package/src/types/api/query.ts +50 -0
- package/src/types/api/ref.ts +36 -0
- package/src/types/api/release.ts +11 -0
- package/src/types/api/repository.ts +117 -0
- package/src/types/api/tags.ts +8 -0
- package/src/types/model/boolean.ts +16 -0
- package/src/types/model/color.ts +14 -0
- package/src/types/model/contentRelationship.ts +23 -0
- package/src/types/model/customType.ts +61 -0
- package/src/types/model/date.ts +15 -0
- package/src/types/model/embed.ts +14 -0
- package/src/types/model/geoPoint.ts +13 -0
- package/src/types/model/group.ts +24 -0
- package/src/types/model/image.ts +37 -0
- package/src/types/model/integrationFields.ts +15 -0
- package/src/types/model/keyText.ts +14 -0
- package/src/types/model/link.ts +31 -0
- package/src/types/model/linkToMedia.ts +18 -0
- package/src/types/model/number.ts +16 -0
- package/src/types/model/range.ts +15 -0
- package/src/types/model/richText.ts +40 -0
- package/src/types/model/select.ts +22 -0
- package/src/types/model/separator.ts +11 -0
- package/src/types/model/sharedSlice.ts +20 -0
- package/src/types/model/sharedSliceVariation.ts +30 -0
- package/src/types/model/slice.ts +50 -0
- package/src/types/model/sliceZone.ts +60 -0
- package/src/types/model/timestamp.ts +15 -0
- package/src/types/model/title.ts +8 -0
- package/src/types/model/types.ts +87 -0
- package/src/types/model/uid.ts +14 -0
- package/src/types/value/boolean.ts +6 -0
- package/src/types/value/color.ts +10 -0
- package/src/types/value/contentRelationship.ts +47 -0
- package/src/types/value/date.ts +10 -0
- package/src/types/value/document.ts +143 -0
- package/src/types/value/embed.ts +196 -0
- package/src/types/value/geoPoint.ts +15 -0
- package/src/types/value/group.ts +14 -0
- package/src/types/value/image.ts +67 -0
- package/src/types/value/integrationFields.ts +13 -0
- package/src/types/value/keyText.ts +10 -0
- package/src/types/value/link.ts +59 -0
- package/src/types/value/linkToMedia.ts +26 -0
- package/src/types/value/number.ts +10 -0
- package/src/types/value/richText.ts +287 -0
- package/src/types/value/select.ts +13 -0
- package/src/types/value/sharedSlice.ts +15 -0
- package/src/types/value/sharedSliceVariation.ts +18 -0
- package/src/types/value/slice.ts +24 -0
- package/src/types/value/sliceZone.ts +17 -0
- package/src/types/value/timestamp.ts +13 -0
- package/src/types/value/title.ts +32 -0
- package/src/types/value/types.ts +58 -0
- package/src/types/webhook/apiUpdate.ts +56 -0
- package/src/types/webhook/testTrigger.ts +10 -0
- package/src/types/webhook/types.ts +21 -0
- 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 -436
- package/dist/client.cjs.map +0 -1
- package/dist/client.js +0 -419
- 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/lib/orElseThrow.d.ts +0 -11
- 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.d.ts +0 -156
- package/src/lib/appendPredicates.ts +0 -29
- package/src/lib/orElseThrow.ts +0 -17
- package/src/predicate.ts +0 -359
- package/src/types.ts +0 -191
- /package/dist/{ForbiddenError.cjs → errors/ForbiddenError.cjs} +0 -0
- /package/dist/{ForbiddenError.js → errors/ForbiddenError.js} +0 -0
- /package/dist/{NotFoundError.cjs → errors/NotFoundError.cjs} +0 -0
- /package/dist/{NotFoundError.js → errors/NotFoundError.js} +0 -0
- /package/dist/{ParsingError.cjs → errors/ParsingError.cjs} +0 -0
- /package/dist/{ParsingError.js → errors/ParsingError.js} +0 -0
- /package/dist/{PrismicError.cjs → errors/PrismicError.cjs} +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
|
@@ -0,0 +1,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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated - Legacy field. Do not use.
|
|
4
|
+
*/
|
|
5
|
+
export interface CustomTypeModelSeparatorField {
|
|
6
|
+
type: typeof CustomTypeModelFieldType.Separator;
|
|
7
|
+
config?: {
|
|
8
|
+
label?: string | null;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SharedSliceModelVariation } from "./sharedSliceVariation";
|
|
2
|
+
import type { CustomTypeModelSliceType } from "./sliceZone";
|
|
3
|
+
/**
|
|
4
|
+
* A Prismic Shared Slice model.
|
|
5
|
+
*
|
|
6
|
+
* More details: {@link https://prismic.io/docs/slice}
|
|
7
|
+
*
|
|
8
|
+
* @typeParam Variation - A variation for the Shared Slice.
|
|
9
|
+
*/
|
|
10
|
+
export interface SharedSliceModel<ID extends string = string, Variation extends SharedSliceModelVariation = SharedSliceModelVariation> {
|
|
11
|
+
type: typeof CustomTypeModelSliceType.SharedSlice;
|
|
12
|
+
id: ID;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
variations: readonly Variation[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CustomTypeModelFieldForGroup } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Shared Slice variation.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/slice}
|
|
6
|
+
*
|
|
7
|
+
* @typeParam PrimaryFields - A record of fields that cannnot be repeated.
|
|
8
|
+
* @typeParam ItemFields - A record of fields that can be repeated.
|
|
9
|
+
*/
|
|
10
|
+
export interface SharedSliceModelVariation<ID extends string = string, PrimaryFields extends Record<string, CustomTypeModelFieldForGroup> = Record<string, CustomTypeModelFieldForGroup>, ItemFields extends Record<string, CustomTypeModelFieldForGroup> = Record<string, CustomTypeModelFieldForGroup>> {
|
|
11
|
+
id: ID;
|
|
12
|
+
name: string;
|
|
13
|
+
docURL: string;
|
|
14
|
+
version: string;
|
|
15
|
+
description: string;
|
|
16
|
+
primary?: PrimaryFields;
|
|
17
|
+
items?: ItemFields;
|
|
18
|
+
imageUrl: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const CustomTypeModelSliceDisplay = {
|
|
4
|
+
List: "list",
|
|
5
|
+
Grid: "grid"
|
|
6
|
+
};
|
|
7
|
+
exports.CustomTypeModelSliceDisplay = CustomTypeModelSliceDisplay;
|
|
8
|
+
//# sourceMappingURL=slice.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slice.cjs","sources":["../../../../src/types/model/slice.ts"],"sourcesContent":["import type { CustomTypeModelFieldForGroup } from \"./types\";\n\nimport type { CustomTypeModelGroupField } from \"./group\";\nimport type { CustomTypeModelSliceType } from \"./sliceZone\";\n\n/**\n * A Slice for a Custom Type.\n *\n * More details: {@link https://prismic.io/docs/slice}\n *\n * @typeParam NonRepeatFields - A record of fields that cannnot be repeated.\n * @typeParam RepeatFields - A record of fields that can be repeated.\n */\nexport interface CustomTypeModelSlice<\n\tNonRepeatFields extends Record<string, CustomTypeModelFieldForGroup> = Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForGroup\n\t>,\n\tRepeatFields extends Record<string, CustomTypeModelFieldForGroup> = Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForGroup\n\t>,\n> {\n\ttype: typeof CustomTypeModelSliceType.Slice;\n\tfieldset?: string | null;\n\tdescription?: string;\n\ticon?: string;\n\tdisplay?:\n\t\t| (typeof CustomTypeModelSliceDisplay)[keyof typeof CustomTypeModelSliceDisplay]\n\t\t| string;\n\t\"non-repeat\"?: NonRepeatFields;\n\trepeat?: RepeatFields;\n}\n\n/**\n * Display type for a Slice.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport const CustomTypeModelSliceDisplay = {\n\tList: \"list\",\n\tGrid: \"grid\",\n} as const;\n\n/**\n * @deprecated - Legacy slice type. Do not use.\n */\nexport type CustomTypeModelLegacySlice =\n\t| CustomTypeModelGroupField\n\t| CustomTypeModelFieldForGroup;\n"],"names":[],"mappings":";;AAuCO,MAAM,8BAA8B;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CustomTypeModelFieldForGroup } from "./types";
|
|
2
|
+
import type { CustomTypeModelGroupField } from "./group";
|
|
3
|
+
import type { CustomTypeModelSliceType } from "./sliceZone";
|
|
4
|
+
/**
|
|
5
|
+
* A Slice for a Custom Type.
|
|
6
|
+
*
|
|
7
|
+
* More details: {@link https://prismic.io/docs/slice}
|
|
8
|
+
*
|
|
9
|
+
* @typeParam NonRepeatFields - A record of fields that cannnot be repeated.
|
|
10
|
+
* @typeParam RepeatFields - A record of fields that can be repeated.
|
|
11
|
+
*/
|
|
12
|
+
export interface CustomTypeModelSlice<NonRepeatFields extends Record<string, CustomTypeModelFieldForGroup> = Record<string, CustomTypeModelFieldForGroup>, RepeatFields extends Record<string, CustomTypeModelFieldForGroup> = Record<string, CustomTypeModelFieldForGroup>> {
|
|
13
|
+
type: typeof CustomTypeModelSliceType.Slice;
|
|
14
|
+
fieldset?: string | null;
|
|
15
|
+
description?: string;
|
|
16
|
+
icon?: string;
|
|
17
|
+
display?: (typeof CustomTypeModelSliceDisplay)[keyof typeof CustomTypeModelSliceDisplay] | string;
|
|
18
|
+
"non-repeat"?: NonRepeatFields;
|
|
19
|
+
repeat?: RepeatFields;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Display type for a Slice.
|
|
23
|
+
*
|
|
24
|
+
* More details: {@link https://prismic.io/docs/slice}
|
|
25
|
+
*/
|
|
26
|
+
export declare const CustomTypeModelSliceDisplay: {
|
|
27
|
+
readonly List: "list";
|
|
28
|
+
readonly Grid: "grid";
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated - Legacy slice type. Do not use.
|
|
32
|
+
*/
|
|
33
|
+
export type CustomTypeModelLegacySlice = CustomTypeModelGroupField | CustomTypeModelFieldForGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slice.js","sources":["../../../../src/types/model/slice.ts"],"sourcesContent":["import type { CustomTypeModelFieldForGroup } from \"./types\";\n\nimport type { CustomTypeModelGroupField } from \"./group\";\nimport type { CustomTypeModelSliceType } from \"./sliceZone\";\n\n/**\n * A Slice for a Custom Type.\n *\n * More details: {@link https://prismic.io/docs/slice}\n *\n * @typeParam NonRepeatFields - A record of fields that cannnot be repeated.\n * @typeParam RepeatFields - A record of fields that can be repeated.\n */\nexport interface CustomTypeModelSlice<\n\tNonRepeatFields extends Record<string, CustomTypeModelFieldForGroup> = Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForGroup\n\t>,\n\tRepeatFields extends Record<string, CustomTypeModelFieldForGroup> = Record<\n\t\tstring,\n\t\tCustomTypeModelFieldForGroup\n\t>,\n> {\n\ttype: typeof CustomTypeModelSliceType.Slice;\n\tfieldset?: string | null;\n\tdescription?: string;\n\ticon?: string;\n\tdisplay?:\n\t\t| (typeof CustomTypeModelSliceDisplay)[keyof typeof CustomTypeModelSliceDisplay]\n\t\t| string;\n\t\"non-repeat\"?: NonRepeatFields;\n\trepeat?: RepeatFields;\n}\n\n/**\n * Display type for a Slice.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport const CustomTypeModelSliceDisplay = {\n\tList: \"list\",\n\tGrid: \"grid\",\n} as const;\n\n/**\n * @deprecated - Legacy slice type. Do not use.\n */\nexport type CustomTypeModelLegacySlice =\n\t| CustomTypeModelGroupField\n\t| CustomTypeModelFieldForGroup;\n"],"names":[],"mappings":"AAuCO,MAAM,8BAA8B;AAAA,EAC1C,MAAM;AAAA,EACN,MAAM;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const CustomTypeModelSliceType = {
|
|
4
|
+
Slice: "Slice",
|
|
5
|
+
SharedSlice: "SharedSlice"
|
|
6
|
+
};
|
|
7
|
+
exports.CustomTypeModelSliceType = CustomTypeModelSliceType;
|
|
8
|
+
//# sourceMappingURL=sliceZone.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sliceZone.cjs","sources":["../../../../src/types/model/sliceZone.ts"],"sourcesContent":["import type { CustomTypeModelFieldType } from \"./types\";\n\nimport type { CustomTypeModelLegacySlice, CustomTypeModelSlice } from \"./slice\";\n\n/**\n * A Slice Zone Custom Type field.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport interface CustomTypeModelSliceZoneField<\n\tSlices extends Record<\n\t\tstring,\n\t\t| CustomTypeModelSlice\n\t\t| CustomTypeModelSharedSlice\n\t\t| CustomTypeModelLegacySlice\n\t> = Record<\n\t\tstring,\n\t\t| CustomTypeModelSlice\n\t\t| CustomTypeModelSharedSlice\n\t\t| CustomTypeModelLegacySlice\n\t>,\n> {\n\ttype:\n\t\t| typeof CustomTypeModelFieldType.Slices\n\t\t| typeof CustomTypeModelFieldType.LegacySlices;\n\tfieldset?: string | null;\n\tconfig?: {\n\t\tlabels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null;\n\t\tchoices?: Slices;\n\t};\n}\n\n/**\n * Label for a Slice.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport interface CustomTypeModelSliceLabel {\n\tname: string;\n\tdisplay?: string;\n}\n\n/**\n * Type identifier for a Slice.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport const CustomTypeModelSliceType = {\n\tSlice: \"Slice\",\n\tSharedSlice: \"SharedSlice\",\n} as const;\n\n/**\n * A Shared Slice for a Custom Type.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport interface CustomTypeModelSharedSlice {\n\ttype: typeof CustomTypeModelSliceType.SharedSlice;\n}\n"],"names":[],"mappings":";;AA+CO,MAAM,2BAA2B;AAAA,EACvC,OAAO;AAAA,EACP,aAAa;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
import type { CustomTypeModelLegacySlice, CustomTypeModelSlice } from "./slice";
|
|
3
|
+
/**
|
|
4
|
+
* A Slice Zone Custom Type field.
|
|
5
|
+
*
|
|
6
|
+
* More details: {@link https://prismic.io/docs/slice}
|
|
7
|
+
*/
|
|
8
|
+
export interface CustomTypeModelSliceZoneField<Slices extends Record<string, CustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice> = Record<string, CustomTypeModelSlice | CustomTypeModelSharedSlice | CustomTypeModelLegacySlice>> {
|
|
9
|
+
type: typeof CustomTypeModelFieldType.Slices | typeof CustomTypeModelFieldType.LegacySlices;
|
|
10
|
+
fieldset?: string | null;
|
|
11
|
+
config?: {
|
|
12
|
+
labels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null;
|
|
13
|
+
choices?: Slices;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Label for a Slice.
|
|
18
|
+
*
|
|
19
|
+
* More details: {@link https://prismic.io/docs/slice}
|
|
20
|
+
*/
|
|
21
|
+
export interface CustomTypeModelSliceLabel {
|
|
22
|
+
name: string;
|
|
23
|
+
display?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Type identifier for a Slice.
|
|
27
|
+
*
|
|
28
|
+
* More details: {@link https://prismic.io/docs/slice}
|
|
29
|
+
*/
|
|
30
|
+
export declare const CustomTypeModelSliceType: {
|
|
31
|
+
readonly Slice: "Slice";
|
|
32
|
+
readonly SharedSlice: "SharedSlice";
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* A Shared Slice for a Custom Type.
|
|
36
|
+
*
|
|
37
|
+
* More details: {@link https://prismic.io/docs/slice}
|
|
38
|
+
*/
|
|
39
|
+
export interface CustomTypeModelSharedSlice {
|
|
40
|
+
type: typeof CustomTypeModelSliceType.SharedSlice;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sliceZone.js","sources":["../../../../src/types/model/sliceZone.ts"],"sourcesContent":["import type { CustomTypeModelFieldType } from \"./types\";\n\nimport type { CustomTypeModelLegacySlice, CustomTypeModelSlice } from \"./slice\";\n\n/**\n * A Slice Zone Custom Type field.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport interface CustomTypeModelSliceZoneField<\n\tSlices extends Record<\n\t\tstring,\n\t\t| CustomTypeModelSlice\n\t\t| CustomTypeModelSharedSlice\n\t\t| CustomTypeModelLegacySlice\n\t> = Record<\n\t\tstring,\n\t\t| CustomTypeModelSlice\n\t\t| CustomTypeModelSharedSlice\n\t\t| CustomTypeModelLegacySlice\n\t>,\n> {\n\ttype:\n\t\t| typeof CustomTypeModelFieldType.Slices\n\t\t| typeof CustomTypeModelFieldType.LegacySlices;\n\tfieldset?: string | null;\n\tconfig?: {\n\t\tlabels?: Record<string, readonly CustomTypeModelSliceLabel[]> | null;\n\t\tchoices?: Slices;\n\t};\n}\n\n/**\n * Label for a Slice.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport interface CustomTypeModelSliceLabel {\n\tname: string;\n\tdisplay?: string;\n}\n\n/**\n * Type identifier for a Slice.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport const CustomTypeModelSliceType = {\n\tSlice: \"Slice\",\n\tSharedSlice: \"SharedSlice\",\n} as const;\n\n/**\n * A Shared Slice for a Custom Type.\n *\n * More details: {@link https://prismic.io/docs/slice}\n */\nexport interface CustomTypeModelSharedSlice {\n\ttype: typeof CustomTypeModelSliceType.SharedSlice;\n}\n"],"names":[],"mappings":"AA+CO,MAAM,2BAA2B;AAAA,EACvC,OAAO;AAAA,EACP,aAAa;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Timestamp Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/timestamp}
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomTypeModelTimestampField {
|
|
8
|
+
type: typeof CustomTypeModelFieldType.Timestamp;
|
|
9
|
+
config?: {
|
|
10
|
+
label?: string | null;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
default?: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const CustomTypeModelFieldType = {
|
|
4
|
+
Boolean: "Boolean",
|
|
5
|
+
Color: "Color",
|
|
6
|
+
Date: "Date",
|
|
7
|
+
Embed: "Embed",
|
|
8
|
+
GeoPoint: "GeoPoint",
|
|
9
|
+
Group: "Group",
|
|
10
|
+
Image: "Image",
|
|
11
|
+
IntegrationFields: "IntegrationFields",
|
|
12
|
+
Link: "Link",
|
|
13
|
+
Number: "Number",
|
|
14
|
+
Select: "Select",
|
|
15
|
+
Slices: "Slices",
|
|
16
|
+
StructuredText: "StructuredText",
|
|
17
|
+
Text: "Text",
|
|
18
|
+
Timestamp: "Timestamp",
|
|
19
|
+
UID: "UID",
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated - Legacy field type. Use `Number` instead.
|
|
22
|
+
*/
|
|
23
|
+
Range: "Range",
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated - Legacy field type. Do not use.
|
|
26
|
+
*/
|
|
27
|
+
Separator: "Separator",
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated - Legacy field type. Use `Slices` instead.
|
|
30
|
+
*/
|
|
31
|
+
LegacySlices: "Choice"
|
|
32
|
+
};
|
|
33
|
+
exports.CustomTypeModelFieldType = CustomTypeModelFieldType;
|
|
34
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.cjs","sources":["../../../../src/types/model/types.ts"],"sourcesContent":["import type { CustomTypeModelBooleanField } from \"./boolean\";\nimport type { CustomTypeModelColorField } from \"./color\";\nimport type { CustomTypeModelContentRelationshipField } from \"./contentRelationship\";\nimport type { CustomTypeModelDateField } from \"./date\";\nimport type { CustomTypeModelEmbedField } from \"./embed\";\nimport type { CustomTypeModelGeoPointField } from \"./geoPoint\";\nimport type { CustomTypeModelGroupField } from \"./group\";\nimport type { CustomTypeModelImageField } from \"./image\";\nimport type { CustomTypeModelIntegrationFieldsField } from \"./integrationFields\";\nimport type { CustomTypeModelKeyTextField } from \"./keyText\";\nimport type { CustomTypeModelLinkField } from \"./link\";\nimport type { CustomTypeModelLinkToMediaField } from \"./linkToMedia\";\nimport type { CustomTypeModelNumberField } from \"./number\";\nimport type { CustomTypeModelRangeField } from \"./range\";\nimport type { CustomTypeModelRichTextField } from \"./richText\";\nimport type { CustomTypeModelSelectField } from \"./select\";\nimport type { CustomTypeModelSeparatorField } from \"./separator\";\nimport type { CustomTypeModelSliceZoneField } from \"./sliceZone\";\nimport type { CustomTypeModelTimestampField } from \"./timestamp\";\nimport type { CustomTypeModelTitleField } from \"./title\";\nimport type { CustomTypeModelUIDField } from \"./uid\";\n\n/**\n * Type identifier for a Custom Type field.\n */\nexport const CustomTypeModelFieldType = {\n\tBoolean: \"Boolean\",\n\tColor: \"Color\",\n\tDate: \"Date\",\n\tEmbed: \"Embed\",\n\tGeoPoint: \"GeoPoint\",\n\tGroup: \"Group\",\n\tImage: \"Image\",\n\tIntegrationFields: \"IntegrationFields\",\n\tLink: \"Link\",\n\tNumber: \"Number\",\n\tSelect: \"Select\",\n\tSlices: \"Slices\",\n\tStructuredText: \"StructuredText\",\n\tText: \"Text\",\n\tTimestamp: \"Timestamp\",\n\tUID: \"UID\",\n\t/**\n\t * @deprecated - Legacy field type. Use `Number` instead.\n\t */\n\tRange: \"Range\",\n\t/**\n\t * @deprecated - Legacy field type. Do not use.\n\t */\n\tSeparator: \"Separator\",\n\t/**\n\t * @deprecated - Legacy field type. Use `Slices` instead.\n\t */\n\tLegacySlices: \"Choice\",\n} as const;\n\n/**\n * A Custom Type field.\n */\nexport type CustomTypeModelField =\n\t| CustomTypeModelUIDField\n\t| CustomTypeModelGroupField\n\t| CustomTypeModelSliceZoneField\n\t| CustomTypeModelFieldForGroup;\n\n/**\n * Any Custom Type field that is valid for a Group field.\n */\nexport type CustomTypeModelFieldForGroup =\n\t| CustomTypeModelBooleanField\n\t| CustomTypeModelColorField\n\t| CustomTypeModelDateField\n\t| CustomTypeModelEmbedField\n\t| CustomTypeModelGeoPointField\n\t| CustomTypeModelImageField\n\t| CustomTypeModelIntegrationFieldsField\n\t| CustomTypeModelContentRelationshipField\n\t| CustomTypeModelLinkField\n\t| CustomTypeModelLinkToMediaField\n\t| CustomTypeModelNumberField\n\t| CustomTypeModelRangeField\n\t| CustomTypeModelSelectField\n\t| CustomTypeModelRichTextField\n\t| CustomTypeModelTitleField\n\t| CustomTypeModelKeyTextField\n\t| CustomTypeModelTimestampField\n\t| CustomTypeModelSeparatorField;\n"],"names":[],"mappings":";;AAyBO,MAAM,2BAA2B;AAAA,EACvC,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,mBAAmB;AAAA,EACnB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,WAAW;AAAA,EACX,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,WAAW;AAAA;AAAA;AAAA;AAAA,EAIX,cAAc;;;"}
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
import type { CustomTypeModelGroupField } from "./group";
|
|
8
|
+
import type { CustomTypeModelImageField } from "./image";
|
|
9
|
+
import type { CustomTypeModelIntegrationFieldsField } from "./integrationFields";
|
|
10
|
+
import type { CustomTypeModelKeyTextField } from "./keyText";
|
|
11
|
+
import type { CustomTypeModelLinkField } from "./link";
|
|
12
|
+
import type { CustomTypeModelLinkToMediaField } from "./linkToMedia";
|
|
13
|
+
import type { CustomTypeModelNumberField } from "./number";
|
|
14
|
+
import type { CustomTypeModelRangeField } from "./range";
|
|
15
|
+
import type { CustomTypeModelRichTextField } from "./richText";
|
|
16
|
+
import type { CustomTypeModelSelectField } from "./select";
|
|
17
|
+
import type { CustomTypeModelSeparatorField } from "./separator";
|
|
18
|
+
import type { CustomTypeModelSliceZoneField } from "./sliceZone";
|
|
19
|
+
import type { CustomTypeModelTimestampField } from "./timestamp";
|
|
20
|
+
import type { CustomTypeModelTitleField } from "./title";
|
|
21
|
+
import type { CustomTypeModelUIDField } from "./uid";
|
|
22
|
+
/**
|
|
23
|
+
* Type identifier for a Custom Type field.
|
|
24
|
+
*/
|
|
25
|
+
export declare const CustomTypeModelFieldType: {
|
|
26
|
+
readonly Boolean: "Boolean";
|
|
27
|
+
readonly Color: "Color";
|
|
28
|
+
readonly Date: "Date";
|
|
29
|
+
readonly Embed: "Embed";
|
|
30
|
+
readonly GeoPoint: "GeoPoint";
|
|
31
|
+
readonly Group: "Group";
|
|
32
|
+
readonly Image: "Image";
|
|
33
|
+
readonly IntegrationFields: "IntegrationFields";
|
|
34
|
+
readonly Link: "Link";
|
|
35
|
+
readonly Number: "Number";
|
|
36
|
+
readonly Select: "Select";
|
|
37
|
+
readonly Slices: "Slices";
|
|
38
|
+
readonly StructuredText: "StructuredText";
|
|
39
|
+
readonly Text: "Text";
|
|
40
|
+
readonly Timestamp: "Timestamp";
|
|
41
|
+
readonly UID: "UID";
|
|
42
|
+
/**
|
|
43
|
+
* @deprecated - Legacy field type. Use `Number` instead.
|
|
44
|
+
*/
|
|
45
|
+
readonly Range: "Range";
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated - Legacy field type. Do not use.
|
|
48
|
+
*/
|
|
49
|
+
readonly Separator: "Separator";
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated - Legacy field type. Use `Slices` instead.
|
|
52
|
+
*/
|
|
53
|
+
readonly LegacySlices: "Choice";
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* A Custom Type field.
|
|
57
|
+
*/
|
|
58
|
+
export type CustomTypeModelField = CustomTypeModelUIDField | CustomTypeModelGroupField | CustomTypeModelSliceZoneField | CustomTypeModelFieldForGroup;
|
|
59
|
+
/**
|
|
60
|
+
* Any Custom Type field that is valid for a Group field.
|
|
61
|
+
*/
|
|
62
|
+
export type CustomTypeModelFieldForGroup = CustomTypeModelBooleanField | CustomTypeModelColorField | CustomTypeModelDateField | CustomTypeModelEmbedField | CustomTypeModelGeoPointField | CustomTypeModelImageField | CustomTypeModelIntegrationFieldsField | CustomTypeModelContentRelationshipField | CustomTypeModelLinkField | CustomTypeModelLinkToMediaField | CustomTypeModelNumberField | CustomTypeModelRangeField | CustomTypeModelSelectField | CustomTypeModelRichTextField | CustomTypeModelTitleField | CustomTypeModelKeyTextField | CustomTypeModelTimestampField | CustomTypeModelSeparatorField;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const CustomTypeModelFieldType = {
|
|
2
|
+
Boolean: "Boolean",
|
|
3
|
+
Color: "Color",
|
|
4
|
+
Date: "Date",
|
|
5
|
+
Embed: "Embed",
|
|
6
|
+
GeoPoint: "GeoPoint",
|
|
7
|
+
Group: "Group",
|
|
8
|
+
Image: "Image",
|
|
9
|
+
IntegrationFields: "IntegrationFields",
|
|
10
|
+
Link: "Link",
|
|
11
|
+
Number: "Number",
|
|
12
|
+
Select: "Select",
|
|
13
|
+
Slices: "Slices",
|
|
14
|
+
StructuredText: "StructuredText",
|
|
15
|
+
Text: "Text",
|
|
16
|
+
Timestamp: "Timestamp",
|
|
17
|
+
UID: "UID",
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated - Legacy field type. Use `Number` instead.
|
|
20
|
+
*/
|
|
21
|
+
Range: "Range",
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated - Legacy field type. Do not use.
|
|
24
|
+
*/
|
|
25
|
+
Separator: "Separator",
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated - Legacy field type. Use `Slices` instead.
|
|
28
|
+
*/
|
|
29
|
+
LegacySlices: "Choice"
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
CustomTypeModelFieldType
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../src/types/model/types.ts"],"sourcesContent":["import type { CustomTypeModelBooleanField } from \"./boolean\";\nimport type { CustomTypeModelColorField } from \"./color\";\nimport type { CustomTypeModelContentRelationshipField } from \"./contentRelationship\";\nimport type { CustomTypeModelDateField } from \"./date\";\nimport type { CustomTypeModelEmbedField } from \"./embed\";\nimport type { CustomTypeModelGeoPointField } from \"./geoPoint\";\nimport type { CustomTypeModelGroupField } from \"./group\";\nimport type { CustomTypeModelImageField } from \"./image\";\nimport type { CustomTypeModelIntegrationFieldsField } from \"./integrationFields\";\nimport type { CustomTypeModelKeyTextField } from \"./keyText\";\nimport type { CustomTypeModelLinkField } from \"./link\";\nimport type { CustomTypeModelLinkToMediaField } from \"./linkToMedia\";\nimport type { CustomTypeModelNumberField } from \"./number\";\nimport type { CustomTypeModelRangeField } from \"./range\";\nimport type { CustomTypeModelRichTextField } from \"./richText\";\nimport type { CustomTypeModelSelectField } from \"./select\";\nimport type { CustomTypeModelSeparatorField } from \"./separator\";\nimport type { CustomTypeModelSliceZoneField } from \"./sliceZone\";\nimport type { CustomTypeModelTimestampField } from \"./timestamp\";\nimport type { CustomTypeModelTitleField } from \"./title\";\nimport type { CustomTypeModelUIDField } from \"./uid\";\n\n/**\n * Type identifier for a Custom Type field.\n */\nexport const CustomTypeModelFieldType = {\n\tBoolean: \"Boolean\",\n\tColor: \"Color\",\n\tDate: \"Date\",\n\tEmbed: \"Embed\",\n\tGeoPoint: \"GeoPoint\",\n\tGroup: \"Group\",\n\tImage: \"Image\",\n\tIntegrationFields: \"IntegrationFields\",\n\tLink: \"Link\",\n\tNumber: \"Number\",\n\tSelect: \"Select\",\n\tSlices: \"Slices\",\n\tStructuredText: \"StructuredText\",\n\tText: \"Text\",\n\tTimestamp: \"Timestamp\",\n\tUID: \"UID\",\n\t/**\n\t * @deprecated - Legacy field type. Use `Number` instead.\n\t */\n\tRange: \"Range\",\n\t/**\n\t * @deprecated - Legacy field type. Do not use.\n\t */\n\tSeparator: \"Separator\",\n\t/**\n\t * @deprecated - Legacy field type. Use `Slices` instead.\n\t */\n\tLegacySlices: \"Choice\",\n} as const;\n\n/**\n * A Custom Type field.\n */\nexport type CustomTypeModelField =\n\t| CustomTypeModelUIDField\n\t| CustomTypeModelGroupField\n\t| CustomTypeModelSliceZoneField\n\t| CustomTypeModelFieldForGroup;\n\n/**\n * Any Custom Type field that is valid for a Group field.\n */\nexport type CustomTypeModelFieldForGroup =\n\t| CustomTypeModelBooleanField\n\t| CustomTypeModelColorField\n\t| CustomTypeModelDateField\n\t| CustomTypeModelEmbedField\n\t| CustomTypeModelGeoPointField\n\t| CustomTypeModelImageField\n\t| CustomTypeModelIntegrationFieldsField\n\t| CustomTypeModelContentRelationshipField\n\t| CustomTypeModelLinkField\n\t| CustomTypeModelLinkToMediaField\n\t| CustomTypeModelNumberField\n\t| CustomTypeModelRangeField\n\t| CustomTypeModelSelectField\n\t| CustomTypeModelRichTextField\n\t| CustomTypeModelTitleField\n\t| CustomTypeModelKeyTextField\n\t| CustomTypeModelTimestampField\n\t| CustomTypeModelSeparatorField;\n"],"names":[],"mappings":"AAyBO,MAAM,2BAA2B;AAAA,EACvC,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,mBAAmB;AAAA,EACnB,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,WAAW;AAAA,EACX,KAAK;AAAA;AAAA;AAAA;AAAA,EAIL,OAAO;AAAA;AAAA;AAAA;AAAA,EAIP,WAAW;AAAA;AAAA;AAAA;AAAA,EAIX,cAAc;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CustomTypeModelFieldType } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A UID Custom Type field.
|
|
4
|
+
*
|
|
5
|
+
* More details: {@link https://prismic.io/docs/uid}
|
|
6
|
+
*/
|
|
7
|
+
export interface CustomTypeModelUIDField {
|
|
8
|
+
type: typeof CustomTypeModelFieldType.UID;
|
|
9
|
+
config?: {
|
|
10
|
+
label?: string | null;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FieldState } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Color field.
|
|
4
|
+
*
|
|
5
|
+
* @typeParam State - State of the field which determines its shape.
|
|
6
|
+
* @see More details: {@link https://prismic.io/docs/color}
|
|
7
|
+
*/
|
|
8
|
+
export type ColorField<State extends FieldState = FieldState> = State extends "empty" ? null : `#${string}`;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AnyRegularField, FieldState } from "./types";
|
|
2
|
+
import type { GroupField } from "./group";
|
|
3
|
+
import type { EmptyLinkField, LinkType } from "./link";
|
|
4
|
+
import type { SliceZone } from "./sliceZone";
|
|
5
|
+
/**
|
|
6
|
+
* Field for related documents
|
|
7
|
+
*
|
|
8
|
+
* @typeParam TypeEnum - Type API ID of the document.
|
|
9
|
+
* @typeParam LangEnum - Language API ID of the document.
|
|
10
|
+
* @typeParam DataInterface - Data fields for the document (filled in via
|
|
11
|
+
* GraphQuery of `fetchLinks`).
|
|
12
|
+
* @typeParam State - State of the field which determines its shape.
|
|
13
|
+
*/
|
|
14
|
+
export type ContentRelationshipField<TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown, State extends FieldState = FieldState> = State extends "empty" ? EmptyLinkField<typeof LinkType.Document> : FilledContentRelationshipField<TypeEnum, LangEnum, DataInterface>;
|
|
15
|
+
/**
|
|
16
|
+
* Links that refer to Documents
|
|
17
|
+
*/
|
|
18
|
+
export interface FilledContentRelationshipField<TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown> {
|
|
19
|
+
link_type: typeof LinkType.Document;
|
|
20
|
+
id: string;
|
|
21
|
+
uid?: string;
|
|
22
|
+
type: TypeEnum;
|
|
23
|
+
tags: string[];
|
|
24
|
+
lang: LangEnum;
|
|
25
|
+
url?: string;
|
|
26
|
+
slug?: string;
|
|
27
|
+
isBroken?: boolean;
|
|
28
|
+
data?: DataInterface;
|
|
29
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FieldState } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A Date field.
|
|
4
|
+
*
|
|
5
|
+
* @typeParam State - State of the field which determines its shape.
|
|
6
|
+
* @see More details: {@link https://prismic.io/docs/date}
|
|
7
|
+
*/
|
|
8
|
+
export type DateField<State extends FieldState = FieldState> = State extends "empty" ? null : `${number}-${number}-${number}`;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { AnyRegularField } from "./types";
|
|
2
|
+
import { GroupField } from "./group";
|
|
3
|
+
import { SliceZone } from "./sliceZone";
|
|
4
|
+
/**
|
|
5
|
+
* Document metadata for a translation of a Prismic document.
|
|
6
|
+
*/
|
|
7
|
+
export interface AlternateLanguage<TypeEnum = string, LangEnum = string> {
|
|
8
|
+
id: string;
|
|
9
|
+
uid?: string;
|
|
10
|
+
type: TypeEnum;
|
|
11
|
+
lang: LangEnum;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Metadata for Prismic Document
|
|
15
|
+
*/
|
|
16
|
+
export interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
17
|
+
/**
|
|
18
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
19
|
+
* documents in the Prismic repository.
|
|
20
|
+
*/
|
|
21
|
+
id: string;
|
|
22
|
+
/**
|
|
23
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
24
|
+
* Prismic documents of the same type.
|
|
25
|
+
*/
|
|
26
|
+
uid: string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Url that refers to document.
|
|
29
|
+
*/
|
|
30
|
+
url: string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Type of the document.
|
|
33
|
+
*/
|
|
34
|
+
type: TypeEnum;
|
|
35
|
+
/**
|
|
36
|
+
* Href for document.
|
|
37
|
+
*/
|
|
38
|
+
href: string;
|
|
39
|
+
/**
|
|
40
|
+
* Tags associated with document.
|
|
41
|
+
*/
|
|
42
|
+
tags: string[];
|
|
43
|
+
/**
|
|
44
|
+
* The timestamp at which the document was first published.
|
|
45
|
+
*/
|
|
46
|
+
first_publication_date: string;
|
|
47
|
+
/**
|
|
48
|
+
* The timestamp at which the document was last published.
|
|
49
|
+
*/
|
|
50
|
+
last_publication_date: string;
|
|
51
|
+
/**
|
|
52
|
+
* Slugs associated with document.
|
|
53
|
+
*
|
|
54
|
+
* @deprecated Slugs are a deprecated feature used before the UID field was
|
|
55
|
+
* introduced. Migrate to the UID field. For more details, see
|
|
56
|
+
* https://community.prismic.io/t/what-are-slugs/6493
|
|
57
|
+
*/
|
|
58
|
+
slugs: string[];
|
|
59
|
+
/**
|
|
60
|
+
* Documents that are related to this document.
|
|
61
|
+
*/
|
|
62
|
+
linked_documents: unknown[];
|
|
63
|
+
/**
|
|
64
|
+
* Language of document.
|
|
65
|
+
*/
|
|
66
|
+
lang: LangEnum;
|
|
67
|
+
/**
|
|
68
|
+
* Array to access alternate language versions for document.
|
|
69
|
+
*/
|
|
70
|
+
alternate_languages: AlternateLanguage<TypeEnum, LangEnum>[];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* A Prismic document served through REST API v2.
|
|
74
|
+
*
|
|
75
|
+
* @see More details on Custom Types: {@link https://prismic.io/docs/custom-types}
|
|
76
|
+
*/
|
|
77
|
+
export interface PrismicDocument<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocumentHeader<TypeEnum, LangEnum> {
|
|
78
|
+
/**
|
|
79
|
+
* Data contained in the document.
|
|
80
|
+
*/
|
|
81
|
+
data: DataInterface;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* A Prismic document served through REST API v2. Does not contain a UID (a
|
|
85
|
+
* unique identifier).
|
|
86
|
+
*
|
|
87
|
+
* @see More details on Custom Types: {@link https://prismic.io/docs/custom-types}
|
|
88
|
+
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
89
|
+
*/
|
|
90
|
+
export interface PrismicDocumentWithoutUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
91
|
+
/**
|
|
92
|
+
* This document does not have a UID field. This property will always be
|
|
93
|
+
* `null`.
|
|
94
|
+
*
|
|
95
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
96
|
+
* Prismic documents of the same type.
|
|
97
|
+
*/
|
|
98
|
+
uid: null;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* A Prismic document served through REST API v2. Contains a UID (a unique
|
|
102
|
+
* identifier).
|
|
103
|
+
*
|
|
104
|
+
* @see More details on Custom Types: {@link https://prismic.io/docs/custom-types}
|
|
105
|
+
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
106
|
+
*/
|
|
107
|
+
export interface PrismicDocumentWithUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
108
|
+
/**
|
|
109
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
110
|
+
* Prismic documents of the same type.
|
|
111
|
+
*/
|
|
112
|
+
uid: string;
|
|
113
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embed.cjs","sources":["../../../../src/types/value/embed.ts"],"sourcesContent":["import type { EmptyObjectField, FieldState } from \"./types\";\n\n/**\n * oEmbed 1.0 possible types.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport const OEmbedType = {\n\tPhoto: \"photo\",\n\tVideo: \"video\",\n\tLink: \"link\",\n\tRich: \"rich\",\n} as const;\n\n/**\n * oEmbed response base fields. Those are every mandatory fields an oEmbed\n * response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\ntype OEmbedBase<TType extends (typeof OEmbedType)[keyof typeof OEmbedType]> = {\n\t/**\n\t * oEmbed resource type.\n\t */\n\ttype: TType;\n\n\t/**\n\t * oEmbed version number, this must be \"1.0\".\n\t */\n\tversion: string;\n};\n\n/**\n * oEmbed response extra fields. Those are every non-mandatory and unknown\n * fields an oEmbed response can feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type OEmbedExtra = {\n\t/**\n\t * oEmbed text title, describing the resource.\n\t */\n\ttitle?: string | null;\n\n\t/**\n\t * oEmbed resource author/owner name.\n\t */\n\tauthor_name?: string | null;\n\n\t/**\n\t * oEmbed resource author/owner URL.\n\t */\n\tauthor_url?: string | null;\n\n\t/**\n\t * oEmbed resource provider name.\n\t */\n\tprovider_name?: string | null;\n\n\t/**\n\t * oEmbed resource provider URL.\n\t */\n\tprovider_url?: string | null;\n\n\t/**\n\t * oEmbed suggested cache lifetime for the resource, in seconds.\n\t */\n\tcache_age?: number | null;\n\n\t/**\n\t * oEmbed resource thumbnail URL.\n\t */\n\tthumbnail_url?: string | null;\n\n\t/**\n\t * oEmbed resource thumbnail width.\n\t */\n\tthumbnail_width?: number | null;\n\n\t/**\n\t * oEmbed resource thumbnail height.\n\t */\n\tthumbnail_height?: number | null;\n\n\t/**\n\t * Providers may optionally include any parameters not specified in this\n\t * document (so long as they use the same key-value format) and consumers may\n\t * choose to ignore these. Consumers must ignore parameters they do not\n\t * understand.\n\t *\n\t * @see oEmbed specification: {@link https://oembed.com}\n\t */\n\t[key: string]: unknown | null;\n};\n\n/**\n * oEmbed photo type. Those are every mandatory fields an oEmbed photo response\n * must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type PhotoOEmbed = OEmbedBase<typeof OEmbedType.Photo> & {\n\t/**\n\t * oEmbed source URL of the image.\n\t */\n\turl: string;\n\n\t/**\n\t * oEmbed width in pixels of the image.\n\t */\n\twidth: number;\n\n\t/**\n\t * oEmbed height in pixels of the image.\n\t */\n\theight: number;\n};\n\n/**\n * oEmbed video type. Those are every mandatory fields an oEmbed video response\n * must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type VideoOEmbed = OEmbedBase<typeof OEmbedType.Video> & {\n\t/**\n\t * oEmbed HTML required to embed a video player.\n\t */\n\thtml: string;\n\n\t/**\n\t * oEmbed width in pixels required to display the HTML.\n\t */\n\twidth: number;\n\n\t/**\n\t * oEmbed height in pixels required to display the HTML.\n\t */\n\theight: number;\n};\n\n/**\n * oEmbed link type. Those are every mandatory fields an oEmbed link response\n * must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type LinkOEmbed = OEmbedBase<typeof OEmbedType.Link>;\n\n/**\n * oEmbed rich type. Those are every mandatory fields an oEmbed rich response\n * must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type RichOEmbed = OEmbedBase<typeof OEmbedType.Rich> & {\n\t/**\n\t * oEmbed HTML required to display the resource.\n\t */\n\thtml: string;\n\n\t/**\n\t * oEmbed width in pixels required to display the HTML.\n\t */\n\twidth: number;\n\n\t/**\n\t * oEmbed height in pixels required to display the HTML.\n\t */\n\theight: number;\n};\n\n/**\n * Any of the possible types of oEmbed response. Those contains only mandatory\n * fields their respective oEmbed response type must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type AnyOEmbed = PhotoOEmbed | VideoOEmbed | LinkOEmbed | RichOEmbed;\n\n/**\n * An Embed field.\n *\n * @typeParam Data - Data provided by the URL's oEmbed provider.\n * @typeParam State - State of the field which determines its shape.\n * @see More details: {@link https://prismic.io/docs/embed}\n */\nexport type EmbedField<\n\tData extends AnyOEmbed = AnyOEmbed & OEmbedExtra,\n\tState extends FieldState = FieldState,\n> = State extends \"empty\"\n\t? EmptyObjectField\n\t: Data & {\n\t\t\tembed_url: string;\n\t\t\thtml: string | null;\n\t };\n"],"names":[],"mappings":";;AAOO,MAAM,aAAa;AAAA,EACzB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;;;"}
|