View Source GlificWeb.Flows.FlowEditorController (Glific v5.1.6)
The Flow Editor Controller
Link to this section Summary
Functions
This is used to checking if the connection between frontend and backend is established or not.
A list of all the communication channels. For Glific it's just WhatsApp. We are not supporting them for now. We will come back to this in near future
A list of all the NLP classifiers. For Glific it's just Dialogflow We are not supporting them for now. We will come back to this in near future
instead of reading a file we can call it directly from Assets. We will come back on that when we have more clarity of the use cases
Add Contact fields into the database. The response should be a map with 3 keys % { Key: Field name, name: Field display name value_type: type of the value}
Let's get all the flows or a latest flow revision
Fetching single interactive template and returning in format that is understood by flow editor or Return error Interactive message not found
A list of all the interactive templates in format that is understood by flow editor
Get all the tags so that user can apply them on incoming message. We are not supporting this for now. To enable It should return a list of map having uuid and name as keys [%{uuid: tag.uuid, name: tag.label}]
Store a label (new tag) in the system. The return response should be a map of 3 keys. [%{uuid: tag.uuid, name: params["name"], count}]
We are not using this for now but this is required for flow editor config.
Get all or a specific revision for a flow
Save a revision for a flow and get the revision id
We are not sure how to use this but this endpoint is required for flow editor. Will come back to this in future.
Validate media to send as attachment
Link to this section Functions
@spec activity(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
This is used to checking if the connection between frontend and backend is established or not.
@spec channels(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
A list of all the communication channels. For Glific it's just WhatsApp. We are not supporting them for now. We will come back to this in near future
@spec classifiers(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
A list of all the NLP classifiers. For Glific it's just Dialogflow We are not supporting them for now. We will come back to this in near future
@spec completion(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
instead of reading a file we can call it directly from Assets. We will come back on that when we have more clarity of the use cases
@spec fields_post(Plug.Conn.t(), map()) :: Plug.Conn.t()
Add Contact fields into the database. The response should be a map with 3 keys % { Key: Field name, name: Field display name value_type: type of the value}
We are not supporting this for now. We will add that in future
@spec flows(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
Let's get all the flows or a latest flow revision
@spec interactive_template(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
Fetching single interactive template and returning in format that is understood by flow editor or Return error Interactive message not found
@spec interactive_templates(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
A list of all the interactive templates in format that is understood by flow editor
@spec labels(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
Get all the tags so that user can apply them on incoming message. We are not supporting this for now. To enable It should return a list of map having uuid and name as keys [%{uuid: tag.uuid, name: tag.label}]
@spec labels_post(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
Store a label (new tag) in the system. The return response should be a map of 3 keys. [%{uuid: tag.uuid, name: params["name"], count}]
We are not supporting them for now. We will come back to this in near future
@spec resthooks(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
We are not using this for now but this is required for flow editor config.
@spec revisions(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
Get all or a specific revision for a flow
@spec save_revisions(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
Save a revision for a flow and get the revision id
@spec ticketers(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
We are not sure how to use this but this endpoint is required for flow editor. Will come back to this in future.
@spec validate_media(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()
Validate media to send as attachment