BIT-2283: Add the unassigned ciphers API (#1326)

This commit is contained in:
David Perez
2024-05-01 10:59:32 -05:00
committed by Álison Fernandes
parent 25c7ed0835
commit 880d26e259
4 changed files with 22 additions and 0 deletions

View File

@@ -130,4 +130,10 @@ interface CiphersApi {
@Path("cipherId") cipherId: String,
@Path("attachmentId") attachmentId: String,
): Result<SyncResponseJson.Cipher.Attachment>
/**
* Indicates if the active user has unassigned ciphers.
*/
@GET("ciphers/has-unassigned-ciphers")
suspend fun hasUnassignedCiphers(): Result<Boolean>
}

View File

@@ -101,4 +101,9 @@ interface CiphersService {
cipherId: String,
attachmentId: String,
): Result<SyncResponseJson.Cipher.Attachment>
/**
* Returns a boolean indicating if the active user has unassigned ciphers.
*/
suspend fun hasUnassignedCiphers(): Result<Boolean>
}

View File

@@ -159,4 +159,7 @@ class CiphersServiceImpl(
cipherId = cipherId,
attachmentId = attachmentId,
)
override suspend fun hasUnassignedCiphers(): Result<Boolean> =
ciphersApi.hasUnassignedCiphers()
}