roboto.domain.custom_fields.operations#

Module Contents#

class roboto.domain.custom_fields.operations.CreateCustomFieldRequest(/, **data)#

Bases: pydantic.BaseModel

Request body for POST /v1/custom-fields.

Defines a new custom field for an entity type in the caller’s organization. Normally constructed by create() rather than instantiated directly.

Parameters:

data (Any)

check_options_match_field_type()#
Return type:

CreateCustomFieldRequest

description: FieldDescription | None = None#

Long-form description of the field’s meaning.

display_name: FieldDisplayName | None = None#

Human-readable label shown in the UI.

entity_type: roboto.domain.custom_fields.record.TargetEntityType#

Roboto entity type the field extends.

field_name: Annotated[str, pydantic.StringConstraints(pattern='^[a-z][a-z0-9_]{0,62}$')]#

Name of the field. Fixed at creation time.

Must match ^[a-z][a-z0-9_]{0,62}$ (lowercase ASCII, max 63 chars) and is unique within (org_id, entity_type).

field_type: roboto.domain.custom_fields.record.CustomFieldType#

Value type of the field.

Determines which operators are supported in search and sort.

metadata_path: str | None = None#

Reserved for promoting an existing metadata key into a custom field.

Not yet supported; leave as None.

options: roboto.domain.custom_fields.record.CustomFieldOptions | None = None#

Type-specific configuration.

Required for CustomFieldType.Enum fields (to declare the allowed values).

type roboto.domain.custom_fields.operations.FieldDescription = Annotated[str, pydantic.StringConstraints(max_length=256)]#

Long-form description of a custom field. Up to 256 characters.

type roboto.domain.custom_fields.operations.FieldDisplayName = Annotated[str, pydantic.StringConstraints(max_length=128)]#

Human-readable label for a custom field. Up to 128 characters.

class roboto.domain.custom_fields.operations.ListCustomFieldsRequest(/, **data)#

Bases: pydantic.BaseModel

Request body for POST /v1/custom-fields/query.

Pages through the custom fields visible to the caller, optionally filtered by entity type and status. Normally constructed by list() rather than directly.

Parameters:

data (Any)

entity_type: roboto.domain.custom_fields.record.TargetEntityType | None = None#

If provided, restrict results to fields targeting this entity type.

page_token: str | None = None#

Opaque token returned by a prior page; omit on the first request.

statuses: list[roboto.domain.custom_fields.record.CustomFieldStatus] = None#

Statuses to include in the results. Must contain at least one status.

class roboto.domain.custom_fields.operations.UpdateCustomFieldRequest(/, **data)#

Bases: pydantic.BaseModel

Request body for POST /v1/custom-fields/{field_id}.

Carries mutable metadata changes for an existing custom field. Each request attribute defaults to NotSet, which leaves the corresponding attribute unchanged; pass None explicitly to clear an attribute.

Parameters:

data (Any)

description: FieldDescription | None | roboto.sentinels.NotSetType#

New description for the field, or None to clear it.

Leave as NotSet to leave unchanged.

display_name: FieldDisplayName | None | roboto.sentinels.NotSetType#

New display name for the field, or None to clear it.

Leave as NotSet to leave unchanged.

model_config#

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