ExStreamClient.Operations.Chat.RetentionPolicy (ExStreamClient v0.2.0)

Copy Markdown View Source

Modules for interacting with the chat/retention_policy group of Stream APIs

API Reference: https://getstream.github.io/protocol/?urls.primaryName=Chat%20v2

Shared options

All functions in this module accept the following optional parameters:

  • api_key - API key to use. If not provided, the default key from config will be used
  • authenticate_as_user - User id to authenticate. If not provided, the server key will be used
  • api_key_secret - API key secret to use. If not provided, the default secret from config will be used
  • endpoint - endpoint to use. If not provided, the default endpoint from config will be used
  • client - HTTP client to use. Must implement ExStreamClient.Http.Behavior. Defaults to ExStreamClient.Http
  • req_opts - all of these options will be forwarded to req. See Req.new/1 for available options

Summary

Functions

Removes a retention policy for the app. Server-side only.

Returns all retention policies configured for the app. Server-side only.

Returns filtered and sorted retention cleanup run history for the app. Supports filter_conditions on 'policy' (possible values: 'old-messages', 'inactive-channels') and 'date' fields. Server-side only.

Creates or updates a retention policy for the app. Server-side only.

Types

shared_opts()

@type shared_opts() :: [
  api_key: String.t(),
  api_key_secret: String.t(),
  authenticate_as_user: String.t(),
  client: module(),
  endpoint: String.t(),
  req_opts: keyword()
]

Functions

delete_retention_policy(payload, opts \\ [])

Removes a retention policy for the app. Server-side only.

Required Arguments:

Optional Arguments:

get_retention_policy(opts \\ [])

@spec get_retention_policy(shared_opts()) ::
  {:ok, ExStreamClient.Model.GetRetentionPolicyResponse.t()} | {:error, any()}

Returns all retention policies configured for the app. Server-side only.

Optional Arguments:

get_retention_policy_runs(payload, opts \\ [])

Returns filtered and sorted retention cleanup run history for the app. Supports filter_conditions on 'policy' (possible values: 'old-messages', 'inactive-channels') and 'date' fields. Server-side only.

Required Arguments:

Optional Arguments:

set_retention_policy(payload, opts \\ [])

Creates or updates a retention policy for the app. Server-side only.

Required Arguments:

Optional Arguments: