Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

SpaceFolderParam

Space folder param spec. When used, the end user will be able to select a space folder from the list of available space folders. The config stores only the space folder id, not the full space folder object.

The accessible value in task is a Space folder. See the documentation of the credentials type for more info.

Attributes
PRIVATE_VISIBILITY: LiteralPROTECTED_VISIBILITY: LiteralPUBLIC_VISIBILITY: Literaladditional_info: dict | Noneai_catalog_member: booldefault_value: Optionalhuman_name: str | Noneinvalid_reason: str | Noneis_valid: booloptional: boolshort_description: str | Nonevisibility: Literal
Functions
__init__
optional : bool - False
See default value
visibility : Literal - public
Visibility of the param, see doc on type ParamSpecVisibilty for more info
human_name : str | None - Select a folder
Human readable name of the param, showed in the interface
short_description : str | None
Description of the param, showed in the interface
build

Method call before the value is used (in task or view) to apply some transformation if needed by the ParamSpec. This does not affect the value in the database.

value : Any
Return type : SpaceFolder
get_default_value
Return type : Any
to_dto
Return type : ParamSpecDTO
to_simple_dto
Return type : ParamSpecSimpleDTO
validate

Validate the value of the param and return the modified value if needed. This method is called when the param is set in the config before saving it in the database. The returned value must be serializable in json.

value : Any
Return type : str
ai_additional_info_doc @classmethod

Maps this type's AI-relevant additional_info constraint keys to a human explanation. Default: none. Override on types that expose constraints (min/max, lengths, multiple, ...).

Return type : dict
ai_example_spec @classmethod

A representative, valid instance of this type used as the example in :meth:describe_for_ai. Override to show meaningful constraints (e.g. min/max). The default is a bare instance with a human_name.

Return type : ParamSpec
ai_summary @classmethod

One-line description of what this field type is for. Override per type.

Return type : str
describe_for_ai @classmethod

Self-describe this param type for an AI form-builder.

Returns the type tag, a one-line summary, the meaning of each AI-relevant additional_info key, and a real example spec serialized exactly as ConfigSpecs.from_json expects. Built from :meth:ai_example_spec / :meth:ai_summary / :meth:ai_additional_info_doc so a type only overrides the small pieces it cares about. Keeping this on the type (not in the AI service) means a new param type ships its own catalog entry.

example_key : str - example_field
Return type : ParamSpecAiDescriptionDTO
empty @classmethod
Return type : Self
get_category @classmethod

The :class:ParamSpecCategory this type was registered with by the @param_spec_decorator. None if the class was never decorated.

Return type : gws_core.config.param.param_spec_decorator.ParamSpecCategory | None
get_param_spec_type @classmethod
Return type : ParamSpecType
load_from_dto @classmethod
spec_dto : ParamSpecDTO
validate : bool - False
Return type : Self
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.