Glific v0.3.1 GlificWeb.Flows.FlowEditorController View Source

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 communication channels. For Glific it's just WhatsApp. 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 Assests. We will come back on that when we have more clearity 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

all the supported funcations we provide

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 lable (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.

Link to this section Functions

Specs

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.

Specs

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

Link to this function

classifiers(conn, params)

View Source

Specs

classifiers(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

Link to this function

completion(conn, params)

View Source

Specs

completion(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()

instead of reading a file we can call it directly from Assests. We will come back on that when we have more clearity of the use cases

Link to this function

fields_post(conn, params)

View Source

Specs

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

Specs

flows(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()

Let's get all the flows or a latest flow revision

Specs

functions(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()

all the supported funcations we provide

Specs

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}]

Link to this function

labels_post(conn, params)

View Source

Specs

labels_post(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()

Store a lable (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

Specs

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.

Specs

revisions(Plug.Conn.t(), nil | maybe_improper_list() | map()) :: Plug.Conn.t()

Get all or a specific revision for a flow

Link to this function

save_revisions(conn, params)

View Source

Specs

save_revisions(Plug.Conn.t(), nil | maybe_improper_list() | map()) ::
  Plug.Conn.t()

Save a revision for a flow and get the revision id

Specs

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.