workflows.services.validatorsΒΆ
Validation helpers for the workflow wizard payload (server-side).
AttributesΒΆ
FunctionsΒΆ
|
|
|
Return True if s is a valid dot-path like 'serial_number' or 'http.status' (bare path; no prefix). |
Bare variable path (no 'vars.'), at least one segment, dot-separated. |
|
Return set of (handler, protocol_lc, operation) from Events (protocol normalized). |
|
Return the set of registered step type identifiers. |
|
|
|
Accept {str: str|int|float} to match executor (which renders to str). |
|
Validate webhook auth object. |
|
Allow: status | text | json[.a.b.0] | headers[.x_y] (no dashes in dot lookups). |
|
|
|
|
|
|
|
|
|
|
URL, method, headers, body for webhook step. |
|
Auth and timeout for webhook step. |
|
result_to/result_source/exports for webhook step. |
|
|
|
|
|
|
|
Validate a single step object. |
|
|
|
|
|
Validate the wizard JSON (pre-transform). |
Module ContentsΒΆ
- workflows.services.validators._error(errors, msg)[source]ΒΆ
- Parameters:
errors (list[str])
msg (str)
- Return type:
None
- workflows.services.validators._is_dotpath(s)[source]ΒΆ
Return True if s is a valid dot-path like βserial_numberβ or βhttp.statusβ (bare path; no prefix).
- Parameters:
s (str)
- Return type:
bool
- workflows.services.validators._is_bare_var_path(s)[source]ΒΆ
Bare variable path (no βvars.β), at least one segment, dot-separated.
- Parameters:
s (str)
- Return type:
bool
- workflows.services.validators._known_event_triples()[source]ΒΆ
Return set of (handler, protocol_lc, operation) from Events (protocol normalized).
- Return type:
set[tuple[str, str, str]]
- workflows.services.validators._registered_step_types()[source]ΒΆ
Return the set of registered step type identifiers.
- Returns:
Step type names as registered with the executor factory.
- Return type:
set[str]
- workflows.services.validators._positive_int(value)[source]ΒΆ
- Parameters:
value (Any)
- Return type:
bool
- workflows.services.validators._validate_headers_dict(val)[source]ΒΆ
Accept {str: str|int|float} to match executor (which renders to str).
- Parameters:
val (Any)
- Return type:
bool
- workflows.services.validators._validate_webhook_auth(val)[source]ΒΆ
Validate webhook auth object.
- Parameters:
val (Any)
- Return type:
tuple[bool, str | None]
- workflows.services.validators._is_valid_from_path(s)[source]ΒΆ
Allow: status | text | json[.a.b.0] | headers[.x_y] (no dashes in dot lookups).
- Parameters:
s (str)
- Return type:
bool
- workflows.services.validators._validate_email_step(idx, params, errors)[source]ΒΆ
- Parameters:
idx (int)
params (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_approval_step(idx, params, errors)[source]ΒΆ
- Parameters:
idx (int)
params (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_timer_step(idx, params, errors)[source]ΒΆ
- Parameters:
idx (int)
params (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_condition_step(idx, params, errors)[source]ΒΆ
- Parameters:
idx (int)
params (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_webhook_basic_fields(idx, params, errors)[source]ΒΆ
URL, method, headers, body for webhook step.
- Parameters:
idx (int)
params (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_webhook_auth_and_timeout(idx, params, errors)[source]ΒΆ
Auth and timeout for webhook step.
- Parameters:
idx (int)
params (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_webhook_result_mapping(idx, params, errors)[source]ΒΆ
result_to/result_source/exports for webhook step.
- Parameters:
idx (int)
params (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_webhook_step(idx, params, errors)[source]ΒΆ
- Parameters:
idx (int)
params (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_name(payload, errors)[source]ΒΆ
- Parameters:
payload (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_events(payload, errors)[source]ΒΆ
- Parameters:
payload (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_single_step(idx, step, registered, errors)[source]ΒΆ
Validate a single step object.
- Parameters:
idx (int)
step (Any)
registered (set[str])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_steps(payload, errors)[source]ΒΆ
- Parameters:
payload (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators._validate_scopes(payload, errors)[source]ΒΆ
- Parameters:
payload (dict[str, Any])
errors (list[str])
- Return type:
None
- workflows.services.validators.validate_wizard_payload(payload)[source]ΒΆ
Validate the wizard JSON (pre-transform).
- Parameters:
payload (dict[str, Any]) β Raw wizard configuration payload as a dictionary.
- Returns:
A list of human-readable error messages. The list is empty if the payload passes all validation checks.
- Return type:
list[str]