View Source GlificWeb.Resolvers.Templates (Glific v5.1.6)

Templates Resolver which sits between the GraphQL schema and Glific Templates Context API. This layer basically stitches together one or more calls to resolve the incoming queries.

Link to this section Summary

Functions

Bulk applying templates from CSV

Get the count of session templates filtered by args

Converting a message to message template

Import pre approved templates

Get a specific session template by id

Get the list of session templates filtered by args

Sync hsm with bsp

Link to this section Functions

Link to this function

bulk_apply_templates(_, map1, map2)

View Source
@spec bulk_apply_templates(Absinthe.Resolution.t(), %{data: String.t()}, %{
  context: map()
}) ::
  {:ok, any()} | {:error, any()}

Bulk applying templates from CSV

Link to this function

count_session_templates(_, args, _)

View Source
@spec count_session_templates(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, integer()}

Get the count of session templates filtered by args

Link to this function

create_template_from_message(_, params, _)

View Source
@spec create_template_from_message(
  Absinthe.Resolution.t(),
  %{message_id: integer(), input: map()},
  %{context: map()}
) :: {:ok, any()} | {:error, any()}

Converting a message to message template

Link to this function

import_templates(_, map1, map2)

View Source
@spec import_templates(Absinthe.Resolution.t(), %{data: String.t()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Import pre approved templates

Link to this function

session_template(_, map1, map2)

View Source
@spec session_template(Absinthe.Resolution.t(), %{id: integer()}, %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Get a specific session template by id

Link to this function

session_templates(_, args, _)

View Source
@spec session_templates(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Get the list of session templates filtered by args

Link to this function

sync_hsm_template(_, _, map)

View Source
@spec sync_hsm_template(Absinthe.Resolution.t(), map(), %{context: map()}) ::
  {:ok, any()} | {:error, any()}

Sync hsm with bsp