@prismicio/client 7.21.7-pr.444.5136044 → 7.21.7
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 +263 -190
- package/dist/Client.cjs.map +1 -1
- package/dist/Client.d.cts +241 -175
- package/dist/Client.d.cts.map +1 -1
- package/dist/Client.d.ts +241 -175
- package/dist/Client.d.ts.map +1 -1
- package/dist/Client.js +263 -190
- package/dist/Client.js.map +1 -1
- package/dist/Migration.cjs +86 -54
- package/dist/Migration.cjs.map +1 -1
- package/dist/Migration.d.cts +84 -50
- package/dist/Migration.d.cts.map +1 -1
- package/dist/Migration.d.ts +84 -50
- package/dist/Migration.d.ts.map +1 -1
- package/dist/Migration.js +86 -54
- package/dist/Migration.js.map +1 -1
- package/dist/WriteClient.cjs +77 -39
- package/dist/WriteClient.cjs.map +1 -1
- package/dist/WriteClient.d.cts +63 -24
- package/dist/WriteClient.d.cts.map +1 -1
- package/dist/WriteClient.d.ts +63 -24
- package/dist/WriteClient.d.ts.map +1 -1
- package/dist/WriteClient.js +77 -39
- package/dist/WriteClient.js.map +1 -1
- package/dist/buildQueryURL.cjs +22 -15
- package/dist/buildQueryURL.cjs.map +1 -1
- package/dist/buildQueryURL.d.cts +63 -53
- package/dist/buildQueryURL.d.cts.map +1 -1
- package/dist/buildQueryURL.d.ts +63 -53
- package/dist/buildQueryURL.d.ts.map +1 -1
- package/dist/buildQueryURL.js +22 -15
- package/dist/buildQueryURL.js.map +1 -1
- package/dist/cookie.cjs +4 -1
- package/dist/cookie.cjs.map +1 -1
- package/dist/cookie.d.cts +4 -1
- package/dist/cookie.d.cts.map +1 -1
- package/dist/cookie.d.ts +4 -1
- package/dist/cookie.d.ts.map +1 -1
- package/dist/cookie.js +4 -1
- package/dist/cookie.js.map +1 -1
- package/dist/createClient.cjs +14 -10
- package/dist/createClient.cjs.map +1 -1
- package/dist/createClient.d.cts +18 -11
- package/dist/createClient.d.cts.map +1 -1
- package/dist/createClient.d.ts +18 -11
- package/dist/createClient.d.ts.map +1 -1
- package/dist/createClient.js +14 -10
- package/dist/createClient.js.map +1 -1
- package/dist/createMigration.cjs +7 -4
- package/dist/createMigration.cjs.map +1 -1
- package/dist/createMigration.d.cts +11 -5
- package/dist/createMigration.d.cts.map +1 -1
- package/dist/createMigration.d.ts +11 -5
- package/dist/createMigration.d.ts.map +1 -1
- package/dist/createMigration.js +7 -4
- package/dist/createMigration.js.map +1 -1
- package/dist/createWriteClient.cjs +13 -8
- package/dist/createWriteClient.cjs.map +1 -1
- package/dist/createWriteClient.d.cts +15 -10
- package/dist/createWriteClient.d.cts.map +1 -1
- package/dist/createWriteClient.d.ts +15 -10
- package/dist/createWriteClient.d.ts.map +1 -1
- package/dist/createWriteClient.js +13 -8
- package/dist/createWriteClient.js.map +1 -1
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.cts.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/filter.cjs +18 -5
- package/dist/filter.cjs.map +1 -1
- package/dist/filter.d.cts +63 -59
- package/dist/filter.d.cts.map +1 -1
- package/dist/filter.d.ts +63 -59
- package/dist/filter.d.ts.map +1 -1
- package/dist/filter.js +18 -5
- package/dist/filter.js.map +1 -1
- package/dist/getGraphQLEndpoint.cjs +2 -0
- package/dist/getGraphQLEndpoint.cjs.map +1 -1
- package/dist/getGraphQLEndpoint.d.cts +2 -0
- package/dist/getGraphQLEndpoint.d.cts.map +1 -1
- package/dist/getGraphQLEndpoint.d.ts +2 -0
- package/dist/getGraphQLEndpoint.d.ts.map +1 -1
- package/dist/getGraphQLEndpoint.js +2 -0
- package/dist/getGraphQLEndpoint.js.map +1 -1
- package/dist/getRepositoryEndpoint.cjs +8 -4
- package/dist/getRepositoryEndpoint.cjs.map +1 -1
- package/dist/getRepositoryEndpoint.d.cts +8 -4
- package/dist/getRepositoryEndpoint.d.cts.map +1 -1
- package/dist/getRepositoryEndpoint.d.ts +8 -4
- package/dist/getRepositoryEndpoint.d.ts.map +1 -1
- package/dist/getRepositoryEndpoint.js +8 -4
- package/dist/getRepositoryEndpoint.js.map +1 -1
- package/dist/getRepositoryName.cjs +5 -2
- package/dist/getRepositoryName.cjs.map +1 -1
- package/dist/getRepositoryName.d.cts +5 -2
- package/dist/getRepositoryName.d.cts.map +1 -1
- package/dist/getRepositoryName.d.ts +5 -2
- package/dist/getRepositoryName.d.ts.map +1 -1
- package/dist/getRepositoryName.js +5 -2
- package/dist/getRepositoryName.js.map +1 -1
- package/dist/getToolbarSrc.cjs +19 -17
- package/dist/getToolbarSrc.cjs.map +1 -1
- package/dist/getToolbarSrc.d.cts +19 -17
- package/dist/getToolbarSrc.d.cts.map +1 -1
- package/dist/getToolbarSrc.d.ts +19 -17
- package/dist/getToolbarSrc.d.ts.map +1 -1
- package/dist/getToolbarSrc.js +19 -17
- package/dist/getToolbarSrc.js.map +1 -1
- package/dist/helpers/asDate.cjs +9 -6
- package/dist/helpers/asDate.cjs.map +1 -1
- package/dist/helpers/asDate.d.cts +10 -5
- package/dist/helpers/asDate.d.cts.map +1 -1
- package/dist/helpers/asDate.d.ts +10 -5
- package/dist/helpers/asDate.d.ts.map +1 -1
- package/dist/helpers/asDate.js +9 -6
- package/dist/helpers/asDate.js.map +1 -1
- package/dist/helpers/asHTML.cjs +26 -25
- package/dist/helpers/asHTML.cjs.map +1 -1
- package/dist/helpers/asHTML.d.cts +55 -29
- package/dist/helpers/asHTML.d.cts.map +1 -1
- package/dist/helpers/asHTML.d.ts +55 -29
- package/dist/helpers/asHTML.d.ts.map +1 -1
- package/dist/helpers/asHTML.js +26 -25
- package/dist/helpers/asHTML.js.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.cjs +27 -21
- package/dist/helpers/asImagePixelDensitySrcSet.cjs.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts +36 -25
- package/dist/helpers/asImagePixelDensitySrcSet.d.cts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts +36 -25
- package/dist/helpers/asImagePixelDensitySrcSet.d.ts.map +1 -1
- package/dist/helpers/asImagePixelDensitySrcSet.js +27 -21
- package/dist/helpers/asImagePixelDensitySrcSet.js.map +1 -1
- package/dist/helpers/asImageSrc.cjs +12 -7
- package/dist/helpers/asImageSrc.cjs.map +1 -1
- package/dist/helpers/asImageSrc.d.cts +15 -8
- package/dist/helpers/asImageSrc.d.cts.map +1 -1
- package/dist/helpers/asImageSrc.d.ts +15 -8
- package/dist/helpers/asImageSrc.d.ts.map +1 -1
- package/dist/helpers/asImageSrc.js +12 -7
- package/dist/helpers/asImageSrc.js.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.cjs +32 -25
- package/dist/helpers/asImageWidthSrcSet.cjs.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.cts +41 -29
- package/dist/helpers/asImageWidthSrcSet.d.cts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.d.ts +41 -29
- package/dist/helpers/asImageWidthSrcSet.d.ts.map +1 -1
- package/dist/helpers/asImageWidthSrcSet.js +32 -25
- package/dist/helpers/asImageWidthSrcSet.js.map +1 -1
- package/dist/helpers/asLink.cjs.map +1 -1
- package/dist/helpers/asLink.d.cts +32 -15
- package/dist/helpers/asLink.d.cts.map +1 -1
- package/dist/helpers/asLink.d.ts +32 -15
- package/dist/helpers/asLink.d.ts.map +1 -1
- package/dist/helpers/asLink.js.map +1 -1
- package/dist/helpers/asLinkAttrs.cjs +11 -8
- package/dist/helpers/asLinkAttrs.cjs.map +1 -1
- package/dist/helpers/asLinkAttrs.d.cts +14 -9
- package/dist/helpers/asLinkAttrs.d.cts.map +1 -1
- package/dist/helpers/asLinkAttrs.d.ts +14 -9
- package/dist/helpers/asLinkAttrs.d.ts.map +1 -1
- package/dist/helpers/asLinkAttrs.js +11 -8
- package/dist/helpers/asLinkAttrs.js.map +1 -1
- package/dist/helpers/asText.cjs.map +1 -1
- package/dist/helpers/asText.d.cts +23 -10
- package/dist/helpers/asText.d.cts.map +1 -1
- package/dist/helpers/asText.d.ts +23 -10
- package/dist/helpers/asText.d.ts.map +1 -1
- package/dist/helpers/asText.js.map +1 -1
- package/dist/helpers/documentToLinkField.cjs +7 -2
- package/dist/helpers/documentToLinkField.cjs.map +1 -1
- package/dist/helpers/documentToLinkField.d.cts +5 -1
- package/dist/helpers/documentToLinkField.d.cts.map +1 -1
- package/dist/helpers/documentToLinkField.d.ts +5 -1
- package/dist/helpers/documentToLinkField.d.ts.map +1 -1
- package/dist/helpers/documentToLinkField.js +7 -2
- package/dist/helpers/documentToLinkField.js.map +1 -1
- package/dist/helpers/isFilled.cjs +35 -8
- package/dist/helpers/isFilled.cjs.map +1 -1
- package/dist/helpers/isFilled.d.cts +32 -8
- package/dist/helpers/isFilled.d.cts.map +1 -1
- package/dist/helpers/isFilled.d.ts +32 -8
- package/dist/helpers/isFilled.d.ts.map +1 -1
- package/dist/helpers/isFilled.js +35 -8
- package/dist/helpers/isFilled.js.map +1 -1
- package/dist/helpers/mapSliceZone.cjs +10 -8
- package/dist/helpers/mapSliceZone.cjs.map +1 -1
- package/dist/helpers/mapSliceZone.d.cts +63 -35
- package/dist/helpers/mapSliceZone.d.cts.map +1 -1
- package/dist/helpers/mapSliceZone.d.ts +63 -35
- package/dist/helpers/mapSliceZone.d.ts.map +1 -1
- package/dist/helpers/mapSliceZone.js +10 -8
- package/dist/helpers/mapSliceZone.js.map +1 -1
- package/dist/index.cjs +17 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -36
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +50 -36
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -11
- package/dist/index.js.map +1 -1
- package/dist/isRepositoryEndpoint.cjs +4 -3
- package/dist/isRepositoryEndpoint.cjs.map +1 -1
- package/dist/isRepositoryEndpoint.d.cts +4 -3
- package/dist/isRepositoryEndpoint.d.cts.map +1 -1
- package/dist/isRepositoryEndpoint.d.ts +4 -3
- package/dist/isRepositoryEndpoint.d.ts.map +1 -1
- package/dist/isRepositoryEndpoint.js +4 -3
- package/dist/isRepositoryEndpoint.js.map +1 -1
- package/dist/isRepositoryName.cjs +2 -1
- package/dist/isRepositoryName.cjs.map +1 -1
- package/dist/isRepositoryName.d.cts +2 -1
- package/dist/isRepositoryName.d.cts.map +1 -1
- package/dist/isRepositoryName.d.ts +2 -1
- package/dist/isRepositoryName.d.ts.map +1 -1
- package/dist/isRepositoryName.js +2 -1
- package/dist/isRepositoryName.js.map +1 -1
- package/dist/lib/devMsg.cjs +8 -6
- package/dist/lib/devMsg.cjs.map +1 -1
- package/dist/lib/devMsg.js +8 -6
- package/dist/lib/devMsg.js.map +1 -1
- package/dist/lib/getOptionalLinkProperties.cjs +6 -5
- package/dist/lib/getOptionalLinkProperties.cjs.map +1 -1
- package/dist/lib/getOptionalLinkProperties.js +6 -5
- package/dist/lib/getOptionalLinkProperties.js.map +1 -1
- package/dist/lib/getPreviewCookie.cjs +3 -1
- package/dist/lib/getPreviewCookie.cjs.map +1 -1
- package/dist/lib/getPreviewCookie.js +3 -1
- package/dist/lib/getPreviewCookie.js.map +1 -1
- package/dist/lib/isInternalURL.cjs +1 -0
- package/dist/lib/isInternalURL.cjs.map +1 -1
- package/dist/lib/isInternalURL.js +1 -0
- package/dist/lib/isInternalURL.js.map +1 -1
- package/dist/lib/isMigrationValue.cjs +17 -7
- package/dist/lib/isMigrationValue.cjs.map +1 -1
- package/dist/lib/isMigrationValue.js +17 -7
- package/dist/lib/isMigrationValue.js.map +1 -1
- package/dist/lib/isValue.cjs +16 -2
- package/dist/lib/isValue.cjs.map +1 -1
- package/dist/lib/isValue.js +16 -2
- package/dist/lib/isValue.js.map +1 -1
- package/dist/lib/pLimit.cjs +7 -5
- package/dist/lib/pLimit.cjs.map +1 -1
- package/dist/lib/pLimit.js +7 -5
- package/dist/lib/pLimit.js.map +1 -1
- package/dist/lib/request.cjs +23 -12
- package/dist/lib/request.cjs.map +1 -1
- package/dist/lib/request.d.cts +20 -7
- package/dist/lib/request.d.cts.map +1 -1
- package/dist/lib/request.d.ts +20 -7
- package/dist/lib/request.d.ts.map +1 -1
- package/dist/lib/request.js +23 -12
- package/dist/lib/request.js.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.cjs +15 -7
- package/dist/lib/resolveMigrationDocumentData.cjs.map +1 -1
- package/dist/lib/resolveMigrationDocumentData.js +15 -7
- package/dist/lib/resolveMigrationDocumentData.js.map +1 -1
- package/dist/lib/serializerHelpers.cjs.map +1 -1
- package/dist/lib/serializerHelpers.js.map +1 -1
- package/dist/lib/throttledWarn.cjs +4 -3
- package/dist/lib/throttledWarn.cjs.map +1 -1
- package/dist/lib/throttledWarn.js +4 -3
- package/dist/lib/throttledWarn.js.map +1 -1
- package/dist/lib/validateAssetMetadata.cjs +18 -6
- package/dist/lib/validateAssetMetadata.cjs.map +1 -1
- package/dist/lib/validateAssetMetadata.js +18 -6
- package/dist/lib/validateAssetMetadata.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/richtext/asText.cjs +2 -0
- package/dist/richtext/asText.cjs.map +1 -1
- package/dist/richtext/asText.d.cts +2 -0
- package/dist/richtext/asText.d.cts.map +1 -1
- package/dist/richtext/asText.d.ts +2 -0
- package/dist/richtext/asText.d.ts.map +1 -1
- package/dist/richtext/asText.js +2 -0
- package/dist/richtext/asText.js.map +1 -1
- package/dist/richtext/asTree.cjs +4 -2
- package/dist/richtext/asTree.cjs.map +1 -1
- package/dist/richtext/asTree.d.cts +4 -2
- package/dist/richtext/asTree.d.cts.map +1 -1
- package/dist/richtext/asTree.d.ts +4 -2
- package/dist/richtext/asTree.d.ts.map +1 -1
- package/dist/richtext/asTree.js +4 -2
- package/dist/richtext/asTree.js.map +1 -1
- package/dist/richtext/composeSerializers.cjs +7 -4
- package/dist/richtext/composeSerializers.cjs.map +1 -1
- package/dist/richtext/composeSerializers.d.cts +7 -4
- package/dist/richtext/composeSerializers.d.cts.map +1 -1
- package/dist/richtext/composeSerializers.d.ts +7 -4
- package/dist/richtext/composeSerializers.d.ts.map +1 -1
- package/dist/richtext/composeSerializers.js +7 -4
- package/dist/richtext/composeSerializers.js.map +1 -1
- package/dist/richtext/serialize.cjs +6 -2
- package/dist/richtext/serialize.cjs.map +1 -1
- package/dist/richtext/serialize.d.cts +6 -2
- package/dist/richtext/serialize.d.cts.map +1 -1
- package/dist/richtext/serialize.d.ts +6 -2
- package/dist/richtext/serialize.d.ts.map +1 -1
- package/dist/richtext/serialize.js +6 -2
- package/dist/richtext/serialize.js.map +1 -1
- package/dist/richtext/types.cjs.map +1 -1
- package/dist/richtext/types.d.cts +7 -3
- package/dist/richtext/types.d.cts.map +1 -1
- package/dist/richtext/types.d.ts +7 -3
- package/dist/richtext/types.d.ts.map +1 -1
- package/dist/richtext/types.js.map +1 -1
- package/dist/richtext/wrapMapSerializer.cjs +5 -2
- package/dist/richtext/wrapMapSerializer.cjs.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.cts +5 -2
- package/dist/richtext/wrapMapSerializer.d.cts.map +1 -1
- package/dist/richtext/wrapMapSerializer.d.ts +5 -2
- package/dist/richtext/wrapMapSerializer.d.ts.map +1 -1
- package/dist/richtext/wrapMapSerializer.js +5 -2
- package/dist/richtext/wrapMapSerializer.js.map +1 -1
- package/dist/types/api/asset/asset.d.cts +70 -17
- package/dist/types/api/asset/asset.d.cts.map +1 -1
- package/dist/types/api/asset/asset.d.ts +70 -17
- package/dist/types/api/asset/asset.d.ts.map +1 -1
- package/dist/types/api/asset/tag.d.cts +23 -5
- package/dist/types/api/asset/tag.d.cts.map +1 -1
- package/dist/types/api/asset/tag.d.ts +23 -5
- package/dist/types/api/asset/tag.d.ts.map +1 -1
- package/dist/types/api/integration.d.cts +4 -2
- package/dist/types/api/integration.d.cts.map +1 -1
- package/dist/types/api/integration.d.ts +4 -2
- package/dist/types/api/integration.d.ts.map +1 -1
- package/dist/types/api/query.d.cts +27 -10
- package/dist/types/api/query.d.cts.map +1 -1
- package/dist/types/api/query.d.ts +27 -10
- package/dist/types/api/query.d.ts.map +1 -1
- package/dist/types/api/ref.d.cts +16 -6
- package/dist/types/api/ref.d.cts.map +1 -1
- package/dist/types/api/ref.d.ts +16 -6
- package/dist/types/api/ref.d.ts.map +1 -1
- package/dist/types/api/release.d.cts +2 -1
- package/dist/types/api/release.d.cts.map +1 -1
- package/dist/types/api/release.d.ts +2 -1
- package/dist/types/api/release.d.ts.map +1 -1
- package/dist/types/api/repository.d.cts +45 -18
- package/dist/types/api/repository.d.cts.map +1 -1
- package/dist/types/api/repository.d.ts +45 -18
- package/dist/types/api/repository.d.ts.map +1 -1
- package/dist/types/api/tags.d.cts +3 -2
- package/dist/types/api/tags.d.cts.map +1 -1
- package/dist/types/api/tags.d.ts +3 -2
- package/dist/types/api/tags.d.ts.map +1 -1
- package/dist/types/migration/Asset.cjs +13 -4
- package/dist/types/migration/Asset.cjs.map +1 -1
- package/dist/types/migration/Asset.d.cts +66 -20
- package/dist/types/migration/Asset.d.cts.map +1 -1
- package/dist/types/migration/Asset.d.ts +66 -20
- package/dist/types/migration/Asset.d.ts.map +1 -1
- package/dist/types/migration/Asset.js +13 -4
- package/dist/types/migration/Asset.js.map +1 -1
- package/dist/types/migration/ContentRelationship.d.cts +3 -1
- package/dist/types/migration/ContentRelationship.d.cts.map +1 -1
- package/dist/types/migration/ContentRelationship.d.ts +3 -1
- package/dist/types/migration/ContentRelationship.d.ts.map +1 -1
- package/dist/types/migration/Document.cjs +19 -10
- package/dist/types/migration/Document.cjs.map +1 -1
- package/dist/types/migration/Document.d.cts +31 -12
- package/dist/types/migration/Document.d.cts.map +1 -1
- package/dist/types/migration/Document.d.ts +31 -12
- package/dist/types/migration/Document.d.ts.map +1 -1
- package/dist/types/migration/Document.js +19 -10
- package/dist/types/migration/Document.js.map +1 -1
- package/dist/types/model/contentRelationship.d.cts +15 -5
- package/dist/types/model/contentRelationship.d.cts.map +1 -1
- package/dist/types/model/contentRelationship.d.ts +15 -5
- package/dist/types/model/contentRelationship.d.ts.map +1 -1
- package/dist/types/model/customType.d.cts +17 -6
- package/dist/types/model/customType.d.cts.map +1 -1
- package/dist/types/model/customType.d.ts +17 -6
- package/dist/types/model/customType.d.ts.map +1 -1
- package/dist/types/model/image.d.cts.map +1 -1
- package/dist/types/model/image.d.ts.map +1 -1
- package/dist/types/model/linkToMedia.d.cts.map +1 -1
- package/dist/types/model/linkToMedia.d.ts.map +1 -1
- package/dist/types/model/range.d.cts +3 -1
- package/dist/types/model/range.d.cts.map +1 -1
- package/dist/types/model/range.d.ts +3 -1
- package/dist/types/model/range.d.ts.map +1 -1
- package/dist/types/model/separator.d.cts +3 -1
- package/dist/types/model/separator.d.cts.map +1 -1
- package/dist/types/model/separator.d.ts +3 -1
- package/dist/types/model/separator.d.ts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/model/sharedSliceVariation.d.ts.map +1 -1
- package/dist/types/model/slice.cjs.map +1 -1
- package/dist/types/model/slice.d.cts +3 -1
- package/dist/types/model/slice.d.cts.map +1 -1
- package/dist/types/model/slice.d.ts +3 -1
- package/dist/types/model/slice.d.ts.map +1 -1
- package/dist/types/model/slice.js.map +1 -1
- package/dist/types/model/sliceZone.cjs.map +1 -1
- package/dist/types/model/sliceZone.d.cts.map +1 -1
- package/dist/types/model/sliceZone.d.ts.map +1 -1
- package/dist/types/model/sliceZone.js.map +1 -1
- package/dist/types/model/types.cjs +3 -1
- package/dist/types/model/types.cjs.map +1 -1
- package/dist/types/model/types.d.cts +31 -9
- package/dist/types/model/types.d.cts.map +1 -1
- package/dist/types/model/types.d.ts +31 -9
- package/dist/types/model/types.d.ts.map +1 -1
- package/dist/types/model/types.js +3 -1
- package/dist/types/model/types.js.map +1 -1
- package/dist/types/value/color.d.cts +1 -0
- package/dist/types/value/color.d.cts.map +1 -1
- package/dist/types/value/color.d.ts +1 -0
- package/dist/types/value/color.d.ts.map +1 -1
- package/dist/types/value/contentRelationship.d.cts +5 -3
- package/dist/types/value/contentRelationship.d.cts.map +1 -1
- package/dist/types/value/contentRelationship.d.ts +5 -3
- package/dist/types/value/contentRelationship.d.ts.map +1 -1
- package/dist/types/value/date.d.cts +1 -0
- package/dist/types/value/date.d.cts.map +1 -1
- package/dist/types/value/date.d.ts +1 -0
- package/dist/types/value/date.d.ts.map +1 -1
- package/dist/types/value/document.d.cts +50 -23
- package/dist/types/value/document.d.cts.map +1 -1
- package/dist/types/value/document.d.ts +50 -23
- package/dist/types/value/document.d.ts.map +1 -1
- package/dist/types/value/embed.cjs +1 -1
- package/dist/types/value/embed.cjs.map +1 -1
- package/dist/types/value/embed.d.cts +95 -28
- package/dist/types/value/embed.d.cts.map +1 -1
- package/dist/types/value/embed.d.ts +95 -28
- package/dist/types/value/embed.d.ts.map +1 -1
- package/dist/types/value/embed.js +1 -1
- package/dist/types/value/embed.js.map +1 -1
- package/dist/types/value/geoPoint.d.cts +1 -0
- package/dist/types/value/geoPoint.d.cts.map +1 -1
- package/dist/types/value/geoPoint.d.ts +1 -0
- package/dist/types/value/geoPoint.d.ts.map +1 -1
- package/dist/types/value/group.d.cts.map +1 -1
- package/dist/types/value/group.d.ts.map +1 -1
- package/dist/types/value/image.d.cts +8 -5
- package/dist/types/value/image.d.cts.map +1 -1
- package/dist/types/value/image.d.ts +8 -5
- package/dist/types/value/image.d.ts.map +1 -1
- package/dist/types/value/integration.d.cts +1 -0
- package/dist/types/value/integration.d.cts.map +1 -1
- package/dist/types/value/integration.d.ts +1 -0
- package/dist/types/value/integration.d.ts.map +1 -1
- package/dist/types/value/keyText.d.cts +1 -0
- package/dist/types/value/keyText.d.cts.map +1 -1
- package/dist/types/value/keyText.d.ts +1 -0
- package/dist/types/value/keyText.d.ts.map +1 -1
- package/dist/types/value/link.cjs +3 -1
- package/dist/types/value/link.cjs.map +1 -1
- package/dist/types/value/link.d.cts +12 -8
- package/dist/types/value/link.d.cts.map +1 -1
- package/dist/types/value/link.d.ts +12 -8
- package/dist/types/value/link.d.ts.map +1 -1
- package/dist/types/value/link.js +3 -1
- package/dist/types/value/link.js.map +1 -1
- package/dist/types/value/linkToMedia.d.cts.map +1 -1
- package/dist/types/value/linkToMedia.d.ts.map +1 -1
- package/dist/types/value/number.d.cts +1 -0
- package/dist/types/value/number.d.cts.map +1 -1
- package/dist/types/value/number.d.ts +1 -0
- package/dist/types/value/number.d.ts.map +1 -1
- package/dist/types/value/richText.cjs.map +1 -1
- package/dist/types/value/richText.d.cts +77 -26
- package/dist/types/value/richText.d.cts.map +1 -1
- package/dist/types/value/richText.d.ts +77 -26
- package/dist/types/value/richText.d.ts.map +1 -1
- package/dist/types/value/richText.js.map +1 -1
- package/dist/types/value/select.d.cts +1 -0
- package/dist/types/value/select.d.cts.map +1 -1
- package/dist/types/value/select.d.ts +1 -0
- package/dist/types/value/select.d.ts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.cts +3 -1
- package/dist/types/value/sharedSliceVariation.d.cts.map +1 -1
- package/dist/types/value/sharedSliceVariation.d.ts +3 -1
- package/dist/types/value/sharedSliceVariation.d.ts.map +1 -1
- package/dist/types/value/slice.d.cts.map +1 -1
- package/dist/types/value/slice.d.ts.map +1 -1
- package/dist/types/value/sliceZone.d.cts +4 -3
- package/dist/types/value/sliceZone.d.cts.map +1 -1
- package/dist/types/value/sliceZone.d.ts +4 -3
- package/dist/types/value/sliceZone.d.ts.map +1 -1
- package/dist/types/value/table.d.cts +63 -14
- package/dist/types/value/table.d.cts.map +1 -1
- package/dist/types/value/table.d.ts +63 -14
- package/dist/types/value/table.d.ts.map +1 -1
- package/dist/types/value/timestamp.d.cts.map +1 -1
- package/dist/types/value/timestamp.d.ts.map +1 -1
- package/dist/types/value/title.d.cts +1 -1
- package/dist/types/value/title.d.cts.map +1 -1
- package/dist/types/value/title.d.ts +1 -1
- package/dist/types/value/title.d.ts.map +1 -1
- package/dist/types/value/types.d.cts +24 -11
- package/dist/types/value/types.d.cts.map +1 -1
- package/dist/types/value/types.d.ts +24 -11
- package/dist/types/value/types.d.ts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.cts +3 -1
- package/dist/types/webhook/apiUpdate.d.cts.map +1 -1
- package/dist/types/webhook/apiUpdate.d.ts +3 -1
- package/dist/types/webhook/apiUpdate.d.ts.map +1 -1
- package/package.json +35 -33
- package/src/Client.ts +399 -236
- package/src/Migration.ts +139 -80
- package/src/WriteClient.ts +174 -64
- package/src/buildQueryURL.ts +100 -68
- package/src/cookie.ts +4 -1
- package/src/createClient.ts +20 -12
- package/src/createMigration.ts +16 -8
- package/src/createWriteClient.ts +19 -11
- package/src/errors.ts +15 -5
- package/src/filter.ts +122 -79
- package/src/getGraphQLEndpoint.ts +3 -0
- package/src/getRepositoryEndpoint.ts +9 -4
- package/src/getRepositoryName.ts +5 -2
- package/src/getToolbarSrc.ts +20 -17
- package/src/helpers/asDate.ts +18 -13
- package/src/helpers/asHTML.ts +102 -55
- package/src/helpers/asImagePixelDensitySrcSet.ts +49 -29
- package/src/helpers/asImageSrc.ts +16 -8
- package/src/helpers/asImageWidthSrcSet.ts +52 -33
- package/src/helpers/asLink.ts +54 -26
- package/src/helpers/asLinkAttrs.ts +29 -14
- package/src/helpers/asText.ts +31 -15
- package/src/helpers/documentToLinkField.ts +15 -4
- package/src/helpers/isFilled.ts +51 -14
- package/src/helpers/mapSliceZone.ts +84 -42
- package/src/index.ts +68 -18
- package/src/isRepositoryEndpoint.ts +4 -3
- package/src/isRepositoryName.ts +2 -1
- package/src/lib/devMsg.ts +8 -6
- package/src/lib/getOptionalLinkProperties.ts +6 -5
- package/src/lib/getPreviewCookie.ts +3 -1
- package/src/lib/isInternalURL.ts +1 -0
- package/src/lib/isMigrationValue.ts +22 -9
- package/src/lib/isValue.ts +38 -9
- package/src/lib/pLimit.ts +16 -9
- package/src/lib/request.ts +40 -15
- package/src/lib/resolveMigrationDocumentData.ts +27 -8
- package/src/lib/serializerHelpers.ts +29 -9
- package/src/lib/throttledWarn.ts +8 -4
- package/src/lib/validateAssetMetadata.ts +43 -17
- package/src/richtext/asText.ts +8 -2
- package/src/richtext/asTree.ts +26 -8
- package/src/richtext/composeSerializers.ts +11 -5
- package/src/richtext/serialize.ts +12 -4
- package/src/richtext/types.ts +57 -13
- package/src/richtext/wrapMapSerializer.ts +8 -4
- package/src/types/api/asset/asset.ts +77 -26
- package/src/types/api/asset/tag.ts +18 -6
- package/src/types/api/integration.ts +10 -4
- package/src/types/api/migration/document.ts +27 -11
- package/src/types/api/query.ts +27 -10
- package/src/types/api/ref.ts +16 -6
- package/src/types/api/release.ts +2 -1
- package/src/types/api/repository.ts +45 -18
- package/src/types/api/tags.ts +3 -2
- package/src/types/migration/Asset.ts +82 -26
- package/src/types/migration/ContentRelationship.ts +12 -5
- package/src/types/migration/Document.ts +52 -26
- package/src/types/migration/Link.ts +9 -7
- package/src/types/model/contentRelationship.ts +20 -7
- package/src/types/model/customType.ts +21 -7
- package/src/types/model/image.ts +5 -4
- package/src/types/model/linkToMedia.ts +2 -1
- package/src/types/model/range.ts +3 -1
- package/src/types/model/separator.ts +3 -1
- package/src/types/model/sharedSliceVariation.ts +4 -4
- package/src/types/model/slice.ts +12 -7
- package/src/types/model/sliceZone.ts +11 -4
- package/src/types/model/types.ts +31 -10
- package/src/types/value/color.ts +3 -3
- package/src/types/value/contentRelationship.ts +13 -8
- package/src/types/value/date.ts +3 -1
- package/src/types/value/document.ts +52 -24
- package/src/types/value/embed.ts +80 -33
- package/src/types/value/geoPoint.ts +8 -6
- package/src/types/value/group.ts +4 -1
- package/src/types/value/image.ts +14 -10
- package/src/types/value/integration.ts +1 -0
- package/src/types/value/keyText.ts +3 -3
- package/src/types/value/link.ts +22 -14
- package/src/types/value/linkToMedia.ts +5 -2
- package/src/types/value/number.ts +3 -3
- package/src/types/value/richText.ts +82 -30
- package/src/types/value/select.ts +1 -0
- package/src/types/value/sharedSliceVariation.ts +11 -3
- package/src/types/value/slice.ts +8 -2
- package/src/types/value/sliceZone.ts +6 -4
- package/src/types/value/table.ts +64 -25
- package/src/types/value/timestamp.ts +2 -3
- package/src/types/value/title.ts +18 -16
- package/src/types/value/types.ts +21 -8
- package/src/types/webhook/apiUpdate.ts +3 -1
|
@@ -24,19 +24,22 @@ var isFilled_exports = /* @__PURE__ */ require("../_virtual/_rolldown/runtime.cj
|
|
|
24
24
|
title: () => title
|
|
25
25
|
});
|
|
26
26
|
/**
|
|
27
|
-
* Determines if a value is not nullish (i.e. not `null` or `undefined`). This
|
|
28
|
-
* nullable field values are filled.
|
|
27
|
+
* Determines if a value is not nullish (i.e. not `null` or `undefined`). This
|
|
28
|
+
* is used to check if nullable field values are filled.
|
|
29
29
|
*
|
|
30
30
|
* @param input - The value to check.
|
|
31
|
+
*
|
|
31
32
|
* @returns `true` if `input` is not nullish, `false` otherwise.
|
|
32
33
|
*/
|
|
33
34
|
const isNonNullish = (input) => {
|
|
34
35
|
return input != null;
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
37
|
-
* Determines if an array is not empty. This is used to check if array-based
|
|
38
|
+
* Determines if an array is not empty. This is used to check if array-based
|
|
39
|
+
* fields are filled.
|
|
38
40
|
*
|
|
39
41
|
* @param input - The array to check.
|
|
42
|
+
*
|
|
40
43
|
* @returns `true` if `input` has at least one element, `false` otherwise.
|
|
41
44
|
*/
|
|
42
45
|
const isNonEmptyArray = (input) => {
|
|
@@ -45,7 +48,8 @@ const isNonEmptyArray = (input) => {
|
|
|
45
48
|
/**
|
|
46
49
|
* Determines if a rich text field is filled.
|
|
47
50
|
*
|
|
48
|
-
* @param field -
|
|
51
|
+
* @param field - rich text field to check.
|
|
52
|
+
*
|
|
49
53
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
50
54
|
*/
|
|
51
55
|
const richText = (field) => {
|
|
@@ -57,6 +61,7 @@ const richText = (field) => {
|
|
|
57
61
|
* Determines if a title field is filled.
|
|
58
62
|
*
|
|
59
63
|
* @param field - Title field to check.
|
|
64
|
+
*
|
|
60
65
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
61
66
|
*/
|
|
62
67
|
const title = richText;
|
|
@@ -64,6 +69,7 @@ const title = richText;
|
|
|
64
69
|
* Determines if an image thumbnail is filled.
|
|
65
70
|
*
|
|
66
71
|
* @param thumbnail - Image thumbnail to check.
|
|
72
|
+
*
|
|
67
73
|
* @returns `true` if the thumbnail is filled, `false` otherwise.
|
|
68
74
|
*/
|
|
69
75
|
const imageThumbnail = (thumbnail) => {
|
|
@@ -73,6 +79,7 @@ const imageThumbnail = (thumbnail) => {
|
|
|
73
79
|
* Determines if an image field is filled.
|
|
74
80
|
*
|
|
75
81
|
* @param field - Image field to check.
|
|
82
|
+
*
|
|
76
83
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
77
84
|
*/
|
|
78
85
|
const image = imageThumbnail;
|
|
@@ -80,6 +87,7 @@ const image = imageThumbnail;
|
|
|
80
87
|
* Determines if a link field is filled.
|
|
81
88
|
*
|
|
82
89
|
* @param field - Link field to check.
|
|
90
|
+
*
|
|
83
91
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
84
92
|
*/
|
|
85
93
|
const link = (field) => {
|
|
@@ -89,6 +97,7 @@ const link = (field) => {
|
|
|
89
97
|
* Determines if a link to media field is filled.
|
|
90
98
|
*
|
|
91
99
|
* @param field - Link to media field to check.
|
|
100
|
+
*
|
|
92
101
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
93
102
|
*/
|
|
94
103
|
const linkToMedia = link;
|
|
@@ -96,6 +105,7 @@ const linkToMedia = link;
|
|
|
96
105
|
* Determines if a content relationship field is filled.
|
|
97
106
|
*
|
|
98
107
|
* @param field - Content relationship field to check.
|
|
108
|
+
*
|
|
99
109
|
* @returns `true` if the field is filled, `false` otherwise.
|
|
100
110
|
*/
|
|
101
111
|
const contentRelationship = link;
|
|
@@ -103,6 +113,7 @@ const contentRelationship = link;
|
|
|
103
113
|
* Determines if a date field is filled.
|
|
104
114
|
*
|
|
105
115
|
* @param field - Date field to check.
|
|
116
|
+
*
|
|
106
117
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
107
118
|
*/
|
|
108
119
|
const date = isNonNullish;
|
|
@@ -110,6 +121,7 @@ const date = isNonNullish;
|
|
|
110
121
|
* Determines if a timestamp field is filled.
|
|
111
122
|
*
|
|
112
123
|
* @param field - Timestamp field to check.
|
|
124
|
+
*
|
|
113
125
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
114
126
|
*/
|
|
115
127
|
const timestamp = isNonNullish;
|
|
@@ -117,6 +129,7 @@ const timestamp = isNonNullish;
|
|
|
117
129
|
* Determines if a color field is filled.
|
|
118
130
|
*
|
|
119
131
|
* @param field - Color field to check.
|
|
132
|
+
*
|
|
120
133
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
121
134
|
*/
|
|
122
135
|
const color = isNonNullish;
|
|
@@ -124,6 +137,7 @@ const color = isNonNullish;
|
|
|
124
137
|
* Determines if a number field is filled.
|
|
125
138
|
*
|
|
126
139
|
* @param field - Number field to check.
|
|
140
|
+
*
|
|
127
141
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
128
142
|
*/
|
|
129
143
|
const number = isNonNullish;
|
|
@@ -131,6 +145,7 @@ const number = isNonNullish;
|
|
|
131
145
|
* Determines if a key text field is filled.
|
|
132
146
|
*
|
|
133
147
|
* @param field - Key text field to check.
|
|
148
|
+
*
|
|
134
149
|
* @returns `true` if the field is filled, `false` otherwise.
|
|
135
150
|
*/
|
|
136
151
|
const keyText = (field) => {
|
|
@@ -140,6 +155,7 @@ const keyText = (field) => {
|
|
|
140
155
|
* Determines if a select field is filled.
|
|
141
156
|
*
|
|
142
157
|
* @param field - Select field to check.
|
|
158
|
+
*
|
|
143
159
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
144
160
|
*/
|
|
145
161
|
const select = isNonNullish;
|
|
@@ -147,6 +163,7 @@ const select = isNonNullish;
|
|
|
147
163
|
* Determines if an embed field is filled.
|
|
148
164
|
*
|
|
149
165
|
* @param field - Embed field to check.
|
|
166
|
+
*
|
|
150
167
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
151
168
|
*/
|
|
152
169
|
const embed = (field) => {
|
|
@@ -156,6 +173,7 @@ const embed = (field) => {
|
|
|
156
173
|
* Determines if a geopoint field is filled.
|
|
157
174
|
*
|
|
158
175
|
* @param field - Geopoint field to check.
|
|
176
|
+
*
|
|
159
177
|
* @returns `true` if the field is filled, `false` otherwise.
|
|
160
178
|
*/
|
|
161
179
|
const geoPoint = (field) => {
|
|
@@ -165,6 +183,7 @@ const geoPoint = (field) => {
|
|
|
165
183
|
* Determines if a table field is filled.
|
|
166
184
|
*
|
|
167
185
|
* @param field - Table field to check.
|
|
186
|
+
*
|
|
168
187
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
169
188
|
*/
|
|
170
189
|
const table = isNonNullish;
|
|
@@ -172,19 +191,25 @@ const table = isNonNullish;
|
|
|
172
191
|
* Determines if an integration field is filled.
|
|
173
192
|
*
|
|
174
193
|
* @param field - Integration field to check.
|
|
194
|
+
*
|
|
175
195
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
176
196
|
*/
|
|
177
197
|
const integration = isNonNullish;
|
|
178
|
-
/**
|
|
198
|
+
/**
|
|
199
|
+
* @deprecated Renamed to `integration`.
|
|
200
|
+
*/
|
|
179
201
|
const integrationField = integration;
|
|
180
|
-
/**
|
|
202
|
+
/**
|
|
203
|
+
* @deprecated Renamed to `integrationField`.
|
|
204
|
+
*/
|
|
181
205
|
const integrationFields = integration;
|
|
182
206
|
/**
|
|
183
207
|
* Determines if a repeatable field has at least one item.
|
|
184
208
|
*
|
|
185
209
|
* @param repeatable - Repeatable to check.
|
|
210
|
+
*
|
|
186
211
|
* @returns `true` if `repeatable` contains at least one item, `false`
|
|
187
|
-
*
|
|
212
|
+
* otherwise.
|
|
188
213
|
*/
|
|
189
214
|
const repeatable = (repeatable) => {
|
|
190
215
|
return isNonNullish(repeatable) && isNonEmptyArray(repeatable);
|
|
@@ -193,6 +218,7 @@ const repeatable = (repeatable) => {
|
|
|
193
218
|
* Determines if a group has at least one item.
|
|
194
219
|
*
|
|
195
220
|
* @param group - Group to check.
|
|
221
|
+
*
|
|
196
222
|
* @returns `true` if the group contains at least one item, `false` otherwise.
|
|
197
223
|
*/
|
|
198
224
|
const group = (group) => {
|
|
@@ -202,8 +228,9 @@ const group = (group) => {
|
|
|
202
228
|
* Determines if a slice zone has at least one slice.
|
|
203
229
|
*
|
|
204
230
|
* @param slices - Slice zone to check.
|
|
231
|
+
*
|
|
205
232
|
* @returns `true` if the slice zone contains at least one slice, `false`
|
|
206
|
-
*
|
|
233
|
+
* otherwise.
|
|
207
234
|
*/
|
|
208
235
|
const sliceZone = (slices) => {
|
|
209
236
|
return isNonNullish(slices) && isNonEmptyArray(slices);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isFilled.cjs","names":[],"sources":["../../src/helpers/isFilled.ts"],"sourcesContent":["import type { ColorField } from \"../types/value/color\"\nimport type {\n\tContentRelationshipField,\n\tEmptyContentRelationshipField,\n} from \"../types/value/contentRelationship\"\nimport type { DateField } from \"../types/value/date\"\nimport type { AnyOEmbed, EmbedField } from \"../types/value/embed\"\nimport type { GeoPointField } from \"../types/value/geoPoint\"\nimport type { GroupField, NestedGroupField } from \"../types/value/group\"\nimport type { ImageField, ImageFieldImage } from \"../types/value/image\"\nimport type { IntegrationField, IntegrationFieldData } from \"../types/value/integration\"\nimport type { KeyTextField } from \"../types/value/keyText\"\nimport type { LinkField } from \"../types/value/link\"\nimport type { LinkToMediaField } from \"../types/value/linkToMedia\"\nimport type { NumberField } from \"../types/value/number\"\nimport type { RichTextField } from \"../types/value/richText\"\nimport type { SelectField } from \"../types/value/select\"\nimport type { SharedSlice } from \"../types/value/sharedSlice\"\nimport type { Slice } from \"../types/value/slice\"\nimport type { SliceZone } from \"../types/value/sliceZone\"\nimport type { TableField } from \"../types/value/table\"\nimport type { TimestampField } from \"../types/value/timestamp\"\nimport type { TitleField } from \"../types/value/title\"\nimport type { AnyRegularField, Repeatable } from \"../types/value/types\"\n\n/**\n * Determines if a value is not nullish (i.e. not `null` or `undefined`). This is used to check if\n * nullable field values are filled.\n *\n * @param input - The value to check.\n * @returns `true` if `input` is not nullish, `false` otherwise.\n */\nconst isNonNullish = <T>(input: T): input is NonNullable<T> => {\n\treturn input != null\n}\n\n/**\n * Determines if an array is not empty. This is used to check if array-based fields are filled.\n *\n * @param input - The array to check.\n * @returns `true` if `input` has at least one element, `false` otherwise.\n */\nconst isNonEmptyArray = <T>(input: T[]): input is [T, ...T[]] => {\n\treturn !!input.length\n}\n\n/**\n * Determines if a rich text field is filled.\n *\n * @param field - Rich text field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const richText = (\n\tfield: RichTextField | null | undefined,\n): field is RichTextField<\"filled\"> => {\n\tif (!isNonNullish(field)) {\n\t\treturn false\n\t} else if (field.length === 1 && \"text\" in field[0]) {\n\t\treturn !!field[0].text\n\t} else {\n\t\treturn !!field.length\n\t}\n}\n\n/**\n * Determines if a title field is filled.\n *\n * @param field - Title field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const title = richText as (\n\tfield: TitleField | null | undefined,\n) => field is TitleField<\"filled\">\n\n/**\n * Determines if an image thumbnail is filled.\n *\n * @param thumbnail - Image thumbnail to check.\n * @returns `true` if the thumbnail is filled, `false` otherwise.\n */\nexport const imageThumbnail = (\n\tthumbnail: ImageFieldImage | null | undefined,\n): thumbnail is ImageFieldImage<\"filled\"> => {\n\treturn isNonNullish(thumbnail) && !!thumbnail.url\n}\n\n/**\n * Determines if an image field is filled.\n *\n * @param field - Image field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const image = imageThumbnail as <ThumbnailNames extends string | null = never>(\n\tfield: ImageField<ThumbnailNames> | null | undefined,\n) => field is ImageField<ThumbnailNames, \"filled\">\n\n/**\n * Determines if a link field is filled.\n *\n * @param field - Link field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const link = <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown =\n\t\tunknown,\n>(\n\tfield: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined,\n): field is LinkField<TypeEnum, LangEnum, DataInterface, \"filled\"> => {\n\treturn isNonNullish(field) && (\"id\" in field || \"url\" in field)\n}\n\n/**\n * Determines if a link to media field is filled.\n *\n * @param field - Link to media field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const linkToMedia = link as (\n\tfield: LinkToMediaField | null | undefined,\n) => field is LinkToMediaField<\"filled\">\n\n/**\n * Determines if a content relationship field is filled.\n *\n * @param field - Content relationship field to check.\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const contentRelationship = link as <Field extends ContentRelationshipField>(\n\tfield: Field | null | undefined,\n) => field is Exclude<Field, EmptyContentRelationshipField>\n\n/**\n * Determines if a date field is filled.\n *\n * @param field - Date field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const date = isNonNullish as (\n\tfield: DateField | null | undefined,\n) => field is DateField<\"filled\">\n\n/**\n * Determines if a timestamp field is filled.\n *\n * @param field - Timestamp field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const timestamp = isNonNullish as (\n\tfield: TimestampField | null | undefined,\n) => field is TimestampField<\"filled\">\n\n/**\n * Determines if a color field is filled.\n *\n * @param field - Color field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const color = isNonNullish as (\n\tfield: ColorField | null | undefined,\n) => field is ColorField<\"filled\">\n\n/**\n * Determines if a number field is filled.\n *\n * @param field - Number field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const number = isNonNullish as (\n\tfield: NumberField | null | undefined,\n) => field is NumberField<\"filled\">\n\n/**\n * Determines if a key text field is filled.\n *\n * @param field - Key text field to check.\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const keyText = (\n\tfield: KeyTextField | null | undefined,\n): field is KeyTextField<\"filled\"> => {\n\treturn !!field\n}\n\n/**\n * Determines if a select field is filled.\n *\n * @param field - Select field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const select = isNonNullish as <Enum extends string>(\n\tfield: SelectField<Enum> | null | undefined,\n) => field is SelectField<Enum, \"filled\">\n\n/**\n * Determines if an embed field is filled.\n *\n * @param field - Embed field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const embed = <Field extends EmbedField<AnyOEmbed>>(\n\tfield: Field | null | undefined,\n): field is Extract<Field, EmbedField<AnyOEmbed, \"filled\">> => {\n\treturn isNonNullish(field) && !!field.embed_url\n}\n\n/**\n * Determines if a geopoint field is filled.\n *\n * @param field - Geopoint field to check.\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const geoPoint = (\n\tfield: GeoPointField | null | undefined,\n): field is GeoPointField<\"filled\"> => {\n\treturn isNonNullish(field) && \"longitude\" in field\n}\n\n/**\n * Determines if a table field is filled.\n *\n * @param field - Table field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const table = isNonNullish as (\n\tfield: TableField | null | undefined,\n) => field is TableField<\"filled\">\n\n/**\n * Determines if an integration field is filled.\n *\n * @param field - Integration field to check.\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const integration = isNonNullish as <Data extends IntegrationFieldData>(\n\tfield: IntegrationField<Data> | null | undefined,\n) => field is IntegrationField<Data, \"filled\">\n/** @deprecated Renamed to `integration`. */\n// TODO: Remove when we remove support for deprecated `integrationField` export.\nexport const integrationField = integration\n/** @deprecated Renamed to `integrationField`. */\n// TODO: Remove when we remove support for deprecated `integrationFields` export.\nexport const integrationFields = integration\n\n/**\n * Determines if a repeatable field has at least one item.\n *\n * @param repeatable - Repeatable to check.\n * @returns `true` if `repeatable` contains at least one item, `false`\n * otherwise.\n */\nexport const repeatable = <T extends LinkField>(\n\trepeatable: Repeatable<T> | null | undefined,\n): repeatable is Repeatable<T, \"filled\"> => {\n\treturn isNonNullish(repeatable) && isNonEmptyArray(repeatable)\n}\n\n/**\n * Determines if a group has at least one item.\n *\n * @param group - Group to check.\n * @returns `true` if the group contains at least one item, `false` otherwise.\n */\nexport const group = <Fields extends Record<string, AnyRegularField | NestedGroupField>>(\n\tgroup: GroupField<Fields> | null | undefined,\n): group is GroupField<Fields, \"filled\"> => {\n\treturn isNonNullish(group) && isNonEmptyArray(group)\n}\n\n/**\n * Determines if a slice zone has at least one slice.\n *\n * @param slices - Slice zone to check.\n * @returns `true` if the slice zone contains at least one slice, `false`\n * otherwise.\n */\nexport const sliceZone = <Slices extends Slice | SharedSlice>(\n\tslices: SliceZone<Slices> | null | undefined,\n): slices is SliceZone<Slices, \"filled\"> => {\n\treturn isNonNullish(slices) && isNonEmptyArray(slices)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAM,gBAAmB,UAAsC;AAC9D,QAAO,SAAS;;;;;;;;AASjB,MAAM,mBAAsB,UAAqC;AAChE,QAAO,CAAC,CAAC,MAAM;;;;;;;;AAShB,MAAa,YACZ,UACsC;AACtC,KAAI,CAAC,aAAa,MAAM,CACvB,QAAO;UACG,MAAM,WAAW,KAAK,UAAU,MAAM,GAChD,QAAO,CAAC,CAAC,MAAM,GAAG;KAElB,QAAO,CAAC,CAAC,MAAM;;;;;;;;AAUjB,MAAa,QAAQ;;;;;;;AAUrB,MAAa,kBACZ,cAC4C;AAC5C,QAAO,aAAa,UAAU,IAAI,CAAC,CAAC,UAAU;;;;;;;;AAS/C,MAAa,QAAQ;;;;;;;AAUrB,MAAa,QAMZ,UACqE;AACrE,QAAO,aAAa,MAAM,KAAK,QAAQ,SAAS,SAAS;;;;;;;;AAS1D,MAAa,cAAc;;;;;;;AAU3B,MAAa,sBAAsB;;;;;;;AAUnC,MAAa,OAAO;;;;;;;AAUpB,MAAa,YAAY;;;;;;;AAUzB,MAAa,QAAQ;;;;;;;AAUrB,MAAa,SAAS;;;;;;;AAUtB,MAAa,WACZ,UACqC;AACrC,QAAO,CAAC,CAAC;;;;;;;;AASV,MAAa,SAAS;;;;;;;AAUtB,MAAa,SACZ,UAC8D;AAC9D,QAAO,aAAa,MAAM,IAAI,CAAC,CAAC,MAAM;;;;;;;;AASvC,MAAa,YACZ,UACsC;AACtC,QAAO,aAAa,MAAM,IAAI,eAAe;;;;;;;;AAS9C,MAAa,QAAQ;;;;;;;AAUrB,MAAa,cAAc;;AAK3B,MAAa,mBAAmB;;AAGhC,MAAa,oBAAoB;;;;;;;;AASjC,MAAa,cACZ,eAC2C;AAC3C,QAAO,aAAa,WAAW,IAAI,gBAAgB,WAAW;;;;;;;;AAS/D,MAAa,SACZ,UAC2C;AAC3C,QAAO,aAAa,MAAM,IAAI,gBAAgB,MAAM;;;;;;;;;AAUrD,MAAa,aACZ,WAC2C;AAC3C,QAAO,aAAa,OAAO,IAAI,gBAAgB,OAAO"}
|
|
1
|
+
{"version":3,"file":"isFilled.cjs","names":[],"sources":["../../src/helpers/isFilled.ts"],"sourcesContent":["import type { ColorField } from \"../types/value/color\"\nimport type {\n\tContentRelationshipField,\n\tEmptyContentRelationshipField,\n} from \"../types/value/contentRelationship\"\nimport type { DateField } from \"../types/value/date\"\nimport type { AnyOEmbed, EmbedField } from \"../types/value/embed\"\nimport type { GeoPointField } from \"../types/value/geoPoint\"\nimport type { GroupField, NestedGroupField } from \"../types/value/group\"\nimport type { ImageField, ImageFieldImage } from \"../types/value/image\"\nimport type {\n\tIntegrationField,\n\tIntegrationFieldData,\n} from \"../types/value/integration\"\nimport type { KeyTextField } from \"../types/value/keyText\"\nimport type { LinkField } from \"../types/value/link\"\nimport type { LinkToMediaField } from \"../types/value/linkToMedia\"\nimport type { NumberField } from \"../types/value/number\"\nimport type { RichTextField } from \"../types/value/richText\"\nimport type { SelectField } from \"../types/value/select\"\nimport type { SharedSlice } from \"../types/value/sharedSlice\"\nimport type { Slice } from \"../types/value/slice\"\nimport type { SliceZone } from \"../types/value/sliceZone\"\nimport type { TableField } from \"../types/value/table\"\nimport type { TimestampField } from \"../types/value/timestamp\"\nimport type { TitleField } from \"../types/value/title\"\nimport type { AnyRegularField, Repeatable } from \"../types/value/types\"\n\n/**\n * Determines if a value is not nullish (i.e. not `null` or `undefined`). This\n * is used to check if nullable field values are filled.\n *\n * @param input - The value to check.\n *\n * @returns `true` if `input` is not nullish, `false` otherwise.\n */\nconst isNonNullish = <T>(input: T): input is NonNullable<T> => {\n\treturn input != null\n}\n\n/**\n * Determines if an array is not empty. This is used to check if array-based\n * fields are filled.\n *\n * @param input - The array to check.\n *\n * @returns `true` if `input` has at least one element, `false` otherwise.\n */\nconst isNonEmptyArray = <T>(input: T[]): input is [T, ...T[]] => {\n\treturn !!input.length\n}\n\n/**\n * Determines if a rich text field is filled.\n *\n * @param field - rich text field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const richText = (\n\tfield: RichTextField | null | undefined,\n): field is RichTextField<\"filled\"> => {\n\tif (!isNonNullish(field)) {\n\t\treturn false\n\t} else if (field.length === 1 && \"text\" in field[0]) {\n\t\treturn !!field[0].text\n\t} else {\n\t\treturn !!field.length\n\t}\n}\n\n/**\n * Determines if a title field is filled.\n *\n * @param field - Title field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const title = richText as (\n\tfield: TitleField | null | undefined,\n) => field is TitleField<\"filled\">\n\n/**\n * Determines if an image thumbnail is filled.\n *\n * @param thumbnail - Image thumbnail to check.\n *\n * @returns `true` if the thumbnail is filled, `false` otherwise.\n */\nexport const imageThumbnail = (\n\tthumbnail: ImageFieldImage | null | undefined,\n): thumbnail is ImageFieldImage<\"filled\"> => {\n\treturn isNonNullish(thumbnail) && !!thumbnail.url\n}\n\n/**\n * Determines if an image field is filled.\n *\n * @param field - Image field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const image = imageThumbnail as <\n\tThumbnailNames extends string | null = never,\n>(\n\tfield: ImageField<ThumbnailNames> | null | undefined,\n) => field is ImageField<ThumbnailNames, \"filled\">\n\n/**\n * Determines if a link field is filled.\n *\n * @param field - Link field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const link = <\n\tTypeEnum = string,\n\tLangEnum = string,\n\tDataInterface extends\n\t\t| Record<string, AnyRegularField | GroupField | SliceZone>\n\t\t| unknown = unknown,\n>(\n\tfield: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined,\n): field is LinkField<TypeEnum, LangEnum, DataInterface, \"filled\"> => {\n\treturn isNonNullish(field) && (\"id\" in field || \"url\" in field)\n}\n\n/**\n * Determines if a link to media field is filled.\n *\n * @param field - Link to media field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const linkToMedia = link as (\n\tfield: LinkToMediaField | null | undefined,\n) => field is LinkToMediaField<\"filled\">\n\n/**\n * Determines if a content relationship field is filled.\n *\n * @param field - Content relationship field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const contentRelationship = link as <\n\tField extends ContentRelationshipField,\n>(\n\tfield: Field | null | undefined,\n) => field is Exclude<Field, EmptyContentRelationshipField>\n\n/**\n * Determines if a date field is filled.\n *\n * @param field - Date field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const date = isNonNullish as (\n\tfield: DateField | null | undefined,\n) => field is DateField<\"filled\">\n\n/**\n * Determines if a timestamp field is filled.\n *\n * @param field - Timestamp field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const timestamp = isNonNullish as (\n\tfield: TimestampField | null | undefined,\n) => field is TimestampField<\"filled\">\n\n/**\n * Determines if a color field is filled.\n *\n * @param field - Color field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const color = isNonNullish as (\n\tfield: ColorField | null | undefined,\n) => field is ColorField<\"filled\">\n\n/**\n * Determines if a number field is filled.\n *\n * @param field - Number field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const number = isNonNullish as (\n\tfield: NumberField | null | undefined,\n) => field is NumberField<\"filled\">\n\n/**\n * Determines if a key text field is filled.\n *\n * @param field - Key text field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const keyText = (\n\tfield: KeyTextField | null | undefined,\n): field is KeyTextField<\"filled\"> => {\n\treturn !!field\n}\n\n/**\n * Determines if a select field is filled.\n *\n * @param field - Select field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const select = isNonNullish as <Enum extends string>(\n\tfield: SelectField<Enum> | null | undefined,\n) => field is SelectField<Enum, \"filled\">\n\n/**\n * Determines if an embed field is filled.\n *\n * @param field - Embed field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const embed = <Field extends EmbedField<AnyOEmbed>>(\n\tfield: Field | null | undefined,\n): field is Extract<Field, EmbedField<AnyOEmbed, \"filled\">> => {\n\treturn isNonNullish(field) && !!field.embed_url\n}\n\n/**\n * Determines if a geopoint field is filled.\n *\n * @param field - Geopoint field to check.\n *\n * @returns `true` if the field is filled, `false` otherwise.\n */\nexport const geoPoint = (\n\tfield: GeoPointField | null | undefined,\n): field is GeoPointField<\"filled\"> => {\n\treturn isNonNullish(field) && \"longitude\" in field\n}\n\n/**\n * Determines if a table field is filled.\n *\n * @param field - Table field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const table = isNonNullish as (\n\tfield: TableField | null | undefined,\n) => field is TableField<\"filled\">\n\n/**\n * Determines if an integration field is filled.\n *\n * @param field - Integration field to check.\n *\n * @returns `true` if `field` is filled, `false` otherwise.\n */\nexport const integration = isNonNullish as <Data extends IntegrationFieldData>(\n\tfield: IntegrationField<Data> | null | undefined,\n) => field is IntegrationField<Data, \"filled\">\n/**\n * @deprecated Renamed to `integration`.\n */\n// TODO: Remove when we remove support for deprecated `integrationField` export.\nexport const integrationField = integration\n/**\n * @deprecated Renamed to `integrationField`.\n */\n// TODO: Remove when we remove support for deprecated `integrationFields` export.\nexport const integrationFields = integration\n\n/**\n * Determines if a repeatable field has at least one item.\n *\n * @param repeatable - Repeatable to check.\n *\n * @returns `true` if `repeatable` contains at least one item, `false`\n * otherwise.\n */\nexport const repeatable = <T extends LinkField>(\n\trepeatable: Repeatable<T> | null | undefined,\n): repeatable is Repeatable<T, \"filled\"> => {\n\treturn isNonNullish(repeatable) && isNonEmptyArray(repeatable)\n}\n\n/**\n * Determines if a group has at least one item.\n *\n * @param group - Group to check.\n *\n * @returns `true` if the group contains at least one item, `false` otherwise.\n */\nexport const group = <\n\tFields extends Record<string, AnyRegularField | NestedGroupField>,\n>(\n\tgroup: GroupField<Fields> | null | undefined,\n): group is GroupField<Fields, \"filled\"> => {\n\treturn isNonNullish(group) && isNonEmptyArray(group)\n}\n\n/**\n * Determines if a slice zone has at least one slice.\n *\n * @param slices - Slice zone to check.\n *\n * @returns `true` if the slice zone contains at least one slice, `false`\n * otherwise.\n */\nexport const sliceZone = <Slices extends Slice | SharedSlice>(\n\tslices: SliceZone<Slices> | null | undefined,\n): slices is SliceZone<Slices, \"filled\"> => {\n\treturn isNonNullish(slices) && isNonEmptyArray(slices)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,gBAAmB,UAAsC;AAC9D,QAAO,SAAS;;;;;;;;;;AAWjB,MAAM,mBAAsB,UAAqC;AAChE,QAAO,CAAC,CAAC,MAAM;;;;;;;;;AAUhB,MAAa,YACZ,UACsC;AACtC,KAAI,CAAC,aAAa,MAAM,CACvB,QAAO;UACG,MAAM,WAAW,KAAK,UAAU,MAAM,GAChD,QAAO,CAAC,CAAC,MAAM,GAAG;KAElB,QAAO,CAAC,CAAC,MAAM;;;;;;;;;AAWjB,MAAa,QAAQ;;;;;;;;AAWrB,MAAa,kBACZ,cAC4C;AAC5C,QAAO,aAAa,UAAU,IAAI,CAAC,CAAC,UAAU;;;;;;;;;AAU/C,MAAa,QAAQ;;;;;;;;AAarB,MAAa,QAOZ,UACqE;AACrE,QAAO,aAAa,MAAM,KAAK,QAAQ,SAAS,SAAS;;;;;;;;;AAU1D,MAAa,cAAc;;;;;;;;AAW3B,MAAa,sBAAsB;;;;;;;;AAanC,MAAa,OAAO;;;;;;;;AAWpB,MAAa,YAAY;;;;;;;;AAWzB,MAAa,QAAQ;;;;;;;;AAWrB,MAAa,SAAS;;;;;;;;AAWtB,MAAa,WACZ,UACqC;AACrC,QAAO,CAAC,CAAC;;;;;;;;;AAUV,MAAa,SAAS;;;;;;;;AAWtB,MAAa,SACZ,UAC8D;AAC9D,QAAO,aAAa,MAAM,IAAI,CAAC,CAAC,MAAM;;;;;;;;;AAUvC,MAAa,YACZ,UACsC;AACtC,QAAO,aAAa,MAAM,IAAI,eAAe;;;;;;;;;AAU9C,MAAa,QAAQ;;;;;;;;AAWrB,MAAa,cAAc;;;;AAO3B,MAAa,mBAAmB;;;;AAKhC,MAAa,oBAAoB;;;;;;;;;AAUjC,MAAa,cACZ,eAC2C;AAC3C,QAAO,aAAa,WAAW,IAAI,gBAAgB,WAAW;;;;;;;;;AAU/D,MAAa,SAGZ,UAC2C;AAC3C,QAAO,aAAa,MAAM,IAAI,gBAAgB,MAAM;;;;;;;;;;AAWrD,MAAa,aACZ,WAC2C;AAC3C,QAAO,aAAa,OAAO,IAAI,gBAAgB,OAAO"}
|
|
@@ -5,20 +5,20 @@ import { Slice } from "../types/value/slice.cjs";
|
|
|
5
5
|
import { SliceZone } from "../types/value/sliceZone.cjs";
|
|
6
6
|
import { ContentRelationshipField, EmptyContentRelationshipField } from "../types/value/contentRelationship.cjs";
|
|
7
7
|
import { DateField } from "../types/value/date.cjs";
|
|
8
|
+
import { AnyOEmbed, EmbedField } from "../types/value/embed.cjs";
|
|
8
9
|
import { GeoPointField } from "../types/value/geoPoint.cjs";
|
|
9
10
|
import { ImageField, ImageFieldImage } from "../types/value/image.cjs";
|
|
10
|
-
import { IntegrationField, IntegrationFieldData } from "../types/value/integration.cjs";
|
|
11
11
|
import { KeyTextField } from "../types/value/keyText.cjs";
|
|
12
12
|
import { LinkToMediaField } from "../types/value/linkToMedia.cjs";
|
|
13
13
|
import { LinkField } from "../types/value/link.cjs";
|
|
14
14
|
import { NumberField } from "../types/value/number.cjs";
|
|
15
|
+
import { RichTextField } from "../types/value/richText.cjs";
|
|
15
16
|
import { SelectField } from "../types/value/select.cjs";
|
|
16
17
|
import { TableField } from "../types/value/table.cjs";
|
|
17
18
|
import { TimestampField } from "../types/value/timestamp.cjs";
|
|
18
19
|
import { TitleField } from "../types/value/title.cjs";
|
|
19
20
|
import { AnyRegularField, Repeatable } from "../types/value/types.cjs";
|
|
20
|
-
import {
|
|
21
|
-
import { RichTextField } from "../types/value/richText.cjs";
|
|
21
|
+
import { IntegrationField, IntegrationFieldData } from "../types/value/integration.cjs";
|
|
22
22
|
|
|
23
23
|
//#region src/helpers/isFilled.d.ts
|
|
24
24
|
declare namespace isFilled_d_exports {
|
|
@@ -27,7 +27,8 @@ declare namespace isFilled_d_exports {
|
|
|
27
27
|
/**
|
|
28
28
|
* Determines if a rich text field is filled.
|
|
29
29
|
*
|
|
30
|
-
* @param field -
|
|
30
|
+
* @param field - rich text field to check.
|
|
31
|
+
*
|
|
31
32
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
32
33
|
*/
|
|
33
34
|
declare const richText: (field: RichTextField | null | undefined) => field is RichTextField<"filled">;
|
|
@@ -35,6 +36,7 @@ declare const richText: (field: RichTextField | null | undefined) => field is Ri
|
|
|
35
36
|
* Determines if a title field is filled.
|
|
36
37
|
*
|
|
37
38
|
* @param field - Title field to check.
|
|
39
|
+
*
|
|
38
40
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
39
41
|
*/
|
|
40
42
|
declare const title: (field: TitleField | null | undefined) => field is TitleField<"filled">;
|
|
@@ -42,6 +44,7 @@ declare const title: (field: TitleField | null | undefined) => field is TitleFie
|
|
|
42
44
|
* Determines if an image thumbnail is filled.
|
|
43
45
|
*
|
|
44
46
|
* @param thumbnail - Image thumbnail to check.
|
|
47
|
+
*
|
|
45
48
|
* @returns `true` if the thumbnail is filled, `false` otherwise.
|
|
46
49
|
*/
|
|
47
50
|
declare const imageThumbnail: (thumbnail: ImageFieldImage | null | undefined) => thumbnail is ImageFieldImage<"filled">;
|
|
@@ -49,6 +52,7 @@ declare const imageThumbnail: (thumbnail: ImageFieldImage | null | undefined) =>
|
|
|
49
52
|
* Determines if an image field is filled.
|
|
50
53
|
*
|
|
51
54
|
* @param field - Image field to check.
|
|
55
|
+
*
|
|
52
56
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
53
57
|
*/
|
|
54
58
|
declare const image: <ThumbnailNames extends string | null = never>(field: ImageField<ThumbnailNames> | null | undefined) => field is ImageField<ThumbnailNames, "filled">;
|
|
@@ -56,6 +60,7 @@ declare const image: <ThumbnailNames extends string | null = never>(field: Image
|
|
|
56
60
|
* Determines if a link field is filled.
|
|
57
61
|
*
|
|
58
62
|
* @param field - Link field to check.
|
|
63
|
+
*
|
|
59
64
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
60
65
|
*/
|
|
61
66
|
declare const link: <TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown>(field: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined) => field is LinkField<TypeEnum, LangEnum, DataInterface, "filled">;
|
|
@@ -63,6 +68,7 @@ declare const link: <TypeEnum = string, LangEnum = string, DataInterface extends
|
|
|
63
68
|
* Determines if a link to media field is filled.
|
|
64
69
|
*
|
|
65
70
|
* @param field - Link to media field to check.
|
|
71
|
+
*
|
|
66
72
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
67
73
|
*/
|
|
68
74
|
declare const linkToMedia: (field: LinkToMediaField | null | undefined) => field is LinkToMediaField<"filled">;
|
|
@@ -70,6 +76,7 @@ declare const linkToMedia: (field: LinkToMediaField | null | undefined) => field
|
|
|
70
76
|
* Determines if a content relationship field is filled.
|
|
71
77
|
*
|
|
72
78
|
* @param field - Content relationship field to check.
|
|
79
|
+
*
|
|
73
80
|
* @returns `true` if the field is filled, `false` otherwise.
|
|
74
81
|
*/
|
|
75
82
|
declare const contentRelationship: <Field extends ContentRelationshipField>(field: Field | null | undefined) => field is Exclude<Field, EmptyContentRelationshipField>;
|
|
@@ -77,6 +84,7 @@ declare const contentRelationship: <Field extends ContentRelationshipField>(fiel
|
|
|
77
84
|
* Determines if a date field is filled.
|
|
78
85
|
*
|
|
79
86
|
* @param field - Date field to check.
|
|
87
|
+
*
|
|
80
88
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
81
89
|
*/
|
|
82
90
|
declare const date: (field: DateField | null | undefined) => field is DateField<"filled">;
|
|
@@ -84,6 +92,7 @@ declare const date: (field: DateField | null | undefined) => field is DateField<
|
|
|
84
92
|
* Determines if a timestamp field is filled.
|
|
85
93
|
*
|
|
86
94
|
* @param field - Timestamp field to check.
|
|
95
|
+
*
|
|
87
96
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
88
97
|
*/
|
|
89
98
|
declare const timestamp: (field: TimestampField | null | undefined) => field is TimestampField<"filled">;
|
|
@@ -91,6 +100,7 @@ declare const timestamp: (field: TimestampField | null | undefined) => field is
|
|
|
91
100
|
* Determines if a color field is filled.
|
|
92
101
|
*
|
|
93
102
|
* @param field - Color field to check.
|
|
103
|
+
*
|
|
94
104
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
95
105
|
*/
|
|
96
106
|
declare const color: (field: ColorField | null | undefined) => field is ColorField<"filled">;
|
|
@@ -98,6 +108,7 @@ declare const color: (field: ColorField | null | undefined) => field is ColorFie
|
|
|
98
108
|
* Determines if a number field is filled.
|
|
99
109
|
*
|
|
100
110
|
* @param field - Number field to check.
|
|
111
|
+
*
|
|
101
112
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
102
113
|
*/
|
|
103
114
|
declare const number: (field: NumberField | null | undefined) => field is NumberField<"filled">;
|
|
@@ -105,6 +116,7 @@ declare const number: (field: NumberField | null | undefined) => field is Number
|
|
|
105
116
|
* Determines if a key text field is filled.
|
|
106
117
|
*
|
|
107
118
|
* @param field - Key text field to check.
|
|
119
|
+
*
|
|
108
120
|
* @returns `true` if the field is filled, `false` otherwise.
|
|
109
121
|
*/
|
|
110
122
|
declare const keyText: (field: KeyTextField | null | undefined) => field is KeyTextField<"filled">;
|
|
@@ -112,6 +124,7 @@ declare const keyText: (field: KeyTextField | null | undefined) => field is KeyT
|
|
|
112
124
|
* Determines if a select field is filled.
|
|
113
125
|
*
|
|
114
126
|
* @param field - Select field to check.
|
|
127
|
+
*
|
|
115
128
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
116
129
|
*/
|
|
117
130
|
declare const select: <Enum extends string>(field: SelectField<Enum> | null | undefined) => field is SelectField<Enum, "filled">;
|
|
@@ -119,6 +132,7 @@ declare const select: <Enum extends string>(field: SelectField<Enum> | null | un
|
|
|
119
132
|
* Determines if an embed field is filled.
|
|
120
133
|
*
|
|
121
134
|
* @param field - Embed field to check.
|
|
135
|
+
*
|
|
122
136
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
123
137
|
*/
|
|
124
138
|
declare const embed: <Field extends EmbedField<AnyOEmbed>>(field: Field | null | undefined) => field is Extract<Field, EmbedField<AnyOEmbed, "filled">>;
|
|
@@ -126,6 +140,7 @@ declare const embed: <Field extends EmbedField<AnyOEmbed>>(field: Field | null |
|
|
|
126
140
|
* Determines if a geopoint field is filled.
|
|
127
141
|
*
|
|
128
142
|
* @param field - Geopoint field to check.
|
|
143
|
+
*
|
|
129
144
|
* @returns `true` if the field is filled, `false` otherwise.
|
|
130
145
|
*/
|
|
131
146
|
declare const geoPoint: (field: GeoPointField | null | undefined) => field is GeoPointField<"filled">;
|
|
@@ -133,6 +148,7 @@ declare const geoPoint: (field: GeoPointField | null | undefined) => field is Ge
|
|
|
133
148
|
* Determines if a table field is filled.
|
|
134
149
|
*
|
|
135
150
|
* @param field - Table field to check.
|
|
151
|
+
*
|
|
136
152
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
137
153
|
*/
|
|
138
154
|
declare const table: (field: TableField | null | undefined) => field is TableField<"filled">;
|
|
@@ -140,25 +156,32 @@ declare const table: (field: TableField | null | undefined) => field is TableFie
|
|
|
140
156
|
* Determines if an integration field is filled.
|
|
141
157
|
*
|
|
142
158
|
* @param field - Integration field to check.
|
|
159
|
+
*
|
|
143
160
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
144
161
|
*/
|
|
145
162
|
declare const integration: <Data extends IntegrationFieldData>(field: IntegrationField<Data> | null | undefined) => field is IntegrationField<Data, "filled">;
|
|
146
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* @deprecated Renamed to `integration`.
|
|
165
|
+
*/
|
|
147
166
|
declare const integrationField: <Data extends IntegrationFieldData>(field: IntegrationField<Data> | null | undefined) => field is IntegrationField<Data, "filled">;
|
|
148
|
-
/**
|
|
167
|
+
/**
|
|
168
|
+
* @deprecated Renamed to `integrationField`.
|
|
169
|
+
*/
|
|
149
170
|
declare const integrationFields: <Data extends IntegrationFieldData>(field: IntegrationField<Data> | null | undefined) => field is IntegrationField<Data, "filled">;
|
|
150
171
|
/**
|
|
151
172
|
* Determines if a repeatable field has at least one item.
|
|
152
173
|
*
|
|
153
174
|
* @param repeatable - Repeatable to check.
|
|
175
|
+
*
|
|
154
176
|
* @returns `true` if `repeatable` contains at least one item, `false`
|
|
155
|
-
*
|
|
177
|
+
* otherwise.
|
|
156
178
|
*/
|
|
157
179
|
declare const repeatable: <T extends LinkField>(repeatable: Repeatable<T> | null | undefined) => repeatable is Repeatable<T, "filled">;
|
|
158
180
|
/**
|
|
159
181
|
* Determines if a group has at least one item.
|
|
160
182
|
*
|
|
161
183
|
* @param group - Group to check.
|
|
184
|
+
*
|
|
162
185
|
* @returns `true` if the group contains at least one item, `false` otherwise.
|
|
163
186
|
*/
|
|
164
187
|
declare const group: <Fields extends Record<string, AnyRegularField | NestedGroupField>>(group: GroupField<Fields> | null | undefined) => group is GroupField<Fields, "filled">;
|
|
@@ -166,8 +189,9 @@ declare const group: <Fields extends Record<string, AnyRegularField | NestedGrou
|
|
|
166
189
|
* Determines if a slice zone has at least one slice.
|
|
167
190
|
*
|
|
168
191
|
* @param slices - Slice zone to check.
|
|
192
|
+
*
|
|
169
193
|
* @returns `true` if the slice zone contains at least one slice, `false`
|
|
170
|
-
*
|
|
194
|
+
* otherwise.
|
|
171
195
|
*/
|
|
172
196
|
declare const sliceZone: <Slices extends Slice | SharedSlice>(slices: SliceZone<Slices> | null | undefined) => slices is SliceZone<Slices, "filled">;
|
|
173
197
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isFilled.d.cts","names":[],"sources":["../../src/helpers/isFilled.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"isFilled.d.cts","names":[],"sources":["../../src/helpers/isFilled.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2Da,QAAA,GACZ,KAAA,EAAO,aAAA,wBACL,KAAA,IAAS,aAAA;;;;;;;;cAiBC,KAAA,GACZ,KAAA,EAAO,UAAA,wBACH,KAAA,IAAS,UAAA;;;;;;;;cASD,cAAA,GACZ,SAAA,EAAW,eAAA,wBACT,SAAA,IAAa,eAAA;;;;AAhChB;;;;cA2Ca,KAAA,iDAGZ,KAAA,EAAO,UAAA,CAAW,cAAA,yBACd,KAAA,IAAS,UAAA,CAAW,cAAA;;;;;;AA5BzB;;cAqCa,IAAA,+DAIT,MAAA,SAAe,eAAA,GAAkB,UAAA,GAAa,SAAA,uBAGjD,KAAA,EAAO,SAAA,CAAU,QAAA,EAAU,QAAA,EAAU,aAAA,yBACnC,KAAA,IAAS,SAAA,CAAU,QAAA,EAAU,QAAA,EAAU,aAAA;;;;;;;;cAW7B,WAAA,GACZ,KAAA,EAAO,gBAAA,wBACH,KAAA,IAAS,gBAAA;;;;;;;;cASD,mBAAA,iBACE,wBAAA,EAEd,KAAA,EAAO,KAAA,wBACH,KAAA,IAAS,OAAA,CAAQ,KAAA,EAAO,6BAAA;;AA/C7B;;;;;;cAwDa,IAAA,GACZ,KAAA,EAAO,SAAA,wBACH,KAAA,IAAS,SAAA;;;;;;;;cASD,SAAA,GACZ,KAAA,EAAO,cAAA,wBACH,KAAA,IAAS,cAAA;;;;AAxDd;;;;cAiEa,KAAA,GACZ,KAAA,EAAO,UAAA,wBACH,KAAA,IAAS,UAAA;;;;;;;;cASD,MAAA,GACZ,KAAA,EAAO,WAAA,wBACH,KAAA,IAAS,WAAA;;;;;;;;cASD,OAAA,GACZ,KAAA,EAAO,YAAA,wBACL,KAAA,IAAS,YAAA;;;;;;;;cAWC,MAAA,wBACZ,KAAA,EAAO,WAAA,CAAY,IAAA,yBACf,KAAA,IAAS,WAAA,CAAY,IAAA;;;;;;;;cASb,KAAA,iBAAuB,UAAA,CAAW,SAAA,GAC9C,KAAA,EAAO,KAAA,wBACL,KAAA,IAAS,OAAA,CAAQ,KAAA,EAAO,UAAA,CAAW,SAAA;;;;;;;;cAWzB,QAAA,GACZ,KAAA,EAAO,aAAA,wBACL,KAAA,IAAS,aAAA;;AAhGZ;;;;;;cA2Ga,KAAA,GACZ,KAAA,EAAO,UAAA,wBACH,KAAA,IAAS,UAAA;;;;;;;;cASD,WAAA,gBAA4C,oBAAA,EACxD,KAAA,EAAO,gBAAA,CAAiB,IAAA,yBACpB,KAAA,IAAS,gBAAA,CAAiB,IAAA;;;;cAKlB,gBAAA,gBAP4C,oBAAA,EAAoB,KAAA,EACrE,gBAAA,CAAiB,IAAA,yBACpB,KAAA,IAAS,gBAAA,CAAiB,IAAA;;AA3G/B;;cAqHa,iBAAA,gBAZ4C,oBAAA,EAAoB,KAAA,EACrE,gBAAA,CAAiB,IAAA,yBACpB,KAAA,IAAS,gBAAA,CAAiB,IAAA;;;;;;;;AAhG/B;cAoHa,UAAA,aAAwB,SAAA,EACpC,UAAA,EAAY,UAAA,CAAW,CAAA,yBACrB,UAAA,IAAc,UAAA,CAAW,CAAA;;;;;;;;cAWf,KAAA,kBACG,MAAA,SAAe,eAAA,GAAkB,gBAAA,GAEhD,KAAA,EAAO,UAAA,CAAW,MAAA,yBAChB,KAAA,IAAS,UAAA,CAAW,MAAA;AA1HvB;;;;;;;;AAAA,cAsIa,SAAA,kBAA4B,KAAA,GAAQ,WAAA,EAChD,MAAA,EAAQ,SAAA,CAAU,MAAA,yBAChB,MAAA,IAAU,SAAA,CAAU,MAAA"}
|
|
@@ -5,20 +5,20 @@ import { Slice } from "../types/value/slice.js";
|
|
|
5
5
|
import { SliceZone } from "../types/value/sliceZone.js";
|
|
6
6
|
import { ContentRelationshipField, EmptyContentRelationshipField } from "../types/value/contentRelationship.js";
|
|
7
7
|
import { DateField } from "../types/value/date.js";
|
|
8
|
+
import { AnyOEmbed, EmbedField } from "../types/value/embed.js";
|
|
8
9
|
import { GeoPointField } from "../types/value/geoPoint.js";
|
|
9
10
|
import { ImageField, ImageFieldImage } from "../types/value/image.js";
|
|
10
|
-
import { IntegrationField, IntegrationFieldData } from "../types/value/integration.js";
|
|
11
11
|
import { KeyTextField } from "../types/value/keyText.js";
|
|
12
12
|
import { LinkToMediaField } from "../types/value/linkToMedia.js";
|
|
13
13
|
import { LinkField } from "../types/value/link.js";
|
|
14
14
|
import { NumberField } from "../types/value/number.js";
|
|
15
|
+
import { RichTextField } from "../types/value/richText.js";
|
|
15
16
|
import { SelectField } from "../types/value/select.js";
|
|
16
17
|
import { TableField } from "../types/value/table.js";
|
|
17
18
|
import { TimestampField } from "../types/value/timestamp.js";
|
|
18
19
|
import { TitleField } from "../types/value/title.js";
|
|
19
20
|
import { AnyRegularField, Repeatable } from "../types/value/types.js";
|
|
20
|
-
import {
|
|
21
|
-
import { RichTextField } from "../types/value/richText.js";
|
|
21
|
+
import { IntegrationField, IntegrationFieldData } from "../types/value/integration.js";
|
|
22
22
|
|
|
23
23
|
//#region src/helpers/isFilled.d.ts
|
|
24
24
|
declare namespace isFilled_d_exports {
|
|
@@ -27,7 +27,8 @@ declare namespace isFilled_d_exports {
|
|
|
27
27
|
/**
|
|
28
28
|
* Determines if a rich text field is filled.
|
|
29
29
|
*
|
|
30
|
-
* @param field -
|
|
30
|
+
* @param field - rich text field to check.
|
|
31
|
+
*
|
|
31
32
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
32
33
|
*/
|
|
33
34
|
declare const richText: (field: RichTextField | null | undefined) => field is RichTextField<"filled">;
|
|
@@ -35,6 +36,7 @@ declare const richText: (field: RichTextField | null | undefined) => field is Ri
|
|
|
35
36
|
* Determines if a title field is filled.
|
|
36
37
|
*
|
|
37
38
|
* @param field - Title field to check.
|
|
39
|
+
*
|
|
38
40
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
39
41
|
*/
|
|
40
42
|
declare const title: (field: TitleField | null | undefined) => field is TitleField<"filled">;
|
|
@@ -42,6 +44,7 @@ declare const title: (field: TitleField | null | undefined) => field is TitleFie
|
|
|
42
44
|
* Determines if an image thumbnail is filled.
|
|
43
45
|
*
|
|
44
46
|
* @param thumbnail - Image thumbnail to check.
|
|
47
|
+
*
|
|
45
48
|
* @returns `true` if the thumbnail is filled, `false` otherwise.
|
|
46
49
|
*/
|
|
47
50
|
declare const imageThumbnail: (thumbnail: ImageFieldImage | null | undefined) => thumbnail is ImageFieldImage<"filled">;
|
|
@@ -49,6 +52,7 @@ declare const imageThumbnail: (thumbnail: ImageFieldImage | null | undefined) =>
|
|
|
49
52
|
* Determines if an image field is filled.
|
|
50
53
|
*
|
|
51
54
|
* @param field - Image field to check.
|
|
55
|
+
*
|
|
52
56
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
53
57
|
*/
|
|
54
58
|
declare const image: <ThumbnailNames extends string | null = never>(field: ImageField<ThumbnailNames> | null | undefined) => field is ImageField<ThumbnailNames, "filled">;
|
|
@@ -56,6 +60,7 @@ declare const image: <ThumbnailNames extends string | null = never>(field: Image
|
|
|
56
60
|
* Determines if a link field is filled.
|
|
57
61
|
*
|
|
58
62
|
* @param field - Link field to check.
|
|
63
|
+
*
|
|
59
64
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
60
65
|
*/
|
|
61
66
|
declare const link: <TypeEnum = string, LangEnum = string, DataInterface extends Record<string, AnyRegularField | GroupField | SliceZone> | unknown = unknown>(field: LinkField<TypeEnum, LangEnum, DataInterface> | null | undefined) => field is LinkField<TypeEnum, LangEnum, DataInterface, "filled">;
|
|
@@ -63,6 +68,7 @@ declare const link: <TypeEnum = string, LangEnum = string, DataInterface extends
|
|
|
63
68
|
* Determines if a link to media field is filled.
|
|
64
69
|
*
|
|
65
70
|
* @param field - Link to media field to check.
|
|
71
|
+
*
|
|
66
72
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
67
73
|
*/
|
|
68
74
|
declare const linkToMedia: (field: LinkToMediaField | null | undefined) => field is LinkToMediaField<"filled">;
|
|
@@ -70,6 +76,7 @@ declare const linkToMedia: (field: LinkToMediaField | null | undefined) => field
|
|
|
70
76
|
* Determines if a content relationship field is filled.
|
|
71
77
|
*
|
|
72
78
|
* @param field - Content relationship field to check.
|
|
79
|
+
*
|
|
73
80
|
* @returns `true` if the field is filled, `false` otherwise.
|
|
74
81
|
*/
|
|
75
82
|
declare const contentRelationship: <Field extends ContentRelationshipField>(field: Field | null | undefined) => field is Exclude<Field, EmptyContentRelationshipField>;
|
|
@@ -77,6 +84,7 @@ declare const contentRelationship: <Field extends ContentRelationshipField>(fiel
|
|
|
77
84
|
* Determines if a date field is filled.
|
|
78
85
|
*
|
|
79
86
|
* @param field - Date field to check.
|
|
87
|
+
*
|
|
80
88
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
81
89
|
*/
|
|
82
90
|
declare const date: (field: DateField | null | undefined) => field is DateField<"filled">;
|
|
@@ -84,6 +92,7 @@ declare const date: (field: DateField | null | undefined) => field is DateField<
|
|
|
84
92
|
* Determines if a timestamp field is filled.
|
|
85
93
|
*
|
|
86
94
|
* @param field - Timestamp field to check.
|
|
95
|
+
*
|
|
87
96
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
88
97
|
*/
|
|
89
98
|
declare const timestamp: (field: TimestampField | null | undefined) => field is TimestampField<"filled">;
|
|
@@ -91,6 +100,7 @@ declare const timestamp: (field: TimestampField | null | undefined) => field is
|
|
|
91
100
|
* Determines if a color field is filled.
|
|
92
101
|
*
|
|
93
102
|
* @param field - Color field to check.
|
|
103
|
+
*
|
|
94
104
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
95
105
|
*/
|
|
96
106
|
declare const color: (field: ColorField | null | undefined) => field is ColorField<"filled">;
|
|
@@ -98,6 +108,7 @@ declare const color: (field: ColorField | null | undefined) => field is ColorFie
|
|
|
98
108
|
* Determines if a number field is filled.
|
|
99
109
|
*
|
|
100
110
|
* @param field - Number field to check.
|
|
111
|
+
*
|
|
101
112
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
102
113
|
*/
|
|
103
114
|
declare const number: (field: NumberField | null | undefined) => field is NumberField<"filled">;
|
|
@@ -105,6 +116,7 @@ declare const number: (field: NumberField | null | undefined) => field is Number
|
|
|
105
116
|
* Determines if a key text field is filled.
|
|
106
117
|
*
|
|
107
118
|
* @param field - Key text field to check.
|
|
119
|
+
*
|
|
108
120
|
* @returns `true` if the field is filled, `false` otherwise.
|
|
109
121
|
*/
|
|
110
122
|
declare const keyText: (field: KeyTextField | null | undefined) => field is KeyTextField<"filled">;
|
|
@@ -112,6 +124,7 @@ declare const keyText: (field: KeyTextField | null | undefined) => field is KeyT
|
|
|
112
124
|
* Determines if a select field is filled.
|
|
113
125
|
*
|
|
114
126
|
* @param field - Select field to check.
|
|
127
|
+
*
|
|
115
128
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
116
129
|
*/
|
|
117
130
|
declare const select: <Enum extends string>(field: SelectField<Enum> | null | undefined) => field is SelectField<Enum, "filled">;
|
|
@@ -119,6 +132,7 @@ declare const select: <Enum extends string>(field: SelectField<Enum> | null | un
|
|
|
119
132
|
* Determines if an embed field is filled.
|
|
120
133
|
*
|
|
121
134
|
* @param field - Embed field to check.
|
|
135
|
+
*
|
|
122
136
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
123
137
|
*/
|
|
124
138
|
declare const embed: <Field extends EmbedField<AnyOEmbed>>(field: Field | null | undefined) => field is Extract<Field, EmbedField<AnyOEmbed, "filled">>;
|
|
@@ -126,6 +140,7 @@ declare const embed: <Field extends EmbedField<AnyOEmbed>>(field: Field | null |
|
|
|
126
140
|
* Determines if a geopoint field is filled.
|
|
127
141
|
*
|
|
128
142
|
* @param field - Geopoint field to check.
|
|
143
|
+
*
|
|
129
144
|
* @returns `true` if the field is filled, `false` otherwise.
|
|
130
145
|
*/
|
|
131
146
|
declare const geoPoint: (field: GeoPointField | null | undefined) => field is GeoPointField<"filled">;
|
|
@@ -133,6 +148,7 @@ declare const geoPoint: (field: GeoPointField | null | undefined) => field is Ge
|
|
|
133
148
|
* Determines if a table field is filled.
|
|
134
149
|
*
|
|
135
150
|
* @param field - Table field to check.
|
|
151
|
+
*
|
|
136
152
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
137
153
|
*/
|
|
138
154
|
declare const table: (field: TableField | null | undefined) => field is TableField<"filled">;
|
|
@@ -140,25 +156,32 @@ declare const table: (field: TableField | null | undefined) => field is TableFie
|
|
|
140
156
|
* Determines if an integration field is filled.
|
|
141
157
|
*
|
|
142
158
|
* @param field - Integration field to check.
|
|
159
|
+
*
|
|
143
160
|
* @returns `true` if `field` is filled, `false` otherwise.
|
|
144
161
|
*/
|
|
145
162
|
declare const integration: <Data extends IntegrationFieldData>(field: IntegrationField<Data> | null | undefined) => field is IntegrationField<Data, "filled">;
|
|
146
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* @deprecated Renamed to `integration`.
|
|
165
|
+
*/
|
|
147
166
|
declare const integrationField: <Data extends IntegrationFieldData>(field: IntegrationField<Data> | null | undefined) => field is IntegrationField<Data, "filled">;
|
|
148
|
-
/**
|
|
167
|
+
/**
|
|
168
|
+
* @deprecated Renamed to `integrationField`.
|
|
169
|
+
*/
|
|
149
170
|
declare const integrationFields: <Data extends IntegrationFieldData>(field: IntegrationField<Data> | null | undefined) => field is IntegrationField<Data, "filled">;
|
|
150
171
|
/**
|
|
151
172
|
* Determines if a repeatable field has at least one item.
|
|
152
173
|
*
|
|
153
174
|
* @param repeatable - Repeatable to check.
|
|
175
|
+
*
|
|
154
176
|
* @returns `true` if `repeatable` contains at least one item, `false`
|
|
155
|
-
*
|
|
177
|
+
* otherwise.
|
|
156
178
|
*/
|
|
157
179
|
declare const repeatable: <T extends LinkField>(repeatable: Repeatable<T> | null | undefined) => repeatable is Repeatable<T, "filled">;
|
|
158
180
|
/**
|
|
159
181
|
* Determines if a group has at least one item.
|
|
160
182
|
*
|
|
161
183
|
* @param group - Group to check.
|
|
184
|
+
*
|
|
162
185
|
* @returns `true` if the group contains at least one item, `false` otherwise.
|
|
163
186
|
*/
|
|
164
187
|
declare const group: <Fields extends Record<string, AnyRegularField | NestedGroupField>>(group: GroupField<Fields> | null | undefined) => group is GroupField<Fields, "filled">;
|
|
@@ -166,8 +189,9 @@ declare const group: <Fields extends Record<string, AnyRegularField | NestedGrou
|
|
|
166
189
|
* Determines if a slice zone has at least one slice.
|
|
167
190
|
*
|
|
168
191
|
* @param slices - Slice zone to check.
|
|
192
|
+
*
|
|
169
193
|
* @returns `true` if the slice zone contains at least one slice, `false`
|
|
170
|
-
*
|
|
194
|
+
* otherwise.
|
|
171
195
|
*/
|
|
172
196
|
declare const sliceZone: <Slices extends Slice | SharedSlice>(slices: SliceZone<Slices> | null | undefined) => slices is SliceZone<Slices, "filled">;
|
|
173
197
|
//#endregion
|