Skip to content

Commit b240193

Browse files
Upgrade api specification
1 parent 98cacb4 commit b240193

24 files changed

+2068
-586
lines changed

packages/generator/spec.json

Lines changed: 572 additions & 164 deletions
Large diffs are not rendered by default.

packages/miro-api-python/miro_api/api/__init__.py

Lines changed: 961 additions & 144 deletions
Large diffs are not rendered by default.

packages/miro-api-python/miro_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, cook
8282
self.default_headers[header_name] = header_value
8383
self.cookie = cookie
8484
# Set default User-Agent.
85-
self.user_agent = "OpenAPI-Generator/2.2.3/python"
85+
self.user_agent = "OpenAPI-Generator/2.2.4/python"
8686
self.client_side_validation = configuration.client_side_validation
8787

8888
def __enter__(self):

packages/miro-api-python/miro_api/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def to_debug_report(self):
390390
"OS: {env}\n"
391391
"Python Version: {pyversion}\n"
392392
"Version of the API: v2.0\n"
393-
"SDK Package Version: 2.2.3".format(env=sys.platform, pyversion=sys.version)
393+
"SDK Package Version: 2.2.4".format(env=sys.platform, pyversion=sys.version)
394394
)
395395

396396
def get_host_settings(self):

packages/miro-api-python/miro_api/models/board_changes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ class BoardChanges(BaseModel):
3838
)
3939
policy: Optional[BoardPolicyChange] = None
4040
team_id: Optional[StrictStr] = Field(
41-
default=None, description="Unique identifier (ID) of the team where the board must be placed.", alias="teamId"
41+
default=None,
42+
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.",
43+
alias="teamId",
4244
)
4345
project_id: Optional[StrictStr] = Field(
4446
default=None,
45-
description="Unique identifier (ID) of the project to which the board must be added.",
47+
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.",
4648
alias="projectId",
4749
)
4850
additional_properties: Dict[str, Any] = {}

packages/miro-api-python/miro_api/models/case_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class CaseRequest(BaseModel):
2828
CaseRequest
2929
""" # noqa: E501
3030

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

packages/miro-api-python/miro_api/models/case_response.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class CaseResponse(BaseModel):
3838
name: StrictStr = Field(description="The name of the case.")
3939
description: Optional[StrictStr] = Field(default=None, description="The description of the case.")
4040
created_by: User = Field(alias="createdBy")
41+
last_modified_by: Optional[User] = Field(default=None, alias="lastModifiedBy")
4142
created_at: datetime = Field(alias="createdAt")
4243
last_modified_at: datetime = Field(alias="lastModifiedAt")
4344
additional_properties: Dict[str, Any] = {}
@@ -47,6 +48,7 @@ class CaseResponse(BaseModel):
4748
"name",
4849
"description",
4950
"createdBy",
51+
"lastModifiedBy",
5052
"createdAt",
5153
"lastModifiedAt",
5254
]
@@ -110,6 +112,9 @@ def to_dict(self) -> Dict[str, Any]:
110112
# override the default output from pydantic by calling `to_dict()` of created_by
111113
if self.created_by:
112114
_dict["createdBy"] = self.created_by.to_dict()
115+
# override the default output from pydantic by calling `to_dict()` of last_modified_by
116+
if self.last_modified_by:
117+
_dict["lastModifiedBy"] = self.last_modified_by.to_dict()
113118
# puts key-value pairs in additional_properties in the top level
114119
if self.additional_properties is not None:
115120
for _key, _value in self.additional_properties.items():
@@ -133,6 +138,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
133138
"name": obj.get("name"),
134139
"description": obj.get("description"),
135140
"createdBy": User.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None,
141+
"lastModifiedBy": (
142+
User.from_dict(obj["lastModifiedBy"]) if obj.get("lastModifiedBy") is not None else None
143+
),
136144
"createdAt": obj.get("createdAt"),
137145
"lastModifiedAt": obj.get("lastModifiedAt"),
138146
}

packages/miro-api-python/miro_api/models/legal_hold_content_items_response.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
import re # noqa: F401
1818
import json
1919

20-
from pydantic import BaseModel, Field, StrictStr, field_validator
20+
from pydantic import BaseModel, Field, StrictStr
2121
from typing import Any, ClassVar, Dict, List, Optional
22-
from typing_extensions import Annotated
2322
from typing import Optional, Set
2423
from typing_extensions import Self
2524

@@ -29,22 +28,14 @@ class LegalHoldContentItemsResponse(BaseModel):
2928
LegalHoldContentItemsResponse
3029
""" # noqa: E501
3130

32-
id: Annotated[str, Field(strict=True)] = Field(description="Unique identifier of the content item.")
3331
content_id: Optional[StrictStr] = Field(
3432
default=None,
3533
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.",
3634
alias="contentId",
3735
)
3836
type: StrictStr = Field(description="Type of the content item that is returned. ")
3937
additional_properties: Dict[str, Any] = {}
40-
__properties: ClassVar[List[str]] = ["id", "contentId", "type"]
41-
42-
@field_validator("id")
43-
def id_validate_regular_expression(cls, value):
44-
"""Validates the regular expression"""
45-
if not re.match(r"^[0-9]+$", value):
46-
raise ValueError(r"must validate the regular expression /^[0-9]+$/")
47-
return value
38+
__properties: ClassVar[List[str]] = ["contentId", "type"]
4839

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

107-
_obj = cls.model_validate({"id": obj.get("id"), "contentId": obj.get("contentId"), "type": obj.get("type")})
98+
_obj = cls.model_validate({"contentId": obj.get("contentId"), "type": obj.get("type")})
10899
# store additional fields in additional_properties
109100
for _key in obj.keys():
110101
if _key not in cls.__properties:

packages/miro-api-python/miro_api/models/legal_hold_request_scope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
class LegalHoldRequestScope(BaseModel):
2929
"""
30-
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.
30+
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.
3131
"""
3232

3333
# data type: LegalHoldRequestScopeUsers

packages/miro-api-python/miro_api/models/legal_hold_response.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class LegalHoldResponse(BaseModel):
4343
state: LegalHoldState
4444
scope: LegalHoldResponseScope
4545
created_by: User = Field(alias="createdBy")
46+
last_modified_by: Optional[User] = Field(default=None, alias="lastModifiedBy")
4647
created_at: datetime = Field(alias="createdAt")
4748
last_modified_at: datetime = Field(alias="lastModifiedAt")
4849
additional_properties: Dict[str, Any] = {}
@@ -55,6 +56,7 @@ class LegalHoldResponse(BaseModel):
5556
"state",
5657
"scope",
5758
"createdBy",
59+
"lastModifiedBy",
5860
"createdAt",
5961
"lastModifiedAt",
6062
]
@@ -128,6 +130,9 @@ def to_dict(self) -> Dict[str, Any]:
128130
# override the default output from pydantic by calling `to_dict()` of created_by
129131
if self.created_by:
130132
_dict["createdBy"] = self.created_by.to_dict()
133+
# override the default output from pydantic by calling `to_dict()` of last_modified_by
134+
if self.last_modified_by:
135+
_dict["lastModifiedBy"] = self.last_modified_by.to_dict()
131136
# puts key-value pairs in additional_properties in the top level
132137
if self.additional_properties is not None:
133138
for _key, _value in self.additional_properties.items():
@@ -154,6 +159,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
154159
"state": obj.get("state"),
155160
"scope": LegalHoldResponseScope.from_dict(obj["scope"]) if obj.get("scope") is not None else None,
156161
"createdBy": User.from_dict(obj["createdBy"]) if obj.get("createdBy") is not None else None,
162+
"lastModifiedBy": (
163+
User.from_dict(obj["lastModifiedBy"]) if obj.get("lastModifiedBy") is not None else None
164+
),
157165
"createdAt": obj.get("createdAt"),
158166
"lastModifiedAt": obj.get("lastModifiedAt"),
159167
}

0 commit comments

Comments
 (0)