Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
736 changes: 572 additions & 164 deletions packages/generator/spec.json

Large diffs are not rendered by default.

1,105 changes: 961 additions & 144 deletions packages/miro-api-python/miro_api/api/__init__.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/miro-api-python/miro_api/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = "OpenAPI-Generator/2.2.3/python"
self.user_agent = "OpenAPI-Generator/2.2.4/python"
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
2 changes: 1 addition & 1 deletion packages/miro-api-python/miro_api/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ def to_debug_report(self):
"OS: {env}\n"
"Python Version: {pyversion}\n"
"Version of the API: v2.0\n"
"SDK Package Version: 2.2.3".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 2.2.4".format(env=sys.platform, pyversion=sys.version)
)

def get_host_settings(self):
Expand Down
6 changes: 4 additions & 2 deletions packages/miro-api-python/miro_api/models/board_changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ class BoardChanges(BaseModel):
)
policy: Optional[BoardPolicyChange] = None
team_id: Optional[StrictStr] = Field(
default=None, description="Unique identifier (ID) of the team where the board must be placed.", alias="teamId"
default=None,
description="Unique identifier (ID) of the team where the board must be placed. **Note**: On Enterprise plan, boards can be moved via API by Board Owners, Co-Owners, and Content Admins. This behavior differs from the Miro UI, where only Board Owners can move boards. This difference is **intentional** and works as designed. On non-Enterprise plans, only Board Owners can move boards between teams—both via the API and the Miro UI.",
alias="teamId",
)
project_id: Optional[StrictStr] = Field(
default=None,
description="Unique identifier (ID) of the project to which the board must be added.",
description="Unique identifier (ID) of the project to which the board must be added. **Note**: Projects have been renamed to Spaces. Use this parameter to update the space. For Starter and Edu plans, Team Admins looking to move boards between Spaces/Projects of the same team would need to be direct Board Editors on the boards to move.",
alias="projectId",
)
additional_properties: Dict[str, Any] = {}
Expand Down
4 changes: 2 additions & 2 deletions packages/miro-api-python/miro_api/models/case_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class CaseRequest(BaseModel):
CaseRequest
""" # noqa: E501

name: StrictStr = Field(description="The name of the case")
description: Optional[StrictStr] = Field(default=None, description="The description of the case")
name: StrictStr = Field(description="The name of the case.")
description: Optional[StrictStr] = Field(default=None, description="The description of the case.")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["name", "description"]

Expand Down
8 changes: 8 additions & 0 deletions packages/miro-api-python/miro_api/models/case_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class CaseResponse(BaseModel):
name: StrictStr = Field(description="The name of the case.")
description: Optional[StrictStr] = Field(default=None, description="The description of the case.")
created_by: User = Field(alias="createdBy")
last_modified_by: Optional[User] = Field(default=None, alias="lastModifiedBy")
created_at: datetime = Field(alias="createdAt")
last_modified_at: datetime = Field(alias="lastModifiedAt")
additional_properties: Dict[str, Any] = {}
Expand All @@ -47,6 +48,7 @@ class CaseResponse(BaseModel):
"name",
"description",
"createdBy",
"lastModifiedBy",
"createdAt",
"lastModifiedAt",
]
Expand Down Expand Up @@ -110,6 +112,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of created_by
if self.created_by:
_dict["createdBy"] = self.created_by.to_dict()
# override the default output from pydantic by calling `to_dict()` of last_modified_by
if self.last_modified_by:
_dict["lastModifiedBy"] = self.last_modified_by.to_dict()
# puts key-value pairs in additional_properties in the top level
if self.additional_properties is not None:
for _key, _value in self.additional_properties.items():
Expand All @@ -133,6 +138,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"name": obj.get("name"),
"description": obj.get("description"),
"createdBy": User.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None,
"lastModifiedBy": (
User.from_dict(obj["lastModifiedBy"]) if obj.get("lastModifiedBy") is not None else None
),
"createdAt": obj.get("createdAt"),
"lastModifiedAt": obj.get("lastModifiedAt"),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
import re # noqa: F401
import json

from pydantic import BaseModel, Field, StrictStr, field_validator
from pydantic import BaseModel, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -29,22 +28,14 @@ class LegalHoldContentItemsResponse(BaseModel):
LegalHoldContentItemsResponse
""" # noqa: E501

id: Annotated[str, Field(strict=True)] = Field(description="Unique identifier of the content item.")
content_id: Optional[StrictStr] = Field(
default=None,
description="Identifier for the piece of content referenced by a content item. In the case of a board, this represents the `boardKey` and can be used to export a board using the Discovery APIs.",
alias="contentId",
)
type: StrictStr = Field(description="Type of the content item that is returned. ")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["id", "contentId", "type"]

@field_validator("id")
def id_validate_regular_expression(cls, value):
"""Validates the regular expression"""
if not re.match(r"^[0-9]+$", value):
raise ValueError(r"must validate the regular expression /^[0-9]+$/")
return value
__properties: ClassVar[List[str]] = ["contentId", "type"]

model_config = {
"populate_by_name": True,
Expand Down Expand Up @@ -104,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({"id": obj.get("id"), "contentId": obj.get("contentId"), "type": obj.get("type")})
_obj = cls.model_validate({"contentId": obj.get("contentId"), "type": obj.get("type")})
# store additional fields in additional_properties
for _key in obj.keys():
if _key not in cls.__properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

class LegalHoldRequestScope(BaseModel):
"""
The legal hold scope determines the criteria used to put content items under hold. The variants of this field might get extended in the future, although the most common use case is to put users under hold. Currently only the `users` scope is supported. However, the parsing of this field must ignore unexpected variants.
The legal hold scope determines the criteria used to put content items under hold. The variants of this field might get extended in the future, although the most common use case is to put users under hold. Currently only the `users` scope is supported. However, the parsing of this field must ignore unexpected variants. The request must always include a list of all users to be placed under hold, whether it's for a new legal hold or an update to an existing one. You can have up to 200 users per legal hold, including users added in legal hold updates.
"""

# data type: LegalHoldRequestScopeUsers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class LegalHoldResponse(BaseModel):
state: LegalHoldState
scope: LegalHoldResponseScope
created_by: User = Field(alias="createdBy")
last_modified_by: Optional[User] = Field(default=None, alias="lastModifiedBy")
created_at: datetime = Field(alias="createdAt")
last_modified_at: datetime = Field(alias="lastModifiedAt")
additional_properties: Dict[str, Any] = {}
Expand All @@ -55,6 +56,7 @@ class LegalHoldResponse(BaseModel):
"state",
"scope",
"createdBy",
"lastModifiedBy",
"createdAt",
"lastModifiedAt",
]
Expand Down Expand Up @@ -128,6 +130,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of created_by
if self.created_by:
_dict["createdBy"] = self.created_by.to_dict()
# override the default output from pydantic by calling `to_dict()` of last_modified_by
if self.last_modified_by:
_dict["lastModifiedBy"] = self.last_modified_by.to_dict()
# puts key-value pairs in additional_properties in the top level
if self.additional_properties is not None:
for _key, _value in self.additional_properties.items():
Expand All @@ -154,6 +159,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"state": obj.get("state"),
"scope": LegalHoldResponseScope.from_dict(obj["scope"]) if obj.get("scope") is not None else None,
"createdBy": User.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None,
"lastModifiedBy": (
User.from_dict(obj["lastModifiedBy"]) if obj.get("lastModifiedBy") is not None else None
),
"createdAt": obj.get("createdAt"),
"lastModifiedAt": obj.get("lastModifiedAt"),
}
Expand Down
6 changes: 3 additions & 3 deletions packages/miro-api-python/miro_api/models/team_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TeamMember(BaseModel):

id: StrictStr = Field(description="Team member id.")
role: StrictStr = Field(
description=' Role of the team member. * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": Team-guest user, user with access only to a team without access to organization. '
description=' Role of the team member. * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "non_team": External user, non-team user. * "team_guest": (Deprecated) Team-guest user, user with access only to a team without access to organization. '
)
created_at: Optional[datetime] = Field(
default=None, description="Date and time when member was invited to the team.", alias="createdAt"
Expand Down Expand Up @@ -62,8 +62,8 @@ class TeamMember(BaseModel):
@field_validator("role")
def role_validate_enum(cls, value):
"""Validates the enum"""
if value not in set(["non_team", "member", "admin", "team_guest"]):
raise ValueError("must be one of enum values ('non_team', 'member', 'admin', 'team_guest')")
if value not in set(["non_team", "member", "admin"]):
raise ValueError("must be one of enum values ('non_team', 'member', 'admin')")
return value

model_config = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TeamMemberChanges(BaseModel):

role: Optional[StrictStr] = Field(
default=None,
description=' Role of the team member. * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "team_guest": Team-guest user, user with access only to a team without access to organization. ',
description=' Role of the team member. * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. ',
)
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["role"]
Expand All @@ -41,8 +41,8 @@ def role_validate_enum(cls, value):
if value is None:
return value

if value not in set(["member", "admin", "team_guest"]):
raise ValueError("must be one of enum values ('member', 'admin', 'team_guest')")
if value not in set(["member", "admin"]):
raise ValueError("must be one of enum values ('member', 'admin')")
return value

model_config = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TeamMemberInvite(BaseModel):
email: StrictStr = Field(description="User email to add to a team")
role: Optional[StrictStr] = Field(
default=None,
description=' Role of the team member. * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. * "team_guest": Team-guest user, user with access only to a team without access to organization. ',
description=' Role of the team member. * "member": Team member with full member permissions. * "admin": Admin of a team. Team member with permission to manage team. ',
)
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["email", "role"]
Expand All @@ -42,8 +42,8 @@ def role_validate_enum(cls, value):
if value is None:
return value

if value not in set(["member", "admin", "team_guest"]):
raise ValueError("must be one of enum values ('member', 'admin', 'team_guest')")
if value not in set(["member", "admin"]):
raise ValueError("must be one of enum values ('member', 'admin')")
return value

model_config = {
Expand Down
Loading
Loading