Skip to content

Commit db375f3

Browse files
Update core to version f13f61ff
1 parent ef6be31 commit db375f3

File tree

6 files changed

+29
-1
lines changed

6 files changed

+29
-1
lines changed
656 KB
Binary file not shown.
697 KB
Binary file not shown.
743 KB
Binary file not shown.
786 KB
Binary file not shown.
652 KB
Binary file not shown.

src/onepassword/types.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ class ItemFieldType(str, Enum):
5858
TOTP = "Totp"
5959
EMAIL = "Email"
6060
REFERENCE = "Reference"
61+
SSHKEY = "SshKey"
6162
UNSUPPORTED = "Unsupported"
6263

6364

6465
class ItemFieldDetailsTypes(str, Enum):
6566
OTP = "Otp"
67+
SSH_KEY = "SshKey"
6668

6769

6870
class ItemFieldDetailsOtp(BaseModel):
@@ -74,8 +76,17 @@ class ItemFieldDetailsOtp(BaseModel):
7476
content: OtpFieldDetails
7577

7678

79+
class ItemFieldDetailsSshKey(BaseModel):
80+
"""
81+
Computed SSH Key attributes
82+
"""
83+
84+
type: Literal[ItemFieldDetailsTypes.SSH_KEY] = ItemFieldDetailsTypes.SSH_KEY
85+
content: Optional[SshKeyAttributes]
86+
87+
7788
# Field type-specific attributes.
78-
ItemFieldDetails = ItemFieldDetailsOtp
89+
ItemFieldDetails = Union[ItemFieldDetailsOtp, ItemFieldDetailsSshKey]
7990

8091

8192
class ItemField(BaseModel):
@@ -453,6 +464,23 @@ class OtpFieldDetails(BaseModel):
453464
"""
454465

455466

467+
class SshKeyAttributes(BaseModel):
468+
model_config = ConfigDict(populate_by_name=True)
469+
470+
public_key: str = Field(alias="publicKey")
471+
"""
472+
The public part of the SSH Key
473+
"""
474+
fingerprint: str
475+
"""
476+
The fingerprint of the SSH Key
477+
"""
478+
key_type: str = Field(alias="keyType")
479+
"""
480+
The key type ("Ed25519" or "RSA, {length}-bit")
481+
"""
482+
483+
456484
class VaultOverview(BaseModel):
457485
"""
458486
Represents a decrypted 1Password vault.

0 commit comments

Comments
 (0)