@prismicio/client 7.21.7-pr.444.5136044 → 7.21.7
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 +263 -190
- package/dist/Client.cjs.map +1 -1
- package/dist/Client.d.cts +241 -175
- package/dist/Client.d.cts.map +1 -1
- package/dist/Client.d.ts +241 -175
- package/dist/Client.d.ts.map +1 -1
- package/dist/Client.js +263 -190
- package/dist/Client.js.map +1 -1
- package/dist/Migration.cjs +86 -54
- package/dist/Migration.cjs.map +1 -1
- package/dist/Migration.d.cts +84 -50
- package/dist/Migration.d.cts.map +1 -1
- package/dist/Migration.d.ts +84 -50
- package/dist/Migration.d.ts.map +1 -1
- package/dist/Migration.js +86 -54
- package/dist/Migration.js.map +1 -1
- package/dist/WriteClient.cjs +77 -39
- package/dist/WriteClient.cjs.map +1 -1
- package/dist/WriteClient.d.cts +63 -24
- package/dist/WriteClient.d.cts.map +1 -1
- package/dist/WriteClient.d.ts +63 -24
- package/dist/WriteClient.d.ts.map +1 -1
- package/dist/WriteClient.js +77 -39
- package/dist/WriteClient.js.map +1 -1
- package/dist/buildQueryURL.cjs +22 -15
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.cts +63 -53
- package/dist/buildQueryURL.d.cts.map +1 -1
- package/dist/buildQueryURL.d.ts +63 -53
- package/dist/buildQueryURL.d.ts.map +1 -1
- package/dist/buildQueryURL.js +22 -15
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.cjs +4 -1
- package/dist/cookie.cjs.map +1 -1
- package/dist/cookie.d.cts +4 -1
- package/dist/cookie.d.cts.map +1 -1
- package/dist/cookie.d.ts +4 -1
- package/dist/cookie.d.ts.map +1 -1
- package/dist/cookie.js +4 -1
- package/dist/cookie.js.map +1 -1
- package/dist/createClient.cjs +14 -10
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.cts +18 -11
- package/dist/createClient.d.cts.map +1 -1
- package/dist/createClient.d.ts +18 -11
- package/dist/createClient.d.ts.map +1 -1
- package/dist/createClient.js +14 -10
- package/dist/createClient.js.map +1 -1
- package/dist/createMigration.cjs +7 -4
- package/dist/createMigration.cjs.map +1 -1
- package/dist/createMigration.d.cts +11 -5
- package/dist/createMigration.d.cts.map +1 -1
- package/dist/createMigration.d.ts +11 -5
- package/dist/createMigration.d.ts.map +1 -1
- package/dist/createMigration.js +7 -4
- package/dist/createMigration.js.map +1 -1
- package/dist/createWriteClient.cjs +13 -8
- package/dist/createWriteClient.cjs.map +1 -1
- package/dist/createWriteClient.d.cts +15 -10
- package/dist/createWriteClient.d.cts.map +1 -1
- package/dist/createWriteClient.d.ts +15 -10
- package/dist/createWriteClient.d.ts.map +1 -1
- package/dist/createWriteClient.js +13 -8
- 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 +18 -5
- package/dist/filter.cjs.map +1 -1
- package/dist/filter.d.cts +63 -59
- package/dist/filter.d.cts.map +1 -1
- package/dist/filter.d.ts +63 -59
- package/dist/filter.d.ts.map +1 -1
- package/dist/filter.js +18 -5
- package/dist/filter.js.map +1 -1
- package/dist/getGraphQLEndpoint.cjs +2 -0
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.d.cts +2 -0
- package/dist/getGraphQLEndpoint.d.cts.map +1 -1
- package/dist/getGraphQLEndpoint.d.ts +2 -0
- package/dist/getGraphQLEndpoint.d.ts.map +1 -1
- package/dist/getGraphQLEndpoint.js +2 -0
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs +8 -4
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.d.cts +8 -4
- package/dist/getRepositoryEndpoint.d.cts.map +1 -1
- package/dist/getRepositoryEndpoint.d.ts +8 -4
- package/dist/getRepositoryEndpoint.d.ts.map +1 -1
- package/dist/getRepositoryEndpoint.js +8 -4
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs +5 -2
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.d.cts +5 -2
- package/dist/getRepositoryName.d.cts.map +1 -1
- package/dist/getRepositoryName.d.ts +5 -2
- package/dist/getRepositoryName.d.ts.map +1 -1
- package/dist/getRepositoryName.js +5 -2
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs +19 -17
- package/dist/getToolbarSrc.cjs.map +1 -1
- package/dist/getToolbarSrc.d.cts +19 -17
- package/dist/getToolbarSrc.d.cts.map +1 -1
- package/dist/getToolbarSrc.d.ts +19 -17
- package/dist/getToolbarSrc.d.ts.map +1 -1
- package/dist/getToolbarSrc.js +19 -17
- package/dist/getToolbarSrc.js.map +1 -1
- package/dist/helpers/asDate.cjs +9 -6
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.d.cts +10 -5
- package/dist/helpers/asDate.d.cts.map +1 -1
- package/dist/helpers/asDate.d.ts +10 -5
- package/dist/helpers/asDate.d.ts.map +1 -1
- package/dist/helpers/asDate.js +9 -6
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs +26 -25
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.cts +55 -29
- package/dist/helpers/asHTML.d.cts.map +1 -1
- package/dist/helpers/asHTML.d.ts +55 -29
- package/dist/helpers/asHTML.d.ts.map +1 -1
- package/dist/helpers/asHTML.js +26 -25
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +27 -21
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts +36 -25
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +36 -25
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.js +27 -21
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs +12 -7
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.cts +15 -8
- package/dist/helpers/asImageSrc.d.cts.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +15 -8
- package/dist/helpers/asImageSrc.d.ts.map +1 -1
- package/dist/helpers/asImageSrc.js +12 -7
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs +32 -25
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.cts +41 -29
- package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +41 -29
- package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.js +32 -25
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.cts +32 -15
- package/dist/helpers/asLink.d.cts.map +1 -1
- package/dist/helpers/asLink.d.ts +32 -15
- package/dist/helpers/asLink.d.ts.map +1 -1
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs +11 -8
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.cts +14 -9
- package/dist/helpers/asLinkAttrs.d.cts.map +1 -1
- package/dist/helpers/asLinkAttrs.d.ts +14 -9
- package/dist/helpers/asLinkAttrs.d.ts.map +1 -1
- package/dist/helpers/asLinkAttrs.js +11 -8
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.cts +23 -10
- package/dist/helpers/asText.d.cts.map +1 -1
- package/dist/helpers/asText.d.ts +23 -10
- package/dist/helpers/asText.d.ts.map +1 -1
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs +7 -2
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.d.cts +5 -1
- package/dist/helpers/documentToLinkField.d.cts.map +1 -1
- package/dist/helpers/documentToLinkField.d.ts +5 -1
- package/dist/helpers/documentToLinkField.d.ts.map +1 -1
- package/dist/helpers/documentToLinkField.js +7 -2
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs +35 -8
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.d.cts +32 -8
- package/dist/helpers/isFilled.d.cts.map +1 -1
- package/dist/helpers/isFilled.d.ts +32 -8
- package/dist/helpers/isFilled.d.ts.map +1 -1
- package/dist/helpers/isFilled.js +35 -8
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/helpers/mapSliceZone.cjs +10 -8
- package/dist/helpers/mapSliceZone.cjs.map +1 -1
- package/dist/helpers/mapSliceZone.d.cts +63 -35
- package/dist/helpers/mapSliceZone.d.cts.map +1 -1
- package/dist/helpers/mapSliceZone.d.ts +63 -35
- package/dist/helpers/mapSliceZone.d.ts.map +1 -1
- package/dist/helpers/mapSliceZone.js +10 -8
- package/dist/helpers/mapSliceZone.js.map +1 -1
- package/dist/index.cjs +17 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -36
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +50 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.cjs +4 -3
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.d.cts +4 -3
- package/dist/isRepositoryEndpoint.d.cts.map +1 -1
- package/dist/isRepositoryEndpoint.d.ts +4 -3
- package/dist/isRepositoryEndpoint.d.ts.map +1 -1
- package/dist/isRepositoryEndpoint.js +4 -3
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs +2 -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 +2 -1
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/devMsg.cjs +8 -6
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js +8 -6
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/getOptionalLinkProperties.cjs +6 -5
- package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
- package/dist/lib/getOptionalLinkProperties.js +6 -5
- package/dist/lib/getOptionalLinkProperties.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs +3 -1
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.js +3 -1
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/isInternalURL.cjs +1 -0
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js +1 -0
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/isMigrationValue.cjs +17 -7
- package/dist/lib/isMigrationValue.cjs.map +1 -1
- package/dist/lib/isMigrationValue.js +17 -7
- package/dist/lib/isMigrationValue.js.map +1 -1
- package/dist/lib/isValue.cjs +16 -2
- package/dist/lib/isValue.cjs.map +1 -1
- package/dist/lib/isValue.js +16 -2
- package/dist/lib/isValue.js.map +1 -1
- package/dist/lib/pLimit.cjs +7 -5
- package/dist/lib/pLimit.cjs.map +1 -1
- package/dist/lib/pLimit.js +7 -5
- package/dist/lib/pLimit.js.map +1 -1
- package/dist/lib/request.cjs +23 -12
- package/dist/lib/request.cjs.map +1 -1
- package/dist/lib/request.d.cts +20 -7
- package/dist/lib/request.d.cts.map +1 -1
- package/dist/lib/request.d.ts +20 -7
- package/dist/lib/request.d.ts.map +1 -1
- package/dist/lib/request.js +23 -12
- package/dist/lib/request.js.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.cjs +15 -7
- package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.js +15 -7
- 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 +4 -3
- package/dist/lib/throttledWarn.cjs.map +1 -1
- package/dist/lib/throttledWarn.js +4 -3
- package/dist/lib/throttledWarn.js.map +1 -1
- package/dist/lib/validateAssetMetadata.cjs +18 -6
- package/dist/lib/validateAssetMetadata.cjs.map +1 -1
- package/dist/lib/validateAssetMetadata.js +18 -6
- 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 +2 -0
- package/dist/richtext/asText.cjs.map +1 -1
- package/dist/richtext/asText.d.cts +2 -0
- package/dist/richtext/asText.d.cts.map +1 -1
- package/dist/richtext/asText.d.ts +2 -0
- package/dist/richtext/asText.d.ts.map +1 -1
- package/dist/richtext/asText.js +2 -0
- package/dist/richtext/asText.js.map +1 -1
- package/dist/richtext/asTree.cjs +4 -2
- package/dist/richtext/asTree.cjs.map +1 -1
- package/dist/richtext/asTree.d.cts +4 -2
- package/dist/richtext/asTree.d.cts.map +1 -1
- package/dist/richtext/asTree.d.ts +4 -2
- package/dist/richtext/asTree.d.ts.map +1 -1
- package/dist/richtext/asTree.js +4 -2
- package/dist/richtext/asTree.js.map +1 -1
- package/dist/richtext/composeSerializers.cjs +7 -4
- package/dist/richtext/composeSerializers.cjs.map +1 -1
- package/dist/richtext/composeSerializers.d.cts +7 -4
- package/dist/richtext/composeSerializers.d.cts.map +1 -1
- package/dist/richtext/composeSerializers.d.ts +7 -4
- package/dist/richtext/composeSerializers.d.ts.map +1 -1
- package/dist/richtext/composeSerializers.js +7 -4
- package/dist/richtext/composeSerializers.js.map +1 -1
- package/dist/richtext/serialize.cjs +6 -2
- package/dist/richtext/serialize.cjs.map +1 -1
- package/dist/richtext/serialize.d.cts +6 -2
- package/dist/richtext/serialize.d.cts.map +1 -1
- package/dist/richtext/serialize.d.ts +6 -2
- package/dist/richtext/serialize.d.ts.map +1 -1
- package/dist/richtext/serialize.js +6 -2
- package/dist/richtext/serialize.js.map +1 -1
- package/dist/richtext/types.cjs.map +1 -1
- package/dist/richtext/types.d.cts +7 -3
- package/dist/richtext/types.d.cts.map +1 -1
- package/dist/richtext/types.d.ts +7 -3
- package/dist/richtext/types.d.ts.map +1 -1
- package/dist/richtext/types.js.map +1 -1
- package/dist/richtext/wrapMapSerializer.cjs +5 -2
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.cts +5 -2
- package/dist/richtext/wrapMapSerializer.d.cts.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.ts +5 -2
- package/dist/richtext/wrapMapSerializer.d.ts.map +1 -1
- package/dist/richtext/wrapMapSerializer.js +5 -2
- package/dist/richtext/wrapMapSerializer.js.map +1 -1
- package/dist/types/api/asset/asset.d.cts +70 -17
- package/dist/types/api/asset/asset.d.cts.map +1 -1
- package/dist/types/api/asset/asset.d.ts +70 -17
- package/dist/types/api/asset/asset.d.ts.map +1 -1
- package/dist/types/api/asset/tag.d.cts +23 -5
- package/dist/types/api/asset/tag.d.cts.map +1 -1
- package/dist/types/api/asset/tag.d.ts +23 -5
- 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/query.d.cts +27 -10
- package/dist/types/api/query.d.cts.map +1 -1
- package/dist/types/api/query.d.ts +27 -10
- package/dist/types/api/query.d.ts.map +1 -1
- package/dist/types/api/ref.d.cts +16 -6
- package/dist/types/api/ref.d.cts.map +1 -1
- package/dist/types/api/ref.d.ts +16 -6
- package/dist/types/api/ref.d.ts.map +1 -1
- package/dist/types/api/release.d.cts +2 -1
- package/dist/types/api/release.d.cts.map +1 -1
- package/dist/types/api/release.d.ts +2 -1
- package/dist/types/api/release.d.ts.map +1 -1
- package/dist/types/api/repository.d.cts +45 -18
- package/dist/types/api/repository.d.cts.map +1 -1
- package/dist/types/api/repository.d.ts +45 -18
- package/dist/types/api/repository.d.ts.map +1 -1
- package/dist/types/api/tags.d.cts +3 -2
- package/dist/types/api/tags.d.cts.map +1 -1
- package/dist/types/api/tags.d.ts +3 -2
- package/dist/types/api/tags.d.ts.map +1 -1
- package/dist/types/migration/Asset.cjs +13 -4
- package/dist/types/migration/Asset.cjs.map +1 -1
- package/dist/types/migration/Asset.d.cts +66 -20
- package/dist/types/migration/Asset.d.cts.map +1 -1
- package/dist/types/migration/Asset.d.ts +66 -20
- package/dist/types/migration/Asset.d.ts.map +1 -1
- package/dist/types/migration/Asset.js +13 -4
- 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 +19 -10
- package/dist/types/migration/Document.cjs.map +1 -1
- package/dist/types/migration/Document.d.cts +31 -12
- package/dist/types/migration/Document.d.cts.map +1 -1
- package/dist/types/migration/Document.d.ts +31 -12
- package/dist/types/migration/Document.d.ts.map +1 -1
- package/dist/types/migration/Document.js +19 -10
- package/dist/types/migration/Document.js.map +1 -1
- package/dist/types/model/contentRelationship.d.cts +15 -5
- package/dist/types/model/contentRelationship.d.cts.map +1 -1
- package/dist/types/model/contentRelationship.d.ts +15 -5
- package/dist/types/model/contentRelationship.d.ts.map +1 -1
- package/dist/types/model/customType.d.cts +17 -6
- package/dist/types/model/customType.d.cts.map +1 -1
- package/dist/types/model/customType.d.ts +17 -6
- 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 +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/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/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 +3 -1
- package/dist/types/model/slice.d.cts.map +1 -1
- package/dist/types/model/slice.d.ts +3 -1
- 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 +3 -1
- package/dist/types/model/types.cjs.map +1 -1
- package/dist/types/model/types.d.cts +31 -9
- package/dist/types/model/types.d.cts.map +1 -1
- package/dist/types/model/types.d.ts +31 -9
- package/dist/types/model/types.d.ts.map +1 -1
- package/dist/types/model/types.js +3 -1
- package/dist/types/model/types.js.map +1 -1
- package/dist/types/value/color.d.cts +1 -0
- package/dist/types/value/color.d.cts.map +1 -1
- package/dist/types/value/color.d.ts +1 -0
- 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 +1 -0
- package/dist/types/value/date.d.cts.map +1 -1
- package/dist/types/value/date.d.ts +1 -0
- package/dist/types/value/date.d.ts.map +1 -1
- package/dist/types/value/document.d.cts +50 -23
- package/dist/types/value/document.d.cts.map +1 -1
- package/dist/types/value/document.d.ts +50 -23
- 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 +95 -28
- package/dist/types/value/embed.d.cts.map +1 -1
- package/dist/types/value/embed.d.ts +95 -28
- 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 +1 -0
- package/dist/types/value/geoPoint.d.cts.map +1 -1
- package/dist/types/value/geoPoint.d.ts +1 -0
- 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 +8 -5
- package/dist/types/value/image.d.cts.map +1 -1
- package/dist/types/value/image.d.ts +8 -5
- package/dist/types/value/image.d.ts.map +1 -1
- package/dist/types/value/integration.d.cts +1 -0
- package/dist/types/value/integration.d.cts.map +1 -1
- package/dist/types/value/integration.d.ts +1 -0
- package/dist/types/value/integration.d.ts.map +1 -1
- package/dist/types/value/keyText.d.cts +1 -0
- package/dist/types/value/keyText.d.cts.map +1 -1
- package/dist/types/value/keyText.d.ts +1 -0
- package/dist/types/value/keyText.d.ts.map +1 -1
- package/dist/types/value/link.cjs +3 -1
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.cts +12 -8
- package/dist/types/value/link.d.cts.map +1 -1
- package/dist/types/value/link.d.ts +12 -8
- package/dist/types/value/link.d.ts.map +1 -1
- package/dist/types/value/link.js +3 -1
- 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 +1 -0
- package/dist/types/value/number.d.cts.map +1 -1
- package/dist/types/value/number.d.ts +1 -0
- 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 +77 -26
- package/dist/types/value/richText.d.cts.map +1 -1
- package/dist/types/value/richText.d.ts +77 -26
- 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 +1 -0
- package/dist/types/value/select.d.cts.map +1 -1
- package/dist/types/value/select.d.ts +1 -0
- package/dist/types/value/select.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.map +1 -1
- package/dist/types/value/slice.d.ts.map +1 -1
- package/dist/types/value/sliceZone.d.cts +4 -3
- package/dist/types/value/sliceZone.d.cts.map +1 -1
- package/dist/types/value/sliceZone.d.ts +4 -3
- package/dist/types/value/sliceZone.d.ts.map +1 -1
- package/dist/types/value/table.d.cts +63 -14
- package/dist/types/value/table.d.cts.map +1 -1
- package/dist/types/value/table.d.ts +63 -14
- 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 +24 -11
- package/dist/types/value/types.d.cts.map +1 -1
- package/dist/types/value/types.d.ts +24 -11
- 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/package.json +35 -33
- package/src/Client.ts +399 -236
- package/src/Migration.ts +139 -80
- package/src/WriteClient.ts +174 -64
- package/src/buildQueryURL.ts +100 -68
- package/src/cookie.ts +4 -1
- package/src/createClient.ts +20 -12
- package/src/createMigration.ts +16 -8
- package/src/createWriteClient.ts +19 -11
- package/src/errors.ts +15 -5
- package/src/filter.ts +122 -79
- package/src/getGraphQLEndpoint.ts +3 -0
- package/src/getRepositoryEndpoint.ts +9 -4
- package/src/getRepositoryName.ts +5 -2
- package/src/getToolbarSrc.ts +20 -17
- package/src/helpers/asDate.ts +18 -13
- package/src/helpers/asHTML.ts +102 -55
- package/src/helpers/asImagePixelDensitySrcSet.ts +49 -29
- package/src/helpers/asImageSrc.ts +16 -8
- package/src/helpers/asImageWidthSrcSet.ts +52 -33
- package/src/helpers/asLink.ts +54 -26
- package/src/helpers/asLinkAttrs.ts +29 -14
- package/src/helpers/asText.ts +31 -15
- package/src/helpers/documentToLinkField.ts +15 -4
- package/src/helpers/isFilled.ts +51 -14
- package/src/helpers/mapSliceZone.ts +84 -42
- package/src/index.ts +68 -18
- package/src/isRepositoryEndpoint.ts +4 -3
- package/src/isRepositoryName.ts +2 -1
- package/src/lib/devMsg.ts +8 -6
- package/src/lib/getOptionalLinkProperties.ts +6 -5
- package/src/lib/getPreviewCookie.ts +3 -1
- package/src/lib/isInternalURL.ts +1 -0
- package/src/lib/isMigrationValue.ts +22 -9
- package/src/lib/isValue.ts +38 -9
- package/src/lib/pLimit.ts +16 -9
- package/src/lib/request.ts +40 -15
- package/src/lib/resolveMigrationDocumentData.ts +27 -8
- package/src/lib/serializerHelpers.ts +29 -9
- package/src/lib/throttledWarn.ts +8 -4
- package/src/lib/validateAssetMetadata.ts +43 -17
- package/src/richtext/asText.ts +8 -2
- package/src/richtext/asTree.ts +26 -8
- package/src/richtext/composeSerializers.ts +11 -5
- package/src/richtext/serialize.ts +12 -4
- package/src/richtext/types.ts +57 -13
- package/src/richtext/wrapMapSerializer.ts +8 -4
- package/src/types/api/asset/asset.ts +77 -26
- package/src/types/api/asset/tag.ts +18 -6
- package/src/types/api/integration.ts +10 -4
- package/src/types/api/migration/document.ts +27 -11
- package/src/types/api/query.ts +27 -10
- package/src/types/api/ref.ts +16 -6
- package/src/types/api/release.ts +2 -1
- package/src/types/api/repository.ts +45 -18
- package/src/types/api/tags.ts +3 -2
- package/src/types/migration/Asset.ts +82 -26
- package/src/types/migration/ContentRelationship.ts +12 -5
- package/src/types/migration/Document.ts +52 -26
- package/src/types/migration/Link.ts +9 -7
- package/src/types/model/contentRelationship.ts +20 -7
- package/src/types/model/customType.ts +21 -7
- package/src/types/model/image.ts +5 -4
- package/src/types/model/linkToMedia.ts +2 -1
- package/src/types/model/range.ts +3 -1
- package/src/types/model/separator.ts +3 -1
- package/src/types/model/sharedSliceVariation.ts +4 -4
- package/src/types/model/slice.ts +12 -7
- package/src/types/model/sliceZone.ts +11 -4
- package/src/types/model/types.ts +31 -10
- package/src/types/value/color.ts +3 -3
- package/src/types/value/contentRelationship.ts +13 -8
- package/src/types/value/date.ts +3 -1
- package/src/types/value/document.ts +52 -24
- package/src/types/value/embed.ts +80 -33
- package/src/types/value/geoPoint.ts +8 -6
- package/src/types/value/group.ts +4 -1
- package/src/types/value/image.ts +14 -10
- package/src/types/value/integration.ts +1 -0
- package/src/types/value/keyText.ts +3 -3
- package/src/types/value/link.ts +22 -14
- package/src/types/value/linkToMedia.ts +5 -2
- package/src/types/value/number.ts +3 -3
- package/src/types/value/richText.ts +82 -30
- package/src/types/value/select.ts +1 -0
- package/src/types/value/sharedSliceVariation.ts +11 -3
- package/src/types/value/slice.ts +8 -2
- package/src/types/value/sliceZone.ts +6 -4
- package/src/types/value/table.ts +64 -25
- package/src/types/value/timestamp.ts +2 -3
- package/src/types/value/title.ts +18 -16
- package/src/types/value/types.ts +21 -8
- package/src/types/webhook/apiUpdate.ts +3 -1
|
@@ -22,7 +22,9 @@ import { CustomTypeModelUIDField } from "./uid.js";
|
|
|
22
22
|
import { CustomTypeModelIntegrationField } from "./integration.js";
|
|
23
23
|
|
|
24
24
|
//#region src/types/model/types.d.ts
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Type identifier for a custom type field.
|
|
27
|
+
*/
|
|
26
28
|
declare const CustomTypeModelFieldType: {
|
|
27
29
|
readonly Boolean: "Boolean";
|
|
28
30
|
readonly Color: "Color";
|
|
@@ -40,19 +42,39 @@ declare const CustomTypeModelFieldType: {
|
|
|
40
42
|
readonly Table: "Table";
|
|
41
43
|
readonly Text: "Text";
|
|
42
44
|
readonly Timestamp: "Timestamp";
|
|
43
|
-
readonly UID: "UID";
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
readonly UID: "UID";
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated - Renamed to `Integration`.
|
|
48
|
+
*/
|
|
49
|
+
readonly IntegrationFields: "IntegrationFields";
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated - Legacy field type. Use `Number` instead.
|
|
52
|
+
*/
|
|
53
|
+
readonly Range: "Range";
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated - Legacy field type. Do not use.
|
|
56
|
+
*/
|
|
57
|
+
readonly Separator: "Separator";
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated - Legacy field type. Use `Slices` instead.
|
|
60
|
+
*/
|
|
47
61
|
readonly LegacySlices: "Choice";
|
|
48
62
|
};
|
|
49
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* A custom type field.
|
|
65
|
+
*/
|
|
50
66
|
type CustomTypeModelField = CustomTypeModelUIDField | CustomTypeModelGroupField | CustomTypeModelSliceZoneField | CustomTypeModelFieldForNestedGroup;
|
|
51
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* Any custom type field that is valid for a slice's primary section.
|
|
69
|
+
*/
|
|
52
70
|
type CustomTypeModelFieldForSlicePrimary = CustomTypeModelGroupField | CustomTypeModelFieldForNestedGroup;
|
|
53
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Any custom type field that is valid for a group field.
|
|
73
|
+
*/
|
|
54
74
|
type CustomTypeModelFieldForGroup = CustomTypeModelNestedGroupField | CustomTypeModelFieldForNestedGroup;
|
|
55
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Any custom type field that is valid for a nested group field.
|
|
77
|
+
*/
|
|
56
78
|
type CustomTypeModelFieldForNestedGroup = CustomTypeModelBooleanField | CustomTypeModelColorField | CustomTypeModelDateField | CustomTypeModelEmbedField | CustomTypeModelGeoPointField | CustomTypeModelImageField | CustomTypeModelIntegrationField | CustomTypeModelContentRelationshipField | CustomTypeModelLinkField | CustomTypeModelLinkToMediaField | CustomTypeModelNumberField | CustomTypeModelRangeField | CustomTypeModelSelectField | CustomTypeModelRichTextField | CustomTypeModelTableField | CustomTypeModelTitleField | CustomTypeModelKeyTextField | CustomTypeModelTimestampField | CustomTypeModelSeparatorField;
|
|
57
79
|
//#endregion
|
|
58
80
|
export { CustomTypeModelField, CustomTypeModelFieldForGroup, CustomTypeModelFieldForNestedGroup, CustomTypeModelFieldForSlicePrimary, CustomTypeModelFieldType };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/types/model/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/types/model/types.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;cAAa,wBAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;EAuCD;;;EAAA;EAET;;;EAAA;;;;;KAFS,oBAAA,GACT,uBAAA,GACA,yBAAA,GACA,6BAAA,GACA,kCAAA;;;AAKH;KAAY,mCAAA,GACT,yBAAA,GACA,kCAAA;;;;KAKS,4BAAA,GACT,+BAAA,GACA,kCAAA;;;;KAKS,kCAAA,GACT,2BAAA,GACA,yBAAA,GACA,wBAAA,GACA,yBAAA,GACA,4BAAA,GACA,yBAAA,GACA,+BAAA,GACA,uCAAA,GACA,wBAAA,GACA,+BAAA,GACA,0BAAA,GACA,yBAAA,GACA,0BAAA,GACA,4BAAA,GACA,yBAAA,GACA,yBAAA,GACA,2BAAA,GACA,6BAAA,GACA,6BAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/types/model/types.ts"],"sourcesContent":["import type { CustomTypeModelBooleanField } from \"./boolean\"\nimport type { CustomTypeModelColorField } from \"./color\"\nimport type { CustomTypeModelContentRelationshipField } from \"./contentRelationship\"\nimport type { CustomTypeModelDateField } from \"./date\"\nimport type { CustomTypeModelEmbedField } from \"./embed\"\nimport type { CustomTypeModelGeoPointField } from \"./geoPoint\"\nimport type {
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/types/model/types.ts"],"sourcesContent":["import type { CustomTypeModelBooleanField } from \"./boolean\"\nimport type { CustomTypeModelColorField } from \"./color\"\nimport type { CustomTypeModelContentRelationshipField } from \"./contentRelationship\"\nimport type { CustomTypeModelDateField } from \"./date\"\nimport type { CustomTypeModelEmbedField } from \"./embed\"\nimport type { CustomTypeModelGeoPointField } from \"./geoPoint\"\nimport type {\n\tCustomTypeModelGroupField,\n\tCustomTypeModelNestedGroupField,\n} from \"./group\"\nimport type { CustomTypeModelImageField } from \"./image\"\nimport type { CustomTypeModelIntegrationField } from \"./integration\"\nimport type { CustomTypeModelKeyTextField } from \"./keyText\"\nimport type { CustomTypeModelLinkField } from \"./link\"\nimport type { CustomTypeModelLinkToMediaField } from \"./linkToMedia\"\nimport type { CustomTypeModelNumberField } from \"./number\"\nimport type { CustomTypeModelRangeField } from \"./range\"\nimport type { CustomTypeModelRichTextField } from \"./richText\"\nimport type { CustomTypeModelSelectField } from \"./select\"\nimport type { CustomTypeModelSeparatorField } from \"./separator\"\nimport type { CustomTypeModelSliceZoneField } from \"./sliceZone\"\nimport type { CustomTypeModelTableField } from \"./table\"\nimport type { CustomTypeModelTimestampField } from \"./timestamp\"\nimport type { CustomTypeModelTitleField } from \"./title\"\nimport type { CustomTypeModelUIDField } from \"./uid\"\n\n/**\n * Type identifier for a custom type field.\n */\nexport const CustomTypeModelFieldType = {\n\tBoolean: \"Boolean\",\n\tColor: \"Color\",\n\tDate: \"Date\",\n\tEmbed: \"Embed\",\n\tGeoPoint: \"GeoPoint\",\n\tGroup: \"Group\",\n\tImage: \"Image\",\n\tIntegration: \"IntegrationFields\",\n\tLink: \"Link\",\n\tNumber: \"Number\",\n\tSelect: \"Select\",\n\tSlices: \"Slices\",\n\tStructuredText: \"StructuredText\",\n\tTable: \"Table\",\n\tText: \"Text\",\n\tTimestamp: \"Timestamp\",\n\tUID: \"UID\",\n\t/**\n\t * @deprecated - Renamed to `Integration`.\n\t */\n\tIntegrationFields: \"IntegrationFields\",\n\t/**\n\t * @deprecated - Legacy field type. Use `Number` instead.\n\t */\n\tRange: \"Range\",\n\t/**\n\t * @deprecated - Legacy field type. Do not use.\n\t */\n\tSeparator: \"Separator\",\n\t/**\n\t * @deprecated - Legacy field type. Use `Slices` instead.\n\t */\n\tLegacySlices: \"Choice\",\n} as const\n\n/**\n * A custom type field.\n */\nexport type CustomTypeModelField =\n\t| CustomTypeModelUIDField\n\t| CustomTypeModelGroupField\n\t| CustomTypeModelSliceZoneField\n\t| CustomTypeModelFieldForNestedGroup\n\n/**\n * Any custom type field that is valid for a slice's primary section.\n */\nexport type CustomTypeModelFieldForSlicePrimary =\n\t| CustomTypeModelGroupField\n\t| CustomTypeModelFieldForNestedGroup\n\n/**\n * Any custom type field that is valid for a group field.\n */\nexport type CustomTypeModelFieldForGroup =\n\t| CustomTypeModelNestedGroupField\n\t| CustomTypeModelFieldForNestedGroup\n\n/**\n * Any custom type field that is valid for a nested group field.\n */\nexport type CustomTypeModelFieldForNestedGroup =\n\t| CustomTypeModelBooleanField\n\t| CustomTypeModelColorField\n\t| CustomTypeModelDateField\n\t| CustomTypeModelEmbedField\n\t| CustomTypeModelGeoPointField\n\t| CustomTypeModelImageField\n\t| CustomTypeModelIntegrationField\n\t| CustomTypeModelContentRelationshipField\n\t| CustomTypeModelLinkField\n\t| CustomTypeModelLinkToMediaField\n\t| CustomTypeModelNumberField\n\t| CustomTypeModelRangeField\n\t| CustomTypeModelSelectField\n\t| CustomTypeModelRichTextField\n\t| CustomTypeModelTableField\n\t| CustomTypeModelTitleField\n\t| CustomTypeModelKeyTextField\n\t| CustomTypeModelTimestampField\n\t| CustomTypeModelSeparatorField\n"],"mappings":";;;;AA6BA,MAAa,2BAA2B;CACvC,SAAS;CACT,OAAO;CACP,MAAM;CACN,OAAO;CACP,UAAU;CACV,OAAO;CACP,OAAO;CACP,aAAa;CACb,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,gBAAgB;CAChB,OAAO;CACP,MAAM;CACN,WAAW;CACX,KAAK;CAIL,mBAAmB;CAInB,OAAO;CAIP,WAAW;CAIX,cAAc;CACd"}
|
|
@@ -5,6 +5,7 @@ import { FieldState } from "./types.cjs";
|
|
|
5
5
|
* A color field.
|
|
6
6
|
*
|
|
7
7
|
* @typeParam State - State of the field which determines its shape.
|
|
8
|
+
*
|
|
8
9
|
* @see More details: {@link https://prismic.io/docs/color}
|
|
9
10
|
*/
|
|
10
11
|
type ColorField<State extends FieldState = FieldState> = State extends "empty" ? null : `#${string}`;
|
|
@@ -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":";;;;;AASA;;;;;KAAY,UAAA,eAAyB,UAAA,GAAa,UAAA,IACjD,KAAA"}
|
|
@@ -5,6 +5,7 @@ import { FieldState } from "./types.js";
|
|
|
5
5
|
* A color field.
|
|
6
6
|
*
|
|
7
7
|
* @typeParam State - State of the field which determines its shape.
|
|
8
|
+
*
|
|
8
9
|
* @see More details: {@link https://prismic.io/docs/color}
|
|
9
10
|
*/
|
|
10
11
|
type ColorField<State extends FieldState = FieldState> = State extends "empty" ? null : `#${string}`;
|
|
@@ -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":";;;;;AASA;;;;;KAAY,UAAA,eAAyB,UAAA,GAAa,UAAA,IACjD,KAAA"}
|
|
@@ -8,15 +8,17 @@ import { AnyRegularField, FieldState } from "./types.cjs";
|
|
|
8
8
|
*
|
|
9
9
|
* @typeParam TypeEnum - Type API ID of the document.
|
|
10
10
|
* @typeParam LangEnum - Language API ID of the document.
|
|
11
|
-
* @typeParam DataInterface - Data fields for the document (filled in via
|
|
12
|
-
* `fetchLinks`).
|
|
11
|
+
* @typeParam DataInterface - Data fields for the document (filled in via
|
|
12
|
+
* GraphQuery of `fetchLinks`).
|
|
13
13
|
* @typeParam State - State of the field which determines its shape.
|
|
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
16
|
type EmptyContentRelationshipField = {
|
|
17
17
|
link_type: "Any";
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Links that refer to documents
|
|
21
|
+
*/
|
|
20
22
|
interface FilledContentRelationshipField<TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown> {
|
|
21
23
|
link_type: "Document";
|
|
22
24
|
id: string;
|
|
@@ -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":";;;;;;;AAcA;;;;;;;KAAY,wBAAA,6DAIR,MAAA,SAAe,eAAA,GAAkB,UAAA,GAAa,SAAA,qCAEnC,UAAA,GAAa,UAAA,IACxB,KAAA,mBACD,6BAAA,GACA,8BAAA,CAA+B,QAAA,EAAU,QAAA,EAAU,aAAA;AAAA,KAE1C,6BAAA;EACX,SAAA;AAAA;;;;UAMgB,8BAAA,6DAIb,MAAA,SAAe,eAAA,GAAkB,UAAA,GAAa,SAAA;EAGjD,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"}
|
|
@@ -8,15 +8,17 @@ import { AnyRegularField, FieldState } from "./types.js";
|
|
|
8
8
|
*
|
|
9
9
|
* @typeParam TypeEnum - Type API ID of the document.
|
|
10
10
|
* @typeParam LangEnum - Language API ID of the document.
|
|
11
|
-
* @typeParam DataInterface - Data fields for the document (filled in via
|
|
12
|
-
* `fetchLinks`).
|
|
11
|
+
* @typeParam DataInterface - Data fields for the document (filled in via
|
|
12
|
+
* GraphQuery of `fetchLinks`).
|
|
13
13
|
* @typeParam State - State of the field which determines its shape.
|
|
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
16
|
type EmptyContentRelationshipField = {
|
|
17
17
|
link_type: "Any";
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Links that refer to documents
|
|
21
|
+
*/
|
|
20
22
|
interface FilledContentRelationshipField<TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown> {
|
|
21
23
|
link_type: "Document";
|
|
22
24
|
id: string;
|
|
@@ -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":";;;;;;;AAcA;;;;;;;KAAY,wBAAA,6DAIR,MAAA,SAAe,eAAA,GAAkB,UAAA,GAAa,SAAA,qCAEnC,UAAA,GAAa,UAAA,IACxB,KAAA,mBACD,6BAAA,GACA,8BAAA,CAA+B,QAAA,EAAU,QAAA,EAAU,aAAA;AAAA,KAE1C,6BAAA;EACX,SAAA;AAAA;;;;UAMgB,8BAAA,6DAIb,MAAA,SAAe,eAAA,GAAkB,UAAA,GAAa,SAAA;EAGjD,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"}
|
|
@@ -5,6 +5,7 @@ import { FieldState } from "./types.cjs";
|
|
|
5
5
|
* A date field.
|
|
6
6
|
*
|
|
7
7
|
* @typeParam State - State of the field which determines its shape.
|
|
8
|
+
*
|
|
8
9
|
* @see More details: {@link https://prismic.io/docs/date}
|
|
9
10
|
*/
|
|
10
11
|
type DateField<State extends FieldState = FieldState> = State extends "empty" ? null : string;
|
|
@@ -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":";;;;;AASA;;;;;KAAY,SAAA,eAAwB,UAAA,GAAa,UAAA,IAChD,KAAA"}
|
|
@@ -5,6 +5,7 @@ import { FieldState } from "./types.js";
|
|
|
5
5
|
* A date field.
|
|
6
6
|
*
|
|
7
7
|
* @typeParam State - State of the field which determines its shape.
|
|
8
|
+
*
|
|
8
9
|
* @see More details: {@link https://prismic.io/docs/date}
|
|
9
10
|
*/
|
|
10
11
|
type DateField<State extends FieldState = FieldState> = State extends "empty" ? null : string;
|
|
@@ -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":";;;;;AASA;;;;;KAAY,SAAA,eAAwB,UAAA,GAAa,UAAA,IAChD,KAAA"}
|
|
@@ -4,36 +4,52 @@ import { TimestampField } from "./timestamp.cjs";
|
|
|
4
4
|
import { AnyRegularField } from "./types.cjs";
|
|
5
5
|
|
|
6
6
|
//#region src/types/value/document.d.ts
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Document metadata for a translation of a Prismic document.
|
|
9
|
+
*/
|
|
8
10
|
interface AlternateLanguage<TypeEnum = string, LangEnum = string> {
|
|
9
11
|
id: string;
|
|
10
12
|
uid?: string;
|
|
11
13
|
type: TypeEnum;
|
|
12
14
|
lang: LangEnum;
|
|
13
15
|
}
|
|
14
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Metadata for Prismic document
|
|
18
|
+
*/
|
|
15
19
|
interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
16
20
|
/**
|
|
17
|
-
* The unique identifier for the document. Guaranteed to be unique among all
|
|
18
|
-
* Prismic repository.
|
|
21
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
22
|
+
* documents in the Prismic repository.
|
|
19
23
|
*/
|
|
20
24
|
id: string;
|
|
21
25
|
/**
|
|
22
|
-
* The unique identifier for the document. Guaranteed to be unique among all
|
|
23
|
-
* the same type.
|
|
26
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
27
|
+
* Prismic documents of the same type.
|
|
24
28
|
*/
|
|
25
29
|
uid: string | null;
|
|
26
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Url that refers to document.
|
|
32
|
+
*/
|
|
27
33
|
url: string | null;
|
|
28
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Type of the document.
|
|
36
|
+
*/
|
|
29
37
|
type: TypeEnum;
|
|
30
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Href for document.
|
|
40
|
+
*/
|
|
31
41
|
href: string;
|
|
32
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Tags associated with document.
|
|
44
|
+
*/
|
|
33
45
|
tags: string[];
|
|
34
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* The timestamp at which the document was first published.
|
|
48
|
+
*/
|
|
35
49
|
first_publication_date: TimestampField<"filled">;
|
|
36
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The timestamp at which the document was last published.
|
|
52
|
+
*/
|
|
37
53
|
last_publication_date: TimestampField<"filled">;
|
|
38
54
|
/**
|
|
39
55
|
* Slugs associated with document.
|
|
@@ -43,11 +59,17 @@ interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
|
43
59
|
* https://community.prismic.io/t/what-are-slugs/6493
|
|
44
60
|
*/
|
|
45
61
|
slugs: string[];
|
|
46
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Documents that are related to this document.
|
|
64
|
+
*/
|
|
47
65
|
linked_documents: unknown[];
|
|
48
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Language of document.
|
|
68
|
+
*/
|
|
49
69
|
lang: LangEnum;
|
|
50
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Array to access alternate language versions for document.
|
|
72
|
+
*/
|
|
51
73
|
alternate_languages: AlternateLanguage<TypeEnum, LangEnum>[];
|
|
52
74
|
}
|
|
53
75
|
/**
|
|
@@ -56,34 +78,39 @@ interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
|
56
78
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
57
79
|
*/
|
|
58
80
|
interface PrismicDocument<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocumentHeader<TypeEnum, LangEnum> {
|
|
59
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Data contained in the document.
|
|
83
|
+
*/
|
|
60
84
|
data: DataInterface;
|
|
61
85
|
}
|
|
62
86
|
/**
|
|
63
|
-
* A Prismic document served through REST API v2. Does not contain a UID (a
|
|
87
|
+
* A Prismic document served through REST API v2. Does not contain a UID (a
|
|
88
|
+
* unique identifier).
|
|
64
89
|
*
|
|
65
90
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
66
91
|
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
67
92
|
*/
|
|
68
93
|
interface PrismicDocumentWithoutUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
69
94
|
/**
|
|
70
|
-
* This document does not have a UID field. This property will always be
|
|
95
|
+
* This document does not have a UID field. This property will always be
|
|
96
|
+
* `null`.
|
|
71
97
|
*
|
|
72
|
-
* The unique identifier for the document. Guaranteed to be unique among all
|
|
73
|
-
* the same type.
|
|
98
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
99
|
+
* Prismic documents of the same type.
|
|
74
100
|
*/
|
|
75
101
|
uid: null;
|
|
76
102
|
}
|
|
77
103
|
/**
|
|
78
|
-
* A Prismic document served through REST API v2. Contains a UID (a unique
|
|
104
|
+
* A Prismic document served through REST API v2. Contains a UID (a unique
|
|
105
|
+
* identifier).
|
|
79
106
|
*
|
|
80
107
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
81
108
|
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
82
109
|
*/
|
|
83
110
|
interface PrismicDocumentWithUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
84
111
|
/**
|
|
85
|
-
* The unique identifier for the document. Guaranteed to be unique among all
|
|
86
|
-
* the same type.
|
|
112
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
113
|
+
* Prismic documents of the same type.
|
|
87
114
|
*/
|
|
88
115
|
uid: string;
|
|
89
116
|
}
|
|
@@ -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":";;;;;;;;AASA;UAAiB,iBAAA;EAChB,EAAA;EACA,GAAA;EACA,IAAA,EAAM,QAAA;EACN,IAAA,EAAM,QAAA;AAAA;;;;UAMU,qBAAA;EANV;;;AAMP;EAKC,EAAA;EALqC;;;;EAUrC,GAAA;EA4CuC;;;EAxCvC,GAAA;EAwCsC;;;EApCtC,IAAA,EAAM,QAAA;EARN;;;EAYA,IAAA;EAAA;;;EAIA,IAAA;EAQA;;;EAJA,sBAAA,EAAwB,cAAA;EAoBxB;;;EAhBA,qBAAA,EAAuB,cAAA;EAoBgB;;;;AAQxC;;;EApBC,KAAA;EAuBmB;;;EAnBnB,gBAAA;EAwB+B;;;EApB/B,IAAA,EAAM,QAAA;EAoBwB;;;EAhB9B,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;EAAV;;;EAI/B,IAAA,EAAM,aAAA;AAAA;;AAUP;;;;;;UAAiB,yBAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,eAAA,CAAgB,aAAA,EAAe,QAAA,EAAU,QAAA;EAH9C;;;;;;;EAWJ,GAAA;AAAA;;;;;;;;UAUgB,sBAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,eAAA,CAAgB,aAAA,EAAe,QAAA,EAAU,QAAA;EA1BV;;;;EA+BxC,GAAA;AAAA"}
|
|
@@ -4,36 +4,52 @@ import { TimestampField } from "./timestamp.js";
|
|
|
4
4
|
import { AnyRegularField } from "./types.js";
|
|
5
5
|
|
|
6
6
|
//#region src/types/value/document.d.ts
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Document metadata for a translation of a Prismic document.
|
|
9
|
+
*/
|
|
8
10
|
interface AlternateLanguage<TypeEnum = string, LangEnum = string> {
|
|
9
11
|
id: string;
|
|
10
12
|
uid?: string;
|
|
11
13
|
type: TypeEnum;
|
|
12
14
|
lang: LangEnum;
|
|
13
15
|
}
|
|
14
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Metadata for Prismic document
|
|
18
|
+
*/
|
|
15
19
|
interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
16
20
|
/**
|
|
17
|
-
* The unique identifier for the document. Guaranteed to be unique among all
|
|
18
|
-
* Prismic repository.
|
|
21
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
22
|
+
* documents in the Prismic repository.
|
|
19
23
|
*/
|
|
20
24
|
id: string;
|
|
21
25
|
/**
|
|
22
|
-
* The unique identifier for the document. Guaranteed to be unique among all
|
|
23
|
-
* the same type.
|
|
26
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
27
|
+
* Prismic documents of the same type.
|
|
24
28
|
*/
|
|
25
29
|
uid: string | null;
|
|
26
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Url that refers to document.
|
|
32
|
+
*/
|
|
27
33
|
url: string | null;
|
|
28
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Type of the document.
|
|
36
|
+
*/
|
|
29
37
|
type: TypeEnum;
|
|
30
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Href for document.
|
|
40
|
+
*/
|
|
31
41
|
href: string;
|
|
32
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Tags associated with document.
|
|
44
|
+
*/
|
|
33
45
|
tags: string[];
|
|
34
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* The timestamp at which the document was first published.
|
|
48
|
+
*/
|
|
35
49
|
first_publication_date: TimestampField<"filled">;
|
|
36
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* The timestamp at which the document was last published.
|
|
52
|
+
*/
|
|
37
53
|
last_publication_date: TimestampField<"filled">;
|
|
38
54
|
/**
|
|
39
55
|
* Slugs associated with document.
|
|
@@ -43,11 +59,17 @@ interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
|
43
59
|
* https://community.prismic.io/t/what-are-slugs/6493
|
|
44
60
|
*/
|
|
45
61
|
slugs: string[];
|
|
46
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Documents that are related to this document.
|
|
64
|
+
*/
|
|
47
65
|
linked_documents: unknown[];
|
|
48
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Language of document.
|
|
68
|
+
*/
|
|
49
69
|
lang: LangEnum;
|
|
50
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Array to access alternate language versions for document.
|
|
72
|
+
*/
|
|
51
73
|
alternate_languages: AlternateLanguage<TypeEnum, LangEnum>[];
|
|
52
74
|
}
|
|
53
75
|
/**
|
|
@@ -56,34 +78,39 @@ interface PrismicDocumentHeader<TypeEnum = string, LangEnum = string> {
|
|
|
56
78
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
57
79
|
*/
|
|
58
80
|
interface PrismicDocument<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocumentHeader<TypeEnum, LangEnum> {
|
|
59
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Data contained in the document.
|
|
83
|
+
*/
|
|
60
84
|
data: DataInterface;
|
|
61
85
|
}
|
|
62
86
|
/**
|
|
63
|
-
* A Prismic document served through REST API v2. Does not contain a UID (a
|
|
87
|
+
* A Prismic document served through REST API v2. Does not contain a UID (a
|
|
88
|
+
* unique identifier).
|
|
64
89
|
*
|
|
65
90
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
66
91
|
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
67
92
|
*/
|
|
68
93
|
interface PrismicDocumentWithoutUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
69
94
|
/**
|
|
70
|
-
* This document does not have a UID field. This property will always be
|
|
95
|
+
* This document does not have a UID field. This property will always be
|
|
96
|
+
* `null`.
|
|
71
97
|
*
|
|
72
|
-
* The unique identifier for the document. Guaranteed to be unique among all
|
|
73
|
-
* the same type.
|
|
98
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
99
|
+
* Prismic documents of the same type.
|
|
74
100
|
*/
|
|
75
101
|
uid: null;
|
|
76
102
|
}
|
|
77
103
|
/**
|
|
78
|
-
* A Prismic document served through REST API v2. Contains a UID (a unique
|
|
104
|
+
* A Prismic document served through REST API v2. Contains a UID (a unique
|
|
105
|
+
* identifier).
|
|
79
106
|
*
|
|
80
107
|
* @see More details on custom types: {@link https://prismic.io/docs/custom-types}
|
|
81
108
|
* @see More details on the UID field: {@link https://prismic.io/docs/uid}
|
|
82
109
|
*/
|
|
83
110
|
interface PrismicDocumentWithUID<DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> = Record<string, any>, TypeEnum = string, LangEnum = string> extends PrismicDocument<DataInterface, TypeEnum, LangEnum> {
|
|
84
111
|
/**
|
|
85
|
-
* The unique identifier for the document. Guaranteed to be unique among all
|
|
86
|
-
* the same type.
|
|
112
|
+
* The unique identifier for the document. Guaranteed to be unique among all
|
|
113
|
+
* Prismic documents of the same type.
|
|
87
114
|
*/
|
|
88
115
|
uid: string;
|
|
89
116
|
}
|
|
@@ -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":";;;;;;;;AASA;UAAiB,iBAAA;EAChB,EAAA;EACA,GAAA;EACA,IAAA,EAAM,QAAA;EACN,IAAA,EAAM,QAAA;AAAA;;;;UAMU,qBAAA;EANV;;;AAMP;EAKC,EAAA;EALqC;;;;EAUrC,GAAA;EA4CuC;;;EAxCvC,GAAA;EAwCsC;;;EApCtC,IAAA,EAAM,QAAA;EARN;;;EAYA,IAAA;EAAA;;;EAIA,IAAA;EAQA;;;EAJA,sBAAA,EAAwB,cAAA;EAoBxB;;;EAhBA,qBAAA,EAAuB,cAAA;EAoBgB;;;;AAQxC;;;EApBC,KAAA;EAuBmB;;;EAnBnB,gBAAA;EAwB+B;;;EApB/B,IAAA,EAAM,QAAA;EAoBwB;;;EAhB9B,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;EAAV;;;EAI/B,IAAA,EAAM,aAAA;AAAA;;AAUP;;;;;;UAAiB,yBAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,eAAA,CAAgB,aAAA,EAAe,QAAA,EAAU,QAAA;EAH9C;;;;;;;EAWJ,GAAA;AAAA;;;;;;;;UAUgB,sBAAA,uBACM,MAAA,SAErB,eAAA,GAAkB,UAAA,GAAa,SAAA,IAE5B,MAAA,6DAGK,eAAA,CAAgB,aAAA,EAAe,QAAA,EAAU,QAAA;EA1BV;;;;EA+BxC,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 *
|
|
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\n * response must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\ntype OEmbedBase<TType extends (typeof OEmbedType)[keyof typeof OEmbedType]> = {\n\t/**\n\t * oEmbed resource type.\n\t */\n\ttype: TType\n\n\t/**\n\t * oEmbed version number, this must be \"1.0\".\n\t */\n\tversion: string\n}\n\n/**\n * oEmbed response extra fields. Those are every non-mandatory and unknown\n * fields an oEmbed response can feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type OEmbedExtra = {\n\t/**\n\t * oEmbed text title, describing the resource.\n\t */\n\ttitle?: string | null\n\n\t/**\n\t * oEmbed resource author/owner name.\n\t */\n\tauthor_name?: string | null\n\n\t/**\n\t * oEmbed resource author/owner URL.\n\t */\n\tauthor_url?: string | null\n\n\t/**\n\t * oEmbed resource provider name.\n\t */\n\tprovider_name?: string | null\n\n\t/**\n\t * oEmbed resource provider URL.\n\t */\n\tprovider_url?: string | null\n\n\t/**\n\t * oEmbed suggested cache lifetime for the resource, in seconds.\n\t */\n\tcache_age?: number | null\n\n\t/**\n\t * oEmbed resource thumbnail URL.\n\t */\n\tthumbnail_url?: string | null\n\n\t/**\n\t * oEmbed resource thumbnail width.\n\t */\n\tthumbnail_width?: number | null\n\n\t/**\n\t * oEmbed resource thumbnail height.\n\t */\n\tthumbnail_height?: number | null\n\n\t/**\n\t * Providers may optionally include any parameters not specified in this\n\t * document (so long as they use the same key-value format) and consumers may\n\t * choose to ignore these. Consumers must ignore parameters they do not\n\t * understand.\n\t *\n\t * @see oEmbed specification: {@link https://oembed.com}\n\t */\n\t[key: string]: unknown | null\n}\n\n/**\n * oEmbed photo type. Those are every mandatory fields an oEmbed photo response\n * must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type PhotoOEmbed = OEmbedBase<typeof OEmbedType.Photo> & {\n\t/**\n\t * oEmbed source URL of the image.\n\t */\n\turl: string\n\n\t/**\n\t * oEmbed width in pixels of the image.\n\t */\n\twidth: number\n\n\t/**\n\t * oEmbed height in pixels of the image.\n\t */\n\theight: number\n}\n\n/**\n * oEmbed video type. Those are every mandatory fields an oEmbed video response\n * must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type VideoOEmbed = OEmbedBase<typeof OEmbedType.Video> & {\n\t/**\n\t * oEmbed HTML required to embed a video player.\n\t */\n\thtml: string\n\n\t/**\n\t * oEmbed width in pixels required to display the HTML.\n\t */\n\twidth: number\n\n\t/**\n\t * oEmbed height in pixels required to display the HTML.\n\t */\n\theight: number\n}\n\n/**\n * oEmbed link type. Those are every mandatory fields an oEmbed link response\n * must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type LinkOEmbed = OEmbedBase<typeof OEmbedType.Link>\n\n/**\n * oEmbed rich type. Those are every mandatory fields an oEmbed rich response\n * must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type RichOEmbed = OEmbedBase<typeof OEmbedType.Rich> & {\n\t/**\n\t * oEmbed HTML required to display the resource.\n\t */\n\thtml: string\n\n\t/**\n\t * oEmbed width in pixels required to display the HTML.\n\t */\n\twidth: number\n\n\t/**\n\t * oEmbed height in pixels required to display the HTML.\n\t */\n\theight: number\n}\n\n/**\n * Any of the possible types of oEmbed response. Those contains only mandatory\n * fields their respective oEmbed response type must feature.\n *\n * @see oEmbed specification: {@link https://oembed.com}\n */\nexport type AnyOEmbed = PhotoOEmbed | VideoOEmbed | LinkOEmbed | RichOEmbed\n\n/**\n * An embed field.\n *\n * @typeParam Data - Data provided by the URL's oEmbed provider.\n * @typeParam State - State of the field which determines its shape.\n *\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"}
|