Skip to content

Commit b48725f

Browse files
Update core to version 6847242a
1 parent 44f99f2 commit b48725f

File tree

11 files changed

+56
-14
lines changed

11 files changed

+56
-14
lines changed

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
62.1 KB
Binary file not shown.
6.31 KB
Binary file not shown.
50.5 KB
Binary file not shown.
41.3 KB
Binary file not shown.
37.5 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

src/onepassword/types.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,21 @@ class ItemFile(BaseModel):
330330
"""
331331

332332

333+
class ItemState(str, Enum):
334+
"""
335+
Represents the state of an item in the SDK.
336+
"""
337+
338+
ACTIVE = "active"
339+
"""
340+
The item is active
341+
"""
342+
ARCHIVED = "archived"
343+
"""
344+
The item is archived meaning it's hidden from regular view and stored in the archive.
345+
"""
346+
347+
333348
class Item(BaseModel):
334349
"""
335350
Represents a 1Password item.
@@ -401,6 +416,10 @@ class Item(BaseModel):
401416
"""
402417
The time the item was updated at
403418
"""
419+
state: ItemState
420+
"""
421+
Indicates the state of the item
422+
"""
404423

405424

406425
class ItemCreateParams(BaseModel):
@@ -495,6 +514,10 @@ class ItemOverview(BaseModel):
495514
"""
496515
The time the item was updated at
497516
"""
517+
state: ItemState
518+
"""
519+
Indicates the state of the item
520+
"""
498521

499522

500523
class ItemShareDuration(str, Enum):
@@ -967,6 +990,27 @@ class VaultOverview(BaseModel):
967990
"""
968991

969992

993+
class ItemListFilterByStateInner(BaseModel):
994+
"""
995+
Generated type representing the anonymous struct variant `ByState` of the `ItemListFilter` Rust enum
996+
"""
997+
998+
active: bool
999+
archived: bool
1000+
1001+
1002+
class ItemListFilterTypes(str, Enum):
1003+
BY_STATE = "ByState"
1004+
1005+
1006+
class ItemListFilterByState(BaseModel):
1007+
type: Literal[ItemListFilterTypes.BY_STATE] = ItemListFilterTypes.BY_STATE
1008+
content: ItemListFilterByStateInner
1009+
1010+
1011+
ItemListFilter = ItemListFilterByState
1012+
1013+
9701014
class PasswordRecipeMemorableInner(BaseModel):
9711015
"""
9721016
Generated type representing the anonymous struct variant `Memorable` of the `PasswordRecipe` Rust enum

0 commit comments

Comments
 (0)