generated from bitwarden/template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
ExportJsonData.kt
45 lines (42 loc) · 1.19 KB
/
ExportJsonData.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.bitwarden.authenticator.data.authenticator.manager.model
import kotlinx.serialization.Serializable
/**
* Models exported authenticator data in JSON format.
*
* This model is loosely based off of Bitwarden's exported unencrypted vault data.
*/
@Serializable
data class ExportJsonData(
val encrypted: Boolean,
val items: List<ExportItem>,
) {
/**
* Represents a single exported authenticator item.
*
* This model is loosely based off of Bitwarden's exported Cipher JSON.
*/
@Serializable
data class ExportItem(
val id: String,
val name: String,
val folderId: String?,
val organizationId: String?,
val collectionIds: List<String>?,
val notes: String?,
val type: Int,
val login: ItemLoginData,
val favorite: Boolean,
) {
/**
* Represents the login specific data of an exported item.
*
* This model is loosely based off of Bitwarden's Cipher.Login JSON.
*
* @property totp OTP secret used to generate a verification code.
*/
@Serializable
data class ItemLoginData(
val totp: String,
)
}
}