View Source Glific.Flows.WebhookLog (Glific v5.1.6)

The webhook log object

Link to this section Summary

Functions

Standard changeset pattern we use for all data types

Return the count of webhook_logs, using the same filter as list_webhook_logs

Create a Webhook Log

Returns the list of webhook_logs. Since this is very basic and only listing functionality we added the status filter like this. In future we will put the status as virtual filed in the webhook logs itself.

Update a Webhook Log

Link to this section Types

@type t() :: %Glific.Flows.WebhookLog{
  __meta__: Ecto.Schema.Metadata.t(),
  contact: Glific.Contacts.Contact.t() | Ecto.Association.NotLoaded.t() | nil,
  contact_id: non_neg_integer() | nil,
  error: String.t() | nil,
  flow: Glific.Flows.Flow.t() | Ecto.Association.NotLoaded.t() | nil,
  flow_id: non_neg_integer() | nil,
  id: non_neg_integer() | nil,
  inserted_at: :utc_datetime | nil,
  method: String.t() | nil,
  organization:
    Glific.Partners.Organization.t() | Ecto.Association.NotLoaded.t() | nil,
  organization_id: non_neg_integer() | nil,
  request_headers: map() | nil,
  request_json: map() | nil,
  response_json: map() | nil,
  status_code: non_neg_integer() | nil,
  updated_at: :utc_datetime | nil,
  url: String.t() | nil
}

Link to this section Functions

Link to this function

changeset(webhook_log, attrs)

View Source
@spec changeset(t(), map()) :: Ecto.Changeset.t()

Standard changeset pattern we use for all data types

Link to this function

count_webhook_logs(args)

View Source
@spec count_webhook_logs(map()) :: integer()

Return the count of webhook_logs, using the same filter as list_webhook_logs

Link to this function

create_webhook_log(attrs \\ %{})

View Source
@spec create_webhook_log(map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Create a Webhook Log

@spec list_webhook_logs(map()) :: list()

Returns the list of webhook_logs. Since this is very basic and only listing functionality we added the status filter like this. In future we will put the status as virtual filed in the webhook logs itself.

Link to this function

update_webhook_log(log, attrs)

View Source
@spec update_webhook_log(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Update a Webhook Log