vantage-python 0.4.0__tar.gz → 0.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vantage-python
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Python SDK for the Vantage API
5
5
  Project-URL: Homepage, https://github.com/vantage-sh/vantage-python
6
6
  Project-URL: Repository, https://github.com/vantage-sh/vantage-python
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "vantage-python"
7
- version = "0.4.0"
7
+ version = "0.5.0"
8
8
  description = "Python SDK for the Vantage API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1983,6 +1983,20 @@ class MeAsyncApi:
1983
1983
  return Me.model_validate(data)
1984
1984
  return data
1985
1985
 
1986
+ async def update(self, body: UpdateMe) -> Me:
1987
+ """
1988
+ Update authenticated user
1989
+
1990
+ Update the authenticated User.
1991
+ """
1992
+ path = "/v2/me"
1993
+ params = None
1994
+ body_data = body.model_dump(by_alias=True, exclude_none=True) if hasattr(body, 'model_dump') else body
1995
+ data = await self._client.request("PUT", path, params=params, body=body_data)
1996
+ if isinstance(data, dict):
1997
+ return Me.model_validate(data)
1998
+ return data
1999
+
1986
2000
 
1987
2001
  class NetworkFlowReportsAsyncApi:
1988
2002
  """Async API methods for network_flow_reports resource."""
@@ -2980,6 +2994,20 @@ class UsersAsyncApi:
2980
2994
  return User.model_validate(data)
2981
2995
  return data
2982
2996
 
2997
+ async def update(self, user_token: str, body: UpdateUser) -> User:
2998
+ """
2999
+ Update a user
3000
+
3001
+ Update a specific User.
3002
+ """
3003
+ path = f"/v2/users/{quote(str(user_token), safe='')}"
3004
+ params = None
3005
+ body_data = body.model_dump(by_alias=True, exclude_none=True) if hasattr(body, 'model_dump') else body
3006
+ data = await self._client.request("PUT", path, params=params, body=body_data)
3007
+ if isinstance(data, dict):
3008
+ return User.model_validate(data)
3009
+ return data
3010
+
2983
3011
 
2984
3012
  class VirtualTagConfigsAsyncApi:
2985
3013
  """Async API methods for virtual_tag_configs resource."""
@@ -1983,6 +1983,20 @@ class MeApi:
1983
1983
  return Me.model_validate(data)
1984
1984
  return data
1985
1985
 
1986
+ def update(self, body: UpdateMe) -> Me:
1987
+ """
1988
+ Update authenticated user
1989
+
1990
+ Update the authenticated User.
1991
+ """
1992
+ path = "/v2/me"
1993
+ params = None
1994
+ body_data = body.model_dump(by_alias=True, exclude_none=True) if hasattr(body, 'model_dump') else body
1995
+ data = self._client.request("PUT", path, params=params, body=body_data)
1996
+ if isinstance(data, dict):
1997
+ return Me.model_validate(data)
1998
+ return data
1999
+
1986
2000
 
1987
2001
  class NetworkFlowReportsApi:
1988
2002
  """API methods for network_flow_reports resource."""
@@ -2980,6 +2994,20 @@ class UsersApi:
2980
2994
  return User.model_validate(data)
2981
2995
  return data
2982
2996
 
2997
+ def update(self, user_token: str, body: UpdateUser) -> User:
2998
+ """
2999
+ Update a user
3000
+
3001
+ Update a specific User.
3002
+ """
3003
+ path = f"/v2/users/{quote(str(user_token), safe='')}"
3004
+ params = None
3005
+ body_data = body.model_dump(by_alias=True, exclude_none=True) if hasattr(body, 'model_dump') else body
3006
+ data = self._client.request("PUT", path, params=params, body=body_data)
3007
+ if isinstance(data, dict):
3008
+ return User.model_validate(data)
3009
+ return data
3010
+
2983
3011
 
2984
3012
  class VirtualTagConfigsApi:
2985
3013
  """API methods for virtual_tag_configs resource."""
@@ -1176,6 +1176,7 @@ class Me(BaseModel):
1176
1176
  """Me model"""
1177
1177
 
1178
1178
  default_workspace_token: Optional[str]
1179
+ default_dashboard_token: Optional[str] = Field(default=None, description="The token of the default Dashboard for the User.")
1179
1180
  workspaces: List[Workspace]
1180
1181
  bearer_token: BearerToken
1181
1182
 
@@ -1197,6 +1198,12 @@ class BearerToken(BaseModel):
1197
1198
  scope: List[str] = Field(description="The scopes applied to the BearerToken used to authenticate this request.")
1198
1199
 
1199
1200
 
1201
+ class UpdateMe(BaseModel):
1202
+ """Update the authenticated User."""
1203
+
1204
+ default_dashboard_token: Optional[str] = Field(default=None, description="The token of a Dashboard to set as the User default. Send null to clear.")
1205
+
1206
+
1200
1207
  class CostProviders(BaseModel):
1201
1208
  """CostProviders model"""
1202
1209
 
@@ -1672,6 +1679,7 @@ class Team(BaseModel):
1672
1679
  workspace_tokens: List[str] = Field(description="The tokens for any Workspaces that the Team belongs to")
1673
1680
  user_emails: List[str] = Field(description="The email addresses for Users that belong to the Team")
1674
1681
  user_tokens: List[str] = Field(description="The tokens for Users that belong to the Team")
1682
+ default_dashboard_token: Optional[str] = Field(description="The token of the default Dashboard for the Team.")
1675
1683
 
1676
1684
 
1677
1685
  class CreateTeam(BaseModel):
@@ -1683,6 +1691,7 @@ class CreateTeam(BaseModel):
1683
1691
  user_tokens: Optional[List[str]] = Field(default=None, description="The User tokens to associate to the Team.")
1684
1692
  user_emails: Optional[List[str]] = Field(default=None, description="The User emails to associate to the Team.")
1685
1693
  role: Optional[str] = Field(default=None, description="The role to assign to the provided Users. Defaults to 'editor' which has editor permissions.")
1694
+ default_dashboard_token: Optional[str] = Field(default=None, description="The token of a Dashboard to set as the Team default. Send null to clear.")
1686
1695
 
1687
1696
 
1688
1697
  class UpdateTeam(BaseModel):
@@ -1694,6 +1703,7 @@ class UpdateTeam(BaseModel):
1694
1703
  user_tokens: Optional[List[str]] = Field(default=None, description="The User tokens to associate to the Team.")
1695
1704
  user_emails: Optional[List[str]] = Field(default=None, description="The User emails to associate to the Team.")
1696
1705
  role: Optional[str] = Field(default=None, description="The role to assign to the provided Users. Defaults to 'editor' which has editor permissions.")
1706
+ default_dashboard_token: Optional[str] = Field(default=None, description="The token of a Dashboard to set as the Team default. Send null to clear.")
1697
1707
 
1698
1708
 
1699
1709
  class TeamMembers(BaseModel):
@@ -1760,9 +1770,16 @@ class User(BaseModel):
1760
1770
  name: Optional[str] = Field(description="The name of the User.")
1761
1771
  email: str = Field(description="The email of the User.")
1762
1772
  role: str = Field(description="The role of the User.")
1773
+ default_dashboard_token: Optional[str] = Field(default=None, description="The token of the default Dashboard for the User.")
1763
1774
  last_seen_at: Optional[str] = Field(default=None, description="The last time the User logged in.")
1764
1775
 
1765
1776
 
1777
+ class UpdateUser(BaseModel):
1778
+ """Update a specific User."""
1779
+
1780
+ default_dashboard_token: Optional[str] = Field(default=None, description="The token of a Dashboard to set as the User default. Send null to clear.")
1781
+
1782
+
1766
1783
  class VirtualTagConfigs(BaseModel):
1767
1784
  """VirtualTagConfigs model"""
1768
1785
 
@@ -1847,6 +1864,13 @@ class UpdateVirtualTagConfig(BaseModel):
1847
1864
  values: Optional[List[VirtualTagConfigValue]] = Field(default=None, description="Values for the VirtualTagConfig, with match precedence determined by order in the list.")
1848
1865
 
1849
1866
 
1867
+ class AsyncVirtualTagConfigUpdate(BaseModel):
1868
+ """AsyncVirtualTagConfigUpdate model"""
1869
+
1870
+ request_id: str = Field(description="The request ID of the async virtual tag config update.")
1871
+ status_url: str = Field(description="The status path of the async virtual tag config update.")
1872
+
1873
+
1850
1874
  class UpdateAsyncVirtualTagConfig(BaseModel):
1851
1875
  """Asynchronously updates an existing VirtualTagConfig."""
1852
1876
 
@@ -1857,13 +1881,6 @@ class UpdateAsyncVirtualTagConfig(BaseModel):
1857
1881
  values: Optional[List[VirtualTagConfigValue]] = Field(default=None, description="Values for the VirtualTagConfig, with match precedence determined by order in the list.")
1858
1882
 
1859
1883
 
1860
- class AsyncVirtualTagConfigUpdate(BaseModel):
1861
- """AsyncVirtualTagConfigUpdate model"""
1862
-
1863
- request_id: str = Field(description="The request ID of the async virtual tag config update.")
1864
- status_url: str = Field(description="The status path of the async virtual tag config update.")
1865
-
1866
-
1867
1884
  class Workspaces(BaseModel):
1868
1885
  """Workspaces model"""
1869
1886
 
File without changes
File without changes
File without changes