plexus.dashboard.api.models.report_block module

ReportBlock Model - Python representation of the GraphQL ReportBlock type.

class plexus.dashboard.api.models.report_block.ReportBlock(reportId: str, position: int, type: str, output: Optional[Dict[str, Any]] = <factory>, name: Optional[str] = None, log: Optional[str] = None, attachedFiles: Optional[str] = None, dataSetId: Optional[str] = None, createdAt: Optional[datetime.datetime] = None, updatedAt: Optional[datetime.datetime] = None)

Bases: BaseModel

__init__(reportId: str, position: int, type: str, output: ~typing.Dict[str, ~typing.Any] | None = <factory>, name: str | None = None, log: str | None = None, attachedFiles: str | None = None, dataSetId: str | None = None, createdAt: ~datetime.datetime | None = None, updatedAt: ~datetime.datetime | None = None) None
attachedFiles: str | None = None
classmethod create(client: _BaseAPIClient, reportId: str, position: int, type: str, output: str | None = None, name: str | None = None, log: str | None = None, attachedFiles: str | None = None, dataSetId: str | None = None) ReportBlock

Create a new ReportBlock record via GraphQL mutation.

createdAt: datetime | None = None
dataSetId: str | None = None
classmethod fields() str

Return the GraphQL fields to query for this model.

classmethod from_dict(data: Dict[str, Any], client: _BaseAPIClient) ReportBlock

Create an instance from a dictionary of data (typically from API response).

classmethod list_by_report_id(report_id: str, client: _BaseAPIClient, limit: int = 100, max_items: int | None = None) list[ReportBlock]

List ReportBlocks for a specific report using pagination.

Assumes a GraphQL query ‘listReportBlocksByReportIdAndPosition’ exists, using an index like ‘byReportIdAndPosition’.

Args:

report_id: The ID of the Report to list blocks for. client: The API client instance. limit: The number of items to fetch per page. max_items: Optional limit on the total number of items to return.

Returns:

A list of ReportBlock instances, sorted by position ascending.

log: str | None = None
name: str | None = None
output: Dict[str, Any] | None
position: int
reportId: str
type: str
update(client: _BaseAPIClient | None = None, **kwargs) ReportBlock

Update an existing ReportBlock record via GraphQL mutation.

updatedAt: datetime | None = None