toolsOzoneInboxPutNotificationPreferences function

Future<XRPCResponse<InboxPutNotificationPreferencesOutput>> toolsOzoneInboxPutNotificationPreferences({
  1. bool? reports,
  2. bool? account,
  3. bool? labels,
  4. required ServiceContext $ctx,
  5. String? $service,
  6. Map<String, String>? $headers,
  7. Map<String, String>? $unknown,
})

Update the authenticated account's moderation push notification preferences. Only provided categories are updated; omitted categories retain their values. At least one category must be provided. Returns all three preferences. These preferences do not hide in-app inbox activity.

Implementation

Future<XRPCResponse<InboxPutNotificationPreferencesOutput>>
toolsOzoneInboxPutNotificationPreferences({
  bool? reports,
  bool? account,
  bool? labels,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.toolsOzoneInboxPutNotificationPreferences,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    if (reports != null) 'reports': reports,
    if (account != null) 'account': account,
    if (labels != null) 'labels': labels,
  },
  to: const InboxPutNotificationPreferencesOutputConverter().fromJson,
);