Current section

Files

Jump to
telega include telega@flow_Flow.hrl
Raw

include/telega@flow_Flow.hrl

-record(flow, {
name :: binary(),
steps :: gleam@dict:dict(binary(), telega@flow:step_config(any(), any(), any())),
initial_step :: any(),
step_to_string :: fun((any()) -> binary()),
string_to_step :: fun((binary()) -> {ok, any()} | {error, nil}),
storage :: telega@flow:flow_storage(any()),
on_complete :: gleam@option:option(fun((telega@bot:context(any(), any()), telega@flow:flow_instance()) -> {ok,
telega@bot:context(any(), any())} |
{error, any()})),
on_error :: gleam@option:option(fun((telega@bot:context(any(), any()), telega@flow:flow_instance(), gleam@option:option(any())) -> {ok,
telega@bot:context(any(), any())} |
{error, any()})),
global_middlewares :: list(fun((telega@bot:context(any(), any()), telega@flow:flow_instance(), fun(() -> {ok,
{telega@bot:context(any(), any()),
telega@flow:flow_action(any()),
telega@flow:flow_instance()}} |
{error, any()})) -> {ok,
{telega@bot:context(any(), any()),
telega@flow:flow_action(any()),
telega@flow:flow_instance()}} |
{error, any()})),
conditionals :: list(telega@flow:conditional_transition(any())),
parallel_configs :: list(telega@flow:parallel_config(any())),
subflows :: list(telega@flow:subflow_config(any(), any(), any()))
}).