{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "event": {
          "type": "string",
          "const": "browser-login"
        },
        "url": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "expiresAt": {
          "type": "number"
        }
      },
      "required": ["event", "url", "code"],
      "additionalProperties": {}
    },
    {
      "type": "object",
      "properties": {
        "event": {
          "type": "string",
          "const": "operation"
        },
        "operation": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "minLength": 1
            },
            "id": {
              "type": "string",
              "minLength": 1
            },
            "scope": {
              "type": "object",
              "properties": {
                "apiUrl": {
                  "type": "string"
                },
                "organization": {
                  "type": "string"
                },
                "project": {
                  "type": "string",
                  "description": "Empty for organization-scoped project creation before its ID is known."
                },
                "environment": {
                  "type": "string",
                  "enum": ["test", "live"]
                }
              },
              "required": ["apiUrl", "organization", "project", "environment"],
              "additionalProperties": {}
            },
            "resume": {
              "minItems": 1,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": ["kind", "id", "scope", "resume"],
          "additionalProperties": {},
          "title": "Operation",
          "description": "A change the CLI sent that can be finished from a fresh process: run `domino` with `resume` as its arguments, which use pinned scope flags or the saved local operation journal. `scope` never contains a credential."
        }
      },
      "required": ["event", "operation"],
      "additionalProperties": {}
    }
  ],
  "title": "Event",
  "description": "A JSON line on stderr with --json, written while the command runs. Other stderr lines are prose."
}
