@prismicio/client 7.21.6 → 7.21.7-pr.444.5136044
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 +204 -278
- package/dist/Client.cjs.map +1 -1
- package/dist/Client.d.cts +180 -253
- package/dist/Client.d.cts.map +1 -1
- package/dist/Client.d.ts +180 -253
- package/dist/Client.d.ts.map +1 -1
- package/dist/Client.js +198 -272
- package/dist/Client.js.map +1 -1
- package/dist/Migration.cjs +71 -104
- package/dist/Migration.cjs.map +1 -1
- package/dist/Migration.d.cts +50 -85
- package/dist/Migration.d.cts.map +1 -1
- package/dist/Migration.d.ts +50 -85
- package/dist/Migration.d.ts.map +1 -1
- package/dist/Migration.js +65 -98
- package/dist/Migration.js.map +1 -1
- package/dist/WriteClient.cjs +57 -99
- package/dist/WriteClient.cjs.map +1 -1
- package/dist/WriteClient.d.cts +24 -64
- package/dist/WriteClient.d.cts.map +1 -1
- package/dist/WriteClient.d.ts +24 -64
- package/dist/WriteClient.d.ts.map +1 -1
- package/dist/WriteClient.js +51 -93
- package/dist/WriteClient.js.map +1 -1
- package/dist/_virtual/_rolldown/runtime.cjs +13 -0
- package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.js} +4 -5
- package/dist/buildQueryURL.cjs +19 -27
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.cts +53 -63
- package/dist/buildQueryURL.d.cts.map +1 -1
- package/dist/buildQueryURL.d.ts +53 -63
- package/dist/buildQueryURL.d.ts.map +1 -1
- package/dist/buildQueryURL.js +17 -25
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.cjs +8 -13
- package/dist/cookie.cjs.map +1 -1
- package/dist/cookie.d.cts +1 -4
- package/dist/cookie.d.cts.map +1 -1
- package/dist/cookie.d.ts +1 -4
- package/dist/cookie.d.ts.map +1 -1
- package/dist/cookie.js +4 -8
- package/dist/cookie.js.map +1 -1
- package/dist/createClient.cjs +12 -17
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.cts +11 -19
- package/dist/createClient.d.cts.map +1 -1
- package/dist/createClient.d.ts +11 -19
- package/dist/createClient.d.ts.map +1 -1
- package/dist/createClient.js +11 -16
- package/dist/createClient.js.map +1 -1
- package/dist/createMigration.cjs +6 -10
- package/dist/createMigration.cjs.map +1 -1
- package/dist/createMigration.d.cts +5 -12
- package/dist/createMigration.d.cts.map +1 -1
- package/dist/createMigration.d.ts +5 -12
- package/dist/createMigration.d.ts.map +1 -1
- package/dist/createMigration.js +5 -9
- package/dist/createMigration.js.map +1 -1
- package/dist/createWriteClient.cjs +10 -16
- package/dist/createWriteClient.cjs.map +1 -1
- package/dist/createWriteClient.d.cts +10 -16
- package/dist/createWriteClient.d.cts.map +1 -1
- package/dist/createWriteClient.d.ts +10 -16
- package/dist/createWriteClient.d.ts.map +1 -1
- package/dist/createWriteClient.js +9 -15
- package/dist/createWriteClient.js.map +1 -1
- package/dist/errors.cjs +1 -2
- 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 +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/filter.cjs +6 -20
- package/dist/filter.cjs.map +1 -1
- package/dist/filter.d.cts +59 -63
- package/dist/filter.d.cts.map +1 -1
- package/dist/filter.d.ts +59 -63
- package/dist/filter.d.ts.map +1 -1
- package/dist/filter.js +6 -19
- package/dist/filter.js.map +1 -1
- package/dist/getGraphQLEndpoint.cjs +3 -6
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.d.cts +0 -2
- package/dist/getGraphQLEndpoint.d.cts.map +1 -1
- package/dist/getGraphQLEndpoint.d.ts +0 -2
- package/dist/getGraphQLEndpoint.d.ts.map +1 -1
- package/dist/getGraphQLEndpoint.js +1 -4
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs +7 -12
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.d.cts +4 -8
- package/dist/getRepositoryEndpoint.d.cts.map +1 -1
- package/dist/getRepositoryEndpoint.d.ts +4 -8
- package/dist/getRepositoryEndpoint.d.ts.map +1 -1
- package/dist/getRepositoryEndpoint.js +5 -10
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs +4 -8
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.d.cts +2 -5
- package/dist/getRepositoryName.d.cts.map +1 -1
- package/dist/getRepositoryName.d.ts +2 -5
- package/dist/getRepositoryName.d.ts.map +1 -1
- package/dist/getRepositoryName.js +3 -7
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs +20 -23
- package/dist/getToolbarSrc.cjs.map +1 -1
- package/dist/getToolbarSrc.d.cts +17 -19
- package/dist/getToolbarSrc.d.cts.map +1 -1
- package/dist/getToolbarSrc.d.ts +17 -19
- package/dist/getToolbarSrc.d.ts.map +1 -1
- package/dist/getToolbarSrc.js +18 -21
- package/dist/getToolbarSrc.js.map +1 -1
- package/dist/helpers/asDate.cjs +7 -11
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.d.cts +5 -11
- package/dist/helpers/asDate.d.cts.map +1 -1
- package/dist/helpers/asDate.d.ts +5 -11
- package/dist/helpers/asDate.d.ts.map +1 -1
- package/dist/helpers/asDate.js +7 -10
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs +30 -32
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.cts +29 -56
- package/dist/helpers/asHTML.d.cts.map +1 -1
- package/dist/helpers/asHTML.d.ts +29 -56
- package/dist/helpers/asHTML.d.ts.map +1 -1
- package/dist/helpers/asHTML.js +26 -28
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +24 -31
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts +25 -37
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +25 -37
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.js +23 -30
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs +9 -15
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.cts +8 -16
- package/dist/helpers/asImageSrc.d.cts.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +8 -16
- package/dist/helpers/asImageSrc.d.ts.map +1 -1
- package/dist/helpers/asImageSrc.js +8 -14
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs +29 -37
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.cts +29 -42
- package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +29 -42
- package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.js +28 -36
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs +3 -4
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.cts +15 -33
- package/dist/helpers/asLink.d.cts.map +1 -1
- package/dist/helpers/asLink.d.ts +15 -33
- package/dist/helpers/asLink.d.ts.map +1 -1
- package/dist/helpers/asLink.js +1 -2
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs +12 -16
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.cts +9 -14
- package/dist/helpers/asLinkAttrs.d.cts.map +1 -1
- package/dist/helpers/asLinkAttrs.d.ts +9 -14
- package/dist/helpers/asLinkAttrs.d.ts.map +1 -1
- package/dist/helpers/asLinkAttrs.js +9 -13
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs +4 -5
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.cts +10 -24
- package/dist/helpers/asText.d.cts.map +1 -1
- package/dist/helpers/asText.d.ts +10 -24
- package/dist/helpers/asText.d.ts.map +1 -1
- package/dist/helpers/asText.js +5 -6
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs +4 -10
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.d.cts +1 -5
- package/dist/helpers/documentToLinkField.d.cts.map +1 -1
- package/dist/helpers/documentToLinkField.d.ts +1 -5
- package/dist/helpers/documentToLinkField.d.ts.map +1 -1
- package/dist/helpers/documentToLinkField.js +3 -9
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs +19 -48
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.d.cts +8 -32
- package/dist/helpers/isFilled.d.cts.map +1 -1
- package/dist/helpers/isFilled.d.ts +8 -32
- package/dist/helpers/isFilled.d.ts.map +1 -1
- package/dist/helpers/isFilled.js +15 -43
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/helpers/mapSliceZone.cjs +9 -12
- package/dist/helpers/mapSliceZone.cjs.map +1 -1
- package/dist/helpers/mapSliceZone.d.cts +35 -64
- package/dist/helpers/mapSliceZone.d.cts.map +1 -1
- package/dist/helpers/mapSliceZone.d.ts +35 -64
- package/dist/helpers/mapSliceZone.d.ts.map +1 -1
- package/dist/helpers/mapSliceZone.js +9 -11
- package/dist/helpers/mapSliceZone.js.map +1 -1
- package/dist/index.cjs +52 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -50
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +36 -50
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -19
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.cjs +4 -6
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.d.cts +3 -4
- package/dist/isRepositoryEndpoint.d.cts.map +1 -1
- package/dist/isRepositoryEndpoint.d.ts +3 -4
- package/dist/isRepositoryEndpoint.d.ts.map +1 -1
- package/dist/isRepositoryEndpoint.js +4 -5
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs +2 -4
- package/dist/isRepositoryName.cjs.map +1 -1
- package/dist/isRepositoryName.d.cts +1 -2
- package/dist/isRepositoryName.d.cts.map +1 -1
- package/dist/isRepositoryName.d.ts +1 -2
- package/dist/isRepositoryName.d.ts.map +1 -1
- package/dist/isRepositoryName.js +2 -3
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/devMsg.cjs +8 -11
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js +7 -10
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/escapeHTML.cjs +1 -2
- package/dist/lib/escapeHTML.cjs.map +1 -1
- package/dist/lib/escapeHTML.js +1 -1
- package/dist/lib/getOptionalLinkProperties.cjs +6 -8
- package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
- package/dist/lib/getOptionalLinkProperties.js +6 -7
- package/dist/lib/getOptionalLinkProperties.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs +4 -7
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.js +4 -7
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/isInternalURL.cjs +1 -3
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js +1 -2
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/isMigrationValue.cjs +13 -24
- package/dist/lib/isMigrationValue.cjs.map +1 -1
- package/dist/lib/isMigrationValue.js +8 -19
- package/dist/lib/isMigrationValue.js.map +1 -1
- package/dist/lib/isValue.cjs +5 -20
- package/dist/lib/isValue.cjs.map +1 -1
- package/dist/lib/isValue.js +3 -18
- package/dist/lib/isValue.js.map +1 -1
- package/dist/lib/pLimit.cjs +6 -9
- package/dist/lib/pLimit.cjs.map +1 -1
- package/dist/lib/pLimit.js +6 -8
- package/dist/lib/pLimit.js.map +1 -1
- package/dist/lib/request.cjs +19 -30
- package/dist/lib/request.cjs.map +1 -1
- package/dist/lib/request.d.cts +8 -21
- package/dist/lib/request.d.cts.map +1 -1
- package/dist/lib/request.d.ts +8 -21
- package/dist/lib/request.d.ts.map +1 -1
- package/dist/lib/request.js +18 -29
- package/dist/lib/request.js.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.cjs +22 -31
- package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.js +17 -26
- package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs +4 -5
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.js +1 -2
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/lib/throttledWarn.cjs +4 -6
- package/dist/lib/throttledWarn.cjs.map +1 -1
- package/dist/lib/throttledWarn.js +4 -5
- package/dist/lib/throttledWarn.js.map +1 -1
- package/dist/lib/validateAssetMetadata.cjs +8 -21
- package/dist/lib/validateAssetMetadata.cjs.map +1 -1
- package/dist/lib/validateAssetMetadata.js +7 -20
- package/dist/lib/validateAssetMetadata.js.map +1 -1
- package/dist/package.cjs +12 -13
- package/dist/package.cjs.map +1 -1
- package/dist/package.js +2 -2
- package/dist/package.js.map +1 -1
- package/dist/richtext/asText.cjs +1 -4
- package/dist/richtext/asText.cjs.map +1 -1
- package/dist/richtext/asText.d.cts +0 -3
- package/dist/richtext/asText.d.cts.map +1 -1
- package/dist/richtext/asText.d.ts +0 -3
- package/dist/richtext/asText.d.ts.map +1 -1
- package/dist/richtext/asText.js +1 -3
- package/dist/richtext/asText.js.map +1 -1
- package/dist/richtext/asTree.cjs +4 -7
- package/dist/richtext/asTree.cjs.map +1 -1
- package/dist/richtext/asTree.d.cts +2 -5
- package/dist/richtext/asTree.d.cts.map +1 -1
- package/dist/richtext/asTree.d.ts +2 -5
- package/dist/richtext/asTree.d.ts.map +1 -1
- package/dist/richtext/asTree.js +3 -6
- package/dist/richtext/asTree.js.map +1 -1
- package/dist/richtext/composeSerializers.cjs +5 -9
- package/dist/richtext/composeSerializers.cjs.map +1 -1
- package/dist/richtext/composeSerializers.d.cts +4 -8
- package/dist/richtext/composeSerializers.d.cts.map +1 -1
- package/dist/richtext/composeSerializers.d.ts +4 -8
- package/dist/richtext/composeSerializers.d.ts.map +1 -1
- package/dist/richtext/composeSerializers.js +5 -8
- package/dist/richtext/composeSerializers.js.map +1 -1
- package/dist/richtext/serialize.cjs +4 -9
- package/dist/richtext/serialize.cjs.map +1 -1
- package/dist/richtext/serialize.d.cts +2 -7
- package/dist/richtext/serialize.d.cts.map +1 -1
- package/dist/richtext/serialize.d.ts +2 -7
- package/dist/richtext/serialize.d.ts.map +1 -1
- package/dist/richtext/serialize.js +3 -8
- package/dist/richtext/serialize.js.map +1 -1
- package/dist/richtext/types.cjs +2 -3
- package/dist/richtext/types.cjs.map +1 -1
- package/dist/richtext/types.d.cts +3 -8
- package/dist/richtext/types.d.cts.map +1 -1
- package/dist/richtext/types.d.ts +3 -8
- package/dist/richtext/types.d.ts.map +1 -1
- package/dist/richtext/types.js +1 -2
- package/dist/richtext/types.js.map +1 -1
- package/dist/richtext/wrapMapSerializer.cjs +4 -8
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.cts +2 -6
- package/dist/richtext/wrapMapSerializer.d.cts.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.ts +2 -6
- package/dist/richtext/wrapMapSerializer.d.ts.map +1 -1
- package/dist/richtext/wrapMapSerializer.js +3 -7
- package/dist/richtext/wrapMapSerializer.js.map +1 -1
- package/dist/richtext.cjs +8 -8
- package/dist/richtext.js +1 -2
- package/dist/types/api/asset/asset.d.cts +17 -71
- package/dist/types/api/asset/asset.d.cts.map +1 -1
- package/dist/types/api/asset/asset.d.ts +17 -71
- package/dist/types/api/asset/asset.d.ts.map +1 -1
- package/dist/types/api/asset/tag.d.cts +5 -23
- package/dist/types/api/asset/tag.d.cts.map +1 -1
- package/dist/types/api/asset/tag.d.ts +5 -23
- package/dist/types/api/asset/tag.d.ts.map +1 -1
- package/dist/types/api/integration.d.cts +2 -5
- package/dist/types/api/integration.d.cts.map +1 -1
- package/dist/types/api/integration.d.ts +2 -5
- package/dist/types/api/integration.d.ts.map +1 -1
- package/dist/types/api/query.d.cts +10 -28
- package/dist/types/api/query.d.cts.map +1 -1
- package/dist/types/api/query.d.ts +10 -28
- package/dist/types/api/query.d.ts.map +1 -1
- package/dist/types/api/ref.d.cts +6 -16
- package/dist/types/api/ref.d.cts.map +1 -1
- package/dist/types/api/ref.d.ts +6 -16
- package/dist/types/api/ref.d.ts.map +1 -1
- package/dist/types/api/release.d.cts +1 -3
- package/dist/types/api/release.d.cts.map +1 -1
- package/dist/types/api/release.d.ts +1 -3
- package/dist/types/api/release.d.ts.map +1 -1
- package/dist/types/api/repository.d.cts +18 -46
- package/dist/types/api/repository.d.cts.map +1 -1
- package/dist/types/api/repository.d.ts +18 -46
- package/dist/types/api/repository.d.ts.map +1 -1
- package/dist/types/api/tags.d.cts +2 -3
- package/dist/types/api/tags.d.cts.map +1 -1
- package/dist/types/api/tags.d.ts +2 -3
- package/dist/types/api/tags.d.ts.map +1 -1
- package/dist/types/migration/Asset.cjs +5 -15
- package/dist/types/migration/Asset.cjs.map +1 -1
- package/dist/types/migration/Asset.d.cts +20 -67
- package/dist/types/migration/Asset.d.cts.map +1 -1
- package/dist/types/migration/Asset.d.ts +20 -67
- package/dist/types/migration/Asset.d.ts.map +1 -1
- package/dist/types/migration/Asset.js +5 -14
- package/dist/types/migration/Asset.js.map +1 -1
- package/dist/types/migration/ContentRelationship.d.cts +1 -3
- package/dist/types/migration/ContentRelationship.d.cts.map +1 -1
- package/dist/types/migration/ContentRelationship.d.ts +1 -3
- package/dist/types/migration/ContentRelationship.d.ts.map +1 -1
- package/dist/types/migration/Document.cjs +11 -21
- package/dist/types/migration/Document.cjs.map +1 -1
- package/dist/types/migration/Document.d.cts +12 -32
- package/dist/types/migration/Document.d.cts.map +1 -1
- package/dist/types/migration/Document.d.ts +12 -32
- package/dist/types/migration/Document.d.ts.map +1 -1
- package/dist/types/migration/Document.js +11 -20
- package/dist/types/migration/Document.js.map +1 -1
- package/dist/types/model/boolean.d.cts +0 -1
- package/dist/types/model/boolean.d.cts.map +1 -1
- package/dist/types/model/boolean.d.ts +0 -1
- package/dist/types/model/boolean.d.ts.map +1 -1
- package/dist/types/model/color.d.cts +0 -1
- package/dist/types/model/color.d.cts.map +1 -1
- package/dist/types/model/color.d.ts +0 -1
- package/dist/types/model/color.d.ts.map +1 -1
- package/dist/types/model/contentRelationship.d.cts +5 -16
- package/dist/types/model/contentRelationship.d.cts.map +1 -1
- package/dist/types/model/contentRelationship.d.ts +5 -16
- package/dist/types/model/contentRelationship.d.ts.map +1 -1
- package/dist/types/model/customType.d.cts +6 -18
- package/dist/types/model/customType.d.cts.map +1 -1
- package/dist/types/model/customType.d.ts +6 -18
- package/dist/types/model/customType.d.ts.map +1 -1
- package/dist/types/model/date.d.cts +0 -1
- package/dist/types/model/date.d.cts.map +1 -1
- package/dist/types/model/date.d.ts +0 -1
- package/dist/types/model/date.d.ts.map +1 -1
- package/dist/types/model/embed.d.cts +0 -1
- package/dist/types/model/embed.d.cts.map +1 -1
- package/dist/types/model/embed.d.ts +0 -1
- package/dist/types/model/embed.d.ts.map +1 -1
- package/dist/types/model/geoPoint.d.cts +0 -1
- package/dist/types/model/geoPoint.d.cts.map +1 -1
- package/dist/types/model/geoPoint.d.ts +0 -1
- package/dist/types/model/geoPoint.d.ts.map +1 -1
- package/dist/types/model/group.d.cts +0 -1
- package/dist/types/model/group.d.cts.map +1 -1
- package/dist/types/model/group.d.ts +0 -1
- package/dist/types/model/group.d.ts.map +1 -1
- package/dist/types/model/image.d.cts +0 -1
- package/dist/types/model/image.d.cts.map +1 -1
- package/dist/types/model/image.d.ts +0 -1
- package/dist/types/model/image.d.ts.map +1 -1
- package/dist/types/model/integration.d.cts +0 -1
- package/dist/types/model/integration.d.cts.map +1 -1
- package/dist/types/model/integration.d.ts +0 -1
- package/dist/types/model/integration.d.ts.map +1 -1
- package/dist/types/model/keyText.d.cts +0 -1
- package/dist/types/model/keyText.d.cts.map +1 -1
- package/dist/types/model/keyText.d.ts +0 -1
- package/dist/types/model/keyText.d.ts.map +1 -1
- package/dist/types/model/link.cjs +1 -2
- package/dist/types/model/link.cjs.map +1 -1
- package/dist/types/model/link.d.cts +0 -1
- package/dist/types/model/link.d.cts.map +1 -1
- package/dist/types/model/link.d.ts +0 -1
- package/dist/types/model/link.d.ts.map +1 -1
- package/dist/types/model/link.js +1 -1
- package/dist/types/model/linkToMedia.d.cts +0 -1
- package/dist/types/model/linkToMedia.d.cts.map +1 -1
- package/dist/types/model/linkToMedia.d.ts +0 -1
- package/dist/types/model/linkToMedia.d.ts.map +1 -1
- package/dist/types/model/number.d.cts +0 -1
- package/dist/types/model/number.d.cts.map +1 -1
- package/dist/types/model/number.d.ts +0 -1
- package/dist/types/model/number.d.ts.map +1 -1
- package/dist/types/model/range.d.cts +1 -4
- package/dist/types/model/range.d.cts.map +1 -1
- package/dist/types/model/range.d.ts +1 -4
- package/dist/types/model/range.d.ts.map +1 -1
- package/dist/types/model/richText.d.cts +0 -1
- package/dist/types/model/richText.d.cts.map +1 -1
- package/dist/types/model/richText.d.ts +0 -1
- package/dist/types/model/richText.d.ts.map +1 -1
- package/dist/types/model/select.d.cts +0 -1
- package/dist/types/model/select.d.cts.map +1 -1
- package/dist/types/model/select.d.ts +0 -1
- package/dist/types/model/select.d.ts.map +1 -1
- package/dist/types/model/separator.d.cts +1 -4
- package/dist/types/model/separator.d.cts.map +1 -1
- package/dist/types/model/separator.d.ts +1 -4
- package/dist/types/model/separator.d.ts.map +1 -1
- package/dist/types/model/sharedSlice.d.cts +0 -1
- package/dist/types/model/sharedSlice.d.cts.map +1 -1
- package/dist/types/model/sharedSlice.d.ts +0 -1
- package/dist/types/model/sharedSlice.d.ts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.cts +0 -1
- package/dist/types/model/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.ts +0 -1
- package/dist/types/model/sharedSliceVariation.d.ts.map +1 -1
- package/dist/types/model/slice.cjs +1 -2
- package/dist/types/model/slice.cjs.map +1 -1
- package/dist/types/model/slice.d.cts +1 -4
- package/dist/types/model/slice.d.cts.map +1 -1
- package/dist/types/model/slice.d.ts +1 -4
- package/dist/types/model/slice.d.ts.map +1 -1
- package/dist/types/model/slice.js +1 -1
- package/dist/types/model/slice.js.map +1 -1
- package/dist/types/model/sliceZone.cjs +1 -2
- package/dist/types/model/sliceZone.cjs.map +1 -1
- package/dist/types/model/sliceZone.d.cts +0 -1
- package/dist/types/model/sliceZone.d.cts.map +1 -1
- package/dist/types/model/sliceZone.d.ts +0 -1
- package/dist/types/model/sliceZone.d.ts.map +1 -1
- package/dist/types/model/sliceZone.js +1 -1
- package/dist/types/model/sliceZone.js.map +1 -1
- package/dist/types/model/table.d.cts +0 -1
- package/dist/types/model/table.d.cts.map +1 -1
- package/dist/types/model/table.d.ts +0 -1
- package/dist/types/model/table.d.ts.map +1 -1
- package/dist/types/model/timestamp.d.cts +0 -1
- package/dist/types/model/timestamp.d.cts.map +1 -1
- package/dist/types/model/timestamp.d.ts +0 -1
- package/dist/types/model/timestamp.d.ts.map +1 -1
- package/dist/types/model/title.d.cts +0 -1
- package/dist/types/model/title.d.cts.map +1 -1
- package/dist/types/model/title.d.ts +0 -1
- package/dist/types/model/title.d.ts.map +1 -1
- package/dist/types/model/types.cjs +2 -5
- package/dist/types/model/types.cjs.map +1 -1
- package/dist/types/model/types.d.cts +9 -32
- package/dist/types/model/types.d.cts.map +1 -1
- package/dist/types/model/types.d.ts +9 -32
- package/dist/types/model/types.d.ts.map +1 -1
- package/dist/types/model/types.js +2 -4
- package/dist/types/model/types.js.map +1 -1
- package/dist/types/model/uid.d.cts +0 -1
- package/dist/types/model/uid.d.cts.map +1 -1
- package/dist/types/model/uid.d.ts +0 -1
- package/dist/types/model/uid.d.ts.map +1 -1
- package/dist/types/value/boolean.d.cts.map +1 -1
- package/dist/types/value/boolean.d.ts.map +1 -1
- package/dist/types/value/color.d.cts +0 -2
- package/dist/types/value/color.d.cts.map +1 -1
- package/dist/types/value/color.d.ts +0 -2
- package/dist/types/value/color.d.ts.map +1 -1
- package/dist/types/value/contentRelationship.d.cts +3 -6
- package/dist/types/value/contentRelationship.d.cts.map +1 -1
- package/dist/types/value/contentRelationship.d.ts +3 -6
- package/dist/types/value/contentRelationship.d.ts.map +1 -1
- package/dist/types/value/date.d.cts +0 -2
- package/dist/types/value/date.d.cts.map +1 -1
- package/dist/types/value/date.d.ts +0 -2
- package/dist/types/value/date.d.ts.map +1 -1
- package/dist/types/value/document.d.cts +23 -51
- package/dist/types/value/document.d.cts.map +1 -1
- package/dist/types/value/document.d.ts +23 -51
- package/dist/types/value/document.d.ts.map +1 -1
- package/dist/types/value/embed.cjs +2 -3
- package/dist/types/value/embed.cjs.map +1 -1
- package/dist/types/value/embed.d.cts +28 -96
- package/dist/types/value/embed.d.cts.map +1 -1
- package/dist/types/value/embed.d.ts +28 -96
- package/dist/types/value/embed.d.ts.map +1 -1
- package/dist/types/value/embed.js +2 -2
- package/dist/types/value/embed.js.map +1 -1
- package/dist/types/value/geoPoint.d.cts +0 -2
- package/dist/types/value/geoPoint.d.cts.map +1 -1
- package/dist/types/value/geoPoint.d.ts +0 -2
- package/dist/types/value/geoPoint.d.ts.map +1 -1
- package/dist/types/value/group.d.cts +0 -1
- package/dist/types/value/group.d.cts.map +1 -1
- package/dist/types/value/group.d.ts +0 -1
- package/dist/types/value/group.d.ts.map +1 -1
- package/dist/types/value/image.d.cts +5 -9
- package/dist/types/value/image.d.cts.map +1 -1
- package/dist/types/value/image.d.ts +5 -9
- package/dist/types/value/image.d.ts.map +1 -1
- package/dist/types/value/integration.d.cts +0 -2
- package/dist/types/value/integration.d.cts.map +1 -1
- package/dist/types/value/integration.d.ts +0 -2
- package/dist/types/value/integration.d.ts.map +1 -1
- package/dist/types/value/keyText.d.cts +0 -2
- package/dist/types/value/keyText.d.cts.map +1 -1
- package/dist/types/value/keyText.d.ts +0 -2
- package/dist/types/value/keyText.d.ts.map +1 -1
- package/dist/types/value/link.cjs +2 -5
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.cts +8 -13
- package/dist/types/value/link.d.cts.map +1 -1
- package/dist/types/value/link.d.ts +8 -13
- package/dist/types/value/link.d.ts.map +1 -1
- package/dist/types/value/link.js +2 -4
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/linkToMedia.d.cts +0 -1
- package/dist/types/value/linkToMedia.d.cts.map +1 -1
- package/dist/types/value/linkToMedia.d.ts +0 -1
- package/dist/types/value/linkToMedia.d.ts.map +1 -1
- package/dist/types/value/number.d.cts +0 -2
- package/dist/types/value/number.d.cts.map +1 -1
- package/dist/types/value/number.d.ts +0 -2
- package/dist/types/value/number.d.ts.map +1 -1
- package/dist/types/value/richText.cjs +1 -2
- package/dist/types/value/richText.cjs.map +1 -1
- package/dist/types/value/richText.d.cts +26 -78
- package/dist/types/value/richText.d.cts.map +1 -1
- package/dist/types/value/richText.d.ts +26 -78
- package/dist/types/value/richText.d.ts.map +1 -1
- package/dist/types/value/richText.js +1 -1
- package/dist/types/value/richText.js.map +1 -1
- package/dist/types/value/select.d.cts +0 -2
- package/dist/types/value/select.d.cts.map +1 -1
- package/dist/types/value/select.d.ts +0 -2
- package/dist/types/value/select.d.ts.map +1 -1
- package/dist/types/value/sharedSlice.d.cts +0 -1
- package/dist/types/value/sharedSlice.d.cts.map +1 -1
- package/dist/types/value/sharedSlice.d.ts +0 -1
- package/dist/types/value/sharedSlice.d.ts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.cts +1 -4
- package/dist/types/value/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.ts +1 -4
- package/dist/types/value/sharedSliceVariation.d.ts.map +1 -1
- package/dist/types/value/slice.d.cts +0 -1
- package/dist/types/value/slice.d.cts.map +1 -1
- package/dist/types/value/slice.d.ts +0 -1
- package/dist/types/value/slice.d.ts.map +1 -1
- package/dist/types/value/sliceZone.d.cts +3 -5
- package/dist/types/value/sliceZone.d.cts.map +1 -1
- package/dist/types/value/sliceZone.d.ts +3 -5
- package/dist/types/value/sliceZone.d.ts.map +1 -1
- package/dist/types/value/table.d.cts +14 -64
- package/dist/types/value/table.d.cts.map +1 -1
- package/dist/types/value/table.d.ts +14 -64
- package/dist/types/value/table.d.ts.map +1 -1
- package/dist/types/value/timestamp.d.cts +0 -1
- package/dist/types/value/timestamp.d.cts.map +1 -1
- package/dist/types/value/timestamp.d.ts +0 -1
- package/dist/types/value/timestamp.d.ts.map +1 -1
- package/dist/types/value/title.d.cts +1 -2
- package/dist/types/value/title.d.cts.map +1 -1
- package/dist/types/value/title.d.ts +1 -2
- package/dist/types/value/title.d.ts.map +1 -1
- package/dist/types/value/types.d.cts +11 -25
- package/dist/types/value/types.d.cts.map +1 -1
- package/dist/types/value/types.d.ts +11 -25
- package/dist/types/value/types.d.ts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.cts +1 -4
- package/dist/types/webhook/apiUpdate.d.cts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.ts +1 -4
- package/dist/types/webhook/apiUpdate.d.ts.map +1 -1
- package/dist/types/webhook/testTrigger.d.cts +0 -1
- package/dist/types/webhook/testTrigger.d.cts.map +1 -1
- package/dist/types/webhook/testTrigger.d.ts +0 -1
- package/dist/types/webhook/testTrigger.d.ts.map +1 -1
- package/dist/types/webhook/types.cjs +1 -2
- package/dist/types/webhook/types.cjs.map +1 -1
- package/dist/types/webhook/types.d.cts.map +1 -1
- package/dist/types/webhook/types.d.ts.map +1 -1
- package/dist/types/webhook/types.js +1 -1
- package/package.json +40 -42
- package/src/Client.ts +236 -399
- package/src/Migration.ts +80 -139
- package/src/WriteClient.ts +66 -176
- package/src/buildQueryURL.ts +68 -100
- package/src/cookie.ts +1 -4
- package/src/createClient.ts +12 -20
- package/src/createMigration.ts +8 -16
- package/src/createWriteClient.ts +11 -19
- package/src/errors.ts +5 -15
- package/src/filter.ts +79 -122
- package/src/getGraphQLEndpoint.ts +0 -3
- package/src/getRepositoryEndpoint.ts +4 -9
- package/src/getRepositoryName.ts +2 -5
- package/src/getToolbarSrc.ts +17 -20
- package/src/helpers/asDate.ts +13 -18
- package/src/helpers/asHTML.ts +55 -102
- package/src/helpers/asImagePixelDensitySrcSet.ts +29 -49
- package/src/helpers/asImageSrc.ts +8 -16
- package/src/helpers/asImageWidthSrcSet.ts +34 -52
- package/src/helpers/asLink.ts +26 -54
- package/src/helpers/asLinkAttrs.ts +14 -29
- package/src/helpers/asText.ts +15 -31
- package/src/helpers/documentToLinkField.ts +4 -15
- package/src/helpers/isFilled.ts +14 -51
- package/src/helpers/mapSliceZone.ts +42 -84
- package/src/index.ts +18 -68
- package/src/isRepositoryEndpoint.ts +3 -4
- package/src/isRepositoryName.ts +1 -2
- package/src/lib/devMsg.ts +6 -8
- package/src/lib/getOptionalLinkProperties.ts +5 -6
- package/src/lib/getPreviewCookie.ts +1 -3
- package/src/lib/isInternalURL.ts +0 -1
- package/src/lib/isMigrationValue.ts +9 -22
- package/src/lib/isValue.ts +9 -38
- package/src/lib/pLimit.ts +9 -16
- package/src/lib/request.ts +22 -45
- package/src/lib/resolveMigrationDocumentData.ts +8 -27
- package/src/lib/serializerHelpers.ts +9 -29
- package/src/lib/throttledWarn.ts +4 -8
- package/src/lib/validateAssetMetadata.ts +17 -43
- package/src/richtext/asText.ts +2 -8
- package/src/richtext/asTree.ts +8 -26
- package/src/richtext/composeSerializers.ts +5 -11
- package/src/richtext/serialize.ts +4 -12
- package/src/richtext/types.ts +13 -57
- package/src/richtext/wrapMapSerializer.ts +4 -8
- package/src/types/api/asset/asset.ts +26 -77
- package/src/types/api/asset/tag.ts +6 -18
- package/src/types/api/integration.ts +4 -10
- package/src/types/api/migration/document.ts +11 -27
- package/src/types/api/query.ts +10 -27
- package/src/types/api/ref.ts +6 -16
- package/src/types/api/release.ts +1 -2
- package/src/types/api/repository.ts +18 -45
- package/src/types/api/tags.ts +2 -3
- package/src/types/migration/Asset.ts +26 -82
- package/src/types/migration/ContentRelationship.ts +5 -12
- package/src/types/migration/Document.ts +26 -52
- package/src/types/migration/Link.ts +7 -9
- package/src/types/model/contentRelationship.ts +7 -20
- package/src/types/model/customType.ts +7 -21
- package/src/types/model/image.ts +4 -5
- package/src/types/model/linkToMedia.ts +1 -2
- package/src/types/model/range.ts +1 -3
- package/src/types/model/separator.ts +1 -3
- package/src/types/model/sharedSliceVariation.ts +4 -4
- package/src/types/model/slice.ts +7 -12
- package/src/types/model/sliceZone.ts +4 -11
- package/src/types/model/types.ts +10 -31
- package/src/types/value/color.ts +3 -3
- package/src/types/value/contentRelationship.ts +8 -13
- package/src/types/value/date.ts +1 -3
- package/src/types/value/document.ts +24 -52
- package/src/types/value/embed.ts +33 -80
- package/src/types/value/geoPoint.ts +6 -8
- package/src/types/value/group.ts +1 -4
- package/src/types/value/image.ts +10 -14
- package/src/types/value/integration.ts +0 -1
- package/src/types/value/keyText.ts +3 -3
- package/src/types/value/link.ts +14 -22
- package/src/types/value/linkToMedia.ts +2 -5
- package/src/types/value/number.ts +3 -3
- package/src/types/value/richText.ts +30 -82
- package/src/types/value/select.ts +0 -1
- package/src/types/value/sharedSliceVariation.ts +3 -11
- package/src/types/value/slice.ts +2 -8
- package/src/types/value/sliceZone.ts +4 -6
- package/src/types/value/table.ts +25 -64
- package/src/types/value/timestamp.ts +3 -2
- package/src/types/value/title.ts +16 -18
- package/src/types/value/types.ts +8 -21
- package/src/types/webhook/apiUpdate.ts +1 -3
- package/dist/_virtual/rolldown_runtime.js +0 -13
package/dist/types/api/ref.d.cts
CHANGED
|
@@ -5,27 +5,17 @@
|
|
|
5
5
|
* @see More details on refs: {@link https://prismic.io/docs/api#refs-and-the-entry-api}
|
|
6
6
|
*/
|
|
7
7
|
interface Ref {
|
|
8
|
-
/**
|
|
9
|
-
* The unique identifier for the ref.
|
|
10
|
-
*/
|
|
8
|
+
/** The unique identifier for the ref. */
|
|
11
9
|
id: string;
|
|
12
|
-
/**
|
|
13
|
-
* The identifier that should be provided to the API to select a content
|
|
14
|
-
* version.
|
|
15
|
-
*/
|
|
10
|
+
/** The identifier that should be provided to the API to select a content version. */
|
|
16
11
|
ref: string;
|
|
17
|
-
/**
|
|
18
|
-
* A human-readable name for the ref. The master ref is always named "Master".
|
|
19
|
-
*/
|
|
12
|
+
/** A human-readable name for the ref. The master ref is always named "Master". */
|
|
20
13
|
label: string;
|
|
21
|
-
/**
|
|
22
|
-
* Determines if the ref is the master ref. The master ref contains the latest
|
|
23
|
-
* published content.
|
|
24
|
-
*/
|
|
14
|
+
/** Determines if the ref is the master ref. The master ref contains the latest published content. */
|
|
25
15
|
isMasterRef: boolean;
|
|
26
16
|
/**
|
|
27
|
-
* If the ref is associated with a Release, this field contains the timestamp
|
|
28
|
-
*
|
|
17
|
+
* If the ref is associated with a Release, this field contains the timestamp at which the Release
|
|
18
|
+
* will be automatically published, if set.
|
|
29
19
|
*
|
|
30
20
|
* @see More details on Releases: {@link https://prismic.io/docs/guides/draft-plan-and-schedule-content#releases}
|
|
31
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref.d.cts","names":[],"sources":["../../../src/types/api/ref.ts"],"
|
|
1
|
+
{"version":3,"file":"ref.d.cts","names":[],"sources":["../../../src/types/api/ref.ts"],"mappings":";;AAKA;;;;UAAiB,GAAA;EAKhB;EAHA,EAAA;EASA;EANA,GAAA;EAcW;EAXX,KAAA;;EAGA,WAAA;;;;;;;EAQA,WAAA;AAAA"}
|
package/dist/types/api/ref.d.ts
CHANGED
|
@@ -5,27 +5,17 @@
|
|
|
5
5
|
* @see More details on refs: {@link https://prismic.io/docs/api#refs-and-the-entry-api}
|
|
6
6
|
*/
|
|
7
7
|
interface Ref {
|
|
8
|
-
/**
|
|
9
|
-
* The unique identifier for the ref.
|
|
10
|
-
*/
|
|
8
|
+
/** The unique identifier for the ref. */
|
|
11
9
|
id: string;
|
|
12
|
-
/**
|
|
13
|
-
* The identifier that should be provided to the API to select a content
|
|
14
|
-
* version.
|
|
15
|
-
*/
|
|
10
|
+
/** The identifier that should be provided to the API to select a content version. */
|
|
16
11
|
ref: string;
|
|
17
|
-
/**
|
|
18
|
-
* A human-readable name for the ref. The master ref is always named "Master".
|
|
19
|
-
*/
|
|
12
|
+
/** A human-readable name for the ref. The master ref is always named "Master". */
|
|
20
13
|
label: string;
|
|
21
|
-
/**
|
|
22
|
-
* Determines if the ref is the master ref. The master ref contains the latest
|
|
23
|
-
* published content.
|
|
24
|
-
*/
|
|
14
|
+
/** Determines if the ref is the master ref. The master ref contains the latest published content. */
|
|
25
15
|
isMasterRef: boolean;
|
|
26
16
|
/**
|
|
27
|
-
* If the ref is associated with a Release, this field contains the timestamp
|
|
28
|
-
*
|
|
17
|
+
* If the ref is associated with a Release, this field contains the timestamp at which the Release
|
|
18
|
+
* will be automatically published, if set.
|
|
29
19
|
*
|
|
30
20
|
* @see More details on Releases: {@link https://prismic.io/docs/guides/draft-plan-and-schedule-content#releases}
|
|
31
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ref.d.ts","names":[],"sources":["../../../src/types/api/ref.ts"],"
|
|
1
|
+
{"version":3,"file":"ref.d.ts","names":[],"sources":["../../../src/types/api/ref.ts"],"mappings":";;AAKA;;;;UAAiB,GAAA;EAKhB;EAHA,EAAA;EASA;EANA,GAAA;EAcW;EAXX,KAAA;;EAGA,WAAA;;;;;;;EAQA,WAAA;AAAA"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Ref } from "./ref.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/types/api/release.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Metadata for a Release.
|
|
7
6
|
*
|
|
8
7
|
* @remarks
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* This is an alias for `Ref`.
|
|
11
9
|
* @see {@link Ref}
|
|
12
10
|
* @see More details on Releases: {@link https://prismic.io/docs/guides/draft-plan-and-schedule-content#releases}
|
|
13
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.cts","names":[],"sources":["../../../src/types/api/release.ts"],"
|
|
1
|
+
{"version":3,"file":"release.d.cts","names":[],"sources":["../../../src/types/api/release.ts"],"mappings":";;;;;AAUA;;;;;;KAAY,OAAA,GAAU,GAAA"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Ref } from "./ref.js";
|
|
2
2
|
|
|
3
3
|
//#region src/types/api/release.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
5
|
* Metadata for a Release.
|
|
7
6
|
*
|
|
8
7
|
* @remarks
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* This is an alias for `Ref`.
|
|
11
9
|
* @see {@link Ref}
|
|
12
10
|
* @see More details on Releases: {@link https://prismic.io/docs/guides/draft-plan-and-schedule-content#releases}
|
|
13
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release.d.ts","names":[],"sources":["../../../src/types/api/release.ts"],"
|
|
1
|
+
{"version":3,"file":"release.d.ts","names":[],"sources":["../../../src/types/api/release.ts"],"mappings":";;;;;AAUA;;;;;;KAAY,OAAA,GAAU,GAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Ref } from "./ref.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/types/api/repository.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
|
-
* Repository metadata returned from the Prismic REST API V2. This data can be
|
|
7
|
-
*
|
|
5
|
+
* Repository metadata returned from the Prismic REST API V2. This data can be fetched by sending a
|
|
6
|
+
* `GET` a request to a repository's `/api/v2` endpoint.
|
|
8
7
|
*
|
|
9
8
|
* @see More details on the `/api/v2` endpoint: {@link https://prismic.io/docs/api#refs-and-the-entry-api}
|
|
10
9
|
*/
|
|
@@ -15,10 +14,7 @@ interface Repository {
|
|
|
15
14
|
* @see {@link Ref}
|
|
16
15
|
*/
|
|
17
16
|
refs: Ref[];
|
|
18
|
-
/**
|
|
19
|
-
* An identifier used to query content with the latest integration fields
|
|
20
|
-
* data.
|
|
21
|
-
*/
|
|
17
|
+
/** An identifier used to query content with the latest integration fields data. */
|
|
22
18
|
integrationFieldsRef: string | null;
|
|
23
19
|
/**
|
|
24
20
|
* A list of languages for the repository.
|
|
@@ -26,14 +22,10 @@ interface Repository {
|
|
|
26
22
|
* @see {@link Language}
|
|
27
23
|
*/
|
|
28
24
|
languages: Language[];
|
|
29
|
-
/**
|
|
30
|
-
* A list of the repository's custom type API IDs mapped to their
|
|
31
|
-
* human-readable name.
|
|
32
|
-
*/
|
|
25
|
+
/** A list of the repository's custom type API IDs mapped to their human-readable name. */
|
|
33
26
|
types: Record<string, string>;
|
|
34
27
|
/**
|
|
35
28
|
* @deprecated Tags are only available in the forms object.
|
|
36
|
-
*
|
|
37
29
|
* @see More details in the blog post "A change to how the Prismic API handles tags": {@link https://prismic.io/blog/a-change-to-how-the-prismic-api-handles-tags}
|
|
38
30
|
*/
|
|
39
31
|
tags: string[];
|
|
@@ -43,51 +35,31 @@ interface Repository {
|
|
|
43
35
|
* @internal
|
|
44
36
|
*/
|
|
45
37
|
forms: Record<string, Form>;
|
|
46
|
-
/**
|
|
47
|
-
* The URL used to begin the OAuth process for the repository.
|
|
48
|
-
*/
|
|
38
|
+
/** The URL used to begin the OAuth process for the repository. */
|
|
49
39
|
oauth_initiate: string;
|
|
50
|
-
/**
|
|
51
|
-
* The token used for the OAuth process for the repository.
|
|
52
|
-
*/
|
|
40
|
+
/** The token used for the OAuth process for the repository. */
|
|
53
41
|
oauth_token: string;
|
|
54
|
-
/**
|
|
55
|
-
* The version of the API.
|
|
56
|
-
*/
|
|
42
|
+
/** The version of the API. */
|
|
57
43
|
version: string;
|
|
58
|
-
/**
|
|
59
|
-
* Licensing information for the repository content.
|
|
60
|
-
*/
|
|
44
|
+
/** Licensing information for the repository content. */
|
|
61
45
|
license: string;
|
|
62
|
-
/**
|
|
63
|
-
* @deprecated Experiments are no longer part of Prismic.
|
|
64
|
-
*/
|
|
46
|
+
/** @deprecated Experiments are no longer part of Prismic. */
|
|
65
47
|
experiments: unknown;
|
|
66
|
-
/**
|
|
67
|
-
* @deprecated Bookmarks are not longer part of Prismic.
|
|
68
|
-
*/
|
|
48
|
+
/** @deprecated Bookmarks are not longer part of Prismic. */
|
|
69
49
|
bookmarks: Record<string, string>;
|
|
70
50
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Metadata for a language that has been configured for a repository.
|
|
73
|
-
*/
|
|
51
|
+
/** Metadata for a language that has been configured for a repository. */
|
|
74
52
|
interface Language {
|
|
75
|
-
/**
|
|
76
|
-
* A unique identifier for the language.
|
|
77
|
-
*/
|
|
53
|
+
/** A unique identifier for the language. */
|
|
78
54
|
id: string;
|
|
79
|
-
/**
|
|
80
|
-
* The name of the language.
|
|
81
|
-
*/
|
|
55
|
+
/** The name of the language. */
|
|
82
56
|
name: string;
|
|
83
|
-
/**
|
|
84
|
-
* Whether or not the language is the default language of the repository.
|
|
85
|
-
*/
|
|
57
|
+
/** Whether or not the language is the default language of the repository. */
|
|
86
58
|
is_master: boolean;
|
|
87
59
|
}
|
|
88
60
|
/**
|
|
89
|
-
* A Prismic REST API V2 feature supported by the repository. It contains
|
|
90
|
-
*
|
|
61
|
+
* A Prismic REST API V2 feature supported by the repository. It contains metadata about the feature
|
|
62
|
+
* and how to interact with it via the API.
|
|
91
63
|
*
|
|
92
64
|
* @internal
|
|
93
65
|
*/
|
|
@@ -100,8 +72,8 @@ interface Form {
|
|
|
100
72
|
fields: Record<string, FormField>;
|
|
101
73
|
}
|
|
102
74
|
/**
|
|
103
|
-
* A field for a feature of the Prismic REST API V2. It contains metadata about
|
|
104
|
-
*
|
|
75
|
+
* A field for a feature of the Prismic REST API V2. It contains metadata about the feature's field
|
|
76
|
+
* and how to interact with it via the API.
|
|
105
77
|
*
|
|
106
78
|
* @internal
|
|
107
79
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.cts","names":[],"sources":["../../../src/types/api/repository.ts"],"
|
|
1
|
+
{"version":3,"file":"repository.d.cts","names":[],"sources":["../../../src/types/api/repository.ts"],"mappings":";;;;;AAQA;;;;UAAiB,UAAA;EAmBT;;;;;EAbP,IAAA,EAAM,GAAA;EAAN;EAGA,oBAAA;EAAA;;;;;EAOA,SAAA,EAAW,QAAA;EAgBX;EAbA,KAAA,EAAO,MAAA;EAae;;;;EAPtB,IAAA;EAsBA;;;;;EAfA,KAAA,EAAO,MAAA,SAAe,IAAA;EAsBE;EAnBxB,cAAA;EAmBwB;EAhBxB,WAAA;EAqBA;EAlBA,OAAA;EAqBS;EAlBT,OAAA;EA2BgB;EAxBhB,WAAA;;EAGA,SAAA,EAAW,MAAA;AAAA;;UAIK,QAAA;EAqBhB;EAnBA,EAAA;EAqBA;EAlBA,IAAA;EAkBuB;EAfvB,SAAA;AAAA;AAwBD;;;;;;AAAA,UAfiB,IAAA;EAChB,MAAA;EACA,OAAA;EACA,MAAA;EACA,IAAA;EACA,GAAA;EACA,MAAA,EAAQ,MAAA,SAAe,SAAA;AAAA;;;;;;;UASP,SAAA;EAChB,IAAA;EACA,QAAA;EACA,OAAA;AAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Ref } from "./ref.js";
|
|
2
2
|
|
|
3
3
|
//#region src/types/api/repository.d.ts
|
|
4
|
-
|
|
5
4
|
/**
|
|
6
|
-
* Repository metadata returned from the Prismic REST API V2. This data can be
|
|
7
|
-
*
|
|
5
|
+
* Repository metadata returned from the Prismic REST API V2. This data can be fetched by sending a
|
|
6
|
+
* `GET` a request to a repository's `/api/v2` endpoint.
|
|
8
7
|
*
|
|
9
8
|
* @see More details on the `/api/v2` endpoint: {@link https://prismic.io/docs/api#refs-and-the-entry-api}
|
|
10
9
|
*/
|
|
@@ -15,10 +14,7 @@ interface Repository {
|
|
|
15
14
|
* @see {@link Ref}
|
|
16
15
|
*/
|
|
17
16
|
refs: Ref[];
|
|
18
|
-
/**
|
|
19
|
-
* An identifier used to query content with the latest integration fields
|
|
20
|
-
* data.
|
|
21
|
-
*/
|
|
17
|
+
/** An identifier used to query content with the latest integration fields data. */
|
|
22
18
|
integrationFieldsRef: string | null;
|
|
23
19
|
/**
|
|
24
20
|
* A list of languages for the repository.
|
|
@@ -26,14 +22,10 @@ interface Repository {
|
|
|
26
22
|
* @see {@link Language}
|
|
27
23
|
*/
|
|
28
24
|
languages: Language[];
|
|
29
|
-
/**
|
|
30
|
-
* A list of the repository's custom type API IDs mapped to their
|
|
31
|
-
* human-readable name.
|
|
32
|
-
*/
|
|
25
|
+
/** A list of the repository's custom type API IDs mapped to their human-readable name. */
|
|
33
26
|
types: Record<string, string>;
|
|
34
27
|
/**
|
|
35
28
|
* @deprecated Tags are only available in the forms object.
|
|
36
|
-
*
|
|
37
29
|
* @see More details in the blog post "A change to how the Prismic API handles tags": {@link https://prismic.io/blog/a-change-to-how-the-prismic-api-handles-tags}
|
|
38
30
|
*/
|
|
39
31
|
tags: string[];
|
|
@@ -43,51 +35,31 @@ interface Repository {
|
|
|
43
35
|
* @internal
|
|
44
36
|
*/
|
|
45
37
|
forms: Record<string, Form>;
|
|
46
|
-
/**
|
|
47
|
-
* The URL used to begin the OAuth process for the repository.
|
|
48
|
-
*/
|
|
38
|
+
/** The URL used to begin the OAuth process for the repository. */
|
|
49
39
|
oauth_initiate: string;
|
|
50
|
-
/**
|
|
51
|
-
* The token used for the OAuth process for the repository.
|
|
52
|
-
*/
|
|
40
|
+
/** The token used for the OAuth process for the repository. */
|
|
53
41
|
oauth_token: string;
|
|
54
|
-
/**
|
|
55
|
-
* The version of the API.
|
|
56
|
-
*/
|
|
42
|
+
/** The version of the API. */
|
|
57
43
|
version: string;
|
|
58
|
-
/**
|
|
59
|
-
* Licensing information for the repository content.
|
|
60
|
-
*/
|
|
44
|
+
/** Licensing information for the repository content. */
|
|
61
45
|
license: string;
|
|
62
|
-
/**
|
|
63
|
-
* @deprecated Experiments are no longer part of Prismic.
|
|
64
|
-
*/
|
|
46
|
+
/** @deprecated Experiments are no longer part of Prismic. */
|
|
65
47
|
experiments: unknown;
|
|
66
|
-
/**
|
|
67
|
-
* @deprecated Bookmarks are not longer part of Prismic.
|
|
68
|
-
*/
|
|
48
|
+
/** @deprecated Bookmarks are not longer part of Prismic. */
|
|
69
49
|
bookmarks: Record<string, string>;
|
|
70
50
|
}
|
|
71
|
-
/**
|
|
72
|
-
* Metadata for a language that has been configured for a repository.
|
|
73
|
-
*/
|
|
51
|
+
/** Metadata for a language that has been configured for a repository. */
|
|
74
52
|
interface Language {
|
|
75
|
-
/**
|
|
76
|
-
* A unique identifier for the language.
|
|
77
|
-
*/
|
|
53
|
+
/** A unique identifier for the language. */
|
|
78
54
|
id: string;
|
|
79
|
-
/**
|
|
80
|
-
* The name of the language.
|
|
81
|
-
*/
|
|
55
|
+
/** The name of the language. */
|
|
82
56
|
name: string;
|
|
83
|
-
/**
|
|
84
|
-
* Whether or not the language is the default language of the repository.
|
|
85
|
-
*/
|
|
57
|
+
/** Whether or not the language is the default language of the repository. */
|
|
86
58
|
is_master: boolean;
|
|
87
59
|
}
|
|
88
60
|
/**
|
|
89
|
-
* A Prismic REST API V2 feature supported by the repository. It contains
|
|
90
|
-
*
|
|
61
|
+
* A Prismic REST API V2 feature supported by the repository. It contains metadata about the feature
|
|
62
|
+
* and how to interact with it via the API.
|
|
91
63
|
*
|
|
92
64
|
* @internal
|
|
93
65
|
*/
|
|
@@ -100,8 +72,8 @@ interface Form {
|
|
|
100
72
|
fields: Record<string, FormField>;
|
|
101
73
|
}
|
|
102
74
|
/**
|
|
103
|
-
* A field for a feature of the Prismic REST API V2. It contains metadata about
|
|
104
|
-
*
|
|
75
|
+
* A field for a feature of the Prismic REST API V2. It contains metadata about the feature's field
|
|
76
|
+
* and how to interact with it via the API.
|
|
105
77
|
*
|
|
106
78
|
* @internal
|
|
107
79
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository.d.ts","names":[],"sources":["../../../src/types/api/repository.ts"],"
|
|
1
|
+
{"version":3,"file":"repository.d.ts","names":[],"sources":["../../../src/types/api/repository.ts"],"mappings":";;;;;AAQA;;;;UAAiB,UAAA;EAmBT;;;;;EAbP,IAAA,EAAM,GAAA;EAAN;EAGA,oBAAA;EAAA;;;;;EAOA,SAAA,EAAW,QAAA;EAgBX;EAbA,KAAA,EAAO,MAAA;EAae;;;;EAPtB,IAAA;EAsBA;;;;;EAfA,KAAA,EAAO,MAAA,SAAe,IAAA;EAsBE;EAnBxB,cAAA;EAmBwB;EAhBxB,WAAA;EAqBA;EAlBA,OAAA;EAqBS;EAlBT,OAAA;EA2BgB;EAxBhB,WAAA;;EAGA,SAAA,EAAW,MAAA;AAAA;;UAIK,QAAA;EAqBhB;EAnBA,EAAA;EAqBA;EAlBA,IAAA;EAkBuB;EAfvB,SAAA;AAAA;AAwBD;;;;;;AAAA,UAfiB,IAAA;EAChB,MAAA;EACA,OAAA;EACA,MAAA;EACA,IAAA;EACA,GAAA;EACA,MAAA,EAAQ,MAAA,SAAe,SAAA;AAAA;;;;;;;UASP,SAAA;EAChB,IAAA;EACA,QAAA;EACA,OAAA;AAAA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
//#region src/types/api/tags.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* List of tags returned from the Prismic Tags API. This data can be fetched by
|
|
4
|
-
*
|
|
3
|
+
* List of tags returned from the Prismic Tags API. This data can be fetched by sending a `GET`
|
|
4
|
+
* request to a repository's `/api/tags` endpoint.
|
|
5
5
|
*
|
|
6
6
|
* @typeParam Tag - Tags that are returned by the Tags API.
|
|
7
|
-
*
|
|
8
7
|
* @see More details on the Tags API: {@link https://prismic.io/docs/tags-api-technical-reference}
|
|
9
8
|
*/
|
|
10
9
|
type Tags<Tag extends string = string> = Tag[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags.d.cts","names":[],"sources":["../../../src/types/api/tags.ts"],"
|
|
1
|
+
{"version":3,"file":"tags.d.cts","names":[],"sources":["../../../src/types/api/tags.ts"],"mappings":";;AAOA;;;;;;KAAY,IAAA,gCAAoC,GAAA"}
|
package/dist/types/api/tags.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
//#region src/types/api/tags.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* List of tags returned from the Prismic Tags API. This data can be fetched by
|
|
4
|
-
*
|
|
3
|
+
* List of tags returned from the Prismic Tags API. This data can be fetched by sending a `GET`
|
|
4
|
+
* request to a repository's `/api/tags` endpoint.
|
|
5
5
|
*
|
|
6
6
|
* @typeParam Tag - Tags that are returned by the Tags API.
|
|
7
|
-
*
|
|
8
7
|
* @see More details on the Tags API: {@link https://prismic.io/docs/tags-api-technical-reference}
|
|
9
8
|
*/
|
|
10
9
|
type Tags<Tag extends string = string> = Tag[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags.d.ts","names":[],"sources":["../../../src/types/api/tags.ts"],"
|
|
1
|
+
{"version":3,"file":"tags.d.ts","names":[],"sources":["../../../src/types/api/tags.ts"],"mappings":";;AAOA;;;;;;KAAY,IAAA,gCAAoC,GAAA"}
|
|
@@ -1,27 +1,17 @@
|
|
|
1
|
-
|
|
2
1
|
//#region src/types/migration/Asset.ts
|
|
3
|
-
/**
|
|
4
|
-
* A migration asset used with the Prismic Migration API.
|
|
5
|
-
*/
|
|
2
|
+
/** A migration asset used with the Prismic Migration API. */
|
|
6
3
|
var PrismicMigrationAsset = class {
|
|
7
|
-
/**
|
|
8
|
-
* Asset object from Prismic, available once created.
|
|
9
|
-
*/
|
|
4
|
+
/** Asset object from Prismic, available once created. */
|
|
10
5
|
asset;
|
|
11
|
-
/**
|
|
12
|
-
* Configuration of the asset.
|
|
13
|
-
*/
|
|
6
|
+
/** Configuration of the asset. */
|
|
14
7
|
config;
|
|
15
|
-
/**
|
|
16
|
-
* The initial field value this migration field was created with.
|
|
17
|
-
*/
|
|
8
|
+
/** The initial field value this migration field was created with. */
|
|
18
9
|
originalField;
|
|
19
10
|
/**
|
|
20
11
|
* Creates a migration asset used with the Prismic Migration API.
|
|
21
12
|
*
|
|
22
13
|
* @param config - Configuration of the asset.
|
|
23
14
|
* @param initialField - The initial field value if any.
|
|
24
|
-
*
|
|
25
15
|
* @returns A migration asset instance.
|
|
26
16
|
*/
|
|
27
17
|
constructor(config, initialField) {
|
|
@@ -29,7 +19,7 @@ var PrismicMigrationAsset = class {
|
|
|
29
19
|
this.originalField = initialField;
|
|
30
20
|
}
|
|
31
21
|
};
|
|
32
|
-
|
|
33
22
|
//#endregion
|
|
34
23
|
exports.PrismicMigrationAsset = PrismicMigrationAsset;
|
|
24
|
+
|
|
35
25
|
//# sourceMappingURL=Asset.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Asset.cjs","names":[],"sources":["../../../src/types/migration/Asset.ts"],"sourcesContent":["import type { Asset } from \"../api/asset/asset\"\nimport type { FilledImageFieldImage } from \"../value/image\"\nimport type { LinkToMediaField } from \"../value/linkToMedia\"\nimport { type RTImageNode } from \"../value/richText\"\
|
|
1
|
+
{"version":3,"file":"Asset.cjs","names":[],"sources":["../../../src/types/migration/Asset.ts"],"sourcesContent":["import type { Asset } from \"../api/asset/asset\"\nimport type { FilledImageFieldImage } from \"../value/image\"\nimport type { LinkToMediaField } from \"../value/linkToMedia\"\nimport { type RTImageNode } from \"../value/richText\"\nimport type { InjectMigrationSpecificTypes } from \"./Document\"\n\n/** An asset to be uploaded to Prismic media library. */\nexport type MigrationAssetConfig = {\n\t/**\n\t * ID the assets is indexed with on the migration instance.\n\t *\n\t * @remarks\n\t * This property's value is not necessarily the same as the as the one in the `file` property.\n\t * It is mainly used for deduplication within a `Migration` instance.\n\t */\n\tid: string | URL | File | NonNullable<ConstructorParameters<typeof File>[0]>[0]\n\n\t/** File to be uploaded as an asset. */\n\tfile: string | URL | File | NonNullable<ConstructorParameters<typeof File>[0]>[0]\n\n\t/** Filename of the asset. */\n\tfilename: string\n\n\t/** Notes about the asset. Notes are private and only visible in Prismic media library. */\n\tnotes?: string\n\n\t/** Credits and copyright for the asset if any. */\n\tcredits?: string\n\n\t/** Alternate text for the asset. */\n\talt?: string\n\n\t/**\n\t * Tags associated with the asset.\n\t *\n\t * @remarks\n\t * Tags should be at least 3 characters long and 20 characters at most.\n\t */\n\ttags?: string[]\n}\n\n/** An image field in a migration. */\nexport type MigrationImage =\n\t| PrismicMigrationAsset\n\t| ({\n\t\t\t/** A reference to the migration asset used to resolve the image field's value. */\n\t\t\tid: PrismicMigrationAsset\n\t } & Record<string, PrismicMigrationAsset>)\n\n/** A link to media field in a migration. */\nexport type MigrationLinkToMedia = Pick<LinkToMediaField<\"filled\">, \"link_type\" | \"text\"> & {\n\t/** A reference to the migration asset used to resolve the link to media field's value. */\n\tid: PrismicMigrationAsset\n}\n\n/**\n * The minimum amount of information needed to represent a link to media field with the migration\n * API.\n */\nexport type MigrationLinkToMediaField =\n\t| Pick<LinkToMediaField<\"filled\">, \"link_type\" | \"id\" | \"text\">\n\t| LinkToMediaField<\"empty\">\n\n/** A rich text image node in a migration. */\nexport type MigrationRTImageNode = InjectMigrationSpecificTypes<\n\tPick<RTImageNode, \"type\" | \"linkTo\">\n> & {\n\t/** A reference to the migration asset used to resolve the rich text image node's value. */\n\tid: PrismicMigrationAsset\n}\n\n/** A migration asset used with the Prismic Migration API. */\nexport class PrismicMigrationAsset {\n\t/** Asset object from Prismic, available once created. */\n\tasset?: Asset\n\n\t/** Configuration of the asset. */\n\tconfig: MigrationAssetConfig\n\n\t/** The initial field value this migration field was created with. */\n\toriginalField?: FilledImageFieldImage | LinkToMediaField<\"filled\"> | RTImageNode\n\n\t/**\n\t * Creates a migration asset used with the Prismic Migration API.\n\t *\n\t * @param config - Configuration of the asset.\n\t * @param initialField - The initial field value if any.\n\t * @returns A migration asset instance.\n\t */\n\tconstructor(\n\t\tconfig: MigrationAssetConfig,\n\t\tinitialField?: FilledImageFieldImage | LinkToMediaField<\"filled\"> | RTImageNode,\n\t) {\n\t\tthis.config = config\n\t\tthis.originalField = initialField\n\t}\n}\n"],"mappings":";;AAwEA,IAAa,wBAAb,MAAmC;;CAElC;;CAGA;;CAGA;;;;;;;;CASA,YACC,QACA,cACC;AACD,OAAK,SAAS;AACd,OAAK,gBAAgB"}
|
|
@@ -5,101 +5,54 @@ import { Asset } from "../api/asset/asset.cjs";
|
|
|
5
5
|
import { InjectMigrationSpecificTypes } from "./Document.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/types/migration/Asset.d.ts
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* An asset to be uploaded to Prismic media library.
|
|
11
|
-
*/
|
|
8
|
+
/** An asset to be uploaded to Prismic media library. */
|
|
12
9
|
type MigrationAssetConfig = {
|
|
13
10
|
/**
|
|
14
11
|
* ID the assets is indexed with on the migration instance.
|
|
15
12
|
*
|
|
16
13
|
* @remarks
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
file: string | URL | File | NonNullable<ConstructorParameters<typeof File>[0]>[0];
|
|
26
|
-
/**
|
|
27
|
-
* Filename of the asset.
|
|
28
|
-
*/
|
|
29
|
-
filename: string;
|
|
30
|
-
/**
|
|
31
|
-
* Notes about the asset. Notes are private and only visible in Prismic media
|
|
32
|
-
* library.
|
|
33
|
-
*/
|
|
34
|
-
notes?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Credits and copyright for the asset if any.
|
|
37
|
-
*/
|
|
38
|
-
credits?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Alternate text for the asset.
|
|
41
|
-
*/
|
|
14
|
+
* This property's value is not necessarily the same as the as the one in the `file` property.
|
|
15
|
+
* It is mainly used for deduplication within a `Migration` instance.
|
|
16
|
+
*/
|
|
17
|
+
id: string | URL | File | NonNullable<ConstructorParameters<typeof File>[0]>[0]; /** File to be uploaded as an asset. */
|
|
18
|
+
file: string | URL | File | NonNullable<ConstructorParameters<typeof File>[0]>[0]; /** Filename of the asset. */
|
|
19
|
+
filename: string; /** Notes about the asset. Notes are private and only visible in Prismic media library. */
|
|
20
|
+
notes?: string; /** Credits and copyright for the asset if any. */
|
|
21
|
+
credits?: string; /** Alternate text for the asset. */
|
|
42
22
|
alt?: string;
|
|
43
23
|
/**
|
|
44
24
|
* Tags associated with the asset.
|
|
45
25
|
*
|
|
46
26
|
* @remarks
|
|
47
|
-
*
|
|
27
|
+
* Tags should be at least 3 characters long and 20 characters at most.
|
|
48
28
|
*/
|
|
49
29
|
tags?: string[];
|
|
50
30
|
};
|
|
51
|
-
/**
|
|
52
|
-
* An image field in a migration.
|
|
53
|
-
*/
|
|
31
|
+
/** An image field in a migration. */
|
|
54
32
|
type MigrationImage = PrismicMigrationAsset | ({
|
|
55
|
-
/**
|
|
56
|
-
* A reference to the migration asset used to resolve the image field's
|
|
57
|
-
* value.
|
|
58
|
-
*/
|
|
59
|
-
id: PrismicMigrationAsset;
|
|
33
|
+
/** A reference to the migration asset used to resolve the image field's value. */id: PrismicMigrationAsset;
|
|
60
34
|
} & Record<string, PrismicMigrationAsset>);
|
|
61
|
-
/**
|
|
62
|
-
* A link to media field in a migration.
|
|
63
|
-
*/
|
|
35
|
+
/** A link to media field in a migration. */
|
|
64
36
|
type MigrationLinkToMedia = Pick<LinkToMediaField<"filled">, "link_type" | "text"> & {
|
|
65
|
-
/**
|
|
66
|
-
* A reference to the migration asset used to resolve the link to media
|
|
67
|
-
* field's value.
|
|
68
|
-
*/
|
|
69
|
-
id: PrismicMigrationAsset;
|
|
37
|
+
/** A reference to the migration asset used to resolve the link to media field's value. */id: PrismicMigrationAsset;
|
|
70
38
|
};
|
|
71
|
-
/**
|
|
72
|
-
* A rich text image node in a migration.
|
|
73
|
-
*/
|
|
39
|
+
/** A rich text image node in a migration. */
|
|
74
40
|
type MigrationRTImageNode = InjectMigrationSpecificTypes<Pick<RTImageNode, "type" | "linkTo">> & {
|
|
75
|
-
/**
|
|
76
|
-
* A reference to the migration asset used to resolve the rich text image
|
|
77
|
-
* node's value.
|
|
78
|
-
*/
|
|
79
|
-
id: PrismicMigrationAsset;
|
|
41
|
+
/** A reference to the migration asset used to resolve the rich text image node's value. */id: PrismicMigrationAsset;
|
|
80
42
|
};
|
|
81
|
-
/**
|
|
82
|
-
* A migration asset used with the Prismic Migration API.
|
|
83
|
-
*/
|
|
43
|
+
/** A migration asset used with the Prismic Migration API. */
|
|
84
44
|
declare class PrismicMigrationAsset {
|
|
85
|
-
/**
|
|
86
|
-
* Asset object from Prismic, available once created.
|
|
87
|
-
*/
|
|
45
|
+
/** Asset object from Prismic, available once created. */
|
|
88
46
|
asset?: Asset;
|
|
89
|
-
/**
|
|
90
|
-
* Configuration of the asset.
|
|
91
|
-
*/
|
|
47
|
+
/** Configuration of the asset. */
|
|
92
48
|
config: MigrationAssetConfig;
|
|
93
|
-
/**
|
|
94
|
-
* The initial field value this migration field was created with.
|
|
95
|
-
*/
|
|
49
|
+
/** The initial field value this migration field was created with. */
|
|
96
50
|
originalField?: FilledImageFieldImage | LinkToMediaField<"filled"> | RTImageNode;
|
|
97
51
|
/**
|
|
98
52
|
* Creates a migration asset used with the Prismic Migration API.
|
|
99
53
|
*
|
|
100
54
|
* @param config - Configuration of the asset.
|
|
101
55
|
* @param initialField - The initial field value if any.
|
|
102
|
-
*
|
|
103
56
|
* @returns A migration asset instance.
|
|
104
57
|
*/
|
|
105
58
|
constructor(config: MigrationAssetConfig, initialField?: FilledImageFieldImage | LinkToMediaField<"filled"> | RTImageNode);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Asset.d.cts","names":[],"sources":["../../../src/types/migration/Asset.ts"],"
|
|
1
|
+
{"version":3,"file":"Asset.d.cts","names":[],"sources":["../../../src/types/migration/Asset.ts"],"mappings":";;;;;;;;KAOY,oBAAA;EAAA;;;;;;;EAQX,EAAA,WAAa,GAAA,GAAM,IAAA,GAAO,WAAA,CAAY,qBAAA,QAA6B,IAAA,UAGpD;EAAf,IAAA,WAAe,GAAA,GAAM,IAAA,GAAO,WAAA,CAAY,qBAAA,QAA6B,IAAA,UAAA;EAGrE,QAAA,UAH4B;EAM5B,KAAA,WANuC;EASvC,OAAA,WAZa;EAeb,GAAA;EAf0B;;;;;;EAuB1B,IAAA;AAAA;;KAIW,cAAA,GACT,qBAAA;EAnBF,kFAsBE,EAAA,EAAI,qBAAA;AAAA,IACA,MAAA,SAAe,qBAAA;;KAGV,oBAAA,GAAuB,IAAA,CAAK,gBAAA;EAZnC,0FAcJ,EAAA,EAAI,qBAAA;AAAA;;KAYO,oBAAA,GAAuB,4BAAA,CAClC,IAAA,CAAK,WAAA;EAtBH,2FAyBF,EAAA,EAAI,qBAAA;AAAA;;cAIQ,qBAAA;EAzB8B;EA2B1C,KAAA,GAAQ,KAAA;EAxBG;EA2BX,MAAA,EAAQ,oBAAA;;EAGR,aAAA,GAAgB,qBAAA,GAAwB,gBAAA,aAA6B,WAAA;EA9BnC;;;;;;;cAwCjC,MAAA,EAAQ,oBAAA,EACR,YAAA,GAAe,qBAAA,GAAwB,gBAAA,aAA6B,WAAA;AAAA"}
|