@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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
const require_types = require('./types.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/richtext/wrapMapSerializer.ts
|
|
4
|
+
/**
|
|
5
|
+
* Wraps a map serializer into a regular function serializer
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This is a low level helper mainly intended to be used by higher level
|
|
9
|
+
* packages Most users aren't expected to this function directly
|
|
10
|
+
*
|
|
11
|
+
* @typeParam SerializerReturnType - Return type of the map serializer
|
|
12
|
+
*
|
|
13
|
+
* @param mapSerializer - Map serializer to wrap
|
|
14
|
+
*
|
|
15
|
+
* @returns A regular function serializer
|
|
16
|
+
*/
|
|
17
|
+
const wrapMapSerializer = (mapSerializer) => {
|
|
18
|
+
return (type, node, text, children, key) => {
|
|
19
|
+
const tagSerializer = mapSerializer[require_types.RichTextReversedNodeType[type] || type];
|
|
20
|
+
if (tagSerializer) return tagSerializer({
|
|
21
|
+
type,
|
|
22
|
+
node,
|
|
23
|
+
text,
|
|
24
|
+
children,
|
|
25
|
+
key
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
exports.wrapMapSerializer = wrapMapSerializer;
|
|
32
|
+
//# sourceMappingURL=wrapMapSerializer.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapMapSerializer.cjs","names":["tagSerializer: RichTextMapSerializer<SerializerReturnType>[keyof RichTextMapSerializer<SerializerReturnType>]","RichTextReversedNodeType"],"sources":["../../src/richtext/wrapMapSerializer.ts"],"sourcesContent":["import type { RichTextFunctionSerializer, RichTextMapSerializer } from \"./types\"\nimport { RichTextReversedNodeType } from \"./types\"\n\n/**\n * Wraps a map serializer into a regular function serializer\n *\n * @remarks\n * This is a low level helper mainly intended to be used by higher level\n * packages Most users aren't expected to this function directly\n *\n * @typeParam SerializerReturnType - Return type of the map serializer\n *\n * @param mapSerializer - Map serializer to wrap\n *\n * @returns A regular function serializer\n */\nexport const wrapMapSerializer = <SerializerReturnType>(\n\tmapSerializer: RichTextMapSerializer<SerializerReturnType>,\n): RichTextFunctionSerializer<SerializerReturnType> => {\n\treturn (type, node, text, children, key) => {\n\t\tconst tagSerializer: RichTextMapSerializer<SerializerReturnType>[keyof RichTextMapSerializer<SerializerReturnType>] =\n\t\t\tmapSerializer[\n\t\t\t\t(RichTextReversedNodeType[\n\t\t\t\t\ttype as keyof typeof RichTextReversedNodeType\n\t\t\t\t] || type) as keyof RichTextMapSerializer<SerializerReturnType>\n\t\t\t]\n\n\t\tif (tagSerializer) {\n\t\t\treturn tagSerializer({\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\ttype,\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\tnode,\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\ttext,\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\tchildren,\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\tkey,\n\t\t\t})\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAa,qBACZ,kBACsD;AACtD,SAAQ,MAAM,MAAM,MAAM,UAAU,QAAQ;EAC3C,MAAMA,gBACL,cACEC,uCACA,SACI;AAGP,MAAI,cACH,QAAO,cAAc;GAEpB;GAEA;GAEA;GAEA;GAEA;GACA,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RichTextFunctionSerializer, RichTextMapSerializer } from "./types.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/richtext/wrapMapSerializer.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Wraps a map serializer into a regular function serializer
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* This is a low level helper mainly intended to be used by higher level
|
|
10
|
+
* packages Most users aren't expected to this function directly
|
|
11
|
+
*
|
|
12
|
+
* @typeParam SerializerReturnType - Return type of the map serializer
|
|
13
|
+
*
|
|
14
|
+
* @param mapSerializer - Map serializer to wrap
|
|
15
|
+
*
|
|
16
|
+
* @returns A regular function serializer
|
|
17
|
+
*/
|
|
18
|
+
declare const wrapMapSerializer: <SerializerReturnType>(mapSerializer: RichTextMapSerializer<SerializerReturnType>) => RichTextFunctionSerializer<SerializerReturnType>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { wrapMapSerializer };
|
|
21
|
+
//# sourceMappingURL=wrapMapSerializer.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapMapSerializer.d.cts","names":[],"sources":["../../src/richtext/wrapMapSerializer.ts"],"sourcesContent":[],"mappings":";;;;;;AAgBA;;;;;;;;;;;cAAa,yDACG,sBAAsB,0BACnC,2BAA2B"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RichTextFunctionSerializer, RichTextMapSerializer } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/richtext/wrapMapSerializer.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Wraps a map serializer into a regular function serializer
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* This is a low level helper mainly intended to be used by higher level
|
|
10
|
+
* packages Most users aren't expected to this function directly
|
|
11
|
+
*
|
|
12
|
+
* @typeParam SerializerReturnType - Return type of the map serializer
|
|
13
|
+
*
|
|
14
|
+
* @param mapSerializer - Map serializer to wrap
|
|
15
|
+
*
|
|
16
|
+
* @returns A regular function serializer
|
|
17
|
+
*/
|
|
18
|
+
declare const wrapMapSerializer: <SerializerReturnType>(mapSerializer: RichTextMapSerializer<SerializerReturnType>) => RichTextFunctionSerializer<SerializerReturnType>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { wrapMapSerializer };
|
|
21
|
+
//# sourceMappingURL=wrapMapSerializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapMapSerializer.d.ts","names":[],"sources":["../../src/richtext/wrapMapSerializer.ts"],"sourcesContent":[],"mappings":";;;;;;AAgBA;;;;;;;;;;;cAAa,yDACG,sBAAsB,0BACnC,2BAA2B"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { RichTextReversedNodeType } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/richtext/wrapMapSerializer.ts
|
|
4
|
+
/**
|
|
5
|
+
* Wraps a map serializer into a regular function serializer
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This is a low level helper mainly intended to be used by higher level
|
|
9
|
+
* packages Most users aren't expected to this function directly
|
|
10
|
+
*
|
|
11
|
+
* @typeParam SerializerReturnType - Return type of the map serializer
|
|
12
|
+
*
|
|
13
|
+
* @param mapSerializer - Map serializer to wrap
|
|
14
|
+
*
|
|
15
|
+
* @returns A regular function serializer
|
|
16
|
+
*/
|
|
17
|
+
const wrapMapSerializer = (mapSerializer) => {
|
|
18
|
+
return (type, node, text, children, key) => {
|
|
19
|
+
const tagSerializer = mapSerializer[RichTextReversedNodeType[type] || type];
|
|
20
|
+
if (tagSerializer) return tagSerializer({
|
|
21
|
+
type,
|
|
22
|
+
node,
|
|
23
|
+
text,
|
|
24
|
+
children,
|
|
25
|
+
key
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
export { wrapMapSerializer };
|
|
32
|
+
//# sourceMappingURL=wrapMapSerializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapMapSerializer.js","names":["tagSerializer: RichTextMapSerializer<SerializerReturnType>[keyof RichTextMapSerializer<SerializerReturnType>]"],"sources":["../../src/richtext/wrapMapSerializer.ts"],"sourcesContent":["import type { RichTextFunctionSerializer, RichTextMapSerializer } from \"./types\"\nimport { RichTextReversedNodeType } from \"./types\"\n\n/**\n * Wraps a map serializer into a regular function serializer\n *\n * @remarks\n * This is a low level helper mainly intended to be used by higher level\n * packages Most users aren't expected to this function directly\n *\n * @typeParam SerializerReturnType - Return type of the map serializer\n *\n * @param mapSerializer - Map serializer to wrap\n *\n * @returns A regular function serializer\n */\nexport const wrapMapSerializer = <SerializerReturnType>(\n\tmapSerializer: RichTextMapSerializer<SerializerReturnType>,\n): RichTextFunctionSerializer<SerializerReturnType> => {\n\treturn (type, node, text, children, key) => {\n\t\tconst tagSerializer: RichTextMapSerializer<SerializerReturnType>[keyof RichTextMapSerializer<SerializerReturnType>] =\n\t\t\tmapSerializer[\n\t\t\t\t(RichTextReversedNodeType[\n\t\t\t\t\ttype as keyof typeof RichTextReversedNodeType\n\t\t\t\t] || type) as keyof RichTextMapSerializer<SerializerReturnType>\n\t\t\t]\n\n\t\tif (tagSerializer) {\n\t\t\treturn tagSerializer({\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\ttype,\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\tnode,\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\ttext,\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\tchildren,\n\t\t\t\t// @ts-expect-error cannot type check here\n\t\t\t\tkey,\n\t\t\t})\n\t\t}\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAa,qBACZ,kBACsD;AACtD,SAAQ,MAAM,MAAM,MAAM,UAAU,QAAQ;EAC3C,MAAMA,gBACL,cACE,yBACA,SACI;AAGP,MAAI,cACH,QAAO,cAAc;GAEpB;GAEA;GAEA;GAEA;GAEA;GACA,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const require_richText = require('./types/value/richText.cjs');
|
|
2
|
+
const require_asText = require('./richtext/asText.cjs');
|
|
3
|
+
const require_asTree = require('./richtext/asTree.cjs');
|
|
4
|
+
const require_serialize = require('./richtext/serialize.cjs');
|
|
5
|
+
const require_wrapMapSerializer = require('./richtext/wrapMapSerializer.cjs');
|
|
6
|
+
const require_composeSerializers = require('./richtext/composeSerializers.cjs');
|
|
7
|
+
|
|
8
|
+
exports.Element = require_richText.RichTextNodeType;
|
|
9
|
+
exports.asText = require_asText.asText;
|
|
10
|
+
exports.asTree = require_asTree.asTree;
|
|
11
|
+
exports.composeSerializers = require_composeSerializers.composeSerializers;
|
|
12
|
+
exports.serialize = require_serialize.serialize;
|
|
13
|
+
exports.wrapMapSerializer = require_wrapMapSerializer.wrapMapSerializer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RichTextNodeType } from "./types/value/richText.cjs";
|
|
2
|
+
import { RichTextFunctionSerializer, RichTextMapSerializer, RichTextMapSerializerFunction } from "./richtext/types.cjs";
|
|
3
|
+
import { asTree } from "./richtext/asTree.cjs";
|
|
4
|
+
import { asText } from "./richtext/asText.cjs";
|
|
5
|
+
import { serialize } from "./richtext/serialize.cjs";
|
|
6
|
+
import { wrapMapSerializer } from "./richtext/wrapMapSerializer.cjs";
|
|
7
|
+
import { composeSerializers } from "./richtext/composeSerializers.cjs";
|
|
8
|
+
export { RichTextNodeType as Element, type RichTextFunctionSerializer, type RichTextMapSerializer, type RichTextMapSerializerFunction, asText, asTree, composeSerializers, serialize, wrapMapSerializer };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RichTextNodeType } from "./types/value/richText.js";
|
|
2
|
+
import { RichTextFunctionSerializer, RichTextMapSerializer, RichTextMapSerializerFunction } from "./richtext/types.js";
|
|
3
|
+
import { asTree } from "./richtext/asTree.js";
|
|
4
|
+
import { asText } from "./richtext/asText.js";
|
|
5
|
+
import { serialize } from "./richtext/serialize.js";
|
|
6
|
+
import { wrapMapSerializer } from "./richtext/wrapMapSerializer.js";
|
|
7
|
+
import { composeSerializers } from "./richtext/composeSerializers.js";
|
|
8
|
+
export { RichTextNodeType as Element, type RichTextFunctionSerializer, type RichTextMapSerializer, type RichTextMapSerializerFunction, asText, asTree, composeSerializers, serialize, wrapMapSerializer };
|
package/dist/richtext.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RichTextNodeType } from "./types/value/richText.js";
|
|
2
|
+
import { asText } from "./richtext/asText.js";
|
|
3
|
+
import { asTree } from "./richtext/asTree.js";
|
|
4
|
+
import { serialize } from "./richtext/serialize.js";
|
|
5
|
+
import { wrapMapSerializer } from "./richtext/wrapMapSerializer.js";
|
|
6
|
+
import { composeSerializers } from "./richtext/composeSerializers.js";
|
|
7
|
+
|
|
8
|
+
export { RichTextNodeType as Element, asText, asTree, composeSerializers, serialize, wrapMapSerializer };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { AssetTag } from "./tag.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/types/api/asset/asset.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Asset types.
|
|
7
|
+
*/
|
|
8
|
+
declare const AssetType: {
|
|
9
|
+
readonly All: "all";
|
|
10
|
+
readonly Audio: "audio";
|
|
11
|
+
readonly Document: "document";
|
|
12
|
+
readonly Image: "image";
|
|
13
|
+
readonly Video: "video";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* An object representing an asset returned by the Asset API.
|
|
17
|
+
*
|
|
18
|
+
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
19
|
+
*/
|
|
20
|
+
type Asset = {
|
|
21
|
+
/**
|
|
22
|
+
* Asset ID.
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Asset URL.
|
|
27
|
+
*/
|
|
28
|
+
url: string;
|
|
29
|
+
/**
|
|
30
|
+
* Asset creation date.
|
|
31
|
+
*/
|
|
32
|
+
created_at: number;
|
|
33
|
+
/**
|
|
34
|
+
* Asset last modification date.
|
|
35
|
+
*/
|
|
36
|
+
last_modified: number;
|
|
37
|
+
/**
|
|
38
|
+
* Asset filename.
|
|
39
|
+
*/
|
|
40
|
+
filename: string;
|
|
41
|
+
/**
|
|
42
|
+
* Asset extension.
|
|
43
|
+
*/
|
|
44
|
+
extension: string;
|
|
45
|
+
/**
|
|
46
|
+
* Asset size in bytes.
|
|
47
|
+
*/
|
|
48
|
+
size: number;
|
|
49
|
+
/**
|
|
50
|
+
* Asset kind.
|
|
51
|
+
*/
|
|
52
|
+
kind: Exclude<(typeof AssetType)[keyof typeof AssetType], (typeof AssetType)["All"]>;
|
|
53
|
+
/**
|
|
54
|
+
* Asset width in pixels.
|
|
55
|
+
*/
|
|
56
|
+
width?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Asset height in pixels.
|
|
59
|
+
*/
|
|
60
|
+
height?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Asset notes.
|
|
63
|
+
*/
|
|
64
|
+
notes?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Asset credits.
|
|
67
|
+
*/
|
|
68
|
+
credits?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Asset alt text.
|
|
71
|
+
*/
|
|
72
|
+
alt?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Asset tags.
|
|
75
|
+
*/
|
|
76
|
+
tags?: AssetTag[];
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
origin_url?: string;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
uploader_id?: string;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
search_highlight?: {
|
|
89
|
+
filename?: string[];
|
|
90
|
+
notes?: string[];
|
|
91
|
+
credits?: string[];
|
|
92
|
+
alt?: string[];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { Asset };
|
|
97
|
+
//# sourceMappingURL=asset.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset.d.cts","names":[],"sources":["../../../../src/types/api/asset/asset.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;AAaY,cAbC,SAaI,EAAA;EAwCP,SAAA,GAAA,EAAA,KAAA;EAAwB,SAAA,KAAA,EAAA,OAAA;EACxB,SAAA,QAAA,EAAA,UAAA;EAFH,SAAA,KAAA,EAAA,OAAA;EAiCC,SAAA,KAAA,EAAA,OAAA;CAAQ;;;;;;KAxEJ,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuCL,gBACG,wBAAwB,oBACxB;;;;;;;;;;;;;;;;;;;;;;;;SA+BF"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { AssetTag } from "./tag.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/api/asset/asset.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Asset types.
|
|
7
|
+
*/
|
|
8
|
+
declare const AssetType: {
|
|
9
|
+
readonly All: "all";
|
|
10
|
+
readonly Audio: "audio";
|
|
11
|
+
readonly Document: "document";
|
|
12
|
+
readonly Image: "image";
|
|
13
|
+
readonly Video: "video";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* An object representing an asset returned by the Asset API.
|
|
17
|
+
*
|
|
18
|
+
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
19
|
+
*/
|
|
20
|
+
type Asset = {
|
|
21
|
+
/**
|
|
22
|
+
* Asset ID.
|
|
23
|
+
*/
|
|
24
|
+
id: string;
|
|
25
|
+
/**
|
|
26
|
+
* Asset URL.
|
|
27
|
+
*/
|
|
28
|
+
url: string;
|
|
29
|
+
/**
|
|
30
|
+
* Asset creation date.
|
|
31
|
+
*/
|
|
32
|
+
created_at: number;
|
|
33
|
+
/**
|
|
34
|
+
* Asset last modification date.
|
|
35
|
+
*/
|
|
36
|
+
last_modified: number;
|
|
37
|
+
/**
|
|
38
|
+
* Asset filename.
|
|
39
|
+
*/
|
|
40
|
+
filename: string;
|
|
41
|
+
/**
|
|
42
|
+
* Asset extension.
|
|
43
|
+
*/
|
|
44
|
+
extension: string;
|
|
45
|
+
/**
|
|
46
|
+
* Asset size in bytes.
|
|
47
|
+
*/
|
|
48
|
+
size: number;
|
|
49
|
+
/**
|
|
50
|
+
* Asset kind.
|
|
51
|
+
*/
|
|
52
|
+
kind: Exclude<(typeof AssetType)[keyof typeof AssetType], (typeof AssetType)["All"]>;
|
|
53
|
+
/**
|
|
54
|
+
* Asset width in pixels.
|
|
55
|
+
*/
|
|
56
|
+
width?: number;
|
|
57
|
+
/**
|
|
58
|
+
* Asset height in pixels.
|
|
59
|
+
*/
|
|
60
|
+
height?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Asset notes.
|
|
63
|
+
*/
|
|
64
|
+
notes?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Asset credits.
|
|
67
|
+
*/
|
|
68
|
+
credits?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Asset alt text.
|
|
71
|
+
*/
|
|
72
|
+
alt?: string;
|
|
73
|
+
/**
|
|
74
|
+
* Asset tags.
|
|
75
|
+
*/
|
|
76
|
+
tags?: AssetTag[];
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
origin_url?: string;
|
|
81
|
+
/**
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
uploader_id?: string;
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
search_highlight?: {
|
|
89
|
+
filename?: string[];
|
|
90
|
+
notes?: string[];
|
|
91
|
+
credits?: string[];
|
|
92
|
+
alt?: string[];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { Asset };
|
|
97
|
+
//# sourceMappingURL=asset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset.d.ts","names":[],"sources":["../../../../src/types/api/asset/asset.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;AAaY,cAbC,SAaI,EAAA;EAwCP,SAAA,GAAA,EAAA,KAAA;EAAwB,SAAA,KAAA,EAAA,OAAA;EACxB,SAAA,QAAA,EAAA,UAAA;EAFH,SAAA,KAAA,EAAA,OAAA;EAiCC,SAAA,KAAA,EAAA,OAAA;CAAQ;;;;;;KAxEJ,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAuCL,gBACG,wBAAwB,oBACxB;;;;;;;;;;;;;;;;;;;;;;;;SA+BF"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/types/api/asset/tag.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* An object representing an tag used by the Asset API.
|
|
4
|
+
*
|
|
5
|
+
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
6
|
+
*/
|
|
7
|
+
type AssetTag = {
|
|
8
|
+
/**
|
|
9
|
+
* Tag ID.
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Tag name.
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* Tag creation date.
|
|
18
|
+
*/
|
|
19
|
+
created_at: number;
|
|
20
|
+
/**
|
|
21
|
+
* Tag last modification date.
|
|
22
|
+
*/
|
|
23
|
+
last_modified: number;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
uploader_id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Number of assets tagged with this tag.
|
|
30
|
+
*/
|
|
31
|
+
count?: number;
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { AssetTag };
|
|
35
|
+
//# sourceMappingURL=tag.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.cts","names":[],"sources":["../../../../src/types/api/asset/tag.ts"],"sourcesContent":[],"mappings":";;AAKA;;;;KAAY,QAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region src/types/api/asset/tag.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* An object representing an tag used by the Asset API.
|
|
4
|
+
*
|
|
5
|
+
* @see Prismic Asset API technical reference: {@link https://prismic.io/docs/asset-api-technical-reference}
|
|
6
|
+
*/
|
|
7
|
+
type AssetTag = {
|
|
8
|
+
/**
|
|
9
|
+
* Tag ID.
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Tag name.
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* Tag creation date.
|
|
18
|
+
*/
|
|
19
|
+
created_at: number;
|
|
20
|
+
/**
|
|
21
|
+
* Tag last modification date.
|
|
22
|
+
*/
|
|
23
|
+
last_modified: number;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
uploader_id?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Number of assets tagged with this tag.
|
|
30
|
+
*/
|
|
31
|
+
count?: number;
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { AssetTag };
|
|
35
|
+
//# sourceMappingURL=tag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag.d.ts","names":[],"sources":["../../../../src/types/api/asset/tag.ts"],"sourcesContent":[],"mappings":";;AAKA;;;;KAAY,QAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IntegrationFieldData } from "../value/integration.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/types/api/integration.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A catalog item from an integration field.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam TData - The data shape for the catalog item.
|
|
9
|
+
*
|
|
10
|
+
* @see {@link https://prismic.io/docs/fields/integration#create-an-integration-catalog}
|
|
11
|
+
*/
|
|
12
|
+
type IntegrationAPIItem<TData extends IntegrationFieldData = IntegrationFieldData> = {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
image_url?: string;
|
|
17
|
+
last_update?: number;
|
|
18
|
+
blob: TData;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Response payload from a custom integration catalog API. Contains an array of
|
|
22
|
+
* catalog items and the total count.
|
|
23
|
+
*
|
|
24
|
+
* @typeParam TData - The shape of each catalog item's data.
|
|
25
|
+
*
|
|
26
|
+
* @see {@link https://prismic.io/docs/fields/integration#create-an-integration-catalog}
|
|
27
|
+
*/
|
|
28
|
+
type IntegrationAPIResults<TData extends IntegrationFieldData = IntegrationFieldData> = {
|
|
29
|
+
results_size: number;
|
|
30
|
+
results: IntegrationAPIItem<TData>[];
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { IntegrationAPIItem, IntegrationAPIResults };
|
|
34
|
+
//# sourceMappingURL=integration.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.d.cts","names":[],"sources":["../../../src/types/api/integration.ts"],"sourcesContent":[],"mappings":";;;;;;AASA;;;;;AAmBY,KAnBA,kBAmBqB,CAAA,cAlBlB,oBAkBkB,GAlBK,oBAkBL,CAAA,GAAA;EAClB,EAAA,EAAA,MAAA;EAAuB,KAAA,EAAA,MAAA;EAGT,WAAA,EAAA,MAAA;EAAnB,SAAA,CAAA,EAAA,MAAA;EAAkB,WAAA,CAAA,EAAA,MAAA;QAfrB;;;;;;;;;;KAWK,oCACG,uBAAuB;;WAG5B,mBAAmB"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IntegrationFieldData } from "../value/integration.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/api/integration.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A catalog item from an integration field.
|
|
7
|
+
*
|
|
8
|
+
* @typeParam TData - The data shape for the catalog item.
|
|
9
|
+
*
|
|
10
|
+
* @see {@link https://prismic.io/docs/fields/integration#create-an-integration-catalog}
|
|
11
|
+
*/
|
|
12
|
+
type IntegrationAPIItem<TData extends IntegrationFieldData = IntegrationFieldData> = {
|
|
13
|
+
id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
description: string;
|
|
16
|
+
image_url?: string;
|
|
17
|
+
last_update?: number;
|
|
18
|
+
blob: TData;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Response payload from a custom integration catalog API. Contains an array of
|
|
22
|
+
* catalog items and the total count.
|
|
23
|
+
*
|
|
24
|
+
* @typeParam TData - The shape of each catalog item's data.
|
|
25
|
+
*
|
|
26
|
+
* @see {@link https://prismic.io/docs/fields/integration#create-an-integration-catalog}
|
|
27
|
+
*/
|
|
28
|
+
type IntegrationAPIResults<TData extends IntegrationFieldData = IntegrationFieldData> = {
|
|
29
|
+
results_size: number;
|
|
30
|
+
results: IntegrationAPIItem<TData>[];
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { IntegrationAPIItem, IntegrationAPIResults };
|
|
34
|
+
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.d.ts","names":[],"sources":["../../../src/types/api/integration.ts"],"sourcesContent":[],"mappings":";;;;;;AASA;;;;;AAmBY,KAnBA,kBAmBqB,CAAA,cAlBlB,oBAkBkB,GAlBK,oBAkBL,CAAA,GAAA;EAClB,EAAA,EAAA,MAAA;EAAuB,KAAA,EAAA,MAAA;EAGT,WAAA,EAAA,MAAA;EAAnB,SAAA,CAAA,EAAA,MAAA;EAAkB,WAAA,CAAA,EAAA,MAAA;QAfrB;;;;;;;;;;KAWK,oCACG,uBAAuB;;WAG5B,mBAAmB"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PrismicDocument } from "../value/document.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/types/api/query.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A query response from the Prismic REST API V2. The response contains
|
|
7
|
+
* paginated metadata and a list of matching results for the query.
|
|
8
|
+
*
|
|
9
|
+
* @typeParam Document - The type(s) of Prismic document that can be returned.
|
|
10
|
+
*
|
|
11
|
+
* @see More details on querying: {@link https://prismic.io/docs/api}
|
|
12
|
+
*/
|
|
13
|
+
interface Query<Document extends PrismicDocument = PrismicDocument> {
|
|
14
|
+
/**
|
|
15
|
+
* The page number for this page of results.
|
|
16
|
+
*/
|
|
17
|
+
page: number;
|
|
18
|
+
/**
|
|
19
|
+
* Maximum number of results per page.
|
|
20
|
+
*/
|
|
21
|
+
results_per_page: number;
|
|
22
|
+
/**
|
|
23
|
+
* Number of results in this page.
|
|
24
|
+
*/
|
|
25
|
+
results_size: number;
|
|
26
|
+
/**
|
|
27
|
+
* Total number of results within all pages.
|
|
28
|
+
*/
|
|
29
|
+
total_results_size: number;
|
|
30
|
+
/**
|
|
31
|
+
* Total number of pages.
|
|
32
|
+
*/
|
|
33
|
+
total_pages: number;
|
|
34
|
+
/**
|
|
35
|
+
* The Prismic REST API V2 URL to the next page, if one exists.
|
|
36
|
+
*/
|
|
37
|
+
next_page: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* The Prismic REST API V2 URL to the previous page, if one exists.
|
|
40
|
+
*/
|
|
41
|
+
prev_page: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* A paginated list of documents matching the query.
|
|
44
|
+
*/
|
|
45
|
+
results: Document[];
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { Query };
|
|
49
|
+
//# sourceMappingURL=query.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.cts","names":[],"sources":["../../../src/types/api/query.ts"],"sourcesContent":[],"mappings":";;;;;;AAUA;;;;;;UAAiB,uBAAuB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAuChD"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PrismicDocument } from "../value/document.js";
|
|
2
|
+
|
|
3
|
+
//#region src/types/api/query.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A query response from the Prismic REST API V2. The response contains
|
|
7
|
+
* paginated metadata and a list of matching results for the query.
|
|
8
|
+
*
|
|
9
|
+
* @typeParam Document - The type(s) of Prismic document that can be returned.
|
|
10
|
+
*
|
|
11
|
+
* @see More details on querying: {@link https://prismic.io/docs/api}
|
|
12
|
+
*/
|
|
13
|
+
interface Query<Document extends PrismicDocument = PrismicDocument> {
|
|
14
|
+
/**
|
|
15
|
+
* The page number for this page of results.
|
|
16
|
+
*/
|
|
17
|
+
page: number;
|
|
18
|
+
/**
|
|
19
|
+
* Maximum number of results per page.
|
|
20
|
+
*/
|
|
21
|
+
results_per_page: number;
|
|
22
|
+
/**
|
|
23
|
+
* Number of results in this page.
|
|
24
|
+
*/
|
|
25
|
+
results_size: number;
|
|
26
|
+
/**
|
|
27
|
+
* Total number of results within all pages.
|
|
28
|
+
*/
|
|
29
|
+
total_results_size: number;
|
|
30
|
+
/**
|
|
31
|
+
* Total number of pages.
|
|
32
|
+
*/
|
|
33
|
+
total_pages: number;
|
|
34
|
+
/**
|
|
35
|
+
* The Prismic REST API V2 URL to the next page, if one exists.
|
|
36
|
+
*/
|
|
37
|
+
next_page: string | null;
|
|
38
|
+
/**
|
|
39
|
+
* The Prismic REST API V2 URL to the previous page, if one exists.
|
|
40
|
+
*/
|
|
41
|
+
prev_page: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* A paginated list of documents matching the query.
|
|
44
|
+
*/
|
|
45
|
+
results: Document[];
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { Query };
|
|
49
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","names":[],"sources":["../../../src/types/api/query.ts"],"sourcesContent":[],"mappings":";;;;;;AAUA;;;;;;UAAiB,uBAAuB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAuChD"}
|