Skip to content

Add volume-scoped v2 drive link routes - #1

Draft
ClaudiuSchuster wants to merge 4 commits into
masterfrom
oss-oo/gopa-v2-volume-routes-16trayproton
Draft

ClaudiuSchuster wants to merge 4 commits into
masterfrom
oss-oo/gopa-v2-volume-routes-16trayproton

Conversation

@ClaudiuSchuster

Copy link
Copy Markdown
Member

Proton has deprecated the share-scoped /drive/shares/{shareId}/links*, folders* and files* routes (removal announced within ~12 months, see the rclone forum notice).

This adds the volume-scoped v2 replacements alongside the untouched v1 client:

  • ID-based children listings with More/AnchorID anchor pagination and FoldersOnly support
  • Batched metadata fetching via POST /drive/v2/volumes/{volumeID}/links (100 IDs per request, matching the official SDK)
  • Draft file/folder/revision creation, revision list/detail/commit/delete
  • Move, checkAvailableHashes, volume trash and draft deletion (volume delete_multiple, per the official SDK's deleteDraft)
  • VolumeLinkDetails wire types converting v2 renames (NameHash, MediaType, RevisionID/EncryptedSize) into the existing Link model
  • BlockUploadReq.VolumeID replacing the deprecated ShareID field
  • Unit tests against httptest stubs (pagination, batching, state filtering, 422/409 error mapping); full existing suite still green

Reference contract: ProtonDriveApps/sdk client/js/src/internal/apiService/driveTypes.ts.
Full engineering reference: docs/PROTON_API_V2_MIGRATION.md in oss-singularity/proton-drive-linux.

Upstream contribution to rclone/go-proton-api is planned after live validation.

Proton has deprecated the share-scoped /drive/shares/{shareID}/links*,
folders* and files* routes. Add the volume-scoped v2 replacements:
ID-based children listings with anchor pagination, batched metadata
fetching, draft file/folder/revision creation, revision handling, move,
checkAvailableHashes and volume trash operations. Draft deletion uses
the volume delete_multiple route the official Proton Drive SDK uses for
drafts, not the trashed-node route. The v2 wire types convert into the
existing Link model so callers keep their link handling.
Field-compatible v1 request structs are reused.
The /drive/blocks request accepts VolumeID as the replacement for the
deprecated ShareID field. Send VolumeID when set and keep ShareID for
callers that have not migrated.
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