roboto.domain.views.operations#

Module Contents#

class roboto.domain.views.operations.CreateViewRequest(/, **data)#

Bases: pydantic.BaseModel

Request payload to create a View.

Parameters:

data (Any)

definition: roboto.domain.views.record.ViewDefinition#

The query and presentation state to save.

name: str = None#

Display name. Need not be unique.

target: roboto.query.QueryTarget#

The resource type this View searches. Cannot be changed afterwards.

roboto.domain.views.operations.MAX_VIEW_NAME_LENGTH: Final[int] = 120#

Longest permitted View name, matching the limit layouts uses.

class roboto.domain.views.operations.UpdateViewRequest(/, **data)#

Bases: pydantic.BaseModel

Request payload to update a View.

Omitted fields are left unchanged. target is absent by design: a View’s conditions are written against one resource type, so retargeting it would leave them referring to fields the new target does not have. Create a new View instead.

Parameters:

data (Any)

definition: roboto.domain.views.record.ViewDefinition | roboto.sentinels.NotSetType#

Replacement query and presentation state, or NotSet to leave it alone.

Replaces the definition wholesale rather than merging, so a caller changing one filter must send the whole definition back.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

name: str | roboto.sentinels.NotSetType = None#

New display name, or NotSet to leave it alone.