@prismicio/client 7.21.0 → 7.21.1
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 +920 -1256
- package/dist/Client.cjs.map +1 -1
- package/dist/Client.d.cts +704 -0
- package/dist/Client.d.cts.map +1 -0
- package/dist/Client.d.ts +678 -955
- package/dist/Client.d.ts.map +1 -0
- package/dist/Client.js +913 -1249
- package/dist/Client.js.map +1 -1
- package/dist/Migration.cjs +283 -296
- package/dist/Migration.cjs.map +1 -1
- package/dist/Migration.d.cts +216 -0
- package/dist/Migration.d.cts.map +1 -0
- package/dist/Migration.d.ts +197 -194
- package/dist/Migration.d.ts.map +1 -0
- package/dist/Migration.js +281 -294
- package/dist/Migration.js.map +1 -1
- package/dist/WriteClient.cjs +487 -574
- package/dist/WriteClient.cjs.map +1 -1
- package/dist/WriteClient.d.cts +262 -0
- package/dist/WriteClient.d.cts.map +1 -0
- package/dist/WriteClient.d.ts +226 -245
- package/dist/WriteClient.d.ts.map +1 -0
- package/dist/WriteClient.js +482 -569
- package/dist/WriteClient.js.map +1 -1
- package/dist/_virtual/rolldown_runtime.cjs +14 -0
- package/dist/_virtual/rolldown_runtime.js +13 -0
- package/dist/buildQueryURL.cjs +89 -59
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.cts +212 -0
- package/dist/buildQueryURL.d.cts.map +1 -0
- package/dist/buildQueryURL.d.ts +146 -151
- package/dist/buildQueryURL.d.ts.map +1 -0
- package/dist/buildQueryURL.js +89 -59
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.cjs +17 -3
- package/dist/cookie.cjs.map +1 -1
- package/dist/cookie.d.cts +11 -0
- package/dist/cookie.d.cts.map +1 -0
- package/dist/cookie.d.ts +7 -1
- package/dist/cookie.d.ts.map +1 -0
- package/dist/cookie.js +12 -4
- package/dist/cookie.js.map +1 -1
- package/dist/createClient.cjs +32 -5
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.cts +41 -0
- package/dist/createClient.d.cts.map +1 -0
- package/dist/createClient.d.ts +11 -5
- package/dist/createClient.d.ts.map +1 -0
- package/dist/createClient.js +31 -4
- package/dist/createClient.js.map +1 -1
- package/dist/createMigration.cjs +21 -5
- package/dist/createMigration.cjs.map +1 -1
- package/dist/createMigration.d.cts +30 -0
- package/dist/createMigration.d.cts.map +1 -0
- package/dist/createMigration.d.ts +10 -4
- package/dist/createMigration.d.ts.map +1 -0
- package/dist/createMigration.js +20 -4
- package/dist/createMigration.js.map +1 -1
- package/dist/createWriteClient.cjs +29 -5
- package/dist/createWriteClient.cjs.map +1 -1
- package/dist/createWriteClient.d.cts +38 -0
- package/dist/createWriteClient.d.cts.map +1 -0
- package/dist/createWriteClient.d.ts +10 -4
- package/dist/createWriteClient.d.ts.map +1 -0
- package/dist/createWriteClient.js +28 -4
- package/dist/createWriteClient.js.map +1 -1
- package/dist/errors.cjs +31 -0
- package/dist/errors.cjs.map +1 -0
- package/dist/errors.d.cts +46 -0
- package/dist/errors.d.cts.map +1 -0
- package/dist/errors.d.ts +46 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +22 -0
- package/dist/errors.js.map +1 -0
- package/dist/filter.cjs +93 -236
- package/dist/filter.cjs.map +1 -1
- package/dist/filter.d.cts +213 -0
- package/dist/filter.d.cts.map +1 -0
- package/dist/filter.d.ts +212 -208
- package/dist/filter.d.ts.map +1 -0
- package/dist/filter.js +93 -237
- package/dist/filter.js.map +1 -1
- package/dist/getGraphQLEndpoint.cjs +18 -10
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.d.cts +14 -0
- package/dist/getGraphQLEndpoint.d.cts.map +1 -0
- package/dist/getGraphQLEndpoint.d.ts +5 -1
- package/dist/getGraphQLEndpoint.d.ts.map +1 -0
- package/dist/getGraphQLEndpoint.js +18 -10
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs +27 -10
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.d.cts +23 -0
- package/dist/getRepositoryEndpoint.d.cts.map +1 -0
- package/dist/getRepositoryEndpoint.d.ts +5 -1
- package/dist/getRepositoryEndpoint.d.ts.map +1 -0
- package/dist/getRepositoryEndpoint.js +27 -10
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs +22 -14
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.d.cts +16 -0
- package/dist/getRepositoryName.d.cts.map +1 -0
- package/dist/getRepositoryName.d.ts +5 -1
- package/dist/getRepositoryName.d.ts.map +1 -0
- package/dist/getRepositoryName.js +23 -15
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs +42 -10
- package/dist/getToolbarSrc.cjs.map +1 -1
- package/dist/getToolbarSrc.d.cts +38 -0
- package/dist/getToolbarSrc.d.cts.map +1 -0
- package/dist/getToolbarSrc.d.ts +5 -1
- package/dist/getToolbarSrc.d.ts.map +1 -0
- package/dist/getToolbarSrc.js +42 -10
- package/dist/getToolbarSrc.js.map +1 -1
- package/dist/helpers/asDate.cjs +36 -11
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.d.cts +29 -0
- package/dist/helpers/asDate.d.cts.map +1 -0
- package/dist/helpers/asDate.d.ts +9 -4
- package/dist/helpers/asDate.d.ts.map +1 -0
- package/dist/helpers/asDate.js +36 -12
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs +76 -79
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.cts +147 -0
- package/dist/helpers/asHTML.d.cts.map +1 -0
- package/dist/helpers/asHTML.d.ts +76 -78
- package/dist/helpers/asHTML.d.ts.map +1 -0
- package/dist/helpers/asHTML.js +74 -77
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +57 -18
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts +59 -0
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -0
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +18 -13
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -0
- package/dist/helpers/asImagePixelDensitySrcSet.js +57 -18
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs +30 -10
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.cts +34 -0
- package/dist/helpers/asImageSrc.d.cts.map +1 -0
- package/dist/helpers/asImageSrc.d.ts +9 -4
- package/dist/helpers/asImageSrc.d.ts.map +1 -0
- package/dist/helpers/asImageSrc.js +30 -10
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs +76 -42
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.cts +67 -0
- package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -0
- package/dist/helpers/asImageWidthSrcSet.d.ts +19 -14
- package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -0
- package/dist/helpers/asImageWidthSrcSet.js +76 -42
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs +26 -44
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.cts +83 -0
- package/dist/helpers/asLink.d.cts.map +1 -0
- package/dist/helpers/asLink.d.ts +58 -53
- package/dist/helpers/asLink.d.ts.map +1 -0
- package/dist/helpers/asLink.js +25 -43
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs +44 -25
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.cts +51 -0
- package/dist/helpers/asLinkAttrs.d.cts.map +1 -0
- package/dist/helpers/asLinkAttrs.d.ts +23 -19
- package/dist/helpers/asLinkAttrs.d.ts.map +1 -0
- package/dist/helpers/asLinkAttrs.js +43 -24
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs +15 -20
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.cts +62 -0
- package/dist/helpers/asText.d.cts.map +1 -0
- package/dist/helpers/asText.d.ts +48 -43
- package/dist/helpers/asText.d.ts.map +1 -0
- package/dist/helpers/asText.js +15 -20
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs +30 -23
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.d.cts +21 -0
- package/dist/helpers/documentToLinkField.d.cts.map +1 -0
- package/dist/helpers/documentToLinkField.d.ts +8 -4
- package/dist/helpers/documentToLinkField.d.ts.map +1 -0
- package/dist/helpers/documentToLinkField.js +30 -23
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs +215 -42
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.d.cts +199 -0
- package/dist/helpers/isFilled.d.cts.map +1 -0
- package/dist/helpers/isFilled.d.ts +51 -43
- package/dist/helpers/isFilled.d.ts.map +1 -0
- package/dist/helpers/isFilled.js +210 -44
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/helpers/mapSliceZone.cjs +50 -39
- package/dist/helpers/mapSliceZone.cjs.map +1 -1
- package/dist/helpers/mapSliceZone.d.cts +139 -0
- package/dist/helpers/mapSliceZone.d.cts.map +1 -0
- package/dist/helpers/mapSliceZone.d.ts +37 -34
- package/dist/helpers/mapSliceZone.d.ts.map +1 -0
- package/dist/helpers/mapSliceZone.js +50 -40
- package/dist/helpers/mapSliceZone.js.map +1 -1
- package/dist/index.cjs +109 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +173 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +142 -173
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -75
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.cjs +20 -9
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.d.cts +14 -0
- package/dist/isRepositoryEndpoint.d.cts.map +1 -0
- package/dist/isRepositoryEndpoint.d.ts +5 -1
- package/dist/isRepositoryEndpoint.d.ts.map +1 -0
- package/dist/isRepositoryEndpoint.js +20 -10
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs +14 -4
- package/dist/isRepositoryName.cjs.map +1 -1
- package/dist/isRepositoryName.d.cts +13 -0
- package/dist/isRepositoryName.d.cts.map +1 -0
- package/dist/isRepositoryName.d.ts +5 -1
- package/dist/isRepositoryName.d.ts.map +1 -0
- package/dist/isRepositoryName.js +14 -5
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/devMsg.cjs +22 -5
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js +23 -6
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/escapeHTML.cjs +36 -39
- package/dist/lib/escapeHTML.cjs.map +1 -1
- package/dist/lib/escapeHTML.js +36 -40
- package/dist/lib/escapeHTML.js.map +1 -1
- package/dist/lib/getOptionalLinkProperties.cjs +19 -11
- package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
- package/dist/lib/getOptionalLinkProperties.js +19 -12
- package/dist/lib/getOptionalLinkProperties.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs +25 -16
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.js +25 -16
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/isInternalURL.cjs +15 -6
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js +15 -7
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/isMigrationValue.cjs +65 -12
- package/dist/lib/isMigrationValue.cjs.map +1 -1
- package/dist/lib/isMigrationValue.js +63 -13
- package/dist/lib/isMigrationValue.js.map +1 -1
- package/dist/lib/isValue.cjs +93 -36
- package/dist/lib/isValue.cjs.map +1 -1
- package/dist/lib/isValue.js +93 -40
- package/dist/lib/isValue.js.map +1 -1
- package/dist/lib/pLimit.cjs +51 -44
- package/dist/lib/pLimit.cjs.map +1 -1
- package/dist/lib/pLimit.js +51 -45
- package/dist/lib/pLimit.js.map +1 -1
- package/dist/lib/request.cjs +54 -35
- package/dist/lib/request.cjs.map +1 -1
- package/dist/lib/request.d.cts +61 -0
- package/dist/lib/request.d.cts.map +1 -0
- package/dist/lib/request.d.ts +38 -50
- package/dist/lib/request.d.ts.map +1 -0
- package/dist/lib/request.js +54 -35
- package/dist/lib/request.js.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.cjs +147 -123
- package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.js +143 -120
- package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs +73 -91
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.js +71 -94
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/lib/throttledWarn.cjs +27 -0
- package/dist/lib/throttledWarn.cjs.map +1 -0
- package/dist/lib/throttledWarn.js +26 -0
- package/dist/lib/throttledWarn.js.map +1 -0
- package/dist/lib/validateAssetMetadata.cjs +40 -20
- package/dist/lib/validateAssetMetadata.cjs.map +1 -1
- package/dist/lib/validateAssetMetadata.js +41 -21
- package/dist/lib/validateAssetMetadata.js.map +1 -1
- 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 +18 -10
- package/dist/richtext/asText.cjs.map +1 -1
- package/dist/richtext/asText.d.cts +18 -0
- package/dist/richtext/asText.d.cts.map +1 -0
- package/dist/richtext/asText.d.ts +8 -2
- package/dist/richtext/asText.d.ts.map +1 -0
- package/dist/richtext/asText.js +18 -11
- package/dist/richtext/asText.js.map +1 -1
- package/dist/richtext/asTree.cjs +106 -107
- package/dist/richtext/asTree.cjs.map +1 -1
- package/dist/richtext/asTree.d.cts +20 -0
- package/dist/richtext/asTree.d.cts.map +1 -0
- package/dist/richtext/asTree.d.ts +9 -3
- package/dist/richtext/asTree.d.ts.map +1 -0
- package/dist/richtext/asTree.js +106 -107
- package/dist/richtext/asTree.js.map +1 -1
- package/dist/richtext/composeSerializers.cjs +28 -14
- package/dist/richtext/composeSerializers.cjs.map +1 -1
- package/dist/richtext/composeSerializers.d.cts +22 -0
- package/dist/richtext/composeSerializers.d.cts.map +1 -0
- package/dist/richtext/composeSerializers.d.ts +8 -2
- package/dist/richtext/composeSerializers.d.ts.map +1 -0
- package/dist/richtext/composeSerializers.js +28 -15
- package/dist/richtext/composeSerializers.js.map +1 -1
- package/dist/richtext/serialize.cjs +30 -14
- package/dist/richtext/serialize.cjs.map +1 -1
- package/dist/richtext/serialize.d.cts +25 -0
- package/dist/richtext/serialize.d.cts.map +1 -0
- package/dist/richtext/serialize.d.ts +9 -3
- package/dist/richtext/serialize.d.ts.map +1 -0
- package/dist/richtext/serialize.js +30 -14
- package/dist/richtext/serialize.js.map +1 -1
- package/dist/richtext/types.cjs +10 -8
- package/dist/richtext/types.cjs.map +1 -1
- package/dist/richtext/types.d.cts +71 -0
- package/dist/richtext/types.d.cts.map +1 -0
- package/dist/richtext/types.d.ts +43 -43
- package/dist/richtext/types.d.ts.map +1 -0
- package/dist/richtext/types.js +10 -8
- package/dist/richtext/types.js.map +1 -1
- package/dist/richtext/wrapMapSerializer.cjs +29 -21
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.cts +21 -0
- package/dist/richtext/wrapMapSerializer.d.cts.map +1 -0
- package/dist/richtext/wrapMapSerializer.d.ts +8 -2
- package/dist/richtext/wrapMapSerializer.d.ts.map +1 -0
- package/dist/richtext/wrapMapSerializer.js +29 -21
- package/dist/richtext/wrapMapSerializer.js.map +1 -1
- package/dist/richtext.cjs +13 -15
- package/dist/richtext.d.cts +8 -0
- package/dist/richtext.d.ts +8 -0
- package/dist/richtext.js +4 -11
- 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 +87 -167
- 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 +29 -47
- 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 +17 -11
- 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 +40 -34
- 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 +30 -26
- 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 +8 -2
- 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 +90 -84
- 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 +5 -1
- package/dist/types/api/tags.d.ts.map +1 -0
- package/dist/types/migration/Asset.cjs +34 -29
- package/dist/types/migration/Asset.cjs.map +1 -1
- 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 +89 -88
- package/dist/types/migration/Asset.d.ts.map +1 -0
- package/dist/types/migration/Asset.js +33 -29
- package/dist/types/migration/Asset.js.map +1 -1
- 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 +10 -11
- package/dist/types/migration/ContentRelationship.d.ts.map +1 -0
- package/dist/types/migration/Document.cjs +50 -43
- package/dist/types/migration/Document.cjs.map +1 -1
- 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 +62 -59
- package/dist/types/migration/Document.d.ts.map +1 -0
- package/dist/types/migration/Document.js +49 -43
- package/dist/types/migration/Document.js.map +1 -1
- 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 +15 -9
- 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 +13 -7
- 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 +33 -27
- 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 +36 -30
- 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 +14 -8
- 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 +13 -7
- 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 +12 -6
- 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 +14 -8
- 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 +19 -13
- 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 +14 -8
- 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 +13 -7
- package/dist/types/model/keyText.d.ts.map +1 -0
- package/dist/types/model/link.cjs +13 -6
- package/dist/types/model/link.cjs.map +1 -1
- 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 +22 -16
- package/dist/types/model/link.d.ts.map +1 -0
- package/dist/types/model/link.js +13 -7
- package/dist/types/model/link.js.map +1 -1
- 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 +17 -11
- 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 +15 -9
- 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 +16 -10
- 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 +26 -20
- 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 +15 -9
- 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 +12 -6
- 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 +14 -8
- 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 +16 -10
- package/dist/types/model/sharedSliceVariation.d.ts.map +1 -0
- package/dist/types/model/slice.cjs +12 -5
- package/dist/types/model/slice.cjs.map +1 -1
- 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 +21 -15
- package/dist/types/model/slice.d.ts.map +1 -0
- package/dist/types/model/slice.js +12 -6
- package/dist/types/model/slice.js.map +1 -1
- package/dist/types/model/sliceZone.cjs +12 -5
- package/dist/types/model/sliceZone.cjs.map +1 -1
- 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 +23 -17
- package/dist/types/model/sliceZone.d.ts.map +1 -0
- package/dist/types/model/sliceZone.js +12 -6
- package/dist/types/model/sliceZone.js.map +1 -1
- 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 +12 -6
- 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 +14 -8
- 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 +8 -2
- package/dist/types/model/title.d.ts.map +1 -0
- package/dist/types/model/types.cjs +29 -36
- package/dist/types/model/types.cjs.map +1 -1
- 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 +66 -60
- package/dist/types/model/types.d.ts.map +1 -0
- package/dist/types/model/types.js +29 -37
- package/dist/types/model/types.js.map +1 -1
- 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 +13 -7
- 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 +5 -1
- 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 +8 -2
- 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 +23 -17
- 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 +8 -2
- 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 +90 -84
- package/dist/types/value/document.d.ts.map +1 -0
- package/dist/types/value/embed.cjs +14 -7
- package/dist/types/value/embed.cjs.map +1 -1
- 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 +110 -105
- package/dist/types/value/embed.d.ts.map +1 -0
- package/dist/types/value/embed.js +14 -8
- package/dist/types/value/embed.js.map +1 -1
- 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 +10 -4
- 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 +9 -3
- 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 +31 -25
- 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 +9 -3
- 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 +8 -2
- package/dist/types/value/keyText.d.ts.map +1 -0
- package/dist/types/value/link.cjs +12 -7
- package/dist/types/value/link.cjs.map +1 -1
- 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 +27 -21
- package/dist/types/value/link.d.ts.map +1 -0
- package/dist/types/value/link.js +12 -8
- package/dist/types/value/link.js.map +1 -1
- 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 +19 -14
- 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 +8 -2
- package/dist/types/value/number.d.ts.map +1 -0
- package/dist/types/value/richText.cjs +29 -22
- package/dist/types/value/richText.cjs.map +1 -1
- 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 +103 -97
- package/dist/types/value/richText.d.ts.map +1 -0
- package/dist/types/value/richText.js +29 -23
- package/dist/types/value/richText.js.map +1 -1
- 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 +8 -2
- 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 +11 -5
- 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 +12 -6
- 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 +13 -7
- 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 +10 -4
- 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 +65 -59
- 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 +8 -3
- 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 +11 -7
- 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 +31 -28
- 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 +28 -23
- 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 +9 -3
- package/dist/types/webhook/testTrigger.d.ts.map +1 -0
- package/dist/types/webhook/types.cjs +12 -5
- package/dist/types/webhook/types.cjs.map +1 -1
- 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 +16 -11
- package/dist/types/webhook/types.d.ts.map +1 -0
- package/dist/types/webhook/types.js +12 -6
- package/dist/types/webhook/types.js.map +1 -1
- package/package.json +16 -45
- package/src/Client.ts +682 -1028
- package/src/WriteClient.ts +23 -14
- package/src/buildQueryURL.ts +14 -20
- package/src/createClient.ts +1 -1
- package/src/errors.ts +94 -0
- package/src/filter.ts +1 -1
- package/src/getGraphQLEndpoint.ts +1 -1
- package/src/getRepositoryEndpoint.ts +1 -1
- package/src/getRepositoryName.ts +1 -1
- package/src/getToolbarSrc.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 +11 -9
- 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 → throttledWarn.ts} +3 -14
- package/src/lib/validateAssetMetadata.ts +1 -1
- package/src/types/migration/Document.ts +1 -1
- 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/errors/ForbiddenError.cjs +0 -7
- package/dist/errors/ForbiddenError.cjs.map +0 -1
- package/dist/errors/ForbiddenError.d.ts +0 -11
- package/dist/errors/ForbiddenError.js +0 -7
- package/dist/errors/ForbiddenError.js.map +0 -1
- package/dist/errors/InvalidDataError.cjs +0 -7
- package/dist/errors/InvalidDataError.cjs.map +0 -1
- package/dist/errors/InvalidDataError.d.ts +0 -3
- package/dist/errors/InvalidDataError.js +0 -7
- package/dist/errors/InvalidDataError.js.map +0 -1
- package/dist/errors/NotFoundError.cjs +0 -7
- package/dist/errors/NotFoundError.cjs.map +0 -1
- package/dist/errors/NotFoundError.d.ts +0 -3
- package/dist/errors/NotFoundError.js +0 -7
- package/dist/errors/NotFoundError.js.map +0 -1
- package/dist/errors/ParsingError.cjs +0 -7
- package/dist/errors/ParsingError.cjs.map +0 -1
- package/dist/errors/ParsingError.d.ts +0 -14
- package/dist/errors/ParsingError.js +0 -7
- package/dist/errors/ParsingError.js.map +0 -1
- package/dist/errors/PreviewTokenExpired.cjs +0 -7
- package/dist/errors/PreviewTokenExpired.cjs.map +0 -1
- package/dist/errors/PreviewTokenExpired.d.ts +0 -8
- package/dist/errors/PreviewTokenExpired.js +0 -7
- package/dist/errors/PreviewTokenExpired.js.map +0 -1
- package/dist/errors/PrismicError.cjs +0 -13
- package/dist/errors/PrismicError.cjs.map +0 -1
- package/dist/errors/PrismicError.d.ts +0 -5
- package/dist/errors/PrismicError.js +0 -13
- package/dist/errors/PrismicError.js.map +0 -1
- package/dist/errors/RefExpiredError.cjs +0 -7
- package/dist/errors/RefExpiredError.cjs.map +0 -1
- package/dist/errors/RefExpiredError.d.ts +0 -8
- package/dist/errors/RefExpiredError.js +0 -7
- package/dist/errors/RefExpiredError.js.map +0 -1
- package/dist/errors/RefNotFoundError.cjs +0 -7
- package/dist/errors/RefNotFoundError.cjs.map +0 -1
- package/dist/errors/RefNotFoundError.d.ts +0 -8
- package/dist/errors/RefNotFoundError.js +0 -7
- package/dist/errors/RefNotFoundError.js.map +0 -1
- package/dist/errors/RepositoryNotFoundError.cjs +0 -7
- package/dist/errors/RepositoryNotFoundError.cjs.map +0 -1
- package/dist/errors/RepositoryNotFoundError.d.ts +0 -3
- package/dist/errors/RepositoryNotFoundError.js +0 -7
- package/dist/errors/RepositoryNotFoundError.js.map +0 -1
- package/dist/lib/appendFilters.cjs +0 -11
- package/dist/lib/appendFilters.cjs.map +0 -1
- package/dist/lib/appendFilters.d.ts +0 -18
- package/dist/lib/appendFilters.js +0 -11
- package/dist/lib/appendFilters.js.map +0 -1
- package/dist/lib/castArray.cjs +0 -7
- package/dist/lib/castArray.cjs.map +0 -1
- package/dist/lib/castArray.d.ts +0 -12
- package/dist/lib/castArray.js +0 -7
- package/dist/lib/castArray.js.map +0 -1
- package/dist/lib/castThunk.cjs +0 -7
- package/dist/lib/castThunk.cjs.map +0 -1
- package/dist/lib/castThunk.d.ts +0 -11
- package/dist/lib/castThunk.js +0 -7
- package/dist/lib/castThunk.js.map +0 -1
- package/dist/lib/devMsg.d.ts +0 -16
- package/dist/lib/escapeHTML.d.ts +0 -1
- package/dist/lib/everyTagFilter.cjs +0 -9
- package/dist/lib/everyTagFilter.cjs.map +0 -1
- package/dist/lib/everyTagFilter.d.ts +0 -9
- package/dist/lib/everyTagFilter.js +0 -9
- package/dist/lib/everyTagFilter.js.map +0 -1
- package/dist/lib/findMasterRef.cjs +0 -8
- package/dist/lib/findMasterRef.cjs.map +0 -1
- package/dist/lib/findMasterRef.d.ts +0 -11
- package/dist/lib/findMasterRef.js +0 -8
- package/dist/lib/findMasterRef.js.map +0 -1
- package/dist/lib/findRef.cjs +0 -12
- package/dist/lib/findRef.cjs.map +0 -1
- package/dist/lib/findRef.d.ts +0 -14
- package/dist/lib/findRef.js +0 -12
- package/dist/lib/findRef.js.map +0 -1
- package/dist/lib/findRefByID.cjs +0 -8
- package/dist/lib/findRefByID.cjs.map +0 -1
- package/dist/lib/findRefByID.d.ts +0 -12
- package/dist/lib/findRefByID.js +0 -8
- package/dist/lib/findRefByID.js.map +0 -1
- package/dist/lib/findRefByLabel.cjs +0 -8
- package/dist/lib/findRefByLabel.cjs.map +0 -1
- package/dist/lib/findRefByLabel.d.ts +0 -12
- package/dist/lib/findRefByLabel.js +0 -8
- package/dist/lib/findRefByLabel.js.map +0 -1
- package/dist/lib/getOptionalLinkProperties.d.ts +0 -12
- package/dist/lib/getPreviewCookie.d.ts +0 -9
- package/dist/lib/isInternalURL.d.ts +0 -8
- package/dist/lib/isMigrationValue.d.ts +0 -71
- package/dist/lib/isValue.d.ts +0 -78
- package/dist/lib/minifyGraphQLQuery.cjs +0 -7
- package/dist/lib/minifyGraphQLQuery.cjs.map +0 -1
- package/dist/lib/minifyGraphQLQuery.d.ts +0 -8
- package/dist/lib/minifyGraphQLQuery.js +0 -7
- package/dist/lib/minifyGraphQLQuery.js.map +0 -1
- package/dist/lib/pLimit.d.ts +0 -22
- package/dist/lib/resolveMigrationDocumentData.d.ts +0 -54
- package/dist/lib/serializerHelpers.d.ts +0 -9
- package/dist/lib/someTagsFilter.cjs +0 -9
- package/dist/lib/someTagsFilter.cjs.map +0 -1
- package/dist/lib/someTagsFilter.d.ts +0 -9
- package/dist/lib/someTagsFilter.js +0 -9
- package/dist/lib/someTagsFilter.js.map +0 -1
- package/dist/lib/throttledLog.cjs +0 -17
- package/dist/lib/throttledLog.cjs.map +0 -1
- package/dist/lib/throttledLog.d.ts +0 -15
- package/dist/lib/throttledLog.js +0 -17
- package/dist/lib/throttledLog.js.map +0 -1
- package/dist/lib/typeFilter.cjs +0 -8
- package/dist/lib/typeFilter.cjs.map +0 -1
- package/dist/lib/typeFilter.d.ts +0 -8
- package/dist/lib/typeFilter.js +0 -8
- package/dist/lib/typeFilter.js.map +0 -1
- package/dist/lib/validateAssetMetadata.d.ts +0 -10
- package/dist/package.json.cjs +0 -7
- package/dist/package.json.cjs.map +0 -1
- package/dist/package.json.js +0 -7
- package/dist/package.json.js.map +0 -1
- package/dist/richtext/index.d.ts +0 -7
- package/dist/richtext.cjs.map +0 -1
- package/dist/richtext.js.map +0 -1
- package/dist/types/api/migration/document.d.ts +0 -60
- package/dist/types/migration/Link.d.ts +0 -19
- package/src/errors/ForbiddenError.ts +0 -16
- package/src/errors/InvalidDataError.ts +0 -5
- package/src/errors/NotFoundError.ts +0 -5
- package/src/errors/ParsingError.ts +0 -16
- package/src/errors/PreviewTokenExpired.ts +0 -12
- package/src/errors/PrismicError.ts +0 -15
- package/src/errors/RefExpiredError.ts +0 -14
- package/src/errors/RefNotFoundError.ts +0 -14
- package/src/errors/RepositoryNotFoundError.ts +0 -5
- package/src/lib/appendFilters.ts +0 -26
- package/src/lib/castArray.ts +0 -14
- package/src/lib/castThunk.ts +0 -13
- package/src/lib/everyTagFilter.ts +0 -15
- package/src/lib/findMasterRef.ts +0 -16
- package/src/lib/findRef.ts +0 -25
- package/src/lib/findRefByID.ts +0 -17
- package/src/lib/findRefByLabel.ts +0 -17
- package/src/lib/minifyGraphQLQuery.ts +0 -13
- package/src/lib/someTagsFilter.ts +0 -15
- package/src/lib/typeFilter.ts +0 -12
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Ref } from "../types/api/ref.js";
|
|
2
|
-
/**
|
|
3
|
-
* Returns the ref from a list of given refs with a matching ID.
|
|
4
|
-
*
|
|
5
|
-
* @param refs - A list of refs to search.
|
|
6
|
-
* @param id - The ID of the ref to find.
|
|
7
|
-
*
|
|
8
|
-
* @returns The ref with a matching ID from the list.
|
|
9
|
-
*
|
|
10
|
-
* @throws If a matching ref cannot be found.
|
|
11
|
-
*/
|
|
12
|
-
export declare const findRefByID: (refs: Ref[], id: string) => Ref;
|
package/dist/lib/findRefByID.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findRefByID.js","sources":["../../../src/lib/findRefByID.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { findRef } from \"./findRef\"\n\n/**\n * Returns the ref from a list of given refs with a matching ID.\n *\n * @param refs - A list of refs to search.\n * @param id - The ID of the ref to find.\n *\n * @returns The ref with a matching ID from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRefByID = (refs: Ref[], id: string): Ref => {\n\treturn findRef(refs, (ref) => ref.id === id)\n}\n"],"names":[],"mappings":";AAcO,MAAM,cAAc,CAAC,MAAa,OAAmB;AAC3D,SAAO,QAAQ,MAAM,CAAC,QAAQ,IAAI,OAAO,EAAE;AAC5C;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const findRef = require("./findRef.cjs");
|
|
4
|
-
const findRefByLabel = (refs, label) => {
|
|
5
|
-
return findRef.findRef(refs, (ref) => ref.label === label);
|
|
6
|
-
};
|
|
7
|
-
exports.findRefByLabel = findRefByLabel;
|
|
8
|
-
//# sourceMappingURL=findRefByLabel.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findRefByLabel.cjs","sources":["../../../src/lib/findRefByLabel.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { findRef } from \"./findRef\"\n\n/**\n * Returns the ref from a list of given refs with a matching label.\n *\n * @param refs - A list of refs to search.\n * @param id - The label of the ref to find.\n *\n * @returns The ref with a matching label from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRefByLabel = (refs: Ref[], label: string): Ref => {\n\treturn findRef(refs, (ref) => ref.label === label)\n}\n"],"names":["findRef"],"mappings":";;;AAcO,MAAM,iBAAiB,CAAC,MAAa,UAAsB;AACjE,SAAOA,QAAAA,QAAQ,MAAM,CAAC,QAAQ,IAAI,UAAU,KAAK;AAClD;;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Ref } from "../types/api/ref.js";
|
|
2
|
-
/**
|
|
3
|
-
* Returns the ref from a list of given refs with a matching label.
|
|
4
|
-
*
|
|
5
|
-
* @param refs - A list of refs to search.
|
|
6
|
-
* @param id - The label of the ref to find.
|
|
7
|
-
*
|
|
8
|
-
* @returns The ref with a matching label from the list.
|
|
9
|
-
*
|
|
10
|
-
* @throws If a matching ref cannot be found.
|
|
11
|
-
*/
|
|
12
|
-
export declare const findRefByLabel: (refs: Ref[], label: string) => Ref;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"findRefByLabel.js","sources":["../../../src/lib/findRefByLabel.ts"],"sourcesContent":["import type { Ref } from \"../types/api/ref\"\n\nimport { findRef } from \"./findRef\"\n\n/**\n * Returns the ref from a list of given refs with a matching label.\n *\n * @param refs - A list of refs to search.\n * @param id - The label of the ref to find.\n *\n * @returns The ref with a matching label from the list.\n *\n * @throws If a matching ref cannot be found.\n */\nexport const findRefByLabel = (refs: Ref[], label: string): Ref => {\n\treturn findRef(refs, (ref) => ref.label === label)\n}\n"],"names":[],"mappings":";AAcO,MAAM,iBAAiB,CAAC,MAAa,UAAsB;AACjE,SAAO,QAAQ,MAAM,CAAC,QAAQ,IAAI,UAAU,KAAK;AAClD;"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { OptionalLinkProperties } from "../types/value/link.js";
|
|
2
|
-
/**
|
|
3
|
-
* Returns optional properties only available to link fields. Link fields can
|
|
4
|
-
* have the same shape as content relationship and link to media fields,
|
|
5
|
-
* requiring special treatment to extract link-specific properties.
|
|
6
|
-
*
|
|
7
|
-
* @param input - The content relationship or link to media field from which the
|
|
8
|
-
* link properties will be extracted.
|
|
9
|
-
*
|
|
10
|
-
* @returns Optional link properties that `input` might have.
|
|
11
|
-
*/
|
|
12
|
-
export declare const getOptionalLinkProperties: (input: OptionalLinkProperties) => OptionalLinkProperties;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns the value of a cookie from a given cookie store.
|
|
3
|
-
*
|
|
4
|
-
* @param cookieJar - The stringified cookie store from which to read the
|
|
5
|
-
* cookie.
|
|
6
|
-
*
|
|
7
|
-
* @returns The value of the cookie, if it exists.
|
|
8
|
-
*/
|
|
9
|
-
export declare const getPreviewCookie: (cookieJar: string) => string | undefined;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import type { MigrationImage, MigrationLinkToMedia, MigrationRTImageNode } from "../types/migration/Asset.js";
|
|
2
|
-
import type { MigrationContentRelationship } from "../types/migration/ContentRelationship.js";
|
|
3
|
-
import { type InjectMigrationSpecificTypes } from "../types/migration/Document.js";
|
|
4
|
-
import type { PrismicDocument } from "../types/value/document.js";
|
|
5
|
-
import type { GroupField } from "../types/value/group.js";
|
|
6
|
-
import type { OptionalLinkProperties } from "../types/value/link.js";
|
|
7
|
-
import type { SliceZone } from "../types/value/sliceZone.js";
|
|
8
|
-
import type { AnyRegularField } from "../types/value/types.js";
|
|
9
|
-
/**
|
|
10
|
-
* Unknown value to check if it's a specific field type.
|
|
11
|
-
*
|
|
12
|
-
* @remarks
|
|
13
|
-
* Explicit types are added to help ensure narrowing is done effectively.
|
|
14
|
-
*/
|
|
15
|
-
type UnknownValue = PrismicDocument | InjectMigrationSpecificTypes<AnyRegularField | GroupField | SliceZone> | unknown;
|
|
16
|
-
/**
|
|
17
|
-
* Checks if a value is a migration content relationship field.
|
|
18
|
-
*
|
|
19
|
-
* @remarks
|
|
20
|
-
* `OptionalLinkProperties` is included because `MigrationContentRelationship`
|
|
21
|
-
* may be a link field, not strictly a content relationship field.
|
|
22
|
-
*
|
|
23
|
-
* @param value - Value to check.
|
|
24
|
-
*
|
|
25
|
-
* @returns `true` if `value` is a migration content relationship field, `false`
|
|
26
|
-
* otherwise.
|
|
27
|
-
*
|
|
28
|
-
* @internal
|
|
29
|
-
* This is not an official helper function and it's only designed to work with internal processes.
|
|
30
|
-
*/
|
|
31
|
-
export declare const contentRelationship: (value: UnknownValue) => value is MigrationContentRelationship & OptionalLinkProperties;
|
|
32
|
-
/**
|
|
33
|
-
* Checks if a value is a migration image field.
|
|
34
|
-
*
|
|
35
|
-
* @param value - Value to check.
|
|
36
|
-
*
|
|
37
|
-
* @returns `true` if `value` is a migration image field, `false` otherwise.
|
|
38
|
-
*
|
|
39
|
-
* @internal
|
|
40
|
-
* This is not an official helper function and it's only designed to work with internal processes.
|
|
41
|
-
*/
|
|
42
|
-
export declare const image: (value: UnknownValue) => value is MigrationImage;
|
|
43
|
-
/**
|
|
44
|
-
* Checks if a value is a migration link to media field.
|
|
45
|
-
*
|
|
46
|
-
* - @remarks `OptionalLinkProperties` is included because
|
|
47
|
-
* `MigrationContentRelationship` may be a link field, not strictly a content
|
|
48
|
-
* relationship field.
|
|
49
|
-
*
|
|
50
|
-
* @param value - Value to check.
|
|
51
|
-
*
|
|
52
|
-
* @returns `true` if `value` is a migration link to media field, `false`
|
|
53
|
-
* otherwise.
|
|
54
|
-
*
|
|
55
|
-
* @internal
|
|
56
|
-
* This is not an official helper function and it's only designed to work with internal processes.
|
|
57
|
-
*/
|
|
58
|
-
export declare const linkToMedia: (value: UnknownValue) => value is MigrationLinkToMedia & OptionalLinkProperties;
|
|
59
|
-
/**
|
|
60
|
-
* Checks if a value is a migration rich text image node.
|
|
61
|
-
*
|
|
62
|
-
* @param value - Value to check.
|
|
63
|
-
*
|
|
64
|
-
* @returns `true` if `value` is a migration rich text image node, `false`
|
|
65
|
-
* otherwise.
|
|
66
|
-
*
|
|
67
|
-
* @internal
|
|
68
|
-
* This is not an official helper function and it's only designed to work with internal processes.
|
|
69
|
-
*/
|
|
70
|
-
export declare const rtImageNode: (value: UnknownValue) => value is MigrationRTImageNode;
|
|
71
|
-
export {};
|
package/dist/lib/isValue.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { InjectMigrationSpecificTypes } from "../types/migration/Document.js";
|
|
2
|
-
import type { FilledContentRelationshipField } from "../types/value/contentRelationship.js";
|
|
3
|
-
import type { PrismicDocument } from "../types/value/document.js";
|
|
4
|
-
import type { GroupField } from "../types/value/group.js";
|
|
5
|
-
import type { ImageField } from "../types/value/image.js";
|
|
6
|
-
import type { OptionalLinkProperties } from "../types/value/link.js";
|
|
7
|
-
import type { FilledLinkToMediaField } from "../types/value/linkToMedia.js";
|
|
8
|
-
import { type RTImageNode } from "../types/value/richText.js";
|
|
9
|
-
import type { SliceZone } from "../types/value/sliceZone.js";
|
|
10
|
-
import type { AnyRegularField } from "../types/value/types.js";
|
|
11
|
-
/**
|
|
12
|
-
* Unknown value to check if it's a specific field type.
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Explicit types are added to help ensure narrowing is done effectively.
|
|
16
|
-
*/
|
|
17
|
-
type UnknownValue = PrismicDocument | InjectMigrationSpecificTypes<AnyRegularField | GroupField | SliceZone> | unknown;
|
|
18
|
-
/**
|
|
19
|
-
* Checks if a value is a link to media field.
|
|
20
|
-
*
|
|
21
|
-
* @param value - Value to check.
|
|
22
|
-
*
|
|
23
|
-
* @returns `true` if `value` is a link to media field, `false` otherwise.
|
|
24
|
-
*
|
|
25
|
-
* @internal
|
|
26
|
-
* This is not an official helper function and it's only designed to work with internal processes.
|
|
27
|
-
*/
|
|
28
|
-
export declare const filledLinkToMedia: (value: UnknownValue) => value is FilledLinkToMediaField;
|
|
29
|
-
/**
|
|
30
|
-
* Checks if a value is an image field.
|
|
31
|
-
*
|
|
32
|
-
* @param value - Value to check.
|
|
33
|
-
*
|
|
34
|
-
* @returns `true` if `value` is an image field, `false` otherwise.
|
|
35
|
-
*
|
|
36
|
-
* @internal
|
|
37
|
-
* This is not an official helper function and it's only designed to work with internal processes.
|
|
38
|
-
*/
|
|
39
|
-
export declare const filledImage: (value: UnknownValue) => value is ImageField<string, "filled">;
|
|
40
|
-
/**
|
|
41
|
-
* Checks if a value is a rich text image node.
|
|
42
|
-
*
|
|
43
|
-
* @param value - Value to check.
|
|
44
|
-
*
|
|
45
|
-
* @returns `true` if `value` is a rich text image node, `false` otherwise.
|
|
46
|
-
*
|
|
47
|
-
* @internal
|
|
48
|
-
* This is not an official helper function and it's only designed to work with internal processes.
|
|
49
|
-
*/
|
|
50
|
-
export declare const rtImageNode: (value: UnknownValue) => value is RTImageNode;
|
|
51
|
-
/**
|
|
52
|
-
* Checks if a value is a content relationship field.
|
|
53
|
-
*
|
|
54
|
-
* @remarks
|
|
55
|
-
* The return value includes `OptionalLinkProperties` because
|
|
56
|
-
* `FilledContentRelationshipField` may be a link field, not strictly a content
|
|
57
|
-
* relationship field.
|
|
58
|
-
*
|
|
59
|
-
* @param value - Value to check.
|
|
60
|
-
*
|
|
61
|
-
* @returns `true` if `value` is a content relationship, `false` otherwise.
|
|
62
|
-
*
|
|
63
|
-
* @internal
|
|
64
|
-
* This is not an official helper function and it's only designed to work with internal processes.
|
|
65
|
-
*/
|
|
66
|
-
export declare const filledContentRelationship: (value: UnknownValue) => value is FilledContentRelationshipField & OptionalLinkProperties;
|
|
67
|
-
/**
|
|
68
|
-
* Checks if a value is a Prismic document.
|
|
69
|
-
*
|
|
70
|
-
* @param value - Value to check.
|
|
71
|
-
*
|
|
72
|
-
* @returns `true` if `value` is a Prismic document, `false` otherwise.
|
|
73
|
-
*
|
|
74
|
-
* @internal
|
|
75
|
-
* This is not an official helper function and it's only designed to work with internal processes.
|
|
76
|
-
*/
|
|
77
|
-
export declare const prismicDocument: (value: UnknownValue) => value is PrismicDocument;
|
|
78
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const minifyGraphQLQuery = (query) => {
|
|
4
|
-
return query.replace(/(\n| )*( |{|})(\n| )*/gm, (_chars, _spaces, brackets) => brackets);
|
|
5
|
-
};
|
|
6
|
-
exports.minifyGraphQLQuery = minifyGraphQLQuery;
|
|
7
|
-
//# sourceMappingURL=minifyGraphQLQuery.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"minifyGraphQLQuery.cjs","sources":["../../../src/lib/minifyGraphQLQuery.ts"],"sourcesContent":["/**\n * Minifies a GraphQL query by removing whitespace where possible.\n *\n * @param query - GraphQL query to minify.\n *\n * @returns A minified version of `query`.\n */\nexport const minifyGraphQLQuery = (query: string): string => {\n\treturn query.replace(\n\t\t/(\\n| )*( |{|})(\\n| )*/gm,\n\t\t(_chars, _spaces, brackets) => brackets,\n\t)\n}\n"],"names":[],"mappings":";;AAOO,MAAM,qBAAqB,CAAC,UAAyB;AAC3D,SAAO,MAAM,QACZ,2BACA,CAAC,QAAQ,SAAS,aAAa,QAAQ;AAEzC;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"minifyGraphQLQuery.js","sources":["../../../src/lib/minifyGraphQLQuery.ts"],"sourcesContent":["/**\n * Minifies a GraphQL query by removing whitespace where possible.\n *\n * @param query - GraphQL query to minify.\n *\n * @returns A minified version of `query`.\n */\nexport const minifyGraphQLQuery = (query: string): string => {\n\treturn query.replace(\n\t\t/(\\n| )*( |{|})(\\n| )*/gm,\n\t\t(_chars, _spaces, brackets) => brackets,\n\t)\n}\n"],"names":[],"mappings":"AAOO,MAAM,qBAAqB,CAAC,UAAyB;AAC3D,SAAO,MAAM,QACZ,2BACA,CAAC,QAAQ,SAAS,aAAa,QAAQ;AAEzC;"}
|
package/dist/lib/pLimit.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param fn - Promise-returning/async function.
|
|
3
|
-
* @param arguments - Any arguments to pass through to `fn`. Support for passing
|
|
4
|
-
* arguments on to the `fn` is provided in order to be able to avoid creating
|
|
5
|
-
* unnecessary closures. You probably don't need this optimization unless
|
|
6
|
-
* you're pushing a lot of functions.
|
|
7
|
-
*
|
|
8
|
-
* @returns The promise returned by calling `fn(...arguments)`.
|
|
9
|
-
*/
|
|
10
|
-
export type LimitFunction = <TArguments extends unknown[], TReturnType>(function_: (...arguments_: TArguments) => PromiseLike<TReturnType> | TReturnType, ...arguments_: TArguments) => Promise<TReturnType>;
|
|
11
|
-
/**
|
|
12
|
-
* Creates a limiting function that will only execute one promise at a time and
|
|
13
|
-
* respect a given interval between each call.
|
|
14
|
-
*
|
|
15
|
-
* @param args - Options for the function, `interval` is the minimum time to
|
|
16
|
-
* wait between each promise execution.
|
|
17
|
-
*
|
|
18
|
-
* @returns A limiting function as per configuration, see {@link LimitFunction}.
|
|
19
|
-
*/
|
|
20
|
-
export declare const pLimit: ({ interval, }?: {
|
|
21
|
-
interval?: number;
|
|
22
|
-
}) => LimitFunction;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { MigrationLinkToMediaField } from "../types/migration/Asset.js";
|
|
2
|
-
import { type MigrationImage, type MigrationLinkToMedia, type MigrationRTImageNode } from "../types/migration/Asset.js";
|
|
3
|
-
import type { MigrationContentRelationship, MigrationContentRelationshipField } from "../types/migration/ContentRelationship.js";
|
|
4
|
-
import type { MaybeLink } from "../types/migration/Link.js";
|
|
5
|
-
import type { FilledImageFieldImage } from "../types/value/image.js";
|
|
6
|
-
import type { OptionalLinkProperties } from "../types/value/link.js";
|
|
7
|
-
import type { RTImageNode } from "../types/value/richText.js";
|
|
8
|
-
import type { Migration } from "../Migration.js";
|
|
9
|
-
/**
|
|
10
|
-
* Resolves a migration content relationship to a content relationship field.
|
|
11
|
-
*
|
|
12
|
-
* @param relation - Content relationship to resolve.
|
|
13
|
-
*
|
|
14
|
-
* @returns Resolved content relationship field.
|
|
15
|
-
*/
|
|
16
|
-
export declare function resolveMigrationContentRelationship(relation: MaybeLink<MigrationContentRelationship>): Promise<MigrationContentRelationshipField & OptionalLinkProperties>;
|
|
17
|
-
/**
|
|
18
|
-
* Resolves a migration image to an image field.
|
|
19
|
-
*
|
|
20
|
-
* @param migrationAsset - Asset to resolve.
|
|
21
|
-
* @param migration - Migration instance.
|
|
22
|
-
* @param withThumbnails - Whether to include thumbnails.
|
|
23
|
-
*
|
|
24
|
-
* @returns Resolved image field.
|
|
25
|
-
*/
|
|
26
|
-
export declare const resolveMigrationImage: (image: MigrationImage, migration: Migration, withThumbnails?: boolean) => FilledImageFieldImage | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* Resolves a migration rich text image node to a regular rich text image node.
|
|
29
|
-
*
|
|
30
|
-
* @param rtImageNode - Migration rich text image node to resolve.
|
|
31
|
-
* @param migration - Migration instance.
|
|
32
|
-
*
|
|
33
|
-
* @returns Resolved rich text image node.
|
|
34
|
-
*/
|
|
35
|
-
export declare const resolveMigrationRTImageNode: (rtImageNode: MigrationRTImageNode, migration: Migration) => Promise<RTImageNode | undefined>;
|
|
36
|
-
/**
|
|
37
|
-
* Resolves a migration link to media to a regular link to media field.
|
|
38
|
-
*
|
|
39
|
-
* @param linkToMedia - Migration link to media to resolve.
|
|
40
|
-
* @param migration - Migration instance.
|
|
41
|
-
*
|
|
42
|
-
* @returns Resolved link to media field.
|
|
43
|
-
*/
|
|
44
|
-
export declare const resolveMigrationLinkToMedia: (linkToMedia: MaybeLink<MigrationLinkToMedia>, migration: Migration) => MigrationLinkToMediaField;
|
|
45
|
-
/**
|
|
46
|
-
* Resolves a migration document data to actual data ready to be sent to the
|
|
47
|
-
* Migration API.
|
|
48
|
-
*
|
|
49
|
-
* @param input - Migration link to media to resolve.
|
|
50
|
-
* @param migration - Migration instance.
|
|
51
|
-
*
|
|
52
|
-
* @returns Resolved data.
|
|
53
|
-
*/
|
|
54
|
-
export declare function resolveMigrationDocumentData(input: unknown, migration: Migration): Promise<unknown>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { RichTextMapSerializer } from "../richtext/types.js";
|
|
2
|
-
import type { HTMLRichTextMapSerializer, HTMLStrictRichTextMapSerializer } from "../helpers/asHTML.js";
|
|
3
|
-
import type { LinkResolverFunction } from "../helpers/asLink.js";
|
|
4
|
-
export declare const serializeStandardTag: <BlockType extends keyof RichTextMapSerializer<string>>(tag: string, serializerOrShorthand?: HTMLRichTextMapSerializer[BlockType]) => NonNullable<HTMLStrictRichTextMapSerializer[BlockType]>;
|
|
5
|
-
export declare const serializePreFormatted: (serializerOrShorthand?: HTMLRichTextMapSerializer["preformatted"]) => NonNullable<HTMLStrictRichTextMapSerializer["preformatted"]>;
|
|
6
|
-
export declare const serializeImage: (linkResolver: LinkResolverFunction<string | null | undefined> | undefined | null, serializerOrShorthand?: HTMLRichTextMapSerializer["image"]) => NonNullable<HTMLStrictRichTextMapSerializer["image"]>;
|
|
7
|
-
export declare const serializeEmbed: (serializerOrShorthand?: HTMLRichTextMapSerializer["embed"]) => NonNullable<HTMLStrictRichTextMapSerializer["embed"]>;
|
|
8
|
-
export declare const serializeHyperlink: (linkResolver: LinkResolverFunction<string | null | undefined> | undefined | null, serializerOrShorthand?: HTMLRichTextMapSerializer["hyperlink"]) => NonNullable<HTMLStrictRichTextMapSerializer["hyperlink"]>;
|
|
9
|
-
export declare const serializeSpan: () => NonNullable<HTMLStrictRichTextMapSerializer["span"]>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const filter = require("../filter.cjs");
|
|
4
|
-
const castArray = require("./castArray.cjs");
|
|
5
|
-
const someTagsFilter = (tags) => {
|
|
6
|
-
return filter.filter.any("document.tags", castArray.castArray(tags));
|
|
7
|
-
};
|
|
8
|
-
exports.someTagsFilter = someTagsFilter;
|
|
9
|
-
//# sourceMappingURL=someTagsFilter.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"someTagsFilter.cjs","sources":["../../../src/lib/someTagsFilter.ts"],"sourcesContent":["import { filter } from \"../filter\"\n\nimport { castArray } from \"./castArray\"\n\n/**\n * Creates a filter to filter content by document tags. At least one matching\n * tag is required on the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const someTagsFilter = (tags: string | string[]): string => {\n\treturn filter.any(\"document.tags\", castArray(tags))\n}\n"],"names":["filter","castArray"],"mappings":";;;;AAYO,MAAM,iBAAiB,CAAC,SAAmC;AACjE,SAAOA,OAAAA,OAAO,IAAI,iBAAiBC,UAAAA,UAAU,IAAI,CAAC;AACnD;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a filter to filter content by document tags. At least one matching
|
|
3
|
-
* tag is required on the document.
|
|
4
|
-
*
|
|
5
|
-
* @param tags - Document tags to filter queried content.
|
|
6
|
-
*
|
|
7
|
-
* @returns A filter that can be used in a Prismic REST API V2 request.
|
|
8
|
-
*/
|
|
9
|
-
export declare const someTagsFilter: (tags: string | string[]) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"someTagsFilter.js","sources":["../../../src/lib/someTagsFilter.ts"],"sourcesContent":["import { filter } from \"../filter\"\n\nimport { castArray } from \"./castArray\"\n\n/**\n * Creates a filter to filter content by document tags. At least one matching\n * tag is required on the document.\n *\n * @param tags - Document tags to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const someTagsFilter = (tags: string | string[]): string => {\n\treturn filter.any(\"document.tags\", castArray(tags))\n}\n"],"names":[],"mappings":";;AAYO,MAAM,iBAAiB,CAAC,SAAmC;AACjE,SAAO,OAAO,IAAI,iBAAiB,UAAU,IAAI,CAAC;AACnD;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const THROTTLE_THRESHOLD_MS = 5e3;
|
|
4
|
-
let lastMessage;
|
|
5
|
-
let lastCalledAt = 0;
|
|
6
|
-
const throttledLog = (message, config = {}) => {
|
|
7
|
-
const { level = "log" } = config;
|
|
8
|
-
if (message === lastMessage && Date.now() - lastCalledAt < THROTTLE_THRESHOLD_MS) {
|
|
9
|
-
lastCalledAt = Date.now();
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
lastCalledAt = Date.now();
|
|
13
|
-
lastMessage = message;
|
|
14
|
-
console[level](message);
|
|
15
|
-
};
|
|
16
|
-
exports.throttledLog = throttledLog;
|
|
17
|
-
//# sourceMappingURL=throttledLog.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"throttledLog.cjs","sources":["../../../src/lib/throttledLog.ts"],"sourcesContent":["const THROTTLE_THRESHOLD_MS = 5000\n\nlet lastMessage: string | undefined\nlet lastCalledAt = 0\n\n/**\n * Logs a message. If the message is identical the immediate previous logged\n * message and that message was logged within 5 seconds of the current call, the\n * log is ignored. This throttle behavior prevents identical messages from\n * flooding the console.\n *\n * @param message - A message to log.\n * @param config - Configuration for the log.\n */\nexport const throttledLog = (\n\tmessage: string,\n\tconfig: {\n\t\t/**\n\t\t * The log level. Matches the global `console` log levels.\n\t\t */\n\t\tlevel?: \"log\" | \"warn\" | \"error\"\n\t} = {},\n): void => {\n\tconst { level = \"log\" } = config\n\n\tif (\n\t\tmessage === lastMessage &&\n\t\tDate.now() - lastCalledAt < THROTTLE_THRESHOLD_MS\n\t) {\n\t\tlastCalledAt = Date.now()\n\n\t\treturn\n\t}\n\n\tlastCalledAt = Date.now()\n\tlastMessage = message\n\n\t// eslint-disable-next-line no-console\n\tconsole[level](message)\n}\n"],"names":[],"mappings":";;AAAA,MAAM,wBAAwB;AAE9B,IAAI;AACJ,IAAI,eAAe;AAWZ,MAAM,eAAe,CAC3B,SACA,SAKI,OACK;AACT,QAAM,EAAE,QAAQ,MAAA,IAAU;AAE1B,MACC,YAAY,eACZ,KAAK,IAAA,IAAQ,eAAe,uBAC3B;AACD,mBAAe,KAAK,IAAA;AAEpB;AAAA,EACD;AAEA,iBAAe,KAAK,IAAA;AACpB,gBAAc;AAGd,UAAQ,KAAK,EAAE,OAAO;AACvB;;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Logs a message. If the message is identical the immediate previous logged
|
|
3
|
-
* message and that message was logged within 5 seconds of the current call, the
|
|
4
|
-
* log is ignored. This throttle behavior prevents identical messages from
|
|
5
|
-
* flooding the console.
|
|
6
|
-
*
|
|
7
|
-
* @param message - A message to log.
|
|
8
|
-
* @param config - Configuration for the log.
|
|
9
|
-
*/
|
|
10
|
-
export declare const throttledLog: (message: string, config?: {
|
|
11
|
-
/**
|
|
12
|
-
* The log level. Matches the global `console` log levels.
|
|
13
|
-
*/
|
|
14
|
-
level?: "log" | "warn" | "error";
|
|
15
|
-
}) => void;
|
package/dist/lib/throttledLog.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
const THROTTLE_THRESHOLD_MS = 5e3;
|
|
2
|
-
let lastMessage;
|
|
3
|
-
let lastCalledAt = 0;
|
|
4
|
-
const throttledLog = (message, config = {}) => {
|
|
5
|
-
const { level = "log" } = config;
|
|
6
|
-
if (message === lastMessage && Date.now() - lastCalledAt < THROTTLE_THRESHOLD_MS) {
|
|
7
|
-
lastCalledAt = Date.now();
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
lastCalledAt = Date.now();
|
|
11
|
-
lastMessage = message;
|
|
12
|
-
console[level](message);
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
throttledLog
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=throttledLog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"throttledLog.js","sources":["../../../src/lib/throttledLog.ts"],"sourcesContent":["const THROTTLE_THRESHOLD_MS = 5000\n\nlet lastMessage: string | undefined\nlet lastCalledAt = 0\n\n/**\n * Logs a message. If the message is identical the immediate previous logged\n * message and that message was logged within 5 seconds of the current call, the\n * log is ignored. This throttle behavior prevents identical messages from\n * flooding the console.\n *\n * @param message - A message to log.\n * @param config - Configuration for the log.\n */\nexport const throttledLog = (\n\tmessage: string,\n\tconfig: {\n\t\t/**\n\t\t * The log level. Matches the global `console` log levels.\n\t\t */\n\t\tlevel?: \"log\" | \"warn\" | \"error\"\n\t} = {},\n): void => {\n\tconst { level = \"log\" } = config\n\n\tif (\n\t\tmessage === lastMessage &&\n\t\tDate.now() - lastCalledAt < THROTTLE_THRESHOLD_MS\n\t) {\n\t\tlastCalledAt = Date.now()\n\n\t\treturn\n\t}\n\n\tlastCalledAt = Date.now()\n\tlastMessage = message\n\n\t// eslint-disable-next-line no-console\n\tconsole[level](message)\n}\n"],"names":[],"mappings":"AAAA,MAAM,wBAAwB;AAE9B,IAAI;AACJ,IAAI,eAAe;AAWZ,MAAM,eAAe,CAC3B,SACA,SAKI,OACK;AACT,QAAM,EAAE,QAAQ,MAAA,IAAU;AAE1B,MACC,YAAY,eACZ,KAAK,IAAA,IAAQ,eAAe,uBAC3B;AACD,mBAAe,KAAK,IAAA;AAEpB;AAAA,EACD;AAEA,iBAAe,KAAK,IAAA;AACpB,gBAAc;AAGd,UAAQ,KAAK,EAAE,OAAO;AACvB;"}
|
package/dist/lib/typeFilter.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const filter = require("../filter.cjs");
|
|
4
|
-
const typeFilter = (documentType) => {
|
|
5
|
-
return filter.filter.at("document.type", documentType);
|
|
6
|
-
};
|
|
7
|
-
exports.typeFilter = typeFilter;
|
|
8
|
-
//# sourceMappingURL=typeFilter.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typeFilter.cjs","sources":["../../../src/lib/typeFilter.ts"],"sourcesContent":["import { filter } from \"../filter\"\n\n/**\n * Creates a filter to filter content by document type.\n *\n * @param documentType - The document type to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const typeFilter = (documentType: string): string => {\n\treturn filter.at(\"document.type\", documentType)\n}\n"],"names":["filter"],"mappings":";;;AASO,MAAM,aAAa,CAAC,iBAAgC;AAC1D,SAAOA,cAAO,GAAG,iBAAiB,YAAY;AAC/C;;"}
|
package/dist/lib/typeFilter.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Creates a filter to filter content by document type.
|
|
3
|
-
*
|
|
4
|
-
* @param documentType - The document type to filter queried content.
|
|
5
|
-
*
|
|
6
|
-
* @returns A filter that can be used in a Prismic REST API V2 request.
|
|
7
|
-
*/
|
|
8
|
-
export declare const typeFilter: (documentType: string) => string;
|
package/dist/lib/typeFilter.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typeFilter.js","sources":["../../../src/lib/typeFilter.ts"],"sourcesContent":["import { filter } from \"../filter\"\n\n/**\n * Creates a filter to filter content by document type.\n *\n * @param documentType - The document type to filter queried content.\n *\n * @returns A filter that can be used in a Prismic REST API V2 request.\n */\nexport const typeFilter = (documentType: string): string => {\n\treturn filter.at(\"document.type\", documentType)\n}\n"],"names":[],"mappings":";AASO,MAAM,aAAa,CAAC,iBAAgC;AAC1D,SAAO,OAAO,GAAG,iBAAiB,YAAY;AAC/C;"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CreateAssetParams } from "../WriteClient.js";
|
|
2
|
-
/**
|
|
3
|
-
* Validates an asset's metadata, throwing an error if any of the metadata are
|
|
4
|
-
* invalid.
|
|
5
|
-
*
|
|
6
|
-
* @param assetMetadata - The asset metadata to validate.
|
|
7
|
-
*
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export declare const validateAssetMetadata: ({ notes, credits, alt, tags, }: CreateAssetParams) => void;
|
package/dist/package.json.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/package.json.js
DELETED
package/dist/package.json.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/richtext/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { asTree } from "./asTree.js";
|
|
2
|
-
export { asText } from "./asText.js";
|
|
3
|
-
export { serialize } from "./serialize.js";
|
|
4
|
-
export { wrapMapSerializer } from "./wrapMapSerializer.js";
|
|
5
|
-
export { composeSerializers } from "./composeSerializers.js";
|
|
6
|
-
export { RichTextNodeType as Element } from "../types/value/richText.js";
|
|
7
|
-
export type { RichTextFunctionSerializer, RichTextMapSerializer, RichTextMapSerializerFunction, } from "./types.js";
|
package/dist/richtext.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"richtext.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
package/dist/richtext.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"richtext.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|