@prismicio/client 7.21.7 → 7.21.8-pr.446.d7e6f74
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/dist/Client.cjs +190 -263
- package/dist/Client.cjs.map +1 -1
- package/dist/Client.d.cts +175 -241
- package/dist/Client.d.cts.map +1 -1
- package/dist/Client.d.ts +175 -241
- package/dist/Client.d.ts.map +1 -1
- package/dist/Client.js +190 -263
- package/dist/Client.js.map +1 -1
- package/dist/Migration.cjs +54 -86
- package/dist/Migration.cjs.map +1 -1
- package/dist/Migration.d.cts +50 -84
- package/dist/Migration.d.cts.map +1 -1
- package/dist/Migration.d.ts +50 -84
- package/dist/Migration.d.ts.map +1 -1
- package/dist/Migration.js +54 -86
- package/dist/Migration.js.map +1 -1
- package/dist/WriteClient.cjs +77 -77
- package/dist/WriteClient.cjs.map +1 -1
- package/dist/WriteClient.d.cts +50 -63
- package/dist/WriteClient.d.cts.map +1 -1
- package/dist/WriteClient.d.ts +50 -63
- package/dist/WriteClient.d.ts.map +1 -1
- package/dist/WriteClient.js +77 -77
- package/dist/WriteClient.js.map +1 -1
- package/dist/buildQueryURL.cjs +15 -22
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.cts +53 -63
- package/dist/buildQueryURL.d.cts.map +1 -1
- package/dist/buildQueryURL.d.ts +53 -63
- package/dist/buildQueryURL.d.ts.map +1 -1
- package/dist/buildQueryURL.js +15 -22
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.cjs +1 -4
- package/dist/cookie.cjs.map +1 -1
- package/dist/cookie.d.cts +1 -4
- package/dist/cookie.d.cts.map +1 -1
- package/dist/cookie.d.ts +1 -4
- package/dist/cookie.d.ts.map +1 -1
- package/dist/cookie.js +1 -4
- package/dist/cookie.js.map +1 -1
- package/dist/createClient.cjs +10 -14
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.cts +11 -18
- package/dist/createClient.d.cts.map +1 -1
- package/dist/createClient.d.ts +11 -18
- package/dist/createClient.d.ts.map +1 -1
- package/dist/createClient.js +10 -14
- package/dist/createClient.js.map +1 -1
- package/dist/createMigration.cjs +4 -7
- package/dist/createMigration.cjs.map +1 -1
- package/dist/createMigration.d.cts +5 -11
- package/dist/createMigration.d.cts.map +1 -1
- package/dist/createMigration.d.ts +5 -11
- package/dist/createMigration.d.ts.map +1 -1
- package/dist/createMigration.js +4 -7
- package/dist/createMigration.js.map +1 -1
- package/dist/createWriteClient.cjs +8 -13
- package/dist/createWriteClient.cjs.map +1 -1
- package/dist/createWriteClient.d.cts +10 -15
- package/dist/createWriteClient.d.cts.map +1 -1
- package/dist/createWriteClient.d.ts +10 -15
- package/dist/createWriteClient.d.ts.map +1 -1
- package/dist/createWriteClient.js +8 -13
- package/dist/createWriteClient.js.map +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/filter.cjs +5 -18
- package/dist/filter.cjs.map +1 -1
- package/dist/filter.d.cts +59 -63
- package/dist/filter.d.cts.map +1 -1
- package/dist/filter.d.ts +59 -63
- package/dist/filter.d.ts.map +1 -1
- package/dist/filter.js +5 -18
- package/dist/filter.js.map +1 -1
- package/dist/getGraphQLEndpoint.cjs +0 -2
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.d.cts +0 -2
- package/dist/getGraphQLEndpoint.d.cts.map +1 -1
- package/dist/getGraphQLEndpoint.d.ts +0 -2
- package/dist/getGraphQLEndpoint.d.ts.map +1 -1
- package/dist/getGraphQLEndpoint.js +0 -2
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs +4 -8
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.d.cts +4 -8
- package/dist/getRepositoryEndpoint.d.cts.map +1 -1
- package/dist/getRepositoryEndpoint.d.ts +4 -8
- package/dist/getRepositoryEndpoint.d.ts.map +1 -1
- package/dist/getRepositoryEndpoint.js +4 -8
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs +2 -5
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.d.cts +2 -5
- package/dist/getRepositoryName.d.cts.map +1 -1
- package/dist/getRepositoryName.d.ts +2 -5
- package/dist/getRepositoryName.d.ts.map +1 -1
- package/dist/getRepositoryName.js +2 -5
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs +17 -19
- package/dist/getToolbarSrc.cjs.map +1 -1
- package/dist/getToolbarSrc.d.cts +17 -19
- package/dist/getToolbarSrc.d.cts.map +1 -1
- package/dist/getToolbarSrc.d.ts +17 -19
- package/dist/getToolbarSrc.d.ts.map +1 -1
- package/dist/getToolbarSrc.js +17 -19
- package/dist/getToolbarSrc.js.map +1 -1
- package/dist/helpers/asDate.cjs +6 -9
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.d.cts +5 -10
- package/dist/helpers/asDate.d.cts.map +1 -1
- package/dist/helpers/asDate.d.ts +5 -10
- package/dist/helpers/asDate.d.ts.map +1 -1
- package/dist/helpers/asDate.js +6 -9
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs +25 -26
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.cts +29 -55
- package/dist/helpers/asHTML.d.cts.map +1 -1
- package/dist/helpers/asHTML.d.ts +29 -55
- package/dist/helpers/asHTML.d.ts.map +1 -1
- package/dist/helpers/asHTML.js +25 -26
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +21 -27
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts +25 -36
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +25 -36
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.js +21 -27
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs +7 -12
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.cts +8 -15
- package/dist/helpers/asImageSrc.d.cts.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +8 -15
- package/dist/helpers/asImageSrc.d.ts.map +1 -1
- package/dist/helpers/asImageSrc.js +7 -12
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs +25 -32
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.cts +29 -41
- package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +29 -41
- package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.js +25 -32
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.cts +15 -32
- package/dist/helpers/asLink.d.cts.map +1 -1
- package/dist/helpers/asLink.d.ts +15 -32
- package/dist/helpers/asLink.d.ts.map +1 -1
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs +8 -11
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.cts +9 -14
- package/dist/helpers/asLinkAttrs.d.cts.map +1 -1
- package/dist/helpers/asLinkAttrs.d.ts +9 -14
- package/dist/helpers/asLinkAttrs.d.ts.map +1 -1
- package/dist/helpers/asLinkAttrs.js +8 -11
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.cts +10 -23
- package/dist/helpers/asText.d.cts.map +1 -1
- package/dist/helpers/asText.d.ts +10 -23
- package/dist/helpers/asText.d.ts.map +1 -1
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs +2 -7
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.d.cts +1 -5
- package/dist/helpers/documentToLinkField.d.cts.map +1 -1
- package/dist/helpers/documentToLinkField.d.ts +1 -5
- package/dist/helpers/documentToLinkField.d.ts.map +1 -1
- package/dist/helpers/documentToLinkField.js +2 -7
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs +8 -35
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.d.cts +8 -32
- package/dist/helpers/isFilled.d.cts.map +1 -1
- package/dist/helpers/isFilled.d.ts +8 -32
- package/dist/helpers/isFilled.d.ts.map +1 -1
- package/dist/helpers/isFilled.js +8 -35
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/helpers/mapSliceZone.cjs +8 -10
- package/dist/helpers/mapSliceZone.cjs.map +1 -1
- package/dist/helpers/mapSliceZone.d.cts +35 -63
- package/dist/helpers/mapSliceZone.d.cts.map +1 -1
- package/dist/helpers/mapSliceZone.d.ts +35 -63
- package/dist/helpers/mapSliceZone.d.ts.map +1 -1
- package/dist/helpers/mapSliceZone.js +8 -10
- package/dist/helpers/mapSliceZone.js.map +1 -1
- package/dist/index.cjs +11 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -51
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +38 -51
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -17
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.cjs +3 -4
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.d.cts +3 -4
- package/dist/isRepositoryEndpoint.d.cts.map +1 -1
- package/dist/isRepositoryEndpoint.d.ts +3 -4
- package/dist/isRepositoryEndpoint.d.ts.map +1 -1
- package/dist/isRepositoryEndpoint.js +3 -4
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs +1 -2
- package/dist/isRepositoryName.cjs.map +1 -1
- package/dist/isRepositoryName.d.cts +1 -2
- package/dist/isRepositoryName.d.cts.map +1 -1
- package/dist/isRepositoryName.d.ts +1 -2
- package/dist/isRepositoryName.d.ts.map +1 -1
- package/dist/isRepositoryName.js +1 -2
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/devMsg.cjs +6 -8
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js +6 -8
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/getOptionalLinkProperties.cjs +5 -6
- package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
- package/dist/lib/getOptionalLinkProperties.js +5 -6
- package/dist/lib/getOptionalLinkProperties.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs +1 -3
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.js +1 -3
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/isInternalURL.cjs +0 -1
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js +0 -1
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/isMigrationValue.cjs +7 -17
- package/dist/lib/isMigrationValue.cjs.map +1 -1
- package/dist/lib/isMigrationValue.js +7 -17
- package/dist/lib/isMigrationValue.js.map +1 -1
- package/dist/lib/isValue.cjs +2 -16
- package/dist/lib/isValue.cjs.map +1 -1
- package/dist/lib/isValue.js +2 -16
- package/dist/lib/isValue.js.map +1 -1
- package/dist/lib/pLimit.cjs +5 -7
- package/dist/lib/pLimit.cjs.map +1 -1
- package/dist/lib/pLimit.js +5 -7
- package/dist/lib/pLimit.js.map +1 -1
- package/dist/lib/request.cjs +12 -23
- package/dist/lib/request.cjs.map +1 -1
- package/dist/lib/request.d.cts +7 -20
- package/dist/lib/request.d.cts.map +1 -1
- package/dist/lib/request.d.ts +7 -20
- package/dist/lib/request.d.ts.map +1 -1
- package/dist/lib/request.js +12 -23
- package/dist/lib/request.js.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.cjs +7 -15
- package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.js +7 -15
- package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/lib/throttledWarn.cjs +3 -4
- package/dist/lib/throttledWarn.cjs.map +1 -1
- package/dist/lib/throttledWarn.js +3 -4
- package/dist/lib/throttledWarn.js.map +1 -1
- package/dist/lib/validateAssetMetadata.cjs +6 -18
- package/dist/lib/validateAssetMetadata.cjs.map +1 -1
- package/dist/lib/validateAssetMetadata.js +6 -18
- package/dist/lib/validateAssetMetadata.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/richtext/asText.cjs +0 -2
- package/dist/richtext/asText.cjs.map +1 -1
- package/dist/richtext/asText.d.cts +0 -2
- package/dist/richtext/asText.d.cts.map +1 -1
- package/dist/richtext/asText.d.ts +0 -2
- package/dist/richtext/asText.d.ts.map +1 -1
- package/dist/richtext/asText.js +0 -2
- package/dist/richtext/asText.js.map +1 -1
- package/dist/richtext/asTree.cjs +2 -4
- package/dist/richtext/asTree.cjs.map +1 -1
- package/dist/richtext/asTree.d.cts +2 -4
- package/dist/richtext/asTree.d.cts.map +1 -1
- package/dist/richtext/asTree.d.ts +2 -4
- package/dist/richtext/asTree.d.ts.map +1 -1
- package/dist/richtext/asTree.js +2 -4
- package/dist/richtext/asTree.js.map +1 -1
- package/dist/richtext/composeSerializers.cjs +4 -7
- package/dist/richtext/composeSerializers.cjs.map +1 -1
- package/dist/richtext/composeSerializers.d.cts +4 -7
- package/dist/richtext/composeSerializers.d.cts.map +1 -1
- package/dist/richtext/composeSerializers.d.ts +4 -7
- package/dist/richtext/composeSerializers.d.ts.map +1 -1
- package/dist/richtext/composeSerializers.js +4 -7
- package/dist/richtext/composeSerializers.js.map +1 -1
- package/dist/richtext/serialize.cjs +2 -6
- package/dist/richtext/serialize.cjs.map +1 -1
- package/dist/richtext/serialize.d.cts +2 -6
- package/dist/richtext/serialize.d.cts.map +1 -1
- package/dist/richtext/serialize.d.ts +2 -6
- package/dist/richtext/serialize.d.ts.map +1 -1
- package/dist/richtext/serialize.js +2 -6
- package/dist/richtext/serialize.js.map +1 -1
- package/dist/richtext/types.cjs.map +1 -1
- package/dist/richtext/types.d.cts +3 -7
- package/dist/richtext/types.d.cts.map +1 -1
- package/dist/richtext/types.d.ts +3 -7
- package/dist/richtext/types.d.ts.map +1 -1
- package/dist/richtext/types.js.map +1 -1
- package/dist/richtext/wrapMapSerializer.cjs +2 -5
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.cts +2 -5
- package/dist/richtext/wrapMapSerializer.d.cts.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.ts +2 -5
- package/dist/richtext/wrapMapSerializer.d.ts.map +1 -1
- package/dist/richtext/wrapMapSerializer.js +2 -5
- package/dist/richtext/wrapMapSerializer.js.map +1 -1
- package/dist/types/api/asset/asset.d.cts +17 -70
- package/dist/types/api/asset/asset.d.cts.map +1 -1
- package/dist/types/api/asset/asset.d.ts +17 -70
- package/dist/types/api/asset/asset.d.ts.map +1 -1
- package/dist/types/api/asset/tag.d.cts +5 -23
- package/dist/types/api/asset/tag.d.cts.map +1 -1
- package/dist/types/api/asset/tag.d.ts +5 -23
- package/dist/types/api/asset/tag.d.ts.map +1 -1
- package/dist/types/api/integration.d.cts +2 -4
- package/dist/types/api/integration.d.cts.map +1 -1
- package/dist/types/api/integration.d.ts +2 -4
- package/dist/types/api/integration.d.ts.map +1 -1
- package/dist/types/api/migration/release.d.cts +16 -0
- package/dist/types/api/migration/release.d.cts.map +1 -0
- package/dist/types/api/migration/release.d.ts +16 -0
- package/dist/types/api/migration/release.d.ts.map +1 -0
- package/dist/types/api/query.d.cts +10 -27
- package/dist/types/api/query.d.cts.map +1 -1
- package/dist/types/api/query.d.ts +10 -27
- package/dist/types/api/query.d.ts.map +1 -1
- package/dist/types/api/ref.d.cts +6 -16
- package/dist/types/api/ref.d.cts.map +1 -1
- package/dist/types/api/ref.d.ts +6 -16
- package/dist/types/api/ref.d.ts.map +1 -1
- package/dist/types/api/release.d.cts +1 -2
- package/dist/types/api/release.d.cts.map +1 -1
- package/dist/types/api/release.d.ts +1 -2
- package/dist/types/api/release.d.ts.map +1 -1
- package/dist/types/api/repository.d.cts +18 -45
- package/dist/types/api/repository.d.cts.map +1 -1
- package/dist/types/api/repository.d.ts +18 -45
- package/dist/types/api/repository.d.ts.map +1 -1
- package/dist/types/api/tags.d.cts +2 -3
- package/dist/types/api/tags.d.cts.map +1 -1
- package/dist/types/api/tags.d.ts +2 -3
- package/dist/types/api/tags.d.ts.map +1 -1
- package/dist/types/migration/Asset.cjs +4 -13
- package/dist/types/migration/Asset.cjs.map +1 -1
- package/dist/types/migration/Asset.d.cts +20 -66
- package/dist/types/migration/Asset.d.cts.map +1 -1
- package/dist/types/migration/Asset.d.ts +20 -66
- package/dist/types/migration/Asset.d.ts.map +1 -1
- package/dist/types/migration/Asset.js +4 -13
- package/dist/types/migration/Asset.js.map +1 -1
- package/dist/types/migration/ContentRelationship.d.cts +1 -3
- package/dist/types/migration/ContentRelationship.d.cts.map +1 -1
- package/dist/types/migration/ContentRelationship.d.ts +1 -3
- package/dist/types/migration/ContentRelationship.d.ts.map +1 -1
- package/dist/types/migration/Document.cjs +10 -19
- package/dist/types/migration/Document.cjs.map +1 -1
- package/dist/types/migration/Document.d.cts +12 -31
- package/dist/types/migration/Document.d.cts.map +1 -1
- package/dist/types/migration/Document.d.ts +12 -31
- package/dist/types/migration/Document.d.ts.map +1 -1
- package/dist/types/migration/Document.js +10 -19
- package/dist/types/migration/Document.js.map +1 -1
- package/dist/types/model/contentRelationship.d.cts +5 -15
- package/dist/types/model/contentRelationship.d.cts.map +1 -1
- package/dist/types/model/contentRelationship.d.ts +5 -15
- package/dist/types/model/contentRelationship.d.ts.map +1 -1
- package/dist/types/model/customType.d.cts +6 -17
- package/dist/types/model/customType.d.cts.map +1 -1
- package/dist/types/model/customType.d.ts +6 -17
- package/dist/types/model/customType.d.ts.map +1 -1
- package/dist/types/model/image.d.cts.map +1 -1
- package/dist/types/model/image.d.ts.map +1 -1
- package/dist/types/model/linkToMedia.d.cts.map +1 -1
- package/dist/types/model/linkToMedia.d.ts.map +1 -1
- package/dist/types/model/range.d.cts +1 -3
- package/dist/types/model/range.d.cts.map +1 -1
- package/dist/types/model/range.d.ts +1 -3
- package/dist/types/model/range.d.ts.map +1 -1
- package/dist/types/model/separator.d.cts +1 -3
- package/dist/types/model/separator.d.cts.map +1 -1
- package/dist/types/model/separator.d.ts +1 -3
- package/dist/types/model/separator.d.ts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.ts.map +1 -1
- package/dist/types/model/slice.cjs.map +1 -1
- package/dist/types/model/slice.d.cts +1 -3
- package/dist/types/model/slice.d.cts.map +1 -1
- package/dist/types/model/slice.d.ts +1 -3
- package/dist/types/model/slice.d.ts.map +1 -1
- package/dist/types/model/slice.js.map +1 -1
- package/dist/types/model/sliceZone.cjs.map +1 -1
- package/dist/types/model/sliceZone.d.cts.map +1 -1
- package/dist/types/model/sliceZone.d.ts.map +1 -1
- package/dist/types/model/sliceZone.js.map +1 -1
- package/dist/types/model/types.cjs +1 -3
- package/dist/types/model/types.cjs.map +1 -1
- package/dist/types/model/types.d.cts +9 -31
- package/dist/types/model/types.d.cts.map +1 -1
- package/dist/types/model/types.d.ts +9 -31
- package/dist/types/model/types.d.ts.map +1 -1
- package/dist/types/model/types.js +1 -3
- package/dist/types/model/types.js.map +1 -1
- package/dist/types/value/color.d.cts +0 -1
- package/dist/types/value/color.d.cts.map +1 -1
- package/dist/types/value/color.d.ts +0 -1
- package/dist/types/value/color.d.ts.map +1 -1
- package/dist/types/value/contentRelationship.d.cts +3 -5
- package/dist/types/value/contentRelationship.d.cts.map +1 -1
- package/dist/types/value/contentRelationship.d.ts +3 -5
- package/dist/types/value/contentRelationship.d.ts.map +1 -1
- package/dist/types/value/date.d.cts +0 -1
- package/dist/types/value/date.d.cts.map +1 -1
- package/dist/types/value/date.d.ts +0 -1
- package/dist/types/value/date.d.ts.map +1 -1
- package/dist/types/value/document.d.cts +23 -50
- package/dist/types/value/document.d.cts.map +1 -1
- package/dist/types/value/document.d.ts +23 -50
- package/dist/types/value/document.d.ts.map +1 -1
- package/dist/types/value/embed.cjs +1 -1
- package/dist/types/value/embed.cjs.map +1 -1
- package/dist/types/value/embed.d.cts +28 -95
- package/dist/types/value/embed.d.cts.map +1 -1
- package/dist/types/value/embed.d.ts +28 -95
- package/dist/types/value/embed.d.ts.map +1 -1
- package/dist/types/value/embed.js +1 -1
- package/dist/types/value/embed.js.map +1 -1
- package/dist/types/value/geoPoint.d.cts +0 -1
- package/dist/types/value/geoPoint.d.cts.map +1 -1
- package/dist/types/value/geoPoint.d.ts +0 -1
- package/dist/types/value/geoPoint.d.ts.map +1 -1
- package/dist/types/value/group.d.cts.map +1 -1
- package/dist/types/value/group.d.ts.map +1 -1
- package/dist/types/value/image.d.cts +5 -8
- package/dist/types/value/image.d.cts.map +1 -1
- package/dist/types/value/image.d.ts +5 -8
- package/dist/types/value/image.d.ts.map +1 -1
- package/dist/types/value/integration.d.cts +0 -1
- package/dist/types/value/integration.d.cts.map +1 -1
- package/dist/types/value/integration.d.ts +0 -1
- package/dist/types/value/integration.d.ts.map +1 -1
- package/dist/types/value/keyText.d.cts +0 -1
- package/dist/types/value/keyText.d.cts.map +1 -1
- package/dist/types/value/keyText.d.ts +0 -1
- package/dist/types/value/keyText.d.ts.map +1 -1
- package/dist/types/value/link.cjs +1 -3
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.cts +8 -12
- package/dist/types/value/link.d.cts.map +1 -1
- package/dist/types/value/link.d.ts +8 -12
- package/dist/types/value/link.d.ts.map +1 -1
- package/dist/types/value/link.js +1 -3
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/linkToMedia.d.cts.map +1 -1
- package/dist/types/value/linkToMedia.d.ts.map +1 -1
- package/dist/types/value/number.d.cts +0 -1
- package/dist/types/value/number.d.cts.map +1 -1
- package/dist/types/value/number.d.ts +0 -1
- package/dist/types/value/number.d.ts.map +1 -1
- package/dist/types/value/richText.cjs.map +1 -1
- package/dist/types/value/richText.d.cts +26 -77
- package/dist/types/value/richText.d.cts.map +1 -1
- package/dist/types/value/richText.d.ts +26 -77
- package/dist/types/value/richText.d.ts.map +1 -1
- package/dist/types/value/richText.js.map +1 -1
- package/dist/types/value/select.d.cts +0 -1
- package/dist/types/value/select.d.cts.map +1 -1
- package/dist/types/value/select.d.ts +0 -1
- package/dist/types/value/select.d.ts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.cts +1 -3
- package/dist/types/value/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.ts +1 -3
- package/dist/types/value/sharedSliceVariation.d.ts.map +1 -1
- package/dist/types/value/slice.d.cts.map +1 -1
- package/dist/types/value/slice.d.ts.map +1 -1
- package/dist/types/value/sliceZone.d.cts +3 -4
- package/dist/types/value/sliceZone.d.cts.map +1 -1
- package/dist/types/value/sliceZone.d.ts +3 -4
- package/dist/types/value/sliceZone.d.ts.map +1 -1
- package/dist/types/value/table.d.cts +14 -63
- package/dist/types/value/table.d.cts.map +1 -1
- package/dist/types/value/table.d.ts +14 -63
- package/dist/types/value/table.d.ts.map +1 -1
- package/dist/types/value/timestamp.d.cts.map +1 -1
- package/dist/types/value/timestamp.d.ts.map +1 -1
- package/dist/types/value/title.d.cts +1 -1
- package/dist/types/value/title.d.cts.map +1 -1
- package/dist/types/value/title.d.ts +1 -1
- package/dist/types/value/title.d.ts.map +1 -1
- package/dist/types/value/types.d.cts +11 -24
- package/dist/types/value/types.d.cts.map +1 -1
- package/dist/types/value/types.d.ts +11 -24
- package/dist/types/value/types.d.ts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.cts +1 -3
- package/dist/types/webhook/apiUpdate.d.cts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.ts +1 -3
- package/dist/types/webhook/apiUpdate.d.ts.map +1 -1
- package/package.json +32 -34
- package/src/Client.ts +236 -399
- package/src/Migration.ts +80 -139
- package/src/WriteClient.ts +113 -174
- package/src/buildQueryURL.ts +68 -100
- package/src/cookie.ts +1 -4
- package/src/createClient.ts +12 -20
- package/src/createMigration.ts +8 -16
- package/src/createWriteClient.ts +11 -19
- package/src/errors.ts +5 -15
- package/src/filter.ts +79 -122
- package/src/getGraphQLEndpoint.ts +0 -3
- package/src/getRepositoryEndpoint.ts +4 -9
- package/src/getRepositoryName.ts +2 -5
- package/src/getToolbarSrc.ts +17 -20
- package/src/helpers/asDate.ts +13 -18
- package/src/helpers/asHTML.ts +55 -102
- package/src/helpers/asImagePixelDensitySrcSet.ts +29 -49
- package/src/helpers/asImageSrc.ts +8 -16
- package/src/helpers/asImageWidthSrcSet.ts +33 -52
- package/src/helpers/asLink.ts +26 -54
- package/src/helpers/asLinkAttrs.ts +14 -29
- package/src/helpers/asText.ts +15 -31
- package/src/helpers/documentToLinkField.ts +4 -15
- package/src/helpers/isFilled.ts +14 -51
- package/src/helpers/mapSliceZone.ts +42 -84
- package/src/index.ts +20 -68
- package/src/isRepositoryEndpoint.ts +3 -4
- package/src/isRepositoryName.ts +1 -2
- package/src/lib/devMsg.ts +6 -8
- package/src/lib/getOptionalLinkProperties.ts +5 -6
- package/src/lib/getPreviewCookie.ts +1 -3
- package/src/lib/isInternalURL.ts +0 -1
- package/src/lib/isMigrationValue.ts +9 -22
- package/src/lib/isValue.ts +9 -38
- package/src/lib/pLimit.ts +9 -16
- package/src/lib/request.ts +15 -40
- package/src/lib/resolveMigrationDocumentData.ts +8 -27
- package/src/lib/serializerHelpers.ts +9 -29
- package/src/lib/throttledWarn.ts +4 -8
- package/src/lib/validateAssetMetadata.ts +17 -43
- package/src/richtext/asText.ts +2 -8
- package/src/richtext/asTree.ts +8 -26
- package/src/richtext/composeSerializers.ts +5 -11
- package/src/richtext/serialize.ts +4 -12
- package/src/richtext/types.ts +13 -57
- package/src/richtext/wrapMapSerializer.ts +4 -8
- package/src/types/api/asset/asset.ts +26 -77
- package/src/types/api/asset/tag.ts +6 -18
- package/src/types/api/integration.ts +4 -10
- package/src/types/api/migration/document.ts +11 -27
- package/src/types/api/migration/release.ts +12 -0
- package/src/types/api/query.ts +10 -27
- package/src/types/api/ref.ts +6 -16
- package/src/types/api/release.ts +1 -2
- package/src/types/api/repository.ts +18 -45
- package/src/types/api/tags.ts +2 -3
- package/src/types/migration/Asset.ts +26 -82
- package/src/types/migration/ContentRelationship.ts +5 -12
- package/src/types/migration/Document.ts +26 -52
- package/src/types/migration/Link.ts +7 -9
- package/src/types/model/contentRelationship.ts +7 -20
- package/src/types/model/customType.ts +7 -21
- package/src/types/model/image.ts +4 -5
- package/src/types/model/linkToMedia.ts +1 -2
- package/src/types/model/range.ts +1 -3
- package/src/types/model/separator.ts +1 -3
- package/src/types/model/sharedSliceVariation.ts +4 -4
- package/src/types/model/slice.ts +7 -12
- package/src/types/model/sliceZone.ts +4 -11
- package/src/types/model/types.ts +10 -31
- package/src/types/value/color.ts +3 -3
- package/src/types/value/contentRelationship.ts +8 -13
- package/src/types/value/date.ts +1 -3
- package/src/types/value/document.ts +24 -52
- package/src/types/value/embed.ts +33 -80
- package/src/types/value/geoPoint.ts +6 -8
- package/src/types/value/group.ts +1 -4
- package/src/types/value/image.ts +10 -14
- package/src/types/value/integration.ts +0 -1
- package/src/types/value/keyText.ts +3 -3
- package/src/types/value/link.ts +14 -22
- package/src/types/value/linkToMedia.ts +2 -5
- package/src/types/value/number.ts +3 -3
- package/src/types/value/richText.ts +30 -82
- package/src/types/value/select.ts +0 -1
- package/src/types/value/sharedSliceVariation.ts +3 -11
- package/src/types/value/slice.ts +2 -8
- package/src/types/value/sliceZone.ts +4 -6
- package/src/types/value/table.ts +25 -64
- package/src/types/value/timestamp.ts +3 -2
- package/src/types/value/title.ts +16 -18
- package/src/types/value/types.ts +8 -21
- package/src/types/webhook/apiUpdate.ts +1 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CustomTypeModelColorField } from "./types/model/color.js";
|
|
3
|
-
import { CustomTypeModelLinkField, CustomTypeModelLinkSelectType } from "./types/model/link.js";
|
|
4
|
-
import { CustomTypeModelContentRelationshipField, CustomTypeModelFetchContentRelationshipLevel1, CustomTypeModelFetchCustomTypeLevel1, CustomTypeModelFetchCustomTypeLevel2, CustomTypeModelFetchGroupLevel1, CustomTypeModelFetchGroupLevel2 } from "./types/model/contentRelationship.js";
|
|
5
|
-
import { CustomTypeModelDateField } from "./types/model/date.js";
|
|
6
|
-
import { CustomTypeModelEmbedField } from "./types/model/embed.js";
|
|
7
|
-
import { CustomTypeModelGeoPointField } from "./types/model/geoPoint.js";
|
|
8
|
-
import { CustomTypeModelGroupField, CustomTypeModelNestedGroupField } from "./types/model/group.js";
|
|
9
|
-
import { CustomTypeModelImageConstraint, CustomTypeModelImageField, CustomTypeModelImageThumbnail } from "./types/model/image.js";
|
|
10
|
-
import { CustomTypeModelKeyTextField } from "./types/model/keyText.js";
|
|
11
|
-
import { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia.js";
|
|
12
|
-
import { CustomTypeModelNumberField } from "./types/model/number.js";
|
|
13
|
-
import { CustomTypeModelRangeField } from "./types/model/range.js";
|
|
14
|
-
import { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField } from "./types/model/richText.js";
|
|
15
|
-
import { CustomTypeModelSelectField } from "./types/model/select.js";
|
|
16
|
-
import { CustomTypeModelSeparatorField } from "./types/model/separator.js";
|
|
17
|
-
import { CustomTypeModelLegacySlice, CustomTypeModelSlice, CustomTypeModelSliceDisplay } from "./types/model/slice.js";
|
|
18
|
-
import { CustomTypeModelSharedSlice, CustomTypeModelSliceLabel, CustomTypeModelSliceType, CustomTypeModelSliceZoneField } from "./types/model/sliceZone.js";
|
|
19
|
-
import { CustomTypeModelTableField } from "./types/model/table.js";
|
|
20
|
-
import { CustomTypeModelTimestampField } from "./types/model/timestamp.js";
|
|
21
|
-
import { CustomTypeModelTitleField } from "./types/model/title.js";
|
|
22
|
-
import { CustomTypeModelUIDField } from "./types/model/uid.js";
|
|
23
|
-
import { CustomTypeModelField, CustomTypeModelFieldForGroup, CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType } from "./types/model/types.js";
|
|
24
|
-
import { CustomTypeModelIntegrationField } from "./types/model/integration.js";
|
|
1
|
+
import { filter } from "./filter.js";
|
|
25
2
|
import { BooleanField } from "./types/value/boolean.js";
|
|
26
3
|
import { ColorField } from "./types/value/color.js";
|
|
27
4
|
import { GroupField, NestedGroupField } from "./types/value/group.js";
|
|
@@ -31,36 +8,60 @@ import { Slice } from "./types/value/slice.js";
|
|
|
31
8
|
import { SliceZone } from "./types/value/sliceZone.js";
|
|
32
9
|
import { ContentRelationshipField, FilledContentRelationshipField } from "./types/value/contentRelationship.js";
|
|
33
10
|
import { DateField } from "./types/value/date.js";
|
|
34
|
-
import { AnyOEmbed, EmbedField, LinkOEmbed, OEmbedExtra, OEmbedType, PhotoOEmbed, RichOEmbed, VideoOEmbed } from "./types/value/embed.js";
|
|
35
11
|
import { GeoPointField } from "./types/value/geoPoint.js";
|
|
36
12
|
import { EmptyImageFieldImage, FilledImageFieldImage, ImageField, ImageFieldImage } from "./types/value/image.js";
|
|
13
|
+
import { IntegrationField, IntegrationFieldData } from "./types/value/integration.js";
|
|
37
14
|
import { KeyTextField } from "./types/value/keyText.js";
|
|
38
15
|
import { FilledLinkToMediaField, LinkToMediaField } from "./types/value/linkToMedia.js";
|
|
39
16
|
import { EmptyLinkField, FilledLinkToWebField, LinkField, LinkType } from "./types/value/link.js";
|
|
40
17
|
import { NumberField } from "./types/value/number.js";
|
|
41
|
-
import { RTAnyNode, RTBlockNode, RTEmNode, RTEmbedNode, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTImageNode, RTInlineNode, RTLabelNode, RTLinkNode, RTListItemNode, RTListNode, RTNode, RTOListItemNode, RTOListNode, RTParagraphNode, RTPreformattedNode, RTSpanNode, RTSpanNodeBase, RTStrongNode, RTTextNode, RTTextNodeBase, RichTextField, RichTextNodeType, RichTextNodeTypes } from "./types/value/richText.js";
|
|
42
18
|
import { SelectField } from "./types/value/select.js";
|
|
43
19
|
import { TableField, TableFieldBody, TableFieldBodyRow, TableFieldDataCell, TableFieldHead, TableFieldHeadRow, TableFieldHeaderCell } from "./types/value/table.js";
|
|
44
20
|
import { TimestampField } from "./types/value/timestamp.js";
|
|
45
21
|
import { TitleField } from "./types/value/title.js";
|
|
46
22
|
import { AnyRegularField, AnySlicePrimaryField, FieldState, Repeatable } from "./types/value/types.js";
|
|
47
|
-
import {
|
|
23
|
+
import { AnyOEmbed, EmbedField, LinkOEmbed, OEmbedExtra, OEmbedType, PhotoOEmbed, RichOEmbed, VideoOEmbed } from "./types/value/embed.js";
|
|
24
|
+
import { RTAnyNode, RTBlockNode, RTEmNode, RTEmbedNode, RTHeading1Node, RTHeading2Node, RTHeading3Node, RTHeading4Node, RTHeading5Node, RTHeading6Node, RTImageNode, RTInlineNode, RTLabelNode, RTLinkNode, RTListItemNode, RTListNode, RTNode, RTOListItemNode, RTOListNode, RTParagraphNode, RTPreformattedNode, RTSpanNode, RTSpanNodeBase, RTStrongNode, RTTextNode, RTTextNodeBase, RichTextField, RichTextNodeType, RichTextNodeTypes } from "./types/value/richText.js";
|
|
48
25
|
import { AlternateLanguage, PrismicDocument, PrismicDocumentHeader, PrismicDocumentWithUID, PrismicDocumentWithoutUID } from "./types/value/document.js";
|
|
49
26
|
import { LinkResolverFunction, asLink } from "./helpers/asLink.js";
|
|
50
27
|
import { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer, HTMLRichTextSerializer, asHTML } from "./helpers/asHTML.js";
|
|
51
28
|
import { SliceMapper, mapSliceZone } from "./helpers/mapSliceZone.js";
|
|
52
|
-
import {
|
|
29
|
+
import { CustomTypeModelBooleanField } from "./types/model/boolean.js";
|
|
30
|
+
import { CustomTypeModelColorField } from "./types/model/color.js";
|
|
31
|
+
import { CustomTypeModelLinkField, CustomTypeModelLinkSelectType } from "./types/model/link.js";
|
|
32
|
+
import { CustomTypeModelContentRelationshipField, CustomTypeModelFetchContentRelationshipLevel1, CustomTypeModelFetchCustomTypeLevel1, CustomTypeModelFetchCustomTypeLevel2, CustomTypeModelFetchGroupLevel1, CustomTypeModelFetchGroupLevel2 } from "./types/model/contentRelationship.js";
|
|
33
|
+
import { CustomTypeModelDateField } from "./types/model/date.js";
|
|
34
|
+
import { CustomTypeModelEmbedField } from "./types/model/embed.js";
|
|
35
|
+
import { CustomTypeModelGeoPointField } from "./types/model/geoPoint.js";
|
|
36
|
+
import { CustomTypeModelGroupField, CustomTypeModelNestedGroupField } from "./types/model/group.js";
|
|
37
|
+
import { CustomTypeModelImageConstraint, CustomTypeModelImageField, CustomTypeModelImageThumbnail } from "./types/model/image.js";
|
|
38
|
+
import { CustomTypeModelKeyTextField } from "./types/model/keyText.js";
|
|
39
|
+
import { CustomTypeModelLinkToMediaField } from "./types/model/linkToMedia.js";
|
|
40
|
+
import { CustomTypeModelNumberField } from "./types/model/number.js";
|
|
41
|
+
import { CustomTypeModelRangeField } from "./types/model/range.js";
|
|
42
|
+
import { CustomTypeModelRichTextField, CustomTypeModelRichTextMultiField, CustomTypeModelRichTextSingleField } from "./types/model/richText.js";
|
|
43
|
+
import { CustomTypeModelSelectField } from "./types/model/select.js";
|
|
44
|
+
import { CustomTypeModelSeparatorField } from "./types/model/separator.js";
|
|
45
|
+
import { CustomTypeModelLegacySlice, CustomTypeModelSlice, CustomTypeModelSliceDisplay } from "./types/model/slice.js";
|
|
46
|
+
import { CustomTypeModelSharedSlice, CustomTypeModelSliceLabel, CustomTypeModelSliceType, CustomTypeModelSliceZoneField } from "./types/model/sliceZone.js";
|
|
47
|
+
import { CustomTypeModelTableField } from "./types/model/table.js";
|
|
48
|
+
import { CustomTypeModelTimestampField } from "./types/model/timestamp.js";
|
|
49
|
+
import { CustomTypeModelTitleField } from "./types/model/title.js";
|
|
50
|
+
import { CustomTypeModelUIDField } from "./types/model/uid.js";
|
|
51
|
+
import { CustomTypeModelField, CustomTypeModelFieldForGroup, CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType } from "./types/model/types.js";
|
|
52
|
+
import { CustomTypeModelIntegrationField } from "./types/model/integration.js";
|
|
53
|
+
import { BuildQueryURLArgs, Ordering, QueryParams, Route, buildQueryURL } from "./buildQueryURL.js";
|
|
53
54
|
import { AbortSignalLike, FetchLike, RequestInitLike, ResponseLike } from "./lib/request.js";
|
|
54
55
|
import { Query } from "./types/api/query.js";
|
|
55
56
|
import { Ref } from "./types/api/ref.js";
|
|
56
57
|
import { Form, FormField, Language, Repository } from "./types/api/repository.js";
|
|
57
|
-
import { BuildQueryURLArgs, Ordering, QueryParams, Route, buildQueryURL } from "./buildQueryURL.js";
|
|
58
58
|
import { Client, ClientConfig, HttpRequestLike } from "./Client.js";
|
|
59
59
|
import { CreateClient, createClient } from "./createClient.js";
|
|
60
60
|
import { MigrationContentRelationship } from "./types/migration/ContentRelationship.js";
|
|
61
61
|
import { ExistingPrismicDocument, InjectMigrationSpecificTypes, PendingPrismicDocument, PrismicMigrationDocument } from "./types/migration/Document.js";
|
|
62
62
|
import { MigrationImage, MigrationLinkToMedia, MigrationRTImageNode, PrismicMigrationAsset } from "./types/migration/Asset.js";
|
|
63
63
|
import { Migration } from "./Migration.js";
|
|
64
|
+
import { PublishMigrationReleaseResult } from "./types/api/migration/release.js";
|
|
64
65
|
import { MigrateReporterEvents, WriteClient, WriteClientConfig } from "./WriteClient.js";
|
|
65
66
|
import { CreateWriteClient, createWriteClient } from "./createWriteClient.js";
|
|
66
67
|
import { CreateMigration, createMigration } from "./createMigration.js";
|
|
@@ -91,9 +92,7 @@ import { WebhookBodyTestTrigger } from "./types/webhook/testTrigger.js";
|
|
|
91
92
|
import { WebhookBody, WebhookType } from "./types/webhook/types.js";
|
|
92
93
|
|
|
93
94
|
//#region src/index.d.ts
|
|
94
|
-
/**
|
|
95
|
-
* @deprecated Renamed to `filter`
|
|
96
|
-
*/
|
|
95
|
+
/** @deprecated Renamed to `filter` */
|
|
97
96
|
declare const predicate: {
|
|
98
97
|
at: (path: string, value: string | number | boolean | Date | string[]) => string;
|
|
99
98
|
not: (path: string, value: string | number | boolean | Date | string[]) => string;
|
|
@@ -124,21 +123,13 @@ declare const predicate: {
|
|
|
124
123
|
dateHourAfter: (path: string, hour: number) => string;
|
|
125
124
|
dateHourBefore: (path: string, hour: number) => string;
|
|
126
125
|
};
|
|
127
|
-
/**
|
|
128
|
-
* @deprecated Renamed to `mapSliceZone`
|
|
129
|
-
*/
|
|
126
|
+
/** @deprecated Renamed to `mapSliceZone` */
|
|
130
127
|
declare const unstable_mapSliceZone: typeof mapSliceZone;
|
|
131
|
-
/**
|
|
132
|
-
* @deprecated Renamed to `HTMLRichTextMapSerializer`
|
|
133
|
-
*/
|
|
128
|
+
/** @deprecated Renamed to `HTMLRichTextMapSerializer` */
|
|
134
129
|
type HTMLMapSerializer = HTMLRichTextMapSerializer;
|
|
135
|
-
/**
|
|
136
|
-
* @deprecated Renamed to `HTMLRichTextFunctionSerializer`
|
|
137
|
-
*/
|
|
130
|
+
/** @deprecated Renamed to `HTMLRichTextFunctionSerializer` */
|
|
138
131
|
type HTMLFunctionSerializer = HTMLRichTextFunctionSerializer;
|
|
139
|
-
/**
|
|
140
|
-
* @deprecated Use {@link RichTextNodeType} instead.
|
|
141
|
-
*/
|
|
132
|
+
/** @deprecated Use {@link RichTextNodeType} instead. */
|
|
142
133
|
declare const Element: {
|
|
143
134
|
readonly heading1: "heading1";
|
|
144
135
|
readonly heading2: "heading2";
|
|
@@ -160,14 +151,10 @@ declare const Element: {
|
|
|
160
151
|
readonly label: "label";
|
|
161
152
|
readonly span: "span";
|
|
162
153
|
};
|
|
163
|
-
/**
|
|
164
|
-
* @deprecated Renamed to `IntegrationField`
|
|
165
|
-
*/
|
|
154
|
+
/** @deprecated Renamed to `IntegrationField` */
|
|
166
155
|
type IntegrationFields = IntegrationField;
|
|
167
|
-
/**
|
|
168
|
-
* @deprecated Renamed to `CustomTypeModelIntegrationField`.
|
|
169
|
-
*/
|
|
156
|
+
/** @deprecated Renamed to `CustomTypeModelIntegrationField`. */
|
|
170
157
|
type CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField;
|
|
171
158
|
//#endregion
|
|
172
|
-
export { type AbortSignalLike, type AlternateLanguage, type AnyOEmbed, type AnyRegularField, type AnySlicePrimaryField, type AsLinkAttrsConfig, type BooleanField, type BuildQueryURLArgs, Client, type ClientConfig, type ColorField, type ContentRelationshipField, type CreateClient, type CreateMigration, type CreateWriteClient, type CustomTypeModel, type CustomTypeModelBooleanField, type CustomTypeModelColorField, type CustomTypeModelContentRelationshipField, type CustomTypeModelDateField, type CustomTypeModelDefinition, type CustomTypeModelEmbedField, type CustomTypeModelFetchContentRelationshipLevel1, type CustomTypeModelFetchCustomTypeLevel1, type CustomTypeModelFetchCustomTypeLevel2, type CustomTypeModelFetchGroupLevel1, type CustomTypeModelFetchGroupLevel2, type CustomTypeModelField, type CustomTypeModelFieldForGroup, type CustomTypeModelFieldForNestedGroup, type CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType, type CustomTypeModelGeoPointField, type CustomTypeModelGroupField, type CustomTypeModelImageConstraint, type CustomTypeModelImageField, type CustomTypeModelImageThumbnail, CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField, type CustomTypeModelKeyTextField, type CustomTypeModelLegacySlice, type CustomTypeModelLinkField, CustomTypeModelLinkSelectType, type CustomTypeModelLinkToMediaField, type CustomTypeModelNestedGroupField, type CustomTypeModelNumberField, type CustomTypeModelRangeField, type CustomTypeModelRichTextField, type CustomTypeModelRichTextMultiField, type CustomTypeModelRichTextSingleField, type CustomTypeModelSelectField, type CustomTypeModelSeparatorField, type CustomTypeModelSharedSlice, type CustomTypeModelSlice, CustomTypeModelSliceDisplay, type CustomTypeModelSliceLabel, CustomTypeModelSliceType, type CustomTypeModelSliceZoneField, type CustomTypeModelTab, type CustomTypeModelTableField, type CustomTypeModelTimestampField, type CustomTypeModelTitleField, type CustomTypeModelUIDField, type DateField, Element, type EmbedField, type EmptyImageFieldImage, type EmptyLinkField, type ExistingPrismicDocument, type FetchLike, type FieldState, type FilledContentRelationshipField, type FilledImageFieldImage, type FilledLinkToMediaField, type FilledLinkToWebField, ForbiddenError, type Form, type FormField, type GeoPointField, type GroupField, type HTMLFunctionSerializer, type HTMLMapSerializer, type HTMLRichTextFunctionSerializer, type HTMLRichTextMapSerializer, type HTMLRichTextSerializer, type HttpRequestLike, type ImageField, type ImageFieldImage, type InjectMigrationSpecificTypes, type IntegrationAPIItem, type IntegrationAPIResults, type IntegrationField, type IntegrationFieldData, type IntegrationFields, InvalidDataError, type KeyTextField, type Language, type LinkField, type LinkOEmbed, type LinkResolverFunction, type LinkToMediaField, LinkType, type MigrateReporterEvents, Migration, type MigrationContentRelationship, type MigrationImage, type MigrationLinkToMedia, type MigrationRTImageNode, type NestedGroupField, NotFoundError, type NumberField, type OEmbedExtra, OEmbedType, type Ordering, ParsingError, type PendingPrismicDocument, type PhotoOEmbed, PreviewTokenExpiredError, type PrismicDocument, type PrismicDocumentHeader, type PrismicDocumentWithUID, type PrismicDocumentWithoutUID, PrismicError, PrismicMigrationAsset, PrismicMigrationDocument, type Query, type QueryParams, type RTAnyNode, type RTBlockNode, type RTEmNode, type RTEmbedNode, type RTHeading1Node, type RTHeading2Node, type RTHeading3Node, type RTHeading4Node, type RTHeading5Node, type RTHeading6Node, type RTImageNode, type RTInlineNode, type RTLabelNode, type RTLinkNode, type RTListItemNode, type RTListNode, type RTNode, type RTOListItemNode, type RTOListNode, type RTParagraphNode, type RTPreformattedNode, type RTSpanNode, type RTSpanNodeBase, type RTStrongNode, type RTTextNode, type RTTextNodeBase, type Ref, RefExpiredError, RefNotFoundError, type Release, type Repeatable, type Repository, RepositoryNotFoundError, type RequestInitLike, type ResponseLike, type RichOEmbed, type RichTextField, RichTextNodeType, type RichTextNodeTypes, type Route, type SelectField, type SharedSlice, type SharedSliceModel, type SharedSliceModelVariation, type SharedSliceVariation, type Slice, type SliceMapper, type SliceZone, type TableField, type TableFieldBody, type TableFieldBodyRow, type TableFieldDataCell, type TableFieldHead, type TableFieldHeadRow, type TableFieldHeaderCell, type Tags, type TimestampField, type TitleField, type VideoOEmbed, type WebhookBody, type WebhookBodyAPIUpdate, type WebhookBodyTestTrigger, WebhookType, WriteClient, type WriteClientConfig, asDate, asHTML, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet, asLink, asLinkAttrs, asText, buildQueryURL, cookie_d_exports as cookie, createClient, createMigration, createWriteClient, documentToLinkField, filter, getGraphQLEndpoint, getRepositoryEndpoint, getRepositoryName, getToolbarSrc, isFilled_d_exports as isFilled, isRepositoryEndpoint, isRepositoryName, mapSliceZone, predicate, unstable_mapSliceZone };
|
|
159
|
+
export { type AbortSignalLike, type AlternateLanguage, type AnyOEmbed, type AnyRegularField, type AnySlicePrimaryField, type AsLinkAttrsConfig, type BooleanField, type BuildQueryURLArgs, Client, type ClientConfig, type ColorField, type ContentRelationshipField, type CreateClient, type CreateMigration, type CreateWriteClient, type CustomTypeModel, type CustomTypeModelBooleanField, type CustomTypeModelColorField, type CustomTypeModelContentRelationshipField, type CustomTypeModelDateField, type CustomTypeModelDefinition, type CustomTypeModelEmbedField, type CustomTypeModelFetchContentRelationshipLevel1, type CustomTypeModelFetchCustomTypeLevel1, type CustomTypeModelFetchCustomTypeLevel2, type CustomTypeModelFetchGroupLevel1, type CustomTypeModelFetchGroupLevel2, type CustomTypeModelField, type CustomTypeModelFieldForGroup, type CustomTypeModelFieldForNestedGroup, type CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType, type CustomTypeModelGeoPointField, type CustomTypeModelGroupField, type CustomTypeModelImageConstraint, type CustomTypeModelImageField, type CustomTypeModelImageThumbnail, CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField, type CustomTypeModelKeyTextField, type CustomTypeModelLegacySlice, type CustomTypeModelLinkField, CustomTypeModelLinkSelectType, type CustomTypeModelLinkToMediaField, type CustomTypeModelNestedGroupField, type CustomTypeModelNumberField, type CustomTypeModelRangeField, type CustomTypeModelRichTextField, type CustomTypeModelRichTextMultiField, type CustomTypeModelRichTextSingleField, type CustomTypeModelSelectField, type CustomTypeModelSeparatorField, type CustomTypeModelSharedSlice, type CustomTypeModelSlice, CustomTypeModelSliceDisplay, type CustomTypeModelSliceLabel, CustomTypeModelSliceType, type CustomTypeModelSliceZoneField, type CustomTypeModelTab, type CustomTypeModelTableField, type CustomTypeModelTimestampField, type CustomTypeModelTitleField, type CustomTypeModelUIDField, type DateField, Element, type EmbedField, type EmptyImageFieldImage, type EmptyLinkField, type ExistingPrismicDocument, type FetchLike, type FieldState, type FilledContentRelationshipField, type FilledImageFieldImage, type FilledLinkToMediaField, type FilledLinkToWebField, ForbiddenError, type Form, type FormField, type GeoPointField, type GroupField, type HTMLFunctionSerializer, type HTMLMapSerializer, type HTMLRichTextFunctionSerializer, type HTMLRichTextMapSerializer, type HTMLRichTextSerializer, type HttpRequestLike, type ImageField, type ImageFieldImage, type InjectMigrationSpecificTypes, type IntegrationAPIItem, type IntegrationAPIResults, type IntegrationField, type IntegrationFieldData, type IntegrationFields, InvalidDataError, type KeyTextField, type Language, type LinkField, type LinkOEmbed, type LinkResolverFunction, type LinkToMediaField, LinkType, type MigrateReporterEvents, Migration, type MigrationContentRelationship, type MigrationImage, type MigrationLinkToMedia, type MigrationRTImageNode, type NestedGroupField, NotFoundError, type NumberField, type OEmbedExtra, OEmbedType, type Ordering, ParsingError, type PendingPrismicDocument, type PhotoOEmbed, PreviewTokenExpiredError, type PrismicDocument, type PrismicDocumentHeader, type PrismicDocumentWithUID, type PrismicDocumentWithoutUID, PrismicError, PrismicMigrationAsset, PrismicMigrationDocument, type PublishMigrationReleaseResult, type Query, type QueryParams, type RTAnyNode, type RTBlockNode, type RTEmNode, type RTEmbedNode, type RTHeading1Node, type RTHeading2Node, type RTHeading3Node, type RTHeading4Node, type RTHeading5Node, type RTHeading6Node, type RTImageNode, type RTInlineNode, type RTLabelNode, type RTLinkNode, type RTListItemNode, type RTListNode, type RTNode, type RTOListItemNode, type RTOListNode, type RTParagraphNode, type RTPreformattedNode, type RTSpanNode, type RTSpanNodeBase, type RTStrongNode, type RTTextNode, type RTTextNodeBase, type Ref, RefExpiredError, RefNotFoundError, type Release, type Repeatable, type Repository, RepositoryNotFoundError, type RequestInitLike, type ResponseLike, type RichOEmbed, type RichTextField, RichTextNodeType, type RichTextNodeTypes, type Route, type SelectField, type SharedSlice, type SharedSliceModel, type SharedSliceModelVariation, type SharedSliceVariation, type Slice, type SliceMapper, type SliceZone, type TableField, type TableFieldBody, type TableFieldBodyRow, type TableFieldDataCell, type TableFieldHead, type TableFieldHeadRow, type TableFieldHeaderCell, type Tags, type TimestampField, type TitleField, type VideoOEmbed, type WebhookBody, type WebhookBodyAPIUpdate, type WebhookBodyTestTrigger, WebhookType, WriteClient, type WriteClientConfig, asDate, asHTML, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet, asLink, asLinkAttrs, asText, buildQueryURL, cookie_d_exports as cookie, createClient, createMigration, createWriteClient, documentToLinkField, filter, getGraphQLEndpoint, getRepositoryEndpoint, getRepositoryName, getToolbarSrc, isFilled_d_exports as isFilled, isRepositoryEndpoint, isRepositoryName, mapSliceZone, predicate, unstable_mapSliceZone };
|
|
173
160
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsCM,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BA,qBAAA,SAAqB,YAAA;;KAWtB,iBAAA,GAAoB,yBAAA;;KAEpB,sBAAA,GAAyB,8BAAA;;cAiCxB,OAAA;EAAA;;;;;;;;;;;;;;;;;;;;;KAiGD,iBAAA,GAAoB,gBAAA;;KAoEpB,qCAAA,GAAwC,+BAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { RichTextNodeType } from "./types/value/richText.js";
|
|
2
|
-
import { mapSliceZone } from "./helpers/mapSliceZone.js";
|
|
3
1
|
import { filter } from "./filter.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { LinkType } from "./types/value/link.js";
|
|
7
|
-
import { documentToLinkField } from "./helpers/documentToLinkField.js";
|
|
8
|
-
import { asLink } from "./helpers/asLink.js";
|
|
2
|
+
import { mapSliceZone } from "./helpers/mapSliceZone.js";
|
|
3
|
+
import { RichTextNodeType } from "./types/value/richText.js";
|
|
9
4
|
import { buildQueryURL } from "./buildQueryURL.js";
|
|
5
|
+
import { ForbiddenError, InvalidDataError, NotFoundError, ParsingError, PreviewTokenExpiredError, PrismicError, RefExpiredError, RefNotFoundError, RepositoryNotFoundError } from "./errors.js";
|
|
10
6
|
import { isRepositoryName } from "./isRepositoryName.js";
|
|
11
7
|
import { getRepositoryEndpoint } from "./getRepositoryEndpoint.js";
|
|
12
8
|
import { getRepositoryName } from "./getRepositoryName.js";
|
|
9
|
+
import { LinkType } from "./types/value/link.js";
|
|
10
|
+
import { documentToLinkField } from "./helpers/documentToLinkField.js";
|
|
11
|
+
import { asLink } from "./helpers/asLink.js";
|
|
13
12
|
import { isRepositoryEndpoint } from "./isRepositoryEndpoint.js";
|
|
13
|
+
import { cookie_exports } from "./cookie.js";
|
|
14
14
|
import { Client } from "./Client.js";
|
|
15
15
|
import { createClient } from "./createClient.js";
|
|
16
|
+
import { isFilled_exports } from "./helpers/isFilled.js";
|
|
16
17
|
import { PrismicMigrationAsset } from "./types/migration/Asset.js";
|
|
17
18
|
import { PrismicMigrationDocument } from "./types/migration/Document.js";
|
|
18
|
-
import { isFilled_exports } from "./helpers/isFilled.js";
|
|
19
19
|
import { WriteClient } from "./WriteClient.js";
|
|
20
20
|
import { createWriteClient } from "./createWriteClient.js";
|
|
21
21
|
import { Migration } from "./Migration.js";
|
|
@@ -36,17 +36,11 @@ import { CustomTypeModelSliceType } from "./types/model/sliceZone.js";
|
|
|
36
36
|
import { CustomTypeModelSliceDisplay } from "./types/model/slice.js";
|
|
37
37
|
import { WebhookType } from "./types/webhook/types.js";
|
|
38
38
|
//#region src/index.ts
|
|
39
|
-
/**
|
|
40
|
-
* @deprecated Renamed to `filter`
|
|
41
|
-
*/
|
|
39
|
+
/** @deprecated Renamed to `filter` */
|
|
42
40
|
const predicate = filter;
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated Renamed to `mapSliceZone`
|
|
45
|
-
*/
|
|
41
|
+
/** @deprecated Renamed to `mapSliceZone` */
|
|
46
42
|
const unstable_mapSliceZone = mapSliceZone;
|
|
47
|
-
/**
|
|
48
|
-
* @deprecated Use {@link RichTextNodeType} instead.
|
|
49
|
-
*/
|
|
43
|
+
/** @deprecated Use {@link RichTextNodeType} instead. */
|
|
50
44
|
const Element = RichTextNodeType;
|
|
51
45
|
//#endregion
|
|
52
46
|
export { Client, CustomTypeModelFieldType, CustomTypeModelLinkSelectType, CustomTypeModelSliceDisplay, CustomTypeModelSliceType, Element, ForbiddenError, InvalidDataError, LinkType, Migration, NotFoundError, OEmbedType, ParsingError, PreviewTokenExpiredError, PrismicError, PrismicMigrationAsset, PrismicMigrationDocument, RefExpiredError, RefNotFoundError, RepositoryNotFoundError, RichTextNodeType, WebhookType, WriteClient, asDate, asHTML, asImagePixelDensitySrcSet, asImageSrc, asImageWidthSrcSet, asLink, asLinkAttrs, asText, buildQueryURL, cookie_exports as cookie, createClient, createMigration, createWriteClient, documentToLinkField, filter, getGraphQLEndpoint, getRepositoryEndpoint, getRepositoryName, getToolbarSrc, isFilled_exports as isFilled, isRepositoryEndpoint, isRepositoryName, mapSliceZone, predicate, unstable_mapSliceZone };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["// Imports are used for deprecations.\nimport type { CustomTypeModelIntegrationField } from \"./types/model/integration\"\nimport type { IntegrationField } from \"./types/value/integration\"\nimport { RichTextNodeType } from \"./types/value/richText\"\n\nimport type {\n\tHTMLRichTextFunctionSerializer,\n\tHTMLRichTextMapSerializer,\n} from \"./helpers/asHTML\"\nimport { mapSliceZone } from \"./helpers/mapSliceZone\"\n\nimport { filter } from \"./filter\"\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient } from \"./createClient\"\nexport { Client } from \"./Client\"\n\n// Write Client API.\nexport { createWriteClient } from \"./createWriteClient\"\nexport { WriteClient } from \"./WriteClient\"\n\n// Migration helper.\nexport { createMigration } from \"./createMigration\"\nexport { Migration } from \"./Migration\"\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 { CreateClient } from \"./createClient\"\nexport type { ClientConfig, HttpRequestLike } from \"./Client\"\nexport type { CreateWriteClient } from \"./createWriteClient\"\nexport type { WriteClientConfig, MigrateReporterEvents } from \"./WriteClient\"\nexport type {\n\tBuildQueryURLArgs,\n\tOrdering,\n\tQueryParams,\n\tRoute,\n} from \"./buildQueryURL\"\nexport type { CreateMigration } from \"./createMigration\"\nexport type {\n\tAbortSignalLike,\n\tFetchLike,\n\tRequestInitLike,\n\tResponseLike,\n} from \"./lib/request\"\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/**\n * @deprecated Renamed to `mapSliceZone`\n */\nconst unstable_mapSliceZone = mapSliceZone\nexport { mapSliceZone, unstable_mapSliceZone }\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\"\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\"\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\"\nexport type { SliceMapper } from \"./helpers/mapSliceZone\"\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\n// Client Errors\nexport {\n\tForbiddenError,\n\tInvalidDataError,\n\tNotFoundError,\n\tParsingError,\n\tPreviewTokenExpiredError,\n\tPrismicError,\n\tRefExpiredError,\n\tRefNotFoundError,\n\tRepositoryNotFoundError,\n} from \"./errors\"\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\n/**\n * @deprecated Use {@link RichTextNodeType} instead.\n */\n// TODO: Remove in v8.\nconst Element = RichTextNodeType\nexport { RichTextNodeType, Element }\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\tRichTextNodeTypes,\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 {\n\tTableField,\n\tTableFieldHead,\n\tTableFieldHeadRow,\n\tTableFieldBody,\n\tTableFieldBodyRow,\n\tTableFieldHeaderCell,\n\tTableFieldDataCell,\n} from \"./types/value/table\"\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\n/**\n * @deprecated Renamed to `IntegrationField`\n */\n// TODO: Remove when we remove support for deprecated `IntegrationFields` export.\ntype IntegrationFields = IntegrationField\nexport type { IntegrationField, IntegrationFields }\nexport type { IntegrationFieldData } from \"./types/value/integration\"\n\nexport type { GroupField, NestedGroupField } 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 {\n\tFieldState,\n\tAnyRegularField,\n\tAnySlicePrimaryField,\n\tRepeatable,\n} 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 {\n\tCustomTypeModelFetchCustomTypeLevel1,\n\tCustomTypeModelFetchContentRelationshipLevel1,\n\tCustomTypeModelFetchGroupLevel1,\n\tCustomTypeModelFetchCustomTypeLevel2,\n\tCustomTypeModelFetchGroupLevel2,\n\tCustomTypeModelContentRelationshipField,\n} 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\"\nexport type { CustomTypeModelTableField } from \"./types/model/table\"\n\n/**\n * @deprecated Renamed to `CustomTypeModelIntegrationField`.\n */\n// TODO: Remove when we remove support for deprecated `CustomTypeModelIntegrationField` export.\ntype CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField\nexport {\n\tCustomTypeModelIntegrationField,\n\tCustomTypeModelIntegrationFieldsField,\n}\nexport type {\n\tCustomTypeModelGroupField,\n\tCustomTypeModelNestedGroupField,\n} 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\tCustomTypeModelFieldForNestedGroup,\n\tCustomTypeModelFieldForSlicePrimary,\n} from \"./types/model/types\"\n\n// Migrations - Types representing Prismic Migration API content values.\nexport { PrismicMigrationDocument } from \"./types/migration/Document\"\nexport type {\n\tPendingPrismicDocument,\n\tExistingPrismicDocument,\n\tInjectMigrationSpecificTypes,\n} from \"./types/migration/Document\"\n\nexport { PrismicMigrationAsset } from \"./types/migration/Asset\"\nexport type {\n\tMigrationImage,\n\tMigrationLinkToMedia,\n\tMigrationRTImageNode,\n} from \"./types/migration/Asset\"\nexport type { MigrationContentRelationship } from \"./types/migration/ContentRelationship\"\n\n// API - Types representing Prismic Content API 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// Integration - Types representing Prismic's integration API.\nexport type {\n\tIntegrationAPIItem,\n\tIntegrationAPIResults,\n} from \"./types/api/integration\"\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAM,YAAY;;;;AA2ClB,MAAM,wBAAwB;;;;AAoD9B,MAAM,UAAU"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { filter } from \"./filter\"\nimport type { HTMLRichTextFunctionSerializer, HTMLRichTextMapSerializer } from \"./helpers/asHTML\"\nimport { mapSliceZone } from \"./helpers/mapSliceZone\"\n// Imports are used for deprecations.\nimport type { CustomTypeModelIntegrationField } from \"./types/model/integration\"\nimport type { IntegrationField } from \"./types/value/integration\"\nimport { RichTextNodeType } from \"./types/value/richText\"\n\n//=============================================================================\n// Client - Query content from Prismic.\n//=============================================================================\n\n// Primary Client API.\nexport { createClient } from \"./createClient\"\nexport { Client } from \"./Client\"\n\n// Write Client API.\nexport { createWriteClient } from \"./createWriteClient\"\nexport { WriteClient } from \"./WriteClient\"\n\n// Migration helper.\nexport { createMigration } from \"./createMigration\"\nexport { Migration } from \"./Migration\"\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/** @deprecated Renamed to `filter` */\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 { CreateClient } from \"./createClient\"\nexport type { ClientConfig, HttpRequestLike } from \"./Client\"\nexport type { CreateWriteClient } from \"./createWriteClient\"\nexport type { WriteClientConfig, MigrateReporterEvents } from \"./WriteClient\"\nexport type { BuildQueryURLArgs, Ordering, QueryParams, Route } from \"./buildQueryURL\"\nexport type { CreateMigration } from \"./createMigration\"\nexport type { AbortSignalLike, FetchLike, RequestInitLike, ResponseLike } from \"./lib/request\"\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/** @deprecated Renamed to `mapSliceZone` */\nconst unstable_mapSliceZone = mapSliceZone\nexport { mapSliceZone, unstable_mapSliceZone }\n\n// Conversion helper.\nexport { documentToLinkField } from \"./helpers/documentToLinkField\"\n\nexport type { LinkResolverFunction } from \"./helpers/asLink\"\nexport type { AsLinkAttrsConfig } from \"./helpers/asLinkAttrs\"\nexport type { SliceMapper } from \"./helpers/mapSliceZone\"\n\n/** @deprecated Renamed to `HTMLRichTextMapSerializer` */\ntype HTMLMapSerializer = HTMLRichTextMapSerializer\n/** @deprecated Renamed to `HTMLRichTextFunctionSerializer` */\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\n// Client Errors\nexport {\n\tForbiddenError,\n\tInvalidDataError,\n\tNotFoundError,\n\tParsingError,\n\tPreviewTokenExpiredError,\n\tPrismicError,\n\tRefExpiredError,\n\tRefNotFoundError,\n\tRepositoryNotFoundError,\n} from \"./errors\"\n\n//=============================================================================\n// Types - Types representing Prismic content, models, and API payloads.\n//=============================================================================\n\n// Values - Types representing Prismic content.\n/** @deprecated Use {@link RichTextNodeType} instead. */\n// TODO: Remove in v8.\nconst Element = RichTextNodeType\nexport { RichTextNodeType, Element }\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\tRichTextNodeTypes,\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 { EmptyLinkField, LinkField, FilledLinkToWebField } from \"./types/value/link\"\nexport type {\n\tContentRelationshipField,\n\tFilledContentRelationshipField,\n} from \"./types/value/contentRelationship\"\nexport type { LinkToMediaField, FilledLinkToMediaField } 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 {\n\tTableField,\n\tTableFieldHead,\n\tTableFieldHeadRow,\n\tTableFieldBody,\n\tTableFieldBodyRow,\n\tTableFieldHeaderCell,\n\tTableFieldDataCell,\n} from \"./types/value/table\"\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\n/** @deprecated Renamed to `IntegrationField` */\n// TODO: Remove when we remove support for deprecated `IntegrationFields` export.\ntype IntegrationFields = IntegrationField\nexport type { IntegrationField, IntegrationFields }\nexport type { IntegrationFieldData } from \"./types/value/integration\"\n\nexport type { GroupField, NestedGroupField } 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 {\n\tFieldState,\n\tAnyRegularField,\n\tAnySlicePrimaryField,\n\tRepeatable,\n} 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 {\n\tCustomTypeModelFetchCustomTypeLevel1,\n\tCustomTypeModelFetchContentRelationshipLevel1,\n\tCustomTypeModelFetchGroupLevel1,\n\tCustomTypeModelFetchCustomTypeLevel2,\n\tCustomTypeModelFetchGroupLevel2,\n\tCustomTypeModelContentRelationshipField,\n} 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\"\nexport type { CustomTypeModelTableField } from \"./types/model/table\"\n\n/** @deprecated Renamed to `CustomTypeModelIntegrationField`. */\n// TODO: Remove when we remove support for deprecated `CustomTypeModelIntegrationField` export.\ntype CustomTypeModelIntegrationFieldsField = CustomTypeModelIntegrationField\nexport { CustomTypeModelIntegrationField, CustomTypeModelIntegrationFieldsField }\nexport type {\n\tCustomTypeModelGroupField,\n\tCustomTypeModelNestedGroupField,\n} from \"./types/model/group\"\nexport type {\n\tCustomTypeModelSliceZoneField,\n\tCustomTypeModelSliceLabel,\n\tCustomTypeModelSharedSlice,\n} from \"./types/model/sliceZone\"\nexport type { CustomTypeModelSlice, CustomTypeModelLegacySlice } 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\tCustomTypeModelFieldForNestedGroup,\n\tCustomTypeModelFieldForSlicePrimary,\n} from \"./types/model/types\"\n\n// Migrations - Types representing Prismic Migration API content values.\nexport { PrismicMigrationDocument } from \"./types/migration/Document\"\nexport type {\n\tPendingPrismicDocument,\n\tExistingPrismicDocument,\n\tInjectMigrationSpecificTypes,\n} from \"./types/migration/Document\"\n\nexport { PrismicMigrationAsset } from \"./types/migration/Asset\"\nexport type {\n\tMigrationImage,\n\tMigrationLinkToMedia,\n\tMigrationRTImageNode,\n} from \"./types/migration/Asset\"\nexport type { MigrationContentRelationship } from \"./types/migration/ContentRelationship\"\n\n// API - Types representing Prismic Content API responses.\nexport type { Query } from \"./types/api/query\"\n\nexport type { PublishMigrationReleaseResult } from \"./types/api/migration/release\"\n\nexport type { Ref } from \"./types/api/ref\"\n\nexport type { Release } from \"./types/api/release\"\n\nexport type { Repository, Language, Form, FormField } from \"./types/api/repository\"\n\nexport type { Tags } from \"./types/api/tags\"\n\n// Integration - Types representing Prismic's integration API.\nexport type { IntegrationAPIItem, IntegrationAPIResults } from \"./types/api/integration\"\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA,MAAM,YAAY;;AA+BlB,MAAM,wBAAwB;;AA8C9B,MAAM,UAAU"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/isRepositoryEndpoint.ts
|
|
2
2
|
/**
|
|
3
|
-
* Determines if a string is a Prismic Content API endpoint. Note that any valid
|
|
4
|
-
*
|
|
3
|
+
* Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
|
|
4
|
+
* endpoint to support network proxies.
|
|
5
5
|
*
|
|
6
6
|
* @param input - Input to test.
|
|
7
|
-
*
|
|
8
7
|
* @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
|
|
9
|
-
*
|
|
8
|
+
* otherwise.
|
|
10
9
|
*/
|
|
11
10
|
const isRepositoryEndpoint = (input) => {
|
|
12
11
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.cjs","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.cjs","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid\n * endpoint to support network proxies.\n *\n * @param input - Input to test.\n * @returns `true` if `input` is a valid Prismic Content API 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"],"mappings":";;;;;;;;;AAQA,MAAa,wBAAwB,UAA2B;AAC/D,KAAI;AACH,MAAI,IAAI,MAAM;AAEd,SAAO;SACA;AACP,SAAO"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/isRepositoryEndpoint.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Determines if a string is a Prismic Content API endpoint. Note that any valid
|
|
4
|
-
*
|
|
3
|
+
* Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
|
|
4
|
+
* endpoint to support network proxies.
|
|
5
5
|
*
|
|
6
6
|
* @param input - Input to test.
|
|
7
|
-
*
|
|
8
7
|
* @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
|
|
9
|
-
*
|
|
8
|
+
* otherwise.
|
|
10
9
|
*/
|
|
11
10
|
declare const isRepositoryEndpoint: (input: string) => boolean;
|
|
12
11
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.d.cts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.d.cts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;AAQA;;;;;;;cAAa,oBAAA,GAAwB,KAAA"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/isRepositoryEndpoint.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Determines if a string is a Prismic Content API endpoint. Note that any valid
|
|
4
|
-
*
|
|
3
|
+
* Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
|
|
4
|
+
* endpoint to support network proxies.
|
|
5
5
|
*
|
|
6
6
|
* @param input - Input to test.
|
|
7
|
-
*
|
|
8
7
|
* @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
|
|
9
|
-
*
|
|
8
|
+
* otherwise.
|
|
10
9
|
*/
|
|
11
10
|
declare const isRepositoryEndpoint: (input: string) => boolean;
|
|
12
11
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.d.ts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.d.ts","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"mappings":";;AAQA;;;;;;;cAAa,oBAAA,GAAwB,KAAA"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/isRepositoryEndpoint.ts
|
|
2
2
|
/**
|
|
3
|
-
* Determines if a string is a Prismic Content API endpoint. Note that any valid
|
|
4
|
-
*
|
|
3
|
+
* Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid
|
|
4
|
+
* endpoint to support network proxies.
|
|
5
5
|
*
|
|
6
6
|
* @param input - Input to test.
|
|
7
|
-
*
|
|
8
7
|
* @returns `true` if `input` is a valid Prismic Content API endpoint, `false`
|
|
9
|
-
*
|
|
8
|
+
* otherwise.
|
|
10
9
|
*/
|
|
11
10
|
const isRepositoryEndpoint = (input) => {
|
|
12
11
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryEndpoint.js","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid
|
|
1
|
+
{"version":3,"file":"isRepositoryEndpoint.js","names":[],"sources":["../src/isRepositoryEndpoint.ts"],"sourcesContent":["/**\n * Determines if a string is a Prismic Content API endpoint. Note that any valid URL is a valid\n * endpoint to support network proxies.\n *\n * @param input - Input to test.\n * @returns `true` if `input` is a valid Prismic Content API 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"],"mappings":";;;;;;;;;AAQA,MAAa,wBAAwB,UAA2B;AAC/D,KAAI;AACH,MAAI,IAAI,MAAM;AAEd,SAAO;SACA;AACP,SAAO"}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Determines if an input is a valid Prismic repository name.
|
|
4
4
|
*
|
|
5
5
|
* @param input - Input to test.
|
|
6
|
-
*
|
|
7
6
|
* @returns `true` if `input` is a valid Prismic repository name, `false`
|
|
8
|
-
*
|
|
7
|
+
* otherwise.
|
|
9
8
|
*/
|
|
10
9
|
const isRepositoryName = (input) => {
|
|
11
10
|
return /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.cjs","names":[],"sources":["../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n
|
|
1
|
+
{"version":3,"file":"isRepositoryName.cjs","names":[],"sources":["../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\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"],"mappings":";;;;;;;;AAOA,MAAa,oBAAoB,UAA2B;AAC3D,QAAO,2CAA2C,KAAK,MAAM"}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Determines if an input is a valid Prismic repository name.
|
|
4
4
|
*
|
|
5
5
|
* @param input - Input to test.
|
|
6
|
-
*
|
|
7
6
|
* @returns `true` if `input` is a valid Prismic repository name, `false`
|
|
8
|
-
*
|
|
7
|
+
* otherwise.
|
|
9
8
|
*/
|
|
10
9
|
declare const isRepositoryName: (input: string) => boolean;
|
|
11
10
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.d.cts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"isRepositoryName.d.cts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;AAOA;;;;;;cAAa,gBAAA,GAAoB,KAAA"}
|
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Determines if an input is a valid Prismic repository name.
|
|
4
4
|
*
|
|
5
5
|
* @param input - Input to test.
|
|
6
|
-
*
|
|
7
6
|
* @returns `true` if `input` is a valid Prismic repository name, `false`
|
|
8
|
-
*
|
|
7
|
+
* otherwise.
|
|
9
8
|
*/
|
|
10
9
|
declare const isRepositoryName: (input: string) => boolean;
|
|
11
10
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.d.ts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"isRepositoryName.d.ts","names":[],"sources":["../src/isRepositoryName.ts"],"mappings":";;AAOA;;;;;;cAAa,gBAAA,GAAoB,KAAA"}
|
package/dist/isRepositoryName.js
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
* Determines if an input is a valid Prismic repository name.
|
|
4
4
|
*
|
|
5
5
|
* @param input - Input to test.
|
|
6
|
-
*
|
|
7
6
|
* @returns `true` if `input` is a valid Prismic repository name, `false`
|
|
8
|
-
*
|
|
7
|
+
* otherwise.
|
|
9
8
|
*/
|
|
10
9
|
const isRepositoryName = (input) => {
|
|
11
10
|
return /^[a-zA-Z0-9][-a-zA-Z0-9]{2,}[a-zA-Z0-9]$/.test(input);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isRepositoryName.js","names":[],"sources":["../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\n
|
|
1
|
+
{"version":3,"file":"isRepositoryName.js","names":[],"sources":["../src/isRepositoryName.ts"],"sourcesContent":["/**\n * Determines if an input is a valid Prismic repository name.\n *\n * @param input - Input to test.\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"],"mappings":";;;;;;;;AAOA,MAAa,oBAAoB,UAA2B;AAC3D,QAAO,2CAA2C,KAAK,MAAM"}
|
package/dist/lib/devMsg.cjs
CHANGED
|
@@ -4,15 +4,13 @@ const require_package = require("../package.cjs");
|
|
|
4
4
|
* Returns a `prismic.dev/msg` URL for a given message slug.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
|
+
* ;```ts
|
|
8
|
+
* devMsg("missing-param")
|
|
9
|
+
* // => "https://prismic.dev/msg/client/v1.2.3/missing-param.md"
|
|
10
|
+
* ```
|
|
7
11
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* // => "https://prismic.dev/msg/client/v1.2.3/missing-param.md"
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @param slug - Slug for the message. This corresponds to a Markdown file in
|
|
14
|
-
* the Git repository's `/messages` directory.
|
|
15
|
-
*
|
|
12
|
+
* @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's
|
|
13
|
+
* `/messages` directory.
|
|
16
14
|
* @returns The `prismic.dev/msg` URL for the given slug.
|
|
17
15
|
*/
|
|
18
16
|
const devMsg = (slug) => {
|
package/dist/lib/devMsg.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devMsg.cjs","names":["version"],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n
|
|
1
|
+
{"version":3,"file":"devMsg.cjs","names":["version"],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t;```ts\n * \tdevMsg(\"missing-param\")\n * \t// => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * \t```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's\n * `/messages` directory.\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,UAAU,SAAyB;AAC/C,QAAO,mCAAmCA,gBAAAA,QAAQ,GAAG"}
|
package/dist/lib/devMsg.js
CHANGED
|
@@ -4,15 +4,13 @@ import { version } from "../package.js";
|
|
|
4
4
|
* Returns a `prismic.dev/msg` URL for a given message slug.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
|
+
* ;```ts
|
|
8
|
+
* devMsg("missing-param")
|
|
9
|
+
* // => "https://prismic.dev/msg/client/v1.2.3/missing-param.md"
|
|
10
|
+
* ```
|
|
7
11
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* // => "https://prismic.dev/msg/client/v1.2.3/missing-param.md"
|
|
11
|
-
* ```
|
|
12
|
-
*
|
|
13
|
-
* @param slug - Slug for the message. This corresponds to a Markdown file in
|
|
14
|
-
* the Git repository's `/messages` directory.
|
|
15
|
-
*
|
|
12
|
+
* @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's
|
|
13
|
+
* `/messages` directory.
|
|
16
14
|
* @returns The `prismic.dev/msg` URL for the given slug.
|
|
17
15
|
*/
|
|
18
16
|
const devMsg = (slug) => {
|
package/dist/lib/devMsg.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devMsg.js","names":[],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n
|
|
1
|
+
{"version":3,"file":"devMsg.js","names":[],"sources":["../../src/lib/devMsg.ts"],"sourcesContent":["import { version } from \"../../package.json\"\n\n/**\n * Returns a `prismic.dev/msg` URL for a given message slug.\n *\n * @example\n * \t;```ts\n * \tdevMsg(\"missing-param\")\n * \t// => \"https://prismic.dev/msg/client/v1.2.3/missing-param.md\"\n * \t```\n *\n * @param slug - Slug for the message. This corresponds to a Markdown file in the Git repository's\n * `/messages` directory.\n * @returns The `prismic.dev/msg` URL for the given slug.\n */\nexport const devMsg = (slug: string): string => {\n\treturn `https://prismic.dev/msg/client/v${version}/${slug}`\n}\n"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAa,UAAU,SAAyB;AAC/C,QAAO,mCAAmC,QAAQ,GAAG"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/lib/getOptionalLinkProperties.ts
|
|
2
2
|
/**
|
|
3
|
-
* Returns optional properties only available to link fields. Link fields can
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @param input - The content relationship or link to media field from which the
|
|
8
|
-
* link properties will be extracted.
|
|
3
|
+
* Returns optional properties only available to link fields. Link fields can have the same shape as
|
|
4
|
+
* content relationship and link to media fields, requiring special treatment to extract
|
|
5
|
+
* link-specific properties.
|
|
9
6
|
*
|
|
7
|
+
* @param input - The content relationship or link to media field from which the link properties
|
|
8
|
+
* will be extracted.
|
|
10
9
|
* @returns Optional link properties that `input` might have.
|
|
11
10
|
*/
|
|
12
11
|
const getOptionalLinkProperties = (input) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOptionalLinkProperties.cjs","names":[],"sources":["../../src/lib/getOptionalLinkProperties.ts"],"sourcesContent":["import type { OptionalLinkProperties } from \"../types/value/link\"\n\n/**\n * Returns optional properties only available to link fields. Link fields can
|
|
1
|
+
{"version":3,"file":"getOptionalLinkProperties.cjs","names":[],"sources":["../../src/lib/getOptionalLinkProperties.ts"],"sourcesContent":["import type { OptionalLinkProperties } from \"../types/value/link\"\n\n/**\n * Returns optional properties only available to link fields. Link fields can have the same shape as\n * content relationship and link to media fields, requiring special treatment to extract\n * link-specific properties.\n *\n * @param input - The content relationship or link to media field from which the link properties\n * will be extracted.\n * @returns Optional link properties that `input` might have.\n */\nexport const getOptionalLinkProperties = (\n\tinput: OptionalLinkProperties,\n): OptionalLinkProperties => {\n\tconst res: OptionalLinkProperties = {}\n\n\tif (\"text\" in input) {\n\t\tres.text = input.text\n\t}\n\n\tif (\"variant\" in input) {\n\t\tres.variant = input.variant\n\t}\n\n\treturn res\n}\n"],"mappings":";;;;;;;;;;AAWA,MAAa,6BACZ,UAC4B;CAC5B,MAAM,MAA8B,EAAE;AAEtC,KAAI,UAAU,MACb,KAAI,OAAO,MAAM;AAGlB,KAAI,aAAa,MAChB,KAAI,UAAU,MAAM;AAGrB,QAAO"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
//#region src/lib/getOptionalLinkProperties.ts
|
|
2
2
|
/**
|
|
3
|
-
* Returns optional properties only available to link fields. Link fields can
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* @param input - The content relationship or link to media field from which the
|
|
8
|
-
* link properties will be extracted.
|
|
3
|
+
* Returns optional properties only available to link fields. Link fields can have the same shape as
|
|
4
|
+
* content relationship and link to media fields, requiring special treatment to extract
|
|
5
|
+
* link-specific properties.
|
|
9
6
|
*
|
|
7
|
+
* @param input - The content relationship or link to media field from which the link properties
|
|
8
|
+
* will be extracted.
|
|
10
9
|
* @returns Optional link properties that `input` might have.
|
|
11
10
|
*/
|
|
12
11
|
const getOptionalLinkProperties = (input) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getOptionalLinkProperties.js","names":[],"sources":["../../src/lib/getOptionalLinkProperties.ts"],"sourcesContent":["import type { OptionalLinkProperties } from \"../types/value/link\"\n\n/**\n * Returns optional properties only available to link fields. Link fields can
|
|
1
|
+
{"version":3,"file":"getOptionalLinkProperties.js","names":[],"sources":["../../src/lib/getOptionalLinkProperties.ts"],"sourcesContent":["import type { OptionalLinkProperties } from \"../types/value/link\"\n\n/**\n * Returns optional properties only available to link fields. Link fields can have the same shape as\n * content relationship and link to media fields, requiring special treatment to extract\n * link-specific properties.\n *\n * @param input - The content relationship or link to media field from which the link properties\n * will be extracted.\n * @returns Optional link properties that `input` might have.\n */\nexport const getOptionalLinkProperties = (\n\tinput: OptionalLinkProperties,\n): OptionalLinkProperties => {\n\tconst res: OptionalLinkProperties = {}\n\n\tif (\"text\" in input) {\n\t\tres.text = input.text\n\t}\n\n\tif (\"variant\" in input) {\n\t\tres.variant = input.variant\n\t}\n\n\treturn res\n}\n"],"mappings":";;;;;;;;;;AAWA,MAAa,6BACZ,UAC4B;CAC5B,MAAM,MAA8B,EAAE;AAEtC,KAAI,UAAU,MACb,KAAI,OAAO,MAAM;AAGlB,KAAI,aAAa,MAChB,KAAI,UAAU,MAAM;AAGrB,QAAO"}
|
|
@@ -6,9 +6,7 @@ const readValue = (value) => {
|
|
|
6
6
|
/**
|
|
7
7
|
* Returns the value of a cookie from a given cookie store.
|
|
8
8
|
*
|
|
9
|
-
* @param cookieJar - The stringified cookie store from which to read the
|
|
10
|
-
* cookie.
|
|
11
|
-
*
|
|
9
|
+
* @param cookieJar - The stringified cookie store from which to read the cookie.
|
|
12
10
|
* @returns The value of the cookie, if it exists.
|
|
13
11
|
*/
|
|
14
12
|
const getPreviewCookie = (cookieJar) => {
|