View Source Glific.Providers.TemplateBehaviour behaviour (Glific v5.1.6)

The message behaviour which all the providers needs to implement for communication

Link to this section Summary

Link to this section Callbacks

Link to this callback

bulk_apply_templates(org_id, data)

View Source
@callback bulk_apply_templates(org_id :: non_neg_integer(), data :: String.t()) ::
  :ok | {:ok, any()}
@callback delete(org_id :: non_neg_integer(), attrs :: map()) ::
  {:ok, any()} | {:error, any()}
Link to this callback

import_templates(org_id, data)

View Source
@callback import_templates(org_id :: non_neg_integer(), data :: String.t()) ::
  :ok | {:ok, any()}
Link to this callback

submit_for_approval(attrs)

View Source
@callback submit_for_approval(attrs :: map()) ::
  {:ok, Glific.Templates.SessionTemplate.t()} | {:error, any()}
Link to this callback

update_hsm_templates(org_id)

View Source
@callback update_hsm_templates(org_id :: non_neg_integer()) :: :ok | {:error, String.t()}