appBskyNotificationPutPreferencesV2 function

Future<XRPCResponse<NotificationPutPreferencesV2Output>> appBskyNotificationPutPreferencesV2({
  1. ChatPreference? chat,
  2. FilterablePreference? follow,
  3. FilterablePreference? like,
  4. FilterablePreference? likeViaRepost,
  5. FilterablePreference? mention,
  6. FilterablePreference? quote,
  7. FilterablePreference? reply,
  8. FilterablePreference? repost,
  9. FilterablePreference? repostViaRepost,
  10. Preference? starterpackJoined,
  11. Preference? subscribedPost,
  12. Preference? unverified,
  13. Preference? verified,
  14. required ServiceContext $ctx,
  15. Map<String, String>? $headers,
  16. Map<String, String>? $unknown,
})

Set notification-related preferences for an account. Requires auth.

Implementation

Future<XRPCResponse<NotificationPutPreferencesV2Output>>
appBskyNotificationPutPreferencesV2({
  ChatPreference? chat,
  FilterablePreference? follow,
  FilterablePreference? like,
  FilterablePreference? likeViaRepost,
  FilterablePreference? mention,
  FilterablePreference? quote,
  FilterablePreference? reply,
  FilterablePreference? repost,
  FilterablePreference? repostViaRepost,
  Preference? starterpackJoined,
  Preference? subscribedPost,
  Preference? unverified,
  Preference? verified,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.appBskyNotificationPutPreferencesV2,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    if (chat != null) 'chat': chat.toJson(),
    if (follow != null) 'follow': follow.toJson(),
    if (like != null) 'like': like.toJson(),
    if (likeViaRepost != null) 'likeViaRepost': likeViaRepost.toJson(),
    if (mention != null) 'mention': mention.toJson(),
    if (quote != null) 'quote': quote.toJson(),
    if (reply != null) 'reply': reply.toJson(),
    if (repost != null) 'repost': repost.toJson(),
    if (repostViaRepost != null) 'repostViaRepost': repostViaRepost.toJson(),
    if (starterpackJoined != null)
      'starterpackJoined': starterpackJoined.toJson(),
    if (subscribedPost != null) 'subscribedPost': subscribedPost.toJson(),
    if (unverified != null) 'unverified': unverified.toJson(),
    if (verified != null) 'verified': verified.toJson(),
  },
  to: const NotificationPutPreferencesV2OutputConverter().fromJson,
);