{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bugbug-io/json-schema/bugbug-io-v2-suite-run-schema.json",
  "title": "V2SuiteRun",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bugbug-io-openapi.json#/components/schemas/V2SuiteRun",
  "type": "object",
  "properties": {
    "beforeAfterAllEnabled": {
      "type": "boolean",
      "readOnly": true
    },
    "duration": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "ended": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    },
    "errorCode": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "name": {
      "type": "string",
      "readOnly": true
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "parallelRun": {
      "type": [
        "boolean",
        "null"
      ],
      "readOnly": true
    },
    "parallelSlots": {
      "type": [
        "integer",
        "null"
      ],
      "readOnly": true,
      "title": "Max possible slots for parallel run"
    },
    "profileId": {
      "type": "string",
      "format": "uuid",
      "readOnly": true
    },
    "profileName": {
      "type": "string",
      "readOnly": true
    },
    "queued": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    },
    "runMode": {
      "enum": [
        "server",
        "local",
        "recording"
      ],
      "type": "string",
      "description": "* `server` - cloud\n* `local` - local\n* `recording` - recording",
      "x-spec-enum-id": "396ab9b642f5073e",
      "readOnly": true
    },
    "sequence": {
      "type": [
        "integer",
        "null"
      ],
      "readOnly": true
    },
    "started": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    },
    "status": {
      "enum": [
        "error",
        "passed",
        "failed",
        "running",
        "auto_retrying",
        "stopped",
        "queued",
        "paused",
        "skipped",
        "recording",
        "initialized"
      ],
      "type": "string",
      "description": "* `error` - Error\n* `passed` - Passed\n* `failed` - Failed\n* `running` - Running\n* `auto_retrying` - Auto Retrying\n* `stopped` - Stopped\n* `queued` - Queued\n* `paused` - Paused\n* `skipped` - Skipped\n* `recording` - Recording\n* `initialized` - Initialized",
      "x-spec-enum-id": "d6540c730bc09488",
      "readOnly": true
    },
    "suiteId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "readOnly": true
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2RunTag"
      },
      "readOnly": true
    },
    "testRuns": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/V2TestRun"
      },
      "readOnly": true
    },
    "triggeredBy": {
      "type": "string",
      "readOnly": true
    },
    "userId": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true
    },
    "webappUrl": {
      "type": "string",
      "readOnly": true
    }
  },
  "required": [
    "beforeAfterAllEnabled",
    "duration",
    "ended",
    "errorCode",
    "id",
    "name",
    "notes",
    "parallelRun",
    "parallelSlots",
    "profileId",
    "profileName",
    "queued",
    "runMode",
    "sequence",
    "started",
    "status",
    "suiteId",
    "tags",
    "testRuns",
    "triggeredBy",
    "userId",
    "webappUrl"
  ],
  "$defs": {
    "V2RunTag": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "readOnly": true
        },
        "color": {
          "type": "string",
          "readOnly": true
        },
        "inherited": {
          "type": "boolean",
          "readOnly": true
        }
      },
      "required": [
        "color",
        "id",
        "inherited",
        "name"
      ]
    },
    "V2TestRun": {
      "type": "object",
      "properties": {
        "browserName": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "browserHeight": {
          "type": [
            "integer",
            "null"
          ],
          "readOnly": true
        },
        "browserVersion": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "browserWidth": {
          "type": [
            "integer",
            "null"
          ],
          "readOnly": true
        },
        "duration": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "ended": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "readOnly": true
        },
        "errorCode": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "extensionVersion": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "id": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "isAutoRetried": {
          "type": "boolean",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "readOnly": true
        },
        "notes": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "osName": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true
        },
        "profileId": {
          "type": "string",
          "format": "uuid",
          "readOnly": true
        },
        "profileName": {
          "type": "string",
          "readOnly": true
        },
        "queued": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "readOnly": true
        },
        "runMode": {
          "enum": [
            "server",
            "local",
            "recording"
          ],
          "type": "string",
          "description": "* `server` - cloud\n* `local` - local\n* `recording` - recording",
          "x-spec-enum-id": "396ab9b642f5073e",
          "readOnly": true
        },
        "runProfileId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "readOnly": true
        },
        "screenSizeType": {
          "enum": [
            "desktop",
            "mobile",
            "custom"
          ],
          "type": "string",
          "description": "* `desktop` - Desktop\n* `mobile` - Mobile\n* `custom` - Custom",
          "x-spec-enum-id": "c0cdf94a62475084",
          "readOnly": true
        },
        "section": {
          "enum": [
            "main",
            "before_all",
            "after_all"
          ],
          "type": "string",
          "description": "* `main` - Main\n* `before_all` - Before all\n* `after_all` - After all",
          "x-spec-enum-id": "e59cc6e0718a4fdc",
          "readOnly": true
        },
        "sequence": {
          "type": [
            "integer",
            "null"
          ],
          "readOnly": true
        },
        "started": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "readOnly": true
        },
        "status": {
          "enum": [
            "error",
            "passed",
            "failed",
            "running",
            "auto_retrying",
            "stopped",
            "queued",
            "paused",
            "skipped",
            "recording",
            "initialized"
          ],
          "type": "string",
          "description": "* `error` - Error\n* `passed` - Passed\n* `failed` - Failed\n* `running` - Running\n* `auto_retrying` - Auto Retrying\n* `stopped` - Stopped\n* `queued` - Queued\n* `paused` - Paused\n* `skipped` - Skipped\n* `recording` - Recording\n* `initialized` - Initialized",
          "x-spec-enum-id": "d6540c730bc09488",
          "readOnly": true
        },
        "stepsRuns": {
          "type": "string",
          "readOnly": true
        },
        "suiteRunId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "readOnly": true
        },
        "tags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/V2RunTag"
          },
          "readOnly": true
        },
        "testId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "readOnly": true
        },
        "triggeredBy": {
          "enum": [
            "user",
            "api",
            "webhook",
            "scheduler",
            "github",
            "cli",
            "agent",
            "vercel"
          ],
          "type": "string",
          "description": "* `user` - User\n* `api` - Api\n* `webhook` - Webhook\n* `scheduler` - Scheduler\n* `github` - Github\n* `cli` - Cli\n* `agent` - Agent\n* `vercel` - Vercel",
          "x-spec-enum-id": "2ea33822d75ad557",
          "readOnly": true
        },
        "userId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "readOnly": true
        },
        "webappUrl": {
          "type": "string",
          "readOnly": true
        }
      },
      "required": [
        "browserHeight",
        "browserName",
        "browserVersion",
        "browserWidth",
        "duration",
        "ended",
        "errorCode",
        "extensionVersion",
        "id",
        "isAutoRetried",
        "name",
        "notes",
        "osName",
        "profileId",
        "profileName",
        "queued",
        "runMode",
        "runProfileId",
        "screenSizeType",
        "section",
        "sequence",
        "started",
        "status",
        "stepsRuns",
        "suiteRunId",
        "tags",
        "testId",
        "triggeredBy",
        "userId",
        "webappUrl"
      ]
    }
  }
}