toolsOzoneModerationScheduleAction function

Future<XRPCResponse<ScheduledActionResults>> toolsOzoneModerationScheduleAction({
  1. required UModerationScheduleActionAction action,
  2. required List<String> subjects,
  3. required String createdBy,
  4. required SchedulingConfig scheduling,
  5. ModTool? modTool,
  6. required ServiceContext $ctx,
  7. Map<String, String>? $headers,
  8. Map<String, String>? $unknown,
})

Schedule a moderation action to be executed at a future time

Implementation

Future<XRPCResponse<ScheduledActionResults>>
toolsOzoneModerationScheduleAction({
  required UModerationScheduleActionAction action,
  required List<String> subjects,
  required String createdBy,
  required SchedulingConfig scheduling,
  ModTool? modTool,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.toolsOzoneModerationScheduleAction,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'action': action.toJson(),
    'subjects': subjects,
    'createdBy': createdBy,
    'scheduling': scheduling.toJson(),
    if (modTool != null) 'modTool': modTool.toJson(),
  },
  to: const ScheduledActionResultsConverter().fromJson,
);