Skip to content

Conversation

@tomholford
Copy link

@tomholford tomholford commented Jan 7, 2026

Summary

Add ClientUID field to Drive API types per official Proton Drive OpenAPI spec.

This is a step towards resolving henrybear327/Proton-API-Bridge#16

Changes

  • CreateFileReq.ClientUID: identifies which client created a file draft
  • CheckAvailableHashesReq.ClientUID: filters pending drafts by client UIDs
  • CheckAvailableHashesRes / PendingHashData: returns draft ownership info

Why

Enables clients to:

  • Safely auto-replace their own failed upload drafts
  • Avoid overwriting concurrent uploads from other clients

This is critical for reliable file uploads - when an upload fails partway through, it leaves an orphaned draft. Without ClientUID, clients cannot distinguish between:

  • Their own failed drafts (safe to replace)
  • Another client's active upload (should NOT replace)

Reference

These types match the official ProtonDriveApps/sdk driveTypes.ts which is auto-generated from the Proton Drive OpenAPI spec:

// From sdk/js/sdk/src/internal/apiService/driveTypes.ts
CreateFileDto: {
    ClientUID: string | null;  // "Client unique ID. Useful for marking client's drafts..."
    // ...
}

CheckAvailableHashesRequestDto: {
    ClientUID: string[] | null;  // "Client UID list to filter pending drafts with..."
}

PendingHashResponseDto: {
    ClientUID?: string | null;
}

Add ClientUID field to Drive API types per official Proton Drive OpenAPI spec:

- CreateFileReq.ClientUID: identifies which client created a file draft
- CheckAvailableHashesReq.ClientUID: filters pending drafts by client UIDs
- CheckAvailableHashesRes/PendingHashData: returns draft ownership info

This enables clients to:
- Safely auto-replace their own failed upload drafts
- Avoid overwriting concurrent uploads from other clients

Reference: ProtonDriveApps/sdk driveTypes.ts (auto-generated from OpenAPI)
@tomholford tomholford marked this pull request as ready for review January 7, 2026 01:04
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