Skip to content

Commit 184567e

Browse files
Update core to version e1f91a18
1 parent 410d182 commit 184567e

File tree

12 files changed

+57
-17
lines changed

12 files changed

+57
-17
lines changed

example/example.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def main():
4444
print(error)
4545
# [developer-docs.sdk.python.validate-secret-reference]-end
4646

47-
vault_id= os.getenv("OP_VAULT_ID")
47+
vault_id = os.getenv("OP_VAULT_ID")
4848
if vault_id is None:
4949
raise Exception("OP_VAULT_ID environment variable is not set")
5050

@@ -95,7 +95,9 @@ async def main():
9595

9696
# [developer-docs.sdk.python.resolve-secret]-start
9797
# Retrieves a secret from 1Password. Takes a secret reference as input and returns the secret to which it points.
98-
value = await client.secrets.resolve(f"op://{created_item.vault_id}/{created_item.id}/username")
98+
value = await client.secrets.resolve(
99+
f"op://{created_item.vault_id}/{created_item.id}/username"
100+
)
99101
print(value)
100102
# [developer-docs.sdk.python.resolve-secret]-end
101103

src/onepassword/items.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
# Code generated by op-codegen - DO NO EDIT MANUALLY
22

33
from .core import _invoke, _invoke_sync
4-
from .iterator import SDKIterator
54
from typing import Optional, List
65
from pydantic import TypeAdapter
76
from .items_shares import ItemsShares
87
from .items_files import ItemsFiles
9-
from .types import Item, ItemCreateParams, ItemOverview
8+
from .types import Item, ItemCreateParams, ItemListFilter, ItemOverview
109

1110

1211
class Items:
@@ -113,21 +112,24 @@ async def archive(self, vault_id: str, item_id: str) -> None:
113112

114113
return None
115114

116-
async def list_all(self, vault_id: str) -> SDKIterator[ItemOverview]:
115+
async def list(self, vault_id: str, *filters: ItemListFilter) -> List[ItemOverview]:
117116
"""
118-
List all items
117+
List items based on filters.
119118
"""
120119
response = await _invoke(
121120
{
122121
"invocation": {
123122
"clientId": self.client_id,
124123
"parameters": {
125-
"name": "ItemsListAll",
126-
"parameters": {"vault_id": vault_id},
124+
"name": "ItemsList",
125+
"parameters": {
126+
"vault_id": vault_id,
127+
"filters": [o.model_dump(by_alias=True) for o in filters],
128+
},
127129
},
128130
}
129131
}
130132
)
131133

132134
response = TypeAdapter(List[ItemOverview]).validate_json(response)
133-
return SDKIterator(response)
135+
return response

src/onepassword/items_files.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Code generated by op-codegen - DO NO EDIT MANUALLY
22

33
from .core import _invoke, _invoke_sync
4-
from .iterator import SDKIterator
54
from typing import Optional, List
65
from pydantic import TypeAdapter
76
from .types import DocumentCreateParams, FileAttributes, FileCreateParams, Item

src/onepassword/items_shares.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Code generated by op-codegen - DO NO EDIT MANUALLY
22

33
from .core import _invoke, _invoke_sync
4-
from .iterator import SDKIterator
54
from typing import Optional, List
65
from pydantic import TypeAdapter
76
from .types import Item, ItemShareAccountPolicy, ItemShareParams, ValidRecipient
46 KB
Binary file not shown.
5.88 KB
Binary file not shown.
41.7 KB
Binary file not shown.
34.6 KB
Binary file not shown.
26 KB
Binary file not shown.

src/onepassword/secrets.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Code generated by op-codegen - DO NO EDIT MANUALLY
22

33
from .core import _invoke, _invoke_sync
4-
from .iterator import SDKIterator
54
from typing import Optional, List
65
from pydantic import TypeAdapter
76
from .types import GeneratePasswordResponse, PasswordRecipe, ResolveAllResponse

0 commit comments

Comments
 (0)