Chatto.Api.V1.NotificationPolicyService (chatto v0.1.0)

Copy Markdown View Source

Reads and updates the authenticated viewer's server, room-group, and room notification delivery policies.

Summary

Functions

Gets an explicit bounded set of policies. Missing and inaccessible scopes are omitted, and duplicate scopes are de-duplicated in first-seen order.

Gets explicit and effective modes for one policy scope. Returns NOT_FOUND for a missing room group or room, and PERMISSION_DENIED when the viewer is not a current member of a requested room.

Atomically sets or clears selected overrides at one explicit scope.

Functions

batch_get_notification_policies(client, request)

@spec batch_get_notification_policies(
  Req.Request.t(),
  Chatto.Api.V1.BatchGetNotificationPoliciesRequest.t()
) ::
  {:ok, Chatto.Api.V1.BatchGetNotificationPoliciesResponse.t()}
  | {:error, Chatto.Connect.Error.t()}

Gets an explicit bounded set of policies. Missing and inaccessible scopes are omitted, and duplicate scopes are de-duplicated in first-seen order.

get_notification_policy(client, request)

@spec get_notification_policy(
  Req.Request.t(),
  Chatto.Api.V1.NotificationPolicyServiceGetNotificationPolicyRequest.t()
) ::
  {:ok,
   Chatto.Api.V1.NotificationPolicyServiceGetNotificationPolicyResponse.t()}
  | {:error, Chatto.Connect.Error.t()}

Gets explicit and effective modes for one policy scope. Returns NOT_FOUND for a missing room group or room, and PERMISSION_DENIED when the viewer is not a current member of a requested room.

update_notification_policy(client, request)

@spec update_notification_policy(
  Req.Request.t(),
  Chatto.Api.V1.NotificationPolicyServiceUpdateNotificationPolicyRequest.t()
) ::
  {:ok,
   Chatto.Api.V1.NotificationPolicyServiceUpdateNotificationPolicyResponse.t()}
  | {:error, Chatto.Connect.Error.t()}

Atomically sets or clears selected overrides at one explicit scope.