toolsOzoneReportCreateActivity function
Register an activity on a report. For state-change activity types, validates the transition and updates report.status atomically.
Implementation
Future<XRPCResponse<ReportCreateActivityOutput>>
toolsOzoneReportCreateActivity({
required int reportId,
required UReportCreateActivityActivity activity,
String? internalNote,
String? publicNote,
bool? isAutomated,
required ServiceContext $ctx,
String? $service,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await $ctx.post(
ns.toolsOzoneReportCreateActivity,
service: $service,
headers: {'Content-type': 'application/json', ...?$headers},
body: {
...?$unknown,
'reportId': reportId,
'activity': activity.toJson(),
if (internalNote != null) 'internalNote': internalNote,
if (publicNote != null) 'publicNote': publicNote,
if (isAutomated != null) 'isAutomated': isAutomated,
},
to: const ReportCreateActivityOutputConverter().fromJson,
);