toolsOzoneQueueCreateQueue top-level constant

Map<String, dynamic> const toolsOzoneQueueCreateQueue

tools.ozone.queue.createQueue

Implementation

const toolsOzoneQueueCreateQueue = <String, dynamic>{
  "lexicon": 1,
  "id": "tools.ozone.queue.createQueue",
  "defs": {
    "main": {
      "type": "procedure",
      "description":
          "Create a new moderation queue. Will fail if the queue configuration conflicts with an existing queue.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["name", "subjectTypes", "reportTypes"],
          "properties": {
            "name": {
              "type": "string",
              "description": "Display name for the queue (must be unique)",
            },
            "subjectTypes": {
              "type": "array",
              "description": "Subject types this queue accepts",
              "items": {
                "type": "string",
                "knownValues": ["account", "record", "message"],
              },
              "minLength": 1,
            },
            "collection": {
              "type": "string",
              "format": "nsid",
              "description":
                  "Collection name for record subjects. Required if subjectTypes includes 'record'.",
            },
            "reportTypes": {
              "type": "array",
              "description": "Report reason types (fully qualified NSIDs)",
              "items": {"type": "string"},
              "minLength": 1,
              "maxLength": 25,
            },
            "description": {
              "type": "string",
              "description": "Optional description of the queue",
            },
          },
        },
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": ["queue"],
          "properties": {
            "queue": {"type": "ref", "ref": "tools.ozone.queue.defs#queueView"},
          },
        },
      },
      "errors": [
        {
          "name": "ConflictingQueue",
          "description":
              "The queue configuration conflicts with an existing queue",
        },
      ],
    },
  },
};