@prismicio/client 7.21.0-alpha.0 → 7.21.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3880 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4424 -0
- package/dist/index.d.mts +4424 -0
- package/dist/index.d.ts +4349 -128
- package/dist/index.mjs +3837 -0
- package/dist/index.mjs.map +1 -0
- package/dist/richtext/index.cjs +244 -0
- package/dist/richtext/index.cjs.map +1 -0
- package/dist/richtext/index.d.cts +78 -0
- package/dist/richtext/index.d.mts +78 -0
- package/dist/richtext/index.d.ts +78 -7
- package/dist/richtext/index.mjs +237 -0
- package/dist/richtext/index.mjs.map +1 -0
- package/dist/shared/client.TSGr56lO.d.cts +899 -0
- package/dist/shared/client.TSGr56lO.d.mts +899 -0
- package/dist/shared/client.TSGr56lO.d.ts +899 -0
- package/package.json +19 -42
- package/src/buildQueryURL.ts +29 -21
- package/src/createClient.ts +11 -8
- package/src/getRepositoryEndpoint.ts +9 -2
- package/src/helpers/asDate.ts +11 -4
- package/src/helpers/asHTML.ts +34 -26
- package/src/helpers/asImagePixelDensitySrcSet.ts +16 -15
- package/src/helpers/asImageSrc.ts +11 -10
- package/src/helpers/asImageWidthSrcSet.ts +18 -17
- package/src/helpers/asLink.ts +33 -32
- package/src/helpers/asLinkAttrs.ts +6 -9
- package/src/helpers/asText.ts +20 -10
- package/src/helpers/isFilled.ts +15 -14
- package/src/helpers/mapSliceZone.ts +10 -10
- package/src/index.ts +2 -2
- package/src/isRepositoryEndpoint.ts +2 -2
- package/src/richtext/asText.ts +5 -5
- package/src/richtext/serialize.ts +8 -8
- package/src/richtext/types.ts +6 -6
- package/src/types/migration/Asset.ts +10 -2
- package/src/types/model/types.ts +0 -2
- package/dist/Client.cjs +0 -1274
- package/dist/Client.cjs.map +0 -1
- package/dist/Client.d.ts +0 -981
- package/dist/Client.js +0 -1274
- package/dist/Client.js.map +0 -1
- package/dist/Migration.cjs +0 -315
- package/dist/Migration.cjs.map +0 -1
- package/dist/Migration.d.ts +0 -213
- package/dist/Migration.js +0 -315
- package/dist/Migration.js.map +0 -1
- package/dist/WriteClient.cjs +0 -560
- package/dist/WriteClient.cjs.map +0 -1
- package/dist/WriteClient.d.ts +0 -281
- package/dist/WriteClient.js +0 -560
- package/dist/WriteClient.js.map +0 -1
- package/dist/buildQueryURL.cjs +0 -66
- package/dist/buildQueryURL.cjs.map +0 -1
- package/dist/buildQueryURL.d.ts +0 -209
- package/dist/buildQueryURL.js +0 -66
- package/dist/buildQueryURL.js.map +0 -1
- package/dist/cookie.cjs +0 -5
- package/dist/cookie.cjs.map +0 -1
- package/dist/cookie.d.ts +0 -5
- package/dist/cookie.js +0 -5
- package/dist/cookie.js.map +0 -1
- package/dist/createClient.cjs +0 -6
- package/dist/createClient.cjs.map +0 -1
- package/dist/createClient.d.ts +0 -32
- package/dist/createClient.js +0 -6
- package/dist/createClient.js.map +0 -1
- package/dist/createMigration.cjs +0 -6
- package/dist/createMigration.cjs.map +0 -1
- package/dist/createMigration.d.ts +0 -24
- package/dist/createMigration.js +0 -6
- package/dist/createMigration.js.map +0 -1
- package/dist/createWriteClient.cjs +0 -6
- package/dist/createWriteClient.cjs.map +0 -1
- package/dist/createWriteClient.d.ts +0 -32
- package/dist/createWriteClient.js +0 -6
- package/dist/createWriteClient.js.map +0 -1
- package/dist/errors/ForbiddenError.cjs +0 -7
- package/dist/errors/ForbiddenError.cjs.map +0 -1
- package/dist/errors/ForbiddenError.d.ts +0 -11
- package/dist/errors/ForbiddenError.js +0 -7
- package/dist/errors/ForbiddenError.js.map +0 -1
- package/dist/errors/InvalidDataError.cjs +0 -7
- package/dist/errors/InvalidDataError.cjs.map +0 -1
- package/dist/errors/InvalidDataError.d.ts +0 -3
- package/dist/errors/InvalidDataError.js +0 -7
- package/dist/errors/InvalidDataError.js.map +0 -1
- package/dist/errors/NotFoundError.cjs +0 -7
- package/dist/errors/NotFoundError.cjs.map +0 -1
- package/dist/errors/NotFoundError.d.ts +0 -3
- package/dist/errors/NotFoundError.js +0 -7
- package/dist/errors/NotFoundError.js.map +0 -1
- package/dist/errors/ParsingError.cjs +0 -7
- package/dist/errors/ParsingError.cjs.map +0 -1
- package/dist/errors/ParsingError.d.ts +0 -14
- package/dist/errors/ParsingError.js +0 -7
- package/dist/errors/ParsingError.js.map +0 -1
- package/dist/errors/PreviewTokenExpired.cjs +0 -7
- package/dist/errors/PreviewTokenExpired.cjs.map +0 -1
- package/dist/errors/PreviewTokenExpired.d.ts +0 -8
- package/dist/errors/PreviewTokenExpired.js +0 -7
- package/dist/errors/PreviewTokenExpired.js.map +0 -1
- package/dist/errors/PrismicError.cjs +0 -16
- package/dist/errors/PrismicError.cjs.map +0 -1
- package/dist/errors/PrismicError.d.ts +0 -5
- package/dist/errors/PrismicError.js +0 -16
- package/dist/errors/PrismicError.js.map +0 -1
- package/dist/errors/RefExpiredError.cjs +0 -7
- package/dist/errors/RefExpiredError.cjs.map +0 -1
- package/dist/errors/RefExpiredError.d.ts +0 -8
- package/dist/errors/RefExpiredError.js +0 -7
- package/dist/errors/RefExpiredError.js.map +0 -1
- package/dist/errors/RefNotFoundError.cjs +0 -7
- package/dist/errors/RefNotFoundError.cjs.map +0 -1
- package/dist/errors/RefNotFoundError.d.ts +0 -8
- package/dist/errors/RefNotFoundError.js +0 -7
- package/dist/errors/RefNotFoundError.js.map +0 -1
- package/dist/errors/RepositoryNotFoundError.cjs +0 -7
- package/dist/errors/RepositoryNotFoundError.cjs.map +0 -1
- package/dist/errors/RepositoryNotFoundError.d.ts +0 -3
- package/dist/errors/RepositoryNotFoundError.js +0 -7
- package/dist/errors/RepositoryNotFoundError.js.map +0 -1
- package/dist/filter.cjs +0 -247
- package/dist/filter.cjs.map +0 -1
- package/dist/filter.d.ts +0 -209
- package/dist/filter.js +0 -247
- package/dist/filter.js.map +0 -1
- package/dist/getGraphQLEndpoint.cjs +0 -13
- package/dist/getGraphQLEndpoint.cjs.map +0 -1
- package/dist/getGraphQLEndpoint.d.ts +0 -10
- package/dist/getGraphQLEndpoint.js +0 -13
- package/dist/getGraphQLEndpoint.js.map +0 -1
- package/dist/getRepositoryEndpoint.cjs +0 -13
- package/dist/getRepositoryEndpoint.cjs.map +0 -1
- package/dist/getRepositoryEndpoint.d.ts +0 -12
- package/dist/getRepositoryEndpoint.js +0 -13
- package/dist/getRepositoryEndpoint.js.map +0 -1
- package/dist/getRepositoryName.cjs +0 -17
- package/dist/getRepositoryName.cjs.map +0 -1
- package/dist/getRepositoryName.d.ts +0 -12
- package/dist/getRepositoryName.js +0 -17
- package/dist/getRepositoryName.js.map +0 -1
- package/dist/getToolbarSrc.cjs +0 -13
- package/dist/getToolbarSrc.cjs.map +0 -1
- package/dist/getToolbarSrc.d.ts +0 -34
- package/dist/getToolbarSrc.js +0 -13
- package/dist/getToolbarSrc.js.map +0 -1
- package/dist/helpers/asDate.cjs +0 -14
- package/dist/helpers/asDate.cjs.map +0 -1
- package/dist/helpers/asDate.d.ts +0 -17
- package/dist/helpers/asDate.js +0 -14
- package/dist/helpers/asDate.js.map +0 -1
- package/dist/helpers/asHTML.cjs +0 -86
- package/dist/helpers/asHTML.cjs.map +0 -1
- package/dist/helpers/asHTML.d.ts +0 -141
- package/dist/helpers/asHTML.js +0 -86
- package/dist/helpers/asHTML.js.map +0 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +0 -21
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +0 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +0 -53
- package/dist/helpers/asImagePixelDensitySrcSet.js +0 -21
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +0 -1
- package/dist/helpers/asImageSrc.cjs +0 -13
- package/dist/helpers/asImageSrc.cjs.map +0 -1
- package/dist/helpers/asImageSrc.d.ts +0 -28
- package/dist/helpers/asImageSrc.js +0 -13
- package/dist/helpers/asImageSrc.js.map +0 -1
- package/dist/helpers/asImageWidthSrcSet.cjs +0 -45
- package/dist/helpers/asImageWidthSrcSet.cjs.map +0 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +0 -61
- package/dist/helpers/asImageWidthSrcSet.js +0 -45
- package/dist/helpers/asImageWidthSrcSet.js.map +0 -1
- package/dist/helpers/asLink.cjs +0 -47
- package/dist/helpers/asLink.cjs.map +0 -1
- package/dist/helpers/asLink.d.ts +0 -77
- package/dist/helpers/asLink.js +0 -47
- package/dist/helpers/asLink.js.map +0 -1
- package/dist/helpers/asLinkAttrs.cjs +0 -28
- package/dist/helpers/asLinkAttrs.cjs.map +0 -1
- package/dist/helpers/asLinkAttrs.d.ts +0 -50
- package/dist/helpers/asLinkAttrs.js +0 -28
- package/dist/helpers/asLinkAttrs.js.map +0 -1
- package/dist/helpers/asText.cjs +0 -21
- package/dist/helpers/asText.cjs.map +0 -1
- package/dist/helpers/asText.d.ts +0 -47
- package/dist/helpers/asText.js +0 -21
- package/dist/helpers/asText.js.map +0 -1
- package/dist/helpers/documentToLinkField.cjs +0 -27
- package/dist/helpers/documentToLinkField.cjs.map +0 -1
- package/dist/helpers/documentToLinkField.d.ts +0 -17
- package/dist/helpers/documentToLinkField.js +0 -27
- package/dist/helpers/documentToLinkField.js.map +0 -1
- package/dist/helpers/isFilled.cjs +0 -77
- package/dist/helpers/isFilled.cjs.map +0 -1
- package/dist/helpers/isFilled.d.ts +0 -190
- package/dist/helpers/isFilled.js +0 -77
- package/dist/helpers/isFilled.js.map +0 -1
- package/dist/helpers/mapSliceZone.cjs +0 -42
- package/dist/helpers/mapSliceZone.cjs.map +0 -1
- package/dist/helpers/mapSliceZone.d.ts +0 -136
- package/dist/helpers/mapSliceZone.js +0 -42
- package/dist/helpers/mapSliceZone.js.map +0 -1
- package/dist/index.js +0 -97
- package/dist/index.js.map +0 -1
- package/dist/isRepositoryEndpoint.cjs +0 -12
- package/dist/isRepositoryEndpoint.cjs.map +0 -1
- package/dist/isRepositoryEndpoint.d.ts +0 -10
- package/dist/isRepositoryEndpoint.js +0 -12
- package/dist/isRepositoryEndpoint.js.map +0 -1
- package/dist/isRepositoryName.cjs +0 -7
- package/dist/isRepositoryName.cjs.map +0 -1
- package/dist/isRepositoryName.d.ts +0 -9
- package/dist/isRepositoryName.js +0 -7
- package/dist/isRepositoryName.js.map +0 -1
- package/dist/lib/appendFilters.cjs +0 -11
- package/dist/lib/appendFilters.cjs.map +0 -1
- package/dist/lib/appendFilters.d.ts +0 -18
- package/dist/lib/appendFilters.js +0 -11
- package/dist/lib/appendFilters.js.map +0 -1
- package/dist/lib/castArray.cjs +0 -7
- package/dist/lib/castArray.cjs.map +0 -1
- package/dist/lib/castArray.d.ts +0 -12
- package/dist/lib/castArray.js +0 -7
- package/dist/lib/castArray.js.map +0 -1
- package/dist/lib/castThunk.cjs +0 -7
- package/dist/lib/castThunk.cjs.map +0 -1
- package/dist/lib/castThunk.d.ts +0 -11
- package/dist/lib/castThunk.js +0 -7
- package/dist/lib/castThunk.js.map +0 -1
- package/dist/lib/devMsg.cjs +0 -8
- package/dist/lib/devMsg.cjs.map +0 -1
- package/dist/lib/devMsg.d.ts +0 -16
- package/dist/lib/devMsg.js +0 -8
- package/dist/lib/devMsg.js.map +0 -1
- package/dist/lib/escapeHTML.cjs +0 -43
- package/dist/lib/escapeHTML.cjs.map +0 -1
- package/dist/lib/escapeHTML.d.ts +0 -1
- package/dist/lib/escapeHTML.js +0 -43
- package/dist/lib/escapeHTML.js.map +0 -1
- package/dist/lib/everyTagFilter.cjs +0 -9
- package/dist/lib/everyTagFilter.cjs.map +0 -1
- package/dist/lib/everyTagFilter.d.ts +0 -9
- package/dist/lib/everyTagFilter.js +0 -9
- package/dist/lib/everyTagFilter.js.map +0 -1
- package/dist/lib/findMasterRef.cjs +0 -8
- package/dist/lib/findMasterRef.cjs.map +0 -1
- package/dist/lib/findMasterRef.d.ts +0 -11
- package/dist/lib/findMasterRef.js +0 -8
- package/dist/lib/findMasterRef.js.map +0 -1
- package/dist/lib/findRef.cjs +0 -12
- package/dist/lib/findRef.cjs.map +0 -1
- package/dist/lib/findRef.d.ts +0 -14
- package/dist/lib/findRef.js +0 -12
- package/dist/lib/findRef.js.map +0 -1
- package/dist/lib/findRefByID.cjs +0 -8
- package/dist/lib/findRefByID.cjs.map +0 -1
- package/dist/lib/findRefByID.d.ts +0 -12
- package/dist/lib/findRefByID.js +0 -8
- package/dist/lib/findRefByID.js.map +0 -1
- package/dist/lib/findRefByLabel.cjs +0 -8
- package/dist/lib/findRefByLabel.cjs.map +0 -1
- package/dist/lib/findRefByLabel.d.ts +0 -12
- package/dist/lib/findRefByLabel.js +0 -8
- package/dist/lib/findRefByLabel.js.map +0 -1
- package/dist/lib/getOptionalLinkProperties.cjs +0 -14
- package/dist/lib/getOptionalLinkProperties.cjs.map +0 -1
- package/dist/lib/getOptionalLinkProperties.d.ts +0 -12
- package/dist/lib/getOptionalLinkProperties.js +0 -14
- package/dist/lib/getOptionalLinkProperties.js.map +0 -1
- package/dist/lib/getPreviewCookie.cjs +0 -21
- package/dist/lib/getPreviewCookie.cjs.map +0 -1
- package/dist/lib/getPreviewCookie.d.ts +0 -9
- package/dist/lib/getPreviewCookie.js +0 -21
- package/dist/lib/getPreviewCookie.js.map +0 -1
- package/dist/lib/isInternalURL.cjs +0 -9
- package/dist/lib/isInternalURL.cjs.map +0 -1
- package/dist/lib/isInternalURL.d.ts +0 -8
- package/dist/lib/isInternalURL.js +0 -9
- package/dist/lib/isInternalURL.js.map +0 -1
- package/dist/lib/isMigrationValue.cjs +0 -24
- package/dist/lib/isMigrationValue.cjs.map +0 -1
- package/dist/lib/isMigrationValue.d.ts +0 -71
- package/dist/lib/isMigrationValue.js +0 -24
- package/dist/lib/isMigrationValue.js.map +0 -1
- package/dist/lib/isValue.cjs +0 -53
- package/dist/lib/isValue.cjs.map +0 -1
- package/dist/lib/isValue.d.ts +0 -78
- package/dist/lib/isValue.js +0 -53
- package/dist/lib/isValue.js.map +0 -1
- package/dist/lib/minifyGraphQLQuery.cjs +0 -7
- package/dist/lib/minifyGraphQLQuery.cjs.map +0 -1
- package/dist/lib/minifyGraphQLQuery.d.ts +0 -8
- package/dist/lib/minifyGraphQLQuery.js +0 -7
- package/dist/lib/minifyGraphQLQuery.js.map +0 -1
- package/dist/lib/pLimit.cjs +0 -49
- package/dist/lib/pLimit.cjs.map +0 -1
- package/dist/lib/pLimit.d.ts +0 -22
- package/dist/lib/pLimit.js +0 -49
- package/dist/lib/pLimit.js.map +0 -1
- package/dist/lib/request.cjs +0 -43
- package/dist/lib/request.cjs.map +0 -1
- package/dist/lib/request.d.ts +0 -73
- package/dist/lib/request.js +0 -43
- package/dist/lib/request.js.map +0 -1
- package/dist/lib/resolveMigrationDocumentData.cjs +0 -134
- package/dist/lib/resolveMigrationDocumentData.cjs.map +0 -1
- package/dist/lib/resolveMigrationDocumentData.d.ts +0 -54
- package/dist/lib/resolveMigrationDocumentData.js +0 -134
- package/dist/lib/resolveMigrationDocumentData.js.map +0 -1
- package/dist/lib/serializerHelpers.cjs +0 -113
- package/dist/lib/serializerHelpers.cjs.map +0 -1
- package/dist/lib/serializerHelpers.d.ts +0 -9
- package/dist/lib/serializerHelpers.js +0 -113
- package/dist/lib/serializerHelpers.js.map +0 -1
- package/dist/lib/someTagsFilter.cjs +0 -9
- package/dist/lib/someTagsFilter.cjs.map +0 -1
- package/dist/lib/someTagsFilter.d.ts +0 -9
- package/dist/lib/someTagsFilter.js +0 -9
- package/dist/lib/someTagsFilter.js.map +0 -1
- package/dist/lib/throttledLog.cjs +0 -17
- package/dist/lib/throttledLog.cjs.map +0 -1
- package/dist/lib/throttledLog.d.ts +0 -15
- package/dist/lib/throttledLog.js +0 -17
- package/dist/lib/throttledLog.js.map +0 -1
- package/dist/lib/typeFilter.cjs +0 -8
- package/dist/lib/typeFilter.cjs.map +0 -1
- package/dist/lib/typeFilter.d.ts +0 -8
- package/dist/lib/typeFilter.js +0 -8
- package/dist/lib/typeFilter.js.map +0 -1
- package/dist/lib/validateAssetMetadata.cjs +0 -28
- package/dist/lib/validateAssetMetadata.cjs.map +0 -1
- package/dist/lib/validateAssetMetadata.d.ts +0 -10
- package/dist/lib/validateAssetMetadata.js +0 -28
- package/dist/lib/validateAssetMetadata.js.map +0 -1
- package/dist/package.json.cjs +0 -7
- package/dist/package.json.cjs.map +0 -1
- package/dist/package.json.js +0 -7
- package/dist/package.json.js.map +0 -1
- package/dist/richtext/asText.cjs +0 -13
- package/dist/richtext/asText.cjs.map +0 -1
- package/dist/richtext/asText.d.ts +0 -12
- package/dist/richtext/asText.js +0 -13
- package/dist/richtext/asText.js.map +0 -1
- package/dist/richtext/asTree.cjs +0 -123
- package/dist/richtext/asTree.cjs.map +0 -1
- package/dist/richtext/asTree.d.ts +0 -14
- package/dist/richtext/asTree.js +0 -123
- package/dist/richtext/asTree.js.map +0 -1
- package/dist/richtext/composeSerializers.cjs +0 -17
- package/dist/richtext/composeSerializers.cjs.map +0 -1
- package/dist/richtext/composeSerializers.d.ts +0 -16
- package/dist/richtext/composeSerializers.js +0 -17
- package/dist/richtext/composeSerializers.js.map +0 -1
- package/dist/richtext/serialize.cjs +0 -19
- package/dist/richtext/serialize.cjs.map +0 -1
- package/dist/richtext/serialize.d.ts +0 -19
- package/dist/richtext/serialize.js +0 -19
- package/dist/richtext/serialize.js.map +0 -1
- package/dist/richtext/types.cjs +0 -11
- package/dist/richtext/types.cjs.map +0 -1
- package/dist/richtext/types.d.ts +0 -71
- package/dist/richtext/types.js +0 -11
- package/dist/richtext/types.js.map +0 -1
- package/dist/richtext/wrapMapSerializer.cjs +0 -24
- package/dist/richtext/wrapMapSerializer.cjs.map +0 -1
- package/dist/richtext/wrapMapSerializer.d.ts +0 -15
- package/dist/richtext/wrapMapSerializer.js +0 -24
- package/dist/richtext/wrapMapSerializer.js.map +0 -1
- package/dist/richtext.cjs +0 -15
- package/dist/richtext.cjs.map +0 -1
- package/dist/richtext.js +0 -15
- package/dist/richtext.js.map +0 -1
- package/dist/types/api/asset/asset.d.ts +0 -177
- package/dist/types/api/asset/tag.d.ts +0 -53
- package/dist/types/api/integration.d.ts +0 -28
- package/dist/types/api/migration/document.d.ts +0 -60
- package/dist/types/api/query.d.ts +0 -43
- package/dist/types/api/ref.d.ts +0 -32
- package/dist/types/api/release.d.ts +0 -11
- package/dist/types/api/repository.d.ts +0 -109
- package/dist/types/api/tags.d.ts +0 -9
- package/dist/types/migration/Asset.cjs +0 -33
- package/dist/types/migration/Asset.cjs.map +0 -1
- package/dist/types/migration/Asset.d.ts +0 -108
- package/dist/types/migration/Asset.js +0 -33
- package/dist/types/migration/Asset.js.map +0 -1
- package/dist/types/migration/ContentRelationship.d.ts +0 -16
- package/dist/types/migration/Document.cjs +0 -47
- package/dist/types/migration/Document.cjs.map +0 -1
- package/dist/types/migration/Document.d.ts +0 -94
- package/dist/types/migration/Document.js +0 -47
- package/dist/types/migration/Document.js.map +0 -1
- package/dist/types/migration/Link.d.ts +0 -19
- package/dist/types/model/boolean.d.ts +0 -15
- package/dist/types/model/color.d.ts +0 -13
- package/dist/types/model/contentRelationship.d.ts +0 -52
- package/dist/types/model/customType.d.ts +0 -48
- package/dist/types/model/date.d.ts +0 -14
- package/dist/types/model/embed.d.ts +0 -13
- package/dist/types/model/geoPoint.d.ts +0 -12
- package/dist/types/model/group.d.ts +0 -23
- package/dist/types/model/image.d.ts +0 -31
- package/dist/types/model/integration.d.ts +0 -14
- package/dist/types/model/keyText.d.ts +0 -13
- package/dist/types/model/link.cjs +0 -9
- package/dist/types/model/link.cjs.map +0 -1
- package/dist/types/model/link.d.ts +0 -28
- package/dist/types/model/link.js +0 -9
- package/dist/types/model/link.js.map +0 -1
- package/dist/types/model/linkToMedia.d.ts +0 -17
- package/dist/types/model/number.d.ts +0 -15
- package/dist/types/model/range.d.ts +0 -14
- package/dist/types/model/richText.d.ts +0 -37
- package/dist/types/model/select.d.ts +0 -18
- package/dist/types/model/separator.d.ts +0 -10
- package/dist/types/model/sharedSlice.d.ts +0 -16
- package/dist/types/model/sharedSliceVariation.d.ts +0 -19
- package/dist/types/model/slice.cjs +0 -8
- package/dist/types/model/slice.cjs.map +0 -1
- package/dist/types/model/slice.d.ts +0 -33
- package/dist/types/model/slice.js +0 -8
- package/dist/types/model/slice.js.map +0 -1
- package/dist/types/model/sliceZone.cjs +0 -8
- package/dist/types/model/sliceZone.cjs.map +0 -1
- package/dist/types/model/sliceZone.d.ts +0 -41
- package/dist/types/model/sliceZone.js +0 -8
- package/dist/types/model/sliceZone.js.map +0 -1
- package/dist/types/model/table.d.ts +0 -12
- package/dist/types/model/timestamp.d.ts +0 -14
- package/dist/types/model/title.d.ts +0 -7
- package/dist/types/model/types.cjs +0 -39
- package/dist/types/model/types.cjs.map +0 -1
- package/dist/types/model/types.d.ts +0 -77
- package/dist/types/model/types.js +0 -39
- package/dist/types/model/types.js.map +0 -1
- package/dist/types/model/uid.d.ts +0 -13
- package/dist/types/value/boolean.d.ts +0 -6
- package/dist/types/value/color.d.ts +0 -9
- package/dist/types/value/contentRelationship.d.ts +0 -31
- package/dist/types/value/date.d.ts +0 -9
- package/dist/types/value/document.d.ts +0 -114
- package/dist/types/value/embed.cjs +0 -10
- package/dist/types/value/embed.cjs.map +0 -1
- package/dist/types/value/embed.d.ts +0 -168
- package/dist/types/value/embed.js +0 -10
- package/dist/types/value/embed.js.map +0 -1
- package/dist/types/value/geoPoint.d.ts +0 -12
- package/dist/types/value/group.d.ts +0 -13
- package/dist/types/value/image.d.ts +0 -47
- package/dist/types/value/integration.d.ts +0 -16
- package/dist/types/value/keyText.d.ts +0 -9
- package/dist/types/value/link.cjs +0 -10
- package/dist/types/value/link.cjs.map +0 -1
- package/dist/types/value/link.d.ts +0 -68
- package/dist/types/value/link.js +0 -10
- package/dist/types/value/link.js.map +0 -1
- package/dist/types/value/linkToMedia.d.ts +0 -28
- package/dist/types/value/number.d.ts +0 -9
- package/dist/types/value/richText.cjs +0 -25
- package/dist/types/value/richText.cjs.map +0 -1
- package/dist/types/value/richText.d.ts +0 -215
- package/dist/types/value/richText.js +0 -25
- package/dist/types/value/richText.js.map +0 -1
- package/dist/types/value/select.d.ts +0 -10
- package/dist/types/value/sharedSlice.d.ts +0 -11
- package/dist/types/value/sharedSliceVariation.d.ts +0 -10
- package/dist/types/value/slice.d.ts +0 -13
- package/dist/types/value/sliceZone.d.ts +0 -12
- package/dist/types/value/table.d.ts +0 -91
- package/dist/types/value/timestamp.d.ts +0 -8
- package/dist/types/value/title.d.ts +0 -12
- package/dist/types/value/types.d.ts +0 -58
- package/dist/types/webhook/apiUpdate.d.ts +0 -52
- package/dist/types/webhook/testTrigger.d.ts +0 -9
- package/dist/types/webhook/types.cjs +0 -8
- package/dist/types/webhook/types.cjs.map +0 -1
- package/dist/types/webhook/types.d.ts +0 -18
- package/dist/types/webhook/types.js +0 -8
- package/dist/types/webhook/types.js.map +0 -1
package/dist/WriteClient.d.ts
DELETED
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
import type { PrismicMigrationAsset } from "./types/migration/Asset";
|
|
2
|
-
import type { PrismicMigrationDocument } from "./types/migration/Document";
|
|
3
|
-
import type { PrismicDocument } from "./types/value/document";
|
|
4
|
-
import { Client } from "./Client";
|
|
5
|
-
import type { ClientConfig, FetchParams } from "./Client";
|
|
6
|
-
import type { Migration } from "./Migration";
|
|
7
|
-
/**
|
|
8
|
-
* Utility type to construct events reported by the migration process.
|
|
9
|
-
*/
|
|
10
|
-
type MigrateReporterEvent<TType extends string, TData = never> = TData extends never ? {
|
|
11
|
-
type: TType;
|
|
12
|
-
} : {
|
|
13
|
-
type: TType;
|
|
14
|
-
data: TData;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* A map of event types and their data reported by the migration process.
|
|
18
|
-
*/
|
|
19
|
-
type MigrateReporterEventMap = {
|
|
20
|
-
start: {
|
|
21
|
-
pending: {
|
|
22
|
-
documents: number;
|
|
23
|
-
assets: number;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
end: {
|
|
27
|
-
migrated: {
|
|
28
|
-
documents: number;
|
|
29
|
-
assets: number;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
"assets:creating": {
|
|
33
|
-
current: number;
|
|
34
|
-
remaining: number;
|
|
35
|
-
total: number;
|
|
36
|
-
asset: PrismicMigrationAsset;
|
|
37
|
-
};
|
|
38
|
-
"assets:created": {
|
|
39
|
-
created: number;
|
|
40
|
-
};
|
|
41
|
-
"documents:masterLocale": {
|
|
42
|
-
masterLocale: string;
|
|
43
|
-
};
|
|
44
|
-
"documents:creating": {
|
|
45
|
-
current: number;
|
|
46
|
-
remaining: number;
|
|
47
|
-
total: number;
|
|
48
|
-
document: PrismicMigrationDocument;
|
|
49
|
-
};
|
|
50
|
-
"documents:created": {
|
|
51
|
-
created: number;
|
|
52
|
-
};
|
|
53
|
-
"documents:updating": {
|
|
54
|
-
current: number;
|
|
55
|
-
remaining: number;
|
|
56
|
-
total: number;
|
|
57
|
-
document: PrismicMigrationDocument;
|
|
58
|
-
};
|
|
59
|
-
"documents:updated": {
|
|
60
|
-
updated: number;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Available event types reported by the migration process.
|
|
65
|
-
*/
|
|
66
|
-
type MigrateReporterEventTypes = keyof MigrateReporterEventMap;
|
|
67
|
-
/**
|
|
68
|
-
* All events reported by the migration process. Events can be listened to by
|
|
69
|
-
* providing a `reporter` function to the `migrate` method.
|
|
70
|
-
*/
|
|
71
|
-
export type MigrateReporterEvents = {
|
|
72
|
-
[K in MigrateReporterEventTypes]: MigrateReporterEvent<K, MigrateReporterEventMap[K]>;
|
|
73
|
-
}[MigrateReporterEventTypes];
|
|
74
|
-
/**
|
|
75
|
-
* Additional parameters for creating an asset in the Prismic media library.
|
|
76
|
-
*/
|
|
77
|
-
export type CreateAssetParams = {
|
|
78
|
-
/**
|
|
79
|
-
* Asset notes.
|
|
80
|
-
*/
|
|
81
|
-
notes?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Asset credits.
|
|
84
|
-
*/
|
|
85
|
-
credits?: string;
|
|
86
|
-
/**
|
|
87
|
-
* Asset alt text.
|
|
88
|
-
*/
|
|
89
|
-
alt?: string;
|
|
90
|
-
/**
|
|
91
|
-
* Asset tags.
|
|
92
|
-
*/
|
|
93
|
-
tags?: string[];
|
|
94
|
-
};
|
|
95
|
-
/**
|
|
96
|
-
* Configuration for clients that determine how content is queried.
|
|
97
|
-
*/
|
|
98
|
-
export type WriteClientConfig = {
|
|
99
|
-
/**
|
|
100
|
-
* A Prismic write token that allows writing content to the repository.
|
|
101
|
-
*/
|
|
102
|
-
writeToken: string;
|
|
103
|
-
/**
|
|
104
|
-
* The Prismic Asset API endpoint.
|
|
105
|
-
*
|
|
106
|
-
* @defaultValue `"https://asset-api.prismic.io/"`
|
|
107
|
-
*
|
|
108
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
109
|
-
*/
|
|
110
|
-
assetAPIEndpoint?: string;
|
|
111
|
-
/**
|
|
112
|
-
* The Prismic Migration API endpoint.
|
|
113
|
-
*
|
|
114
|
-
* @defaultValue `"https://migration.prismic.io/"`
|
|
115
|
-
*
|
|
116
|
-
* @see Prismic Migration API technical reference: {@link https://prismic.io/docs/migration-api-technical-reference}
|
|
117
|
-
*/
|
|
118
|
-
migrationAPIEndpoint?: string;
|
|
119
|
-
} & ClientConfig;
|
|
120
|
-
/**
|
|
121
|
-
* A client that allows querying and writing content to a Prismic repository.
|
|
122
|
-
*
|
|
123
|
-
* If used in an environment where a global `fetch` function is unavailable,
|
|
124
|
-
* such as Node.js, the `fetch` option must be provided as part of the `options`
|
|
125
|
-
* parameter.
|
|
126
|
-
*
|
|
127
|
-
* @typeParam TDocuments - Document types that are registered for the Prismic
|
|
128
|
-
* repository. Query methods will automatically be typed based on this type.
|
|
129
|
-
*/
|
|
130
|
-
export declare class WriteClient<TDocuments extends PrismicDocument = PrismicDocument> extends Client<TDocuments> {
|
|
131
|
-
#private;
|
|
132
|
-
writeToken: string;
|
|
133
|
-
assetAPIEndpoint: string;
|
|
134
|
-
migrationAPIEndpoint: string;
|
|
135
|
-
/**
|
|
136
|
-
* Creates a Prismic client that can be used to query and write content to a
|
|
137
|
-
* repository.
|
|
138
|
-
*
|
|
139
|
-
* If used in an environment where a global `fetch` function is unavailable,
|
|
140
|
-
* such as in some Node.js versions, the `fetch` option must be provided as
|
|
141
|
-
* part of the `options` parameter.
|
|
142
|
-
*
|
|
143
|
-
* @param repositoryName - The Prismic repository name for the repository.
|
|
144
|
-
* @param options - Configuration that determines how content will be queried
|
|
145
|
-
* from and written to the Prismic repository.
|
|
146
|
-
*
|
|
147
|
-
* @returns A client that can query and write content to the repository.
|
|
148
|
-
*/
|
|
149
|
-
constructor(repositoryName: string, options: WriteClientConfig);
|
|
150
|
-
/**
|
|
151
|
-
* Creates a migration release on the Prismic repository based on the provided
|
|
152
|
-
* prepared migration.
|
|
153
|
-
*
|
|
154
|
-
* @param migration - A migration prepared with {@link createMigration}.
|
|
155
|
-
* @param params - An event listener and additional fetch parameters.
|
|
156
|
-
*
|
|
157
|
-
* @see Prismic Migration API technical reference: {@link https://prismic.io/docs/migration-api-technical-reference}
|
|
158
|
-
*/
|
|
159
|
-
migrate(migration: Migration<TDocuments>, params?: {
|
|
160
|
-
reporter?: (event: MigrateReporterEvents) => void;
|
|
161
|
-
} & FetchParams): Promise<void>;
|
|
162
|
-
/**
|
|
163
|
-
* Creates assets in the Prismic repository's media library.
|
|
164
|
-
*
|
|
165
|
-
* @param migration - A migration prepared with {@link createMigration}.
|
|
166
|
-
* @param params - An event listener and additional fetch parameters.
|
|
167
|
-
*
|
|
168
|
-
* @internal This method is one of the step performed by the {@link migrate} method.
|
|
169
|
-
*/
|
|
170
|
-
private migrateCreateAssets;
|
|
171
|
-
/**
|
|
172
|
-
* Creates documents in the Prismic repository's migration release.
|
|
173
|
-
*
|
|
174
|
-
* @param migration - A migration prepared with {@link createMigration}.
|
|
175
|
-
* @param params - An event listener and additional fetch parameters.
|
|
176
|
-
*
|
|
177
|
-
* @internal This method is one of the step performed by the {@link migrate} method.
|
|
178
|
-
*/
|
|
179
|
-
private migrateCreateDocuments;
|
|
180
|
-
/**
|
|
181
|
-
* Updates documents in the Prismic repository's migration release with their
|
|
182
|
-
* patched data.
|
|
183
|
-
*
|
|
184
|
-
* @param migration - A migration prepared with {@link createMigration}.
|
|
185
|
-
* @param params - An event listener and additional fetch parameters.
|
|
186
|
-
*
|
|
187
|
-
* @internal This method is one of the step performed by the {@link migrate} method.
|
|
188
|
-
*/
|
|
189
|
-
private migrateUpdateDocuments;
|
|
190
|
-
/**
|
|
191
|
-
* Creates an asset in the Prismic media library.
|
|
192
|
-
*
|
|
193
|
-
* @param file - The file to upload as an asset.
|
|
194
|
-
* @param filename - The filename of the asset.
|
|
195
|
-
* @param params - Additional asset data and fetch parameters.
|
|
196
|
-
*
|
|
197
|
-
* @returns The created asset.
|
|
198
|
-
*/
|
|
199
|
-
private createAsset;
|
|
200
|
-
/**
|
|
201
|
-
* Updates an asset in the Prismic media library.
|
|
202
|
-
*
|
|
203
|
-
* @param id - The ID of the asset to update.
|
|
204
|
-
* @param params - The asset data to update and additional fetch parameters.
|
|
205
|
-
*
|
|
206
|
-
* @returns The updated asset.
|
|
207
|
-
*/
|
|
208
|
-
private updateAsset;
|
|
209
|
-
/**
|
|
210
|
-
* Fetches a foreign asset from a URL.
|
|
211
|
-
*
|
|
212
|
-
* @param url - The URL of the asset to fetch.
|
|
213
|
-
* @param params - Additional fetch parameters.
|
|
214
|
-
*
|
|
215
|
-
* @returns A file representing the fetched asset.
|
|
216
|
-
*/
|
|
217
|
-
private fetchForeignAsset;
|
|
218
|
-
/**
|
|
219
|
-
* {@link resolveAssetTagIDs} rate limiter.
|
|
220
|
-
*/
|
|
221
|
-
private _resolveAssetTagIDsLimit;
|
|
222
|
-
/**
|
|
223
|
-
* Resolves asset tag IDs from tag names.
|
|
224
|
-
*
|
|
225
|
-
* @param tagNames - An array of tag names to resolve.
|
|
226
|
-
* @param params - Whether or not missing tags should be created and
|
|
227
|
-
* additional fetch parameters.
|
|
228
|
-
*
|
|
229
|
-
* @returns An array of resolved tag IDs.
|
|
230
|
-
*/
|
|
231
|
-
private resolveAssetTagIDs;
|
|
232
|
-
/**
|
|
233
|
-
* Creates a tag in the Asset API.
|
|
234
|
-
*
|
|
235
|
-
* @remarks
|
|
236
|
-
* Tags should be at least 3 characters long and 20 characters at most.
|
|
237
|
-
*
|
|
238
|
-
* @param name - The name of the tag to create.
|
|
239
|
-
* @param params - Additional fetch parameters.
|
|
240
|
-
*
|
|
241
|
-
* @returns The created tag.
|
|
242
|
-
*/
|
|
243
|
-
private createAssetTag;
|
|
244
|
-
/**
|
|
245
|
-
* Queries existing tags from the Asset API.
|
|
246
|
-
*
|
|
247
|
-
* @param params - Additional fetch parameters.
|
|
248
|
-
*
|
|
249
|
-
* @returns An array of existing tags.
|
|
250
|
-
*/
|
|
251
|
-
private getAssetTags;
|
|
252
|
-
/**
|
|
253
|
-
* Creates a document in the repository's migration release.
|
|
254
|
-
*
|
|
255
|
-
* @typeParam TType - Type of Prismic documents to create.
|
|
256
|
-
*
|
|
257
|
-
* @param document - The document to create.
|
|
258
|
-
* @param documentTitle - The title of the document to create which will be
|
|
259
|
-
* displayed in the editor.
|
|
260
|
-
* @param params - Document master language document ID and additional fetch
|
|
261
|
-
* parameters.
|
|
262
|
-
*
|
|
263
|
-
* @returns The ID of the created document.
|
|
264
|
-
*
|
|
265
|
-
* @see Prismic Migration API technical reference: {@link https://prismic.io/docs/migration-api-technical-reference}
|
|
266
|
-
*/
|
|
267
|
-
private createDocument;
|
|
268
|
-
/**
|
|
269
|
-
* Updates an existing document in the repository's migration release.
|
|
270
|
-
*
|
|
271
|
-
* @typeParam TType - Type of Prismic documents to update.
|
|
272
|
-
*
|
|
273
|
-
* @param id - The ID of the document to update.
|
|
274
|
-
* @param document - The document content to update.
|
|
275
|
-
* @param params - Additional fetch parameters.
|
|
276
|
-
*
|
|
277
|
-
* @see Prismic Migration API technical reference: {@link https://prismic.io/docs/migration-api-technical-reference}
|
|
278
|
-
*/
|
|
279
|
-
private updateDocument;
|
|
280
|
-
}
|
|
281
|
-
export {};
|