@@ -140,41 +140,114 @@ class GeneratePasswordResponse(BaseModel):
140140 """
141141
142142
143- class GroupAccess (BaseModel ):
143+ class GroupType (str , Enum ):
144+ OWNERS = "owners"
145+ """
146+ The owners group, which gives the following permissions:
147+ - Do everything the Admin group can do
148+ - See every vault other than the personal vaults
149+ - Change people's names
150+ - See billing
151+ - Change billing
152+ - Make other people owners
153+ - Delete a person
154+ """
155+ ADMINISTRATORS = "administrators"
156+ """
157+ The administrators group, which gives the following permissions:
158+ - Perform recovery
159+ - Create new vaults
160+ - Invite new members
161+ - See vault metadata, including the vault name and who has access.
162+ - Make other people admins
163+ """
164+ RECOVERY = "recovery"
165+ """
166+ The recovery group. It contains recovery keysets, and is added to every vault to allow for recovery.
167+
168+ No one is added to this.
169+ """
170+ EXTERNALACCOUNTMANAGERS = "externalAccountManagers"
171+ """
172+ The external account managers group or EAM is a mandatory group for managed accounts that has
173+ same permissions as the owners.
174+ """
175+ TEAMMEMBERS = "teamMembers"
176+ """
177+ Members of a team that a user is on.
144178 """
145- Represents a group's access to a 1Password vault.
146- This is used for granting permissions
179+ USERDEFINED = "userDefined"
147180 """
181+ A custom, user defined group.
182+ """
183+ UNSUPPORTED = "unsupported"
184+ """
185+ Support for new or renamed group types
186+ """
187+
148188
149- group_id : str
189+ class GroupState (str , Enum ):
190+ ACTIVE = "active"
150191 """
151- The group's ID
192+ This group is active
152193 """
153- permissions : int
194+ DELETED = "deleted"
195+ """
196+ This group has been deleted
197+ """
198+ UNSUPPORTED = "unsupported"
154199 """
155- The group's set of permissions for the vault
200+ This group is in an unknown state
156201 """
157202
158203
159- class GroupVaultAccess (BaseModel ):
204+ class VaultAccessorType (str , Enum ):
205+ USER = "user"
206+ GROUP = "group"
207+
208+
209+ class VaultAccess (BaseModel ):
160210 """
161- Represents a group's access to a 1Password vault .
211+ Represents the vault access information .
162212 """
163213
164- vault_id : str
214+ model_config = ConfigDict (populate_by_name = True )
215+
216+ vault_uuid : str = Field (alias = "vaultUuid" )
217+ """
218+ The vault's UUID.
219+ """
220+ accessor_type : VaultAccessorType = Field (alias = "accessorType" )
165221 """
166- The vault's ID
222+ The vault's accessor type.
167223 """
168- group_id : str
224+ accessor_uuid : str = Field ( alias = "accessorUuid" )
169225 """
170- The group 's ID
226+ The vault 's accessor UUID.
171227 """
172228 permissions : int
173229 """
174- The group's set of permissions for the vault
230+ The permissions granted to this vault
175231 """
176232
177233
234+ class Group (BaseModel ):
235+ model_config = ConfigDict (populate_by_name = True )
236+
237+ id : str
238+ title : str
239+ description : str
240+ group_type : GroupType = Field (alias = "groupType" )
241+ state : GroupState
242+ vault_access : Optional [List [VaultAccess ]] = Field (alias = "vaultAccess" , default = None )
243+
244+
245+ class GroupGetParams (BaseModel ):
246+ model_config = ConfigDict (populate_by_name = True )
247+
248+ vault_permissions : Optional [bool ] = Field (alias = "vaultPermissions" , default = None )
249+
250+
178251class ItemCategory (str , Enum ):
179252 LOGIN = "Login"
180253 SECURENOTE = "SecureNote"
@@ -1154,36 +1227,6 @@ class VaultType(str, Enum):
11541227 UNSUPPORTED = "unsupported"
11551228
11561229
1157- class VaultAccessorType (str , Enum ):
1158- USER = "user"
1159- GROUP = "group"
1160-
1161-
1162- class VaultAccess (BaseModel ):
1163- """
1164- Represents the vault access information.
1165- """
1166-
1167- model_config = ConfigDict (populate_by_name = True )
1168-
1169- vault_uuid : str = Field (alias = "vaultUuid" )
1170- """
1171- The vault's UUID.
1172- """
1173- accessor_type : VaultAccessorType = Field (alias = "accessorType" )
1174- """
1175- The vault's accessor type.
1176- """
1177- accessor_uuid : str = Field (alias = "accessorUuid" )
1178- """
1179- The vault's accessor UUID.
1180- """
1181- permissions : int
1182- """
1183- The permissions granted to this vault
1184- """
1185-
1186-
11871230class Vault (BaseModel ):
11881231 """
11891232 Represents regular vault information together with the vault's access information.
0 commit comments