@prismicio/client 7.21.0-alpha.2 → 7.21.0-canary.248534d
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 +1218 -0
- package/dist/Client.cjs.map +1 -0
- package/dist/Client.d.cts +976 -0
- package/dist/Client.d.cts.map +1 -0
- package/dist/Client.d.ts +976 -0
- package/dist/Client.d.ts.map +1 -0
- package/dist/Client.js +1218 -0
- package/dist/Client.js.map +1 -0
- package/dist/Migration.cjs +284 -0
- package/dist/Migration.cjs.map +1 -0
- package/dist/Migration.d.cts +216 -0
- package/dist/Migration.d.cts.map +1 -0
- package/dist/Migration.d.ts +216 -0
- package/dist/Migration.d.ts.map +1 -0
- package/dist/Migration.js +284 -0
- package/dist/Migration.js.map +1 -0
- package/dist/WriteClient.cjs +488 -0
- package/dist/WriteClient.cjs.map +1 -0
- package/dist/WriteClient.d.cts +262 -0
- package/dist/WriteClient.d.cts.map +1 -0
- package/dist/WriteClient.d.ts +262 -0
- package/dist/WriteClient.d.ts.map +1 -0
- package/dist/WriteClient.js +488 -0
- package/dist/WriteClient.js.map +1 -0
- package/dist/_virtual/rolldown_runtime.cjs +14 -0
- package/dist/_virtual/rolldown_runtime.js +13 -0
- package/dist/buildQueryURL.cjs +96 -0
- package/dist/buildQueryURL.cjs.map +1 -0
- package/dist/buildQueryURL.d.cts +220 -0
- package/dist/buildQueryURL.d.cts.map +1 -0
- package/dist/buildQueryURL.d.ts +220 -0
- package/dist/buildQueryURL.d.ts.map +1 -0
- package/dist/buildQueryURL.js +96 -0
- package/dist/buildQueryURL.js.map +1 -0
- package/dist/cookie.cjs +19 -0
- package/dist/cookie.cjs.map +1 -0
- package/dist/cookie.d.cts +11 -0
- package/dist/cookie.d.cts.map +1 -0
- package/dist/cookie.d.ts +11 -0
- package/dist/cookie.d.ts.map +1 -0
- package/dist/cookie.js +13 -0
- package/dist/cookie.js.map +1 -0
- package/dist/createClient.cjs +33 -0
- package/dist/createClient.cjs.map +1 -0
- package/dist/createClient.d.cts +41 -0
- package/dist/createClient.d.cts.map +1 -0
- package/dist/createClient.d.ts +41 -0
- package/dist/createClient.d.ts.map +1 -0
- package/dist/createClient.js +33 -0
- package/dist/createClient.js.map +1 -0
- package/dist/createMigration.cjs +22 -0
- package/dist/createMigration.cjs.map +1 -0
- package/dist/createMigration.d.cts +30 -0
- package/dist/createMigration.d.cts.map +1 -0
- package/dist/createMigration.d.ts +30 -0
- package/dist/createMigration.d.ts.map +1 -0
- package/dist/createMigration.js +22 -0
- package/dist/createMigration.js.map +1 -0
- package/dist/createWriteClient.cjs +30 -0
- package/dist/createWriteClient.cjs.map +1 -0
- package/dist/createWriteClient.d.cts +38 -0
- package/dist/createWriteClient.d.cts.map +1 -0
- package/dist/createWriteClient.d.ts +38 -0
- package/dist/createWriteClient.d.ts.map +1 -0
- package/dist/createWriteClient.js +30 -0
- package/dist/createWriteClient.js.map +1 -0
- package/dist/errors/ForbiddenError.cjs +8 -0
- package/dist/errors/ForbiddenError.cjs.map +1 -0
- package/dist/errors/ForbiddenError.d.cts +14 -0
- package/dist/errors/ForbiddenError.d.cts.map +1 -0
- package/dist/errors/ForbiddenError.d.ts +14 -0
- package/dist/errors/ForbiddenError.d.ts.map +1 -0
- package/dist/errors/ForbiddenError.js +8 -0
- package/dist/errors/ForbiddenError.js.map +1 -0
- package/dist/errors/InvalidDataError.cjs +8 -0
- package/dist/errors/InvalidDataError.cjs.map +1 -0
- package/dist/errors/InvalidDataError.d.cts +7 -0
- package/dist/errors/InvalidDataError.d.cts.map +1 -0
- package/dist/errors/InvalidDataError.d.ts +7 -0
- package/dist/errors/InvalidDataError.d.ts.map +1 -0
- package/dist/errors/InvalidDataError.js +8 -0
- package/dist/errors/InvalidDataError.js.map +1 -0
- package/dist/errors/NotFoundError.cjs +8 -0
- package/dist/errors/NotFoundError.cjs.map +1 -0
- package/dist/errors/NotFoundError.d.cts +7 -0
- package/dist/errors/NotFoundError.d.cts.map +1 -0
- package/dist/errors/NotFoundError.d.ts +7 -0
- package/dist/errors/NotFoundError.d.ts.map +1 -0
- package/dist/errors/NotFoundError.js +8 -0
- package/dist/errors/NotFoundError.js.map +1 -0
- package/dist/errors/ParsingError.cjs +8 -0
- package/dist/errors/ParsingError.cjs.map +1 -0
- package/dist/errors/ParsingError.d.cts +17 -0
- package/dist/errors/ParsingError.d.cts.map +1 -0
- package/dist/errors/ParsingError.d.ts +17 -0
- package/dist/errors/ParsingError.d.ts.map +1 -0
- package/dist/errors/ParsingError.js +8 -0
- package/dist/errors/ParsingError.js.map +1 -0
- package/dist/errors/PreviewTokenExpired.cjs +8 -0
- package/dist/errors/PreviewTokenExpired.cjs.map +1 -0
- package/dist/errors/PreviewTokenExpired.d.cts +11 -0
- package/dist/errors/PreviewTokenExpired.d.cts.map +1 -0
- package/dist/errors/PreviewTokenExpired.d.ts +11 -0
- package/dist/errors/PreviewTokenExpired.d.ts.map +1 -0
- package/dist/errors/PreviewTokenExpired.js +8 -0
- package/dist/errors/PreviewTokenExpired.js.map +1 -0
- package/dist/errors/PrismicError.cjs +15 -0
- package/dist/errors/PrismicError.cjs.map +1 -0
- package/dist/errors/PrismicError.d.cts +9 -0
- package/dist/errors/PrismicError.d.cts.map +1 -0
- package/dist/errors/PrismicError.d.ts +9 -0
- package/dist/errors/PrismicError.d.ts.map +1 -0
- package/dist/errors/PrismicError.js +14 -0
- package/dist/errors/PrismicError.js.map +1 -0
- package/dist/errors/RefExpiredError.cjs +8 -0
- package/dist/errors/RefExpiredError.cjs.map +1 -0
- package/dist/errors/RefExpiredError.d.cts +11 -0
- package/dist/errors/RefExpiredError.d.cts.map +1 -0
- package/dist/errors/RefExpiredError.d.ts +11 -0
- package/dist/errors/RefExpiredError.d.ts.map +1 -0
- package/dist/errors/RefExpiredError.js +8 -0
- package/dist/errors/RefExpiredError.js.map +1 -0
- package/dist/errors/RefNotFoundError.cjs +8 -0
- package/dist/errors/RefNotFoundError.cjs.map +1 -0
- package/dist/errors/RefNotFoundError.d.cts +11 -0
- package/dist/errors/RefNotFoundError.d.cts.map +1 -0
- package/dist/errors/RefNotFoundError.d.ts +11 -0
- package/dist/errors/RefNotFoundError.d.ts.map +1 -0
- package/dist/errors/RefNotFoundError.js +8 -0
- package/dist/errors/RefNotFoundError.js.map +1 -0
- package/dist/errors/RepositoryNotFoundError.cjs +8 -0
- package/dist/errors/RepositoryNotFoundError.cjs.map +1 -0
- package/dist/errors/RepositoryNotFoundError.d.cts +7 -0
- package/dist/errors/RepositoryNotFoundError.d.cts.map +1 -0
- package/dist/errors/RepositoryNotFoundError.d.ts +7 -0
- package/dist/errors/RepositoryNotFoundError.d.ts.map +1 -0
- package/dist/errors/RepositoryNotFoundError.js +8 -0
- package/dist/errors/RepositoryNotFoundError.js.map +1 -0
- package/dist/filter.cjs +104 -0
- package/dist/filter.cjs.map +1 -0
- package/dist/filter.d.cts +213 -0
- package/dist/filter.d.cts.map +1 -0
- package/dist/filter.d.ts +213 -0
- package/dist/filter.d.ts.map +1 -0
- package/dist/filter.js +103 -0
- package/dist/filter.js.map +1 -0
- package/dist/getGraphQLEndpoint.cjs +21 -0
- package/dist/getGraphQLEndpoint.cjs.map +1 -0
- package/dist/getGraphQLEndpoint.d.cts +14 -0
- package/dist/getGraphQLEndpoint.d.cts.map +1 -0
- package/dist/getGraphQLEndpoint.d.ts +14 -0
- package/dist/getGraphQLEndpoint.d.ts.map +1 -0
- package/dist/getGraphQLEndpoint.js +21 -0
- package/dist/getGraphQLEndpoint.js.map +1 -0
- package/dist/getRepositoryEndpoint.cjs +30 -0
- package/dist/getRepositoryEndpoint.cjs.map +1 -0
- package/dist/getRepositoryEndpoint.d.cts +23 -0
- package/dist/getRepositoryEndpoint.d.cts.map +1 -0
- package/dist/getRepositoryEndpoint.d.ts +23 -0
- package/dist/getRepositoryEndpoint.d.ts.map +1 -0
- package/dist/getRepositoryEndpoint.js +30 -0
- package/dist/getRepositoryEndpoint.js.map +1 -0
- package/dist/getRepositoryName.cjs +25 -0
- package/dist/getRepositoryName.cjs.map +1 -0
- package/dist/getRepositoryName.d.cts +16 -0
- package/dist/getRepositoryName.d.cts.map +1 -0
- package/dist/getRepositoryName.d.ts +16 -0
- package/dist/getRepositoryName.d.ts.map +1 -0
- package/dist/getRepositoryName.js +25 -0
- package/dist/getRepositoryName.js.map +1 -0
- package/dist/getToolbarSrc.cjs +45 -0
- package/dist/getToolbarSrc.cjs.map +1 -0
- package/dist/getToolbarSrc.d.cts +38 -0
- package/dist/getToolbarSrc.d.cts.map +1 -0
- package/dist/getToolbarSrc.d.ts +38 -0
- package/dist/getToolbarSrc.d.ts.map +1 -0
- package/dist/getToolbarSrc.js +45 -0
- package/dist/getToolbarSrc.js.map +1 -0
- package/dist/helpers/asDate.cjs +39 -0
- package/dist/helpers/asDate.cjs.map +1 -0
- package/dist/helpers/asDate.d.cts +29 -0
- package/dist/helpers/asDate.d.cts.map +1 -0
- package/dist/helpers/asDate.d.ts +29 -0
- package/dist/helpers/asDate.d.ts.map +1 -0
- package/dist/helpers/asDate.js +38 -0
- package/dist/helpers/asDate.js.map +1 -0
- package/dist/helpers/asHTML.cjs +83 -0
- package/dist/helpers/asHTML.cjs.map +1 -0
- package/dist/helpers/asHTML.d.cts +147 -0
- package/dist/helpers/asHTML.d.cts.map +1 -0
- package/dist/helpers/asHTML.d.ts +147 -0
- package/dist/helpers/asHTML.d.ts.map +1 -0
- package/dist/helpers/asHTML.js +83 -0
- package/dist/helpers/asHTML.js.map +1 -0
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +60 -0
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -0
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts +59 -0
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -0
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +59 -0
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -0
- package/dist/helpers/asImagePixelDensitySrcSet.js +60 -0
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -0
- package/dist/helpers/asImageSrc.cjs +33 -0
- package/dist/helpers/asImageSrc.cjs.map +1 -0
- package/dist/helpers/asImageSrc.d.cts +34 -0
- package/dist/helpers/asImageSrc.d.cts.map +1 -0
- package/dist/helpers/asImageSrc.d.ts +34 -0
- package/dist/helpers/asImageSrc.d.ts.map +1 -0
- package/dist/helpers/asImageSrc.js +33 -0
- package/dist/helpers/asImageSrc.js.map +1 -0
- package/dist/helpers/asImageWidthSrcSet.cjs +79 -0
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -0
- package/dist/helpers/asImageWidthSrcSet.d.cts +67 -0
- package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -0
- package/dist/helpers/asImageWidthSrcSet.d.ts +67 -0
- package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -0
- package/dist/helpers/asImageWidthSrcSet.js +79 -0
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -0
- package/dist/helpers/asLink.cjs +29 -0
- package/dist/helpers/asLink.cjs.map +1 -0
- package/dist/helpers/asLink.d.cts +83 -0
- package/dist/helpers/asLink.d.cts.map +1 -0
- package/dist/helpers/asLink.d.ts +83 -0
- package/dist/helpers/asLink.d.ts.map +1 -0
- package/dist/helpers/asLink.js +29 -0
- package/dist/helpers/asLink.js.map +1 -0
- package/dist/helpers/asLinkAttrs.cjs +47 -0
- package/dist/helpers/asLinkAttrs.cjs.map +1 -0
- package/dist/helpers/asLinkAttrs.d.cts +51 -0
- package/dist/helpers/asLinkAttrs.d.cts.map +1 -0
- package/dist/helpers/asLinkAttrs.d.ts +51 -0
- package/dist/helpers/asLinkAttrs.d.ts.map +1 -0
- package/dist/helpers/asLinkAttrs.js +47 -0
- package/dist/helpers/asLinkAttrs.js.map +1 -0
- package/dist/helpers/asText.cjs +16 -0
- package/dist/helpers/asText.cjs.map +1 -0
- package/dist/helpers/asText.d.cts +62 -0
- package/dist/helpers/asText.d.cts.map +1 -0
- package/dist/helpers/asText.d.ts +62 -0
- package/dist/helpers/asText.d.ts.map +1 -0
- package/dist/helpers/asText.js +16 -0
- package/dist/helpers/asText.js.map +1 -0
- package/dist/helpers/documentToLinkField.cjs +33 -0
- package/dist/helpers/documentToLinkField.cjs.map +1 -0
- package/dist/helpers/documentToLinkField.d.cts +21 -0
- package/dist/helpers/documentToLinkField.d.cts.map +1 -0
- package/dist/helpers/documentToLinkField.d.ts +21 -0
- package/dist/helpers/documentToLinkField.d.ts.map +1 -0
- package/dist/helpers/documentToLinkField.js +33 -0
- package/dist/helpers/documentToLinkField.js.map +1 -0
- package/dist/helpers/isFilled.cjs +250 -0
- package/dist/helpers/isFilled.cjs.map +1 -0
- package/dist/helpers/isFilled.d.cts +199 -0
- package/dist/helpers/isFilled.d.cts.map +1 -0
- package/dist/helpers/isFilled.d.ts +199 -0
- package/dist/helpers/isFilled.d.ts.map +1 -0
- package/dist/helpers/isFilled.js +243 -0
- package/dist/helpers/isFilled.js.map +1 -0
- package/dist/helpers/mapSliceZone.cjs +53 -0
- package/dist/helpers/mapSliceZone.cjs.map +1 -0
- package/dist/helpers/mapSliceZone.d.cts +139 -0
- package/dist/helpers/mapSliceZone.d.cts.map +1 -0
- package/dist/helpers/mapSliceZone.d.ts +139 -0
- package/dist/helpers/mapSliceZone.d.ts.map +1 -0
- package/dist/helpers/mapSliceZone.js +52 -0
- package/dist/helpers/mapSliceZone.js.map +1 -0
- package/dist/index.cjs +117 -3882
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +151 -4394
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +151 -4394
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/isRepositoryEndpoint.cjs +23 -0
- package/dist/isRepositoryEndpoint.cjs.map +1 -0
- package/dist/isRepositoryEndpoint.d.cts +14 -0
- package/dist/isRepositoryEndpoint.d.cts.map +1 -0
- package/dist/isRepositoryEndpoint.d.ts +14 -0
- package/dist/isRepositoryEndpoint.d.ts.map +1 -0
- package/dist/isRepositoryEndpoint.js +22 -0
- package/dist/isRepositoryEndpoint.js.map +1 -0
- package/dist/isRepositoryName.cjs +17 -0
- package/dist/isRepositoryName.cjs.map +1 -0
- package/dist/isRepositoryName.d.cts +13 -0
- package/dist/isRepositoryName.d.cts.map +1 -0
- package/dist/isRepositoryName.d.ts +13 -0
- package/dist/isRepositoryName.d.ts.map +1 -0
- package/dist/isRepositoryName.js +16 -0
- package/dist/isRepositoryName.js.map +1 -0
- package/dist/lib/appendFilters.cjs +24 -0
- package/dist/lib/appendFilters.cjs.map +1 -0
- package/dist/lib/appendFilters.js +24 -0
- package/dist/lib/appendFilters.js.map +1 -0
- package/dist/lib/castArray.cjs +20 -0
- package/dist/lib/castArray.cjs.map +1 -0
- package/dist/lib/castArray.js +19 -0
- package/dist/lib/castArray.js.map +1 -0
- package/dist/lib/castThunk.cjs +19 -0
- package/dist/lib/castThunk.cjs.map +1 -0
- package/dist/lib/castThunk.js +18 -0
- package/dist/lib/castThunk.js.map +1 -0
- package/dist/lib/devMsg.cjs +25 -0
- package/dist/lib/devMsg.cjs.map +1 -0
- package/dist/lib/devMsg.js +25 -0
- package/dist/lib/devMsg.js.map +1 -0
- package/dist/lib/escapeHTML.cjs +40 -0
- package/dist/lib/escapeHTML.cjs.map +1 -0
- package/dist/lib/escapeHTML.js +39 -0
- package/dist/lib/escapeHTML.js.map +1 -0
- package/dist/lib/everyTagFilter.cjs +19 -0
- package/dist/lib/everyTagFilter.cjs.map +1 -0
- package/dist/lib/everyTagFilter.js +19 -0
- package/dist/lib/everyTagFilter.js.map +1 -0
- package/dist/lib/findMasterRef.cjs +19 -0
- package/dist/lib/findMasterRef.cjs.map +1 -0
- package/dist/lib/findMasterRef.js +19 -0
- package/dist/lib/findMasterRef.js.map +1 -0
- package/dist/lib/findRef.cjs +24 -0
- package/dist/lib/findRef.cjs.map +1 -0
- package/dist/lib/findRef.js +24 -0
- package/dist/lib/findRef.js.map +1 -0
- package/dist/lib/findRefByID.cjs +20 -0
- package/dist/lib/findRefByID.cjs.map +1 -0
- package/dist/lib/findRefByID.js +20 -0
- package/dist/lib/findRefByID.js.map +1 -0
- package/dist/lib/findRefByLabel.cjs +20 -0
- package/dist/lib/findRefByLabel.cjs.map +1 -0
- package/dist/lib/findRefByLabel.js +20 -0
- package/dist/lib/findRefByLabel.js.map +1 -0
- package/dist/lib/getOptionalLinkProperties.cjs +22 -0
- package/dist/lib/getOptionalLinkProperties.cjs.map +1 -0
- package/dist/lib/getOptionalLinkProperties.js +21 -0
- package/dist/lib/getOptionalLinkProperties.js.map +1 -0
- package/dist/lib/getPreviewCookie.cjs +30 -0
- package/dist/lib/getPreviewCookie.cjs.map +1 -0
- package/dist/lib/getPreviewCookie.js +30 -0
- package/dist/lib/getPreviewCookie.js.map +1 -0
- package/dist/lib/isInternalURL.cjs +18 -0
- package/dist/lib/isInternalURL.cjs.map +1 -0
- package/dist/lib/isInternalURL.js +17 -0
- package/dist/lib/isInternalURL.js.map +1 -0
- package/dist/lib/isMigrationValue.cjs +77 -0
- package/dist/lib/isMigrationValue.cjs.map +1 -0
- package/dist/lib/isMigrationValue.js +74 -0
- package/dist/lib/isMigrationValue.js.map +1 -0
- package/dist/lib/isValue.cjs +110 -0
- package/dist/lib/isValue.cjs.map +1 -0
- package/dist/lib/isValue.js +106 -0
- package/dist/lib/isValue.js.map +1 -0
- package/dist/lib/minifyGraphQLQuery.cjs +16 -0
- package/dist/lib/minifyGraphQLQuery.cjs.map +1 -0
- package/dist/lib/minifyGraphQLQuery.js +15 -0
- package/dist/lib/minifyGraphQLQuery.js.map +1 -0
- package/dist/lib/pLimit.cjs +55 -0
- package/dist/lib/pLimit.cjs.map +1 -0
- package/dist/lib/pLimit.js +54 -0
- package/dist/lib/pLimit.js.map +1 -0
- package/dist/lib/request.cjs +60 -0
- package/dist/lib/request.cjs.map +1 -0
- package/dist/lib/request.d.cts +61 -0
- package/dist/lib/request.d.cts.map +1 -0
- package/dist/lib/request.d.ts +61 -0
- package/dist/lib/request.d.ts.map +1 -0
- package/dist/lib/request.js +60 -0
- package/dist/lib/request.js.map +1 -0
- package/dist/lib/resolveMigrationDocumentData.cjs +156 -0
- package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -0
- package/dist/lib/resolveMigrationDocumentData.js +155 -0
- package/dist/lib/resolveMigrationDocumentData.js.map +1 -0
- package/dist/lib/serializerHelpers.cjs +95 -0
- package/dist/lib/serializerHelpers.cjs.map +1 -0
- package/dist/lib/serializerHelpers.js +90 -0
- package/dist/lib/serializerHelpers.js.map +1 -0
- package/dist/lib/someTagsFilter.cjs +19 -0
- package/dist/lib/someTagsFilter.cjs.map +1 -0
- package/dist/lib/someTagsFilter.js +19 -0
- package/dist/lib/someTagsFilter.js.map +1 -0
- package/dist/lib/throttledLog.cjs +28 -0
- package/dist/lib/throttledLog.cjs.map +1 -0
- package/dist/lib/throttledLog.js +27 -0
- package/dist/lib/throttledLog.js.map +1 -0
- package/dist/lib/typeFilter.cjs +17 -0
- package/dist/lib/typeFilter.cjs.map +1 -0
- package/dist/lib/typeFilter.js +17 -0
- package/dist/lib/typeFilter.js.map +1 -0
- package/dist/lib/validateAssetMetadata.cjs +48 -0
- package/dist/lib/validateAssetMetadata.cjs.map +1 -0
- package/dist/lib/validateAssetMetadata.js +48 -0
- package/dist/lib/validateAssetMetadata.js.map +1 -0
- package/dist/package.cjs +19 -0
- package/dist/package.cjs.map +1 -0
- package/dist/package.js +7 -0
- package/dist/package.js.map +1 -0
- package/dist/richtext/asText.cjs +21 -0
- package/dist/richtext/asText.cjs.map +1 -0
- package/dist/richtext/asText.d.cts +18 -0
- package/dist/richtext/asText.d.cts.map +1 -0
- package/dist/richtext/asText.d.ts +18 -0
- package/dist/richtext/asText.d.ts.map +1 -0
- package/dist/richtext/asText.js +20 -0
- package/dist/richtext/asText.js.map +1 -0
- package/dist/richtext/asTree.cjs +122 -0
- package/dist/richtext/asTree.cjs.map +1 -0
- package/dist/richtext/asTree.d.cts +20 -0
- package/dist/richtext/asTree.d.cts.map +1 -0
- package/dist/richtext/asTree.d.ts +20 -0
- package/dist/richtext/asTree.d.ts.map +1 -0
- package/dist/richtext/asTree.js +122 -0
- package/dist/richtext/asTree.js.map +1 -0
- package/dist/richtext/composeSerializers.cjs +31 -0
- package/dist/richtext/composeSerializers.cjs.map +1 -0
- package/dist/richtext/composeSerializers.d.cts +22 -0
- package/dist/richtext/composeSerializers.d.cts.map +1 -0
- package/dist/richtext/composeSerializers.d.ts +22 -0
- package/dist/richtext/composeSerializers.d.ts.map +1 -0
- package/dist/richtext/composeSerializers.js +30 -0
- package/dist/richtext/composeSerializers.js.map +1 -0
- package/dist/richtext/serialize.cjs +35 -0
- package/dist/richtext/serialize.cjs.map +1 -0
- package/dist/richtext/serialize.d.cts +25 -0
- package/dist/richtext/serialize.d.cts.map +1 -0
- package/dist/richtext/serialize.d.ts +25 -0
- package/dist/richtext/serialize.d.ts.map +1 -0
- package/dist/richtext/serialize.js +35 -0
- package/dist/richtext/serialize.js.map +1 -0
- package/dist/richtext/types.cjs +13 -0
- package/dist/richtext/types.cjs.map +1 -0
- package/dist/richtext/types.d.cts +71 -0
- package/dist/richtext/types.d.cts.map +1 -0
- package/dist/richtext/types.d.ts +71 -0
- package/dist/richtext/types.d.ts.map +1 -0
- package/dist/richtext/types.js +13 -0
- package/dist/richtext/types.js.map +1 -0
- package/dist/richtext/wrapMapSerializer.cjs +32 -0
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -0
- package/dist/richtext/wrapMapSerializer.d.cts +21 -0
- package/dist/richtext/wrapMapSerializer.d.cts.map +1 -0
- package/dist/richtext/wrapMapSerializer.d.ts +21 -0
- package/dist/richtext/wrapMapSerializer.d.ts.map +1 -0
- package/dist/richtext/wrapMapSerializer.js +32 -0
- package/dist/richtext/wrapMapSerializer.js.map +1 -0
- package/dist/richtext.cjs +13 -0
- package/dist/richtext.d.cts +8 -0
- package/dist/richtext.d.ts +8 -0
- package/dist/richtext.js +8 -0
- package/dist/types/api/asset/asset.d.cts +97 -0
- package/dist/types/api/asset/asset.d.cts.map +1 -0
- package/dist/types/api/asset/asset.d.ts +97 -0
- package/dist/types/api/asset/asset.d.ts.map +1 -0
- package/dist/types/api/asset/tag.d.cts +35 -0
- package/dist/types/api/asset/tag.d.cts.map +1 -0
- package/dist/types/api/asset/tag.d.ts +35 -0
- package/dist/types/api/asset/tag.d.ts.map +1 -0
- package/dist/types/api/integration.d.cts +34 -0
- package/dist/types/api/integration.d.cts.map +1 -0
- package/dist/types/api/integration.d.ts +34 -0
- package/dist/types/api/integration.d.ts.map +1 -0
- package/dist/types/api/query.d.cts +49 -0
- package/dist/types/api/query.d.cts.map +1 -0
- package/dist/types/api/query.d.ts +49 -0
- package/dist/types/api/query.d.ts.map +1 -0
- package/dist/types/api/ref.d.cts +36 -0
- package/dist/types/api/ref.d.cts.map +1 -0
- package/dist/types/api/ref.d.ts +36 -0
- package/dist/types/api/ref.d.ts.map +1 -0
- package/dist/types/api/release.d.cts +17 -0
- package/dist/types/api/release.d.cts.map +1 -0
- package/dist/types/api/release.d.ts +17 -0
- package/dist/types/api/release.d.ts.map +1 -0
- package/dist/types/api/repository.d.cts +115 -0
- package/dist/types/api/repository.d.cts.map +1 -0
- package/dist/types/api/repository.d.ts +115 -0
- package/dist/types/api/repository.d.ts.map +1 -0
- package/dist/types/api/tags.d.cts +13 -0
- package/dist/types/api/tags.d.cts.map +1 -0
- package/dist/types/api/tags.d.ts +13 -0
- package/dist/types/api/tags.d.ts.map +1 -0
- package/dist/types/migration/Asset.cjs +35 -0
- package/dist/types/migration/Asset.cjs.map +1 -0
- package/dist/types/migration/Asset.d.cts +109 -0
- package/dist/types/migration/Asset.d.cts.map +1 -0
- package/dist/types/migration/Asset.d.ts +109 -0
- package/dist/types/migration/Asset.d.ts.map +1 -0
- package/dist/types/migration/Asset.js +34 -0
- package/dist/types/migration/Asset.js.map +1 -0
- package/dist/types/migration/ContentRelationship.d.cts +15 -0
- package/dist/types/migration/ContentRelationship.d.cts.map +1 -0
- package/dist/types/migration/ContentRelationship.d.ts +15 -0
- package/dist/types/migration/ContentRelationship.d.ts.map +1 -0
- package/dist/types/migration/Document.cjs +51 -0
- package/dist/types/migration/Document.cjs.map +1 -0
- package/dist/types/migration/Document.d.cts +97 -0
- package/dist/types/migration/Document.d.cts.map +1 -0
- package/dist/types/migration/Document.d.ts +97 -0
- package/dist/types/migration/Document.d.ts.map +1 -0
- package/dist/types/migration/Document.js +50 -0
- package/dist/types/migration/Document.js.map +1 -0
- package/dist/types/model/boolean.d.cts +21 -0
- package/dist/types/model/boolean.d.cts.map +1 -0
- package/dist/types/model/boolean.d.ts +21 -0
- package/dist/types/model/boolean.d.ts.map +1 -0
- package/dist/types/model/color.d.cts +19 -0
- package/dist/types/model/color.d.cts.map +1 -0
- package/dist/types/model/color.d.ts +19 -0
- package/dist/types/model/color.d.ts.map +1 -0
- package/dist/types/model/contentRelationship.d.cts +59 -0
- package/dist/types/model/contentRelationship.d.cts.map +1 -0
- package/dist/types/model/contentRelationship.d.ts +59 -0
- package/dist/types/model/contentRelationship.d.ts.map +1 -0
- package/dist/types/model/customType.d.cts +54 -0
- package/dist/types/model/customType.d.cts.map +1 -0
- package/dist/types/model/customType.d.ts +54 -0
- package/dist/types/model/customType.d.ts.map +1 -0
- package/dist/types/model/date.d.cts +20 -0
- package/dist/types/model/date.d.cts.map +1 -0
- package/dist/types/model/date.d.ts +20 -0
- package/dist/types/model/date.d.ts.map +1 -0
- package/dist/types/model/embed.d.cts +19 -0
- package/dist/types/model/embed.d.cts.map +1 -0
- package/dist/types/model/embed.d.ts +19 -0
- package/dist/types/model/embed.d.ts.map +1 -0
- package/dist/types/model/geoPoint.d.cts +18 -0
- package/dist/types/model/geoPoint.d.cts.map +1 -0
- package/dist/types/model/geoPoint.d.ts +18 -0
- package/dist/types/model/geoPoint.d.ts.map +1 -0
- package/dist/types/model/group.d.cts +29 -0
- package/dist/types/model/group.d.cts.map +1 -0
- package/dist/types/model/group.d.ts +29 -0
- package/dist/types/model/group.d.ts.map +1 -0
- package/dist/types/model/image.d.cts +37 -0
- package/dist/types/model/image.d.cts.map +1 -0
- package/dist/types/model/image.d.ts +37 -0
- package/dist/types/model/image.d.ts.map +1 -0
- package/dist/types/model/integration.d.cts +20 -0
- package/dist/types/model/integration.d.cts.map +1 -0
- package/dist/types/model/integration.d.ts +20 -0
- package/dist/types/model/integration.d.ts.map +1 -0
- package/dist/types/model/keyText.d.cts +19 -0
- package/dist/types/model/keyText.d.cts.map +1 -0
- package/dist/types/model/keyText.d.ts +19 -0
- package/dist/types/model/keyText.d.ts.map +1 -0
- package/dist/types/model/link.cjs +16 -0
- package/dist/types/model/link.cjs.map +1 -0
- package/dist/types/model/link.d.cts +34 -0
- package/dist/types/model/link.d.cts.map +1 -0
- package/dist/types/model/link.d.ts +34 -0
- package/dist/types/model/link.d.ts.map +1 -0
- package/dist/types/model/link.js +15 -0
- package/dist/types/model/link.js.map +1 -0
- package/dist/types/model/linkToMedia.d.cts +23 -0
- package/dist/types/model/linkToMedia.d.cts.map +1 -0
- package/dist/types/model/linkToMedia.d.ts +23 -0
- package/dist/types/model/linkToMedia.d.ts.map +1 -0
- package/dist/types/model/number.d.cts +21 -0
- package/dist/types/model/number.d.cts.map +1 -0
- package/dist/types/model/number.d.ts +21 -0
- package/dist/types/model/number.d.ts.map +1 -0
- package/dist/types/model/range.d.cts +20 -0
- package/dist/types/model/range.d.cts.map +1 -0
- package/dist/types/model/range.d.ts +20 -0
- package/dist/types/model/range.d.ts.map +1 -0
- package/dist/types/model/richText.d.cts +43 -0
- package/dist/types/model/richText.d.cts.map +1 -0
- package/dist/types/model/richText.d.ts +43 -0
- package/dist/types/model/richText.d.ts.map +1 -0
- package/dist/types/model/select.d.cts +24 -0
- package/dist/types/model/select.d.cts.map +1 -0
- package/dist/types/model/select.d.ts +24 -0
- package/dist/types/model/select.d.ts.map +1 -0
- package/dist/types/model/separator.d.cts +16 -0
- package/dist/types/model/separator.d.cts.map +1 -0
- package/dist/types/model/separator.d.ts +16 -0
- package/dist/types/model/separator.d.ts.map +1 -0
- package/dist/types/model/sharedSlice.d.cts +22 -0
- package/dist/types/model/sharedSlice.d.cts.map +1 -0
- package/dist/types/model/sharedSlice.d.ts +22 -0
- package/dist/types/model/sharedSlice.d.ts.map +1 -0
- package/dist/types/model/sharedSliceVariation.d.cts +25 -0
- package/dist/types/model/sharedSliceVariation.d.cts.map +1 -0
- package/dist/types/model/sharedSliceVariation.d.ts +25 -0
- package/dist/types/model/sharedSliceVariation.d.ts.map +1 -0
- package/dist/types/model/slice.cjs +15 -0
- package/dist/types/model/slice.cjs.map +1 -0
- package/dist/types/model/slice.d.cts +39 -0
- package/dist/types/model/slice.d.cts.map +1 -0
- package/dist/types/model/slice.d.ts +39 -0
- package/dist/types/model/slice.d.ts.map +1 -0
- package/dist/types/model/slice.js +14 -0
- package/dist/types/model/slice.js.map +1 -0
- package/dist/types/model/sliceZone.cjs +15 -0
- package/dist/types/model/sliceZone.cjs.map +1 -0
- package/dist/types/model/sliceZone.d.cts +47 -0
- package/dist/types/model/sliceZone.d.cts.map +1 -0
- package/dist/types/model/sliceZone.d.ts +47 -0
- package/dist/types/model/sliceZone.d.ts.map +1 -0
- package/dist/types/model/sliceZone.js +14 -0
- package/dist/types/model/sliceZone.js.map +1 -0
- package/dist/types/model/table.d.cts +18 -0
- package/dist/types/model/table.d.cts.map +1 -0
- package/dist/types/model/table.d.ts +18 -0
- package/dist/types/model/table.d.ts.map +1 -0
- package/dist/types/model/timestamp.d.cts +20 -0
- package/dist/types/model/timestamp.d.cts.map +1 -0
- package/dist/types/model/timestamp.d.ts +20 -0
- package/dist/types/model/timestamp.d.ts.map +1 -0
- package/dist/types/model/title.d.cts +13 -0
- package/dist/types/model/title.d.cts.map +1 -0
- package/dist/types/model/title.d.ts +13 -0
- package/dist/types/model/title.d.ts.map +1 -0
- package/dist/types/model/types.cjs +32 -0
- package/dist/types/model/types.cjs.map +1 -0
- package/dist/types/model/types.d.cts +82 -0
- package/dist/types/model/types.d.cts.map +1 -0
- package/dist/types/model/types.d.ts +82 -0
- package/dist/types/model/types.d.ts.map +1 -0
- package/dist/types/model/types.js +31 -0
- package/dist/types/model/types.js.map +1 -0
- package/dist/types/model/uid.d.cts +19 -0
- package/dist/types/model/uid.d.cts.map +1 -0
- package/dist/types/model/uid.d.ts +19 -0
- package/dist/types/model/uid.d.ts.map +1 -0
- package/dist/types/value/boolean.d.cts +10 -0
- package/dist/types/value/boolean.d.cts.map +1 -0
- package/dist/types/value/boolean.d.ts +10 -0
- package/dist/types/value/boolean.d.ts.map +1 -0
- package/dist/types/value/color.d.cts +15 -0
- package/dist/types/value/color.d.cts.map +1 -0
- package/dist/types/value/color.d.ts +15 -0
- package/dist/types/value/color.d.ts.map +1 -0
- package/dist/types/value/contentRelationship.d.cts +37 -0
- package/dist/types/value/contentRelationship.d.cts.map +1 -0
- package/dist/types/value/contentRelationship.d.ts +37 -0
- package/dist/types/value/contentRelationship.d.ts.map +1 -0
- package/dist/types/value/date.d.cts +15 -0
- package/dist/types/value/date.d.cts.map +1 -0
- package/dist/types/value/date.d.ts +15 -0
- package/dist/types/value/date.d.ts.map +1 -0
- package/dist/types/value/document.d.cts +120 -0
- package/dist/types/value/document.d.cts.map +1 -0
- package/dist/types/value/document.d.ts +120 -0
- package/dist/types/value/document.d.ts.map +1 -0
- package/dist/types/value/embed.cjs +17 -0
- package/dist/types/value/embed.cjs.map +1 -0
- package/dist/types/value/embed.d.cts +173 -0
- package/dist/types/value/embed.d.cts.map +1 -0
- package/dist/types/value/embed.d.ts +173 -0
- package/dist/types/value/embed.d.ts.map +1 -0
- package/dist/types/value/embed.js +16 -0
- package/dist/types/value/embed.js.map +1 -0
- package/dist/types/value/geoPoint.d.cts +18 -0
- package/dist/types/value/geoPoint.d.cts.map +1 -0
- package/dist/types/value/geoPoint.d.ts +18 -0
- package/dist/types/value/geoPoint.d.ts.map +1 -0
- package/dist/types/value/group.d.cts +19 -0
- package/dist/types/value/group.d.cts.map +1 -0
- package/dist/types/value/group.d.ts +19 -0
- package/dist/types/value/group.d.ts.map +1 -0
- package/dist/types/value/image.d.cts +53 -0
- package/dist/types/value/image.d.cts.map +1 -0
- package/dist/types/value/image.d.ts +53 -0
- package/dist/types/value/image.d.ts.map +1 -0
- package/dist/types/value/integration.d.cts +22 -0
- package/dist/types/value/integration.d.cts.map +1 -0
- package/dist/types/value/integration.d.ts +22 -0
- package/dist/types/value/integration.d.ts.map +1 -0
- package/dist/types/value/keyText.d.cts +15 -0
- package/dist/types/value/keyText.d.cts.map +1 -0
- package/dist/types/value/keyText.d.ts +15 -0
- package/dist/types/value/keyText.d.ts.map +1 -0
- package/dist/types/value/link.cjs +15 -0
- package/dist/types/value/link.cjs.map +1 -0
- package/dist/types/value/link.d.cts +74 -0
- package/dist/types/value/link.d.cts.map +1 -0
- package/dist/types/value/link.d.ts +74 -0
- package/dist/types/value/link.d.ts.map +1 -0
- package/dist/types/value/link.js +14 -0
- package/dist/types/value/link.js.map +1 -0
- package/dist/types/value/linkToMedia.d.cts +33 -0
- package/dist/types/value/linkToMedia.d.cts.map +1 -0
- package/dist/types/value/linkToMedia.d.ts +33 -0
- package/dist/types/value/linkToMedia.d.ts.map +1 -0
- package/dist/types/value/number.d.cts +15 -0
- package/dist/types/value/number.d.cts.map +1 -0
- package/dist/types/value/number.d.ts +15 -0
- package/dist/types/value/number.d.ts.map +1 -0
- package/dist/types/value/richText.cjs +32 -0
- package/dist/types/value/richText.cjs.map +1 -0
- package/dist/types/value/richText.d.cts +221 -0
- package/dist/types/value/richText.d.cts.map +1 -0
- package/dist/types/value/richText.d.ts +221 -0
- package/dist/types/value/richText.d.ts.map +1 -0
- package/dist/types/value/richText.js +31 -0
- package/dist/types/value/richText.js.map +1 -0
- package/dist/types/value/select.d.cts +16 -0
- package/dist/types/value/select.d.cts.map +1 -0
- package/dist/types/value/select.d.ts +16 -0
- package/dist/types/value/select.d.ts.map +1 -0
- package/dist/types/value/sharedSlice.d.cts +17 -0
- package/dist/types/value/sharedSlice.d.cts.map +1 -0
- package/dist/types/value/sharedSlice.d.ts +17 -0
- package/dist/types/value/sharedSlice.d.ts.map +1 -0
- package/dist/types/value/sharedSliceVariation.d.cts +16 -0
- package/dist/types/value/sharedSliceVariation.d.cts.map +1 -0
- package/dist/types/value/sharedSliceVariation.d.ts +16 -0
- package/dist/types/value/sharedSliceVariation.d.ts.map +1 -0
- package/dist/types/value/slice.d.cts +19 -0
- package/dist/types/value/slice.d.cts.map +1 -0
- package/dist/types/value/slice.d.ts +19 -0
- package/dist/types/value/slice.d.ts.map +1 -0
- package/dist/types/value/sliceZone.d.cts +18 -0
- package/dist/types/value/sliceZone.d.cts.map +1 -0
- package/dist/types/value/sliceZone.d.ts +18 -0
- package/dist/types/value/sliceZone.d.ts.map +1 -0
- package/dist/types/value/table.d.cts +97 -0
- package/dist/types/value/table.d.cts.map +1 -0
- package/dist/types/value/table.d.ts +97 -0
- package/dist/types/value/table.d.ts.map +1 -0
- package/dist/types/value/timestamp.d.cts +13 -0
- package/dist/types/value/timestamp.d.cts.map +1 -0
- package/dist/types/value/timestamp.d.ts +13 -0
- package/dist/types/value/timestamp.d.ts.map +1 -0
- package/dist/types/value/title.d.cts +16 -0
- package/dist/types/value/title.d.cts.map +1 -0
- package/dist/types/value/title.d.ts +16 -0
- package/dist/types/value/title.d.ts.map +1 -0
- package/dist/types/value/types.d.cts +61 -0
- package/dist/types/value/types.d.cts.map +1 -0
- package/dist/types/value/types.d.ts +61 -0
- package/dist/types/value/types.d.ts.map +1 -0
- package/dist/types/webhook/apiUpdate.d.cts +57 -0
- package/dist/types/webhook/apiUpdate.d.cts.map +1 -0
- package/dist/types/webhook/apiUpdate.d.ts +57 -0
- package/dist/types/webhook/apiUpdate.d.ts.map +1 -0
- package/dist/types/webhook/testTrigger.d.cts +15 -0
- package/dist/types/webhook/testTrigger.d.cts.map +1 -0
- package/dist/types/webhook/testTrigger.d.ts +15 -0
- package/dist/types/webhook/testTrigger.d.ts.map +1 -0
- package/dist/types/webhook/types.cjs +15 -0
- package/dist/types/webhook/types.cjs.map +1 -0
- package/dist/types/webhook/types.d.cts +23 -0
- package/dist/types/webhook/types.d.cts.map +1 -0
- package/dist/types/webhook/types.d.ts +23 -0
- package/dist/types/webhook/types.d.ts.map +1 -0
- package/dist/types/webhook/types.js +14 -0
- package/dist/types/webhook/types.js.map +1 -0
- package/package.json +29 -35
- package/src/Client.ts +26 -9
- package/src/WriteClient.ts +28 -36
- package/src/buildQueryURL.ts +4 -1
- package/src/createClient.ts +1 -1
- package/src/helpers/asHTML.ts +4 -4
- package/src/helpers/asImageWidthSrcSet.ts +1 -5
- package/src/helpers/asLink.ts +0 -3
- package/src/helpers/asLinkAttrs.ts +0 -4
- package/src/helpers/mapSliceZone.ts +5 -5
- package/src/index.ts +1 -0
- package/src/lib/isValue.ts +0 -6
- package/src/lib/pLimit.ts +1 -1
- package/src/lib/request.ts +3 -3
- package/src/lib/throttledLog.ts +0 -1
- package/src/types/migration/Document.ts +1 -1
- package/src/types/model/contentRelationship.ts +1 -0
- package/src/types/value/date.ts +1 -1
- package/src/types/value/document.ts +3 -3
- package/src/types/value/timestamp.ts +1 -5
- package/dist/index.d.mts +0 -4424
- package/dist/index.mjs +0 -3837
- package/dist/index.mjs.map +0 -1
- package/dist/richtext/index.cjs +0 -244
- package/dist/richtext/index.cjs.map +0 -1
- package/dist/richtext/index.d.cts +0 -78
- package/dist/richtext/index.d.mts +0 -78
- package/dist/richtext/index.d.ts +0 -78
- package/dist/richtext/index.mjs +0 -237
- package/dist/richtext/index.mjs.map +0 -1
- package/dist/shared/client.TSGr56lO.d.cts +0 -899
- package/dist/shared/client.TSGr56lO.d.mts +0 -899
- package/dist/shared/client.TSGr56lO.d.ts +0 -899
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/client",
|
|
3
|
-
"version": "7.21.0-
|
|
3
|
+
"version": "7.21.0-canary.248534d",
|
|
4
4
|
"description": "The official JavaScript + TypeScript client library for Prismic",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -23,65 +23,59 @@
|
|
|
23
23
|
"type": "module",
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"require": "./dist/index.cjs"
|
|
28
28
|
},
|
|
29
29
|
"./richtext": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"import": "./dist/richtext.js",
|
|
31
|
+
"require": "./dist/richtext.cjs"
|
|
32
32
|
},
|
|
33
33
|
"./package.json": "./package.json"
|
|
34
34
|
},
|
|
35
35
|
"main": "./dist/index.cjs",
|
|
36
|
-
"module": "./dist/index.
|
|
37
|
-
"react-native": "./dist/index.
|
|
38
|
-
"types": "./dist/index.d.
|
|
36
|
+
"module": "./dist/index.js",
|
|
37
|
+
"react-native": "./dist/index.js",
|
|
38
|
+
"types": "./dist/index.d.cts",
|
|
39
|
+
"typesVersions": {
|
|
40
|
+
"*": {
|
|
41
|
+
"*": [
|
|
42
|
+
"dist/index.d.ts"
|
|
43
|
+
],
|
|
44
|
+
"richtext": [
|
|
45
|
+
"dist/richtext/index.d.ts"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
39
49
|
"files": [
|
|
40
50
|
"dist",
|
|
41
51
|
"src"
|
|
42
52
|
],
|
|
43
53
|
"scripts": {
|
|
44
|
-
"build": "
|
|
45
|
-
"dev": "
|
|
54
|
+
"build": "tsdown",
|
|
55
|
+
"dev": "tsdown --watch",
|
|
46
56
|
"format": "prettier --write .",
|
|
47
57
|
"prepare": "npm run build",
|
|
48
|
-
"
|
|
49
|
-
"release:dry": "standard-version --dry-run",
|
|
50
|
-
"release:alpha": "npm run test && standard-version --release-as minor --prerelease alpha && git push --follow-tags && npm run build && npm publish --tag alpha",
|
|
51
|
-
"release:alpha:dry": "standard-version --release-as minor --prerelease alpha --dry-run",
|
|
52
|
-
"lint": "eslint --ext .js,.ts .",
|
|
58
|
+
"lint": "oxlint --deny-warnings",
|
|
53
59
|
"types": "tsc --noEmit",
|
|
54
60
|
"unit": "vitest run --coverage",
|
|
55
61
|
"unit:watch": "vitest watch",
|
|
56
|
-
"
|
|
57
|
-
"test": "npm run lint && npm run types && npm run unit && npm run build && npm run size"
|
|
62
|
+
"test": "npm run lint && npm run types && npm run unit && npm run build"
|
|
58
63
|
},
|
|
59
64
|
"dependencies": {
|
|
60
65
|
"imgix-url-builder": "^0.0.6"
|
|
61
66
|
},
|
|
62
67
|
"devDependencies": {
|
|
63
|
-
"@prismicio/
|
|
68
|
+
"@prismicio/e2e-tests-utils": "^1.14.0",
|
|
64
69
|
"@prismicio/types-internal": "^3.16.1",
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"
|
|
69
|
-
"@vitest/coverage-v8": "^3.2.4",
|
|
70
|
-
"abort-controller": "^3.0.0",
|
|
71
|
-
"eslint": "^8.57.1",
|
|
72
|
-
"eslint-config-prettier": "^9.1.2",
|
|
73
|
-
"eslint-plugin-prettier": "^5.5.4",
|
|
74
|
-
"eslint-plugin-tsdoc": "^0.3.0",
|
|
75
|
-
"msw": "^1.3.5",
|
|
76
|
-
"node-fetch": "^3.3.2",
|
|
70
|
+
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
71
|
+
"@types/node": "^24.10.0",
|
|
72
|
+
"@vitest/coverage-v8": "^4.0.6",
|
|
73
|
+
"oxlint": "^1.26.0",
|
|
77
74
|
"prettier": "^3.6.2",
|
|
78
75
|
"prettier-plugin-jsdoc": "1.3.3",
|
|
79
|
-
"
|
|
80
|
-
"standard-version": "^9.5.0",
|
|
81
|
-
"ts-expect": "^1.3.0",
|
|
76
|
+
"tsdown": "^0.16.1",
|
|
82
77
|
"typescript": "^5.9.3",
|
|
83
|
-
"
|
|
84
|
-
"vitest": "^3.2.4"
|
|
78
|
+
"vitest": "^4.0.6"
|
|
85
79
|
},
|
|
86
80
|
"engines": {
|
|
87
81
|
"node": ">=14.15.0"
|
package/src/Client.ts
CHANGED
|
@@ -513,7 +513,7 @@ export class Client<TDocuments extends PrismicDocument = PrismicDocument> {
|
|
|
513
513
|
this.documentAPIEndpoint = repositoryNameOrEndpoint
|
|
514
514
|
try {
|
|
515
515
|
this.repositoryName = getRepositoryName(repositoryNameOrEndpoint)
|
|
516
|
-
} catch
|
|
516
|
+
} catch {
|
|
517
517
|
console.warn(
|
|
518
518
|
`[@prismicio/client] A repository name could not be inferred from the provided endpoint (\`${repositoryNameOrEndpoint}\`). Some methods will be disabled. Create the client using a repository name to prevent this warning. For more details, see ${devMsg("prefer-repository-name")}`,
|
|
519
519
|
)
|
|
@@ -1232,11 +1232,14 @@ export class Client<TDocuments extends PrismicDocument = PrismicDocument> {
|
|
|
1232
1232
|
*
|
|
1233
1233
|
* @returns Repository metadata.
|
|
1234
1234
|
*/
|
|
1235
|
-
async getRepository(
|
|
1235
|
+
async getRepository(
|
|
1236
|
+
params?: Pick<BuildQueryURLArgs, "accessToken"> & FetchParams,
|
|
1237
|
+
): Promise<Repository> {
|
|
1236
1238
|
const url = new URL(this.documentAPIEndpoint)
|
|
1237
1239
|
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
+
const accessToken = params?.accessToken || this.accessToken
|
|
1241
|
+
if (accessToken) {
|
|
1242
|
+
url.searchParams.set("access_token", accessToken)
|
|
1240
1243
|
}
|
|
1241
1244
|
|
|
1242
1245
|
const response = await this.#request(url, params)
|
|
@@ -1390,11 +1393,21 @@ export class Client<TDocuments extends PrismicDocument = PrismicDocument> {
|
|
|
1390
1393
|
...params
|
|
1391
1394
|
}: Partial<BuildQueryURLArgs> & FetchParams = {}): Promise<string> {
|
|
1392
1395
|
const ref =
|
|
1393
|
-
params.ref ||
|
|
1396
|
+
params.ref ||
|
|
1397
|
+
(await this.getResolvedRefString({
|
|
1398
|
+
accessToken: params.accessToken,
|
|
1399
|
+
signal,
|
|
1400
|
+
fetchOptions,
|
|
1401
|
+
}))
|
|
1394
1402
|
const integrationFieldsRef =
|
|
1395
1403
|
params.integrationFieldsRef ||
|
|
1396
|
-
(
|
|
1397
|
-
.
|
|
1404
|
+
(
|
|
1405
|
+
await this.getCachedRepository({
|
|
1406
|
+
accessToken: params.accessToken,
|
|
1407
|
+
signal,
|
|
1408
|
+
fetchOptions,
|
|
1409
|
+
})
|
|
1410
|
+
).integrationFieldsRef ||
|
|
1398
1411
|
undefined
|
|
1399
1412
|
|
|
1400
1413
|
return buildQueryURL(this.documentAPIEndpoint, {
|
|
@@ -1674,7 +1687,9 @@ export class Client<TDocuments extends PrismicDocument = PrismicDocument> {
|
|
|
1674
1687
|
*
|
|
1675
1688
|
* @returns Cached repository metadata.
|
|
1676
1689
|
*/
|
|
1677
|
-
private async getCachedRepository(
|
|
1690
|
+
private async getCachedRepository(
|
|
1691
|
+
params?: Pick<BuildQueryURLArgs, "accessToken"> & FetchParams,
|
|
1692
|
+
): Promise<Repository> {
|
|
1678
1693
|
if (
|
|
1679
1694
|
!this.cachedRepository ||
|
|
1680
1695
|
Date.now() >= this.cachedRepositoryExpiration
|
|
@@ -1709,7 +1724,9 @@ export class Client<TDocuments extends PrismicDocument = PrismicDocument> {
|
|
|
1709
1724
|
*
|
|
1710
1725
|
* @returns The ref to use during a query.
|
|
1711
1726
|
*/
|
|
1712
|
-
private async getResolvedRefString(
|
|
1727
|
+
private async getResolvedRefString(
|
|
1728
|
+
params?: Pick<BuildQueryURLArgs, "accessToken"> & FetchParams,
|
|
1729
|
+
): Promise<string> {
|
|
1713
1730
|
if (this.refState.autoPreviewsEnabled) {
|
|
1714
1731
|
let previewRef: string | undefined
|
|
1715
1732
|
|
package/src/WriteClient.ts
CHANGED
|
@@ -37,7 +37,7 @@ import { name, version } from "../package.json"
|
|
|
37
37
|
import { Client } from "./Client"
|
|
38
38
|
import type { ClientConfig, FetchParams } from "./Client"
|
|
39
39
|
import type { Migration } from "./Migration"
|
|
40
|
-
//
|
|
40
|
+
// oxlint-disable-next-line no-unused-vars
|
|
41
41
|
import type { createMigration } from "./createMigration"
|
|
42
42
|
|
|
43
43
|
const CLIENT_IDENTIFIER = `${name.replace("@", "").replace("/", "-")}/${version}`
|
|
@@ -315,7 +315,7 @@ export class WriteClient<
|
|
|
315
315
|
let url: URL | undefined
|
|
316
316
|
try {
|
|
317
317
|
url = new URL(file)
|
|
318
|
-
} catch
|
|
318
|
+
} catch {
|
|
319
319
|
// noop only on invalid URL, fetch errors will throw in the next if statement
|
|
320
320
|
}
|
|
321
321
|
|
|
@@ -340,7 +340,10 @@ export class WriteClient<
|
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
const asset = await this.createAsset(resolvedFile, filename, {
|
|
343
|
-
|
|
343
|
+
notes,
|
|
344
|
+
credits,
|
|
345
|
+
alt,
|
|
346
|
+
tags,
|
|
344
347
|
...fetchParams,
|
|
345
348
|
})
|
|
346
349
|
|
|
@@ -372,7 +375,7 @@ export class WriteClient<
|
|
|
372
375
|
): Promise<void> {
|
|
373
376
|
// Resolve master locale
|
|
374
377
|
const repository = await this.getRepository(fetchParams)
|
|
375
|
-
const masterLocale = repository.languages.
|
|
378
|
+
const masterLocale = repository.languages[0].id
|
|
376
379
|
reporter?.({
|
|
377
380
|
type: "documents:masterLocale",
|
|
378
381
|
data: {
|
|
@@ -908,45 +911,34 @@ export class WriteClient<
|
|
|
908
911
|
* @throws {@link PrismicError} For 500, and other unexpected errors.
|
|
909
912
|
*/
|
|
910
913
|
async #handleMigrationAPIError(response: ResponseLike): Promise<never> {
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
json = JSON.parse(text)
|
|
916
|
-
} catch {
|
|
917
|
-
// no-op
|
|
918
|
-
}
|
|
914
|
+
const payload = (await response.json()) as unknown
|
|
915
|
+
|
|
916
|
+
// Common message across all branches
|
|
917
|
+
const message = (payload as { message?: string }).message
|
|
919
918
|
|
|
920
919
|
switch (response.status) {
|
|
921
|
-
case 400:
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
"Validation failed, check the response property of the error for details",
|
|
925
|
-
response.url,
|
|
926
|
-
json, // `json` has the shape Array<{ property: string, value: unknown, error: string }>
|
|
927
|
-
)
|
|
928
|
-
}
|
|
929
|
-
throw new InvalidDataError(text, response.url, text)
|
|
920
|
+
case 400: {
|
|
921
|
+
throw new InvalidDataError(message, response.url, payload)
|
|
922
|
+
}
|
|
930
923
|
|
|
931
|
-
case 401:
|
|
932
|
-
throw new ForbiddenError(
|
|
924
|
+
case 401: {
|
|
925
|
+
throw new ForbiddenError(message, response.url, payload)
|
|
926
|
+
}
|
|
933
927
|
|
|
934
|
-
case 403:
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
json,
|
|
940
|
-
)
|
|
941
|
-
}
|
|
942
|
-
throw new ForbiddenError(text, response.url, text)
|
|
928
|
+
case 403: {
|
|
929
|
+
// The lambda authorizer uses an uppercase key, remove this once it is fixed
|
|
930
|
+
const msg = message ?? (payload as { Message?: string }).Message
|
|
931
|
+
throw new ForbiddenError(msg, response.url, payload)
|
|
932
|
+
}
|
|
943
933
|
|
|
944
|
-
case 404:
|
|
945
|
-
throw new NotFoundError(
|
|
934
|
+
case 404: {
|
|
935
|
+
throw new NotFoundError(message, response.url, payload)
|
|
936
|
+
}
|
|
946
937
|
|
|
947
938
|
case 500:
|
|
948
|
-
default:
|
|
949
|
-
throw new PrismicError(
|
|
939
|
+
default: {
|
|
940
|
+
throw new PrismicError(message, response.url, payload)
|
|
941
|
+
}
|
|
950
942
|
}
|
|
951
943
|
}
|
|
952
944
|
}
|
package/src/buildQueryURL.ts
CHANGED
|
@@ -326,7 +326,10 @@ export const buildQueryURL = (
|
|
|
326
326
|
): string => {
|
|
327
327
|
const { filters, predicates, ...params } = args
|
|
328
328
|
|
|
329
|
-
|
|
329
|
+
if (!endpoint.endsWith("/")) {
|
|
330
|
+
endpoint += "/"
|
|
331
|
+
}
|
|
332
|
+
const url = new URL(`documents/search`, endpoint)
|
|
330
333
|
|
|
331
334
|
if (filters) {
|
|
332
335
|
// TODO: Remove warning when we remove support for string `filters` values.
|
package/src/createClient.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface CreateClient {
|
|
|
36
36
|
*
|
|
37
37
|
* @returns A client that can query content from the repository.
|
|
38
38
|
*
|
|
39
|
-
* @see
|
|
39
|
+
* @see https://prismic.io/docs/technical-reference/prismicio-client/v7
|
|
40
40
|
*/
|
|
41
41
|
export const createClient: CreateClient = <TDocuments extends PrismicDocument>(
|
|
42
42
|
repositoryNameOrEndpoint: string,
|
package/src/helpers/asHTML.ts
CHANGED
|
@@ -93,10 +93,10 @@ type HTMLRichTextMapSerializerFunction<
|
|
|
93
93
|
*/
|
|
94
94
|
type ExtractNodeGeneric<T> =
|
|
95
95
|
T extends RichTextMapSerializerFunction<
|
|
96
|
-
//
|
|
96
|
+
// oxlint-disable-next-line no-explicit-any
|
|
97
97
|
any,
|
|
98
98
|
infer U,
|
|
99
|
-
//
|
|
99
|
+
// oxlint-disable-next-line no-explicit-any
|
|
100
100
|
any
|
|
101
101
|
>
|
|
102
102
|
? U
|
|
@@ -110,9 +110,9 @@ type ExtractNodeGeneric<T> =
|
|
|
110
110
|
*/
|
|
111
111
|
type ExtractTextTypeGeneric<T> =
|
|
112
112
|
T extends RichTextMapSerializerFunction<
|
|
113
|
-
//
|
|
113
|
+
// oxlint-disable-next-line no-explicit-any
|
|
114
114
|
any,
|
|
115
|
-
//
|
|
115
|
+
// oxlint-disable-next-line no-explicit-any
|
|
116
116
|
any,
|
|
117
117
|
infer U
|
|
118
118
|
>
|
|
@@ -85,11 +85,7 @@ export const asImageWidthSrcSet = <
|
|
|
85
85
|
if (field && isFilled.imageThumbnail(field)) {
|
|
86
86
|
// We are using destructuring to omit `widths` from the object
|
|
87
87
|
// we will pass to `buildURL()`.
|
|
88
|
-
let {
|
|
89
|
-
widths = DEFAULT_WIDTHS,
|
|
90
|
-
// eslint-disable-next-line prefer-const
|
|
91
|
-
...imgixParams
|
|
92
|
-
} = config
|
|
88
|
+
let { widths = DEFAULT_WIDTHS, ...imgixParams } = config
|
|
93
89
|
const {
|
|
94
90
|
url,
|
|
95
91
|
dimensions,
|
package/src/helpers/asLink.ts
CHANGED
|
@@ -145,9 +145,6 @@ export const asLink: {
|
|
|
145
145
|
const linkField =
|
|
146
146
|
// prettier-ignore
|
|
147
147
|
(
|
|
148
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
149
|
-
// @ts-ignore - Bug in TypeScript 4.9: https://github.com/microsoft/TypeScript/issues/51501
|
|
150
|
-
// TODO: Remove the `prettier-ignore` comment when this bug is fixed.
|
|
151
148
|
"link_type" in linkFieldOrDocument
|
|
152
149
|
? linkFieldOrDocument
|
|
153
150
|
: documentToLinkField(linkFieldOrDocument)
|
|
@@ -98,15 +98,11 @@ export const asLinkAttrs = <
|
|
|
98
98
|
): AsLinkAttrsReturnType<LinkResolverFunctionReturnType> => {
|
|
99
99
|
if (
|
|
100
100
|
linkFieldOrDocument &&
|
|
101
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
102
|
-
// @ts-ignore - Bug in TypeScript 4.9: https://github.com/microsoft/TypeScript/issues/51501
|
|
103
101
|
("link_type" in linkFieldOrDocument
|
|
104
102
|
? isFilledLink(linkFieldOrDocument)
|
|
105
103
|
: linkFieldOrDocument)
|
|
106
104
|
) {
|
|
107
105
|
const target =
|
|
108
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
109
|
-
// @ts-ignore - Bug in TypeScript 4.9: https://github.com/microsoft/TypeScript/issues/51501
|
|
110
106
|
"target" in linkFieldOrDocument ? linkFieldOrDocument.target : undefined
|
|
111
107
|
|
|
112
108
|
const rawHref = asLink(linkFieldOrDocument, config.linkResolver)
|
|
@@ -11,7 +11,7 @@ type LazyModule<T> = () => Promise<T | { default: T }>
|
|
|
11
11
|
*/
|
|
12
12
|
type MaybeLazyModule<T> = T | LazyModule<T>
|
|
13
13
|
|
|
14
|
-
//
|
|
14
|
+
// oxlint-disable-next-line no-explicit-any
|
|
15
15
|
type AnyFunction = (...args: any[]) => any
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -132,7 +132,7 @@ type SliceMappers<TSlice extends SliceLike = SliceLike, TContext = unknown> = {
|
|
|
132
132
|
[P in ExtractSliceType<TSlice>]?: MaybeLazyModule<
|
|
133
133
|
SliceMapper<
|
|
134
134
|
Extract<TSlice, SliceLike<P>>,
|
|
135
|
-
//
|
|
135
|
+
// oxlint-disable-next-line no-explicit-any
|
|
136
136
|
any,
|
|
137
137
|
TContext
|
|
138
138
|
>
|
|
@@ -158,7 +158,7 @@ export type SliceMapper<
|
|
|
158
158
|
* Unwraps a lazily loaded mapper module.
|
|
159
159
|
*/
|
|
160
160
|
type ResolveLazySliceMapperModule<
|
|
161
|
-
//
|
|
161
|
+
// oxlint-disable-next-line no-explicit-any
|
|
162
162
|
TSliceMapper extends SliceMapper<any, any> | LazyModule<SliceMapper>,
|
|
163
163
|
> =
|
|
164
164
|
TSliceMapper extends LazyModule<SliceMapper>
|
|
@@ -173,11 +173,11 @@ type ResolveLazySliceMapperModule<
|
|
|
173
173
|
* Transforms a Slice into its mapped version.
|
|
174
174
|
*/
|
|
175
175
|
type MapSliceLike<
|
|
176
|
-
//
|
|
176
|
+
// oxlint-disable-next-line no-explicit-any
|
|
177
177
|
TSliceLike extends SliceLike<any>,
|
|
178
178
|
TSliceMappers extends SliceMappers<
|
|
179
179
|
TSliceLike,
|
|
180
|
-
//
|
|
180
|
+
// oxlint-disable-next-line no-explicit-any
|
|
181
181
|
any
|
|
182
182
|
>,
|
|
183
183
|
> = TSliceLike extends Slice
|
package/src/index.ts
CHANGED
|
@@ -119,6 +119,7 @@ export type { HTMLRichTextSerializer } from "./helpers/asHTML"
|
|
|
119
119
|
// Client Errors
|
|
120
120
|
export { PrismicError } from "./errors/PrismicError"
|
|
121
121
|
export { ForbiddenError } from "./errors/ForbiddenError"
|
|
122
|
+
export { InvalidDataError } from "./errors/InvalidDataError"
|
|
122
123
|
export { NotFoundError } from "./errors/NotFoundError"
|
|
123
124
|
export { RefNotFoundError } from "./errors/RefNotFoundError"
|
|
124
125
|
export { RefExpiredError } from "./errors/RefExpiredError"
|
package/src/lib/isValue.ts
CHANGED
|
@@ -44,8 +44,6 @@ export const filledLinkToMedia = (
|
|
|
44
44
|
"url" in value &&
|
|
45
45
|
"size" in value
|
|
46
46
|
) {
|
|
47
|
-
value
|
|
48
|
-
|
|
49
47
|
return true
|
|
50
48
|
}
|
|
51
49
|
}
|
|
@@ -104,8 +102,6 @@ export const filledImage = (
|
|
|
104
102
|
imageLike(value) &&
|
|
105
103
|
(!("type" in value) || value.type !== RichTextNodeType.image)
|
|
106
104
|
) {
|
|
107
|
-
value
|
|
108
|
-
|
|
109
105
|
return true
|
|
110
106
|
}
|
|
111
107
|
|
|
@@ -128,8 +124,6 @@ export const rtImageNode = (value: UnknownValue): value is RTImageNode => {
|
|
|
128
124
|
"type" in value &&
|
|
129
125
|
value.type === RichTextNodeType.image
|
|
130
126
|
) {
|
|
131
|
-
value
|
|
132
|
-
|
|
133
127
|
return true
|
|
134
128
|
}
|
|
135
129
|
|
package/src/lib/pLimit.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
** Many thanks to @sindresorhus
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// oxlint-disable-next-line no-explicit-any
|
|
7
7
|
type AnyFunction = (...arguments_: readonly any[]) => unknown
|
|
8
8
|
|
|
9
9
|
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
|
package/src/lib/request.ts
CHANGED
|
@@ -40,7 +40,7 @@ export type FetchLike = (
|
|
|
40
40
|
// different AbortSignal implementations. The types of each property are not
|
|
41
41
|
// important to validate since it is blindly passed to a given `fetch()`
|
|
42
42
|
// function.
|
|
43
|
-
//
|
|
43
|
+
// oxlint-disable-next-line no-explicit-any
|
|
44
44
|
export type AbortSignalLike = any
|
|
45
45
|
|
|
46
46
|
/**
|
|
@@ -62,7 +62,7 @@ export interface RequestInitLike extends Pick<RequestInit, "cache"> {
|
|
|
62
62
|
*/
|
|
63
63
|
// We want to keep the body type as compatible as possible, so
|
|
64
64
|
// we only declare the type we need and accept anything else.
|
|
65
|
-
//
|
|
65
|
+
// oxlint-disable-next-line no-explicit-any
|
|
66
66
|
body?: any | FormData | string
|
|
67
67
|
|
|
68
68
|
/**
|
|
@@ -90,7 +90,7 @@ export interface ResponseLike {
|
|
|
90
90
|
status: number
|
|
91
91
|
headers: HeadersLike
|
|
92
92
|
url: string
|
|
93
|
-
//
|
|
93
|
+
// oxlint-disable-next-line no-explicit-any
|
|
94
94
|
json(): Promise<any>
|
|
95
95
|
text(): Promise<string>
|
|
96
96
|
blob(): Promise<Blob>
|
package/src/lib/throttledLog.ts
CHANGED
|
@@ -39,7 +39,7 @@ export type InjectMigrationSpecificTypes<T> = T extends RTImageNode
|
|
|
39
39
|
| InjectMigrationSpecificTypes<
|
|
40
40
|
Omit<T, "id" | "slice_label" | "version">
|
|
41
41
|
>
|
|
42
|
-
: //
|
|
42
|
+
: // oxlint-disable-next-line no-explicit-any
|
|
43
43
|
T extends Record<any, any>
|
|
44
44
|
? { [P in keyof T]: InjectMigrationSpecificTypes<T[P]> }
|
|
45
45
|
: T extends Array<infer U>
|
package/src/types/value/date.ts
CHANGED
|
@@ -8,4 +8,4 @@ import type { FieldState } from "./types"
|
|
|
8
8
|
* @see More details: {@link https://prismic.io/docs/date}
|
|
9
9
|
*/
|
|
10
10
|
export type DateField<State extends FieldState = FieldState> =
|
|
11
|
-
State extends "empty" ? null :
|
|
11
|
+
State extends "empty" ? null : string
|
|
@@ -83,7 +83,7 @@ export interface PrismicDocument<
|
|
|
83
83
|
DataInterface extends Record<
|
|
84
84
|
string,
|
|
85
85
|
AnyRegularField | GroupField | SliceZone
|
|
86
|
-
//
|
|
86
|
+
// oxlint-disable-next-line no-explicit-any
|
|
87
87
|
> = Record<string, any>,
|
|
88
88
|
TypeEnum = string,
|
|
89
89
|
LangEnum = string,
|
|
@@ -105,7 +105,7 @@ export interface PrismicDocumentWithoutUID<
|
|
|
105
105
|
DataInterface extends Record<
|
|
106
106
|
string,
|
|
107
107
|
AnyRegularField | GroupField | SliceZone
|
|
108
|
-
//
|
|
108
|
+
// oxlint-disable-next-line no-explicit-any
|
|
109
109
|
> = Record<string, any>,
|
|
110
110
|
TypeEnum = string,
|
|
111
111
|
LangEnum = string,
|
|
@@ -131,7 +131,7 @@ export interface PrismicDocumentWithUID<
|
|
|
131
131
|
DataInterface extends Record<
|
|
132
132
|
string,
|
|
133
133
|
AnyRegularField | GroupField | SliceZone
|
|
134
|
-
//
|
|
134
|
+
// oxlint-disable-next-line no-explicit-any
|
|
135
135
|
> = Record<string, any>,
|
|
136
136
|
TypeEnum = string,
|
|
137
137
|
LangEnum = string,
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import type { FieldState } from "./types"
|
|
2
2
|
|
|
3
|
-
import type { DateField } from "./date"
|
|
4
|
-
|
|
5
3
|
/**
|
|
6
4
|
* A timestamp field.
|
|
7
5
|
*
|
|
8
6
|
* @typeParam State - State of the field which determines its shape.
|
|
9
7
|
*/
|
|
10
8
|
export type TimestampField<State extends FieldState = FieldState> =
|
|
11
|
-
State extends "empty"
|
|
12
|
-
? null
|
|
13
|
-
: `${DateField<"filled">}T${number}:${number}:${number}+${number}`
|
|
9
|
+
State extends "empty" ? null : string
|