@prismicio/client 7.0.0-alpha.0 → 7.0.0-alpha.2
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 +139 -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 +60 -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
package/dist/index.d.ts
CHANGED
|
@@ -1,92 +1,139 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export type {
|
|
47
|
-
export type {
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export {
|
|
55
|
-
export {
|
|
56
|
-
export
|
|
57
|
-
export {
|
|
58
|
-
export
|
|
59
|
-
export type {
|
|
60
|
-
export type {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export type {
|
|
70
|
-
export type {
|
|
71
|
-
export
|
|
72
|
-
export
|
|
73
|
-
export
|
|
74
|
-
export
|
|
75
|
-
export
|
|
76
|
-
export
|
|
77
|
-
export
|
|
78
|
-
export type {
|
|
79
|
-
export type {
|
|
80
|
-
export type {
|
|
81
|
-
export type {
|
|
82
|
-
export type {
|
|
83
|
-
export type {
|
|
84
|
-
export type {
|
|
85
|
-
export type {
|
|
86
|
-
export type {
|
|
87
|
-
export type {
|
|
88
|
-
export type {
|
|
89
|
-
export {
|
|
90
|
-
export type {
|
|
91
|
-
export type {
|
|
92
|
-
export type {
|
|
1
|
+
import type { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer } from "./helpers/asHTML";
|
|
2
|
+
import { filter } from "./filter";
|
|
3
|
+
export { createClient, Client } from "./createClient";
|
|
4
|
+
export { getRepositoryEndpoint } from "./getRepositoryEndpoint";
|
|
5
|
+
export { getRepositoryName } from "./getRepositoryName";
|
|
6
|
+
export { getGraphQLEndpoint } from "./getGraphQLEndpoint";
|
|
7
|
+
export { isRepositoryName } from "./isRepositoryName";
|
|
8
|
+
export { isRepositoryEndpoint } from "./isRepositoryEndpoint";
|
|
9
|
+
export { buildQueryURL } from "./buildQueryURL";
|
|
10
|
+
export { getToolbarSrc } from "./getToolbarSrc";
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Renamed to `filter`
|
|
13
|
+
*/
|
|
14
|
+
declare const predicate: {
|
|
15
|
+
at: (path: string, value: string | number | boolean | string[] | Date) => string;
|
|
16
|
+
not: (path: string, value: string | number | boolean | string[] | Date) => string;
|
|
17
|
+
any: (path: string, values: (string | number | boolean | Date)[]) => string;
|
|
18
|
+
in: (path: string, values: string[]) => string;
|
|
19
|
+
fulltext: (path: string, searchTerms: string) => string;
|
|
20
|
+
has: (path: string) => string;
|
|
21
|
+
missing: (path: string) => string;
|
|
22
|
+
similar: (id: string, value: number) => string;
|
|
23
|
+
geopointNear: (path: string, latitude: number, longitude: number, radius: number) => string;
|
|
24
|
+
numberLessThan: (path: string, value: number) => string;
|
|
25
|
+
numberGreaterThan: (path: string, value: number) => string;
|
|
26
|
+
numberInRange: (path: string, lowerLimit: number, upperLimit: number) => string;
|
|
27
|
+
dateAfter: (path: string, date: string | number | Date) => string;
|
|
28
|
+
dateBefore: (path: string, date: string | number | Date) => string;
|
|
29
|
+
dateBetween: (path: string, startDate: string | number | Date, endDate: string | number | Date) => string;
|
|
30
|
+
dateDayOfMonth: (path: string, day: number) => string;
|
|
31
|
+
dateDayOfMonthAfter: (path: string, day: number) => string;
|
|
32
|
+
dateDayOfMonthBefore: (path: string, day: number) => string;
|
|
33
|
+
dateDayOfWeek: (path: string, day: string | number) => string;
|
|
34
|
+
dateDayOfWeekAfter: (path: string, day: string | number) => string;
|
|
35
|
+
dateDayOfWeekBefore: (path: string, day: string | number) => string;
|
|
36
|
+
dateMonth: (path: string, month: string | number) => string;
|
|
37
|
+
dateMonthAfter: (path: string, month: string | number) => string;
|
|
38
|
+
dateMonthBefore: (path: string, month: string | number) => string;
|
|
39
|
+
dateYear: (path: string, year: number) => string;
|
|
40
|
+
dateHour: (path: string, hour: number) => string;
|
|
41
|
+
dateHourAfter: (path: string, hour: number) => string;
|
|
42
|
+
dateHourBefore: (path: string, hour: number) => string;
|
|
43
|
+
};
|
|
44
|
+
export { filter, predicate };
|
|
45
|
+
export * as cookie from "./cookie";
|
|
46
|
+
export type { AbortSignalLike, ClientConfig, CreateClient, FetchLike, HttpRequestLike, RequestInitLike, ResponseLike, } from "./createClient";
|
|
47
|
+
export type { BuildQueryURLArgs, Ordering, QueryParams, Route, } from "./buildQueryURL";
|
|
48
|
+
export { asDate } from "./helpers/asDate";
|
|
49
|
+
export { asLink } from "./helpers/asLink";
|
|
50
|
+
export { asLinkAttrs } from "./helpers/asLinkAttrs";
|
|
51
|
+
export { asText } from "./helpers/asText";
|
|
52
|
+
export { asHTML } from "./helpers/asHTML";
|
|
53
|
+
export { asImageSrc } from "./helpers/asImageSrc";
|
|
54
|
+
export { asImageWidthSrcSet } from "./helpers/asImageWidthSrcSet";
|
|
55
|
+
export { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet";
|
|
56
|
+
export * as isFilled from "./helpers/isFilled";
|
|
57
|
+
export { documentToLinkField } from "./helpers/documentToLinkField";
|
|
58
|
+
export { Element } from "@prismicio/richtext";
|
|
59
|
+
export type { LinkResolverFunction } from "./helpers/asLink";
|
|
60
|
+
export type { AsLinkAttrsConfig } from "./helpers/asLinkAttrs";
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated Renamed to `HTMLRichTextMapSerializer`
|
|
63
|
+
*/
|
|
64
|
+
type HTMLMapSerializer = HTMLRichTextMapSerializer;
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated Renamed to `HTMLRichTextFunctionSerializer`
|
|
67
|
+
*/
|
|
68
|
+
type HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;
|
|
69
|
+
export type { HTMLRichTextMapSerializer, HTMLRichTextFunctionSerializer, HTMLMapSerializer, HTMLFunctionSerializer, };
|
|
70
|
+
export type { HTMLRichTextSerializer } from "./helpers/asHTML";
|
|
71
|
+
export { PrismicError } from "./errors/PrismicError";
|
|
72
|
+
export { ForbiddenError } from "./errors/ForbiddenError";
|
|
73
|
+
export { NotFoundError } from "./errors/NotFoundError";
|
|
74
|
+
export { ParsingError } from "./errors/ParsingError";
|
|
75
|
+
export { RichTextNodeType } from "./types/value/richText";
|
|
76
|
+
export { LinkType } from "./types/value/link";
|
|
77
|
+
export { OEmbedType } from "./types/value/embed";
|
|
78
|
+
export type { PrismicDocument, PrismicDocumentWithUID, PrismicDocumentWithoutUID, PrismicDocumentHeader, AlternateLanguage, } from "./types/value/document";
|
|
79
|
+
export type { RichTextField, RTTextNodeBase, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTParagraphNode, RTPreformattedNode, RTListItemNode, RTOListItemNode, RTSpanNodeBase, RTStrongNode, RTEmNode, RTLabelNode, RTImageNode, RTEmbedNode, RTLinkNode, RTListNode, RTOListNode, RTSpanNode, RTNode, RTTextNode, RTBlockNode, RTInlineNode, RTAnyNode, } from "./types/value/richText";
|
|
80
|
+
export type { TitleField } from "./types/value/title";
|
|
81
|
+
export type { ImageField, ImageFieldImage, FilledImageFieldImage, EmptyImageFieldImage, } from "./types/value/image";
|
|
82
|
+
export type { EmptyLinkField, LinkField, FilledLinkToWebField, } from "./types/value/link";
|
|
83
|
+
export type { ContentRelationshipField, FilledContentRelationshipField, } from "./types/value/contentRelationship";
|
|
84
|
+
export type { LinkToMediaField, FilledLinkToMediaField, } from "./types/value/linkToMedia";
|
|
85
|
+
export type { OEmbedExtra, PhotoOEmbed, VideoOEmbed, LinkOEmbed, RichOEmbed, AnyOEmbed, EmbedField, } from "./types/value/embed";
|
|
86
|
+
export type { BooleanField } from "./types/value/boolean";
|
|
87
|
+
export type { ColorField } from "./types/value/color";
|
|
88
|
+
export type { DateField } from "./types/value/date";
|
|
89
|
+
export type { KeyTextField } from "./types/value/keyText";
|
|
90
|
+
export type { NumberField } from "./types/value/number";
|
|
91
|
+
export type { SelectField } from "./types/value/select";
|
|
92
|
+
export type { TimestampField } from "./types/value/timestamp";
|
|
93
|
+
export type { GeoPointField } from "./types/value/geoPoint";
|
|
94
|
+
export type { IntegrationFields } from "./types/value/integrationFields";
|
|
95
|
+
export type { GroupField } from "./types/value/group";
|
|
96
|
+
export type { SliceZone } from "./types/value/sliceZone";
|
|
97
|
+
export type { Slice } from "./types/value/slice";
|
|
98
|
+
export type { SharedSlice } from "./types/value/sharedSlice";
|
|
99
|
+
export type { SharedSliceVariation } from "./types/value/sharedSliceVariation";
|
|
100
|
+
export type { FieldState, AnyRegularField } from "./types/value/types";
|
|
101
|
+
export { CustomTypeModelFieldType } from "./types/model/types";
|
|
102
|
+
export { CustomTypeModelLinkSelectType } from "./types/model/link";
|
|
103
|
+
export { CustomTypeModelSliceType } from "./types/model/sliceZone";
|
|
104
|
+
export { CustomTypeModelSliceDisplay } from "./types/model/slice";
|
|
105
|
+
export type { CustomTypeModel, CustomTypeModelDefinition, CustomTypeModelTab, } from "./types/model/customType";
|
|
106
|
+
export type { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField, } from "./types/model/richText";
|
|
107
|
+
export type { CustomTypeModelTitleField } from "./types/model/title";
|
|
108
|
+
export type { CustomTypeModelImageField, CustomTypeModelImageConstraint, CustomTypeModelImageThumbnail, } from "./types/model/image";
|
|
109
|
+
export type { CustomTypeModelContentRelationshipField } from "./types/model/contentRelationship";
|
|
110
|
+
export type { CustomTypeModelLinkField } from "./types/model/link";
|
|
111
|
+
export type { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia";
|
|
112
|
+
export type { CustomTypeModelEmbedField } from "./types/model/embed";
|
|
113
|
+
export type { CustomTypeModelBooleanField } from "./types/model/boolean";
|
|
114
|
+
export type { CustomTypeModelColorField } from "./types/model/color";
|
|
115
|
+
export type { CustomTypeModelDateField } from "./types/model/date";
|
|
116
|
+
export type { CustomTypeModelKeyTextField } from "./types/model/keyText";
|
|
117
|
+
export type { CustomTypeModelNumberField } from "./types/model/number";
|
|
118
|
+
export type { CustomTypeModelSelectField } from "./types/model/select";
|
|
119
|
+
export type { CustomTypeModelTimestampField } from "./types/model/timestamp";
|
|
120
|
+
export type { CustomTypeModelGeoPointField } from "./types/model/geoPoint";
|
|
121
|
+
export type { CustomTypeModelIntegrationFieldsField } from "./types/model/integrationFields";
|
|
122
|
+
export type { CustomTypeModelGroupField } from "./types/model/group";
|
|
123
|
+
export type { CustomTypeModelSliceZoneField, CustomTypeModelSliceLabel, CustomTypeModelSharedSlice, } from "./types/model/sliceZone";
|
|
124
|
+
export type { CustomTypeModelSlice, CustomTypeModelLegacySlice, } from "./types/model/slice";
|
|
125
|
+
export type { SharedSliceModel } from "./types/model/sharedSlice";
|
|
126
|
+
export type { SharedSliceModelVariation } from "./types/model/sharedSliceVariation";
|
|
127
|
+
export type { CustomTypeModelUIDField } from "./types/model/uid";
|
|
128
|
+
export type { CustomTypeModelRangeField } from "./types/model/range";
|
|
129
|
+
export type { CustomTypeModelSeparatorField } from "./types/model/separator";
|
|
130
|
+
export type { CustomTypeModelField, CustomTypeModelFieldForGroup, } from "./types/model/types";
|
|
131
|
+
export type { Query } from "./types/api/query";
|
|
132
|
+
export type { Ref } from "./types/api/ref";
|
|
133
|
+
export type { Release } from "./types/api/release";
|
|
134
|
+
export type { Repository, Language, Form, FormField, } from "./types/api/repository";
|
|
135
|
+
export type { Tags } from "./types/api/tags";
|
|
136
|
+
export { WebhookType } from "./types/webhook/types";
|
|
137
|
+
export type { WebhookBody } from "./types/webhook/types";
|
|
138
|
+
export type { WebhookBodyAPIUpdate } from "./types/webhook/apiUpdate";
|
|
139
|
+
export type { WebhookBodyTestTrigger } from "./types/webhook/testTrigger";
|
package/dist/index.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
+
import { filter } from "./filter.js";
|
|
2
|
+
import { Client, createClient } from "./createClient.js";
|
|
1
3
|
import { getRepositoryEndpoint } from "./getRepositoryEndpoint.js";
|
|
2
4
|
import { getRepositoryName } from "./getRepositoryName.js";
|
|
3
5
|
import { getGraphQLEndpoint } from "./getGraphQLEndpoint.js";
|
|
4
6
|
import { isRepositoryName } from "./isRepositoryName.js";
|
|
5
7
|
import { isRepositoryEndpoint } from "./isRepositoryEndpoint.js";
|
|
6
8
|
import { buildQueryURL } from "./buildQueryURL.js";
|
|
7
|
-
import {
|
|
8
|
-
import { predicate } from "./predicate.js";
|
|
9
|
-
import { PrismicError } from "./PrismicError.js";
|
|
10
|
-
import { ForbiddenError } from "./ForbiddenError.js";
|
|
11
|
-
import { ParsingError } from "./ParsingError.js";
|
|
12
|
-
import { NotFoundError } from "./NotFoundError.js";
|
|
9
|
+
import { getToolbarSrc } from "./getToolbarSrc.js";
|
|
13
10
|
import * as cookie from "./cookie.js";
|
|
14
11
|
import { asDate } from "./helpers/asDate.js";
|
|
15
12
|
import { asLink } from "./helpers/asLink.js";
|
|
13
|
+
import { asLinkAttrs } from "./helpers/asLinkAttrs.js";
|
|
16
14
|
import { asText } from "./helpers/asText.js";
|
|
17
15
|
import { asHTML } from "./helpers/asHTML.js";
|
|
18
16
|
import { asImageSrc } from "./helpers/asImageSrc.js";
|
|
@@ -21,6 +19,10 @@ import { asImagePixelDensitySrcSet } from "./helpers/asImagePixelDensitySrcSet.j
|
|
|
21
19
|
import * as isFilled from "./helpers/isFilled.js";
|
|
22
20
|
import { documentToLinkField } from "./helpers/documentToLinkField.js";
|
|
23
21
|
import { Element } from "@prismicio/richtext";
|
|
22
|
+
import { PrismicError } from "./errors/PrismicError.js";
|
|
23
|
+
import { ForbiddenError } from "./errors/ForbiddenError.js";
|
|
24
|
+
import { NotFoundError } from "./errors/NotFoundError.js";
|
|
25
|
+
import { ParsingError } from "./errors/ParsingError.js";
|
|
24
26
|
import { RichTextNodeType } from "./types/value/richText.js";
|
|
25
27
|
import { LinkType } from "./types/value/link.js";
|
|
26
28
|
import { OEmbedType } from "./types/value/embed.js";
|
|
@@ -29,6 +31,7 @@ import { CustomTypeModelLinkSelectType } from "./types/model/link.js";
|
|
|
29
31
|
import { CustomTypeModelSliceType } from "./types/model/sliceZone.js";
|
|
30
32
|
import { CustomTypeModelSliceDisplay } from "./types/model/slice.js";
|
|
31
33
|
import { WebhookType } from "./types/webhook/types.js";
|
|
34
|
+
const predicate = filter;
|
|
32
35
|
export {
|
|
33
36
|
Client,
|
|
34
37
|
CustomTypeModelFieldType,
|
|
@@ -50,14 +53,17 @@ export {
|
|
|
50
53
|
asImageSrc,
|
|
51
54
|
asImageWidthSrcSet,
|
|
52
55
|
asLink,
|
|
56
|
+
asLinkAttrs,
|
|
53
57
|
asText,
|
|
54
58
|
buildQueryURL,
|
|
55
59
|
cookie,
|
|
56
60
|
createClient,
|
|
57
61
|
documentToLinkField,
|
|
62
|
+
filter,
|
|
58
63
|
getGraphQLEndpoint,
|
|
59
64
|
getRepositoryEndpoint,
|
|
60
65
|
getRepositoryName,
|
|
66
|
+
getToolbarSrc,
|
|
61
67
|
isFilled,
|
|
62
68
|
isRepositoryEndpoint,
|
|
63
69
|
isRepositoryName,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["// Use for deprecations.\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\";\n\nimport { filter } from \"./filter\";\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient, Client } from \"./createClient\";\n\n// API endpoint helpers.\nexport { getRepositoryEndpoint } from \"./getRepositoryEndpoint\";\nexport { getRepositoryName } from \"./getRepositoryName\";\nexport { getGraphQLEndpoint } from \"./getGraphQLEndpoint\";\nexport { isRepositoryName } from \"./isRepositoryName\";\nexport { isRepositoryEndpoint } from \"./isRepositoryEndpoint\";\nexport { buildQueryURL } from \"./buildQueryURL\";\n\n// Toolbar helpers.\nexport { getToolbarSrc } from \"./getToolbarSrc\";\n\n// Query filters API.\n/**\n * @deprecated Renamed to `filter`\n */\n// TODO: Remove when we remove support for deprecated `predicate` export.\nconst predicate = filter;\nexport { filter, predicate };\n\n// A collection of well-known cookie names shared between Prismic libraries and systems.\nexport * as cookie from \"./cookie\";\n\n// General types used to query content from Prismic. These are made public to allow users to better type their projects.\nexport type {\n\tAbortSignalLike,\n\tClientConfig,\n\tCreateClient,\n\tFetchLike,\n\tHttpRequestLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./createClient\";\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\";\n\n//=============================================================================\n// Helpers - Manipulate content from Prismic.\n//=============================================================================\n\n// Primary Helpers API.\nexport { asDate } from \"./helpers/asDate\";\nexport { asLink } from \"./helpers/asLink\";\nexport { asLinkAttrs } from \"./helpers/asLinkAttrs\";\nexport { asText } from \"./helpers/asText\";\nexport { asHTML } from \"./helpers/asHTML\";\nexport { asImageSrc } from \"./helpers/asImageSrc\";\nexport { asImageWidthSrcSet } from \"./helpers/asImageWidthSrcSet\";\nexport { asImagePixelDensitySrcSet } from \"./helpers/asImagePixelDensitySrcSet\";\nexport * as isFilled from \"./helpers/isFilled\";\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\";\n\n// RichText element types.\nexport { Element } from \"@prismicio/richtext\";\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\";\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\";\n\n/**\n * @deprecated Renamed to `HTMLRichTextMapSerializer`\n */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer;\n/**\n * @deprecated Renamed to `HTMLRichTextFunctionSerializer`\n */\ntype HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;\nexport type {\n\tHTMLRichTextMapSerializer,\n\tHTMLRichTextFunctionSerializer,\n\tHTMLMapSerializer,\n\tHTMLFunctionSerializer,\n};\nexport type { HTMLRichTextSerializer } from \"./helpers/asHTML\";\n\n//=============================================================================\n// Errors - Custom errors for Prismic APIs.\n//=============================================================================\n\nexport { PrismicError } from \"./errors/PrismicError\";\nexport { ForbiddenError } from \"./errors/ForbiddenError\";\nexport { NotFoundError } from \"./errors/NotFoundError\";\nexport { ParsingError } from \"./errors/ParsingError\";\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\nexport { RichTextNodeType } from \"./types/value/richText\";\nexport { LinkType } from \"./types/value/link\";\nexport { OEmbedType } from \"./types/value/embed\";\n\nexport type {\n\tPrismicDocument,\n\tPrismicDocumentWithUID,\n\tPrismicDocumentWithoutUID,\n\tPrismicDocumentHeader,\n\tAlternateLanguage,\n} from \"./types/value/document\";\n\nexport type {\n\t// RichText & Title\n\tRichTextField,\n\t// RichText & Title (block nodes)\n\tRTTextNodeBase,\n\tRTHeading1Node,\n\tRTHeading2Node,\n\tRTHeading3Node,\n\tRTHeading4Node,\n\tRTHeading5Node,\n\tRTHeading6Node,\n\tRTParagraphNode,\n\tRTPreformattedNode,\n\tRTListItemNode,\n\tRTOListItemNode,\n\t// RichText & Title (span nodes)\n\tRTSpanNodeBase,\n\tRTStrongNode,\n\tRTEmNode,\n\tRTLabelNode,\n\t// RichText & Title (media nodes)\n\tRTImageNode,\n\tRTEmbedNode,\n\t// RichText & Title (link nodes)\n\tRTLinkNode,\n\t// RichText & Title (serialization related nodes)\n\tRTListNode,\n\tRTOListNode,\n\tRTSpanNode,\n\t// RichText & Title (helpers)\n\tRTNode,\n\tRTTextNode,\n\tRTBlockNode,\n\tRTInlineNode,\n\tRTAnyNode,\n} from \"./types/value/richText\";\nexport type { TitleField } from \"./types/value/title\";\n\nexport type {\n\tImageField,\n\tImageFieldImage,\n\tFilledImageFieldImage,\n\tEmptyImageFieldImage,\n} from \"./types/value/image\";\n\nexport type {\n\tEmptyLinkField,\n\tLinkField,\n\tFilledLinkToWebField,\n} from \"./types/value/link\";\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\";\nexport type {\n\tLinkToMediaField,\n\tFilledLinkToMediaField,\n} from \"./types/value/linkToMedia\";\n\nexport type {\n\tOEmbedExtra,\n\tPhotoOEmbed,\n\tVideoOEmbed,\n\tLinkOEmbed,\n\tRichOEmbed,\n\tAnyOEmbed,\n\tEmbedField,\n} from \"./types/value/embed\";\n\nexport type { BooleanField } from \"./types/value/boolean\";\nexport type { ColorField } from \"./types/value/color\";\nexport type { DateField } from \"./types/value/date\";\nexport type { KeyTextField } from \"./types/value/keyText\";\nexport type { NumberField } from \"./types/value/number\";\nexport type { SelectField } from \"./types/value/select\";\nexport type { TimestampField } from \"./types/value/timestamp\";\nexport type { GeoPointField } from \"./types/value/geoPoint\";\n\nexport type { IntegrationFields } from \"./types/value/integrationFields\";\n\nexport type { GroupField } from \"./types/value/group\";\n\nexport type { SliceZone } from \"./types/value/sliceZone\";\nexport type { Slice } from \"./types/value/slice\";\nexport type { SharedSlice } from \"./types/value/sharedSlice\";\nexport type { SharedSliceVariation } from \"./types/value/sharedSliceVariation\";\n\nexport type { FieldState, AnyRegularField } from \"./types/value/types\";\n\n// Models - Types representing Prismic content models.\nexport { CustomTypeModelFieldType } from \"./types/model/types\";\nexport { CustomTypeModelLinkSelectType } from \"./types/model/link\";\nexport { CustomTypeModelSliceType } from \"./types/model/sliceZone\";\nexport { CustomTypeModelSliceDisplay } from \"./types/model/slice\";\n\nexport type {\n\tCustomTypeModel,\n\tCustomTypeModelDefinition,\n\tCustomTypeModelTab,\n} from \"./types/model/customType\";\n\nexport type {\n\tCustomTypeModelRichTextField,\n\tCustomTypeModelRichTextMultiField,\n\tCustomTypeModelRichTextSingleField,\n} from \"./types/model/richText\";\nexport type { CustomTypeModelTitleField } from \"./types/model/title\";\n\nexport type {\n\tCustomTypeModelImageField,\n\tCustomTypeModelImageConstraint,\n\tCustomTypeModelImageThumbnail,\n} from \"./types/model/image\";\n\nexport type { CustomTypeModelContentRelationshipField } from \"./types/model/contentRelationship\";\nexport type { CustomTypeModelLinkField } from \"./types/model/link\";\nexport type { CustomTypeModelLinkToMediaField } from \"./types/model/linkToMedia\";\n\nexport type { CustomTypeModelEmbedField } from \"./types/model/embed\";\n\nexport type { CustomTypeModelBooleanField } from \"./types/model/boolean\";\nexport type { CustomTypeModelColorField } from \"./types/model/color\";\nexport type { CustomTypeModelDateField } from \"./types/model/date\";\nexport type { CustomTypeModelKeyTextField } from \"./types/model/keyText\";\nexport type { CustomTypeModelNumberField } from \"./types/model/number\";\nexport type { CustomTypeModelSelectField } from \"./types/model/select\";\nexport type { CustomTypeModelTimestampField } from \"./types/model/timestamp\";\nexport type { CustomTypeModelGeoPointField } from \"./types/model/geoPoint\";\n\nexport type { CustomTypeModelIntegrationFieldsField } from \"./types/model/integrationFields\";\nexport type { CustomTypeModelGroupField } from \"./types/model/group\";\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\";\nexport type {\n\tCustomTypeModelSlice,\n\tCustomTypeModelLegacySlice,\n} from \"./types/model/slice\";\nexport type { SharedSliceModel } from \"./types/model/sharedSlice\";\nexport type { SharedSliceModelVariation } from \"./types/model/sharedSliceVariation\";\n\nexport type { CustomTypeModelUIDField } from \"./types/model/uid\";\n\nexport type { CustomTypeModelRangeField } from \"./types/model/range\";\nexport type { CustomTypeModelSeparatorField } from \"./types/model/separator\";\n\nexport type {\n\tCustomTypeModelField,\n\tCustomTypeModelFieldForGroup,\n} from \"./types/model/types\";\n\n// API - Types representing Prismic Rest API V2 responses.\nexport type { Query } from \"./types/api/query\";\n\nexport type { Ref } from \"./types/api/ref\";\n\nexport type { Release } from \"./types/api/release\";\n\nexport type {\n\tRepository,\n\tLanguage,\n\tForm,\n\tFormField,\n} from \"./types/api/repository\";\n\nexport type { Tags } from \"./types/api/tags\";\n\n// Webhook - Types representing Prismic webhooks.\nexport { WebhookType } from \"./types/webhook/types\";\n\nexport type { WebhookBody } from \"./types/webhook/types\";\n\nexport type { WebhookBodyAPIUpdate } from \"./types/webhook/apiUpdate\";\n\nexport type { WebhookBodyTestTrigger } from \"./types/webhook/testTrigger\";\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,MAAM,YAAY;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const isRepositoryEndpoint = (input) => {
|
|
4
4
|
try {
|
|
5
5
|
new URL(input);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.cjs","sources":["
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.cjs","sources":["../../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string if a Prismic Rest API V2 endpoint. Note that any valid\n * URL is a valid endpoint to support network proxies.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic Rest API V2 endpoint, `false`\n * otherwise.\n */\nexport const isRepositoryEndpoint = (input: string): boolean => {\n\ttry {\n\t\tnew URL(input);\n\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n"],"names":[],"mappings":";;AASa,MAAA,uBAAuB,CAAC,UAA0B;AAC1D,MAAA;AACH,QAAI,IAAI,KAAK;AAEN,WAAA;AAAA,EAAA,QACN;AACM,WAAA;AAAA,EACP;AACF;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines if a string if a Prismic Rest API V2 endpoint. Note that any valid
|
|
3
|
-
* URL is a valid endpoint to support network proxies.
|
|
4
|
-
*
|
|
5
|
-
* @param input - Input to test.
|
|
6
|
-
*
|
|
7
|
-
* @returns `true` if `input` is a valid Prismic Rest API V2 endpoint, `false`
|
|
8
|
-
* otherwise.
|
|
9
|
-
*/
|
|
10
|
-
export declare const isRepositoryEndpoint: (input: string) => boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Determines if a string if a Prismic Rest API V2 endpoint. Note that any valid
|
|
3
|
+
* URL is a valid endpoint to support network proxies.
|
|
4
|
+
*
|
|
5
|
+
* @param input - Input to test.
|
|
6
|
+
*
|
|
7
|
+
* @returns `true` if `input` is a valid Prismic Rest API V2 endpoint, `false`
|
|
8
|
+
* otherwise.
|
|
9
|
+
*/
|
|
10
|
+
export declare const isRepositoryEndpoint: (input: string) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.js","sources":["
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.js","sources":["../../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string if a Prismic Rest API V2 endpoint. Note that any valid\n * URL is a valid endpoint to support network proxies.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic Rest API V2 endpoint, `false`\n * otherwise.\n */\nexport const isRepositoryEndpoint = (input: string): boolean => {\n\ttry {\n\t\tnew URL(input);\n\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n};\n"],"names":[],"mappings":"AASa,MAAA,uBAAuB,CAAC,UAA0B;AAC1D,MAAA;AACH,QAAI,IAAI,KAAK;AAEN,WAAA;AAAA,EAAA,QACN;AACM,WAAA;AAAA,EACP;AACF;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const isRepositoryName = (input) => {
|
|
4
4
|
return /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input);
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.cjs","sources":["
|
|
1
|
+
{"version":3,"file":"isRepositoryName.cjs","sources":["../../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input);\n};\n"],"names":[],"mappings":";;AAQa,MAAA,mBAAmB,CAAC,UAA0B;AACnD,SAAA,2CAA2C,KAAK,KAAK;AAC7D;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Determines if an input is a valid Prismic repository name.
|
|
3
|
-
*
|
|
4
|
-
* @param input - Input to test.
|
|
5
|
-
*
|
|
6
|
-
* @returns `true` if `input` is a valid Prismic repository name, `false`
|
|
7
|
-
* otherwise.
|
|
8
|
-
*/
|
|
9
|
-
export declare const isRepositoryName: (input: string) => boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Determines if an input is a valid Prismic repository name.
|
|
3
|
+
*
|
|
4
|
+
* @param input - Input to test.
|
|
5
|
+
*
|
|
6
|
+
* @returns `true` if `input` is a valid Prismic repository name, `false`
|
|
7
|
+
* otherwise.
|
|
8
|
+
*/
|
|
9
|
+
export declare const isRepositoryName: (input: string) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.js","sources":["
|
|
1
|
+
{"version":3,"file":"isRepositoryName.js","sources":["../../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n *\n * @returns `true` if `input` is a valid Prismic repository name, `false`\n * otherwise.\n */\nexport const isRepositoryName = (input: string): boolean => {\n\treturn /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input);\n};\n"],"names":[],"mappings":"AAQa,MAAA,mBAAmB,CAAC,UAA0B;AACnD,SAAA,2CAA2C,KAAK,KAAK;AAC7D;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const castArray = require("./castArray.cjs");
|
|
4
|
+
const appendFilters = (objWithFilters = {}, filters) => {
|
|
5
|
+
return {
|
|
6
|
+
...objWithFilters,
|
|
7
|
+
filters: [...objWithFilters.filters || [], ...castArray.castArray(filters)]
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
exports.appendFilters = appendFilters;
|
|
11
|
+
//# sourceMappingURL=appendFilters.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appendFilters.cjs","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\";\n\ninterface WithFilters {\n\tfilters?: string | string[];\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property.\n * Appended filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n * @param objWithFilters - Object to append filters on the `filters`\n * property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t};\n};\n"],"names":["castArray"],"mappings":";;;AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,IACpB,YAC8B;AACvB,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAGA,UAAAA,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface WithFilters {
|
|
2
|
+
filters?: string | string[];
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Adds one or more filters to an object with a `filters` property.
|
|
6
|
+
* Appended filters are added to the end of the existing list.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam T - Object to which filters will be append.
|
|
9
|
+
* @param objWithFilters - Object to append filters on the `filters`
|
|
10
|
+
* property.
|
|
11
|
+
* @param filters - One or more filters to append.
|
|
12
|
+
*
|
|
13
|
+
* @returns The object with the appended filters.
|
|
14
|
+
*/
|
|
15
|
+
export declare const appendFilters: <T extends WithFilters>(objWithFilters: T | undefined, filters: string | string[]) => T & {
|
|
16
|
+
filters: string[];
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { castArray } from "./castArray.js";
|
|
2
|
+
const appendFilters = (objWithFilters = {}, filters) => {
|
|
3
|
+
return {
|
|
4
|
+
...objWithFilters,
|
|
5
|
+
filters: [...objWithFilters.filters || [], ...castArray(filters)]
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
appendFilters
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=appendFilters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appendFilters.js","sources":["../../../src/lib/appendFilters.ts"],"sourcesContent":["import { castArray } from \"./castArray\";\n\ninterface WithFilters {\n\tfilters?: string | string[];\n}\n\n/**\n * Adds one or more filters to an object with a `filters` property.\n * Appended filters are added to the end of the existing list.\n *\n * @typeParam T - Object to which filters will be append.\n * @param objWithFilters - Object to append filters on the `filters`\n * property.\n * @param filters - One or more filters to append.\n *\n * @returns The object with the appended filters.\n */\nexport const appendFilters = <T extends WithFilters>(\n\tobjWithFilters: T = {} as T,\n\tfilters: string | string[],\n): T & { filters: string[] } => {\n\treturn {\n\t\t...objWithFilters,\n\t\tfilters: [...(objWithFilters.filters || []), ...castArray(filters)],\n\t};\n};\n"],"names":[],"mappings":";AAiBO,MAAM,gBAAgB,CAC5B,iBAAoB,IACpB,YAC8B;AACvB,SAAA;AAAA,IACN,GAAG;AAAA,IACH,SAAS,CAAC,GAAI,eAAe,WAAW,CAAA,GAAK,GAAG,UAAU,OAAO,CAAC;AAAA,EAAA;AAEpE;"}
|
package/dist/lib/castArray.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const castArray = (a) =>
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const castArray = (a) => {
|
|
4
|
+
return Array.isArray(a) ? a : [a];
|
|
5
|
+
};
|
|
4
6
|
exports.castArray = castArray;
|
|
5
7
|
//# sourceMappingURL=castArray.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castArray.cjs","sources":["
|
|
1
|
+
{"version":3,"file":"castArray.cjs","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a];\n};\n"],"names":[],"mappings":";;AAUa,MAAA,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;;"}
|
package/dist/lib/castArray.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ensures that a value is an array. If it is already an array, it is returned
|
|
3
|
-
* as is. If it is not an array, it is converted to an array with itself as its
|
|
4
|
-
* only element.
|
|
5
|
-
*
|
|
6
|
-
* @typeParam A - Element of the array.
|
|
7
|
-
* @param a - Value to ensure is an array.
|
|
8
|
-
*
|
|
9
|
-
* @returns `a` as an array.
|
|
10
|
-
*/
|
|
11
|
-
export declare const castArray: <A>(a: A | A[]) => A[];
|
|
1
|
+
/**
|
|
2
|
+
* Ensures that a value is an array. If it is already an array, it is returned
|
|
3
|
+
* as is. If it is not an array, it is converted to an array with itself as its
|
|
4
|
+
* only element.
|
|
5
|
+
*
|
|
6
|
+
* @typeParam A - Element of the array.
|
|
7
|
+
* @param a - Value to ensure is an array.
|
|
8
|
+
*
|
|
9
|
+
* @returns `a` as an array.
|
|
10
|
+
*/
|
|
11
|
+
export declare const castArray: <A>(a: A | A[]) => A[];
|
package/dist/lib/castArray.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castArray.js","sources":["
|
|
1
|
+
{"version":3,"file":"castArray.js","sources":["../../../src/lib/castArray.ts"],"sourcesContent":["/**\n * Ensures that a value is an array. If it is already an array, it is returned\n * as is. If it is not an array, it is converted to an array with itself as its\n * only element.\n *\n * @typeParam A - Element of the array.\n * @param a - Value to ensure is an array.\n *\n * @returns `a` as an array.\n */\nexport const castArray = <A>(a: A | A[]): A[] => {\n\treturn Array.isArray(a) ? a : [a];\n};\n"],"names":[],"mappings":"AAUa,MAAA,YAAY,CAAI,MAAmB;AAC/C,SAAO,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC;AACjC;"}
|
package/dist/lib/castThunk.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const castThunk = (a) =>
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const castThunk = (a) => {
|
|
4
|
+
return typeof a === "function" ? a : () => a;
|
|
5
|
+
};
|
|
4
6
|
exports.castThunk = castThunk;
|
|
5
7
|
//# sourceMappingURL=castThunk.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castThunk.cjs","sources":["
|
|
1
|
+
{"version":3,"file":"castThunk.cjs","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a;\n};\n"],"names":[],"mappings":";;AASa,MAAA,YAAY,CAAI,MAA+B;AAC3D,SAAO,OAAO,MAAM,aAAc,IAAgB,MAAM;AACzD;;"}
|
package/dist/lib/castThunk.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ensures that a value is a thunk. If it is already a thunk, it is returned as
|
|
3
|
-
* is. If it is not a thunk, it is converted to a thunk.
|
|
4
|
-
*
|
|
5
|
-
* @typeParam A - Value returned by the thunk.
|
|
6
|
-
* @param a - Value to ensure is a thunk.
|
|
7
|
-
*
|
|
8
|
-
* @returns `a` as a a thunk.
|
|
9
|
-
*/
|
|
10
|
-
export declare const castThunk: <A>(a: A | (() => A)) => () => A;
|
|
1
|
+
/**
|
|
2
|
+
* Ensures that a value is a thunk. If it is already a thunk, it is returned as
|
|
3
|
+
* is. If it is not a thunk, it is converted to a thunk.
|
|
4
|
+
*
|
|
5
|
+
* @typeParam A - Value returned by the thunk.
|
|
6
|
+
* @param a - Value to ensure is a thunk.
|
|
7
|
+
*
|
|
8
|
+
* @returns `a` as a a thunk.
|
|
9
|
+
*/
|
|
10
|
+
export declare const castThunk: <A>(a: A | (() => A)) => () => A;
|
package/dist/lib/castThunk.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"castThunk.js","sources":["
|
|
1
|
+
{"version":3,"file":"castThunk.js","sources":["../../../src/lib/castThunk.ts"],"sourcesContent":["/**\n * Ensures that a value is a thunk. If it is already a thunk, it is returned as\n * is. If it is not a thunk, it is converted to a thunk.\n *\n * @typeParam A - Value returned by the thunk.\n * @param a - Value to ensure is a thunk.\n *\n * @returns `a` as a a thunk.\n */\nexport const castThunk = <A>(a: A | (() => A)): (() => A) => {\n\treturn typeof a === \"function\" ? (a as () => A) : () => a;\n};\n"],"names":[],"mappings":"AASa,MAAA,YAAY,CAAI,MAA+B;AAC3D,SAAO,OAAO,MAAM,aAAc,IAAgB,MAAM;AACzD;"}
|