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
629 changes: 451 additions & 178 deletions packages/generator/spec.json

Large diffs are not rendered by default.

104 changes: 80 additions & 24 deletions packages/miro-api-python/.openapi-generator/FILES

Large diffs are not rendered by default.

14,562 changes: 7,954 additions & 6,608 deletions packages/miro-api-python/miro_api/api/__init__.py

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion packages/miro-api-python/miro_api/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@
""" # noqa: E501

# import models into model package
from miro_api.models.access_token_response import AccessTokenResponse
from miro_api.models.actor import Actor
from miro_api.models.add_project_member_request import AddProjectMemberRequest
from miro_api.models.admin_role import AdminRole
from miro_api.models.ai_interaction_log import AiInteractionLog
from miro_api.models.ai_interaction_log_actor import AiInteractionLogActor
from miro_api.models.ai_interaction_log_object import AiInteractionLogObject
from miro_api.models.app_card_create_request import AppCardCreateRequest
from miro_api.models.app_card_data import AppCardData
from miro_api.models.app_card_data_changes import AppCardDataChanges
Expand Down Expand Up @@ -54,6 +58,7 @@
from miro_api.models.board_export_task_result import BoardExportTaskResult
from miro_api.models.board_format import BoardFormat
from miro_api.models.board_item_content_log import BoardItemContentLog
from miro_api.models.board_item_content_log_ai import BoardItemContentLogAI
from miro_api.models.board_links import BoardLinks
from miro_api.models.board_member import BoardMember
from miro_api.models.board_member_changes import BoardMemberChanges
Expand Down Expand Up @@ -87,6 +92,11 @@
from miro_api.models.card_update_request import CardUpdateRequest
from miro_api.models.case_request import CaseRequest
from miro_api.models.case_response import CaseResponse
from miro_api.models.code_widget_create_request import CodeWidgetCreateRequest
from miro_api.models.code_widget_cursor_paged import CodeWidgetCursorPaged
from miro_api.models.code_widget_data import CodeWidgetData
from miro_api.models.code_widget_item import CodeWidgetItem
from miro_api.models.code_widget_update_request import CodeWidgetUpdateRequest
from miro_api.models.connector_changes_data import ConnectorChangesData
from miro_api.models.connector_creation_data import ConnectorCreationData
from miro_api.models.connector_style import ConnectorStyle
Expand Down Expand Up @@ -201,6 +211,7 @@
GeometryPlatformcreateitemsinbulkusingfilefromdevice,
)
from miro_api.models.geometry_platformgroups import GeometryPlatformgroups
from miro_api.models.get_ai_interaction_logs_response import GetAiInteractionLogsResponse
from miro_api.models.get_all_groups200_response import GetAllGroups200Response
from miro_api.models.get_all_groups400_response import GetAllGroups400Response
from miro_api.models.get_all_groups404_response import GetAllGroups404Response
Expand Down Expand Up @@ -280,6 +291,7 @@
from miro_api.models.mindmap_node_view import MindmapNodeView
from miro_api.models.mindmap_style import MindmapStyle
from miro_api.models.mindmap_widget_data_output import MindmapWidgetDataOutput
from miro_api.models.miro_ai import MiroAi
from miro_api.models.modified_by import ModifiedBy
from miro_api.models.modified_by_platform_containers import ModifiedByPlatformContainers
from miro_api.models.modified_by_platform_experimental_features import ModifiedByPlatformExperimentalFeatures
Expand All @@ -289,6 +301,7 @@
ModifiedByPlatformcreateitemsinbulkusingfilefromdevice,
)
from miro_api.models.modified_by_platformgroups import ModifiedByPlatformgroups
from miro_api.models.o_embed_data import OEmbedData
from miro_api.models.organization import Organization
from miro_api.models.organization_information import OrganizationInformation
from miro_api.models.organization_member import OrganizationMember
Expand Down Expand Up @@ -415,7 +428,7 @@
from miro_api.models.text_item import TextItem
from miro_api.models.text_style import TextStyle
from miro_api.models.text_update_request import TextUpdateRequest
from miro_api.models.token_information import TokenInformation
from miro_api.models.token_context import TokenContext
from miro_api.models.un_group400_response import UnGroup400Response
from miro_api.models.un_group404_response import UnGroup404Response
from miro_api.models.un_group429_response import UnGroup429Response
Expand Down Expand Up @@ -446,6 +459,7 @@
from miro_api.models.user_info_last_opened_by import UserInfoLastOpenedBy
from miro_api.models.user_info_short import UserInfoShort
from miro_api.models.user_information import UserInformation
from miro_api.models.user_information1 import UserInformation1
from miro_api.models.user_list_response import UserListResponse
from miro_api.models.user_resource import UserResource
from miro_api.models.user_resource_emails_inner import UserResourceEmailsInner
Expand Down
122 changes: 122 additions & 0 deletions packages/miro-api-python/miro_api/models/access_token_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# coding: utf-8

"""
Miro Developer Platform

<img src=\"https://content.pstmn.io/47449ea6-0ef7-4af2-bac1-e58a70e61c58/aW1hZ2UucG5n\" width=\"1685\" height=\"593\"> ### Miro Developer Platform concepts - New to the Miro Developer Platform? Interested in learning more about platform concepts?? [Read our introduction page](https://beta.developers.miro.com/docs/introduction) and familiarize yourself with the Miro Developer Platform capabilities in a few minutes. ### Getting started with the Miro REST API - [Quickstart (video):](https://beta.developers.miro.com/docs/try-out-the-rest-api-in-less-than-3-minutes) try the REST API in less than 3 minutes. - [Quickstart (article):](https://beta.developers.miro.com/docs/build-your-first-hello-world-app-1) get started and try the REST API in less than 3 minutes. ### Miro REST API tutorials Check out our how-to articles with step-by-step instructions and code examples so you can: - [Get started with OAuth 2.0 and Miro](https://beta.developers.miro.com/docs/getting-started-with-oauth) ### Miro App Examples Clone our [Miro App Examples repository](https://github.com/miroapp/app-examples) to get inspiration, customize, and explore apps built on top of Miro's Developer Platform 2.0.

The version of the OpenAPI document: v2.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations
import pprint
import re # noqa: F401
import json

from pydantic import BaseModel, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self


class AccessTokenResponse(BaseModel):
"""
AccessTokenResponse
""" # noqa: E501

user_id: Optional[StrictStr] = None
expires_in: Optional[StrictInt] = None
team_id: Optional[StrictStr] = None
access_token: Optional[StrictStr] = None
scope: Optional[StrictStr] = None
refresh_token: Optional[StrictStr] = None
token_type: Optional[StrictStr] = None
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = [
"user_id",
"expires_in",
"team_id",
"access_token",
"scope",
"refresh_token",
"token_type",
]

model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}

def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AccessTokenResponse from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* Fields in `self.additional_properties` are added to the output dict.
"""
excluded_fields: Set[str] = set(
[
"additional_properties",
]
)

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# 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():
_dict[_key] = _value

return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AccessTokenResponse from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate(
{
"user_id": obj.get("user_id"),
"expires_in": obj.get("expires_in"),
"team_id": obj.get("team_id"),
"access_token": obj.get("access_token"),
"scope": obj.get("scope"),
"refresh_token": obj.get("refresh_token"),
"token_type": obj.get("token_type"),
}
)
# store additional fields in additional_properties
for _key in obj.keys():
if _key not in cls.__properties:
_obj.additional_properties[_key] = obj.get(_key)

return _obj
163 changes: 163 additions & 0 deletions packages/miro-api-python/miro_api/models/ai_interaction_log.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
# coding: utf-8

"""
Miro Developer Platform

<img src=\"https://content.pstmn.io/47449ea6-0ef7-4af2-bac1-e58a70e61c58/aW1hZ2UucG5n\" width=\"1685\" height=\"593\"> ### Miro Developer Platform concepts - New to the Miro Developer Platform? Interested in learning more about platform concepts?? [Read our introduction page](https://beta.developers.miro.com/docs/introduction) and familiarize yourself with the Miro Developer Platform capabilities in a few minutes. ### Getting started with the Miro REST API - [Quickstart (video):](https://beta.developers.miro.com/docs/try-out-the-rest-api-in-less-than-3-minutes) try the REST API in less than 3 minutes. - [Quickstart (article):](https://beta.developers.miro.com/docs/build-your-first-hello-world-app-1) get started and try the REST API in less than 3 minutes. ### Miro REST API tutorials Check out our how-to articles with step-by-step instructions and code examples so you can: - [Get started with OAuth 2.0 and Miro](https://beta.developers.miro.com/docs/getting-started-with-oauth) ### Miro App Examples Clone our [Miro App Examples repository](https://github.com/miroapp/app-examples) to get inspiration, customize, and explore apps built on top of Miro's Developer Platform 2.0.

The version of the OpenAPI document: v2.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations
import pprint
import re # noqa: F401
import json

from datetime import datetime
from pydantic import BaseModel, Field, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from miro_api.models.ai_interaction_log_actor import AiInteractionLogActor
from miro_api.models.ai_interaction_log_object import AiInteractionLogObject
from typing import Optional, Set
from typing_extensions import Self


class AiInteractionLog(BaseModel):
"""
Contains information about a single AI interaction log entry.
""" # noqa: E501

id: Optional[StrictStr] = Field(default=None, description="Unique identifier of the AI interaction log entry.")
created_at: Optional[datetime] = Field(
default=None,
description="Date and time when the AI interaction occurred.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). ",
alias="createdAt",
)
stored_at: Optional[datetime] = Field(
default=None,
description="Date and time when the AI interaction log was stored.<br>Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), includes a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)). ",
alias="storedAt",
)
session_id: Optional[StrictStr] = Field(
default=None,
description="Unique identifier of the session during which the AI interaction occurred.",
alias="sessionId",
)
message_id: Optional[StrictStr] = Field(
default=None,
description="Unique identifier of the message associated with the AI interaction.",
alias="messageId",
)
object: Optional[AiInteractionLogObject] = None
ai_feature_name: Optional[StrictStr] = Field(
default=None, description="Name of the AI feature that was used during the interaction.", alias="aiFeatureName"
)
actor: Optional[AiInteractionLogActor] = None
log_type: Optional[StrictStr] = Field(
default=None, description="Type of the AI interaction log entry.", alias="logType"
)
details: Optional[Dict[str, Any]] = Field(
default=None,
description="Additional details about the AI interaction. The structure of this object varies depending on the AI feature used. The text may contain unstructured data that could reveal information used in interactions with the LLM.",
)
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = [
"id",
"createdAt",
"storedAt",
"sessionId",
"messageId",
"object",
"aiFeatureName",
"actor",
"logType",
"details",
]

model_config = {
"populate_by_name": True,
"validate_assignment": True,
"protected_namespaces": (),
}

def to_str(self) -> str:
"""Returns the string representation of the model using alias"""
return pprint.pformat(self.model_dump(by_alias=True))

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
return json.dumps(self.to_dict())

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of AiInteractionLog from a JSON string"""
return cls.from_dict(json.loads(json_str))

def to_dict(self) -> Dict[str, Any]:
"""Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic's
`self.model_dump(by_alias=True)`:

* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* Fields in `self.additional_properties` are added to the output dict.
"""
excluded_fields: Set[str] = set(
[
"additional_properties",
]
)

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
# override the default output from pydantic by calling `to_dict()` of object
if self.object:
_dict["object"] = self.object.to_dict()
# override the default output from pydantic by calling `to_dict()` of actor
if self.actor:
_dict["actor"] = self.actor.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():
_dict[_key] = _value

return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of AiInteractionLog from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate(
{
"id": obj.get("id"),
"createdAt": obj.get("createdAt"),
"storedAt": obj.get("storedAt"),
"sessionId": obj.get("sessionId"),
"messageId": obj.get("messageId"),
"object": AiInteractionLogObject.from_dict(obj["object"]) if obj.get("object") is not None else None,
"aiFeatureName": obj.get("aiFeatureName"),
"actor": AiInteractionLogActor.from_dict(obj["actor"]) if obj.get("actor") is not None else None,
"logType": obj.get("logType"),
"details": obj.get("details"),
}
)
# store additional fields in additional_properties
for _key in obj.keys():
if _key not in cls.__properties:
_obj.additional_properties[_key] = obj.get(_key)

return _obj
Loading
Loading