toolsOzoneQueueCreateQueue function

Future<XRPCResponse<QueueCreateQueueOutput>> toolsOzoneQueueCreateQueue({
  1. required String name,
  2. List<QueueCreateQueueSubjectTypes>? subjectTypes,
  3. String? collection,
  4. List<String>? reportTypes,
  5. String? description,
  6. required ServiceContext $ctx,
  7. String? $service,
  8. Map<String, String>? $headers,
  9. Map<String, String>? $unknown,
})

Create a new moderation queue. A queue can have optional matching criteria that ozone's queue router will use to match reports. A queue with no criteria must have reports assigned to it manually via (1) modTool.meta.queueId in tools.ozone.moderation.emitEvent or (2) tools.ozone.report.reassignQueue.

Implementation

Future<XRPCResponse<QueueCreateQueueOutput>> toolsOzoneQueueCreateQueue({
  required String name,
  List<QueueCreateQueueSubjectTypes>? subjectTypes,
  String? collection,
  List<String>? reportTypes,
  String? description,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.toolsOzoneQueueCreateQueue,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'name': name,
    if (subjectTypes != null)
      'subjectTypes': subjectTypes.map((e) => e.toJson()).toList(),
    if (collection != null) 'collection': collection,
    if (reportTypes != null) 'reportTypes': reportTypes,
    if (description != null) 'description': description,
  },
  to: const QueueCreateQueueOutputConverter().fromJson,
);