Skip to content

Commit 9b36021

Browse files
committed
Restore types
1 parent aa81fda commit 9b36021

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/onepassword/types.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,21 @@
22
Generated by typeshare 1.9.2
33
"""
44

5+
from __future__ import annotations
6+
57
from pydantic import BaseModel
68
from typing import List, Literal, Optional
79

810

11+
class Item(BaseModel):
12+
id: str
13+
title: str
14+
category: ItemCategory
15+
vault_id: str
16+
fields: List[ItemField]
17+
sections: List[ItemSection]
18+
19+
920
ItemCategory = Literal[
1021
"Login",
1122
"SecureNote",
@@ -34,9 +45,6 @@
3445
]
3546

3647

37-
ItemFieldType = Literal["Text", "Concealed", "Unsupported"]
38-
39-
4048
class ItemField(BaseModel):
4149
id: str
4250
title: str
@@ -45,15 +53,9 @@ class ItemField(BaseModel):
4553
value: str
4654

4755

48-
class ItemSection(BaseModel):
49-
id: str
50-
title: str
56+
ItemFieldType = Literal["Text", "Concealed", "Unsupported"]
5157

5258

53-
class Item(BaseModel):
59+
class ItemSection(BaseModel):
5460
id: str
5561
title: str
56-
category: ItemCategory
57-
vault_id: str
58-
fields: List[ItemField]
59-
sections: List[ItemSection]

0 commit comments

Comments
 (0)