Current section
Files
Jump to
Current section
Files
include/telega@flow@types_Flow.hrl
-record(flow, {
name :: binary(),
steps :: gleam@dict:dict(binary(), telega@flow@types:step_config(any(), any(), any(), any())),
initial_step :: any(),
step_to_string :: fun((any()) -> binary()),
string_to_step :: fun((binary()) -> {ok, any()} | {error, nil}),
storage :: telega@flow@types:flow_storage(any()),
on_complete :: gleam@option:option(fun((telega@bot:context(any(), any(), any()), telega@flow@types:flow_instance()) -> {ok,
telega@bot:context(any(), any(), any())} |
{error, any()})),
on_error :: gleam@option:option(fun((telega@bot:context(any(), any(), any()), telega@flow@types:flow_instance(), gleam@option:option(any())) -> {ok,
telega@bot:context(any(), any(), any())} |
{error, any()})),
global_middlewares :: list(fun((telega@bot:context(any(), any(), any()), telega@flow@types:flow_instance(), fun(() -> {ok,
{telega@bot:context(any(), any(), any()),
telega@flow@types:flow_action(any()),
telega@flow@types:flow_instance()}} |
{error, any()})) -> {ok,
{telega@bot:context(any(), any(), any()),
telega@flow@types:flow_action(any()),
telega@flow@types:flow_instance()}} |
{error, any()})),
conditionals :: list(telega@flow@types:conditional_transition(any())),
parallel_configs :: list(telega@flow@types:parallel_config(any())),
subflows :: list(telega@flow@types:subflow_config(any(), any(), any(), any())),
on_flow_enter :: gleam@option:option(fun((telega@bot:context(any(), any(), any()), telega@flow@types:flow_instance()) -> {ok,
{telega@bot:context(any(), any(), any()),
telega@flow@types:flow_instance()}} |
{error, any()})),
on_flow_leave :: gleam@option:option(fun((telega@bot:context(any(), any(), any()), telega@flow@types:flow_instance()) -> {ok,
{telega@bot:context(any(), any(), any()),
telega@flow@types:flow_instance()}} |
{error, any()})),
on_flow_exit :: gleam@option:option(fun((telega@bot:context(any(), any(), any()), telega@flow@types:flow_instance()) -> {ok,
telega@bot:context(any(), any(), any())} |
{error, any()})),
ttl_ms :: gleam@option:option(integer()),
on_timeout :: gleam@option:option(fun((telega@bot:context(any(), any(), any()), telega@flow@types:flow_instance()) -> {ok,
telega@bot:context(any(), any(), any())} |
{error, any()}))
}).