Skip to content

Commit 096aca2

Browse files
Update core to version 48363fb1
1 parent 031af57 commit 096aca2

File tree

7 files changed

+36
-2
lines changed

7 files changed

+36
-2
lines changed

example/example.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ async def main():
6969
ItemSection(id="", title=""),
7070
ItemSection(id="totpsection", title=""),
7171
],
72-
tags=["test tag 1", "test tag 2"]
72+
tags=["test tag 1", "test tag 2"],
7373
)
7474
created_item = await client.items.create(to_create)
7575
# [developer-docs.sdk.python.create-item]-end
@@ -78,7 +78,9 @@ async def main():
7878

7979
# [developer-docs.sdk.python.resolve-totp-code]-start
8080
# Retrieves a secret from 1Password. Takes a secret reference as input and returns the secret to which it points.
81-
code = await client.secrets.resolve(f"op://{created_item.vault_id}/{created_item.id}/TOTP_onetimepassword?attribute=totp")
81+
code = await client.secrets.resolve(
82+
f"op://{created_item.vault_id}/{created_item.id}/TOTP_onetimepassword?attribute=totp"
83+
)
8284
print(code)
8385
# [developer-docs.sdk.python.resolve-totp-code]-end
8486

-9.6 MB
Binary file not shown.
84.3 KB
Binary file not shown.
-10.1 MB
Binary file not shown.
59.5 KB
Binary file not shown.
23.5 KB
Binary file not shown.

src/onepassword/types.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,26 @@ class ItemSection(BaseModel):
9999
"""
100100

101101

102+
AutofillBehavior = Literal["AnywhereOnWebsite", "ExactDomain", "Never"]
103+
104+
105+
class Website(BaseModel):
106+
url: str
107+
"""
108+
The website URL
109+
"""
110+
label: str
111+
"""
112+
The label of the website, e.g. 'website', 'sign-in address'
113+
"""
114+
autofill_behavior: AutofillBehavior
115+
"""
116+
The auto-fill behavior of the website
117+
118+
For more information, visit https://support.1password.com/autofill-behavior/
119+
"""
120+
121+
102122
class Item(BaseModel):
103123
"""
104124
Represents a 1Password item.
@@ -134,6 +154,10 @@ class Item(BaseModel):
134154
"""
135155
The item's tags
136156
"""
157+
websites: List[Website]
158+
"""
159+
The websites used for autofilling for items of the Login and Password categories.
160+
"""
137161
version: int
138162
"""
139163
The item's version
@@ -167,6 +191,10 @@ class ItemCreateParams(BaseModel):
167191
"""
168192
The item's tags
169193
"""
194+
websites: Optional[List[Website]] = None
195+
"""
196+
The websites used for autofilling for items of the Login and Password categories.
197+
"""
170198

171199

172200
class ItemOverview(BaseModel):
@@ -192,6 +220,10 @@ class ItemOverview(BaseModel):
192220
"""
193221
The ID of the vault where the item is saved
194222
"""
223+
websites: List[Website]
224+
"""
225+
The websites used for autofilling for items of the Login and Password categories.
226+
"""
195227

196228

197229
class OtpFieldDetails(BaseModel):

0 commit comments

Comments
 (0)