Skip to content

feat: add coverMetadataRef content type#513

Merged
shark0der merged 1 commit into
devfrom
feat/cover-metadata-ref-content-type
May 21, 2026
Merged

feat: add coverMetadataRef content type#513
shark0der merged 1 commit into
devfrom
feat/cover-metadata-ref-content-type

Conversation

@valentinludu

@valentinludu valentinludu commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new ContentType.coverMetadataRef for IPFS uploads used by the cover metadata feature. This allows db-api to upload a reference document ({ version: '1.0', coverMetadata: <uuid> }) to IPFS via the safe-ipfs-proxy.

  • New Zod schema coverMetadataRefSchema in src/ipfs/schemas.ts
  • New ContentType.coverMetadataRef enum value and CoverMetadataRef type in src/types/ipfs.ts
  • Validation case added in src/ipfs/Ipfs.ts

Summary by CodeRabbit

  • New Features
    • Added support for a new IPFS content type to expand available content options.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 14, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cbb50ca0-6c53-43ed-9db3-9d98de9ba8cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces a new IPFS content type coverMetadataRef consisting of a version identifier and a UUID reference to cover metadata. The schema, type definitions, and enum extensions are added across types and schemas modules, then integrated into the IPFS content validator to parse and validate the new content type.

Changes

Add coverMetadataRef IPFS Content Type

Layer / File(s) Summary
Schema and Type Definitions
src/ipfs/schemas.ts, src/types/ipfs.ts
coverMetadataRefSchema defines the object structure with version fixed to 1.0 and coverMetadata as a UUID. ContentType.coverMetadataRef enum member is added and CoverMetadataRef type is inferred from the schema. IPFSContentTypes union and IPFSTypeContentTuple are extended to include the new type variant.
IPFS Content Validation
src/ipfs/Ipfs.ts
validateIPFSContent switch statement gains a new branch for ContentType.coverMetadataRef that parses provided content via coverMetadataRefSchema.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add coverMetadataRef content type' accurately and concisely summarizes the main change: introducing a new IPFS content type for cover metadata references.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cover-metadata-ref-content-type
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/cover-metadata-ref-content-type

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 14, 2026

Copy link
Copy Markdown

Deploying sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: b0826e5
Status: ✅  Deploy successful!
Preview URL: https://8ca75c4e.sdk-9yp.pages.dev
Branch Preview URL: https://feat-cover-metadata-ref-cont.sdk-9yp.pages.dev

View logs

@valentinludu valentinludu requested a review from mixplore May 14, 2026 12:27
@shark0der shark0der force-pushed the feat/cover-metadata-ref-content-type branch from d749cc7 to b0826e5 Compare May 21, 2026 09:19
@shark0der shark0der merged commit bc86dc1 into dev May 21, 2026
3 checks passed
@shark0der shark0der deleted the feat/cover-metadata-ref-content-type branch May 21, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants