toolsOzoneReportCloseReports function

Future<XRPCResponse<ReportCloseReportsOutput>> toolsOzoneReportCloseReports({
  1. required String subject,
  2. bool? includeAllOwned,
  3. int? reportId,
  4. List<String>? reportTypes,
  5. List<String>? excludedReportTypes,
  6. int? actionEventId,
  7. String? internalNote,
  8. bool? isAutomated,
  9. Map<String, dynamic>? meta,
  10. required ServiceContext $ctx,
  11. String? $service,
  12. Map<String, String>? $headers,
  13. Map<String, String>? $unknown,
})

Close eligible reports on a subject matching the given criteria, optionally linking an existing moderation action. Assigned, escalated, and actively assigned reports are excluded unless explicitly targeted by reportId. Reports whose current status does not permit a transition to closed are skipped silently.

Implementation

Future<XRPCResponse<ReportCloseReportsOutput>> toolsOzoneReportCloseReports({
  required String subject,
  bool? includeAllOwned,
  int? reportId,
  List<String>? reportTypes,
  List<String>? excludedReportTypes,
  int? actionEventId,
  String? internalNote,
  bool? isAutomated,
  Map<String, dynamic>? meta,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.toolsOzoneReportCloseReports,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'subject': subject,
    if (includeAllOwned != null) 'includeAllOwned': includeAllOwned,
    if (reportId != null) 'reportId': reportId,
    if (reportTypes != null) 'reportTypes': reportTypes,
    if (excludedReportTypes != null) 'excludedReportTypes': excludedReportTypes,
    if (actionEventId != null) 'actionEventId': actionEventId,
    if (internalNote != null) 'internalNote': internalNote,
    if (isAutomated != null) 'isAutomated': isAutomated,
    if (meta != null) 'meta': meta,
  },
  to: const ReportCloseReportsOutputConverter().fromJson,
);