Skip to content

Commit

Permalink
Upgrade api specification
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 25, 2024
1 parent a4c638f commit 195d8a4
Show file tree
Hide file tree
Showing 11 changed files with 528 additions and 460 deletions.
384 changes: 198 additions & 186 deletions packages/generator/spec.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/miro-api-python/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
miro_api/api/__init__.py
miro_api/api/app_cards_api.py
miro_api/api/app_management_api.py
miro_api/api/app_metrics_experimental_api.py
miro_api/api/audit_logs_api.py
miro_api/api/board_classification_board_level_api.py
miro_api/api/board_classification_organization_level_api.py
Expand Down Expand Up @@ -49,7 +49,7 @@ miro_api/docs/AppCardStyle.md
miro_api/docs/AppCardStylePlatformbulkcreateoperation.md
miro_api/docs/AppCardUpdateRequest.md
miro_api/docs/AppCardsApi.md
miro_api/docs/AppManagementApi.md
miro_api/docs/AppMetricsExperimentalApi.md
miro_api/docs/AuditContext.md
miro_api/docs/AuditCreatedBy.md
miro_api/docs/AuditEvent.md
Expand Down Expand Up @@ -699,7 +699,7 @@ miro_api/test/test_app_card_style.py
miro_api/test/test_app_card_style_platformbulkcreateoperation.py
miro_api/test/test_app_card_update_request.py
miro_api/test/test_app_cards_api.py
miro_api/test/test_app_management_api.py
miro_api/test/test_app_metrics_experimental_api.py
miro_api/test/test_audit_context.py
miro_api/test/test_audit_created_by.py
miro_api/test/test_audit_event.py
Expand Down
522 changes: 261 additions & 261 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.1/python"
self.user_agent = "OpenAPI-Generator/2.2.2/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.1".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 2.2.2".format(env=sys.platform, pyversion=sys.version)
)

def get_host_settings(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ class BoardExportTaskResult(BaseModel):
status: StrictStr = Field(
description="Indicates the status of the individual board export task. Possible values: `SUCCESS`: the board export task was completed successfully and the results are available. `ERROR`: the board export task encountered an error and failed to complete. The `errorMessage` field provides more information on the error."
)
error_type: Optional[StrictStr] = Field(
default=None,
description="Indicates the type of error encountered during the board export task. Possible values: `TEMPORARY`: the board export task encountered a temporary error. Retry the board export task after some time. `FATAL`: the board export failed and cannot be retried. This export will never succeed due to issues such as board corruption, non-existence, or other unrecoverable errors. Please verify the board's state or contact support if assistance is needed. `UNKNOWN`: the board export task encountered an unexpected exception. Retry the board export task after some time.",
alias="errorType",
)
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["boardId", "errorMessage", "exportLink", "status"]
__properties: ClassVar[List[str]] = ["boardId", "errorMessage", "exportLink", "status", "errorType"]

model_config = {
"populate_by_name": True,
Expand Down Expand Up @@ -107,6 +112,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"errorMessage": obj.get("errorMessage"),
"exportLink": obj.get("exportLink"),
"status": obj.get("status"),
"errorType": obj.get("errorType"),
}
)
# store additional fields in additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import re # noqa: F401
import json

from pydantic import BaseModel, Field, StrictStr
from pydantic import BaseModel, Field, StrictStr, field_validator
from typing import Any, ClassVar, Dict, List, Optional
from typing_extensions import Annotated
from typing import Optional, Set
Expand All @@ -32,8 +32,23 @@ class CreateBoardExportRequest(BaseModel):
board_ids: Optional[Annotated[List[StrictStr], Field(min_length=1, max_length=50)]] = Field(
default=None, description="List of board IDs to be exported.", alias="boardIds"
)
board_format: Optional[StrictStr] = Field(
default="SVG",
description="Specifies the format of the file to which the board will be exported. Supported formats include SVG (default), HTML, and PDF.",
alias="boardFormat",
)
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["boardIds"]
__properties: ClassVar[List[str]] = ["boardIds", "boardFormat"]

@field_validator("board_format")
def board_format_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(["SVG", "HTML", "PDF"]):
raise ValueError("must be one of enum values ('SVG', 'HTML', 'PDF')")
return value

model_config = {
"populate_by_name": True,
Expand Down Expand Up @@ -93,7 +108,12 @@ 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({"boardIds": obj.get("boardIds")})
_obj = cls.model_validate(
{
"boardIds": obj.get("boardIds"),
"boardFormat": obj.get("boardFormat") if obj.get("boardFormat") is not None else "SVG",
}
)
# store additional fields in additional_properties
for _key in obj.keys():
if _key not in cls.__properties:
Expand Down
8 changes: 4 additions & 4 deletions packages/miro-api/api/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export class MiroApi {
}

/**
* Returns a list of usage metrics for a specific app for a given time range, grouped by requested time period. This endpoint requires an app management API token. It can be generated in the <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">Your Apps</a> section of Developer Hub.
* Returns a list of usage metrics for a specific app for a given time range, grouped by requested time period. This endpoint requires an app management API token. It can be generated in the <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">Your Apps</a> section of Developer Hub.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 1</a><br/>
* @summary Get app metrics
* @param appId ID of the app to get metrics for.
* @param startDate Start date of the period in UTC format. For example, 2024-12-31.
Expand Down Expand Up @@ -403,7 +403,7 @@ export class MiroApi {
}

/**
* Returns total usage metrics for a specific app since the app was created. This endpoint requires an app management API token. It can be generated in <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">your apps</a> section of Developer Hub.
* Returns total usage metrics for a specific app since the app was created. This endpoint requires an app management API token. It can be generated in <a href=\"https://developers.miro.com/?features=appMetricsToken#your-apps\">your apps</a> section of Developer Hub.<br/> <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a><br/> <h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 1</a><br/>
* @summary Get total app metrics
* @param appId ID of the app to get total metrics for.
*/
Expand Down Expand Up @@ -436,7 +436,7 @@ export class MiroApi {
}

/**
* Retrieves a page of audit events.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>auditlogs:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 2</a>
* Retrieves a page of audit events from the last 90 days. If you want to retrieve data that is older than 90 days, you can use the <a target=_blank href=\"https://help.miro.com/hc/en-us/articles/360017571434-Audit-logs#h_01J7EY4E0F67EFTRQ7BT688HW0\">CSV export feature</a>.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>auditlogs:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 2</a>
* @summary Get audit logs
* @param createdAfter Retrieve audit logs created after the date and time provided. This is the start date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between &#x60;2023-03-30T17:26:50.000Z&#x60; and &#x60;2023-04-30T17:26:50.000Z&#x60;, provide &#x60;2023-03-30T17:26:50.000Z&#x60; as the value for the &#x60;createdAfter&#x60; parameter.&lt;br&gt;Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).\&quot;
* @param createdBefore Retrieve audit logs created before the date and time provided. This is the end date of the duration for which you want to retrieve audit logs. For example, if you want to retrieve audit logs between &#x60;2023-03-30T17:26:50.000Z&#x60; and &#x60;2023-04-30T17:26:50.000Z&#x60;, provide &#x60;2023-04-30T17:26:50.000Z&#x60; as the value for the &#x60;createdBefore&#x60; parameter.&lt;br&gt;Format: UTC, adheres to [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), including milliseconds and a [trailing Z offset](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)).
Expand Down Expand Up @@ -1317,7 +1317,7 @@ export class MiroApi {
}

/**
* Retrieves a list of boards that the user associated with the access token has access to. You can filter and sort the boards by specifying URL query parameter values. If you are an Enterprise customer and a Company Admin, you can retrieve all boards, including all private boards (boards that haven\'t been specifically shared with you) by enabling Content Admin permissions. To enable Content Admin permissions, see [Content Admin permissions for Company Admins](https://help.miro.com/hc/en-us/articles/360012777280-Content-Admin-permissions-for-Company-Admins). Note that you only get results instantaneously when you filter by the `team_id`, `project_id`, or both the `team_id` and `project_id`. If you use any other filter, you need to give a few seconds for the indexing of newly created boards before retrieving boards.<br/><h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 1</a><br/>
* Retrieves a list of boards accessible to the user associated with the provided access token. This endpoint supports filtering and sorting through URL query parameters. Customize the response by specifying `team_id`, `project_id`, or other query parameters. Filtering by `team_id` or `project_id` (or both) returns results instantly. For other filters, allow a few seconds for indexing of newly created boards. If you\'re an Enterprise customer with Company Admin permissions: - Enable **Content Admin** permissions to retrieve all boards, including private boards (those not explicitly shared with you). For details, see the [Content Admin Permissions for Company Admins](https://help.miro.com/hc/en-us/articles/360012777280-Content-Admin-permissions-for-Company-Admins). - Note that **Private board contents remain inaccessible**. The API allows you to verify their existence but prevents viewing their contents to uphold security best practices. Unauthorized access attempts will return an error. <h3>Required scope</h3> <a target=_blank href=https://developers.miro.com/reference/scopes>boards:read</a> <br/><h3>Rate limiting</h3> <a target=_blank href=\"/docs/miro-rest-api-introduction#rate-limiting\">Level 1</a><br/>
* @summary Get boards
* @param teamId
* @param projectId
Expand Down
9 changes: 9 additions & 0 deletions packages/miro-api/model/boardExportTaskResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export class BoardExportTaskResult {
* Indicates the status of the individual board export task. Possible values: `SUCCESS`: the board export task was completed successfully and the results are available. `ERROR`: the board export task encountered an error and failed to complete. The `errorMessage` field provides more information on the error.
*/
'status': string
/**
* Indicates the type of error encountered during the board export task. Possible values: `TEMPORARY`: the board export task encountered a temporary error. Retry the board export task after some time. `FATAL`: the board export failed and cannot be retried. This export will never succeed due to issues such as board corruption, non-existence, or other unrecoverable errors. Please verify the board\'s state or contact support if assistance is needed. `UNKNOWN`: the board export task encountered an unexpected exception. Retry the board export task after some time.
*/
'errorType'?: string

/** @ignore */
static discriminator: string | undefined = undefined
Expand All @@ -57,6 +61,11 @@ export class BoardExportTaskResult {
baseName: 'status',
type: 'string',
},
{
name: 'errorType',
baseName: 'errorType',
type: 'string',
},
]

/** @ignore */
Expand Down
20 changes: 20 additions & 0 deletions packages/miro-api/model/createBoardExportRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export class CreateBoardExportRequest {
* List of board IDs to be exported.
*/
'boardIds'?: Array<string>
/**
* Specifies the format of the file to which the board will be exported. Supported formats include SVG (default), HTML, and PDF.
*/
'boardFormat'?:
| string
| (typeof CreateBoardExportRequest.BoardFormatEnum)[keyof typeof CreateBoardExportRequest.BoardFormatEnum] =
CreateBoardExportRequest.BoardFormatEnum.Svg

/** @ignore */
static discriminator: string | undefined = undefined
Expand All @@ -30,10 +37,23 @@ export class CreateBoardExportRequest {
baseName: 'boardIds',
type: 'Array<string>',
},
{
name: 'boardFormat',
baseName: 'boardFormat',
type: 'CreateBoardExportRequest.BoardFormatEnum',
},
]

/** @ignore */
static getAttributeTypeMap() {
return CreateBoardExportRequest.attributeTypeMap
}
}

export namespace CreateBoardExportRequest {
export const BoardFormatEnum = {
Svg: 'SVG',
Html: 'HTML',
Pdf: 'PDF',
} as const
}
1 change: 1 addition & 0 deletions packages/miro-api/model/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ let enumsMap: {[index: string]: any} = {
'ConnectorStyle.StrokeStyleEnum': ConnectorStyle.StrokeStyleEnum,
'ConnectorStyle.TextOrientationEnum': ConnectorStyle.TextOrientationEnum,
'ConnectorWithLinks.ShapeEnum': ConnectorWithLinks.ShapeEnum,
'CreateBoardExportRequest.BoardFormatEnum': CreateBoardExportRequest.BoardFormatEnum,
'CreateBoardSubscriptionRequest.StatusEnum': CreateBoardSubscriptionRequest.StatusEnum,
'CustomField.IconShapeEnum': CustomField.IconShapeEnum,
'CustomFieldPlatformTags.IconShapeEnum': CustomFieldPlatformTags.IconShapeEnum,
Expand Down

0 comments on commit 195d8a4

Please sign in to comment.