{
  "openapi": "3.1.0",
  "info": {
    "title": "Worker Manager HTTP API",
    "version": "1.1.0",
    "description": "The dashboard's own UI is a client of this API and nothing else, so anything the UI can do is\navailable here. Every route is served relative to the base path you passed to `setBasePath()`. A\nboard mounted at `/admin/queues` serves `GET /admin/queues/api/queues`.\n\n## Authentication\n\nThere is none. Worker Manager does not authenticate requests and never has: the board inherits\nwhatever protects the route it is mounted on, which is your application's own middleware. See\n[basic auth](https://naldomadeira.github.io/worker-manager/recipes/basic-auth) for the standalone case, and\n[access control hooks](https://naldomadeira.github.io/worker-manager/recipes/access-control-hooks) for per-route rules.\n\nThis matters when pointing a script or an agent at a running board. You send whatever credential\nyour own middleware expects, as an ordinary header, and Worker Manager neither issues nor validates\nit.\n\n## What can reject a call\n\nA route existing in this document does not mean a given board will answer it.\n\n- Queues registered with `readOnlyMode` reject every write with **405** and\n  `ERRORS.QUEUE_READ_ONLY`.\n- A [visibility guard](https://naldomadeira.github.io/worker-manager/recipes/visibility-guard) makes a queue answer **404** as though it were\n  not registered.\n- A [`handlerHooks.before`](https://naldomadeira.github.io/worker-manager/recipes/access-control-hooks) hook can reject any call, by default\n  with **403** and `ERRORS.FORBIDDEN`.\n- The four `/api/metrics/*` routes are registered only when a `historyProvider` is configured,\n  and individually only when the provider implements the matching capability. Without one they\n  are not mounted at all and answer **404**. See [historical metrics](https://naldomadeira.github.io/worker-manager/recipes/historical-metrics).\n\n## Request validation\n\nEvery query string and request body documented here is checked against its schema before the\nroute runs, and a request that does not match is refused with **400** before anything is read or\nwritten. The check runs after `handlerHooks.before`, so a hook that hides a route still answers\nfirst and a malformed request cannot be used to discover that a hidden route exists.\n\nQuery values arrive as strings and are coerced by the schema, which is why parameters such as\n`page` document a string alongside a number: the wire carries `page=2` and the handler receives\n`2`. An empty value reads as an omitted one, so `?page=` is the same request as no `page` at all.\n\n## Error bodies\n\nEvery failure returns `ErrorResponseBody`. Its `error` field is a translation key rather than a\nsentence, because the API never puts user-facing English in a response and the client owns the\nwording. `code` is the stable identifier to branch on when you handle a specific failure rather\nthan display it.\n\n```json\n{\n  \"error\": { \"key\": \"ERRORS.QUEUE_NOT_FOUND\" },\n  \"message\": { \"key\": \"ERRORS.JOB_IS_ACTIVE_DETAILS\", \"options\": { \"jobId\": \"42\" } },\n  \"code\": \"JOB_BELONGS_TO_JOB_SCHEDULER\"\n}\n```\n\n## Response shapes\n\nEvery response documented here is derived from the same schema the handler is type-checked\nagainst, so a handler that stops returning what it advertises does not compile. A board can also\ncheck its responses at runtime with `options.validateResponses`, which is meant for developing a\ncustom adapter or hook rather than for production.\n\n## Versioning\n\nThe `info.version` in the spec describes the shape of this HTTP API and is deliberately\nindependent of the `@worker-manager/api` package version, so a routine release does not churn the\ngenerated artifacts."
  },
  "tags": [
    {
      "name": "Queues",
      "description": "Board-level and per-queue operations. `GET /api/queues` is the one the dashboard polls: it returns counts for every queue the request may see, and the jobs of only the queue named in `activeQueue`, paged by `page` and `jobsPerPage`. Everything else here acts on a single queue named in the path, and is refused with **405** when that queue was registered read-only."
    },
    {
      "name": "Jobs",
      "description": "Reads and mutations for one job, addressed by its queue and id. Removing a job that is the pending run of a job scheduler is refused with **400** and the `JOB_BELONGS_TO_JOB_SCHEDULER` code, because deleting it alone would leave the schedule registered but unable to fire again."
    },
    {
      "name": "Job schedulers",
      "description": "Repeatable job definitions, meaning the schedule itself rather than the runs it produces. Listing spans every visible queue unless you name one. Editing a schedule replaces it, so a body that sets neither a cron pattern nor an interval is rejected."
    },
    {
      "name": "Metrics history",
      "description": "Long-retention counter and latency history. These routes exist only on a board configured with a `historyProvider`, and each one individually only when the provider implements the matching capability, so on a board without one they are not mounted and answer **404**."
    },
    {
      "name": "pg-boss",
      "description": "Every route of a board created with engine 'pg-boss' (`createPgBossBoard` from `@worker-manager/pg-boss`). Such a board registers these, the metrics history routes and the entry page, and none of the BullMQ routes; a BullMQ board registers none of these. Reads are SQL against the pg-boss schema, writes go through the pg-boss API. Mutations are not registered on a read-only board, and answer **409** `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard keeps writes off. Stable since 2.4.0: this part of the contract follows semver, so a breaking change only ships in a major."
    },
    {
      "name": "Datastore",
      "description": "Statistics for the datastore behind the board's first registered queue. Answers **404** when that queue is backed by something other than Redis that cannot report them, and **403** when the board sets `hideRedisDetails`."
    }
  ],
  "paths": {
    "/api/redis/stats": {
      "get": {
        "operationId": "getRedisStats",
        "summary": "Read the datastore statistics of the board's first visible queue.",
        "tags": [
          "Datastore"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetRedisStatsResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues": {
      "get": {
        "operationId": "getQueues",
        "summary": "List every visible queue with its job counts, and the jobs of the active queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "activeQueue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Status"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "1"
            }
          },
          {
            "name": "jobsPerPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "10"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetQueuesResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/job-schedulers": {
      "get": {
        "operationId": "getJobSchedulers",
        "summary": "List job schedulers across every visible queue, or one named queue.",
        "tags": [
          "Job schedulers"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetJobSchedulersResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/metrics": {
      "get": {
        "operationId": "getQueuesByQueueNameMetrics",
        "summary": "Read the BullMQ completed and failed counter metrics of one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetQueueMetricsResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/default-job-options": {
      "get": {
        "operationId": "getQueuesByQueueNameDefaultJobOptions",
        "summary": "Read the default job options configured on one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetQueueDefaultJobOptionsResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/workers": {
      "get": {
        "operationId": "getQueuesByQueueNameWorkers",
        "summary": "List the workers currently consuming one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetQueueWorkersResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/rate-limit": {
      "get": {
        "operationId": "getQueuesByQueueNameRateLimit",
        "summary": "Read the configured rate limit of one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetQueueRateLimitResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "putQueuesByQueueNameRateLimit",
        "summary": "Set the rate limit of one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRateLimitBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/job-data-schema": {
      "get": {
        "operationId": "getQueuesByQueueNameJobDataSchema",
        "summary": "Read the JSON Schema describing the job data of one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetQueueJobDataSchemaResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/pause": {
      "put": {
        "operationId": "putQueuesPause",
        "summary": "Pause every writable queue on the board.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/resume": {
      "put": {
        "operationId": "putQueuesResume",
        "summary": "Resume every writable queue on the board.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}/logs": {
      "get": {
        "operationId": "getQueuesByQueueNameByJobIdLogs",
        "summary": "Read the logs of one job.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetJobLogsResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}/flow": {
      "get": {
        "operationId": "getQueuesByQueueNameByJobIdFlow",
        "summary": "Read the flow tree one job belongs to.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "root",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "depth",
            "in": "query",
            "required": false,
            "schema": {
              "default": 10
            }
          },
          {
            "name": "maxChildren",
            "in": "query",
            "required": false,
            "schema": {
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetJobFlowResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}": {
      "get": {
        "operationId": "getQueuesByQueueNameByJobId",
        "summary": "Read one job and its current status.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetJobResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/add": {
      "post": {
        "operationId": "postQueuesByQueueNameAdd",
        "summary": "Add a job to one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddJobBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddJobResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/retry/{queueStatus}": {
      "put": {
        "operationId": "putQueuesByQueueNameRetryByQueueStatus",
        "summary": "Retry every job of one queue in the given status.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queueStatus",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetryAllResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/promote": {
      "put": {
        "operationId": "putQueuesByQueueNamePromote",
        "summary": "Promote every delayed job of one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/clean/{queueStatus}": {
      "put": {
        "operationId": "putQueuesByQueueNameCleanByQueueStatus",
        "summary": "Remove every job of one queue in the given status.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "queueStatus",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/pause": {
      "put": {
        "operationId": "putQueuesByQueueNamePause",
        "summary": "Pause one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/resume": {
      "put": {
        "operationId": "putQueuesByQueueNameResume",
        "summary": "Resume one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/concurrency": {
      "put": {
        "operationId": "putQueuesByQueueNameConcurrency",
        "summary": "Set the global concurrency limit of one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetGlobalConcurrencyBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/rate-limit/release": {
      "put": {
        "operationId": "putQueuesByQueueNameRateLimitRelease",
        "summary": "Release an active rate limit on one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/empty": {
      "put": {
        "operationId": "putQueuesByQueueNameEmpty",
        "summary": "Remove every job from one queue.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/obliterate": {
      "put": {
        "operationId": "putQueuesByQueueNameObliterate",
        "summary": "Obliterate one queue, removing the queue itself along with all of its jobs.",
        "tags": [
          "Queues"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ObliterateQueueBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/job-schedulers/{schedulerId}/remove": {
      "put": {
        "operationId": "putQueuesByQueueNameJobSchedulersBySchedulerIdRemove",
        "summary": "Remove one job scheduler.",
        "tags": [
          "Job schedulers"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedulerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. The response has no body."
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/job-schedulers/{schedulerId}": {
      "patch": {
        "operationId": "patchQueuesByQueueNameJobSchedulersBySchedulerId",
        "summary": "Update the schedule of one job scheduler.",
        "tags": [
          "Job schedulers"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedulerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateJobSchedulerBody"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Success. The response has no body."
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/job-schedulers/{schedulerId}/run": {
      "put": {
        "operationId": "putQueuesByQueueNameJobSchedulersBySchedulerIdRun",
        "summary": "Run one job scheduler now, leaving its schedule untouched.",
        "tags": [
          "Job schedulers"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "schedulerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunJobSchedulerResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}/retry": {
      "put": {
        "operationId": "putQueuesByQueueNameByJobIdRetry",
        "summary": "Retry one job.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. The response has no body."
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}/clean": {
      "put": {
        "operationId": "putQueuesByQueueNameByJobIdClean",
        "summary": "Remove one job.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. The response has no body."
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}/promote": {
      "put": {
        "operationId": "putQueuesByQueueNameByJobIdPromote",
        "summary": "Promote one delayed job.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. The response has no body."
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}/update-data": {
      "patch": {
        "operationId": "patchQueuesByQueueNameByJobIdUpdateData",
        "summary": "Replace the data of one job.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateJobDataBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}/delay": {
      "patch": {
        "operationId": "patchQueuesByQueueNameByJobIdDelay",
        "summary": "Reschedule one delayed job.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeJobDelayBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}/priority": {
      "patch": {
        "operationId": "patchQueuesByQueueNameByJobIdPriority",
        "summary": "Change the priority of one job.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeJobPriorityBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/queues/{queueName}/{jobId}/remove-unprocessed-children": {
      "put": {
        "operationId": "putQueuesByQueueNameByJobIdRemoveUnprocessedChildren",
        "summary": "Remove the unprocessed children of one job.",
        "tags": [
          "Jobs"
        ],
        "description": "Available only when: The board runs engine 'bullmq', the default.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemoveUnprocessedChildrenResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/history": {
      "get": {
        "operationId": "getMetricsHistory",
        "summary": "Read recorded job counter history over a time range.",
        "tags": [
          "Metrics history"
        ],
        "description": "Available only when: A `historyProvider` is configured on the board.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/MetricsHistoryGranularity",
              "default": "day"
            }
          },
          {
            "name": "queue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "metric",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/MetricsHistoryMetric"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMetricsHistoryResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/history/usage": {
      "get": {
        "operationId": "getMetricsHistoryUsage",
        "summary": "Report how much storage the recorded history occupies.",
        "tags": [
          "Metrics history"
        ],
        "description": "Available only when: A `historyProvider` is configured on the board. The provider implements `getUsage`.",
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMetricsHistoryUsageResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/history/purge": {
      "post": {
        "operationId": "postMetricsHistoryPurge",
        "summary": "Delete recorded history.",
        "tags": [
          "Metrics history"
        ],
        "description": "Available only when: A `historyProvider` is configured on the board. The provider implements `purge` and the board is not read-only.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PurgeMetricsHistoryBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PurgeMetricsHistoryResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/metrics/latency": {
      "get": {
        "operationId": "getMetricsLatency",
        "summary": "Read recorded runtime or wait-time latency percentiles over a time range.",
        "tags": [
          "Metrics history"
        ],
        "description": "Available only when: A `historyProvider` is configured on the board. The provider implements `getLatency`.",
        "parameters": [
          {
            "name": "metric",
            "in": "query",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/MetricsLatencyMetric"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "granularity",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "hour",
                "day",
                "range"
              ],
              "type": "string",
              "default": "day"
            }
          },
          {
            "name": "queue",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "percentiles",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMetricsLatencyResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/info": {
      "get": {
        "operationId": "getPgBossInfo",
        "summary": "Report the pg-boss installation, the schema guard and what the board can do.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'.",
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossInfoResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues": {
      "get": {
        "operationId": "getPgBossQueues",
        "summary": "List every visible pg-boss queue with its cached counters.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'.",
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossQueuesResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}": {
      "get": {
        "operationId": "getPgBossQueuesByQueueName",
        "summary": "Read one pg-boss queue.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossQueueResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/counts": {
      "get": {
        "operationId": "getPgBossQueuesByQueueNameCounts",
        "summary": "Count the jobs of one queue in each state, live and capped.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossStateCountsResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/depth": {
      "get": {
        "operationId": "getPgBossQueuesByQueueNameDepth",
        "summary": "Chart one queue's depth over time from pg-boss's own `queue_stats` snapshots, bucketed.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. Answers 409 `ERRORS.PGBOSS_FEATURE_UNAVAILABLE` on a schema without `queue_stats`.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "1h",
                "6h",
                "24h",
                "7d"
              ],
              "type": "string",
              "default": "24h"
            }
          },
          {
            "name": "aggregate",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "max",
                "avg"
              ],
              "type": "string",
              "default": "max"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossQueueDepthResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs": {
      "get": {
        "operationId": "getPgBossQueuesByQueueNameJobs",
        "summary": "List the jobs of one queue, newest first, one keyset page at a time.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PgBossJobState"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "20"
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "enum": [
                "desc",
                "asc"
              ],
              "type": "string",
              "default": "desc"
            }
          },
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "singletonKey",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossJobsResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "postPgBossQueuesByQueueNameJobs",
        "summary": "Send a job to one queue.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendPgBossJobBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendPgBossJobResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/{jobId}": {
      "get": {
        "operationId": "getPgBossQueuesByQueueNameJobsByJobId",
        "summary": "Read one job with its data and output.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossJobResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/{jobId}/dependencies": {
      "get": {
        "operationId": "getPgBossQueuesByQueueNameJobsByJobIdDependencies",
        "summary": "List the jobs one job waits on and the jobs waiting on it.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossDependenciesResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/jobs/{jobId}": {
      "get": {
        "operationId": "getPgBossJobsByJobId",
        "summary": "Find a job by id in whichever visible queue holds it, probing each queue on its primary key.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'.",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FindPgBossJobResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/warnings": {
      "get": {
        "operationId": "getPgBossWarnings",
        "summary": "List pg-boss's persisted warnings, newest first, one keyset page at a time. Warnings naming a hidden queue are left out.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. Answers 409 `ERRORS.PGBOSS_FEATURE_UNAVAILABLE` on a schema without the `warning` table.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "description": "One warning type only."
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "default": "25"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossWarningsResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/schedules": {
      "get": {
        "operationId": "getPgBossSchedules",
        "summary": "List the schedules of every visible queue, or one named queue.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'.",
        "parameters": [
          {
            "name": "queueName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPgBossSchedulesResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/schedules/preview": {
      "post": {
        "operationId": "postPgBossSchedulesPreview",
        "summary": "Work out the next occurrences of a cron or RRULE expression.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. Needs pg-boss 12.31 or later, else 409 `ERRORS.PGBOSS_PREVIEW_UNAVAILABLE`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewPgBossScheduleBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PreviewPgBossScheduleResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/retry": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameJobsRetry",
        "summary": "Retry failed jobs, up to 100 ids at once.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PgBossJobIdsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/{jobId}/retry": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameJobsByJobIdRetry",
        "summary": "Retry one failed job.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/cancel": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameJobsCancel",
        "summary": "Cancel jobs that have not finished, up to 100 ids at once.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PgBossJobIdsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/{jobId}/cancel": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameJobsByJobIdCancel",
        "summary": "Cancel one job that has not finished. A running handler is not interrupted.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/resume": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameJobsResume",
        "summary": "Resume cancelled jobs, up to 100 ids at once.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PgBossJobIdsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/{jobId}/resume": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameJobsByJobIdResume",
        "summary": "Resume one cancelled job.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/remove": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameJobsRemove",
        "summary": "Delete jobs, up to 100 ids at once.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PgBossJobIdsBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/jobs/{jobId}/remove": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameJobsByJobIdRemove",
        "summary": "Delete one job that is not active.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/retry-failed": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameRetryFailed",
        "summary": "Retry every failed job of one queue.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/delete-queued": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameDeleteQueued",
        "summary": "Delete every job of one queue that has not started.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/delete-stored": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameDeleteStored",
        "summary": "Delete every completed, cancelled and failed job of one queue.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/schedules": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameSchedules",
        "summary": "Create or replace the schedule with this key on one queue.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertPgBossScheduleBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossScheduleResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/pg-boss/queues/{queueName}/schedules/remove": {
      "put": {
        "operationId": "putPgBossQueuesByQueueNameSchedulesRemove",
        "summary": "Remove one schedule.",
        "tags": [
          "pg-boss"
        ],
        "description": "Available only when: The board was created with engine 'pg-boss'. The board is not read-only. Answers 409 `ERRORS.PGBOSS_WRITES_DISABLED` while the schema guard has writes off.",
        "parameters": [
          {
            "name": "queueName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemovePgBossScheduleBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PgBossCommandResponse"
                }
              }
            }
          },
          "default": {
            "description": "The call was rejected or failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseBody"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AppJob": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "name": {
            "type": "string"
          },
          "timestamp": {
            "type": "number"
          },
          "processedOn": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "processedBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "finishedOn": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "progress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            ]
          },
          "attempts": {
            "type": "number"
          },
          "failedReason": {
            "type": "string"
          },
          "stacktrace": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "delay": {
            "type": "number"
          },
          "opts": {},
          "data": {},
          "returnValue": {},
          "isFailed": {
            "type": "boolean"
          },
          "externalUrl": {
            "$ref": "#/components/schemas/ExternalJobUrl"
          },
          "groupId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "priority": {
            "type": "number"
          },
          "attemptsStarted": {
            "type": "number"
          },
          "stalledCounter": {
            "type": "number"
          },
          "deduplicationId": {
            "type": "string"
          },
          "deferredFailure": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "timestamp",
          "progress",
          "attempts",
          "stacktrace",
          "opts",
          "data",
          "returnValue",
          "isFailed"
        ]
      },
      "AppJobScheduler": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Scheduler id in BullMQ, repeatable key in Bull. Unique within its queue."
          },
          "queueName": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Name of the job the scheduler produces."
          },
          "pattern": {
            "type": "string"
          },
          "every": {
            "type": "number"
          },
          "tz": {
            "type": "string"
          },
          "limit": {
            "type": "number"
          },
          "startDate": {
            "type": "number"
          },
          "endDate": {
            "type": "number"
          },
          "next": {
            "type": "number",
            "description": "When the next run fires."
          },
          "nextRunJobId": {
            "type": "string",
            "description": "The delayed job the next run will be, so the dashboard can link straight to it."
          },
          "lastRun": {
            "type": "number",
            "description": "When the previous run started, derived from the pending delayed job. Absent when the scheduler has not run yet, when that job is gone, or on Bull, which cannot report it."
          },
          "lastRunJobId": {
            "type": "string",
            "description": "The job the previous run was, when it can still be named and has not been trimmed away by `removeOnComplete` and friends. Absent for cron schedules, whose previous fire time cannot be worked out without parsing the pattern."
          },
          "iterationCount": {
            "type": "number"
          },
          "template": {
            "type": "object",
            "properties": {
              "data": {},
              "opts": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "required": []
          }
        },
        "required": [
          "id",
          "queueName",
          "name"
        ]
      },
      "AppQueue": {
        "type": "object",
        "properties": {
          "delimiter": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "counts": {
            "$ref": "#/components/schemas/JobCounts"
          },
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppJob"
            }
          },
          "statuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Status"
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          },
          "readOnlyMode": {
            "type": "boolean"
          },
          "allowRetries": {
            "type": "boolean"
          },
          "allowCompletedRetries": {
            "type": "boolean"
          },
          "isPaused": {
            "type": "boolean"
          },
          "type": {
            "enum": [
              "bull",
              "bullmq"
            ],
            "type": "string",
            "description": "Deprecated: read `library` for the name and `capabilities` for behaviour."
          },
          "library": {
            "$ref": "#/components/schemas/QueueLibrary"
          },
          "datastore": {
            "$ref": "#/components/schemas/Datastore"
          },
          "capabilities": {
            "$ref": "#/components/schemas/QueueCapabilities"
          },
          "globalConcurrency": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "activeRateLimitTtl": {
            "type": "number"
          },
          "supportsGlobalRateLimit": {
            "type": "boolean",
            "description": "Deprecated: same as `capabilities.globalRateLimit`."
          },
          "jobSchedulerCount": {
            "type": "number"
          },
          "hasWorkers": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether anything is currently consuming this queue. `null` means the question could not be answered, which is not the same as nobody being there: the adapter may not implement it, the Redis provider may block `CLIENT LIST`, or `showWorkers` may be off."
          }
        },
        "required": [
          "delimiter",
          "name",
          "counts",
          "jobs",
          "statuses",
          "pagination",
          "readOnlyMode",
          "allowRetries",
          "allowCompletedRetries",
          "isPaused",
          "type",
          "library",
          "datastore",
          "capabilities",
          "globalConcurrency",
          "activeRateLimitTtl",
          "supportsGlobalRateLimit",
          "jobSchedulerCount",
          "hasWorkers"
        ]
      },
      "ErrorResponseBody": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "key": {
                "enum": [
                  "ERRORS.COMPLETED_RETRIES_DISABLED",
                  "ERRORS.FORBIDDEN",
                  "ERRORS.INTERNAL_SERVER_ERROR",
                  "ERRORS.INVALID_BEFORE_DATE",
                  "ERRORS.INVALID_CONCURRENCY",
                  "ERRORS.INVALID_DATE_RANGE",
                  "ERRORS.INVALID_GRANULARITY",
                  "ERRORS.INVALID_METRIC",
                  "ERRORS.INVALID_PRIORITY",
                  "ERRORS.INVALID_QUEUE",
                  "ERRORS.INVALID_QUERY_PARAM",
                  "ERRORS.INVALID_RATE_LIMIT",
                  "ERRORS.INVALID_REQUEST_BODY",
                  "ERRORS.INVALID_RUN_AT",
                  "ERRORS.INVALID_SCHEDULER_END_DATE",
                  "ERRORS.INVALID_SCHEDULER_INTERVAL",
                  "ERRORS.INVALID_SCHEDULER_LIMIT",
                  "ERRORS.INVALID_SCHEDULER_PATTERN",
                  "ERRORS.INVALID_SCHEDULER_SCHEDULE",
                  "ERRORS.JOB_BELONGS_TO_JOB_SCHEDULER",
                  "ERRORS.JOB_BELONGS_TO_JOB_SCHEDULER_DETAILS",
                  "ERRORS.JOB_EDIT_NOT_SUPPORTED",
                  "ERRORS.JOB_HAS_NO_UNPROCESSED_CHILDREN",
                  "ERRORS.JOB_IS_ACTIVE",
                  "ERRORS.JOB_IS_ACTIVE_DETAILS",
                  "ERRORS.JOB_NOT_DELAYED",
                  "ERRORS.JOB_NOT_FOUND",
                  "ERRORS.JOB_NOT_RETRIABLE",
                  "ERRORS.JOB_SCHEDULER_EDIT_NOT_SUPPORTED",
                  "ERRORS.JOB_SCHEDULER_NOT_FOUND",
                  "ERRORS.JOB_SCHEDULER_RUN_NOT_SUPPORTED",
                  "ERRORS.JOB_UNPROCESSED_CHILDREN_NOT_SUPPORTED",
                  "ERRORS.PGBOSS_BULK_LIMIT",
                  "ERRORS.PGBOSS_FEATURE_UNAVAILABLE",
                  "ERRORS.PGBOSS_INVALID_CURSOR",
                  "ERRORS.PGBOSS_INVALID_SCHEDULE",
                  "ERRORS.PGBOSS_JOB_NOT_FOUND",
                  "ERRORS.PGBOSS_JOB_STATE_CONFLICT",
                  "ERRORS.PGBOSS_NOT_INSTALLED",
                  "ERRORS.PGBOSS_PREVIEW_UNAVAILABLE",
                  "ERRORS.PGBOSS_QUERY_TIMEOUT",
                  "ERRORS.PGBOSS_SCHEMA_INCOMPATIBLE",
                  "ERRORS.PGBOSS_SCHEMA_MISMATCH",
                  "ERRORS.PGBOSS_SCHEMA_UNSUPPORTED",
                  "ERRORS.PGBOSS_SCHEMA_UNTESTED",
                  "ERRORS.PGBOSS_WRITER_UNAVAILABLE",
                  "ERRORS.PGBOSS_WRITES_DISABLED",
                  "ERRORS.QUEUE_HAS_ACTIVE_JOBS",
                  "ERRORS.QUEUE_HAS_ACTIVE_JOBS_DETAILS",
                  "ERRORS.QUEUE_NOT_FOUND",
                  "ERRORS.QUEUE_NOT_PAUSED",
                  "ERRORS.QUEUE_READ_ONLY",
                  "ERRORS.RATE_LIMIT_NOT_SUPPORTED",
                  "ERRORS.REDIS_STATS_UNAVAILABLE",
                  "ERRORS.REDIS_UNAVAILABLE",
                  "ERRORS.RETRIES_DISABLED",
                  "ERRORS.STATUS_NOT_RETRIABLE",
                  "ERRORS.UNAUTHORIZED",
                  "ERRORS.WORKERS_DISABLED"
                ],
                "type": "string"
              },
              "options": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "required": [
              "key"
            ],
            "description": "Headline of the failure. Always a key, so it can never be untranslatable English."
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "$ref": "#/components/schemas/TranslatableMessage"
              }
            ],
            "description": "Optional detail shown under the headline."
          },
          "code": {
            "type": "string",
            "description": "Stable identifier for clients that branch on a specific failure rather than display it."
          },
          "details": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "ExternalJobUrl": {
        "type": "object",
        "properties": {
          "displayText": {
            "type": "string"
          },
          "href": {
            "type": "string"
          }
        },
        "required": [
          "href"
        ]
      },
      "FlowDependencies": {
        "type": "object",
        "properties": {
          "processed": {
            "type": "number"
          },
          "unprocessed": {
            "type": "number"
          },
          "ignored": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          }
        },
        "required": [
          "processed",
          "unprocessed",
          "ignored",
          "failed"
        ]
      },
      "FlowNode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "progress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            ]
          },
          "queueName": {
            "type": "string"
          },
          "children": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FlowNode"
            }
          },
          "truncated": {
            "type": "boolean"
          },
          "dependencies": {
            "$ref": "#/components/schemas/FlowDependencies"
          },
          "ignoredChildFailureReasons": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "name",
          "state",
          "progress",
          "queueName",
          "children"
        ]
      },
      "JobCounts": {
        "type": "object",
        "propertyNames": {
          "$ref": "#/components/schemas/Status"
        },
        "additionalProperties": {
          "type": "number"
        }
      },
      "JobFlow": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "isFlowNode": {
            "type": "boolean"
          },
          "flowRoot": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FlowNode"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "nodeId",
          "isFlowNode",
          "flowRoot"
        ]
      },
      "JobState": {
        "enum": [
          "latest",
          "active",
          "waiting",
          "waiting-children",
          "prioritized",
          "completed",
          "failed",
          "delayed",
          "paused",
          "stuck",
          "unknown"
        ],
        "type": "string"
      },
      "JobStatus": {
        "enum": [
          "active",
          "waiting",
          "waiting-children",
          "prioritized",
          "completed",
          "failed",
          "delayed",
          "paused"
        ],
        "type": "string"
      },
      "MetricsHistoryGranularity": {
        "enum": [
          "hour",
          "day"
        ],
        "type": "string"
      },
      "MetricsHistoryMetric": {
        "enum": [
          "completed",
          "failed",
          "queueage"
        ],
        "type": "string"
      },
      "MetricsLatencyGranularity": {
        "enum": [
          "hour",
          "day",
          "range"
        ],
        "type": "string"
      },
      "MetricsLatencyMetric": {
        "enum": [
          "runtime",
          "waittime"
        ],
        "type": "string"
      },
      "MetricsHistoryPoint": {
        "type": "object",
        "properties": {
          "ts": {
            "type": "number",
            "description": "Bucket start, epoch ms (UTC-aligned to the granularity)."
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "ts",
          "value"
        ]
      },
      "MetricsHistoryPurgeResult": {
        "type": "object",
        "properties": {
          "keysDeleted": {
            "type": "number"
          },
          "fieldsDeleted": {
            "type": "number"
          }
        },
        "required": [
          "keysDeleted",
          "fieldsDeleted"
        ]
      },
      "MetricsHistoryQueueUsage": {
        "type": "object",
        "properties": {
          "queue": {
            "type": "string"
          },
          "keys": {
            "type": "number"
          },
          "bytes": {
            "type": "number"
          },
          "minutes": {
            "type": "number"
          },
          "days": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tiers": {
            "type": "object",
            "properties": {
              "minute": {
                "$ref": "#/components/schemas/MetricsHistoryTierUsage"
              },
              "hour": {
                "$ref": "#/components/schemas/MetricsHistoryTierUsage"
              },
              "day": {
                "$ref": "#/components/schemas/MetricsHistoryTierUsage"
              }
            },
            "required": [
              "minute",
              "hour",
              "day"
            ]
          }
        },
        "required": [
          "queue",
          "keys",
          "bytes",
          "minutes",
          "days",
          "tiers"
        ]
      },
      "MetricsHistoryTierUsage": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "number"
          },
          "bytes": {
            "type": "number"
          }
        },
        "required": [
          "keys",
          "bytes"
        ]
      },
      "MetricsHistoryUsage": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "number"
          },
          "bytes": {
            "type": "number"
          },
          "minutes": {
            "type": "number"
          },
          "oldestDay": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "newestDay": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tiers": {
            "type": "object",
            "properties": {
              "minute": {
                "$ref": "#/components/schemas/MetricsHistoryTierUsage"
              },
              "hour": {
                "$ref": "#/components/schemas/MetricsHistoryTierUsage"
              },
              "day": {
                "$ref": "#/components/schemas/MetricsHistoryTierUsage"
              }
            },
            "required": [
              "minute",
              "hour",
              "day"
            ]
          },
          "queues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsHistoryQueueUsage"
            }
          }
        },
        "required": [
          "keys",
          "bytes",
          "minutes",
          "oldestDay",
          "newestDay",
          "tiers",
          "queues"
        ]
      },
      "MetricsLatencyPoint": {
        "type": "object",
        "properties": {
          "ts": {
            "type": "number"
          },
          "count": {
            "type": "number",
            "description": "Samples behind this point, so low-confidence points can be dimmed rather than drawn."
          },
          "values": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "number"
            },
            "description": "Percentile to milliseconds, keyed by the stringified percentile."
          }
        },
        "required": [
          "ts",
          "count",
          "values"
        ]
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "pageCount": {
            "type": "number"
          },
          "range": {
            "type": "object",
            "properties": {
              "start": {
                "type": "number"
              },
              "end": {
                "type": "number"
              }
            },
            "required": [
              "start",
              "end"
            ]
          }
        },
        "required": [
          "pageCount",
          "range"
        ]
      },
      "QueueType": {
        "enum": [
          "bull",
          "bullmq"
        ],
        "type": "string"
      },
      "QueueLibrary": {
        "enum": [
          "bull",
          "bullmq",
          "bullmq-pro"
        ],
        "type": "string"
      },
      "QueueCapabilities": {
        "type": "object",
        "properties": {
          "pause": {
            "type": "boolean"
          },
          "logs": {
            "type": "boolean"
          },
          "progress": {
            "type": "boolean"
          },
          "flows": {
            "type": "boolean"
          },
          "promote": {
            "type": "boolean"
          },
          "updateData": {
            "type": "boolean"
          },
          "changeDelay": {
            "type": "boolean"
          },
          "changePriority": {
            "type": "boolean"
          },
          "removeUnprocessedChildren": {
            "type": "boolean"
          },
          "completedRetry": {
            "type": "boolean",
            "description": "Whether the library can retry a completed job at all. `allowCompletedRetries` is this combined with the board options."
          },
          "globalConcurrency": {
            "type": "boolean"
          },
          "globalRateLimit": {
            "type": "boolean"
          },
          "nativeMetrics": {
            "type": "boolean"
          },
          "workers": {
            "type": "boolean",
            "description": "Whether the queue can report its workers. False when `showWorkers` is off."
          },
          "jobSchedulers": {
            "type": "object",
            "properties": {
              "update": {
                "type": "boolean"
              },
              "run": {
                "type": "boolean"
              },
              "kinds": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/JobSchedulerKind"
                }
              }
            },
            "required": [
              "update",
              "run",
              "kinds"
            ]
          },
          "jobOptionsSchema": {
            "enum": [
              "bull",
              "bullmq"
            ],
            "type": "string",
            "description": "Which job options JSON Schema the add-job form validates against."
          }
        },
        "required": [
          "pause",
          "logs",
          "progress",
          "flows",
          "promote",
          "updateData",
          "changeDelay",
          "changePriority",
          "removeUnprocessedChildren",
          "completedRetry",
          "globalConcurrency",
          "globalRateLimit",
          "nativeMetrics",
          "workers",
          "jobSchedulers",
          "jobOptionsSchema"
        ],
        "description": "What the queue library behind this queue can do, so a client can decide which controls to offer without switching on `type`."
      },
      "JobSchedulerKind": {
        "enum": [
          "every",
          "cron"
        ],
        "type": "string"
      },
      "Datastore": {
        "enum": [
          "redis",
          "postgres"
        ],
        "type": "string"
      },
      "Status": {
        "enum": [
          "latest",
          "active",
          "waiting",
          "waiting-children",
          "prioritized",
          "completed",
          "failed",
          "delayed",
          "paused"
        ],
        "type": "string"
      },
      "QueueDefaultJobOptions": {
        "type": "object",
        "properties": {
          "attempts": {
            "type": "number"
          },
          "delay": {
            "type": "number"
          },
          "priority": {
            "type": "number"
          },
          "lifo": {
            "type": "boolean"
          },
          "backoff": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "delay": {
                    "type": "number"
                  }
                },
                "required": [
                  "type"
                ]
              }
            ]
          },
          "removeOnComplete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "properties": {
                  "age": {
                    "type": "number"
                  },
                  "count": {
                    "type": "number"
                  }
                },
                "required": []
              }
            ]
          },
          "removeOnFail": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "properties": {
                  "age": {
                    "type": "number"
                  },
                  "count": {
                    "type": "number"
                  }
                },
                "required": []
              }
            ]
          }
        },
        "required": []
      },
      "QueueMetrics": {
        "type": "object",
        "properties": {
          "meta": {
            "type": "object",
            "properties": {
              "count": {
                "type": "number"
              },
              "prevTS": {
                "type": "number"
              },
              "prevCount": {
                "type": "number"
              }
            },
            "required": [
              "count",
              "prevTS",
              "prevCount"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "count": {
            "type": "number"
          }
        },
        "required": [
          "meta",
          "data",
          "count"
        ]
      },
      "QueueRateLimit": {
        "type": "object",
        "properties": {
          "max": {
            "type": "number"
          },
          "duration": {
            "type": "number"
          }
        },
        "required": [
          "max",
          "duration"
        ]
      },
      "QueueWorker": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id of the worker connection: the Redis client id, or the PostgreSQL backend pid."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The name the worker was created with, or null for an unnamed worker."
          },
          "addr": {
            "type": "string",
            "description": "`ip:port` the worker connects from."
          },
          "age": {
            "type": "number",
            "description": "Seconds since the connection was opened."
          }
        },
        "required": [
          "id",
          "name",
          "addr",
          "age"
        ]
      },
      "RedisStats": {
        "type": "object",
        "properties": {
          "backend": {
            "enum": [
              "redis",
              "postgres"
            ],
            "type": "string",
            "description": "Absent on responses from older servers, which could only ever be Redis."
          },
          "version": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "standalone",
              "sentinel",
              "cluster"
            ],
            "type": "string"
          },
          "port": {
            "type": "number"
          },
          "os": {
            "type": "string"
          },
          "uptime": {
            "type": "number"
          },
          "memory": {
            "type": "object",
            "properties": {
              "total": {
                "type": "number"
              },
              "used": {
                "type": "number"
              },
              "fragmentationRatio": {
                "type": "number"
              },
              "peak": {
                "type": "number"
              }
            },
            "required": [
              "total",
              "used",
              "fragmentationRatio",
              "peak"
            ],
            "description": "Redis only. PostgreSQL reports disk, which is not the same thing and is not shown."
          },
          "clients": {
            "type": "object",
            "properties": {
              "connected": {
                "type": "number"
              },
              "blocked": {
                "type": "number"
              }
            },
            "required": [
              "connected",
              "blocked"
            ]
          }
        },
        "required": [
          "version",
          "port",
          "uptime",
          "clients"
        ]
      },
      "TranslatableMessage": {
        "type": "object",
        "properties": {
          "key": {
            "enum": [
              "ERRORS.COMPLETED_RETRIES_DISABLED",
              "ERRORS.FORBIDDEN",
              "ERRORS.INTERNAL_SERVER_ERROR",
              "ERRORS.INVALID_BEFORE_DATE",
              "ERRORS.INVALID_CONCURRENCY",
              "ERRORS.INVALID_DATE_RANGE",
              "ERRORS.INVALID_GRANULARITY",
              "ERRORS.INVALID_METRIC",
              "ERRORS.INVALID_PRIORITY",
              "ERRORS.INVALID_QUEUE",
              "ERRORS.INVALID_QUERY_PARAM",
              "ERRORS.INVALID_RATE_LIMIT",
              "ERRORS.INVALID_REQUEST_BODY",
              "ERRORS.INVALID_RUN_AT",
              "ERRORS.INVALID_SCHEDULER_END_DATE",
              "ERRORS.INVALID_SCHEDULER_INTERVAL",
              "ERRORS.INVALID_SCHEDULER_LIMIT",
              "ERRORS.INVALID_SCHEDULER_PATTERN",
              "ERRORS.INVALID_SCHEDULER_SCHEDULE",
              "ERRORS.JOB_BELONGS_TO_JOB_SCHEDULER",
              "ERRORS.JOB_BELONGS_TO_JOB_SCHEDULER_DETAILS",
              "ERRORS.JOB_EDIT_NOT_SUPPORTED",
              "ERRORS.JOB_HAS_NO_UNPROCESSED_CHILDREN",
              "ERRORS.JOB_IS_ACTIVE",
              "ERRORS.JOB_IS_ACTIVE_DETAILS",
              "ERRORS.JOB_NOT_DELAYED",
              "ERRORS.JOB_NOT_FOUND",
              "ERRORS.JOB_NOT_RETRIABLE",
              "ERRORS.JOB_SCHEDULER_EDIT_NOT_SUPPORTED",
              "ERRORS.JOB_SCHEDULER_NOT_FOUND",
              "ERRORS.JOB_SCHEDULER_RUN_NOT_SUPPORTED",
              "ERRORS.JOB_UNPROCESSED_CHILDREN_NOT_SUPPORTED",
              "ERRORS.PGBOSS_BULK_LIMIT",
              "ERRORS.PGBOSS_FEATURE_UNAVAILABLE",
              "ERRORS.PGBOSS_INVALID_CURSOR",
              "ERRORS.PGBOSS_INVALID_SCHEDULE",
              "ERRORS.PGBOSS_JOB_NOT_FOUND",
              "ERRORS.PGBOSS_JOB_STATE_CONFLICT",
              "ERRORS.PGBOSS_NOT_INSTALLED",
              "ERRORS.PGBOSS_PREVIEW_UNAVAILABLE",
              "ERRORS.PGBOSS_QUERY_TIMEOUT",
              "ERRORS.PGBOSS_SCHEMA_INCOMPATIBLE",
              "ERRORS.PGBOSS_SCHEMA_MISMATCH",
              "ERRORS.PGBOSS_SCHEMA_UNSUPPORTED",
              "ERRORS.PGBOSS_SCHEMA_UNTESTED",
              "ERRORS.PGBOSS_WRITER_UNAVAILABLE",
              "ERRORS.PGBOSS_WRITES_DISABLED",
              "ERRORS.QUEUE_HAS_ACTIVE_JOBS",
              "ERRORS.QUEUE_HAS_ACTIVE_JOBS_DETAILS",
              "ERRORS.QUEUE_NOT_FOUND",
              "ERRORS.QUEUE_NOT_PAUSED",
              "ERRORS.QUEUE_READ_ONLY",
              "ERRORS.RATE_LIMIT_NOT_SUPPORTED",
              "ERRORS.REDIS_STATS_UNAVAILABLE",
              "ERRORS.REDIS_UNAVAILABLE",
              "ERRORS.RETRIES_DISABLED",
              "ERRORS.STATUS_NOT_RETRIABLE",
              "ERRORS.UNAUTHORIZED",
              "ERRORS.WORKERS_DISABLED"
            ],
            "type": "string"
          },
          "options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "key"
        ]
      },
      "PgBossJobState": {
        "enum": [
          "created",
          "retry",
          "active",
          "completed",
          "cancelled",
          "failed"
        ],
        "type": "string"
      },
      "PgBossQueueCounts": {
        "type": "object",
        "properties": {
          "queued": {
            "type": "number"
          },
          "deferred": {
            "type": "number"
          },
          "ready": {
            "type": "number"
          },
          "active": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "queued",
          "deferred",
          "ready",
          "active",
          "failed",
          "total"
        ],
        "description": "pg-boss's cached counters, written by whichever instance last ran `supervise`. Not live: see `statsCapturedOn`."
      },
      "PgBossQueueSummary": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "policy": {
            "type": "string",
            "description": "standard, short, singleton, stately, exclusive or key_strict_fifo, as pg-boss reports it."
          },
          "partition": {
            "type": "boolean"
          },
          "counts": {
            "$ref": "#/components/schemas/PgBossQueueCounts"
          },
          "statsCapturedOn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When `counts` were last written. Null means no instance ever monitored it."
          },
          "readyHistory": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "deadLetter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "retryLimit": {
            "type": "number"
          },
          "retryDelay": {
            "type": "number"
          },
          "retryBackoff": {
            "type": "boolean"
          },
          "retryDelayMax": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "expireInSeconds": {
            "type": "number"
          },
          "retentionSeconds": {
            "type": "number"
          },
          "deleteAfterSeconds": {
            "type": "number"
          },
          "warningQueueSize": {
            "type": "number"
          },
          "backlogged": {
            "type": "boolean"
          },
          "heartbeatSeconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "notify": {
            "type": "boolean"
          },
          "singletonsActive": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduleCount": {
            "type": "number"
          },
          "createdOn": {
            "type": "string",
            "description": "ISO 8601."
          },
          "updatedOn": {
            "type": "string",
            "description": "ISO 8601."
          }
        },
        "required": [
          "name",
          "policy",
          "partition",
          "counts",
          "statsCapturedOn",
          "readyHistory",
          "deadLetter",
          "retryLimit",
          "retryDelay",
          "retryBackoff",
          "retryDelayMax",
          "expireInSeconds",
          "retentionSeconds",
          "deleteAfterSeconds",
          "warningQueueSize",
          "backlogged",
          "heartbeatSeconds",
          "notify",
          "singletonsActive",
          "scheduleCount",
          "createdOn",
          "updatedOn"
        ]
      },
      "PgBossStateCount": {
        "type": "object",
        "properties": {
          "count": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when the count did not finish inside the query timeout."
          },
          "capped": {
            "type": "boolean",
            "description": "True when there are more than `cap` jobs."
          }
        },
        "required": [
          "count",
          "capped"
        ]
      },
      "PgBossStateCounts": {
        "type": "object",
        "properties": {
          "created": {
            "$ref": "#/components/schemas/PgBossStateCount"
          },
          "retry": {
            "$ref": "#/components/schemas/PgBossStateCount"
          },
          "active": {
            "$ref": "#/components/schemas/PgBossStateCount"
          },
          "completed": {
            "$ref": "#/components/schemas/PgBossStateCount"
          },
          "cancelled": {
            "$ref": "#/components/schemas/PgBossStateCount"
          },
          "failed": {
            "$ref": "#/components/schemas/PgBossStateCount"
          }
        },
        "required": [
          "created",
          "retry",
          "active",
          "completed",
          "cancelled",
          "failed"
        ]
      },
      "PgBossDeadLetterSource": {
        "type": "object",
        "properties": {
          "queueName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "createdOn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "retryCount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "queueName",
          "id",
          "createdOn",
          "retryCount"
        ]
      },
      "PgBossJobSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "queueName": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/PgBossJobState"
          },
          "priority": {
            "type": "number"
          },
          "retryCount": {
            "type": "number"
          },
          "retryLimit": {
            "type": "number"
          },
          "createdOn": {
            "type": "string",
            "description": "ISO 8601."
          },
          "startAfter": {
            "type": "string",
            "description": "ISO 8601."
          },
          "startedOn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "completedOn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "singletonKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "groupId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "deferred": {
            "type": "boolean",
            "description": "A `created` job whose `startAfter` is still in the future."
          },
          "blocked": {
            "type": "boolean",
            "description": "A flow dependent still waiting on its parents."
          },
          "deadLetterSource": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PgBossDeadLetterSource"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "queueName",
          "state",
          "priority",
          "retryCount",
          "retryLimit",
          "createdOn",
          "startAfter",
          "startedOn",
          "completedOn",
          "singletonKey",
          "groupId",
          "deferred",
          "blocked",
          "deadLetterSource"
        ]
      },
      "PgBossJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "queueName": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/PgBossJobState"
          },
          "priority": {
            "type": "number"
          },
          "retryCount": {
            "type": "number"
          },
          "retryLimit": {
            "type": "number"
          },
          "createdOn": {
            "type": "string",
            "description": "ISO 8601."
          },
          "startAfter": {
            "type": "string",
            "description": "ISO 8601."
          },
          "startedOn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "completedOn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "singletonKey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "groupId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "deferred": {
            "type": "boolean",
            "description": "A `created` job whose `startAfter` is still in the future."
          },
          "blocked": {
            "type": "boolean",
            "description": "A flow dependent still waiting on its parents."
          },
          "deadLetterSource": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PgBossDeadLetterSource"
              },
              {
                "type": "null"
              }
            ]
          },
          "data": {},
          "output": {},
          "policy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "retryDelay": {
            "type": "number"
          },
          "retryBackoff": {
            "type": "boolean"
          },
          "retryDelayMax": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "expireInSeconds": {
            "type": "number"
          },
          "deleteAfterSeconds": {
            "type": "number"
          },
          "keepUntil": {
            "type": "string",
            "description": "ISO 8601."
          },
          "singletonOn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "groupTier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "heartbeatSeconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "heartbeatOn": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "deadLetter": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "blocking": {
            "type": "boolean"
          },
          "pendingDependencies": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "queueName",
          "state",
          "priority",
          "retryCount",
          "retryLimit",
          "createdOn",
          "startAfter",
          "startedOn",
          "completedOn",
          "singletonKey",
          "groupId",
          "deferred",
          "blocked",
          "deadLetterSource",
          "data",
          "output",
          "policy",
          "retryDelay",
          "retryBackoff",
          "retryDelayMax",
          "expireInSeconds",
          "deleteAfterSeconds",
          "keepUntil",
          "singletonOn",
          "groupTier",
          "heartbeatSeconds",
          "heartbeatOn",
          "deadLetter",
          "blocking",
          "pendingDependencies"
        ]
      },
      "PgBossDependencyRef": {
        "type": "object",
        "properties": {
          "queueName": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        },
        "required": [
          "queueName",
          "id"
        ]
      },
      "PgBossScheduleKind": {
        "enum": [
          "cron",
          "rrule"
        ],
        "type": "string"
      },
      "PgBossSchedule": {
        "type": "object",
        "properties": {
          "queueName": {
            "type": "string"
          },
          "key": {
            "type": "string",
            "description": "pg-boss's default key is the empty string."
          },
          "kind": {
            "$ref": "#/components/schemas/PgBossScheduleKind"
          },
          "expression": {
            "type": "string"
          },
          "timezone": {
            "type": "string"
          },
          "data": {},
          "options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "createdOn": {
            "type": "string",
            "description": "ISO 8601."
          },
          "updatedOn": {
            "type": "string",
            "description": "ISO 8601."
          },
          "lastJobId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "nextRuns": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The next occurrences, worked out on the server. Empty when the pg-boss in use cannot preview."
          }
        },
        "required": [
          "queueName",
          "key",
          "kind",
          "expression",
          "timezone",
          "data",
          "options",
          "createdOn",
          "updatedOn",
          "lastJobId",
          "nextRuns"
        ]
      },
      "PgBossCapabilities": {
        "type": "object",
        "properties": {
          "send": {
            "type": "boolean"
          },
          "retry": {
            "type": "boolean"
          },
          "cancel": {
            "type": "boolean"
          },
          "resume": {
            "type": "boolean"
          },
          "delete": {
            "type": "boolean"
          },
          "scheduleWrite": {
            "type": "boolean"
          },
          "schedulePreview": {
            "type": "boolean"
          },
          "bulk": {
            "type": "boolean"
          }
        },
        "required": [
          "send",
          "retry",
          "cancel",
          "resume",
          "delete",
          "scheduleWrite",
          "schedulePreview",
          "bulk"
        ]
      },
      "PgBossFeature": {
        "enum": [
          "queueCounters",
          "readyHistory",
          "schedules",
          "scheduleKind",
          "dependencies",
          "deadLetterSource",
          "queueDepth",
          "warnings"
        ],
        "type": "string"
      },
      "PgBossFeatures": {
        "type": "object",
        "properties": {
          "queueCounters": {
            "type": "boolean"
          },
          "readyHistory": {
            "type": "boolean"
          },
          "schedules": {
            "type": "boolean"
          },
          "scheduleKind": {
            "type": "boolean"
          },
          "dependencies": {
            "type": "boolean"
          },
          "deadLetterSource": {
            "type": "boolean"
          },
          "queueDepth": {
            "type": "boolean"
          },
          "warnings": {
            "type": "boolean"
          }
        },
        "required": [
          "queueCounters",
          "readyHistory",
          "schedules",
          "scheduleKind",
          "dependencies",
          "deadLetterSource",
          "queueDepth",
          "warnings"
        ],
        "description": "Which of the optional tables and columns the probed schema has."
      },
      "PgBossInfo": {
        "type": "object",
        "properties": {
          "schema": {
            "type": "string"
          },
          "delimiter": {
            "type": "string",
            "description": "What queue names are split on to group them in the sidebar. Empty for none."
          },
          "installed": {
            "type": "boolean"
          },
          "schemaVersion": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "supportedRange": {
            "type": "object",
            "properties": {
              "min": {
                "type": "number"
              },
              "max": {
                "type": "number"
              }
            },
            "required": [
              "min",
              "max"
            ]
          },
          "readable": {
            "type": "boolean"
          },
          "writable": {
            "type": "boolean"
          },
          "readOnly": {
            "type": "boolean",
            "description": "The board was created with `readOnly`."
          },
          "unavailableReason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TranslatableMessage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why nothing can be read, when `readable` is false."
          },
          "writesDisabledReason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TranslatableMessage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the board cannot write, when `writable` is false."
          },
          "untested": {
            "type": "boolean",
            "description": "The schema is newer than `supportedRange.max`. It is read by probing its columns, and written only when the board sets `allowUntestedSchema`."
          },
          "features": {
            "$ref": "#/components/schemas/PgBossFeatures"
          },
          "disabledFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PgBossFeature"
            },
            "description": "Features a schema of this version should have but this one lacks, so the board leaves them off."
          },
          "persistQueueStats": {
            "type": "boolean"
          },
          "persistWarnings": {
            "type": "boolean",
            "description": "The warning table holds at least one row, so some instance runs with `persistWarnings`."
          },
          "datastore": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RedisStats"
              },
              {
                "type": "null"
              }
            ]
          },
          "capabilities": {
            "$ref": "#/components/schemas/PgBossCapabilities"
          }
        },
        "required": [
          "schema",
          "delimiter",
          "installed",
          "schemaVersion",
          "supportedRange",
          "readable",
          "writable",
          "readOnly",
          "unavailableReason",
          "writesDisabledReason",
          "untested",
          "features",
          "disabledFeatures",
          "persistQueueStats",
          "persistWarnings",
          "datastore",
          "capabilities"
        ]
      },
      "PgBossQueueDepthPoint": {
        "type": "object",
        "properties": {
          "ts": {
            "type": "number",
            "description": "Bucket start, epoch milliseconds."
          },
          "deferred": {
            "type": "number"
          },
          "queued": {
            "type": "number"
          },
          "ready": {
            "type": "number"
          },
          "active": {
            "type": "number"
          },
          "failed": {
            "type": "number"
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "ts",
          "deferred",
          "queued",
          "ready",
          "active",
          "failed",
          "total"
        ]
      },
      "PgBossWarning": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "pg-boss's warning type, such as `slow_query` or `queue_backlog`. Free text: a newer pg-boss may add types."
          },
          "message": {
            "type": "string",
            "description": "The text pg-boss stored with the warning: data from the database, not a translation key."
          },
          "data": {},
          "queueName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The queue the warning is about, when its data names one."
          },
          "createdOn": {
            "type": "string",
            "description": "ISO 8601."
          }
        },
        "required": [
          "id",
          "type",
          "message",
          "data",
          "queueName",
          "createdOn"
        ]
      },
      "GetQueuesResponse": {
        "type": "object",
        "properties": {
          "queues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppQueue"
            }
          }
        },
        "required": [
          "queues"
        ]
      },
      "GetJobResponse": {
        "type": "object",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/AppJob"
          },
          "status": {
            "$ref": "#/components/schemas/JobState"
          }
        },
        "required": [
          "job",
          "status"
        ]
      },
      "AddJobResponse": {
        "type": "object",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/AppJob"
          },
          "status": {
            "$ref": "#/components/schemas/JobState"
          }
        },
        "required": [
          "job",
          "status"
        ]
      },
      "GetQueueMetricsResponse": {
        "type": "object",
        "properties": {
          "completed": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueueMetrics"
              },
              {
                "type": "null"
              }
            ]
          },
          "failed": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueueMetrics"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "completed",
          "failed"
        ]
      },
      "GetQueueDefaultJobOptionsResponse": {
        "type": "object",
        "properties": {
          "attempts": {
            "type": "number"
          },
          "delay": {
            "type": "number"
          },
          "priority": {
            "type": "number"
          },
          "lifo": {
            "type": "boolean"
          },
          "backoff": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "delay": {
                    "type": "number"
                  }
                },
                "required": [
                  "type"
                ]
              }
            ]
          },
          "removeOnComplete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "properties": {
                  "age": {
                    "type": "number"
                  },
                  "count": {
                    "type": "number"
                  }
                },
                "required": []
              }
            ]
          },
          "removeOnFail": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "number"
              },
              {
                "type": "object",
                "properties": {
                  "age": {
                    "type": "number"
                  },
                  "count": {
                    "type": "number"
                  }
                },
                "required": []
              }
            ]
          }
        },
        "required": []
      },
      "GetQueueJobDataSchemaResponse": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      },
      "GetQueueRateLimitResponse": {
        "type": "object",
        "properties": {
          "supported": {
            "type": "boolean"
          },
          "rateLimit": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/QueueRateLimit"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "supported",
          "rateLimit"
        ]
      },
      "GetQueueWorkersResponse": {
        "type": "object",
        "properties": {
          "workers": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/QueueWorker"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "workers"
        ]
      },
      "GetJobSchedulersResponse": {
        "type": "object",
        "properties": {
          "schedulers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppJobScheduler"
            }
          }
        },
        "required": [
          "schedulers"
        ]
      },
      "RunJobSchedulerResponse": {
        "type": "object",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/AppJob"
          }
        },
        "required": [
          "job"
        ],
        "description": "The one-off job an on-demand scheduler run produced."
      },
      "GetJobLogsResponse": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "GetJobFlowResponse": {
        "type": "object",
        "properties": {
          "nodeId": {
            "type": "string"
          },
          "isFlowNode": {
            "type": "boolean"
          },
          "flowRoot": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FlowNode"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "nodeId",
          "isFlowNode",
          "flowRoot"
        ]
      },
      "GetRedisStatsResponse": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/RedisStats"
          },
          {
            "type": "object",
            "properties": {},
            "required": []
          }
        ]
      },
      "GetMetricsHistoryResponse": {
        "type": "object",
        "properties": {
          "completed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsHistoryPoint"
            }
          },
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsHistoryPoint"
            }
          },
          "queueage": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsHistoryPoint"
            }
          }
        },
        "required": [],
        "description": "Keyed by the metrics that were asked for: `completed` and `failed` when the request names no metric, and just the named one when it does."
      },
      "GetMetricsHistoryUsageResponse": {
        "type": "object",
        "properties": {
          "keys": {
            "type": "number"
          },
          "bytes": {
            "type": "number"
          },
          "minutes": {
            "type": "number"
          },
          "oldestDay": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "newestDay": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tiers": {
            "type": "object",
            "properties": {
              "minute": {
                "$ref": "#/components/schemas/MetricsHistoryTierUsage"
              },
              "hour": {
                "$ref": "#/components/schemas/MetricsHistoryTierUsage"
              },
              "day": {
                "$ref": "#/components/schemas/MetricsHistoryTierUsage"
              }
            },
            "required": [
              "minute",
              "hour",
              "day"
            ]
          },
          "queues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MetricsHistoryQueueUsage"
            }
          }
        },
        "required": [
          "keys",
          "bytes",
          "minutes",
          "oldestDay",
          "newestDay",
          "tiers",
          "queues"
        ]
      },
      "GetMetricsLatencyResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/MetricsLatencyPoint"
        }
      },
      "PurgeMetricsHistoryResponse": {
        "type": "object",
        "properties": {
          "keysDeleted": {
            "type": "number"
          },
          "fieldsDeleted": {
            "type": "number"
          }
        },
        "required": [
          "keysDeleted",
          "fieldsDeleted"
        ]
      },
      "RetryAllResponse": {
        "type": "object",
        "properties": {
          "retried": {
            "type": "number"
          },
          "skipped": {
            "type": "number",
            "description": "Ids that were in the set with no job behind them, so a partial retry is visible."
          }
        },
        "required": [
          "retried",
          "skipped"
        ]
      },
      "RemoveUnprocessedChildrenResponse": {
        "type": "object",
        "properties": {
          "removed": {
            "type": "number"
          }
        },
        "required": [
          "removed"
        ]
      },
      "JobBelongsToJobSchedulerResponse": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/TranslatableMessage"
          },
          "message": {
            "$ref": "#/components/schemas/TranslatableMessage"
          },
          "code": {
            "const": "JOB_BELONGS_TO_JOB_SCHEDULER"
          },
          "jobSchedulerId": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "message",
          "code",
          "jobSchedulerId"
        ],
        "description": "Returned with a 400 when the job being cleaned is the next run of a job scheduler. Removing that run on its own would leave the scheduler registered but unable to fire again, so the caller has to decide whether to remove the whole scheduler instead."
      },
      "EmptyResponse": {
        "type": "object",
        "properties": {},
        "required": []
      },
      "GetPgBossInfoResponse": {
        "type": "object",
        "properties": {
          "schema": {
            "type": "string"
          },
          "delimiter": {
            "type": "string",
            "description": "What queue names are split on to group them in the sidebar. Empty for none."
          },
          "installed": {
            "type": "boolean"
          },
          "schemaVersion": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "supportedRange": {
            "type": "object",
            "properties": {
              "min": {
                "type": "number"
              },
              "max": {
                "type": "number"
              }
            },
            "required": [
              "min",
              "max"
            ]
          },
          "readable": {
            "type": "boolean"
          },
          "writable": {
            "type": "boolean"
          },
          "readOnly": {
            "type": "boolean",
            "description": "The board was created with `readOnly`."
          },
          "unavailableReason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TranslatableMessage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why nothing can be read, when `readable` is false."
          },
          "writesDisabledReason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TranslatableMessage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Why the board cannot write, when `writable` is false."
          },
          "untested": {
            "type": "boolean",
            "description": "The schema is newer than `supportedRange.max`. It is read by probing its columns, and written only when the board sets `allowUntestedSchema`."
          },
          "features": {
            "$ref": "#/components/schemas/PgBossFeatures"
          },
          "disabledFeatures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PgBossFeature"
            },
            "description": "Features a schema of this version should have but this one lacks, so the board leaves them off."
          },
          "persistQueueStats": {
            "type": "boolean"
          },
          "persistWarnings": {
            "type": "boolean",
            "description": "The warning table holds at least one row, so some instance runs with `persistWarnings`."
          },
          "datastore": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RedisStats"
              },
              {
                "type": "null"
              }
            ]
          },
          "capabilities": {
            "$ref": "#/components/schemas/PgBossCapabilities"
          }
        },
        "required": [
          "schema",
          "delimiter",
          "installed",
          "schemaVersion",
          "supportedRange",
          "readable",
          "writable",
          "readOnly",
          "unavailableReason",
          "writesDisabledReason",
          "untested",
          "features",
          "disabledFeatures",
          "persistQueueStats",
          "persistWarnings",
          "datastore",
          "capabilities"
        ]
      },
      "GetPgBossQueuesResponse": {
        "type": "object",
        "properties": {
          "queues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PgBossQueueSummary"
            }
          }
        },
        "required": [
          "queues"
        ]
      },
      "GetPgBossQueueResponse": {
        "type": "object",
        "properties": {
          "queue": {
            "$ref": "#/components/schemas/PgBossQueueSummary"
          }
        },
        "required": [
          "queue"
        ]
      },
      "GetPgBossStateCountsResponse": {
        "type": "object",
        "properties": {
          "counts": {
            "$ref": "#/components/schemas/PgBossStateCounts"
          },
          "cap": {
            "type": "number"
          }
        },
        "required": [
          "counts",
          "cap"
        ]
      },
      "GetPgBossJobsResponse": {
        "type": "object",
        "properties": {
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PgBossJobSummary"
            }
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null on the last page."
          },
          "prevCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null on the first page."
          }
        },
        "required": [
          "jobs",
          "nextCursor",
          "prevCursor"
        ]
      },
      "GetPgBossJobResponse": {
        "type": "object",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/PgBossJob"
          }
        },
        "required": [
          "job"
        ]
      },
      "FindPgBossJobResponse": {
        "type": "object",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/PgBossJobSummary"
          }
        },
        "required": [
          "job"
        ]
      },
      "GetPgBossQueueDepthResponse": {
        "type": "object",
        "properties": {
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PgBossQueueDepthPoint"
            },
            "description": "pg-boss's own `queue_stats` snapshots, folded into buckets. Empty when no instance persists them for this queue."
          },
          "from": {
            "type": "number"
          },
          "to": {
            "type": "number"
          },
          "bucketSeconds": {
            "type": "number"
          }
        },
        "required": [
          "points",
          "from",
          "to",
          "bucketSeconds"
        ]
      },
      "GetPgBossWarningsResponse": {
        "type": "object",
        "properties": {
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PgBossWarning"
            }
          },
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null on the oldest page."
          },
          "prevCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null on the newest page."
          }
        },
        "required": [
          "warnings",
          "nextCursor",
          "prevCursor"
        ]
      },
      "GetPgBossDependenciesResponse": {
        "type": "object",
        "properties": {
          "dependencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PgBossDependencyRef"
            }
          },
          "dependents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PgBossDependencyRef"
            }
          }
        },
        "required": [
          "dependencies",
          "dependents"
        ]
      },
      "GetPgBossSchedulesResponse": {
        "type": "object",
        "properties": {
          "schedules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PgBossSchedule"
            }
          }
        },
        "required": [
          "schedules"
        ]
      },
      "PreviewPgBossScheduleResponse": {
        "type": "object",
        "properties": {
          "runs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "runs"
        ]
      },
      "SendPgBossJobResponse": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when pg-boss dropped the job, for instance a duplicate singleton."
          }
        },
        "required": [
          "id"
        ]
      },
      "PgBossCommandResponse": {
        "type": "object",
        "properties": {
          "requested": {
            "type": "number"
          },
          "affected": {
            "type": "number"
          }
        },
        "required": [
          "requested",
          "affected"
        ]
      },
      "PgBossScheduleResponse": {
        "type": "object",
        "properties": {
          "schedule": {
            "$ref": "#/components/schemas/PgBossSchedule"
          }
        },
        "required": [
          "schedule"
        ]
      },
      "GetQueuesQuery": {
        "type": "object",
        "properties": {
          "activeQueue": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "page": {
            "type": "string",
            "default": "1"
          },
          "jobsPerPage": {
            "type": "string",
            "default": "10"
          }
        },
        "required": []
      },
      "GetJobSchedulersQuery": {
        "type": "object",
        "properties": {
          "queueName": {
            "type": "string"
          }
        },
        "required": []
      },
      "GetJobFlowQuery": {
        "type": "object",
        "properties": {
          "root": {},
          "depth": {
            "default": 10
          },
          "maxChildren": {
            "default": 20
          }
        },
        "required": []
      },
      "GetMetricsHistoryQuery": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "granularity": {
            "$ref": "#/components/schemas/MetricsHistoryGranularity",
            "default": "day"
          },
          "queue": {
            "type": "string"
          },
          "metric": {
            "$ref": "#/components/schemas/MetricsHistoryMetric"
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "GetMetricsLatencyQuery": {
        "type": "object",
        "properties": {
          "metric": {
            "$ref": "#/components/schemas/MetricsLatencyMetric"
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "granularity": {
            "enum": [
              "hour",
              "day",
              "range"
            ],
            "type": "string",
            "default": "day"
          },
          "queue": {
            "type": "string"
          },
          "percentiles": {
            "type": "string"
          }
        },
        "required": [
          "metric"
        ]
      },
      "AddJobBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "default": ""
          },
          "data": {},
          "options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "default": {}
          }
        },
        "required": []
      },
      "UpdateJobDataBody": {
        "type": "object",
        "properties": {
          "jobData": {}
        },
        "required": [
          "jobData"
        ]
      },
      "ChangeJobDelayBody": {
        "type": "object",
        "properties": {
          "runAt": {
            "type": "number"
          }
        },
        "required": [
          "runAt"
        ]
      },
      "ChangeJobPriorityBody": {
        "type": "object",
        "properties": {
          "priority": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2097151
          }
        },
        "required": [
          "priority"
        ]
      },
      "SetGlobalConcurrencyBody": {
        "type": "object",
        "properties": {
          "concurrency": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "concurrency"
        ]
      },
      "SetRateLimitBody": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "max": {
                "type": "null"
              },
              "duration": {}
            },
            "required": []
          },
          {
            "type": "object",
            "properties": {
              "max": {
                "type": "integer",
                "minimum": 1
              },
              "duration": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "max",
              "duration"
            ]
          }
        ]
      },
      "ObliterateQueueBody": {
        "type": "object",
        "properties": {
          "force": {
            "type": "boolean"
          }
        },
        "required": []
      },
      "UpdateJobSchedulerBody": {
        "type": "object",
        "properties": {
          "pattern": {
            "type": "string"
          },
          "every": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "tz": {
            "type": "string"
          },
          "limit": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "endDate": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "PurgeMetricsHistoryBody": {
        "type": "object",
        "properties": {
          "queue": {
            "type": "string"
          },
          "before": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "description": "ISO `YYYY-MM-DD`. Drops days strictly before it; omit to drop everything in scope."
          }
        },
        "required": []
      },
      "GetPgBossJobsQuery": {
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/PgBossJobState"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "string",
            "default": "20"
          },
          "order": {
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "default": "desc"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "singletonKey": {
            "type": "string"
          }
        },
        "required": []
      },
      "GetPgBossSchedulesQuery": {
        "type": "object",
        "properties": {
          "queueName": {
            "type": "string"
          }
        },
        "required": []
      },
      "GetPgBossQueueDepthQuery": {
        "type": "object",
        "properties": {
          "range": {
            "enum": [
              "1h",
              "6h",
              "24h",
              "7d"
            ],
            "type": "string",
            "default": "24h"
          },
          "aggregate": {
            "enum": [
              "max",
              "avg"
            ],
            "type": "string",
            "default": "max"
          }
        },
        "required": []
      },
      "GetPgBossWarningsQuery": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "One warning type only."
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "type": "string",
            "default": "25"
          }
        },
        "required": []
      },
      "PreviewPgBossScheduleBody": {
        "type": "object",
        "properties": {
          "expression": {
            "type": "string",
            "minLength": 1
          },
          "tz": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 5
          }
        },
        "required": [
          "expression"
        ]
      },
      "SendPgBossJobBody": {
        "type": "object",
        "properties": {
          "data": {},
          "options": {
            "type": "object",
            "properties": {
              "priority": {
                "type": "integer"
              },
              "startAfter": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "description": "An ISO date, or a number of seconds from now."
              },
              "singletonKey": {
                "type": "string"
              },
              "retryLimit": {
                "type": "integer",
                "minimum": 0
              },
              "retryDelay": {
                "type": "integer",
                "minimum": 0
              },
              "retryBackoff": {
                "type": "boolean"
              },
              "expireInSeconds": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [],
            "default": {}
          }
        },
        "required": []
      },
      "PgBossJobIdsBody": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "maxItems": 100
          }
        },
        "required": [
          "ids"
        ]
      },
      "UpsertPgBossScheduleBody": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "default": ""
          },
          "cron": {
            "type": "string",
            "minLength": 1
          },
          "tz": {
            "type": "string"
          },
          "data": {},
          "options": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {},
            "default": {}
          },
          "missed": {
            "enum": [
              "skip",
              "once"
            ],
            "type": "string"
          }
        },
        "required": [
          "cron"
        ]
      },
      "RemovePgBossScheduleBody": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "default": ""
          }
        },
        "required": []
      }
    }
  }
}
