@prismicio/client 7.22.1-pr.452.731578b → 7.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Client.cjs +4 -8
- package/dist/Client.cjs.map +1 -1
- package/dist/Client.d.cts +16 -14
- package/dist/Client.d.cts.map +1 -1
- package/dist/Client.d.ts +16 -14
- package/dist/Client.d.ts.map +1 -1
- package/dist/Client.js +4 -8
- package/dist/Client.js.map +1 -1
- package/dist/Migration.cjs +23 -24
- package/dist/Migration.cjs.map +1 -1
- package/dist/Migration.d.cts +3 -1
- package/dist/Migration.d.cts.map +1 -1
- package/dist/Migration.d.ts +3 -1
- package/dist/Migration.d.ts.map +1 -1
- package/dist/Migration.js +23 -24
- package/dist/Migration.js.map +1 -1
- package/dist/WriteClient.cjs +19 -21
- package/dist/WriteClient.cjs.map +1 -1
- package/dist/WriteClient.d.cts +22 -18
- package/dist/WriteClient.d.cts.map +1 -1
- package/dist/WriteClient.d.ts +22 -18
- package/dist/WriteClient.d.ts.map +1 -1
- package/dist/WriteClient.js +19 -21
- package/dist/WriteClient.js.map +1 -1
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.cts +6 -5
- package/dist/buildQueryURL.d.cts.map +1 -1
- package/dist/buildQueryURL.d.ts +6 -5
- package/dist/buildQueryURL.d.ts.map +1 -1
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.d.cts +1 -1
- package/dist/cookie.d.cts.map +1 -1
- package/dist/cookie.d.ts +1 -1
- package/dist/cookie.d.ts.map +1 -1
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.cts +4 -2
- package/dist/createClient.d.cts.map +1 -1
- package/dist/createClient.d.ts +4 -2
- package/dist/createClient.d.ts.map +1 -1
- package/dist/createClient.js.map +1 -1
- package/dist/createMigration.cjs.map +1 -1
- package/dist/createMigration.d.cts +4 -2
- package/dist/createMigration.d.cts.map +1 -1
- package/dist/createMigration.d.ts +4 -2
- package/dist/createMigration.d.ts.map +1 -1
- package/dist/createMigration.js.map +1 -1
- package/dist/createWriteClient.cjs.map +1 -1
- package/dist/createWriteClient.d.cts +4 -2
- package/dist/createWriteClient.d.cts.map +1 -1
- package/dist/createWriteClient.d.ts +4 -2
- package/dist/createWriteClient.d.ts.map +1 -1
- package/dist/createWriteClient.js.map +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts +10 -9
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.ts +10 -9
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/filter.cjs +0 -175
- package/dist/filter.cjs.map +1 -1
- package/dist/filter.d.cts +4 -3
- package/dist/filter.d.cts.map +1 -1
- package/dist/filter.d.ts +4 -3
- package/dist/filter.d.ts.map +1 -1
- package/dist/filter.js +0 -175
- package/dist/filter.js.map +1 -1
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.d.cts +2 -1
- package/dist/getGraphQLEndpoint.d.cts.map +1 -1
- package/dist/getGraphQLEndpoint.d.ts +2 -1
- package/dist/getGraphQLEndpoint.d.ts.map +1 -1
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.d.cts +2 -1
- package/dist/getRepositoryEndpoint.d.cts.map +1 -1
- package/dist/getRepositoryEndpoint.d.ts +2 -1
- package/dist/getRepositoryEndpoint.d.ts.map +1 -1
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.d.cts +2 -1
- package/dist/getRepositoryName.d.cts.map +1 -1
- package/dist/getRepositoryName.d.ts +2 -1
- package/dist/getRepositoryName.d.ts.map +1 -1
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs.map +1 -1
- package/dist/getToolbarSrc.d.cts +2 -1
- package/dist/getToolbarSrc.d.cts.map +1 -1
- package/dist/getToolbarSrc.d.ts +2 -1
- package/dist/getToolbarSrc.d.ts.map +1 -1
- package/dist/getToolbarSrc.js.map +1 -1
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.d.cts +3 -1
- package/dist/helpers/asDate.d.cts.map +1 -1
- package/dist/helpers/asDate.d.ts +3 -1
- package/dist/helpers/asDate.d.ts.map +1 -1
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs +5 -7
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.cts +11 -12
- package/dist/helpers/asHTML.d.cts.map +1 -1
- package/dist/helpers/asHTML.d.ts +11 -12
- package/dist/helpers/asHTML.d.ts.map +1 -1
- package/dist/helpers/asHTML.js +5 -7
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts +4 -3
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +4 -3
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.cts +3 -1
- package/dist/helpers/asImageSrc.d.cts.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +3 -1
- package/dist/helpers/asImageSrc.d.ts.map +1 -1
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.cts +4 -3
- package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +4 -3
- package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.cts +5 -3
- package/dist/helpers/asLink.d.cts.map +1 -1
- package/dist/helpers/asLink.d.ts +5 -3
- package/dist/helpers/asLink.d.ts.map +1 -1
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.cts +4 -2
- package/dist/helpers/asLinkAttrs.d.cts.map +1 -1
- package/dist/helpers/asLinkAttrs.d.ts +4 -2
- package/dist/helpers/asLinkAttrs.d.ts.map +1 -1
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.cts +3 -1
- package/dist/helpers/asText.d.cts.map +1 -1
- package/dist/helpers/asText.d.ts +3 -1
- package/dist/helpers/asText.d.ts.map +1 -1
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.d.cts +3 -1
- package/dist/helpers/documentToLinkField.d.cts.map +1 -1
- package/dist/helpers/documentToLinkField.d.ts +3 -1
- package/dist/helpers/documentToLinkField.d.ts.map +1 -1
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs +0 -20
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.d.cts +24 -22
- package/dist/helpers/isFilled.d.cts.map +1 -1
- package/dist/helpers/isFilled.d.ts +24 -22
- package/dist/helpers/isFilled.d.ts.map +1 -1
- package/dist/helpers/isFilled.js +1 -1
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/helpers/mapSliceZone.cjs.map +1 -1
- package/dist/helpers/mapSliceZone.d.cts +8 -10
- package/dist/helpers/mapSliceZone.d.cts.map +1 -1
- package/dist/helpers/mapSliceZone.d.ts +8 -10
- package/dist/helpers/mapSliceZone.d.ts.map +1 -1
- package/dist/helpers/mapSliceZone.js.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.d.cts +2 -1
- package/dist/isRepositoryEndpoint.d.cts.map +1 -1
- package/dist/isRepositoryEndpoint.d.ts +2 -1
- package/dist/isRepositoryEndpoint.d.ts.map +1 -1
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs.map +1 -1
- package/dist/isRepositoryName.d.cts +2 -1
- package/dist/isRepositoryName.d.cts.map +1 -1
- package/dist/isRepositoryName.d.ts +2 -1
- package/dist/isRepositoryName.d.ts.map +1 -1
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/escapeHTML.cjs.map +1 -1
- package/dist/lib/escapeHTML.js.map +1 -1
- package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
- package/dist/lib/getOptionalLinkProperties.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/isMigrationValue.cjs.map +1 -1
- package/dist/lib/isMigrationValue.js.map +1 -1
- package/dist/lib/isValue.cjs.map +1 -1
- package/dist/lib/isValue.js.map +1 -1
- package/dist/lib/pLimit.cjs.map +1 -1
- package/dist/lib/pLimit.js.map +1 -1
- package/dist/lib/request.cjs +0 -1
- package/dist/lib/request.cjs.map +1 -1
- package/dist/lib/request.d.cts +6 -5
- package/dist/lib/request.d.cts.map +1 -1
- package/dist/lib/request.d.ts +6 -5
- package/dist/lib/request.d.ts.map +1 -1
- package/dist/lib/request.js +1 -1
- package/dist/lib/request.js.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.cjs +0 -3
- package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.js +1 -1
- package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs +6 -10
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.js +6 -10
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/lib/throttledWarn.cjs.map +1 -1
- package/dist/lib/throttledWarn.js.map +1 -1
- package/dist/lib/validateAssetMetadata.cjs.map +1 -1
- 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.map +1 -1
- package/dist/richtext/asText.d.cts +3 -1
- package/dist/richtext/asText.d.cts.map +1 -1
- package/dist/richtext/asText.d.ts +3 -1
- package/dist/richtext/asText.d.ts.map +1 -1
- package/dist/richtext/asText.js.map +1 -1
- package/dist/richtext/asTree.cjs.map +1 -1
- package/dist/richtext/asTree.d.cts +3 -1
- package/dist/richtext/asTree.d.cts.map +1 -1
- package/dist/richtext/asTree.d.ts +3 -1
- package/dist/richtext/asTree.d.ts.map +1 -1
- package/dist/richtext/asTree.js.map +1 -1
- package/dist/richtext/composeSerializers.cjs.map +1 -1
- package/dist/richtext/composeSerializers.d.cts +3 -1
- package/dist/richtext/composeSerializers.d.cts.map +1 -1
- package/dist/richtext/composeSerializers.d.ts +3 -1
- package/dist/richtext/composeSerializers.d.ts.map +1 -1
- package/dist/richtext/composeSerializers.js.map +1 -1
- package/dist/richtext/serialize.cjs.map +1 -1
- package/dist/richtext/serialize.d.cts +3 -1
- package/dist/richtext/serialize.d.cts.map +1 -1
- package/dist/richtext/serialize.d.ts +3 -1
- package/dist/richtext/serialize.d.ts.map +1 -1
- package/dist/richtext/serialize.js.map +1 -1
- package/dist/richtext/types.cjs.map +1 -1
- package/dist/richtext/types.d.cts +7 -5
- package/dist/richtext/types.d.cts.map +1 -1
- package/dist/richtext/types.d.ts +7 -5
- package/dist/richtext/types.d.ts.map +1 -1
- package/dist/richtext/types.js.map +1 -1
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.cts +3 -1
- package/dist/richtext/wrapMapSerializer.d.cts.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.ts +3 -1
- package/dist/richtext/wrapMapSerializer.d.ts.map +1 -1
- package/dist/richtext/wrapMapSerializer.js.map +1 -1
- package/dist/types/api/asset/asset.d.cts +20 -35
- package/dist/types/api/asset/asset.d.cts.map +1 -1
- package/dist/types/api/asset/asset.d.ts +20 -35
- package/dist/types/api/asset/asset.d.ts.map +1 -1
- package/dist/types/api/asset/tag.d.cts +7 -12
- package/dist/types/api/asset/tag.d.cts.map +1 -1
- package/dist/types/api/asset/tag.d.ts +7 -12
- package/dist/types/api/asset/tag.d.ts.map +1 -1
- package/dist/types/api/integration.d.cts +4 -2
- package/dist/types/api/integration.d.cts.map +1 -1
- package/dist/types/api/integration.d.ts +4 -2
- package/dist/types/api/integration.d.ts.map +1 -1
- package/dist/types/api/migration/release.d.cts +7 -3
- package/dist/types/api/migration/release.d.cts.map +1 -1
- package/dist/types/api/migration/release.d.ts +7 -3
- package/dist/types/api/migration/release.d.ts.map +1 -1
- package/dist/types/api/query.d.cts +3 -1
- package/dist/types/api/query.d.cts.map +1 -1
- package/dist/types/api/query.d.ts +3 -1
- package/dist/types/api/query.d.ts.map +1 -1
- package/dist/types/api/ref.d.cts +2 -1
- package/dist/types/api/ref.d.cts.map +1 -1
- package/dist/types/api/ref.d.ts +2 -1
- package/dist/types/api/ref.d.ts.map +1 -1
- package/dist/types/api/release.d.cts +3 -1
- package/dist/types/api/release.d.cts.map +1 -1
- package/dist/types/api/release.d.ts +3 -1
- package/dist/types/api/release.d.ts.map +1 -1
- package/dist/types/api/repository.d.cts +6 -4
- package/dist/types/api/repository.d.cts.map +1 -1
- package/dist/types/api/repository.d.ts +6 -4
- package/dist/types/api/repository.d.ts.map +1 -1
- package/dist/types/api/tags.d.cts +2 -1
- package/dist/types/api/tags.d.cts.map +1 -1
- package/dist/types/api/tags.d.ts +2 -1
- package/dist/types/api/tags.d.ts.map +1 -1
- package/dist/types/migration/Asset.cjs.map +1 -1
- package/dist/types/migration/Asset.d.cts +15 -21
- package/dist/types/migration/Asset.d.cts.map +1 -1
- package/dist/types/migration/Asset.d.ts +15 -21
- package/dist/types/migration/Asset.d.ts.map +1 -1
- package/dist/types/migration/Asset.js.map +1 -1
- package/dist/types/migration/ContentRelationship.d.cts +3 -1
- package/dist/types/migration/ContentRelationship.d.cts.map +1 -1
- package/dist/types/migration/ContentRelationship.d.ts +3 -1
- package/dist/types/migration/ContentRelationship.d.ts.map +1 -1
- package/dist/types/migration/Document.cjs.map +1 -1
- package/dist/types/migration/Document.d.cts +8 -8
- package/dist/types/migration/Document.d.cts.map +1 -1
- package/dist/types/migration/Document.d.ts +8 -8
- package/dist/types/migration/Document.d.ts.map +1 -1
- package/dist/types/migration/Document.js.map +1 -1
- package/dist/types/model/boolean.d.cts +3 -1
- package/dist/types/model/boolean.d.cts.map +1 -1
- package/dist/types/model/boolean.d.ts +3 -1
- package/dist/types/model/boolean.d.ts.map +1 -1
- package/dist/types/model/color.d.cts +3 -1
- package/dist/types/model/color.d.cts.map +1 -1
- package/dist/types/model/color.d.ts +3 -1
- package/dist/types/model/color.d.ts.map +1 -1
- package/dist/types/model/contentRelationship.d.cts +8 -6
- package/dist/types/model/contentRelationship.d.cts.map +1 -1
- package/dist/types/model/contentRelationship.d.ts +8 -6
- package/dist/types/model/contentRelationship.d.ts.map +1 -1
- package/dist/types/model/customType.d.cts +5 -3
- package/dist/types/model/customType.d.cts.map +1 -1
- package/dist/types/model/customType.d.ts +5 -3
- package/dist/types/model/customType.d.ts.map +1 -1
- package/dist/types/model/date.d.cts +3 -1
- package/dist/types/model/date.d.cts.map +1 -1
- package/dist/types/model/date.d.ts +3 -1
- package/dist/types/model/date.d.ts.map +1 -1
- package/dist/types/model/embed.d.cts +3 -1
- package/dist/types/model/embed.d.cts.map +1 -1
- package/dist/types/model/embed.d.ts +3 -1
- package/dist/types/model/embed.d.ts.map +1 -1
- package/dist/types/model/geoPoint.d.cts +3 -1
- package/dist/types/model/geoPoint.d.cts.map +1 -1
- package/dist/types/model/geoPoint.d.ts +3 -1
- package/dist/types/model/geoPoint.d.ts.map +1 -1
- package/dist/types/model/group.d.cts +4 -2
- package/dist/types/model/group.d.cts.map +1 -1
- package/dist/types/model/group.d.ts +4 -2
- package/dist/types/model/group.d.ts.map +1 -1
- package/dist/types/model/image.d.cts +5 -3
- package/dist/types/model/image.d.cts.map +1 -1
- package/dist/types/model/image.d.ts +5 -3
- package/dist/types/model/image.d.ts.map +1 -1
- package/dist/types/model/integration.d.cts +3 -1
- package/dist/types/model/integration.d.cts.map +1 -1
- package/dist/types/model/integration.d.ts +3 -1
- package/dist/types/model/integration.d.ts.map +1 -1
- package/dist/types/model/keyText.d.cts +3 -1
- package/dist/types/model/keyText.d.cts.map +1 -1
- package/dist/types/model/keyText.d.ts +3 -1
- package/dist/types/model/keyText.d.ts.map +1 -1
- package/dist/types/model/link.cjs.map +1 -1
- package/dist/types/model/link.d.cts +4 -2
- package/dist/types/model/link.d.cts.map +1 -1
- package/dist/types/model/link.d.ts +4 -2
- package/dist/types/model/link.d.ts.map +1 -1
- package/dist/types/model/link.js.map +1 -1
- package/dist/types/model/linkToMedia.d.cts +3 -1
- package/dist/types/model/linkToMedia.d.cts.map +1 -1
- package/dist/types/model/linkToMedia.d.ts +3 -1
- package/dist/types/model/linkToMedia.d.ts.map +1 -1
- package/dist/types/model/number.d.cts +3 -1
- package/dist/types/model/number.d.cts.map +1 -1
- package/dist/types/model/number.d.ts +3 -1
- package/dist/types/model/number.d.ts.map +1 -1
- package/dist/types/model/range.d.cts +3 -1
- package/dist/types/model/range.d.cts.map +1 -1
- package/dist/types/model/range.d.ts +3 -1
- package/dist/types/model/range.d.ts.map +1 -1
- package/dist/types/model/richText.d.cts +5 -3
- package/dist/types/model/richText.d.cts.map +1 -1
- package/dist/types/model/richText.d.ts +5 -3
- package/dist/types/model/richText.d.ts.map +1 -1
- package/dist/types/model/select.d.cts +3 -1
- package/dist/types/model/select.d.cts.map +1 -1
- package/dist/types/model/select.d.ts +3 -1
- package/dist/types/model/select.d.ts.map +1 -1
- package/dist/types/model/separator.d.cts +3 -1
- package/dist/types/model/separator.d.cts.map +1 -1
- package/dist/types/model/separator.d.ts +3 -1
- package/dist/types/model/separator.d.ts.map +1 -1
- package/dist/types/model/sharedSlice.d.cts +3 -1
- package/dist/types/model/sharedSlice.d.cts.map +1 -1
- package/dist/types/model/sharedSlice.d.ts +3 -1
- package/dist/types/model/sharedSlice.d.ts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.cts +3 -1
- package/dist/types/model/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.ts +3 -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 +5 -3
- package/dist/types/model/slice.d.cts.map +1 -1
- package/dist/types/model/slice.d.ts +5 -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 +6 -4
- package/dist/types/model/sliceZone.d.cts.map +1 -1
- package/dist/types/model/sliceZone.d.ts +6 -4
- package/dist/types/model/sliceZone.d.ts.map +1 -1
- package/dist/types/model/sliceZone.js.map +1 -1
- package/dist/types/model/table.d.cts +3 -1
- package/dist/types/model/table.d.cts.map +1 -1
- package/dist/types/model/table.d.ts +3 -1
- package/dist/types/model/table.d.ts.map +1 -1
- package/dist/types/model/timestamp.d.cts +3 -1
- package/dist/types/model/timestamp.d.cts.map +1 -1
- package/dist/types/model/timestamp.d.ts +3 -1
- package/dist/types/model/timestamp.d.ts.map +1 -1
- package/dist/types/model/title.d.cts +3 -1
- package/dist/types/model/title.d.cts.map +1 -1
- package/dist/types/model/title.d.ts +3 -1
- package/dist/types/model/title.d.ts.map +1 -1
- package/dist/types/model/types.cjs +0 -4
- package/dist/types/model/types.cjs.map +1 -1
- package/dist/types/model/types.d.cts +11 -13
- package/dist/types/model/types.d.cts.map +1 -1
- package/dist/types/model/types.d.ts +11 -13
- package/dist/types/model/types.d.ts.map +1 -1
- package/dist/types/model/types.js +0 -4
- package/dist/types/model/types.js.map +1 -1
- package/dist/types/model/uid.d.cts +3 -1
- package/dist/types/model/uid.d.cts.map +1 -1
- package/dist/types/model/uid.d.ts +3 -1
- package/dist/types/model/uid.d.ts.map +1 -1
- package/dist/types/value/boolean.d.cts +2 -1
- package/dist/types/value/boolean.d.cts.map +1 -1
- package/dist/types/value/boolean.d.ts +2 -1
- package/dist/types/value/boolean.d.ts.map +1 -1
- package/dist/types/value/color.d.cts +3 -1
- package/dist/types/value/color.d.cts.map +1 -1
- package/dist/types/value/color.d.ts +3 -1
- package/dist/types/value/color.d.ts.map +1 -1
- package/dist/types/value/contentRelationship.d.cts +5 -3
- package/dist/types/value/contentRelationship.d.cts.map +1 -1
- package/dist/types/value/contentRelationship.d.ts +5 -3
- package/dist/types/value/contentRelationship.d.ts.map +1 -1
- package/dist/types/value/date.d.cts +3 -1
- package/dist/types/value/date.d.cts.map +1 -1
- package/dist/types/value/date.d.ts +3 -1
- package/dist/types/value/date.d.ts.map +1 -1
- package/dist/types/value/document.d.cts +7 -5
- package/dist/types/value/document.d.cts.map +1 -1
- package/dist/types/value/document.d.ts +7 -5
- package/dist/types/value/document.d.ts.map +1 -1
- package/dist/types/value/embed.cjs.map +1 -1
- package/dist/types/value/embed.d.cts +25 -43
- package/dist/types/value/embed.d.cts.map +1 -1
- package/dist/types/value/embed.d.ts +25 -43
- package/dist/types/value/embed.d.ts.map +1 -1
- package/dist/types/value/embed.js.map +1 -1
- package/dist/types/value/geoPoint.d.cts +3 -1
- package/dist/types/value/geoPoint.d.cts.map +1 -1
- package/dist/types/value/geoPoint.d.ts +3 -1
- package/dist/types/value/geoPoint.d.ts.map +1 -1
- package/dist/types/value/group.d.cts +4 -2
- package/dist/types/value/group.d.cts.map +1 -1
- package/dist/types/value/group.d.ts +4 -2
- package/dist/types/value/group.d.ts.map +1 -1
- package/dist/types/value/image.d.cts +6 -4
- package/dist/types/value/image.d.cts.map +1 -1
- package/dist/types/value/image.d.ts +6 -4
- package/dist/types/value/image.d.ts.map +1 -1
- package/dist/types/value/integration.d.cts +4 -2
- package/dist/types/value/integration.d.cts.map +1 -1
- package/dist/types/value/integration.d.ts +4 -2
- package/dist/types/value/integration.d.ts.map +1 -1
- package/dist/types/value/keyText.d.cts +3 -1
- package/dist/types/value/keyText.d.cts.map +1 -1
- package/dist/types/value/keyText.d.ts +3 -1
- package/dist/types/value/keyText.d.ts.map +1 -1
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.cts +8 -6
- package/dist/types/value/link.d.cts.map +1 -1
- package/dist/types/value/link.d.ts +8 -6
- package/dist/types/value/link.d.ts.map +1 -1
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/linkToMedia.d.cts +4 -2
- package/dist/types/value/linkToMedia.d.cts.map +1 -1
- package/dist/types/value/linkToMedia.d.ts +4 -2
- package/dist/types/value/linkToMedia.d.ts.map +1 -1
- package/dist/types/value/number.d.cts +3 -1
- package/dist/types/value/number.d.cts.map +1 -1
- package/dist/types/value/number.d.ts +3 -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 +31 -29
- package/dist/types/value/richText.d.cts.map +1 -1
- package/dist/types/value/richText.d.ts +31 -29
- 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 +3 -1
- package/dist/types/value/select.d.cts.map +1 -1
- package/dist/types/value/select.d.ts +3 -1
- package/dist/types/value/select.d.ts.map +1 -1
- package/dist/types/value/sharedSlice.d.cts +3 -1
- package/dist/types/value/sharedSlice.d.cts.map +1 -1
- package/dist/types/value/sharedSlice.d.ts +3 -1
- package/dist/types/value/sharedSlice.d.ts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.cts +3 -1
- package/dist/types/value/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.ts +3 -1
- package/dist/types/value/sharedSliceVariation.d.ts.map +1 -1
- package/dist/types/value/slice.d.cts +3 -1
- package/dist/types/value/slice.d.cts.map +1 -1
- package/dist/types/value/slice.d.ts +3 -1
- package/dist/types/value/slice.d.ts.map +1 -1
- package/dist/types/value/sliceZone.d.cts +3 -1
- package/dist/types/value/sliceZone.d.cts.map +1 -1
- package/dist/types/value/sliceZone.d.ts +3 -1
- package/dist/types/value/sliceZone.d.ts.map +1 -1
- package/dist/types/value/table.d.cts +16 -26
- package/dist/types/value/table.d.cts.map +1 -1
- package/dist/types/value/table.d.ts +16 -26
- package/dist/types/value/table.d.ts.map +1 -1
- package/dist/types/value/timestamp.d.cts +3 -1
- package/dist/types/value/timestamp.d.cts.map +1 -1
- package/dist/types/value/timestamp.d.ts +3 -1
- package/dist/types/value/timestamp.d.ts.map +1 -1
- package/dist/types/value/title.d.cts +3 -1
- package/dist/types/value/title.d.cts.map +1 -1
- package/dist/types/value/title.d.ts +3 -1
- package/dist/types/value/title.d.ts.map +1 -1
- package/dist/types/value/types.d.cts +8 -6
- package/dist/types/value/types.d.cts.map +1 -1
- package/dist/types/value/types.d.ts +8 -6
- package/dist/types/value/types.d.ts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.cts +3 -1
- package/dist/types/webhook/apiUpdate.d.cts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.ts +3 -1
- package/dist/types/webhook/apiUpdate.d.ts.map +1 -1
- package/dist/types/webhook/testTrigger.d.cts +3 -1
- package/dist/types/webhook/testTrigger.d.cts.map +1 -1
- package/dist/types/webhook/testTrigger.d.ts +3 -1
- package/dist/types/webhook/testTrigger.d.ts.map +1 -1
- package/dist/types/webhook/types.cjs.map +1 -1
- package/dist/types/webhook/types.d.cts +5 -3
- package/dist/types/webhook/types.d.cts.map +1 -1
- package/dist/types/webhook/types.d.ts +5 -3
- package/dist/types/webhook/types.d.ts.map +1 -1
- package/dist/types/webhook/types.js.map +1 -1
- package/package.json +9 -9
- package/src/WriteClient.ts +19 -14
- package/src/lib/resolveMigrationDocumentData.ts +1 -1
- package/src/types/api/migration/release.ts +5 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.d.ts","names":[],"sources":["../../../src/types/value/boolean.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"boolean.d.ts","names":[],"sources":["../../../src/types/value/boolean.ts"],"mappings":";;AAKA;;;;KAAY,YAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldState } from "./types.cjs";
|
|
2
|
+
|
|
2
3
|
//#region src/types/value/color.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* A color field.
|
|
@@ -6,6 +7,7 @@ import { FieldState } from "./types.cjs";
|
|
|
6
7
|
* @typeParam State - State of the field which determines its shape.
|
|
7
8
|
* @see More details: {@link https://prismic.io/docs/color}
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
type ColorField<State extends FieldState = FieldState> = State extends "empty" ? null : `#${string}`;
|
|
10
11
|
//#endregion
|
|
12
|
+
export { ColorField };
|
|
11
13
|
//# sourceMappingURL=color.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.cts","names":[],"sources":["../../../src/types/value/color.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"color.d.cts","names":[],"sources":["../../../src/types/value/color.ts"],"mappings":";;;;;AAQA;;;;KAAY,UAAA,eAAyB,UAAA,GAAa,UAAA,IAAc,KAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldState } from "./types.js";
|
|
2
|
+
|
|
2
3
|
//#region src/types/value/color.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* A color field.
|
|
@@ -6,6 +7,7 @@ import { FieldState } from "./types.js";
|
|
|
6
7
|
* @typeParam State - State of the field which determines its shape.
|
|
7
8
|
* @see More details: {@link https://prismic.io/docs/color}
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
type ColorField<State extends FieldState = FieldState> = State extends "empty" ? null : `#${string}`;
|
|
10
11
|
//#endregion
|
|
12
|
+
export { ColorField };
|
|
11
13
|
//# sourceMappingURL=color.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","names":[],"sources":["../../../src/types/value/color.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"color.d.ts","names":[],"sources":["../../../src/types/value/color.ts"],"mappings":";;;;;AAQA;;;;KAAY,UAAA,eAAyB,UAAA,GAAa,UAAA,IAAc,KAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GroupField } from "./group.cjs";
|
|
2
2
|
import { SliceZone } from "./sliceZone.cjs";
|
|
3
3
|
import { AnyRegularField, FieldState } from "./types.cjs";
|
|
4
|
+
|
|
4
5
|
//#region src/types/value/contentRelationship.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* Field for related documents
|
|
@@ -11,12 +12,12 @@ import { AnyRegularField, FieldState } from "./types.cjs";
|
|
|
11
12
|
* `fetchLinks`).
|
|
12
13
|
* @typeParam State - State of the field which determines its shape.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
type ContentRelationshipField<TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown, State extends FieldState = FieldState> = State extends "empty" ? EmptyContentRelationshipField : FilledContentRelationshipField<TypeEnum, LangEnum, DataInterface>;
|
|
16
|
+
type EmptyContentRelationshipField = {
|
|
16
17
|
link_type: "Any";
|
|
17
18
|
};
|
|
18
19
|
/** Links that refer to documents */
|
|
19
|
-
|
|
20
|
+
interface FilledContentRelationshipField<TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown> {
|
|
20
21
|
link_type: "Document";
|
|
21
22
|
id: string;
|
|
22
23
|
uid?: string;
|
|
@@ -29,4 +30,5 @@ export interface FilledContentRelationshipField<TypeEnum = string, LangEnum = st
|
|
|
29
30
|
data?: DataInterface;
|
|
30
31
|
}
|
|
31
32
|
//#endregion
|
|
33
|
+
export { ContentRelationshipField, EmptyContentRelationshipField, FilledContentRelationshipField };
|
|
32
34
|
//# sourceMappingURL=contentRelationship.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentRelationship.d.cts","names":[],"sources":["../../../src/types/value/contentRelationship.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"contentRelationship.d.cts","names":[],"sources":["../../../src/types/value/contentRelationship.ts"],"mappings":";;;;;;;AAaA;;;;;;;KAAY,wBAAA,6DAGW,MAAA,SAAe,eAAA,GAAkB,UAAA,GAAa,SAAA,qCAEtD,UAAA,GAAa,UAAA,IACxB,KAAA,mBACD,6BAAA,GACA,8BAAA,CAA+B,QAAA,EAAU,QAAA,EAAU,aAAA;AAAA,KAE1C,6BAAA;EACX,SAAA;AAAA;;UAIgB,8BAAA,6DAGM,MAAA,SAAe,eAAA,GAAkB,UAAA,GAAa,SAAA;EAGpE,SAAA;EACA,EAAA;EACA,GAAA;EACA,IAAA,EAAM,QAAA;EACN,IAAA;EACA,IAAA,EAAM,QAAA;EACN,GAAA;EACA,IAAA;EACA,QAAA;EACA,IAAA,GAAO,aAAA;AAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GroupField } from "./group.js";
|
|
2
2
|
import { SliceZone } from "./sliceZone.js";
|
|
3
3
|
import { AnyRegularField, FieldState } from "./types.js";
|
|
4
|
+
|
|
4
5
|
//#region src/types/value/contentRelationship.d.ts
|
|
5
6
|
/**
|
|
6
7
|
* Field for related documents
|
|
@@ -11,12 +12,12 @@ import { AnyRegularField, FieldState } from "./types.js";
|
|
|
11
12
|
* `fetchLinks`).
|
|
12
13
|
* @typeParam State - State of the field which determines its shape.
|
|
13
14
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
type ContentRelationshipField<TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown, State extends FieldState = FieldState> = State extends "empty" ? EmptyContentRelationshipField : FilledContentRelationshipField<TypeEnum, LangEnum, DataInterface>;
|
|
16
|
+
type EmptyContentRelationshipField = {
|
|
16
17
|
link_type: "Any";
|
|
17
18
|
};
|
|
18
19
|
/** Links that refer to documents */
|
|
19
|
-
|
|
20
|
+
interface FilledContentRelationshipField<TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown> {
|
|
20
21
|
link_type: "Document";
|
|
21
22
|
id: string;
|
|
22
23
|
uid?: string;
|
|
@@ -29,4 +30,5 @@ export interface FilledContentRelationshipField<TypeEnum = string, LangEnum = st
|
|
|
29
30
|
data?: DataInterface;
|
|
30
31
|
}
|
|
31
32
|
//#endregion
|
|
33
|
+
export { ContentRelationshipField, EmptyContentRelationshipField, FilledContentRelationshipField };
|
|
32
34
|
//# sourceMappingURL=contentRelationship.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentRelationship.d.ts","names":[],"sources":["../../../src/types/value/contentRelationship.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"contentRelationship.d.ts","names":[],"sources":["../../../src/types/value/contentRelationship.ts"],"mappings":";;;;;;;AAaA;;;;;;;KAAY,wBAAA,6DAGW,MAAA,SAAe,eAAA,GAAkB,UAAA,GAAa,SAAA,qCAEtD,UAAA,GAAa,UAAA,IACxB,KAAA,mBACD,6BAAA,GACA,8BAAA,CAA+B,QAAA,EAAU,QAAA,EAAU,aAAA;AAAA,KAE1C,6BAAA;EACX,SAAA;AAAA;;UAIgB,8BAAA,6DAGM,MAAA,SAAe,eAAA,GAAkB,UAAA,GAAa,SAAA;EAGpE,SAAA;EACA,EAAA;EACA,GAAA;EACA,IAAA,EAAM,QAAA;EACN,IAAA;EACA,IAAA,EAAM,QAAA;EACN,GAAA;EACA,IAAA;EACA,QAAA;EACA,IAAA,GAAO,aAAA;AAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldState } from "./types.cjs";
|
|
2
|
+
|
|
2
3
|
//#region src/types/value/date.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* A date field.
|
|
@@ -6,6 +7,7 @@ import { FieldState } from "./types.cjs";
|
|
|
6
7
|
* @typeParam State - State of the field which determines its shape.
|
|
7
8
|
* @see More details: {@link https://prismic.io/docs/date}
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
type DateField<State extends FieldState = FieldState> = State extends "empty" ? null : string;
|
|
10
11
|
//#endregion
|
|
12
|
+
export { DateField };
|
|
11
13
|
//# sourceMappingURL=date.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.cts","names":[],"sources":["../../../src/types/value/date.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"date.d.cts","names":[],"sources":["../../../src/types/value/date.ts"],"mappings":";;;;;AAQA;;;;KAAY,SAAA,eAAwB,UAAA,GAAa,UAAA,IAAc,KAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldState } from "./types.js";
|
|
2
|
+
|
|
2
3
|
//#region src/types/value/date.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* A date field.
|
|
@@ -6,6 +7,7 @@ import { FieldState } from "./types.js";
|
|
|
6
7
|
* @typeParam State - State of the field which determines its shape.
|
|
7
8
|
* @see More details: {@link https://prismic.io/docs/date}
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
type DateField<State extends FieldState = FieldState> = State extends "empty" ? null : string;
|
|
10
11
|
//#endregion
|
|
12
|
+
export { DateField };
|
|
11
13
|
//# sourceMappingURL=date.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","names":[],"sources":["../../../src/types/value/date.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"date.d.ts","names":[],"sources":["../../../src/types/value/date.ts"],"mappings":";;;;;AAQA;;;;KAAY,SAAA,eAAwB,UAAA,GAAa,UAAA,IAAc,KAAA"}
|
|
@@ -2,16 +2,17 @@ import { GroupField } from "./group.cjs";
|
|
|
2
2
|
import { SliceZone } from "./sliceZone.cjs";
|
|
3
3
|
import { TimestampField } from "./timestamp.cjs";
|
|
4
4
|
import { AnyRegularField } from "./types.cjs";
|
|
5
|
+
|
|
5
6
|
//#region src/types/value/document.d.ts
|
|
6
7
|
/** Document metadata for a translation of a Prismic document. */
|
|
7
|
-
|
|
8
|
+
interface AlternateLanguage<TypeEnum = string, LangEnum = string> {
|
|
8
9
|
id: string;
|
|
9
10
|
uid?: string;
|
|
10
11
|
type: TypeEnum;
|
|
11
12
|
lang: LangEnum;
|
|
12
13
|
}
|
|
13
14
|
/** Metadata for Prismic document */
|
|
14
|
-
|
|
15
|
+
interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
15
16
|
/**
|
|
16
17
|
* The unique identifier for the document. Guaranteed to be unique among all documents in the
|
|
17
18
|
* Prismic repository.
|
|
@@ -54,7 +55,7 @@ export interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
|
54
55
|
*
|
|
55
56
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
56
57
|
*/
|
|
57
|
-
|
|
58
|
+
interface PrismicDocument<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocumentHeader<TypeEnum, LangEnum> {
|
|
58
59
|
/** Data contained in the document. */
|
|
59
60
|
data: DataInterface;
|
|
60
61
|
}
|
|
@@ -64,7 +65,7 @@ export interface PrismicDocument<DataInterface extends Record<string, AnyRegular
|
|
|
64
65
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
65
66
|
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
66
67
|
*/
|
|
67
|
-
|
|
68
|
+
interface PrismicDocumentWithoutUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
68
69
|
/**
|
|
69
70
|
* This document does not have a UID field. This property will always be `null`.
|
|
70
71
|
*
|
|
@@ -79,7 +80,7 @@ export interface PrismicDocumentWithoutUID<DataInterface extends Record<string,
|
|
|
79
80
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
80
81
|
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
81
82
|
*/
|
|
82
|
-
|
|
83
|
+
interface PrismicDocumentWithUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
83
84
|
/**
|
|
84
85
|
* The unique identifier for the document. Guaranteed to be unique among all Prismic documents of
|
|
85
86
|
* the same type.
|
|
@@ -87,4 +88,5 @@ export interface PrismicDocumentWithUID<DataInterface extends Record<string, Any
|
|
|
87
88
|
uid: string;
|
|
88
89
|
}
|
|
89
90
|
//#endregion
|
|
91
|
+
export { AlternateLanguage, PrismicDocument, PrismicDocumentHeader, PrismicDocumentWithUID, PrismicDocumentWithoutUID };
|
|
90
92
|
//# sourceMappingURL=document.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.cts","names":[],"sources":["../../../src/types/value/document.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"document.d.cts","names":[],"sources":["../../../src/types/value/document.ts"],"mappings":";;;;;;;UAMiB,iBAAA;EAChB,EAAA;EACA,GAAA;EACA,IAAA,EAAM,QAAA;EACN,IAAA,EAAM,QAAA;AAAA;;UAIU,qBAAA;EANhB;;;;EAWA,EAAA;EATc;;AAIf;;EAUC,GAAA;EAIM;EAFN,GAAA;EAUuB;EARvB,IAAA,EAAM,QAAA;EAsBiC;EApBvC,IAAA;EAoBqB;EAlBrB,IAAA;EAkBsC;EAhBtC,sBAAA,EAAwB,cAAA;EApBiC;EAsBzD,qBAAA,EAAuB,cAAA;EAZvB;;;;;;;EAoBA,KAAA;EARA;EAUA,gBAAA;EAFA;EAIA,IAAA,EAAM,QAAA;EAAN;EAEA,mBAAA,EAAqB,iBAAA,CAAkB,QAAA,EAAU,QAAA;AAAA;;;;;;UAQjC,eAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,qBAAA,CAAsB,QAAA,EAAU,QAAA;EARV;EAU/B,IAAA,EAAM,aAAA;AAAA;;;;;;;UASU,yBAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,eAAA,CAAgB,aAAA,EAAe,QAAA,EAAU,QAAA;EAnBzC;;;;;;EA0BT,GAAA;AAAA;;;;;;;UASgB,sBAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,eAAA,CAAgB,aAAA,EAAe,QAAA,EAAU,QAAA;EAzC5C;;;AASP;EAqCC,GAAA;AAAA"}
|
|
@@ -2,16 +2,17 @@ import { GroupField } from "./group.js";
|
|
|
2
2
|
import { SliceZone } from "./sliceZone.js";
|
|
3
3
|
import { TimestampField } from "./timestamp.js";
|
|
4
4
|
import { AnyRegularField } from "./types.js";
|
|
5
|
+
|
|
5
6
|
//#region src/types/value/document.d.ts
|
|
6
7
|
/** Document metadata for a translation of a Prismic document. */
|
|
7
|
-
|
|
8
|
+
interface AlternateLanguage<TypeEnum = string, LangEnum = string> {
|
|
8
9
|
id: string;
|
|
9
10
|
uid?: string;
|
|
10
11
|
type: TypeEnum;
|
|
11
12
|
lang: LangEnum;
|
|
12
13
|
}
|
|
13
14
|
/** Metadata for Prismic document */
|
|
14
|
-
|
|
15
|
+
interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
15
16
|
/**
|
|
16
17
|
* The unique identifier for the document. Guaranteed to be unique among all documents in the
|
|
17
18
|
* Prismic repository.
|
|
@@ -54,7 +55,7 @@ export interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
|
54
55
|
*
|
|
55
56
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
56
57
|
*/
|
|
57
|
-
|
|
58
|
+
interface PrismicDocument<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocumentHeader<TypeEnum, LangEnum> {
|
|
58
59
|
/** Data contained in the document. */
|
|
59
60
|
data: DataInterface;
|
|
60
61
|
}
|
|
@@ -64,7 +65,7 @@ export interface PrismicDocument<DataInterface extends Record<string, AnyRegular
|
|
|
64
65
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
65
66
|
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
66
67
|
*/
|
|
67
|
-
|
|
68
|
+
interface PrismicDocumentWithoutUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
68
69
|
/**
|
|
69
70
|
* This document does not have a UID field. This property will always be `null`.
|
|
70
71
|
*
|
|
@@ -79,7 +80,7 @@ export interface PrismicDocumentWithoutUID<DataInterface extends Record<string,
|
|
|
79
80
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
80
81
|
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
81
82
|
*/
|
|
82
|
-
|
|
83
|
+
interface PrismicDocumentWithUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
83
84
|
/**
|
|
84
85
|
* The unique identifier for the document. Guaranteed to be unique among all Prismic documents of
|
|
85
86
|
* the same type.
|
|
@@ -87,4 +88,5 @@ export interface PrismicDocumentWithUID<DataInterface extends Record<string, Any
|
|
|
87
88
|
uid: string;
|
|
88
89
|
}
|
|
89
90
|
//#endregion
|
|
91
|
+
export { AlternateLanguage, PrismicDocument, PrismicDocumentHeader, PrismicDocumentWithUID, PrismicDocumentWithoutUID };
|
|
90
92
|
//# sourceMappingURL=document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","names":[],"sources":["../../../src/types/value/document.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"document.d.ts","names":[],"sources":["../../../src/types/value/document.ts"],"mappings":";;;;;;;UAMiB,iBAAA;EAChB,EAAA;EACA,GAAA;EACA,IAAA,EAAM,QAAA;EACN,IAAA,EAAM,QAAA;AAAA;;UAIU,qBAAA;EANhB;;;;EAWA,EAAA;EATc;;AAIf;;EAUC,GAAA;EAIM;EAFN,GAAA;EAUuB;EARvB,IAAA,EAAM,QAAA;EAsBiC;EApBvC,IAAA;EAoBqB;EAlBrB,IAAA;EAkBsC;EAhBtC,sBAAA,EAAwB,cAAA;EApBiC;EAsBzD,qBAAA,EAAuB,cAAA;EAZvB;;;;;;;EAoBA,KAAA;EARA;EAUA,gBAAA;EAFA;EAIA,IAAA,EAAM,QAAA;EAAN;EAEA,mBAAA,EAAqB,iBAAA,CAAkB,QAAA,EAAU,QAAA;AAAA;;;;;;UAQjC,eAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,qBAAA,CAAsB,QAAA,EAAU,QAAA;EARV;EAU/B,IAAA,EAAM,aAAA;AAAA;;;;;;;UASU,yBAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,eAAA,CAAgB,aAAA,EAAe,QAAA,EAAU,QAAA;EAnBzC;;;;;;EA0BT,GAAA;AAAA;;;;;;;UASgB,sBAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,eAAA,CAAgB,aAAA,EAAe,QAAA,EAAU,QAAA;EAzC5C;;;AASP;EAqCC,GAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embed.cjs","names":[],"sources":["../../../src/types/value/embed.ts"],"sourcesContent":["import type { EmptyObjectField, FieldState } from \"./types\"\n\n/**\n * OEmbed 1.0 possible types.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport const OEmbedType = {\n\tPhoto: \"photo\",\n\tVideo: \"video\",\n\tLink: \"link\",\n\tRich: \"rich\",\n} as const\n\n/**\n * OEmbed response base fields. Those are every mandatory fields an oEmbed response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\ntype OEmbedBase<TType extends (typeof OEmbedType)[keyof typeof OEmbedType]> = {\n\t/** OEmbed resource type. */\n\ttype: TType\n\n\t/** OEmbed version number, this must be \"1.0\". */\n\tversion: string\n}\n\n/**\n * OEmbed response extra fields. Those are every non-mandatory and unknown fields an oEmbed response\n * can feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type OEmbedExtra = {\n\t/** OEmbed text title, describing the resource. */\n\ttitle?: string | null\n\n\t/** OEmbed resource author/owner name. */\n\tauthor_name?: string | null\n\n\t/** OEmbed resource author/owner URL. */\n\tauthor_url?: string | null\n\n\t/** OEmbed resource provider name. */\n\tprovider_name?: string | null\n\n\t/** OEmbed resource provider URL. */\n\tprovider_url?: string | null\n\n\t/** OEmbed suggested cache lifetime for the resource, in seconds. */\n\tcache_age?: number | null\n\n\t/** OEmbed resource thumbnail URL. */\n\tthumbnail_url?: string | null\n\n\t/** OEmbed resource thumbnail width. */\n\tthumbnail_width?: number | null\n\n\t/** OEmbed resource thumbnail height. */\n\tthumbnail_height?: number | null\n\n\t/**\n\t * Providers may optionally include any parameters not specified in this document (so long as they\n\t * use the same key-value format) and consumers may choose to ignore these. Consumers must ignore\n\t * parameters they do not understand.\n\t *\n\t * @see oEmbed specification: {@link https://oembed.com}\n\t */\n\t[key: string]: unknown | null\n}\n\n/**\n * OEmbed photo type. Those are every mandatory fields an oEmbed photo response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type PhotoOEmbed = OEmbedBase<typeof OEmbedType.Photo> & {\n\t/** OEmbed source URL of the image. */\n\turl: string\n\n\t/** OEmbed width in pixels of the image. */\n\twidth: number\n\n\t/** OEmbed height in pixels of the image. */\n\theight: number\n}\n\n/**\n * OEmbed video type. Those are every mandatory fields an oEmbed video response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type VideoOEmbed = OEmbedBase<typeof OEmbedType.Video> & {\n\t/** OEmbed HTML required to embed a video player. */\n\thtml: string\n\n\t/** OEmbed width in pixels required to display the HTML. */\n\twidth: number\n\n\t/** OEmbed height in pixels required to display the HTML. */\n\theight: number\n}\n\n/**\n * OEmbed link type. Those are every mandatory fields an oEmbed link response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type LinkOEmbed = OEmbedBase<typeof OEmbedType.Link>\n\n/**\n * OEmbed rich type. Those are every mandatory fields an oEmbed rich response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type RichOEmbed = OEmbedBase<typeof OEmbedType.Rich> & {\n\t/** OEmbed HTML required to display the resource. */\n\thtml: string\n\n\t/** OEmbed width in pixels required to display the HTML. */\n\twidth: number\n\n\t/** OEmbed height in pixels required to display the HTML. */\n\theight: number\n}\n\n/**\n * Any of the possible types of oEmbed response. Those contains only mandatory fields their\n * respective oEmbed response type must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type AnyOEmbed = PhotoOEmbed | VideoOEmbed | LinkOEmbed | RichOEmbed\n\n/**\n * An embed field.\n *\n * @typeParam Data - Data provided by the URL's oEmbed provider.\n * @typeParam State - State of the field which determines its shape.\n * @see More details: {@link https://prismic.io/docs/embed}\n */\nexport type EmbedField<\n\tData extends AnyOEmbed = AnyOEmbed & OEmbedExtra,\n\tState extends FieldState = FieldState,\n> = State extends \"empty\"\n\t? EmptyObjectField\n\t: Data & {\n\t\t\tembed_url: string\n\t\t\thtml: string | null\n\t\t}\n"],"mappings":";;;;;;AAOA,MAAa,aAAa;CACzB,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;
|
|
1
|
+
{"version":3,"file":"embed.cjs","names":[],"sources":["../../../src/types/value/embed.ts"],"sourcesContent":["import type { EmptyObjectField, FieldState } from \"./types\"\n\n/**\n * OEmbed 1.0 possible types.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport const OEmbedType = {\n\tPhoto: \"photo\",\n\tVideo: \"video\",\n\tLink: \"link\",\n\tRich: \"rich\",\n} as const\n\n/**\n * OEmbed response base fields. Those are every mandatory fields an oEmbed response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\ntype OEmbedBase<TType extends (typeof OEmbedType)[keyof typeof OEmbedType]> = {\n\t/** OEmbed resource type. */\n\ttype: TType\n\n\t/** OEmbed version number, this must be \"1.0\". */\n\tversion: string\n}\n\n/**\n * OEmbed response extra fields. Those are every non-mandatory and unknown fields an oEmbed response\n * can feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type OEmbedExtra = {\n\t/** OEmbed text title, describing the resource. */\n\ttitle?: string | null\n\n\t/** OEmbed resource author/owner name. */\n\tauthor_name?: string | null\n\n\t/** OEmbed resource author/owner URL. */\n\tauthor_url?: string | null\n\n\t/** OEmbed resource provider name. */\n\tprovider_name?: string | null\n\n\t/** OEmbed resource provider URL. */\n\tprovider_url?: string | null\n\n\t/** OEmbed suggested cache lifetime for the resource, in seconds. */\n\tcache_age?: number | null\n\n\t/** OEmbed resource thumbnail URL. */\n\tthumbnail_url?: string | null\n\n\t/** OEmbed resource thumbnail width. */\n\tthumbnail_width?: number | null\n\n\t/** OEmbed resource thumbnail height. */\n\tthumbnail_height?: number | null\n\n\t/**\n\t * Providers may optionally include any parameters not specified in this document (so long as they\n\t * use the same key-value format) and consumers may choose to ignore these. Consumers must ignore\n\t * parameters they do not understand.\n\t *\n\t * @see oEmbed specification: {@link https://oembed.com}\n\t */\n\t[key: string]: unknown | null\n}\n\n/**\n * OEmbed photo type. Those are every mandatory fields an oEmbed photo response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type PhotoOEmbed = OEmbedBase<typeof OEmbedType.Photo> & {\n\t/** OEmbed source URL of the image. */\n\turl: string\n\n\t/** OEmbed width in pixels of the image. */\n\twidth: number\n\n\t/** OEmbed height in pixels of the image. */\n\theight: number\n}\n\n/**\n * OEmbed video type. Those are every mandatory fields an oEmbed video response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type VideoOEmbed = OEmbedBase<typeof OEmbedType.Video> & {\n\t/** OEmbed HTML required to embed a video player. */\n\thtml: string\n\n\t/** OEmbed width in pixels required to display the HTML. */\n\twidth: number\n\n\t/** OEmbed height in pixels required to display the HTML. */\n\theight: number\n}\n\n/**\n * OEmbed link type. Those are every mandatory fields an oEmbed link response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type LinkOEmbed = OEmbedBase<typeof OEmbedType.Link>\n\n/**\n * OEmbed rich type. Those are every mandatory fields an oEmbed rich response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type RichOEmbed = OEmbedBase<typeof OEmbedType.Rich> & {\n\t/** OEmbed HTML required to display the resource. */\n\thtml: string\n\n\t/** OEmbed width in pixels required to display the HTML. */\n\twidth: number\n\n\t/** OEmbed height in pixels required to display the HTML. */\n\theight: number\n}\n\n/**\n * Any of the possible types of oEmbed response. Those contains only mandatory fields their\n * respective oEmbed response type must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type AnyOEmbed = PhotoOEmbed | VideoOEmbed | LinkOEmbed | RichOEmbed\n\n/**\n * An embed field.\n *\n * @typeParam Data - Data provided by the URL's oEmbed provider.\n * @typeParam State - State of the field which determines its shape.\n * @see More details: {@link https://prismic.io/docs/embed}\n */\nexport type EmbedField<\n\tData extends AnyOEmbed = AnyOEmbed & OEmbedExtra,\n\tState extends FieldState = FieldState,\n> = State extends \"empty\"\n\t? EmptyObjectField\n\t: Data & {\n\t\t\tembed_url: string\n\t\t\thtml: string | null\n\t\t}\n"],"mappings":";;;;;;AAOA,MAAa,aAAa;CACzB,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { EmptyObjectField, FieldState } from "./types.cjs";
|
|
2
|
+
|
|
2
3
|
//#region src/types/value/embed.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* OEmbed 1.0 possible types.
|
|
5
6
|
*
|
|
6
7
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
declare const OEmbedType: {
|
|
9
10
|
readonly Photo: "photo";
|
|
10
11
|
readonly Video: "video";
|
|
11
12
|
readonly Link: "link";
|
|
@@ -17,9 +18,7 @@ export declare const OEmbedType: {
|
|
|
17
18
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
18
19
|
*/
|
|
19
20
|
type OEmbedBase<TType extends (typeof OEmbedType)[keyof typeof OEmbedType]> = {
|
|
20
|
-
/** OEmbed resource type. */
|
|
21
|
-
type: TType;
|
|
22
|
-
/** OEmbed version number, this must be "1.0". */
|
|
21
|
+
/** OEmbed resource type. */type: TType; /** OEmbed version number, this must be "1.0". */
|
|
23
22
|
version: string;
|
|
24
23
|
};
|
|
25
24
|
/**
|
|
@@ -28,24 +27,15 @@ type OEmbedBase<TType extends (typeof OEmbedType)[keyof typeof OEmbedType]> = {
|
|
|
28
27
|
*
|
|
29
28
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
30
29
|
*/
|
|
31
|
-
|
|
32
|
-
/** OEmbed text title, describing the resource. */
|
|
33
|
-
|
|
34
|
-
/** OEmbed resource
|
|
35
|
-
|
|
36
|
-
/** OEmbed resource
|
|
37
|
-
|
|
38
|
-
/** OEmbed resource
|
|
39
|
-
|
|
40
|
-
/** OEmbed resource provider URL. */
|
|
41
|
-
provider_url?: string | null;
|
|
42
|
-
/** OEmbed suggested cache lifetime for the resource, in seconds. */
|
|
43
|
-
cache_age?: number | null;
|
|
44
|
-
/** OEmbed resource thumbnail URL. */
|
|
45
|
-
thumbnail_url?: string | null;
|
|
46
|
-
/** OEmbed resource thumbnail width. */
|
|
47
|
-
thumbnail_width?: number | null;
|
|
48
|
-
/** OEmbed resource thumbnail height. */
|
|
30
|
+
type OEmbedExtra = {
|
|
31
|
+
/** OEmbed text title, describing the resource. */title?: string | null; /** OEmbed resource author/owner name. */
|
|
32
|
+
author_name?: string | null; /** OEmbed resource author/owner URL. */
|
|
33
|
+
author_url?: string | null; /** OEmbed resource provider name. */
|
|
34
|
+
provider_name?: string | null; /** OEmbed resource provider URL. */
|
|
35
|
+
provider_url?: string | null; /** OEmbed suggested cache lifetime for the resource, in seconds. */
|
|
36
|
+
cache_age?: number | null; /** OEmbed resource thumbnail URL. */
|
|
37
|
+
thumbnail_url?: string | null; /** OEmbed resource thumbnail width. */
|
|
38
|
+
thumbnail_width?: number | null; /** OEmbed resource thumbnail height. */
|
|
49
39
|
thumbnail_height?: number | null;
|
|
50
40
|
/**
|
|
51
41
|
* Providers may optionally include any parameters not specified in this document (so long as they
|
|
@@ -61,12 +51,9 @@ export type OEmbedExtra = {
|
|
|
61
51
|
*
|
|
62
52
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
63
53
|
*/
|
|
64
|
-
|
|
65
|
-
/** OEmbed source URL of the image. */
|
|
66
|
-
|
|
67
|
-
/** OEmbed width in pixels of the image. */
|
|
68
|
-
width: number;
|
|
69
|
-
/** OEmbed height in pixels of the image. */
|
|
54
|
+
type PhotoOEmbed = OEmbedBase<typeof OEmbedType.Photo> & {
|
|
55
|
+
/** OEmbed source URL of the image. */url: string; /** OEmbed width in pixels of the image. */
|
|
56
|
+
width: number; /** OEmbed height in pixels of the image. */
|
|
70
57
|
height: number;
|
|
71
58
|
};
|
|
72
59
|
/**
|
|
@@ -74,12 +61,9 @@ export type PhotoOEmbed = OEmbedBase<typeof OEmbedType.Photo> & {
|
|
|
74
61
|
*
|
|
75
62
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
76
63
|
*/
|
|
77
|
-
|
|
78
|
-
/** OEmbed HTML required to embed a video player. */
|
|
79
|
-
|
|
80
|
-
/** OEmbed width in pixels required to display the HTML. */
|
|
81
|
-
width: number;
|
|
82
|
-
/** OEmbed height in pixels required to display the HTML. */
|
|
64
|
+
type VideoOEmbed = OEmbedBase<typeof OEmbedType.Video> & {
|
|
65
|
+
/** OEmbed HTML required to embed a video player. */html: string; /** OEmbed width in pixels required to display the HTML. */
|
|
66
|
+
width: number; /** OEmbed height in pixels required to display the HTML. */
|
|
83
67
|
height: number;
|
|
84
68
|
};
|
|
85
69
|
/**
|
|
@@ -87,18 +71,15 @@ export type VideoOEmbed = OEmbedBase<typeof OEmbedType.Video> & {
|
|
|
87
71
|
*
|
|
88
72
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
89
73
|
*/
|
|
90
|
-
|
|
74
|
+
type LinkOEmbed = OEmbedBase<typeof OEmbedType.Link>;
|
|
91
75
|
/**
|
|
92
76
|
* OEmbed rich type. Those are every mandatory fields an oEmbed rich response must feature.
|
|
93
77
|
*
|
|
94
78
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
95
79
|
*/
|
|
96
|
-
|
|
97
|
-
/** OEmbed HTML required to display the resource. */
|
|
98
|
-
|
|
99
|
-
/** OEmbed width in pixels required to display the HTML. */
|
|
100
|
-
width: number;
|
|
101
|
-
/** OEmbed height in pixels required to display the HTML. */
|
|
80
|
+
type RichOEmbed = OEmbedBase<typeof OEmbedType.Rich> & {
|
|
81
|
+
/** OEmbed HTML required to display the resource. */html: string; /** OEmbed width in pixels required to display the HTML. */
|
|
82
|
+
width: number; /** OEmbed height in pixels required to display the HTML. */
|
|
102
83
|
height: number;
|
|
103
84
|
};
|
|
104
85
|
/**
|
|
@@ -107,7 +88,7 @@ export type RichOEmbed = OEmbedBase<typeof OEmbedType.Rich> & {
|
|
|
107
88
|
*
|
|
108
89
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
109
90
|
*/
|
|
110
|
-
|
|
91
|
+
type AnyOEmbed = PhotoOEmbed | VideoOEmbed | LinkOEmbed | RichOEmbed;
|
|
111
92
|
/**
|
|
112
93
|
* An embed field.
|
|
113
94
|
*
|
|
@@ -115,9 +96,10 @@ export type AnyOEmbed = PhotoOEmbed | VideoOEmbed | LinkOEmbed | RichOEmbed;
|
|
|
115
96
|
* @typeParam State - State of the field which determines its shape.
|
|
116
97
|
* @see More details: {@link https://prismic.io/docs/embed}
|
|
117
98
|
*/
|
|
118
|
-
|
|
99
|
+
type EmbedField<Data extends AnyOEmbed = AnyOEmbed & OEmbedExtra, State extends FieldState = FieldState> = State extends "empty" ? EmptyObjectField : Data & {
|
|
119
100
|
embed_url: string;
|
|
120
101
|
html: string | null;
|
|
121
102
|
};
|
|
122
103
|
//#endregion
|
|
104
|
+
export { AnyOEmbed, EmbedField, LinkOEmbed, OEmbedExtra, OEmbedType, PhotoOEmbed, RichOEmbed, VideoOEmbed };
|
|
123
105
|
//# sourceMappingURL=embed.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embed.d.cts","names":[],"sources":["../../../src/types/value/embed.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"embed.d.cts","names":[],"sources":["../../../src/types/value/embed.ts"],"mappings":";;;;;AAOA;;;cAAa,UAAA;EAAA;;;;;;AAKH;;;;KAOL,UAAA,uBAAiC,UAAA,eAAyB,UAAA;EAExD,4BAAN,IAAA,EAAM,KAAA,EAAK;EAGX,OAAA;AAAA;;;;;;;KASW,WAAA;EAAW,kDAEtB,KAAA,kBAFsB;EAKtB,WAAA;EAGA,UAAA,kBAGA;EAAA,aAAA,kBAMA;EAHA,YAAA,kBASA;EANA,SAAA,kBAkBC;EAfD,aAAA,kBAeY;EAZZ,eAAA,kBAoBsB;EAjBtB,gBAAA;EAiBmC;;;;;;;EAAA,CARlC,GAAA;AAAA;AAwBF;;;;;AAAA,KAhBY,WAAA,GAAc,UAAA,QAAkB,UAAA,CAAW,KAAA;EAgBA,sCAdtD,GAAA,UAmBA;EAhBA,KAAA,UAmBM;EAhBN,MAAA;AAAA;;;;;;KAQW,WAAA,GAAc,UAAA,QAAkB,UAAA,CAAW,KAAA;EAgBG,oDAdzD,IAAA,UAqBW;EAlBX,KAAA;EAGA,MAAA;AAAA;;;;;;KAQW,UAAA,GAAa,UAAA,QAAkB,UAAA,CAAW,IAAA;;AAwBtD;;;;KAjBY,UAAA,GAAa,UAAA,QAAkB,UAAA,CAAW,IAAA;EAiBF,oDAfnD,IAAA,UAe0E;EAZ1E,KAAA,UAYuB;EATvB,MAAA;AAAA;;;;AAkBD;;;KATY,SAAA,GAAY,WAAA,GAAc,WAAA,GAAc,UAAA,GAAa,UAAA;;;;;;;;KASrD,UAAA,cACE,SAAA,GAAY,SAAA,GAAY,WAAA,gBACvB,UAAA,GAAa,UAAA,IACxB,KAAA,mBACD,gBAAA,GACA,IAAA;EACA,SAAA;EACA,IAAA;AAAA"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { EmptyObjectField, FieldState } from "./types.js";
|
|
2
|
+
|
|
2
3
|
//#region src/types/value/embed.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* OEmbed 1.0 possible types.
|
|
5
6
|
*
|
|
6
7
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
declare const OEmbedType: {
|
|
9
10
|
readonly Photo: "photo";
|
|
10
11
|
readonly Video: "video";
|
|
11
12
|
readonly Link: "link";
|
|
@@ -17,9 +18,7 @@ export declare const OEmbedType: {
|
|
|
17
18
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
18
19
|
*/
|
|
19
20
|
type OEmbedBase<TType extends (typeof OEmbedType)[keyof typeof OEmbedType]> = {
|
|
20
|
-
/** OEmbed resource type. */
|
|
21
|
-
type: TType;
|
|
22
|
-
/** OEmbed version number, this must be "1.0". */
|
|
21
|
+
/** OEmbed resource type. */type: TType; /** OEmbed version number, this must be "1.0". */
|
|
23
22
|
version: string;
|
|
24
23
|
};
|
|
25
24
|
/**
|
|
@@ -28,24 +27,15 @@ type OEmbedBase<TType extends (typeof OEmbedType)[keyof typeof OEmbedType]> = {
|
|
|
28
27
|
*
|
|
29
28
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
30
29
|
*/
|
|
31
|
-
|
|
32
|
-
/** OEmbed text title, describing the resource. */
|
|
33
|
-
|
|
34
|
-
/** OEmbed resource
|
|
35
|
-
|
|
36
|
-
/** OEmbed resource
|
|
37
|
-
|
|
38
|
-
/** OEmbed resource
|
|
39
|
-
|
|
40
|
-
/** OEmbed resource provider URL. */
|
|
41
|
-
provider_url?: string | null;
|
|
42
|
-
/** OEmbed suggested cache lifetime for the resource, in seconds. */
|
|
43
|
-
cache_age?: number | null;
|
|
44
|
-
/** OEmbed resource thumbnail URL. */
|
|
45
|
-
thumbnail_url?: string | null;
|
|
46
|
-
/** OEmbed resource thumbnail width. */
|
|
47
|
-
thumbnail_width?: number | null;
|
|
48
|
-
/** OEmbed resource thumbnail height. */
|
|
30
|
+
type OEmbedExtra = {
|
|
31
|
+
/** OEmbed text title, describing the resource. */title?: string | null; /** OEmbed resource author/owner name. */
|
|
32
|
+
author_name?: string | null; /** OEmbed resource author/owner URL. */
|
|
33
|
+
author_url?: string | null; /** OEmbed resource provider name. */
|
|
34
|
+
provider_name?: string | null; /** OEmbed resource provider URL. */
|
|
35
|
+
provider_url?: string | null; /** OEmbed suggested cache lifetime for the resource, in seconds. */
|
|
36
|
+
cache_age?: number | null; /** OEmbed resource thumbnail URL. */
|
|
37
|
+
thumbnail_url?: string | null; /** OEmbed resource thumbnail width. */
|
|
38
|
+
thumbnail_width?: number | null; /** OEmbed resource thumbnail height. */
|
|
49
39
|
thumbnail_height?: number | null;
|
|
50
40
|
/**
|
|
51
41
|
* Providers may optionally include any parameters not specified in this document (so long as they
|
|
@@ -61,12 +51,9 @@ export type OEmbedExtra = {
|
|
|
61
51
|
*
|
|
62
52
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
63
53
|
*/
|
|
64
|
-
|
|
65
|
-
/** OEmbed source URL of the image. */
|
|
66
|
-
|
|
67
|
-
/** OEmbed width in pixels of the image. */
|
|
68
|
-
width: number;
|
|
69
|
-
/** OEmbed height in pixels of the image. */
|
|
54
|
+
type PhotoOEmbed = OEmbedBase<typeof OEmbedType.Photo> & {
|
|
55
|
+
/** OEmbed source URL of the image. */url: string; /** OEmbed width in pixels of the image. */
|
|
56
|
+
width: number; /** OEmbed height in pixels of the image. */
|
|
70
57
|
height: number;
|
|
71
58
|
};
|
|
72
59
|
/**
|
|
@@ -74,12 +61,9 @@ export type PhotoOEmbed = OEmbedBase<typeof OEmbedType.Photo> & {
|
|
|
74
61
|
*
|
|
75
62
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
76
63
|
*/
|
|
77
|
-
|
|
78
|
-
/** OEmbed HTML required to embed a video player. */
|
|
79
|
-
|
|
80
|
-
/** OEmbed width in pixels required to display the HTML. */
|
|
81
|
-
width: number;
|
|
82
|
-
/** OEmbed height in pixels required to display the HTML. */
|
|
64
|
+
type VideoOEmbed = OEmbedBase<typeof OEmbedType.Video> & {
|
|
65
|
+
/** OEmbed HTML required to embed a video player. */html: string; /** OEmbed width in pixels required to display the HTML. */
|
|
66
|
+
width: number; /** OEmbed height in pixels required to display the HTML. */
|
|
83
67
|
height: number;
|
|
84
68
|
};
|
|
85
69
|
/**
|
|
@@ -87,18 +71,15 @@ export type VideoOEmbed = OEmbedBase<typeof OEmbedType.Video> & {
|
|
|
87
71
|
*
|
|
88
72
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
89
73
|
*/
|
|
90
|
-
|
|
74
|
+
type LinkOEmbed = OEmbedBase<typeof OEmbedType.Link>;
|
|
91
75
|
/**
|
|
92
76
|
* OEmbed rich type. Those are every mandatory fields an oEmbed rich response must feature.
|
|
93
77
|
*
|
|
94
78
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
95
79
|
*/
|
|
96
|
-
|
|
97
|
-
/** OEmbed HTML required to display the resource. */
|
|
98
|
-
|
|
99
|
-
/** OEmbed width in pixels required to display the HTML. */
|
|
100
|
-
width: number;
|
|
101
|
-
/** OEmbed height in pixels required to display the HTML. */
|
|
80
|
+
type RichOEmbed = OEmbedBase<typeof OEmbedType.Rich> & {
|
|
81
|
+
/** OEmbed HTML required to display the resource. */html: string; /** OEmbed width in pixels required to display the HTML. */
|
|
82
|
+
width: number; /** OEmbed height in pixels required to display the HTML. */
|
|
102
83
|
height: number;
|
|
103
84
|
};
|
|
104
85
|
/**
|
|
@@ -107,7 +88,7 @@ export type RichOEmbed = OEmbedBase<typeof OEmbedType.Rich> & {
|
|
|
107
88
|
*
|
|
108
89
|
* @see oEmbed specification: {@link https://oembed.com}
|
|
109
90
|
*/
|
|
110
|
-
|
|
91
|
+
type AnyOEmbed = PhotoOEmbed | VideoOEmbed | LinkOEmbed | RichOEmbed;
|
|
111
92
|
/**
|
|
112
93
|
* An embed field.
|
|
113
94
|
*
|
|
@@ -115,9 +96,10 @@ export type AnyOEmbed = PhotoOEmbed | VideoOEmbed | LinkOEmbed | RichOEmbed;
|
|
|
115
96
|
* @typeParam State - State of the field which determines its shape.
|
|
116
97
|
* @see More details: {@link https://prismic.io/docs/embed}
|
|
117
98
|
*/
|
|
118
|
-
|
|
99
|
+
type EmbedField<Data extends AnyOEmbed = AnyOEmbed & OEmbedExtra, State extends FieldState = FieldState> = State extends "empty" ? EmptyObjectField : Data & {
|
|
119
100
|
embed_url: string;
|
|
120
101
|
html: string | null;
|
|
121
102
|
};
|
|
122
103
|
//#endregion
|
|
104
|
+
export { AnyOEmbed, EmbedField, LinkOEmbed, OEmbedExtra, OEmbedType, PhotoOEmbed, RichOEmbed, VideoOEmbed };
|
|
123
105
|
//# sourceMappingURL=embed.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embed.d.ts","names":[],"sources":["../../../src/types/value/embed.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"embed.d.ts","names":[],"sources":["../../../src/types/value/embed.ts"],"mappings":";;;;;AAOA;;;cAAa,UAAA;EAAA;;;;;;AAKH;;;;KAOL,UAAA,uBAAiC,UAAA,eAAyB,UAAA;EAExD,4BAAN,IAAA,EAAM,KAAA,EAAK;EAGX,OAAA;AAAA;;;;;;;KASW,WAAA;EAAW,kDAEtB,KAAA,kBAFsB;EAKtB,WAAA;EAGA,UAAA,kBAGA;EAAA,aAAA,kBAMA;EAHA,YAAA,kBASA;EANA,SAAA,kBAkBC;EAfD,aAAA,kBAeY;EAZZ,eAAA,kBAoBsB;EAjBtB,gBAAA;EAiBmC;;;;;;;EAAA,CARlC,GAAA;AAAA;AAwBF;;;;;AAAA,KAhBY,WAAA,GAAc,UAAA,QAAkB,UAAA,CAAW,KAAA;EAgBA,sCAdtD,GAAA,UAmBA;EAhBA,KAAA,UAmBM;EAhBN,MAAA;AAAA;;;;;;KAQW,WAAA,GAAc,UAAA,QAAkB,UAAA,CAAW,KAAA;EAgBG,oDAdzD,IAAA,UAqBW;EAlBX,KAAA;EAGA,MAAA;AAAA;;;;;;KAQW,UAAA,GAAa,UAAA,QAAkB,UAAA,CAAW,IAAA;;AAwBtD;;;;KAjBY,UAAA,GAAa,UAAA,QAAkB,UAAA,CAAW,IAAA;EAiBF,oDAfnD,IAAA,UAe0E;EAZ1E,KAAA,UAYuB;EATvB,MAAA;AAAA;;;;AAkBD;;;KATY,SAAA,GAAY,WAAA,GAAc,WAAA,GAAc,UAAA,GAAa,UAAA;;;;;;;;KASrD,UAAA,cACE,SAAA,GAAY,SAAA,GAAY,WAAA,gBACvB,UAAA,GAAa,UAAA,IACxB,KAAA,mBACD,gBAAA,GACA,IAAA;EACA,SAAA;EACA,IAAA;AAAA"}
|