roboto.experimental.boards.operations#
Module Contents#
- class roboto.experimental.boards.operations.CreateBoardRequest(/, **data)#
Bases:
pydantic.BaseModelRequest body for
POST /v1/boards/create.The board is personal: the caller owns it.
UpdateBoardAccessRequestshares it with the organization.- Parameters:
data (Any)
- board_definition: Annotated[dict[str, Any], ValidatedAgainst(BoardDefinition)]#
The board definition as a JSON object, stored as
board_definitiondescribes. A top-leveltitlethat is a non-empty string must equalname, and a request in which they differ fails validation. A definition with no title is stored without one.A definition whose top level
BoardDefinitionrefuses fails validation: for example, one with an unknown top-level key, a missingtime_rangeorpanels, apanelsthat is not a list, astagesthat is neither a list nor null, atitlethat is neither a string nor null, or a malformed section or selection. The panels and stages in it are not checked and are stored as given, so the web app can show a broken one beside the rest of the board.
- name: str#
an empty name shows nothing in the board list, and the platform keeps a name equal to a definition
titleonly while the title is a non-empty string.- Type:
The name the board list and board page show. Must not be empty
- classmethod validate_definition_top_level(board_definition)#
Reject a definition whose top level
BoardDefinitionrefuses.- Parameters:
board_definition (dict[str, Any])
- Return type:
dict[str, Any]
- validate_name_and_title_agree()#
Reject a
namethat differs from the definition’s non-emptytitle.- Return type:
- class roboto.experimental.boards.operations.UpdateBoardAccessRequest(/, **data)#
Bases:
pydantic.BaseModelRequest body for
PUT /v1/boards/id/<board_id>/access.Shares a board with the organization, permanently: ownership moves to the org principal. The definition and revision stay unchanged. No request makes a shared board personal again; to get a personal board, create a new board from a copy of this board’s definition.
- Parameters:
data (Any)
- accessibility: Literal[roboto.experimental.boards.record.BoardAccessibility.Organization]#
Must be
organization, which moves ownership to the org principal. A request foruseraccessibility fails validation.
- class roboto.experimental.boards.operations.UpdateBoardRequest(/, **data)#
Bases:
pydantic.BaseModelRequest body for
PUT /v1/boards/id/<board_id>.Carries a new name, new definition content, or both.
UpdateBoardAccessRequestchanges who can open a board.- Parameters:
data (Any)
- base_revision: Annotated[int, pydantic.Field(ge=0)] | roboto.sentinels.NotSetType#
The revision you loaded (
revision), not the revision you want.Required whenever the request writes definition content: a
board_definitionreplacement, or anamefor a board whose stored definition has atitlethat is a non-empty string, since keeping the two equal rewrites that title. The record you loaded shows which case applies.The server compares a supplied base revision with the stored revision, on a rename that writes no definition content as well, and rejects a mismatch with
RobotoBoardRevisionConflictException, so a save built on an outdated revision cannot erase someone else’s edit.
- board_definition: Annotated[dict[str, Any], ValidatedAgainst(BoardDefinition)] | roboto.sentinels.NotSetType#
The board definition as a JSON object, replacing the stored one whole. A top-level
titlethat is a non-empty string is kept equal to the board’s name: with nonamein the request, the board takes the title as its name. A definition with no title leaves the name alone, and the platform never adds a title.A definition whose top level
BoardDefinitionrefuses fails validation: for example, one with an unknown top-level key, a missingtime_rangeorpanels, apanelsthat is not a list, astagesthat is neither a list nor null, atitlethat is neither a string nor null, or a malformed section or selection. The panels and stages in it are not checked and are stored as given, so the web app can show a broken one beside the rest of the board.
- model_config#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: Annotated[str, pydantic.StringConstraints(min_length=1, max_length=120)] | roboto.sentinels.NotSetType#
The name of the board. Rewrites a
titlethe stored definition already has, and never adds one.Must not be empty: the platform keeps the name equal to a definition
titleonly while the title is a non-empty string, so an empty name written into the title would leave the two unequal, and no later rename could make them equal again. To keep the name, omit the field.
- validate_at_least_one_change()#
Reject a request with neither
namenorboard_definition, which would change nothing.- Return type:
- validate_base_revision_with_definition()#
Require
base_revisionwith aboard_definition.A rename of a board whose stored definition has a title needs one too. The server enforces that case, since only the stored board shows whether the title is there.
- Return type:
- classmethod validate_definition_top_level(board_definition)#
Reject a definition whose top level
BoardDefinitionrefuses.- Parameters:
board_definition (Union[dict[str, Any], roboto.sentinels.NotSetType])
- Return type:
Union[dict[str, Any], roboto.sentinels.NotSetType]
- validate_name_and_title_agree()#
Reject a request whose
namediffers from its definition’s non-emptytitle.The platform keeps the two equal, and such a request gives it no basis for choosing between them.
- Return type: