push module lets the signed-in user manage which event types they receive as a push notification. Because @sublay/js authenticates as an end user, these acting-user-scoped endpoints fit naturally — the server derives the user from the token, so there is no userId parameter.
Requires the
push bundle installed on the project. See Notification Preferences & Mute for the model and the full event palette.chat module (chat.muteConversation).
getNotificationPreferences
Reads the signed-in user’s disabled push types. Returns an empty array (all-on) when no preferences are set.Promise<NotificationPreferences>
updateNotificationPreferences
Replaces the signed-in user’s disabled-types set (upsert). Send the complete set you want stored, not a delta; only valid event type names are accepted.The complete set of event types to disable for push. Values must be from
PUSH_EVENT_TYPES (see the event palette); unknown names are rejected. Pass [] to re-enable everything.Promise<NotificationPreferences> (the stored, deduplicated set).
