Knock.Messages (Knock v0.4.14) View Source

Knock resources for accessing messages

Link to this section Summary

Functions

Batch update messages statuses: seen, read, interacted, archived, unseen, unread, unarchived

Returns information about the message.

Returns a paginated response with message's activities.

Returns information about the message content.

Returns a paginated response with message's events.

Returns paginated messages for the provided environment

Sets status of message: seen, read, archived

Unsets status of message: unseen, unread, unarchived

Link to this section Functions

Link to this function

batch_set_status(client, message_ids, status)

View Source

Specs

batch_set_status(Knock.Client.t(), [String.t()], String.t()) ::
  Knock.Api.response()

Batch update messages statuses: seen, read, interacted, archived, unseen, unread, unarchived

Specs

Returns information about the message.

Link to this function

get_activities(client, message_id, options \\ [])

View Source

Specs

get_activities(Knock.Client.t(), String.t(), Keyword.t()) ::
  Knock.Api.response()

Returns a paginated response with message's activities.

Available optional parameters:

#

- page_size: specify size of the page to be returned by the api. (max limit: 50)

- after: after cursor for pagination

- before: before cursor for pagination

- trigger_data: filter activities by trigger payload data

Link to this function

get_content(client, message_id)

View Source

Specs

get_content(Knock.Client.t(), String.t()) :: Knock.Api.response()

Returns information about the message content.

Link to this function

get_events(client, message_id, options \\ [])

View Source

Specs

Returns a paginated response with message's events.

Available optional parameters:

#

- page_size: specify size of the page to be returned by the api. (max limit: 50)

- after: after cursor for pagination

- before: before cursor for pagination

Link to this function

list(client, options \\ [])

View Source

Specs

Returns paginated messages for the provided environment

Available optional parameters:

#

- page_size: specify size of the page to be returned by the api. (max limit: 50)

- after: after cursor for pagination

- before: before cursor for pagination

- status: list of statuses to filter messages with

- tenant: tenant_id to filter messages with

- channel_id: channel_id to filter messages with

- source: workflow key to filter messages with

- trigger_data: trigger payload to filter messages with

Link to this function

set_status(client, message_id, status)

View Source

Specs

Sets status of message: seen, read, archived

Link to this function

unset_status(client, message_id, status)

View Source

Specs

unset_status(Knock.Client.t(), String.t(), String.t()) :: Knock.Api.response()

Unsets status of message: unseen, unread, unarchived