Skip to content

feat(client): batch read methods for signed URLs, versions, metadata and folders - #42

Merged
ABujalance merged 1 commit into
mainfrom
feat/batch-storage-endpoints
Aug 22, 2026
Merged

feat(client): batch read methods for signed URLs, versions, metadata and folders#42
ABujalance merged 1 commit into
mainfrom
feat/batch-storage-endpoints

Conversation

@ABujalance

Copy link
Copy Markdown
Contributor

Summary

Client methods for the new storage batch endpoints. Pairs with platform_backend-api#352, which has the background: throttling is per endpoint per user, so a client that resolves one id per request runs into 429s well before it is doing anything abusive. Tile-based viewers and the models list panel both hit that today.

Changes

New methods on EngineServicesClient:

  • getHiddenFileSignedUrlsBatch(hiddenIds, expiresIn?) — the one splat and point-cloud viewers should use instead of getHiddenFileSignedUrl per tile.
  • listVersionsBatch(itemIds, { archived? }) — the returned records carry their metadata, so a list that only needs metadata does not need a second call.
  • getFileVersionMetadataBatch(entries, { withDraft? }){ itemId, versionTag } pairs.
  • getFoldersBatch(folderIds) — for a known set of ids; listFolders({ projectId }) still covers the whole tree.

Shared behaviour:

  • Inputs longer than STORAGE_BATCH_MAX (100) are split into several requests automatically, so callers never have to think about the ceiling.
  • Entries come back in request order; an id the caller cannot read carries an error instead of data.
  • An empty input returns [] without touching the network.

Also adds src/types/batch.ts (mirrors the backend types), a batch-reads.ts example, and a changeset.

Related

  • platform_backend-api#352 — the endpoints. This needs those deployed before the methods work.

@ABujalance
ABujalance merged commit 3d53d8e into main Aug 22, 2026
1 check passed
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.

1 participant