Expose the per-file Downloads API (/v1/downloads) in the SDK
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 66/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- openapi, typescript
- Ambito
- api, backend-api-design
Direzione di ricerca
Individua la specifica OpenAPI e confronta la risorsa sessions.downloads esistente con api.md negli SDK Python e Node. Aggiungi le operazioni documentate di elenco, recupero ed eliminazione per /v1/downloads e aggiorna la descrizione dei download della sessione per identificare la risposta ZIP. Il lavoro è completato quando entrambi gli SDK espongono la risorsa downloads generata e l'endpoint della sessione documenta la restituzione dell'archivio.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What exists today
The only way to retrieve downloaded files through the SDK is client.sessions.downloads.list(id). It calls GET /v1/sessions/{id}/downloads with Accept: application/zip and hands back the raw response (BinaryAPIResponse in Python, Response in Node): a zip archive containing every file the session downloaded. Nothing in the method's description says so. The generated docstring is just "Session Downloads", so the first hint that you are holding a zip is the response body.
What's missing
Browserbase documents a per-file Downloads API that is not in the SDK at all. Neither SDK has a downloads resource, and api.md in each lists only the zip endpoint and sessions.recording.downloads. The documented endpoints:
GET /v1/downloads?sessionId=<id>lists individual downloads withid,sessionId,filename,mimeType,size,checksum(SHA-256, hex) andcreatedAt, plustotal/limit/offsetfor pagination. Optional filters:filename,mimeType,minSize,maxSize,createdAfter,createdBefore,limit(default 20, max 100),offset.
https://docs.browserbase.com/reference/api/list-downloadsGET /v1/downloads/{downloadId}returns the metadata above withAccept: application/json, or the file bytes withAccept: application/octet-stream.
https://docs.browserbase.com/reference/api/get-downloadDELETE /v1/downloads/{downloadId}deletes one download and returns 204.
https://docs.browserbase.com/reference/api/delete-download
Feature overview: https://docs.browserbase.com/features/downloads
Why it matters
- Per-file access with
mimeTypeand size filters and pagination, instead of one opaque archive per session. - No zip round-trip when you want a single file: fetch it by id and you are done.
- A caller can gate on one body's magic bytes, or compare
size/checksumfrom the listing, before doing anything with the file.
Our integration ended up dropping the SDK for these calls and using raw httpx against /v1/downloads for exactly these reasons. The client's get() plus make_request_options() covers the gap in the meantime, but it means hand-writing the types the generator would otherwise produce.
Ask
- Add the three
/v1/downloadsendpoints to the OpenAPI spec so they generate into both the Python and Node SDKs as adownloadsresource (list,retrieve,delete). - While there, give
GET /v1/sessions/{id}/downloadsa description that says it returns a zip archive of all files downloaded during the session, sosessions.downloads.list()documents its return type.
- Lingua principale
- TypeScript
- Stelle
- 64
- Fork
- 17
- Merge medio
- 13m
- PR unite (30g)
- 4
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di browserbase/sdk-node
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
browserbase/sdk-node#202 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
browserbase/sdk-node#197 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
browserbase/sdk-node#193 ·
-
[Bug] contexts.delete() fails with 400 — same Content-Type issue as extensions.delete() (#169) Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
browserbase/sdk-node#180 ·
-
SessionCreateParams.api_timeout is the only snake_case param in the SDK — should be apiTimeout Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
browserbase/sdk-node#214 ·
Tutte le issue di browserbase/sdk-node
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
ontola/atomic-server#1625 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
melgarafael/DeskcommCRM#1451 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
bug via-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bot:ai-assisted component:compact-js status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
midnightntwrk/midnight-sdk#403 ·