@prismicio/client 7.21.0-alpha.1 → 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
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import type { AssetTag } from "./tag";
|
|
2
|
-
/**
|
|
3
|
-
* Asset types.
|
|
4
|
-
*/
|
|
5
|
-
export declare const AssetType: {
|
|
6
|
-
readonly All: "all";
|
|
7
|
-
readonly Audio: "audio";
|
|
8
|
-
readonly Document: "document";
|
|
9
|
-
readonly Image: "image";
|
|
10
|
-
readonly Video: "video";
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* An object representing an asset returned by the Asset API.
|
|
14
|
-
*
|
|
15
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
16
|
-
*/
|
|
17
|
-
export type Asset = {
|
|
18
|
-
/**
|
|
19
|
-
* Asset ID.
|
|
20
|
-
*/
|
|
21
|
-
id: string;
|
|
22
|
-
/**
|
|
23
|
-
* Asset URL.
|
|
24
|
-
*/
|
|
25
|
-
url: string;
|
|
26
|
-
/**
|
|
27
|
-
* Asset creation date.
|
|
28
|
-
*/
|
|
29
|
-
created_at: number;
|
|
30
|
-
/**
|
|
31
|
-
* Asset last modification date.
|
|
32
|
-
*/
|
|
33
|
-
last_modified: number;
|
|
34
|
-
/**
|
|
35
|
-
* Asset filename.
|
|
36
|
-
*/
|
|
37
|
-
filename: string;
|
|
38
|
-
/**
|
|
39
|
-
* Asset extension.
|
|
40
|
-
*/
|
|
41
|
-
extension: string;
|
|
42
|
-
/**
|
|
43
|
-
* Asset size in bytes.
|
|
44
|
-
*/
|
|
45
|
-
size: number;
|
|
46
|
-
/**
|
|
47
|
-
* Asset kind.
|
|
48
|
-
*/
|
|
49
|
-
kind: Exclude<(typeof AssetType)[keyof typeof AssetType], (typeof AssetType)["All"]>;
|
|
50
|
-
/**
|
|
51
|
-
* Asset width in pixels.
|
|
52
|
-
*/
|
|
53
|
-
width?: number;
|
|
54
|
-
/**
|
|
55
|
-
* Asset height in pixels.
|
|
56
|
-
*/
|
|
57
|
-
height?: number;
|
|
58
|
-
/**
|
|
59
|
-
* Asset notes.
|
|
60
|
-
*/
|
|
61
|
-
notes?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Asset credits.
|
|
64
|
-
*/
|
|
65
|
-
credits?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Asset alt text.
|
|
68
|
-
*/
|
|
69
|
-
alt?: string;
|
|
70
|
-
/**
|
|
71
|
-
* Asset tags.
|
|
72
|
-
*/
|
|
73
|
-
tags?: AssetTag[];
|
|
74
|
-
/**
|
|
75
|
-
* @internal
|
|
76
|
-
*/
|
|
77
|
-
origin_url?: string;
|
|
78
|
-
/**
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
|
-
uploader_id?: string;
|
|
82
|
-
/**
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
|
-
search_highlight?: {
|
|
86
|
-
filename?: string[];
|
|
87
|
-
notes?: string[];
|
|
88
|
-
credits?: string[];
|
|
89
|
-
alt?: string[];
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Available query parameters when querying assets from the Asset API.
|
|
94
|
-
*
|
|
95
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
96
|
-
*/
|
|
97
|
-
export type GetAssetsParams = {
|
|
98
|
-
/**
|
|
99
|
-
* Number of items to return.
|
|
100
|
-
*/
|
|
101
|
-
pageSize?: number;
|
|
102
|
-
/**
|
|
103
|
-
* @internal
|
|
104
|
-
*/
|
|
105
|
-
cursor?: string;
|
|
106
|
-
/**
|
|
107
|
-
* Asset type to filter by.
|
|
108
|
-
*/
|
|
109
|
-
assetType?: (typeof AssetType)[keyof typeof AssetType];
|
|
110
|
-
/**
|
|
111
|
-
* Search query.
|
|
112
|
-
*/
|
|
113
|
-
keyword?: string;
|
|
114
|
-
/**
|
|
115
|
-
* Asset IDs to filter by.
|
|
116
|
-
*/
|
|
117
|
-
ids?: string[];
|
|
118
|
-
/**
|
|
119
|
-
* Asset tags to filter by.
|
|
120
|
-
*/
|
|
121
|
-
tags?: string[];
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* An object representing the result of querying assets from the Asset API.
|
|
125
|
-
*
|
|
126
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
127
|
-
*/
|
|
128
|
-
export type GetAssetsResult = {
|
|
129
|
-
items: Asset[];
|
|
130
|
-
total: number;
|
|
131
|
-
cursor?: string;
|
|
132
|
-
missing_ids?: string[];
|
|
133
|
-
is_opensearch_result: boolean;
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Parameters for uploading an asset to the Asset API.
|
|
137
|
-
*
|
|
138
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
139
|
-
*/
|
|
140
|
-
export type PostAssetParams = {
|
|
141
|
-
file: BlobPart;
|
|
142
|
-
notes?: string;
|
|
143
|
-
credits?: string;
|
|
144
|
-
alt?: string;
|
|
145
|
-
};
|
|
146
|
-
/**
|
|
147
|
-
* Result of uploading an asset to the Asset API.
|
|
148
|
-
*
|
|
149
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
150
|
-
*/
|
|
151
|
-
export type PostAssetResult = Asset;
|
|
152
|
-
/**
|
|
153
|
-
* Parameters for updating an asset in the Asset API.
|
|
154
|
-
*
|
|
155
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
156
|
-
*/
|
|
157
|
-
export type PatchAssetParams = {
|
|
158
|
-
notes?: string;
|
|
159
|
-
credits?: string;
|
|
160
|
-
alt?: string;
|
|
161
|
-
filename?: string;
|
|
162
|
-
tags?: string[];
|
|
163
|
-
};
|
|
164
|
-
/**
|
|
165
|
-
* Result of updating an asset in the Asset API.
|
|
166
|
-
*
|
|
167
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
168
|
-
*/
|
|
169
|
-
export type PatchAssetResult = Asset;
|
|
170
|
-
/**
|
|
171
|
-
* Parameters for deleting an asset from the Asset API.
|
|
172
|
-
*
|
|
173
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
174
|
-
*/
|
|
175
|
-
export type BulkDeleteAssetsParams = {
|
|
176
|
-
ids: string[];
|
|
177
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An object representing an tag used by the Asset API.
|
|
3
|
-
*
|
|
4
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
5
|
-
*/
|
|
6
|
-
export type AssetTag = {
|
|
7
|
-
/**
|
|
8
|
-
* Tag ID.
|
|
9
|
-
*/
|
|
10
|
-
id: string;
|
|
11
|
-
/**
|
|
12
|
-
* Tag name.
|
|
13
|
-
*/
|
|
14
|
-
name: string;
|
|
15
|
-
/**
|
|
16
|
-
* Tag creation date.
|
|
17
|
-
*/
|
|
18
|
-
created_at: number;
|
|
19
|
-
/**
|
|
20
|
-
* Tag last modification date.
|
|
21
|
-
*/
|
|
22
|
-
last_modified: number;
|
|
23
|
-
/**
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
uploader_id?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Number of assets tagged with this tag.
|
|
29
|
-
*/
|
|
30
|
-
count?: number;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* An object representing the result of querying tags from the Asset API.
|
|
34
|
-
*
|
|
35
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
36
|
-
*/
|
|
37
|
-
export type GetAssetTagsResult = {
|
|
38
|
-
items: AssetTag[];
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Parameters for creating a tag in the Asset API.
|
|
42
|
-
*
|
|
43
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
44
|
-
*/
|
|
45
|
-
export type PostAssetTagParams = {
|
|
46
|
-
name: string;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Result of creating a tag in the Asset API.
|
|
50
|
-
*
|
|
51
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
52
|
-
*/
|
|
53
|
-
export type PostAssetTagResult = AssetTag;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { IntegrationFieldData } from "../value/integration";
|
|
2
|
-
/**
|
|
3
|
-
* A catalog item from an integration field.
|
|
4
|
-
*
|
|
5
|
-
* @typeParam TData - The data shape for the catalog item.
|
|
6
|
-
*
|
|
7
|
-
* @see {@link https://prismic.io/docs/fields/integration#create-an-integration-catalog}
|
|
8
|
-
*/
|
|
9
|
-
export type IntegrationAPIItem<TData extends IntegrationFieldData = IntegrationFieldData> = {
|
|
10
|
-
id: string;
|
|
11
|
-
title: string;
|
|
12
|
-
description: string;
|
|
13
|
-
image_url?: string;
|
|
14
|
-
last_update?: number;
|
|
15
|
-
blob: TData;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Response payload from a custom integration catalog API. Contains an array of
|
|
19
|
-
* catalog items and the total count.
|
|
20
|
-
*
|
|
21
|
-
* @typeParam TData - The shape of each catalog item's data.
|
|
22
|
-
*
|
|
23
|
-
* @see {@link https://prismic.io/docs/fields/integration#create-an-integration-catalog}
|
|
24
|
-
*/
|
|
25
|
-
export type IntegrationAPIResults<TData extends IntegrationFieldData = IntegrationFieldData> = {
|
|
26
|
-
results_size: number;
|
|
27
|
-
results: IntegrationAPIItem<TData>[];
|
|
28
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { PrismicDocument, PrismicDocumentWithUID } from "../../value/document";
|
|
2
|
-
/**
|
|
3
|
-
* An object representing the parameters required when creating a document
|
|
4
|
-
* through the Migration API.
|
|
5
|
-
*
|
|
6
|
-
* @typeParam TDocument - Type of the Prismic document to create.
|
|
7
|
-
*
|
|
8
|
-
* @see Prismic Migration API technical reference: {@link https://prismic.io/docs/migration-api-technical-reference}
|
|
9
|
-
*/
|
|
10
|
-
export type PostDocumentParams<TDocument extends PrismicDocument = PrismicDocument> = TDocument extends PrismicDocument<infer TData, infer TType, infer TLang> ? {
|
|
11
|
-
title: string;
|
|
12
|
-
type: TType;
|
|
13
|
-
lang: TLang;
|
|
14
|
-
alternate_language_id?: string;
|
|
15
|
-
tags?: string[];
|
|
16
|
-
data: TData | Record<string, never>;
|
|
17
|
-
} & (TDocument extends PrismicDocumentWithUID ? {
|
|
18
|
-
uid: TDocument["uid"];
|
|
19
|
-
} : {
|
|
20
|
-
uid?: TDocument["uid"];
|
|
21
|
-
}) : never;
|
|
22
|
-
/**
|
|
23
|
-
* Result of creating a document with the Migration API.
|
|
24
|
-
*
|
|
25
|
-
* @typeParam TDocument - Type of the created Prismic document.
|
|
26
|
-
*
|
|
27
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
28
|
-
*/
|
|
29
|
-
export type PostDocumentResult<TDocument extends PrismicDocument = PrismicDocument> = TDocument extends PrismicDocument<infer _TData, infer TType, infer TLang> ? {
|
|
30
|
-
title: string;
|
|
31
|
-
id: string;
|
|
32
|
-
type: TType;
|
|
33
|
-
lang: TLang;
|
|
34
|
-
} & (TDocument["uid"] extends string ? {
|
|
35
|
-
uid: TDocument["uid"];
|
|
36
|
-
} : {
|
|
37
|
-
uid?: TDocument["uid"];
|
|
38
|
-
}) : never;
|
|
39
|
-
/**
|
|
40
|
-
* An object representing the parameters required when updating a document
|
|
41
|
-
* through the Migration API.
|
|
42
|
-
*
|
|
43
|
-
* @typeParam TDocument - Type of the Prismic document to update.
|
|
44
|
-
*
|
|
45
|
-
* @see Prismic Migration API technical reference: {@link https://prismic.io/docs/migration-api-technical-reference}
|
|
46
|
-
*/
|
|
47
|
-
export type PutDocumentParams<TDocument extends PrismicDocument = PrismicDocument> = {
|
|
48
|
-
title?: string;
|
|
49
|
-
uid?: string;
|
|
50
|
-
tags?: string[];
|
|
51
|
-
data: TDocument["data"] | Record<string, never>;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* Result of updating a document with the Migration API.
|
|
55
|
-
*
|
|
56
|
-
* @typeParam TDocument - Type of the updated Prismic document.
|
|
57
|
-
*
|
|
58
|
-
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
59
|
-
*/
|
|
60
|
-
export type PutDocumentResult<TDocument extends PrismicDocument = PrismicDocument> = PostDocumentResult<TDocument>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { PrismicDocument } from "../value/document";
|
|
2
|
-
/**
|
|
3
|
-
* A query response from the Prismic REST API V2. The response contains
|
|
4
|
-
* paginated metadata and a list of matching results for the query.
|
|
5
|
-
*
|
|
6
|
-
* @typeParam Document - The type(s) of Prismic document that can be returned.
|
|
7
|
-
*
|
|
8
|
-
* @see More details on querying: {@link https://prismic.io/docs/api}
|
|
9
|
-
*/
|
|
10
|
-
export interface Query<Document extends PrismicDocument = PrismicDocument> {
|
|
11
|
-
/**
|
|
12
|
-
* The page number for this page of results.
|
|
13
|
-
*/
|
|
14
|
-
page: number;
|
|
15
|
-
/**
|
|
16
|
-
* Maximum number of results per page.
|
|
17
|
-
*/
|
|
18
|
-
results_per_page: number;
|
|
19
|
-
/**
|
|
20
|
-
* Number of results in this page.
|
|
21
|
-
*/
|
|
22
|
-
results_size: number;
|
|
23
|
-
/**
|
|
24
|
-
* Total number of results within all pages.
|
|
25
|
-
*/
|
|
26
|
-
total_results_size: number;
|
|
27
|
-
/**
|
|
28
|
-
* Total number of pages.
|
|
29
|
-
*/
|
|
30
|
-
total_pages: number;
|
|
31
|
-
/**
|
|
32
|
-
* The Prismic REST API V2 URL to the next page, if one exists.
|
|
33
|
-
*/
|
|
34
|
-
next_page: string | null;
|
|
35
|
-
/**
|
|
36
|
-
* The Prismic REST API V2 URL to the previous page, if one exists.
|
|
37
|
-
*/
|
|
38
|
-
prev_page: string | null;
|
|
39
|
-
/**
|
|
40
|
-
* A paginated list of documents matching the query.
|
|
41
|
-
*/
|
|
42
|
-
results: Document[];
|
|
43
|
-
}
|
package/dist/types/api/ref.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Metadata for a reference to a version of a repository's content.
|
|
3
|
-
*
|
|
4
|
-
* @see More details on refs: {@link https://prismic.io/docs/api#refs-and-the-entry-api}
|
|
5
|
-
*/
|
|
6
|
-
export interface Ref {
|
|
7
|
-
/**
|
|
8
|
-
* The unique identifier for the ref.
|
|
9
|
-
*/
|
|
10
|
-
id: string;
|
|
11
|
-
/**
|
|
12
|
-
* The identifier that should be provided to the API to select a content
|
|
13
|
-
* version.
|
|
14
|
-
*/
|
|
15
|
-
ref: string;
|
|
16
|
-
/**
|
|
17
|
-
* A human-readable name for the ref. The master ref is always named "Master".
|
|
18
|
-
*/
|
|
19
|
-
label: string;
|
|
20
|
-
/**
|
|
21
|
-
* Determines if the ref is the master ref. The master ref contains the latest
|
|
22
|
-
* published content.
|
|
23
|
-
*/
|
|
24
|
-
isMasterRef: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* If the ref is associated with a Release, this field contains the timestamp
|
|
27
|
-
* at which the Release will be automatically published, if set.
|
|
28
|
-
*
|
|
29
|
-
* @see More details on Releases: {@link https://prismic.io/docs/guides/draft-plan-and-schedule-content#releases}
|
|
30
|
-
*/
|
|
31
|
-
scheduledAt?: string;
|
|
32
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Ref } from "./ref";
|
|
2
|
-
/**
|
|
3
|
-
* Metadata for a Release.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* This is an alias for `Ref`.
|
|
7
|
-
*
|
|
8
|
-
* @see {@link Ref}
|
|
9
|
-
* @see More details on Releases: {@link https://prismic.io/docs/guides/draft-plan-and-schedule-content#releases}
|
|
10
|
-
*/
|
|
11
|
-
export type Release = Ref;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import type { Ref } from "./ref";
|
|
2
|
-
/**
|
|
3
|
-
* Repository metadata returned from the Prismic REST API V2. This data can be
|
|
4
|
-
* fetched by sending a `GET` a request to a repository's `/api/v2` endpoint.
|
|
5
|
-
*
|
|
6
|
-
* @see More details on the `/api/v2` endpoint: {@link https://prismic.io/docs/api#refs-and-the-entry-api}
|
|
7
|
-
*/
|
|
8
|
-
export interface Repository {
|
|
9
|
-
/**
|
|
10
|
-
* A list of refs for the repository.
|
|
11
|
-
*
|
|
12
|
-
* @see {@link Ref}
|
|
13
|
-
*/
|
|
14
|
-
refs: Ref[];
|
|
15
|
-
/**
|
|
16
|
-
* An identifier used to query content with the latest integration fields
|
|
17
|
-
* data.
|
|
18
|
-
*/
|
|
19
|
-
integrationFieldsRef: string | null;
|
|
20
|
-
/**
|
|
21
|
-
* A list of languages for the repository.
|
|
22
|
-
*
|
|
23
|
-
* @see {@link Language}
|
|
24
|
-
*/
|
|
25
|
-
languages: Language[];
|
|
26
|
-
/**
|
|
27
|
-
* A list of the repository's custom type API IDs mapped to their
|
|
28
|
-
* human-readable name.
|
|
29
|
-
*/
|
|
30
|
-
types: Record<string, string>;
|
|
31
|
-
/**
|
|
32
|
-
* @deprecated Tags are only available in the forms object.
|
|
33
|
-
*
|
|
34
|
-
* @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}
|
|
35
|
-
*/
|
|
36
|
-
tags: string[];
|
|
37
|
-
/**
|
|
38
|
-
* An internally-used list of REST API features for the repository.
|
|
39
|
-
*
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
42
|
-
forms: Record<string, Form>;
|
|
43
|
-
/**
|
|
44
|
-
* The URL used to begin the OAuth process for the repository.
|
|
45
|
-
*/
|
|
46
|
-
oauth_initiate: string;
|
|
47
|
-
/**
|
|
48
|
-
* The token used for the OAuth process for the repository.
|
|
49
|
-
*/
|
|
50
|
-
oauth_token: string;
|
|
51
|
-
/**
|
|
52
|
-
* The version of the API.
|
|
53
|
-
*/
|
|
54
|
-
version: string;
|
|
55
|
-
/**
|
|
56
|
-
* Licensing information for the repository content.
|
|
57
|
-
*/
|
|
58
|
-
license: string;
|
|
59
|
-
/**
|
|
60
|
-
* @deprecated Experiments are no longer part of Prismic.
|
|
61
|
-
*/
|
|
62
|
-
experiments: unknown;
|
|
63
|
-
/**
|
|
64
|
-
* @deprecated Bookmarks are not longer part of Prismic.
|
|
65
|
-
*/
|
|
66
|
-
bookmarks: Record<string, string>;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Metadata for a language that has been configured for a repository.
|
|
70
|
-
*/
|
|
71
|
-
export interface Language {
|
|
72
|
-
/**
|
|
73
|
-
* A unique identifier for the language.
|
|
74
|
-
*/
|
|
75
|
-
id: string;
|
|
76
|
-
/**
|
|
77
|
-
* The name of the language.
|
|
78
|
-
*/
|
|
79
|
-
name: string;
|
|
80
|
-
/**
|
|
81
|
-
* Whether or not the language is the default language of the repository.
|
|
82
|
-
*/
|
|
83
|
-
is_master: boolean;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* A Prismic REST API V2 feature supported by the repository. It contains
|
|
87
|
-
* metadata about the feature and how to interact with it via the API.
|
|
88
|
-
*
|
|
89
|
-
* @internal
|
|
90
|
-
*/
|
|
91
|
-
export interface Form {
|
|
92
|
-
method: "GET";
|
|
93
|
-
enctype: string;
|
|
94
|
-
action: string;
|
|
95
|
-
name?: string;
|
|
96
|
-
rel?: string;
|
|
97
|
-
fields: Record<string, FormField>;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* A field for a feature of the Prismic REST API V2. It contains metadata about
|
|
101
|
-
* the feature's field and how to interact with it via the API.
|
|
102
|
-
*
|
|
103
|
-
* @internal
|
|
104
|
-
*/
|
|
105
|
-
export interface FormField {
|
|
106
|
-
type: "String" | "Integer";
|
|
107
|
-
multiple: boolean;
|
|
108
|
-
default?: string;
|
|
109
|
-
}
|
package/dist/types/api/tags.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* List of tags returned from the Prismic Tags API. This data can be fetched by
|
|
3
|
-
* sending a `GET` request to a repository's `/api/tags` endpoint.
|
|
4
|
-
*
|
|
5
|
-
* @typeParam Tag - Tags that are returned by the Tags API.
|
|
6
|
-
*
|
|
7
|
-
* @see More details on the Tags API: {@link https://prismic.io/docs/tags-api-technical-reference}
|
|
8
|
-
*/
|
|
9
|
-
export type Tags<Tag extends string = string> = Tag[];
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6
|
-
class PrismicMigrationAsset {
|
|
7
|
-
/**
|
|
8
|
-
* Creates a migration asset used with the Prismic Migration API.
|
|
9
|
-
*
|
|
10
|
-
* @param config - Configuration of the asset.
|
|
11
|
-
* @param initialField - The initial field value if any.
|
|
12
|
-
*
|
|
13
|
-
* @returns A migration asset instance.
|
|
14
|
-
*/
|
|
15
|
-
constructor(config, initialField) {
|
|
16
|
-
/**
|
|
17
|
-
* Asset object from Prismic, available once created.
|
|
18
|
-
*/
|
|
19
|
-
__publicField(this, "asset");
|
|
20
|
-
/**
|
|
21
|
-
* Configuration of the asset.
|
|
22
|
-
*/
|
|
23
|
-
__publicField(this, "config");
|
|
24
|
-
/**
|
|
25
|
-
* The initial field value this migration field was created with.
|
|
26
|
-
*/
|
|
27
|
-
__publicField(this, "originalField");
|
|
28
|
-
this.config = config;
|
|
29
|
-
this.originalField = initialField;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.PrismicMigrationAsset = PrismicMigrationAsset;
|
|
33
|
-
//# sourceMappingURL=Asset.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Asset.cjs","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\"\n\nimport type { InjectMigrationSpecificTypes } from \"./Document\"\n\n/**\n * An asset to be uploaded to Prismic media library.\n */\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\n\t * `file` property. It is mainly used for deduplication within a `Migration`\n\t * instance.\n\t */\n\tid: string | URL | File | NonNullable<ConstructorParameters<File>[0]>[0]\n\n\t/**\n\t * File to be uploaded as an asset.\n\t */\n\tfile: string | URL | File | NonNullable<ConstructorParameters<File>[0]>[0]\n\n\t/**\n\t * Filename of the asset.\n\t */\n\tfilename: string\n\n\t/**\n\t * Notes about the asset. Notes are private and only visible in Prismic media\n\t * library.\n\t */\n\tnotes?: string\n\n\t/**\n\t * Credits and copyright for the asset if any.\n\t */\n\tcredits?: string\n\n\t/**\n\t * Alternate text for the asset.\n\t */\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/**\n * An image field in a migration.\n */\nexport type MigrationImage =\n\t| PrismicMigrationAsset\n\t| ({\n\t\t\t/**\n\t\t\t * A reference to the migration asset used to resolve the image field's\n\t\t\t * value.\n\t\t\t */\n\t\t\tid: PrismicMigrationAsset\n\t } & Record<string, PrismicMigrationAsset>)\n\n/**\n * A link to media field in a migration.\n */\nexport type MigrationLinkToMedia = Pick<\n\tLinkToMediaField<\"filled\">,\n\t\"link_type\" | \"text\"\n> & {\n\t/**\n\t * A reference to the migration asset used to resolve the link to media\n\t * field's value.\n\t */\n\tid: PrismicMigrationAsset\n}\n\n/**\n * The minimum amount of information needed to represent a link to media field\n * with the migration API.\n */\nexport type MigrationLinkToMediaField =\n\t| Pick<LinkToMediaField<\"filled\">, \"link_type\" | \"id\" | \"text\">\n\t| LinkToMediaField<\"empty\">\n\n/**\n * A rich text image node in a migration.\n */\nexport type MigrationRTImageNode = InjectMigrationSpecificTypes<\n\tPick<RTImageNode, \"type\" | \"linkTo\">\n> & {\n\t/**\n\t * A reference to the migration asset used to resolve the rich text image\n\t * node's value.\n\t */\n\tid: PrismicMigrationAsset\n}\n\n/**\n * A migration asset used with the Prismic Migration API.\n */\nexport class PrismicMigrationAsset {\n\t/**\n\t * Asset object from Prismic, available once created.\n\t */\n\tasset?: Asset\n\n\t/**\n\t * Configuration of the asset.\n\t */\n\tconfig: MigrationAssetConfig\n\n\t/**\n\t * The initial field value this migration field was created with.\n\t */\n\toriginalField?:\n\t\t| FilledImageFieldImage\n\t\t| LinkToMediaField<\"filled\">\n\t\t| 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 *\n\t * @returns A migration asset instance.\n\t */\n\tconstructor(\n\t\tconfig: MigrationAssetConfig,\n\t\tinitialField?:\n\t\t\t| FilledImageFieldImage\n\t\t\t| LinkToMediaField<\"filled\">\n\t\t\t| RTImageNode,\n\t) {\n\t\tthis.config = config\n\t\tthis.originalField = initialField\n\t}\n}\n"],"names":[],"mappings":";;;;;MA2Ga,sBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA2BjC,YACC,QACA,cAGc;AA5Bf;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAoBC,SAAK,SAAS;AACd,SAAK,gBAAgB;AAAA,EAAA;AAEtB;;"}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import type { Asset } from "../api/asset/asset";
|
|
2
|
-
import type { FilledImageFieldImage } from "../value/image";
|
|
3
|
-
import type { LinkToMediaField } from "../value/linkToMedia";
|
|
4
|
-
import { type RTImageNode } from "../value/richText";
|
|
5
|
-
import type { InjectMigrationSpecificTypes } from "./Document";
|
|
6
|
-
/**
|
|
7
|
-
* An asset to be uploaded to Prismic media library.
|
|
8
|
-
*/
|
|
9
|
-
export type MigrationAssetConfig = {
|
|
10
|
-
/**
|
|
11
|
-
* ID the assets is indexed with on the migration instance.
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* This property's value is not necessarily the same as the as the one in the
|
|
15
|
-
* `file` property. It is mainly used for deduplication within a `Migration`
|
|
16
|
-
* instance.
|
|
17
|
-
*/
|
|
18
|
-
id: string | URL | File | NonNullable<ConstructorParameters<File>[0]>[0];
|
|
19
|
-
/**
|
|
20
|
-
* File to be uploaded as an asset.
|
|
21
|
-
*/
|
|
22
|
-
file: string | URL | File | NonNullable<ConstructorParameters<File>[0]>[0];
|
|
23
|
-
/**
|
|
24
|
-
* Filename of the asset.
|
|
25
|
-
*/
|
|
26
|
-
filename: string;
|
|
27
|
-
/**
|
|
28
|
-
* Notes about the asset. Notes are private and only visible in Prismic media
|
|
29
|
-
* library.
|
|
30
|
-
*/
|
|
31
|
-
notes?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Credits and copyright for the asset if any.
|
|
34
|
-
*/
|
|
35
|
-
credits?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Alternate text for the asset.
|
|
38
|
-
*/
|
|
39
|
-
alt?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Tags associated with the asset.
|
|
42
|
-
*
|
|
43
|
-
* @remarks
|
|
44
|
-
* Tags should be at least 3 characters long and 20 characters at most.
|
|
45
|
-
*/
|
|
46
|
-
tags?: string[];
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* An image field in a migration.
|
|
50
|
-
*/
|
|
51
|
-
export type MigrationImage = PrismicMigrationAsset | ({
|
|
52
|
-
/**
|
|
53
|
-
* A reference to the migration asset used to resolve the image field's
|
|
54
|
-
* value.
|
|
55
|
-
*/
|
|
56
|
-
id: PrismicMigrationAsset;
|
|
57
|
-
} & Record<string, PrismicMigrationAsset>);
|
|
58
|
-
/**
|
|
59
|
-
* A link to media field in a migration.
|
|
60
|
-
*/
|
|
61
|
-
export type MigrationLinkToMedia = Pick<LinkToMediaField<"filled">, "link_type" | "text"> & {
|
|
62
|
-
/**
|
|
63
|
-
* A reference to the migration asset used to resolve the link to media
|
|
64
|
-
* field's value.
|
|
65
|
-
*/
|
|
66
|
-
id: PrismicMigrationAsset;
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* The minimum amount of information needed to represent a link to media field
|
|
70
|
-
* with the migration API.
|
|
71
|
-
*/
|
|
72
|
-
export type MigrationLinkToMediaField = Pick<LinkToMediaField<"filled">, "link_type" | "id" | "text"> | LinkToMediaField<"empty">;
|
|
73
|
-
/**
|
|
74
|
-
* A rich text image node in a migration.
|
|
75
|
-
*/
|
|
76
|
-
export type MigrationRTImageNode = InjectMigrationSpecificTypes<Pick<RTImageNode, "type" | "linkTo">> & {
|
|
77
|
-
/**
|
|
78
|
-
* A reference to the migration asset used to resolve the rich text image
|
|
79
|
-
* node's value.
|
|
80
|
-
*/
|
|
81
|
-
id: PrismicMigrationAsset;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* A migration asset used with the Prismic Migration API.
|
|
85
|
-
*/
|
|
86
|
-
export declare class PrismicMigrationAsset {
|
|
87
|
-
/**
|
|
88
|
-
* Asset object from Prismic, available once created.
|
|
89
|
-
*/
|
|
90
|
-
asset?: Asset;
|
|
91
|
-
/**
|
|
92
|
-
* Configuration of the asset.
|
|
93
|
-
*/
|
|
94
|
-
config: MigrationAssetConfig;
|
|
95
|
-
/**
|
|
96
|
-
* The initial field value this migration field was created with.
|
|
97
|
-
*/
|
|
98
|
-
originalField?: FilledImageFieldImage | LinkToMediaField<"filled"> | RTImageNode;
|
|
99
|
-
/**
|
|
100
|
-
* Creates a migration asset used with the Prismic Migration API.
|
|
101
|
-
*
|
|
102
|
-
* @param config - Configuration of the asset.
|
|
103
|
-
* @param initialField - The initial field value if any.
|
|
104
|
-
*
|
|
105
|
-
* @returns A migration asset instance.
|
|
106
|
-
*/
|
|
107
|
-
constructor(config: MigrationAssetConfig, initialField?: FilledImageFieldImage | LinkToMediaField<"filled"> | RTImageNode);
|
|
108
|
-
}
|