mirror of
https://github.com/bitwarden/android.git
synced 2026-08-03 12:18:15 -05:00
PM-39902: feat: Add data field for updating a cipher with Blob encryption (#7198)
This commit is contained in:
@@ -93,6 +93,9 @@ data class CipherJsonRequest(
|
||||
@Contextual
|
||||
val archivedDate: Instant?,
|
||||
|
||||
@SerialName("data")
|
||||
val data: String?,
|
||||
|
||||
@SerialName("encryptedFor")
|
||||
val encryptedFor: String?,
|
||||
)
|
||||
|
||||
@@ -69,6 +69,9 @@ data class CipherWithIdJsonRequest(
|
||||
@SerialName("key")
|
||||
val key: String?,
|
||||
|
||||
@SerialName("data")
|
||||
val data: String?,
|
||||
|
||||
@SerialName("encryptedFor")
|
||||
val encryptedFor: String?,
|
||||
)
|
||||
@@ -96,5 +99,6 @@ fun CipherJsonRequest.toCipherWithIdJsonRequest(id: String): CipherWithIdJsonReq
|
||||
isFavorite = isFavorite,
|
||||
card = card,
|
||||
key = key,
|
||||
data = data,
|
||||
encryptedFor = encryptedFor,
|
||||
)
|
||||
|
||||
@@ -684,6 +684,7 @@ private const val CREATE_ATTACHMENT_SUCCESS_JSON = """
|
||||
"issueDate": "mockIssueDate-1",
|
||||
"expirationDate": "mockExpirationDate-1"
|
||||
},
|
||||
"data": "mockData-1",
|
||||
"encryptedFor": "mockEncryptedFor-1",
|
||||
"archivedDate": "2023-10-27T12:00:00.00Z"
|
||||
}
|
||||
@@ -853,6 +854,7 @@ private const val CREATE_RESTORE_UPDATE_CIPHER_SUCCESS_JSON = """
|
||||
"issueDate": "mockIssueDate-1",
|
||||
"expirationDate": "mockExpirationDate-1"
|
||||
},
|
||||
"data": "mockData-1",
|
||||
"encryptedFor": "mockEncryptedFor-1",
|
||||
"archivedDate": "2023-10-27T12:00:00.00Z"
|
||||
}
|
||||
@@ -1039,6 +1041,7 @@ private const val UPDATE_CIPHER_COLLECTION_SUCCESS_JSON = """
|
||||
"issueDate": "mockIssueDate-1",
|
||||
"expirationDate": "mockExpirationDate-1"
|
||||
},
|
||||
"data": "mockData-1",
|
||||
"encryptedFor": "mockEncryptedFor-1",
|
||||
"archivedDate": "2023-10-27T12:00:00.00Z"
|
||||
}
|
||||
|
||||
@@ -522,6 +522,7 @@ private const val SYNC_SUCCESS_JSON = """
|
||||
"expirationDate": "mockExpirationDate-1",
|
||||
},
|
||||
"encryptedFor": "mockEncryptedFor-1",
|
||||
"data": "mockData-1",
|
||||
"archivedDate": "2023-10-27T12:00:00.00Z"
|
||||
}
|
||||
],
|
||||
|
||||
@@ -35,6 +35,7 @@ fun createMockCipherJsonRequest(
|
||||
lastKnownRevisionDate: Instant? = Instant.parse("2023-10-27T12:00:00Z"),
|
||||
key: String? = "mockKey-$number",
|
||||
archivedDate: Instant? = Instant.parse("2023-10-27T12:00:00Z"),
|
||||
data: String? = "mockData-$number",
|
||||
encryptedFor: String? = "mockEncryptedFor-$number",
|
||||
): CipherJsonRequest =
|
||||
CipherJsonRequest(
|
||||
@@ -59,5 +60,6 @@ fun createMockCipherJsonRequest(
|
||||
lastKnownRevisionDate = lastKnownRevisionDate,
|
||||
key = key,
|
||||
archivedDate = archivedDate,
|
||||
data = data,
|
||||
encryptedFor = encryptedFor,
|
||||
)
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ fun createMockCipher(
|
||||
shouldViewPassword: Boolean = false,
|
||||
key: String? = "mockKey-$number",
|
||||
encryptedFor: String? = "mockEncryptedFor-$number",
|
||||
data: String? = null,
|
||||
data: String? = "mockData-$number",
|
||||
): SyncResponseJson.Cipher =
|
||||
SyncResponseJson.Cipher(
|
||||
id = id,
|
||||
|
||||
Reference in New Issue
Block a user