feat(web): clip ingestion endpoint for OpenClaw worker#1
Open
NewCoder3294 wants to merge 1 commit into
Open
Conversation
Adds POST /api/clips/ingest accepting multipart payloads from the camera detector (video + thumbnail + metadata), validating with zod, uploading to the clips and thumbnails Supabase Storage buckets, and inserting a row into the clips table. Bearer-auth gated by INGEST_SECRET. Pure parsing logic (extFromMime, buildStoragePaths, ingest schema) is factored into lib/ingest/parse.ts and unit-tested under vitest, which is introduced to apps/web for the first time. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /api/clips/ingestaccepting multipart payloads (video + thumbnail + metadata) from the OpenClaw camera detectorclips(private) andthumbnails(public) Supabase Storage buckets, inserts aclipsrow, attaches optional tagsINGEST_SECRETenv var (set in Vercel: Production / Preview / Development)apps/webfor the first time; 18 unit tests cover the pure parsing + path-building helpersWire contract (for the OpenClaw worker)
Test plan
pnpm typecheck— clean across all 3 packagespnpm test(apps/web) — 18/18 passing