[PR #7014] [MERGED] PM-38280: Fix: Update collection API to V2 #120958

Closed
opened 2026-06-09 19:26:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/7014
Author: @david-livefront
Created: 6/3/2026
Status: Merged
Merged: 6/4/2026
Merged by: @david-livefront

Base: mainHead: PM-38280-collections-api-v2


📝 Commits (1)

  • 982d56b PM-38280: Update collection API to V2

📊 Changes

11 files changed (+254 additions, -83 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CipherManager.kt (+0 -1)
📝 app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CipherManagerImpl.kt (+12 -12)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModel.kt (+0 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt (+2 -1)
📝 app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CipherManagerTest.kt (+41 -54)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt (+0 -2)
📝 network/src/main/kotlin/com/bitwarden/network/api/CiphersApi.kt (+3 -2)
network/src/main/kotlin/com/bitwarden/network/model/UpdateCipherCollectionsResponseJson.kt (+15 -0)
📝 network/src/main/kotlin/com/bitwarden/network/service/CiphersService.kt (+2 -1)
📝 network/src/main/kotlin/com/bitwarden/network/service/CiphersServiceImpl.kt (+2 -1)
📝 network/src/test/kotlin/com/bitwarden/network/service/CiphersServiceTest.kt (+177 -8)

📄 Description

🎟️ Tracking

PM-38280

📔 Objective

This PR migrates the collections update call from the legacy PUT /ciphers/{id}/collections endpoint to PUT /ciphers/{id}/collections_v2.

The _v2 endpoint returns the updated cipher and an unavailable flag. If the cipher is null, the user has lost access to the item and the cipher is removed from storage; otherwise the returned cipher is stored locally.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/7014 **Author:** [@david-livefront](https://github.com/david-livefront) **Created:** 6/3/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@david-livefront](https://github.com/david-livefront) **Base:** `main` ← **Head:** `PM-38280-collections-api-v2` --- ### 📝 Commits (1) - [`982d56b`](https://github.com/bitwarden/android/commit/982d56b4298dfd225e0255ff3a7648d8352abbfd) PM-38280: Update collection API to V2 ### 📊 Changes **11 files changed** (+254 additions, -83 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CipherManager.kt` (+0 -1) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/data/vault/manager/CipherManagerImpl.kt` (+12 -12) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModel.kt` (+0 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt` (+2 -1) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/CipherManagerTest.kt` (+41 -54) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/movetoorganization/VaultMoveToOrganizationViewModelTest.kt` (+0 -2) 📝 `network/src/main/kotlin/com/bitwarden/network/api/CiphersApi.kt` (+3 -2) ➕ `network/src/main/kotlin/com/bitwarden/network/model/UpdateCipherCollectionsResponseJson.kt` (+15 -0) 📝 `network/src/main/kotlin/com/bitwarden/network/service/CiphersService.kt` (+2 -1) 📝 `network/src/main/kotlin/com/bitwarden/network/service/CiphersServiceImpl.kt` (+2 -1) 📝 `network/src/test/kotlin/com/bitwarden/network/service/CiphersServiceTest.kt` (+177 -8) </details> ### 📄 Description ## 🎟️ Tracking [PM-38280](https://bitwarden.atlassian.net/browse/PM-38280) ## 📔 Objective This PR migrates the collections update call from the legacy `PUT /ciphers/{id}/collections` endpoint to `PUT /ciphers/{id}/collections_v2`. The _v2 endpoint returns the updated cipher and an unavailable flag. If the cipher is null, the user has lost access to the item and the cipher is removed from storage; otherwise the returned cipher is stored locally. [PM-38280]: https://bitwarden.atlassian.net/browse/PM-38280?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-06-09 19:26:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#120958