@kingsleyweb/bun-ui 0.0.0-stage → 3.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +80 -2
  3. package/app/docs/App.tsx +72 -0
  4. package/app/docs/api/client.ts +303 -0
  5. package/app/docs/api/contract.ts +24 -0
  6. package/app/docs/api/docs.ts +38 -0
  7. package/app/docs/api/errors.ts +144 -0
  8. package/app/docs/boot.tsx +58 -0
  9. package/app/docs/components/Badge.tsx +65 -0
  10. package/app/docs/components/Button.tsx +37 -0
  11. package/app/docs/components/Card.tsx +41 -0
  12. package/app/docs/components/ConfirmDialog.tsx +173 -0
  13. package/app/docs/components/CopyButton.tsx +68 -0
  14. package/app/docs/components/Dialog.tsx +230 -0
  15. package/app/docs/components/EmptyState.tsx +34 -0
  16. package/app/docs/components/ErrorView.tsx +70 -0
  17. package/app/docs/components/Field.tsx +93 -0
  18. package/app/docs/components/JsonEditor.tsx +151 -0
  19. package/app/docs/components/JsonView.tsx +338 -0
  20. package/app/docs/components/KeyValue.tsx +63 -0
  21. package/app/docs/components/ProblemBanner.tsx +116 -0
  22. package/app/docs/components/ScreenErrorBoundary.tsx +141 -0
  23. package/app/docs/components/Spinner.tsx +33 -0
  24. package/app/docs/components/Table.tsx +33 -0
  25. package/app/docs/components/Tabs.tsx +226 -0
  26. package/app/docs/components/classNames.ts +4 -0
  27. package/app/docs/components/components.css +691 -0
  28. package/app/docs/components/copy.ts +89 -0
  29. package/app/docs/components/fieldContext.ts +29 -0
  30. package/app/docs/components/inputValues.ts +142 -0
  31. package/app/docs/components/inputs.tsx +387 -0
  32. package/app/docs/components/jsonParse.ts +338 -0
  33. package/app/docs/components/listKeys.ts +30 -0
  34. package/app/docs/config.ts +86 -0
  35. package/app/docs/context.ts +33 -0
  36. package/app/docs/embed.ts +74 -0
  37. package/app/docs/env.d.ts +2 -0
  38. package/app/docs/format.ts +9 -0
  39. package/app/docs/hooks/useUrlTab.ts +16 -0
  40. package/app/docs/main.tsx +11 -0
  41. package/app/docs/queryClient.ts +54 -0
  42. package/app/docs/router.tsx +194 -0
  43. package/app/docs/routing.ts +194 -0
  44. package/app/docs/screens/docs/document.ts +27 -0
  45. package/app/docs/screens/docs/http/OperationView.tsx +407 -0
  46. package/app/docs/screens/docs/http/Sidebar.tsx +190 -0
  47. package/app/docs/screens/docs/http/TryItPanel.tsx +603 -0
  48. package/app/docs/screens/docs/http/http.css +405 -0
  49. package/app/docs/screens/docs/http/index.tsx +395 -0
  50. package/app/docs/screens/docs/http/model.ts +604 -0
  51. package/app/docs/screens/docs/http/tryIt.ts +455 -0
  52. package/app/docs/screens/docs/permissions.ts +6 -0
  53. package/app/docs/screens/docs/schema/Prose.tsx +43 -0
  54. package/app/docs/screens/docs/schema/SchemaTree.tsx +319 -0
  55. package/app/docs/screens/docs/schema/index.ts +30 -0
  56. package/app/docs/screens/docs/schema/resolve.ts +466 -0
  57. package/app/docs/screens/docs/schema/schema.css +137 -0
  58. package/app/docs/screens/docs/schema/skeleton.ts +92 -0
  59. package/app/docs/screens/docs/viewer.tsx +154 -0
  60. package/app/docs/screens/docs/ws/InlineText.tsx +25 -0
  61. package/app/docs/screens/docs/ws/PayloadSchema.tsx +39 -0
  62. package/app/docs/screens/docs/ws/format.ts +82 -0
  63. package/app/docs/screens/docs/ws/index.tsx +286 -0
  64. package/app/docs/screens/docs/ws/items.tsx +786 -0
  65. package/app/docs/screens/docs/ws/model.ts +1178 -0
  66. package/app/docs/screens/docs/ws/panels.tsx +440 -0
  67. package/app/docs/screens/docs/ws/ws.css +231 -0
  68. package/app/docs/shortcuts.ts +94 -0
  69. package/app/docs/styles/base.css +847 -0
  70. package/app/docs/styles/tokens.css +143 -0
  71. package/app/docs/theme.ts +56 -0
  72. package/app/kit/unauthorized.ts +222 -0
  73. package/dist/docs/assets/main-0rchxtv5.js +18 -0
  74. package/dist/docs/assets/main-0rchxtv5.js.map +99 -0
  75. package/dist/docs/assets/main-cqgyvs86.css +1 -0
  76. package/dist/docs/manifest.json +26 -0
  77. package/dist/jobs/assets/AddFlowDialog-h6xkgx9b.js +6 -0
  78. package/dist/jobs/assets/AddFlowDialog-h6xkgx9b.js.map +11 -0
  79. package/dist/jobs/assets/AddFlowDialog-n7gtc84v.css +1 -0
  80. package/dist/jobs/assets/added-cbwsxv3e.js +4 -0
  81. package/dist/jobs/assets/added-cbwsxv3e.js.map +11 -0
  82. package/dist/jobs/assets/bodies-yyw5hmrp.js +6 -0
  83. package/dist/jobs/assets/bodies-yyw5hmrp.js.map +10 -0
  84. package/dist/jobs/assets/channel-tgkvqm8y.js +4 -0
  85. package/dist/jobs/assets/channel-tgkvqm8y.js.map +10 -0
  86. package/dist/jobs/assets/channelChecks-s4yz4yhw.js +4 -0
  87. package/dist/jobs/assets/channelChecks-s4yz4yhw.js.map +10 -0
  88. package/dist/jobs/assets/index-02427smp.css +1 -0
  89. package/dist/jobs/assets/index-09z2cjft.js +4 -0
  90. package/dist/jobs/assets/index-09z2cjft.js.map +16 -0
  91. package/dist/jobs/assets/index-18bn0gvy.css +1 -0
  92. package/dist/jobs/assets/index-47pxmyxn.js +4 -0
  93. package/dist/jobs/assets/index-47pxmyxn.js.map +10 -0
  94. package/dist/jobs/assets/index-4e55z986.js +4 -0
  95. package/dist/jobs/assets/index-4e55z986.js.map +11 -0
  96. package/dist/jobs/assets/index-5c933424.js +4 -0
  97. package/dist/jobs/assets/index-5c933424.js.map +18 -0
  98. package/dist/jobs/assets/index-5kbyqspm.css +1 -0
  99. package/dist/jobs/assets/index-5ng37hk6.css +1 -0
  100. package/dist/jobs/assets/index-5w8w7fvc.css +1 -0
  101. package/dist/jobs/assets/index-71qs5qyx.css +1 -0
  102. package/dist/jobs/assets/index-btpg4r8b.css +1 -0
  103. package/dist/jobs/assets/index-d5r5n0mm.js +4 -0
  104. package/dist/jobs/assets/index-d5r5n0mm.js.map +23 -0
  105. package/dist/jobs/assets/index-e0yy2skq.css +1 -0
  106. package/dist/jobs/assets/index-hs60b25v.js +10 -0
  107. package/dist/jobs/assets/index-hs60b25v.js.map +62 -0
  108. package/dist/jobs/assets/index-k2smrr70.js +4 -0
  109. package/dist/jobs/assets/index-k2smrr70.js.map +9 -0
  110. package/dist/jobs/assets/index-q24jw3w9.js +4 -0
  111. package/dist/jobs/assets/index-q24jw3w9.js.map +32 -0
  112. package/dist/jobs/assets/index-qfb80xen.css +1 -0
  113. package/dist/jobs/assets/index-rtynx6wj.js +4 -0
  114. package/dist/jobs/assets/index-rtynx6wj.js.map +10 -0
  115. package/dist/jobs/assets/live-6k7s6358.js +4 -0
  116. package/dist/jobs/assets/live-6k7s6358.js.map +10 -0
  117. package/dist/jobs/assets/main-0jmeh6mq.js +6 -0
  118. package/dist/jobs/assets/main-0jmeh6mq.js.map +12 -0
  119. package/dist/jobs/assets/main-3yj6bv90.js +5 -0
  120. package/dist/jobs/assets/main-3yj6bv90.js.map +10 -0
  121. package/dist/jobs/assets/main-4g69fn3x.js +5 -0
  122. package/dist/jobs/assets/main-4g69fn3x.js.map +10 -0
  123. package/dist/jobs/assets/main-4gte3eqq.js +5 -0
  124. package/dist/jobs/assets/main-4gte3eqq.js.map +10 -0
  125. package/dist/jobs/assets/main-4j1fcevh.js +5 -0
  126. package/dist/jobs/assets/main-4j1fcevh.js.map +10 -0
  127. package/dist/jobs/assets/main-54qwkz28.css +1 -0
  128. package/dist/jobs/assets/main-5grjvsy7.js +5 -0
  129. package/dist/jobs/assets/main-5grjvsy7.js.map +11 -0
  130. package/dist/jobs/assets/main-5zbx60gq.js +5 -0
  131. package/dist/jobs/assets/main-5zbx60gq.js.map +11 -0
  132. package/dist/jobs/assets/main-9prgjhg4.js +5 -0
  133. package/dist/jobs/assets/main-9prgjhg4.js.map +10 -0
  134. package/dist/jobs/assets/main-a250ffk7.js +17 -0
  135. package/dist/jobs/assets/main-a250ffk7.js.map +115 -0
  136. package/dist/jobs/assets/main-d6ge7w08.js +5 -0
  137. package/dist/jobs/assets/main-d6ge7w08.js.map +10 -0
  138. package/dist/jobs/assets/main-gngzht43.js +5 -0
  139. package/dist/jobs/assets/main-gngzht43.js.map +10 -0
  140. package/dist/jobs/assets/main-hg0hrg8j.js +5 -0
  141. package/dist/jobs/assets/main-hg0hrg8j.js.map +10 -0
  142. package/dist/jobs/assets/main-hm1ng3yg.js +5 -0
  143. package/dist/jobs/assets/main-hm1ng3yg.js.map +12 -0
  144. package/dist/jobs/assets/main-jkvd92z9.js +5 -0
  145. package/dist/jobs/assets/main-jkvd92z9.js.map +10 -0
  146. package/dist/jobs/assets/main-jv5xqd13.js +5 -0
  147. package/dist/jobs/assets/main-jv5xqd13.js.map +21 -0
  148. package/dist/jobs/assets/main-jxre7w93.js +5 -0
  149. package/dist/jobs/assets/main-jxre7w93.js.map +23 -0
  150. package/dist/jobs/assets/main-kwmqkjfx.js +5 -0
  151. package/dist/jobs/assets/main-kwmqkjfx.js.map +11 -0
  152. package/dist/jobs/assets/main-n9cf6bxm.js +5 -0
  153. package/dist/jobs/assets/main-n9cf6bxm.js.map +11 -0
  154. package/dist/jobs/assets/main-pegp0ygb.js +5 -0
  155. package/dist/jobs/assets/main-pegp0ygb.js.map +10 -0
  156. package/dist/jobs/assets/main-qr573853.js +5 -0
  157. package/dist/jobs/assets/main-qr573853.js.map +12 -0
  158. package/dist/jobs/assets/main-rq97rdr4.js +4 -0
  159. package/dist/jobs/assets/main-rq97rdr4.js.map +22 -0
  160. package/dist/jobs/assets/main-szjdmydc.js +5 -0
  161. package/dist/jobs/assets/main-szjdmydc.js.map +13 -0
  162. package/dist/jobs/assets/main-tnbhrm9n.js +7 -0
  163. package/dist/jobs/assets/main-tnbhrm9n.js.map +11 -0
  164. package/dist/jobs/assets/main-ts19j4n0.js +5 -0
  165. package/dist/jobs/assets/main-ts19j4n0.js.map +25 -0
  166. package/dist/jobs/assets/main-w93x1dzs.js +5 -0
  167. package/dist/jobs/assets/main-w93x1dzs.js.map +10 -0
  168. package/dist/jobs/assets/sections-0ksdxs8m.css +1 -0
  169. package/dist/jobs/assets/sections-0y7w4fb4.js +4 -0
  170. package/dist/jobs/assets/sections-0y7w4fb4.js.map +10 -0
  171. package/dist/jobs/assets/sse-mn0t0fh7.js +5 -0
  172. package/dist/jobs/assets/sse-mn0t0fh7.js.map +11 -0
  173. package/dist/jobs/assets/sseChecks-t7tcm7ra.js +4 -0
  174. package/dist/jobs/assets/sseChecks-t7tcm7ra.js.map +10 -0
  175. package/dist/jobs/assets/validation-ysjfy072.js +4 -0
  176. package/dist/jobs/assets/validation-ysjfy072.js.map +9 -0
  177. package/dist/jobs/manifest.json +511 -0
  178. package/dts/docs/assets.d.ts +144 -0
  179. package/dts/docs/assets.d.ts.map +1 -0
  180. package/dts/docs/browser/config.d.ts +61 -0
  181. package/dts/docs/browser/config.d.ts.map +1 -0
  182. package/dts/docs/browser/index.d.ts +12 -0
  183. package/dts/docs/browser/index.d.ts.map +1 -0
  184. package/dts/docs/docsUi.d.ts +42 -0
  185. package/dts/docs/docsUi.d.ts.map +1 -0
  186. package/dts/docs/hosted.d.ts +22 -0
  187. package/dts/docs/hosted.d.ts.map +1 -0
  188. package/dts/docs/index.d.ts +18 -0
  189. package/dts/docs/index.d.ts.map +1 -0
  190. package/dts/docs/shell.d.ts +57 -0
  191. package/dts/docs/shell.d.ts.map +1 -0
  192. package/dts/docs/types.d.ts +137 -0
  193. package/dts/docs/types.d.ts.map +1 -0
  194. package/dts/index.d.ts +21 -0
  195. package/dts/index.d.ts.map +1 -0
  196. package/dts/jobs/assets.d.ts +157 -0
  197. package/dts/jobs/assets.d.ts.map +1 -0
  198. package/dts/jobs/browser/config.d.ts +67 -0
  199. package/dts/jobs/browser/config.d.ts.map +1 -0
  200. package/dts/jobs/browser/index.d.ts +10 -0
  201. package/dts/jobs/browser/index.d.ts.map +1 -0
  202. package/dts/jobs/browser/unauthorized.d.ts +9 -0
  203. package/dts/jobs/browser/unauthorized.d.ts.map +1 -0
  204. package/dts/jobs/index.d.ts +24 -0
  205. package/dts/jobs/index.d.ts.map +1 -0
  206. package/dts/jobs/jobsUi.d.ts +63 -0
  207. package/dts/jobs/jobsUi.d.ts.map +1 -0
  208. package/dts/jobs/shell.d.ts +77 -0
  209. package/dts/jobs/shell.d.ts.map +1 -0
  210. package/dts/jobs/types.d.ts +146 -0
  211. package/dts/jobs/types.d.ts.map +1 -0
  212. package/dts/kit/browser/shared.d.ts +10 -0
  213. package/dts/kit/browser/shared.d.ts.map +1 -0
  214. package/dts/kit/browser/unauthorized.d.ts +74 -0
  215. package/dts/kit/browser/unauthorized.d.ts.map +1 -0
  216. package/dts/kit/unauthorized.d.ts +47 -0
  217. package/dts/kit/unauthorized.d.ts.map +1 -0
  218. package/guides/docs.md +170 -0
  219. package/guides/jobs.md +1120 -0
  220. package/lib/docs/assets.ts +427 -0
  221. package/lib/docs/browser/config.ts +66 -0
  222. package/lib/docs/browser/index.ts +24 -0
  223. package/lib/docs/docsUi.ts +623 -0
  224. package/lib/docs/hosted.ts +31 -0
  225. package/lib/docs/index.ts +37 -0
  226. package/lib/docs/shell.ts +156 -0
  227. package/lib/docs/types.ts +149 -0
  228. package/lib/index.ts +27 -0
  229. package/lib/jobs/assets.ts +448 -0
  230. package/lib/jobs/browser/config.ts +65 -0
  231. package/lib/jobs/browser/index.ts +9 -0
  232. package/lib/jobs/browser/unauthorized.ts +11 -0
  233. package/lib/jobs/index.ts +41 -0
  234. package/lib/jobs/jobsUi.ts +709 -0
  235. package/lib/jobs/shell.ts +205 -0
  236. package/lib/jobs/types.ts +162 -0
  237. package/lib/kit/browser/shared.ts +11 -0
  238. package/lib/kit/browser/unauthorized.ts +114 -0
  239. package/lib/kit/unauthorized.ts +222 -0
  240. package/package.json +198 -4
@@ -0,0 +1,23 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../bun-client/lib/errors.ts", "../bun-client/lib/path.ts", "../bun-client/lib/querystring.ts", "../bun-client/lib/retry.ts", "../bun-client/lib/client.ts", "../bun-client/lib/query.ts", "app/jobs/api/routes.gen.ts", "app/jobs/api/typed.ts", "app/jobs/api/summon.ts", "app/jobs/screens/summoning/paths.ts", "app/jobs/screens/queues/panels/budgetText.ts", "app/jobs/screens/queues/panels/SummonBudget.tsx", "app/jobs/screens/queues/panels/summonGroupText.ts", "app/jobs/screens/queues/panels/SummonGroupCard.tsx"],
4
+ "sourcesContent": [
5
+ "/**\n * The client's errors (typed-client plan §4.3, names §16). Every error the\n * client raises itself extends {@link ClientError}; a caller's own abort\n * surfaces as the platform's `AbortError` (the signal's reason), unchanged,\n * so `signal.reason` checks keep working.\n */\nimport type {\n ChannelErrorCode,\n ValidationIssue,\n} from \"@kingsleyweb/bun-contract\";\nimport type { GraphQLError } from \"./graphql\";\nimport type { Jsonify } from \"./jsonify\";\nimport type { ErrorStatus, ResponsesOf } from \"./types\";\n\n/**\n * What a {@link ChannelError} says failed: the contract's codes, and\n * `\"EXCEPTION\"`, which only the `\"bun-nest\"` codec raises: a gateway handler\n * that threw (a `WsException` or any error) for an event that asked for an\n * ack, which will not come.\n */\nexport type ChannelFailureCode = ChannelErrorCode | \"EXCEPTION\";\n\n/** Options shared by every client error. */\ninterface ClientErrorOptions {\n /** The route key the call was for (`\"GET /users/:id\"`), when there is one. */\n key?: string;\n /** What caused it: a `fetch` rejection, a `SyntaxError` from a JSON body, … */\n cause?: unknown;\n}\n\n/** The base of every error the client raises. */\nexport class ClientError extends Error {\n /** The route key the call was for (`\"GET /users/:id\"`); `undefined` outside a call. */\n readonly key: string | undefined;\n\n constructor(message: string, options: ClientErrorOptions = {}) {\n super(message, { cause: options.cause });\n this.name = \"ClientError\";\n this.key = options.key;\n }\n}\n\n/** `HttpError`'s status for entry `E`: its declared non-2xx statuses, or any `number`. */\ntype HttpErrorStatus<E> = unknown extends E ? number : ErrorStatus<E>;\n\n/** `HttpError`'s body for entry `E`: its declared error bodies after JSON, or `unknown`. */\ntype HttpErrorBody<E> = unknown extends E\n ? unknown\n : Jsonify<ResponsesOf<E>[ErrorStatus<E> & keyof ResponsesOf<E>]>;\n\n/**\n * A declared error status, thrown instead of returned when `throwOnError` is\n * on (§4.4). Name the route's entry to type `status` and `error`:\n * `error as HttpError<Routes[\"GET /users/:id\"]>`.\n *\n * @typeParam E The route's entry; `unknown` (the default) for any route.\n */\nexport class HttpError<E = unknown> extends ClientError {\n /** The response's status: one the route declares. */\n readonly status: HttpErrorStatus<E>;\n /** The parsed body (problem+json, by the plan's convention). */\n readonly error: HttpErrorBody<E>;\n /** The response, its body already read into {@link error}. */\n readonly response: Response;\n\n constructor(\n status: number,\n error: unknown,\n response: Response,\n key?: string,\n ) {\n super(`HTTP ${status} from ${key ?? response.url}`, { key });\n this.name = \"HttpError\";\n this.status = status as HttpErrorStatus<E>;\n this.error = error as HttpErrorBody<E>;\n this.response = response;\n }\n}\n\n/**\n * A status the route does not declare (§4.3): thrown by default, since a\n * result with a catch-all member would stop `status` narrowing anything.\n * `undeclaredStatus: \"result\"` returns it as a result instead.\n */\nexport class UnexpectedStatusError extends ClientError {\n /** The undeclared status. */\n readonly status: number;\n /** The statuses the route does declare, from the manifest. */\n readonly declared: readonly number[];\n /** The response, its body unread, so the caller may still read it. */\n readonly response: Response;\n\n constructor(response: Response, declared: readonly number[], key?: string) {\n super(\n `${key ?? response.url} answered ${response.status}, which it does not declare (declared: ${declared.join(\", \")})`,\n { key },\n );\n this.name = \"UnexpectedStatusError\";\n this.status = response.status;\n this.declared = declared;\n this.response = response;\n }\n}\n\n/** `fetch` failed: no response at all (DNS, refused connection, CORS, offline). */\nexport class NetworkError extends ClientError {\n constructor(message: string, options: ClientErrorOptions = {}) {\n super(message, options);\n this.name = \"NetworkError\";\n }\n}\n\n/**\n * The call's `timeout` ran out (retries and their waits included). A\n * caller's own `signal` never produces this: it rejects with the signal's\n * reason, the platform's `AbortError` by default.\n */\nexport class TimeoutError extends ClientError {\n /** The timeout that ran out, in milliseconds. */\n readonly timeout: number;\n\n constructor(timeout: number, key?: string) {\n super(`${key ?? \"Request\"} timed out after ${timeout} ms`, { key });\n this.name = \"TimeoutError\";\n this.timeout = timeout;\n }\n}\n\n/**\n * One issue of a {@link ValidationError}: bun-contract's issue shape (the\n * one the server's checks report: `target`, `message`, `path`, and `key`,\n * the status, on a response; on an event stream's event, target `data` and\n * `key` the event's name, `sse.md` §3.3; on a channel message, target `data`\n * and `key` the message type, `websocket.md` §5), plus which check found it.\n */\nexport interface ValidationErrorIssue extends ValidationIssue<\n \"params\" | \"query\" | \"body\" | \"headers\" | \"files\" | \"response\" | \"data\"\n> {\n /** `\"builtin\"`: the route's built-in schema; `\"custom\"`: a BYO schema (§5.4). */\n source: \"builtin\" | \"custom\";\n}\n\n/**\n * A request or a response failed validation (§5.4). Thrown before the\n * request is sent (a request part, by default) or, under `\"throw\"`, when a\n * response arrives; under `\"warn\"` it is only logged, and a hook receives it.\n * Every issue of the call is in it at once, the built-in ones first. No\n * issue carries a value: messages that quote what was checked are replaced\n * (bun-contract's rule, the server's too).\n */\nexport class ValidationError extends ClientError {\n /**\n * `\"request\"`: a part about to be sent; `\"response\"`: a body that arrived;\n * on a channel (`./channel`), `\"send\"`: a message about to be written,\n * `\"receive\"`: a frame that arrived.\n */\n readonly direction: \"request\" | \"response\" | \"send\" | \"receive\";\n /** The response's status; `undefined` for a request. */\n readonly status: number | undefined;\n /** Every issue, the built-in schema's first, then the BYO schema's. */\n readonly issues: readonly ValidationErrorIssue[];\n\n constructor(\n key: string,\n direction: \"request\" | \"response\" | \"send\" | \"receive\",\n issues: readonly ValidationErrorIssue[],\n status?: number,\n ) {\n const summary = issues\n .map(\n (issue) =>\n `${issue.target}${issue.path ? `.${issue.path}` : \"\"}: ${issue.message}`,\n )\n .join(\"; \");\n super(\n `${key} ${direction === \"response\" ? `response ${status}` : direction} failed validation: ${summary}`,\n { key },\n );\n this.name = \"ValidationError\";\n this.direction = direction;\n this.status = status;\n this.issues = issues;\n }\n}\n\n/* ------------------------------------------------------------------------ */\n/* The GraphQL client's error (`./graphql`, `graphql.md` §3.1). */\n/* ------------------------------------------------------------------------ */\n\n/**\n * A 2xx GraphQL response with `errors`, thrown instead of returned under\n * `throwOnGraphQLErrors` (`graphql.md` §3.1). The partial data, if any,\n * stays on it.\n *\n * @typeParam R The operation's result, for {@link data}: `error as\n * GraphQLResponseError<ResultOf<typeof UserQuery>>`.\n */\nexport class GraphQLResponseError<R = unknown> extends ClientError {\n /** The status (a 2xx). */\n readonly status: number;\n /** The response's errors: at least one, as the server gave them. */\n readonly errors: readonly GraphQLError[];\n /** What the operation produced despite them: partial data, `null`, or `undefined` when the request itself failed. */\n readonly data: R | null | undefined;\n /** The response's `extensions`, when it has them. */\n readonly extensions: Readonly<Record<string, unknown>> | undefined;\n /** The response, its body read. */\n readonly response: Response;\n\n /**\n * @param key The call's route key (`\"POST /graphql\"`).\n * @param status The status.\n * @param errors The response's errors.\n * @param data Its `data`.\n * @param extensions Its `extensions`.\n * @param response The response.\n */\n constructor(\n key: string,\n status: number,\n errors: readonly GraphQLError[],\n data: unknown,\n extensions: Readonly<Record<string, unknown>> | undefined,\n response: Response,\n ) {\n super(\n `${key}: ${errors[0]?.message ?? \"GraphQL error\"}${errors.length > 1 ? ` (and ${errors.length - 1} more)` : \"\"}`,\n { key },\n );\n this.name = \"GraphQLResponseError\";\n this.status = status;\n this.errors = errors;\n this.data = data as R | null | undefined;\n this.extensions = extensions;\n this.response = response;\n }\n}\n\n/* ------------------------------------------------------------------------ */\n/* The channel client's errors (`./channel`, `websocket.md` §6). */\n/* ------------------------------------------------------------------------ */\n\n/**\n * The server answered with an error frame (`websocket.md` §6): an invalid\n * message (`VALIDATION`, with the server's value-free issues), an unknown\n * message type (`UNKNOWN_MESSAGE`) or an undeclared binary frame\n * (`UNSUPPORTED_DATA`). A request whose id the frame echoes rejects with it;\n * any other reaches the channel's `on(\"$error\")`.\n */\nexport class ChannelError extends ClientError {\n /** What failed, as the server's error frame says. */\n readonly code: ChannelFailureCode;\n /** The frame's status (400 from bun-common). */\n readonly status: number;\n /** The server's issues, value-free, for a `VALIDATION`; empty otherwise. */\n readonly issues: readonly ValidationIssue[];\n /** What went wrong, for a non-validation error; `undefined` when the frame has none. */\n readonly detail: string | undefined;\n /** The message type of the request it answers; `undefined` for an error frame no request is waiting for. */\n readonly type: string | undefined;\n\n /**\n * @param key The channel's path.\n * @param frame The error frame's fields.\n * @param type The request's message type, when one is waiting.\n */\n constructor(\n key: string,\n frame: {\n readonly code: ChannelFailureCode;\n readonly status: number;\n readonly issues?: readonly ValidationIssue[];\n readonly detail?: string;\n },\n type?: string,\n ) {\n super(\n `${key}${type === undefined ? \"\" : ` ${type}`}: the server answered ${frame.code}${frame.detail === undefined ? \"\" : ` (${frame.detail})`}`,\n { key },\n );\n this.name = \"ChannelError\";\n this.code = frame.code;\n this.status = frame.status;\n this.issues = frame.issues ?? [];\n this.detail = frame.detail;\n this.type = type;\n }\n}\n\n/** A channel request (`request()`) had no reply within its `timeout`. */\nexport class RequestTimeoutError extends ClientError {\n /** The request's message type. */\n readonly type: string;\n /** The id the request carried. */\n readonly id: string;\n /** The timeout that ran out, in milliseconds. */\n readonly timeout: number;\n\n /**\n * @param key The channel's path.\n * @param type The request's message type.\n * @param id Its correlation id.\n * @param timeout The timeout, ms.\n */\n constructor(key: string, type: string, id: string, timeout: number) {\n super(`${key} ${type}: no reply within ${timeout} ms`, { key });\n this.name = \"RequestTimeoutError\";\n this.type = type;\n this.id = id;\n this.timeout = timeout;\n }\n}\n\n/**\n * The socket dropped while a channel request was waiting for its reply: it\n * is rejected rather than sent again, since a request may not be\n * idempotent (`retry: true` on the call sends it again after a reconnect).\n */\nexport class DisconnectedError extends ClientError {\n /** The close code. */\n readonly code: number;\n /** The close reason (often `\"\"`). */\n readonly reason: string;\n\n /**\n * @param key The channel's path.\n * @param code The close code.\n * @param reason The close reason.\n */\n constructor(key: string, code: number, reason: string) {\n super(\n `${key}: the socket closed (${code}${reason ? ` ${reason}` : \"\"}) before the reply`,\n { key },\n );\n this.name = \"DisconnectedError\";\n this.code = code;\n this.reason = reason;\n }\n}\n\n/**\n * The channel is closed for good, or cannot take the message: a send or a\n * request after `close()` or after a close the client will not retry (a\n * fatal close code, or reconnection off), a send while disconnected with\n * `offline: \"fail\"`, or past the offline buffer's limit.\n */\nexport class ChannelClosedError extends ClientError {\n /** The close code; `undefined` when no socket closed (`close()`, a full offline buffer). */\n readonly code: number | undefined;\n /** The close reason, or why the message was refused. */\n readonly reason: string;\n\n /**\n * @param key The channel's path.\n * @param reason Why.\n * @param code The close code, when a socket closed.\n */\n constructor(key: string, reason: string, code?: number) {\n super(`${key}: ${reason}${code === undefined ? \"\" : ` (${code})`}`, {\n key,\n });\n this.name = \"ChannelClosedError\";\n this.code = code;\n this.reason = reason;\n }\n}\n",
6
+ "/**\n * Builds a URL path from a route's path literal and its params: the inverse\n * of the server's matcher (path-to-regexp 8, Express 5's syntax, which\n * bun-common compiles; `bun-common/lib/utils/expressPath.ts`).\n *\n * - `:name`, `:\"any name\"`: the value, `encodeURIComponent`-ed;\n * - `*name`: an array of segments, each encoded, joined by `/`;\n * - `{…}`: an optional group, written only when every param inside it is\n * given (path-to-regexp's `compile`);\n * - `\\x`: the character itself;\n * - routejs's `:name?` (the param and the `/` before it are dropped when\n * absent) and `:name(regex)` (the constraint is skipped).\n *\n * Compiled once per path and cached, so a call costs a walk of the tokens.\n */\nimport { ClientError } from \"./errors\";\n\n/** One piece of a compiled path. */\ntype Token =\n | { kind: \"text\"; value: string }\n | { kind: \"param\"; name: string; optional: boolean }\n | { kind: \"wildcard\"; name: string }\n | { kind: \"group\"; tokens: Token[] };\n\n/** A param's value as the URL builder accepts it. */\nexport type PathParamValue =\n | string\n | number\n | boolean\n | bigint\n | readonly (string | number | boolean | bigint)[];\n\nconst ID_START = /^[$_\\p{ID_Start}]$/u;\nconst ID_CONTINUE = /^[$\\u200C\\u200D\\p{ID_Continue}]$/u;\n\n/** Compiled paths, by literal. Paths are few and fixed (a route map's keys). */\nconst compiled = new Map<string, Token[]>();\n\n/** Reads a param name at `from` (after `:` or `*`): `[name, next index]`. */\nfunction readName(path: string, from: number): [string, number] {\n if (path[from] === '\"') {\n let name = \"\";\n let at = from + 1;\n while (at < path.length && path[at] !== '\"') {\n if (path[at] === \"\\\\\") at++;\n name += path[at] ?? \"\";\n at++;\n }\n return [name, at + 1];\n }\n let at = from;\n if (ID_START.test(path[at] ?? \"\")) {\n do at++;\n while (ID_CONTINUE.test(path[at] ?? \"\"));\n }\n return [path.slice(from, at), at];\n}\n\n/** Skips a routejs `(…)` constraint at `from`, nested parens and escapes included. */\nfunction skipConstraint(path: string, from: number): number {\n let depth = 0;\n let at = from;\n do {\n if (path[at] === \"\\\\\") at++;\n else if (path[at] === \"(\") depth++;\n else if (path[at] === \")\") depth--;\n at++;\n } while (depth > 0 && at < path.length);\n return at;\n}\n\n/** Tokenises `path` from `at` until a closing `}` or the end: `[tokens, next index]`. */\nfunction tokenize(path: string, at = 0): [Token[], number] {\n const tokens: Token[] = [];\n let text = \"\";\n const flush = () => {\n if (text) tokens.push({ kind: \"text\", value: text });\n text = \"\";\n };\n while (at < path.length) {\n const char = path[at];\n if (char === \"\\\\\") {\n text += path[at + 1] ?? \"\";\n at += 2;\n } else if (char === \"}\") {\n flush();\n return [tokens, at + 1];\n } else if (char === \"{\") {\n flush();\n const [inner, next] = tokenize(path, at + 1);\n tokens.push({ kind: \"group\", tokens: inner });\n at = next;\n } else if (char === \":\" || char === \"*\") {\n const [name, next] = readName(path, at + 1);\n if (!name) {\n text += char;\n at++;\n continue;\n }\n flush();\n at = next;\n if (char === \"*\") {\n tokens.push({ kind: \"wildcard\", name });\n continue;\n }\n if (path[at] === \"(\") at = skipConstraint(path, at);\n const optional = path[at] === \"?\";\n if (optional) {\n at++;\n // routejs: the `/` before an optional param belongs to it.\n const previous = tokens.at(-1);\n if (previous?.kind === \"text\" && previous.value.endsWith(\"/\")) {\n previous.value = previous.value.slice(0, -1);\n if (!previous.value) tokens.pop();\n tokens.push({\n kind: \"group\",\n tokens: [\n { kind: \"text\", value: \"/\" },\n { kind: \"param\", name, optional: false },\n ],\n });\n continue;\n }\n }\n tokens.push({ kind: \"param\", name, optional });\n } else {\n text += char;\n at++;\n }\n }\n flush();\n return [tokens, at];\n}\n\n/** Writes one param value into the path. */\nfunction encodeSegment(value: unknown): string {\n return encodeURIComponent(String(value));\n}\n\n/**\n * Writes `tokens` with `params`: `[text, missing]`, where `missing` names the\n * params a token needed and did not get.\n */\nfunction write(\n tokens: readonly Token[],\n params: Readonly<Record<string, unknown>>,\n): [string, string[]] {\n let out = \"\";\n const missing: string[] = [];\n for (const token of tokens) {\n if (token.kind === \"text\") {\n out += token.value;\n } else if (token.kind === \"group\") {\n const [inner, innerMissing] = write(token.tokens, params);\n if (!innerMissing.length) out += inner;\n } else {\n const value = Object.hasOwn(params, token.name)\n ? params[token.name]\n : undefined;\n if (value === undefined || value === null) {\n if (!(token.kind === \"param\" && token.optional))\n missing.push(token.name);\n continue;\n }\n if (token.kind === \"wildcard\") {\n const segments: readonly unknown[] = Array.isArray(value)\n ? value\n : [value];\n if (!segments.length) {\n missing.push(token.name);\n continue;\n }\n out += segments.map(encodeSegment).join(\"/\");\n } else {\n out += encodeSegment(value);\n }\n }\n }\n return [out, missing];\n}\n\n/**\n * The path `pattern` with `params` written into it.\n *\n * @throws ClientError when a required param is missing (a type error for a\n * typed caller; this is the untyped caller's error).\n */\nexport function buildPath(\n pattern: string,\n params: Readonly<Record<string, unknown>> = {},\n key?: string,\n): string {\n let tokens = compiled.get(pattern);\n if (!tokens) {\n tokens = tokenize(pattern)[0];\n compiled.set(pattern, tokens);\n }\n const [path, missing] = write(tokens, params);\n if (missing.length) {\n throw new ClientError(\n `Missing path param${missing.length > 1 ? \"s\" : \"\"} ${missing.map((name) => `\"${name}\"`).join(\", \")} for ${pattern}`,\n { key },\n );\n }\n return path;\n}\n\n/** One param a path literal declares, as {@link pathParams} lists it. */\nexport interface PathParamInfo {\n /** The param's name. */\n readonly name: string;\n /** `true` for a wildcard (`*name`), whose value is an array of segments. */\n readonly wildcard: boolean;\n /** `true` when the path matches without it (inside `{…}`, or routejs's `:name?`). */\n readonly optional: boolean;\n}\n\n/**\n * The params a path literal declares, in order: what the generator (PR-C2)\n * types a route's `params` from, read by the same tokenizer that writes the\n * URL, so the two cannot disagree.\n */\nexport function pathParams(pattern: string): PathParamInfo[] {\n const out: PathParamInfo[] = [];\n const walk = (tokens: readonly Token[], optional: boolean): void => {\n for (const token of tokens) {\n if (token.kind === \"group\") walk(token.tokens, true);\n else if (token.kind === \"param\")\n out.push({\n name: token.name,\n wildcard: false,\n optional: optional || token.optional,\n });\n else if (token.kind === \"wildcard\")\n out.push({ name: token.name, wildcard: true, optional });\n }\n };\n walk(tokenize(pattern)[0], false);\n return out;\n}\n",
7
+ "/**\n * The query serialiser: the inverse of bun-common's parser, picoquery with\n * `nesting: true`, `nestingSyntax: \"js\"`, `arrayRepeat: true` and\n * `arrayRepeatSyntax: \"repeat\"` (`DEFAULT_PARSE_QUERY_OPTS`,\n * `bun-common/lib/BunRequest.ts`; typed-client plan §6.1).\n *\n * - An object nests with dots: `{ a: { b: 1 } }` → `a.b=1`.\n * - An array of two or more scalars repeats its key: `{ t: [\"x\", \"y\"] }` →\n * `t=x&t=y`, which the parser collapses back into an array.\n * - Any other array is indexed, `t[0]=x`, so that it still arrives as an\n * array: a repeated key written once parses as a scalar, and an object\n * can only sit in an array by index.\n * - `null` and `undefined` are skipped (a key, an element, a property), so an\n * array's later elements move down. An empty array or object writes nothing.\n * - A scalar is written as `String(value)`; a `Date` as its ISO string, as\n * JSON would. The server receives strings; its schema coerces them.\n * - Keys are percent-encoded, `.` included, so a key holding `.`, `[` or `]`\n * arrives as one key. `__proto__`, `constructor` and `prototype`, which the\n * parser refuses to nest, are skipped.\n *\n * `__tests__/querystring.test.ts` runs every shape through a real `router.fetch()`\n * and compares `req.query`, so a drift from the parser fails there.\n */\n\n/** Keys the parser will not nest into (prototype pollution guard); never written. */\nconst UNSAFE_KEYS = new Set([\"__proto__\", \"constructor\", \"prototype\"]);\n\n/** `encodeURIComponent`, plus `.` (picoquery's nesting separator in a raw key). */\nfunction encodeKey(key: string): string {\n return encodeURIComponent(key).replace(/\\./g, \"%2E\");\n}\n\n/** A leaf as the wire writes it; `undefined` when it is not a leaf. */\nfunction leaf(value: unknown): string | undefined {\n switch (typeof value) {\n case \"string\":\n return value;\n case \"number\":\n case \"boolean\":\n case \"bigint\":\n return String(value);\n }\n if (value instanceof Date) return value.toISOString();\n return undefined;\n}\n\n/** Writes `value` under the already-encoded `path` into `out`, as `[path, scalar]` pairs. */\nfunction append(\n out: (readonly [string, string])[],\n path: string,\n value: unknown,\n): void {\n if (value === undefined || value === null) return;\n const scalar = leaf(value);\n if (scalar !== undefined) {\n out.push([path, scalar]);\n return;\n }\n if (Array.isArray(value)) {\n const items = value.filter((item) => item !== undefined && item !== null);\n const allScalars = items.every((item) => leaf(item) !== undefined);\n if (allScalars && items.length > 1) {\n for (const item of items) append(out, path, item);\n } else {\n items.forEach((item, index) => append(out, `${path}[${index}]`, item));\n }\n return;\n }\n if (typeof value === \"object\") {\n for (const [key, child] of Object.entries(value)) {\n if (UNSAFE_KEYS.has(key) || key === \"\") continue;\n append(out, `${path}.${encodeKey(key)}`, child);\n }\n }\n}\n\n/**\n * An object as the `[key, value]` pairs the parser reads back into it: the\n * key encoded (as {@link serializeQuery} writes it), the value as it is. A\n * multipart body's fields are these pairs (bun-common reads a multipart\n * field name through the same parser); `[]` for anything but an object.\n */\nexport function queryPairs(query: unknown): (readonly [string, string])[] {\n if (query === null || typeof query !== \"object\") return [];\n const out: (readonly [string, string])[] = [];\n for (const [key, value] of Object.entries(query)) {\n if (UNSAFE_KEYS.has(key) || key === \"\") continue;\n append(out, encodeKey(key), value);\n }\n return out;\n}\n\n/**\n * A query object as a query string, without the leading `?`; `\"\"` when it\n * writes nothing. Also an `application/x-www-form-urlencoded` body's text,\n * which bun-common parses with the same parser.\n */\nexport function serializeQuery(query: unknown): string {\n return queryPairs(query)\n .map(([key, value]) => `${key}=${encodeURIComponent(value)}`)\n .join(\"&\");\n}\n",
8
+ "/**\n * Retry timing (typed-client plan §6.1): the backoff between attempts and\n * the `Retry-After` header.\n *\n * The backoff is bun-common's `computeBackoff` (`bun-common/lib/utils/native.ts`)\n * with `type: \"exponential\"`, `factor: 2`, copied rather than imported so the\n * client never pulls bun-common into a frontend (D17).\n * `__tests__/backoff.test.ts` runs both over one vector\n * (`__tests__/fixtures/backoff-vector.json`), so the copies cannot drift.\n */\n\n/** The backoff's knobs, in the client's words ({@link RetryConfig}'s). */\nexport interface BackoffSchedule {\n /** First delay, ms (`computeBackoff`'s `delay`). */\n baseMs: number;\n /** Largest delay before jitter, ms (`computeBackoff`'s `max`). */\n maxMs: number;\n /** Jitter fraction, 0 to 1: the delay moves by up to ± this share of itself. */\n jitter: number;\n}\n\n/**\n * The delay before attempt `attempt + 1`, given that `attempt` (1-based) just\n * failed: `baseMs × 2^(attempt − 1)`, capped at `maxMs`, then moved by up to\n * ± `jitter` of itself (so a jittered delay may sit slightly above `maxMs`,\n * never below zero), exactly as `computeBackoff` does.\n *\n * @param random A uniform number in [0, 1); `Math.random` by default, a\n * fixed value in the shared vector.\n */\nexport function backoffDelay(\n attempt: number,\n schedule: BackoffSchedule,\n random: () => number = Math.random,\n): number {\n const step = Math.max(1, Math.floor(attempt));\n const capped = Math.min(schedule.baseMs * 2 ** (step - 1), schedule.maxMs);\n if (!schedule.jitter) return Math.max(0, capped);\n const spread = capped * schedule.jitter;\n return Math.max(0, capped + (random() * 2 - 1) * spread);\n}\n\n/**\n * A `Retry-After` header as milliseconds from `now`: delay-seconds (`120`) or\n * an HTTP date (RFC 9110 §10.2.3). `undefined` when absent or unreadable; a\n * date in the past is `0`.\n */\nexport function retryAfterMs(\n header: string | null,\n now: number = Date.now(),\n): number | undefined {\n if (header === null) return undefined;\n const value = header.trim();\n if (/^\\d+$/.test(value)) return Number(value) * 1000;\n // Every HTTP-date form names its month; `Date.parse` alone takes \"-5\" as a year.\n if (!/[a-z]{3}/i.test(value)) return undefined;\n const date = Date.parse(value);\n if (Number.isNaN(date)) return undefined;\n return Math.max(0, date - now);\n}\n",
9
+ "/**\n * `createClient`: the request builder and its pipeline (typed-client plan\n * §6.1, §6.2). One call runs, in order:\n *\n * 1. the configuration, merged global → route → call (§6.2's table);\n * 2. the URL (params into the path literal, the query serialised as\n * bun-common's parser reads it) and the body (JSON; a form's fields and\n * files as `multipart/form-data` or urlencoded; or passed through);\n * 3. one **attempt** per try: a fresh `Request`, the headers of each level\n * applied in order, the auth token, then the middleware onion, then\n * `fetch`;\n * 4. **retries** around the attempts, for the configured statuses and\n * network failures, waiting `Retry-After` or the backoff;\n * 5. **auth refresh** around the retries: a status in `auth.on` runs one\n * single-flight `refresh()` and sends the request once more;\n * 6. the **result**: a declared status read into `data` or `error` (a\n * download as the call's `as` asks, a streamed body as an\n * `AsyncIterable`); an undeclared one thrown (or returned, under\n * `undeclaredStatus: \"result\"`).\n *\n * **Validation** (§5, PR-C4) wraps it: the params, query and body are\n * checked before the URL is built, the headers on the first attempt before\n * the middleware, and a declared status's body and declared headers after\n * the body is read (the headers alone for a body left unread). The checks\n * live in `./validation`, imported with `import()` only when a call has\n * something to check, so a client with validation off loads neither it nor\n * bun-contract.\n *\n * **Bodies beyond JSON** (PR-C9, `other-transports.md` §3–§4) live in\n * `./bodies`, imported the same way only when a call sends files or a\n * multipart body, or a response streams.\n *\n * A `timeout` covers the request, retries and their waits included (not\n * the iteration of a streamed body, which the caller's `signal` can still\n * end). The client imports nothing at run time but those lazy modules: it\n * is browser-safe, and an HTTP-only bundle carries nothing more (D17).\n */\nimport type { FilesInput } from \"./bodies\";\nimport type {\n CallConfig,\n Client,\n ClientConfig,\n ClientFlags,\n ClientMiddleware,\n FlagConfig,\n HeadersOption,\n RequestContext,\n RetryConfig,\n RouteConfig,\n RouteMap,\n UndeclaredStatus,\n ValidationConfig,\n} from \"./types\";\nimport type { CallChecks, Checks } from \"./validation\";\nimport {\n ClientError,\n HttpError,\n NetworkError,\n TimeoutError,\n UnexpectedStatusError,\n ValidationError,\n} from \"./errors\";\nimport { buildPath } from \"./path\";\nimport { queryPairs, serializeQuery } from \"./querystring\";\nimport { backoffDelay, retryAfterMs } from \"./retry\";\n\n/** {@link RetryConfig} with every default filled in. */\ntype ResolvedRetry = Required<RetryConfig>;\n\n/** The built-in retry defaults (§6.2). */\nconst DEFAULT_RETRY: Readonly<ResolvedRetry> = Object.freeze({\n attempts: 2,\n methods: Object.freeze([\"GET\", \"HEAD\", \"OPTIONS\", \"PUT\", \"DELETE\"]),\n on: Object.freeze([408, 429, 500, 502, 503, 504, \"network\"] as const),\n baseMs: 300,\n maxMs: 10_000,\n jitter: 0.5,\n respectRetryAfter: true,\n});\n\n/** The default `timeout`, ms (§6.2). */\nconst DEFAULT_TIMEOUT = 30_000;\n\n/** Statuses whose response carries no body. */\nconst BODILESS = new Set([204, 205, 304]);\n\n/** The verbs, as the client's method names and the upper-case HTTP methods. */\nconst VERBS = [\n \"get\",\n \"post\",\n \"put\",\n \"patch\",\n \"delete\",\n \"head\",\n \"options\",\n] as const;\n\n/** Untyped options as the pipeline reads them. */\ninterface RuntimeOptions extends CallConfig {\n /** Path params. */\n params?: Readonly<Record<string, unknown>>;\n /** The query object. */\n query?: unknown;\n /**\n * The body: JSON, a form's fields, or a type `fetch` takes as it is. A server\n * on bun-common or Express answers 400 to a JSON body that is not an object\n * or an array, unless it turned `strict` off; this does not check it.\n */\n body?: unknown;\n /** A multipart body's files, by field. */\n files?: FilesInput;\n}\n\n/** The body one call sends, encoded once for every attempt. */\ninterface Payload {\n /** The body, as `Request` takes it. */\n readonly body?: BodyLike;\n /** Its `content-type`, when the client sets one (a `FormData` sets its own). */\n readonly type?: string;\n}\n\n/** The runtime facts of one route the client reads from the manifest. */\ninterface RouteFacts {\n /** The route's `operationId`. */\n readonly operationId?: string;\n /** Its declared statuses. */\n readonly statuses?: readonly number[];\n /** How a plain-object body is sent. */\n readonly bodyType?: \"json\" | \"multipart\" | \"urlencoded\";\n /** The statuses whose body streams, by framing. */\n readonly chunks?: Readonly<Record<number, \"ndjson\" | \"raw\" | undefined>>;\n}\n\n/** `./bodies`, imported on first use and shared by every client. */\nlet bodiesModule: Promise<typeof import(\"./bodies\")> | undefined;\nconst loadBodies = (): Promise<typeof import(\"./bodies\")> =>\n (bodiesModule ??= import(\"./bodies\"));\n\n/** One call's configuration, every level merged. */\ninterface Resolved {\n /** The timeout, ms, or `false`. */\n timeout: number | false;\n /** The retry settings, or `false`. */\n retry: ResolvedRetry | false;\n /** Whether a declared error status throws. */\n throwOnError: boolean;\n /** What an undeclared status does. */\n undeclaredStatus: UndeclaredStatus;\n /** Headers from each level, in order (client, route, call). */\n headers: (HeadersOption | undefined)[];\n /** The middleware, outermost first. */\n middleware: ClientMiddleware[];\n}\n\n/**\n * Whether a validation level could turn a check on: an object with any key\n * but `onFailure` that is not `false`. Decides, with the mode and the schema\n * source, whether a call loads the checks at all, so a production client\n * that configures nothing extra never does.\n */\nfunction mayCheck(level: ValidationConfig | false | undefined): boolean {\n return (\n typeof level === \"object\" &&\n Object.entries(level).some(\n ([name, value]) =>\n name !== \"onFailure\" && value !== false && value !== undefined,\n )\n );\n}\n\n/**\n * The one `process` read here: `process.env.NODE_ENV`. Declared in this\n * module alone (a type, erased), since `lib/` is browser code checked with no\n * Bun or Node types; at run time it is the global, or a bundler's define.\n */\ndeclare const process: {\n /** The environment; only `NODE_ENV` is read. */\n readonly env: Readonly<Record<string, string | undefined>>;\n};\n\n/**\n * The mode when the configuration names none (§5.5): `process.env.NODE_ENV`\n * written out, so a bundler's define replaces it; where nothing replaced it\n * and there is no `process` (a browser), development.\n */\nfunction defaultMode(): \"development\" | \"production\" {\n try {\n return process.env.NODE_ENV === \"production\" ? \"production\" : \"development\";\n } catch {\n return \"development\";\n }\n}\n\n/** Retry settings merged over the previous level's; `false` turns them off, a later object back on. */\nfunction mergeRetry(\n levels: readonly (RetryConfig | false | undefined)[],\n): ResolvedRetry | false {\n let merged: ResolvedRetry | false = DEFAULT_RETRY;\n for (const level of levels) {\n if (level === undefined) continue;\n if (level === false) {\n merged = false;\n continue;\n }\n const base: ResolvedRetry = merged === false ? DEFAULT_RETRY : merged;\n const defined = Object.fromEntries(\n Object.entries(level).filter(([, value]) => value !== undefined),\n ) as RetryConfig;\n merged = { ...base, ...defined };\n }\n return merged;\n}\n\n/** A body as `Request` takes it (the DOM's `BodyInit`, or Bun's). */\ntype BodyLike = NonNullable<RequestInit[\"body\"]>;\n\n/** A body `fetch` takes as it is, rather than as JSON. */\nfunction isRawBody(body: unknown): body is BodyLike {\n return (\n (typeof FormData !== \"undefined\" && body instanceof FormData) ||\n (typeof URLSearchParams !== \"undefined\" &&\n body instanceof URLSearchParams) ||\n (typeof Blob !== \"undefined\" && body instanceof Blob) ||\n (typeof ReadableStream !== \"undefined\" && body instanceof ReadableStream) ||\n body instanceof ArrayBuffer ||\n ArrayBuffer.isView(body)\n );\n}\n\n/**\n * Why `signal` aborted: what the call rejects with. Typed `Error` for the\n * throw rules; a caller may abort with any value, and it is passed on as it\n * is (`AbortController.abort(reason)` makes it the platform's `AbortError`\n * when none is given, and the client's own timeout gives a `TimeoutError`).\n */\nfunction reasonOf(signal: AbortSignal): Error {\n return signal.reason as Error;\n}\n\n/**\n * `promise`, or a rejection with the signal's reason when it aborts first:\n * so a timeout or an abort ends the call even when a custom `fetch` (an\n * in-process `router.fetch`, a mock) never looks at `request.signal`.\n */\nfunction abortable<T>(promise: Promise<T>, signal: AbortSignal): Promise<T> {\n return new Promise((resolve, reject) => {\n const onAbort = () => reject(reasonOf(signal));\n signal.addEventListener(\"abort\", onAbort, { once: true });\n promise.then(\n (value) => {\n signal.removeEventListener(\"abort\", onAbort);\n resolve(value);\n },\n (error: unknown) => {\n signal.removeEventListener(\"abort\", onAbort);\n reject(error as Error);\n },\n );\n });\n}\n\n/** Waits `ms`, or rejects with the signal's reason when it aborts first. */\nfunction sleep(ms: number, signal: AbortSignal): Promise<void> {\n return new Promise((resolve, reject) => {\n if (signal.aborted) {\n reject(reasonOf(signal));\n return;\n }\n let timer: ReturnType<typeof setTimeout> | undefined;\n const onAbort = () => {\n clearTimeout(timer);\n reject(reasonOf(signal));\n };\n timer = setTimeout(() => {\n signal.removeEventListener(\"abort\", onAbort);\n resolve();\n }, ms);\n signal.addEventListener(\"abort\", onAbort, { once: true });\n });\n}\n\n/** Releases a response the client will not read. */\nasync function discard(response: Response): Promise<void> {\n try {\n await response.body?.cancel();\n } catch {\n // Already read or errored: nothing to release.\n }\n}\n\n/** A JSON media type: `application/json`, `application/problem+json`, `…+json`. */\nfunction isJsonType(type: string): boolean {\n return /^application\\/(?:[\\w.-]+\\+)?json\\b/i.test(type);\n}\n\n/** A body read: its value, whether it is left unread (a stream), and a download's file name (`./bodies`). */\ntype ReadBody = import(\"./bodies\").ReadBody;\n\n/**\n * Reads a response body as the declared types expect: JSON parsed; text as a\n * string; no body as `undefined`; an event stream left unread (`undefined`,\n * the stream is still on `response.body` for `sse()`, and no whole-body\n * check runs on it); a streamed body (the manifest's\n * `chunks` for the status, or an NDJSON media type) and anything else, a\n * **download**, through `./bodies`' `read`: an `AsyncIterable`, or the\n * download as `as` asks.\n */\nasync function readBody(\n response: Response,\n method: string,\n key: string,\n as: RuntimeOptions[\"as\"],\n framing?: \"ndjson\" | \"raw\",\n check?: (line: unknown) => Promise<unknown>,\n): Promise<ReadBody> {\n if (method === \"HEAD\" || BODILESS.has(response.status)) {\n await discard(response);\n return { value: undefined };\n }\n const type = response.headers.get(\"content-type\") ?? \"\";\n if (framing === undefined) {\n if (/^text\\/event-stream\\b/i.test(type))\n return { value: undefined, unread: true };\n if (isJsonType(type)) {\n const text = await response.text();\n if (!text) return { value: undefined };\n try {\n return { value: JSON.parse(text) };\n } catch (error) {\n throw new ClientError(\n `${key} answered ${response.status} with a body that is not JSON`,\n { key, cause: error },\n );\n }\n }\n if (!type || /^text\\//i.test(type)) {\n const text = await response.text();\n return { value: text === \"\" ? undefined : text };\n }\n }\n return (await loadBodies()).read(\n response,\n as,\n framing,\n check,\n key,\n ClientError,\n );\n}\n\n/** The current token and the single-flight refresh, shared by every call of one client. */\nclass AuthState {\n /** A token `refresh()` returned; wins over `config.token` until the next refresh. */\n #refreshed: string | undefined;\n /** Counts completed refreshes, so a call can tell whether its token is stale. */\n generation = 0;\n /** The refresh in flight, shared by every call that failed meanwhile. */\n #inflight: Promise<boolean> | undefined;\n\n constructor(private readonly config: ClientConfig[\"auth\"]) {}\n\n /** The token to send now; `undefined` for none. */\n async token(): Promise<string | undefined> {\n if (this.#refreshed !== undefined) return this.#refreshed;\n const source = this.config?.token;\n const value = typeof source === \"function\" ? await source() : source;\n return value ?? undefined;\n }\n\n /** The statuses that trigger a refresh, when a refresh is configured. */\n triggers(status: number): boolean {\n if (!this.config?.refresh) return false;\n return (this.config.on ?? [401]).includes(status);\n }\n\n /**\n * Refreshes once for every call that failed with the token of `generation`:\n * resolves `true` when there is a new token to retry with. A call whose\n * token a refresh already replaced retries without refreshing again.\n */\n refreshFor(generation: number): Promise<boolean> {\n if (this.#inflight) return this.#inflight;\n if (generation !== this.generation) return Promise.resolve(true);\n const refresh = this.config!.refresh!;\n this.#inflight = (async () => {\n try {\n const next = await refresh();\n if (next === null) return false;\n this.#refreshed = next ?? undefined;\n this.generation++;\n return true;\n } finally {\n this.#inflight = undefined;\n }\n })();\n return this.#inflight;\n }\n}\n\n/**\n * Creates a typed client over a route map (§6.1).\n *\n * ```ts\n * const api = createClient<Routes>({ baseUrl: \"/api\" });\n * const r = await api.get(\"/users/:id\", { params: { id: \"42\" } });\n * if (r.ok) r.data.name;\n * ```\n *\n * @typeParam R The route map, keyed `\"VERB /path\"`.\n * @typeParam F The configuration that decides a call's return type:\n * `{ throwOnError: true }` and/or `{ undeclaredStatus: \"result\" }` when the\n * configuration sets them (the configuration must then match).\n */\nexport function createClient<\n R extends RouteMap<R>,\n F extends ClientFlags = Record<never, never>,\n>(config?: ClientConfig<R> & FlagConfig<F>): Client<R, F>;\nexport function createClient(\n config: ClientConfig = {},\n): Client<Record<string, never>> {\n const auth = new AuthState(config.auth);\n const logger = config.logger ?? console;\n const routes = (config.routes ?? {}) as Readonly<\n Record<string, RouteConfig | undefined>\n >;\n const manifest = (config.manifest ?? {}) as Readonly<\n Record<string, RouteFacts | undefined>\n >;\n const development = (config.mode ?? defaultMode()) === \"development\";\n\n /** The checks (`./validation`), imported on the first call that may check something. */\n let checks: Promise<Checks> | undefined;\n const loadChecks = (): Promise<Checks> =>\n (checks ??= import(\"./validation\").then((module) =>\n module.createChecks({\n development,\n source: config.schemas,\n logger,\n errors: { ClientError, ValidationError },\n }),\n ));\n\n /** The configuration for one call, every level merged (§6.2). */\n const resolve = (key: string, call: RuntimeOptions): Resolved => {\n const route = routes[key] ?? {};\n return {\n timeout:\n call.timeout ?? route.timeout ?? config.timeout ?? DEFAULT_TIMEOUT,\n retry: mergeRetry([config.retry, route.retry, call.retry]),\n throwOnError: call.throwOnError ?? config.throwOnError ?? false,\n undeclaredStatus:\n call.undeclaredStatus ?? config.undeclaredStatus ?? \"throw\",\n headers: [config.headers, route.headers, call.headers],\n middleware: [\n ...(config.middleware ?? []),\n ...(route.middleware ?? []),\n ...(call.middleware ?? []),\n ],\n };\n };\n\n /** The URL for `path` with the call's params and query, `baseUrl` included. */\n const urlFor = (path: string, call: RuntimeOptions, key: string): string => {\n const query = serializeQuery(call.query);\n return `${config.baseUrl ?? \"\"}${buildPath(path, call.params, key)}${query ? `?${query}` : \"\"}`;\n };\n\n /** An absolute URL for `Request`, resolving a relative one where that is safe. */\n const absolute = (url: string, key: string): string => {\n if (/^[a-z][a-z\\d+.-]*:/i.test(url)) return url;\n const base = (globalThis as { location?: { href?: string } }).location\n ?.href;\n if (base) return new URL(url, base).href;\n if (config.fetch) return new URL(url, \"http://localhost\").href;\n throw new ClientError(\n `${key}: \"${url}\" is relative, and there is no page to resolve it against; give an absolute baseUrl, or a fetch that serves relative requests`,\n { key },\n );\n };\n\n /** Sends one attempt: a fresh request through the headers, auth and middleware. */\n const attempt = async (\n ctxBase: Omit<RequestContext, \"request\" | \"attempt\">,\n url: string,\n payload: Payload,\n resolved: Resolved,\n signal: AbortSignal,\n number: number,\n checkHeaders: ((request: Request) => Promise<void>) | undefined,\n ): Promise<{ response: Response; generation: number }> => {\n const init: RequestInit & { duplex?: \"half\" } = {\n method: ctxBase.method,\n credentials: config.credentials ?? \"same-origin\",\n signal,\n body: payload.body,\n headers:\n payload.type === undefined\n ? undefined\n : { \"content-type\": payload.type },\n };\n if (\n typeof ReadableStream !== \"undefined\" &&\n payload.body instanceof ReadableStream\n )\n init.duplex = \"half\";\n const ctx: RequestContext = {\n ...ctxBase,\n attempt: number,\n request: new Request(url, init),\n };\n for (const level of resolved.headers) {\n if (level === undefined) continue;\n const given = typeof level === \"function\" ? await level(ctx) : level;\n // An object's `undefined` sends no header (`Headers` would send\n // \"undefined\"), and a number or boolean is sent as its string: JSON\n // drops the one and keeps the other for `Headers` to write.\n new Headers(\n Array.isArray(given) || given instanceof Headers\n ? given\n : (JSON.parse(JSON.stringify(given)) as Record<string, string>),\n ).forEach((value, name) => {\n ctx.request.headers.set(name, value);\n });\n }\n const generation = auth.generation;\n const token = await auth.token();\n if (token !== undefined && !ctx.request.headers.has(\"authorization\"))\n ctx.request.headers.set(\"authorization\", `Bearer ${token}`);\n // The headers as they are sent, checked once, before any middleware.\n if (number === 1 && checkHeaders !== undefined)\n await checkHeaders(ctx.request);\n\n const run = async (index: number): Promise<Response> => {\n const middleware = resolved.middleware[index];\n if (middleware) return middleware(ctx, () => run(index + 1));\n // A signal aborted before the send: never hand a custom fetch a dead request.\n if (signal.aborted) throw reasonOf(signal);\n try {\n return await abortable((config.fetch ?? fetch)(ctx.request), signal);\n } catch (error) {\n // Only a rejected fetch is a network failure; an abort stays one.\n if (signal.aborted) throw reasonOf(signal);\n throw new NetworkError(`${ctx.key}: fetch failed`, {\n key: ctx.key,\n cause: error,\n });\n }\n };\n return { response: await run(0), generation };\n };\n\n /** Attempts with retries (§6.1): statuses, network failures, `Retry-After`, backoff. */\n const withRetries = async (\n ctxBase: Omit<RequestContext, \"request\" | \"attempt\">,\n url: string,\n payload: Payload,\n resolved: Resolved,\n signal: AbortSignal,\n first: number,\n checkHeaders?: (request: Request) => Promise<void>,\n ): Promise<{ response: Response; generation: number; attempts: number }> => {\n const retry =\n resolved.retry !== false &&\n resolved.retry.methods.some(\n (method) => method.toUpperCase() === ctxBase.method,\n ) &&\n !(\n typeof ReadableStream !== \"undefined\" &&\n payload.body instanceof ReadableStream\n )\n ? resolved.retry\n : undefined;\n for (let tries = 1; ; tries++) {\n const number = first + tries - 1;\n let outcome: { response: Response; generation: number } | undefined;\n let failure: NetworkError | undefined;\n try {\n outcome = await attempt(\n ctxBase,\n url,\n payload,\n resolved,\n signal,\n number,\n checkHeaders,\n );\n } catch (error) {\n if (signal.aborted) throw reasonOf(signal);\n if (!(error instanceof NetworkError)) throw error;\n failure = error;\n }\n if (!retry || tries > retry.attempts) {\n if (outcome) return { ...outcome, attempts: number };\n throw failure!;\n }\n if (outcome) {\n const { response } = outcome;\n if (!retry.on.includes(response.status))\n return { ...outcome, attempts: number };\n const after = retry.respectRetryAfter\n ? retryAfterMs(response.headers.get(\"retry-after\"))\n : undefined;\n const delay =\n after === undefined\n ? backoffDelay(tries, retry)\n : Math.min(after, retry.maxMs);\n await discard(response);\n logger.debug(\n `${ctxBase.key}: ${response.status}, retry ${tries} of ${retry.attempts} in ${Math.round(delay)} ms`,\n );\n await sleep(delay, signal);\n continue;\n }\n if (!retry.on.includes(\"network\")) throw failure!;\n const delay = backoffDelay(tries, retry);\n logger.debug(\n `${ctxBase.key}: network failure, retry ${tries} of ${retry.attempts} in ${Math.round(delay)} ms`,\n );\n await sleep(delay, signal);\n }\n };\n\n /** Turns a response into the call's value (§4.3, §4.4). */\n const finish = async (\n response: Response,\n key: string,\n method: string,\n resolved: Resolved,\n callChecks: CallChecks | undefined,\n as: RuntimeOptions[\"as\"],\n ): Promise<unknown> => {\n const status = response.status;\n const facts = manifest[key];\n const declared = facts?.statuses;\n if (declared && !declared.includes(status)) {\n if (resolved.throwOnError || resolved.undeclaredStatus === \"throw\")\n throw new UnexpectedStatusError(response, declared, key);\n const error = (await readBody(response, method, key, as)).value;\n return { ok: false, status, error, response };\n }\n // A streamed body is read as it is iterated, an NDJSON line checked as\n // the status's response (other-transports.md §4); an unread one is not\n // checked whole (a check would have to read it).\n const read = await readBody(\n response,\n method,\n key,\n as,\n facts?.chunks?.[status],\n callChecks && ((line) => callChecks.response(status, line)),\n );\n const filename = read.filename;\n // The declared headers (§5.6) are checked with the body, in one error;\n // alone for a body left unread, before it is handed on.\n let body = read.value;\n if (callChecks !== undefined && read.unread) {\n try {\n await callChecks.responseHeaders(status, response.headers);\n } catch (error) {\n await discard(response);\n throw error;\n }\n } else if (callChecks !== undefined)\n body = await callChecks.response(status, read.value, response.headers);\n const ok = status >= 200 && status < 300;\n if (resolved.throwOnError) {\n if (ok) return body;\n throw new HttpError(status, body, response, key);\n }\n return ok\n ? {\n ok,\n status,\n data: body,\n ...(filename === undefined ? {} : { filename }),\n response,\n }\n : { ok, status, error: body, response };\n };\n\n /**\n * Encodes the body once for every attempt (§6.1, `other-transports.md`\n * §3): files, or a plain object for a multipart route, as `FormData`; a\n * plain object for an urlencoded route as a form; a `FormData`,\n * `URLSearchParams`, `Blob`, buffer or stream as it is; anything else as\n * JSON.\n */\n const encode = async (\n options: RuntimeOptions,\n multipart: boolean,\n bodyType: RouteFacts[\"bodyType\"],\n ): Promise<Payload> => {\n const body = options.body;\n if (multipart)\n return {\n body: (await loadBodies()).formDataOf(\n queryPairs(body),\n options.files as Readonly<Record<string, File | readonly File[]>>,\n ),\n };\n if (body === undefined) return {};\n if (isRawBody(body)) return { body };\n if (bodyType === \"urlencoded\" && typeof body === \"object\" && body !== null)\n return {\n body: serializeQuery(body),\n type: \"application/x-www-form-urlencoded\",\n };\n return { body: JSON.stringify(body), type: \"application/json\" };\n };\n\n /** Runs one call by route key. */\n const call = async (\n key: string,\n given: RuntimeOptions = {},\n ): Promise<unknown> => {\n const space = key.indexOf(\" \");\n if (space < 1)\n throw new ClientError(`\"${key}\" is not a route key (\"VERB /path\")`, {\n key,\n });\n const method = key.slice(0, space).toUpperCase();\n const path = key.slice(space + 1);\n const resolved = resolve(key, given);\n const levels = [config.validate, routes[key]?.validate, given.validate];\n const callChecks =\n (development && config.schemas !== undefined) || levels.some(mayCheck)\n ? (await loadChecks())(key, levels)\n : undefined;\n const bodyType = manifest[key]?.bodyType;\n const hasFiles =\n given.files !== undefined &&\n given.files !== null &&\n Object.values(given.files).some((file) => file != null);\n const multipart =\n hasFiles ||\n (bodyType === \"multipart\" &&\n typeof given.body === \"object\" &&\n given.body !== null &&\n !isRawBody(given.body));\n // Every file a named `File` before it is checked and sent (`./bodies`).\n const input: RuntimeOptions = hasFiles\n ? {\n ...given,\n files: (await loadBodies()).normaliseFiles(given.files!),\n }\n : given;\n // What is sent: the call's options, with a passing BYO schema's output.\n const options =\n callChecks === undefined\n ? input\n : await callChecks.request(input, isRawBody(input.body));\n const url = absolute(urlFor(path, options, key), key);\n const payload = await encode(options, multipart, bodyType);\n\n const timeout = new AbortController();\n const timer =\n resolved.timeout === false\n ? undefined\n : setTimeout(\n () =>\n timeout.abort(new TimeoutError(resolved.timeout as number, key)),\n resolved.timeout,\n );\n const signal = options.signal\n ? AbortSignal.any([options.signal, timeout.signal])\n : timeout.signal;\n const ctxBase = {\n key,\n method,\n path,\n options: options as Readonly<Record<string, unknown>>,\n };\n try {\n let { response, generation, attempts } = await withRetries(\n ctxBase,\n url,\n payload,\n resolved,\n signal,\n 1,\n callChecks?.headers,\n );\n if (\n auth.triggers(response.status) &&\n (await auth.refreshFor(generation))\n ) {\n await discard(response);\n ({ response, generation, attempts } = await withRetries(\n ctxBase,\n url,\n payload,\n resolved,\n signal,\n attempts + 1,\n ));\n }\n return await finish(\n response,\n key,\n method,\n resolved,\n callChecks,\n options.as,\n );\n } catch (error) {\n // Whichever aborted first, the caller or the timeout (the combined\n // signal keeps the first reason), over whatever the abort caused.\n if (signal.aborted) throw reasonOf(signal);\n throw error;\n } finally {\n clearTimeout(timer);\n }\n };\n\n const client: Record<string | symbol, unknown> = {\n request: call,\n url: (path: string, options: RuntimeOptions = {}) =>\n urlFor(path, options, path),\n // The configuration, for a transport in another entry (`./sse` reads\n // its validation, schemas, mode and logger): under a registered symbol,\n // so that entry imports nothing of this module.\n [Symbol.for(\"@kingsleyweb/bun-client\")]: config,\n };\n for (const verb of VERBS) {\n const method = verb.toUpperCase();\n client[verb] = (path: string, options?: RuntimeOptions) =>\n call(`${method} ${path}`, options);\n }\n\n const byOperation = new Map<string, string>();\n for (const [key, facts] of Object.entries(manifest)) {\n if (facts?.operationId) byOperation.set(facts.operationId, key);\n }\n client.op = new Proxy(\n {},\n {\n get: (_target, name) => {\n if (typeof name !== \"string\") return undefined;\n const key = byOperation.get(name);\n if (!key) {\n return () =>\n Promise.reject(\n new ClientError(\n `No operation \"${name}\" in the client's manifest`,\n ),\n );\n }\n return (options?: RuntimeOptions) => call(key, options);\n },\n },\n );\n return client as unknown as Client<Record<string, never>>;\n}\n",
10
+ "/**\n * `@kingsleyweb/bun-client/query`: the data layer on `@tanstack/query-core`\n * (typed-client plan §6.3, §6.4, §7.2, PR-C5). What it adds over query-core,\n * and nothing more:\n *\n * - **Keys**: `[routeKey, { params, query }]`, so `invalidateQueries({\n * queryKey: [\"GET /users/:id\"] })` reaches every user by prefix. Params are\n * written as strings (the URL has no other kind), so `{ id: 7 }` and\n * `{ id: \"7\" }` share a key. An infinite query's key ends in `\"infinite\"`,\n * and leaves its page field out of `query`.\n * - **Tags**: a route's `cache.tags` from the manifest (`x-bun-cache`,\n * `.describe({ cache })`), each template's `{name}` filled from the call's\n * params, become the query's `meta.tags`; the `Cache-Tag` (comma-separated)\n * and `Surrogate-Key` (space-separated) headers of its responses, which\n * bun-cache's `cacheResponse({ surrogateKeys })` writes, are kept beside\n * them. {@link invalidateTags} matches either. A mutation's\n * `cache.invalidates`, filled from its variables' params, is invalidated on\n * success, and the mutation settles after the refetches it caused.\n * - **Conditional revalidation**: a query's last `ETag` goes out as\n * `If-None-Match` on its next fetch, and a `304` keeps the cached data\n * (the same object, so nothing downstream sees a change; `dataUpdatedAt`\n * still moves). An ETag is kept only for the data it came with: writing\n * the query by hand (`setQueryData`, an optimistic update) drops it, and so\n * does `Cache-Control: no-store`.\n * - **Optimistic updates**: `q.mutation(key, { optimistic })` writes the\n * named GET routes' cached queries before the request and puts them back\n * if it fails, then invalidates them once it settles.\n * - **Infinite queries**: the page parameter is a field of the route's\n * query, typed from it.\n * - {@link observe}: a framework-free `subscribe`/`getSnapshot` store over a\n * `QueryObserver` (or an `InfiniteQueryObserver`), whose snapshot keeps\n * its identity until something in it changes (§6.3).\n *\n * Everything else (dedupe, stale-while-revalidate, focus and online\n * refetches, intervals, gc, the query's own retries) is query-core's, set on\n * the `QueryClient` or spread over what the factories return.\n *\n * `@tanstack/query-core` is an optional peer (Q3): only this entry imports\n * it, and the core client (`.`) imports nothing of this module.\n * {@link live} (PR-W4) keeps the observed queries fresh over bun-common's\n * live channel, through {@link tagsOfQuery}; its implementation\n * (`./live`) loads lazily.\n */\nimport type {\n DataTag,\n DefaultError,\n InfiniteData,\n InfiniteQueryObserverOptions,\n InfiniteQueryObserverResult,\n InvalidateOptions,\n InvalidateQueryFilters,\n MutationFunctionContext,\n Query,\n QueryClient,\n QueryFunctionContext,\n QueryKey,\n QueryObserverOptions,\n QueryObserverResult,\n} from \"@tanstack/query-core\";\nimport type { StandardSchemaV1 } from \"@kingsleyweb/bun-contract\";\nimport type { ClientError, GraphQLResponseError, HttpError } from \"./errors\";\nimport type {\n GraphQLCallOptions,\n GraphQLDocument,\n ResultOf,\n VariablesOf,\n} from \"./graphql\";\nimport type {\n CallArgs,\n CallParts,\n Client,\n ClientFlags,\n ClientMiddleware,\n EntryAt,\n PathsOf,\n RouteConfig,\n RouteManifest,\n RouteMap,\n SuccessData,\n ValidationConfig,\n} from \"./types\";\nimport {\n hashKey,\n InfiniteQueryObserver,\n QueryObserver,\n} from \"@tanstack/query-core\";\n\n/* ------------------------------------------------------------------ */\n/* Types */\n/* ------------------------------------------------------------------ */\n\n/** What a query or mutation of route entry `E` rejects with: the client's errors. */\ntype ErrorOf<E> = HttpError<E> | ClientError;\n\n/**\n * The options of one query, infinite query or mutation call: the route's\n * typed parts (`params`, `query`, `body`, `headers`) and the per-route\n * settings (`timeout`, `retry`, `middleware`, `validate`). No `signal`\n * (query-core's is used), and no `throwOnError`/`undeclaredStatus`: a query\n * function always resolves the success body and throws the client's error\n * otherwise.\n *\n * @typeParam V The call's `validate.response`, as `q.query()` and\n * `q.infinite()` capture it: a BYO schema set there for a 2xx status\n * types the query's data as the schema's output (§5.4), as on the HTTP\n * client. Default: any, typing nothing.\n */\nexport type QueryCallOptions<\n E,\n V extends ValidationConfig[\"response\"] = ValidationConfig[\"response\"],\n> = CallParts<E> &\n Omit<RouteConfig, \"headers\" | \"validate\"> & {\n /**\n * Validation for this call, merged per key over the route's and the\n * client's; `false` turns it all off. A BYO schema set for a success\n * status (`response: { 200: { custom } }`) types the data as its output,\n * which is what the client delivers when the check passes (§5.4; a\n * failed check under `\"warn\"` delivers the body as it arrived, so\n * `onFailure: { response: \"throw\" }` is the safe pairing). The query's\n * key does not hold it: two queries of one route and params share one\n * cache entry whatever they validate. Default: the route's.\n */\n validate?: false | (ValidationConfig & { response?: V });\n };\n\n/** The options argument, required when the route has a required part. */\ntype QueryArgs<E, V extends ValidationConfig[\"response\"] = undefined> =\n [] extends CallArgs<E>\n ? [options?: QueryCallOptions<E, V>]\n : [options: QueryCallOptions<E, V>];\n\n/** A mutation's variables: its call options, or nothing when no part is required. */\ntype MutationVariables<E> =\n [] extends CallArgs<E> ? QueryCallOptions<E> | void : QueryCallOptions<E>;\n\n/** The second element of every key: the call's params (as strings) and query. */\ninterface KeyParts {\n /** The path params, each written as a string. */\n readonly params: Readonly<Record<string, string>>;\n /** The query object, as given. */\n readonly query: Readonly<Record<string, unknown>>;\n}\n\n/** A query's key: `[routeKey, { params, query }]`. */\ntype ApiQueryKey<K extends string> = readonly [K, KeyParts];\n\n/** An infinite query's key: `[routeKey, { params, query }, \"infinite\"]`. */\ntype ApiInfiniteKey<K extends string> = readonly [K, KeyParts, \"infinite\"];\n\n/** What `q.query()` returns: options any query-core method takes (`fetchQuery`, a `QueryObserver`, `useQuery`). */\nexport interface ApiQueryOptions<TData, TError, K extends string> {\n /** `[routeKey, { params, query }]`, tagged with the data type for `getQueryData`. */\n queryKey: DataTag<ApiQueryKey<K>, TData, TError>;\n /** Calls the route through the client, with `If-None-Match` once it has an ETag. */\n queryFn: (context: QueryFunctionContext<ApiQueryKey<K>>) => Promise<TData>;\n /** `tags`: the route's declared tags, filled from the params. */\n meta: { tags: string[] };\n}\n\n/** The non-nullable type of a query field. */\ntype FieldOf<Q, P> = P extends keyof Q\n ? Exclude<Q[P], undefined | null>\n : never;\n\n/** The query object a route's call takes. */\ntype QueryOf<E> =\n CallParts<E> extends { query?: infer Q } ? NonNullable<Q> : never;\n\n/** A page function: the next (or previous) page's value of the page field, `undefined` or `null` for none. */\ntype PageFunction<TData, TPage> = (\n page: TData,\n pages: TData[],\n pageParam: TPage | undefined,\n pageParams: (TPage | undefined)[],\n) => TPage | undefined | null;\n\n/**\n * The third argument of `q.infinite()` (§6.4): which query field carries the\n * page, and how to find the next one.\n *\n * @typeParam TData A page's data: the route's success body.\n * @typeParam TPage The page field's type, from the route's query.\n * @typeParam P The page field's name.\n */\nexport interface InfiniteConfig<TData, TPage, P extends string> {\n /** The query field the page goes in (`\"page\"`, `\"cursor\"`). */\n pageParam: P;\n /**\n * The first page's value. Default: the field's value in the call's query,\n * else none (the field is left out, and the server picks the first page).\n */\n initialPageParam?: TPage;\n /** The next page's value from the last page (query-core's `getNextPageParam`). */\n next: PageFunction<TData, TPage>;\n /** The previous page's value from the first page (`getPreviousPageParam`). Default: none, no backward paging. */\n previous?: PageFunction<TData, TPage>;\n}\n\n/** What `q.infinite()` returns: infinite query options for `fetchInfiniteQuery` or an `InfiniteQueryObserver`. */\nexport interface ApiInfiniteOptions<TData, TError, TPage, K extends string> {\n /** `[routeKey, { params, query }, \"infinite\"]`, the page field left out of `query`. */\n queryKey: DataTag<\n ApiInfiniteKey<K>,\n InfiniteData<TData, TPage | undefined>,\n TError\n >;\n /** Calls the route with the page in the page field. */\n queryFn: (\n context: QueryFunctionContext<ApiInfiniteKey<K>, TPage | undefined>,\n ) => Promise<TData>;\n /** As given, or the call's own value of the field. */\n initialPageParam: TPage | undefined;\n /** `next`, as query-core calls it. */\n getNextPageParam: PageFunction<TData, TPage>;\n /** `previous`, as query-core calls it, when given. */\n getPreviousPageParam?: PageFunction<TData, TPage>;\n /** `tags`: the route's declared tags, filled from the params. */\n meta: { tags: string[] };\n}\n\n/** The `optimistic` writers of a mutation: one per GET route of the map. */\ntype OptimisticWriters<R, V> = {\n [P in PathsOf<R, \"GET\"> as `GET ${P}`]?: (\n old: SuccessData<EntryAt<R, `GET ${P}`>>,\n variables: V,\n ) => SuccessData<EntryAt<R, `GET ${P}`>> | undefined;\n};\n\n/**\n * The options of `q.mutation()`.\n *\n * @typeParam R The route map.\n * @typeParam V The mutation's variables.\n * @typeParam S Its `validate.response`, captured so a BYO schema set for a\n * success status types the mutation's data (§5.4). Default: any, typing\n * nothing.\n */\nexport interface MutationConfig<\n R,\n V,\n S extends ValidationConfig[\"response\"] = ValidationConfig[\"response\"],\n> {\n /**\n * Writes to the cache before the request is sent, put back if it fails\n * (§6.4): per GET route key, a function from a cached query's data and the\n * mutation's variables to the new data (`undefined` leaves that query as\n * it is). It is applied to each cached query of that route whose params\n * agree with the mutation's on every name both have, so a `PATCH\n * /users/:id` writing `\"GET /users/:id\"` touches that user only, and\n * `\"GET /users\"` (no params) every list. Infinite queries are left alone.\n * Those queries are cancelled first and invalidated once the mutation\n * settles. Default: none.\n */\n optimistic?: OptimisticWriters<R, V>;\n /**\n * Validation for every call of the mutation, as a call's `validate`\n * (merged per key over the route's and the client's). A BYO schema set\n * for a success status (`response: { 201: { custom } }`) types the\n * mutation's data as the schema's output (§5.4). Variables that carry\n * their own `validate` use it instead of this one. Default: the route's.\n */\n validate?: false | (ValidationConfig & { response?: S });\n}\n\n/** What `q.mutation()` returns: mutation options for a `MutationObserver` or `useMutation`. */\nexport interface ApiMutationOptions<\n TData,\n TError,\n TVariables,\n K extends string,\n> {\n /** `[routeKey]`. */\n mutationKey: readonly [K];\n /** Calls the route; resolves the success body, throws the client's error. */\n mutationFn: (variables: TVariables) => Promise<TData>;\n /** Cancels and writes the optimistic queries; resolves what `onError` restores. */\n onMutate: (\n variables: TVariables,\n context: MutationFunctionContext,\n ) => Promise<OptimisticSnapshot>;\n /** Puts the optimistic queries back. */\n onError: (\n error: TError,\n variables: TVariables,\n snapshot: OptimisticSnapshot | undefined,\n context: MutationFunctionContext,\n ) => void;\n /** Invalidates the route's `invalidates` tags, filled from the variables' params; resolves after their refetches. */\n onSuccess: (\n data: TData,\n variables: TVariables,\n snapshot: OptimisticSnapshot | undefined,\n context: MutationFunctionContext,\n ) => Promise<void>;\n /** Invalidates the queries `optimistic` wrote. */\n onSettled: (\n data: TData | undefined,\n error: TError | null,\n variables: TVariables,\n snapshot: OptimisticSnapshot | undefined,\n context: MutationFunctionContext,\n ) => Promise<void>;\n /** `invalidates`: the route's templates, as the manifest gives them. */\n meta: { invalidates: string[] };\n}\n\n/** What an optimistic write saved: each written query as it was before. */\nexport interface OptimisticSnapshot {\n /** The written queries, in the order they were written. */\n readonly written: readonly {\n /** The query's key. */\n readonly queryKey: QueryKey;\n /** Its data before the write: the same object is put back. */\n readonly data: unknown;\n /** When that data arrived. */\n readonly dataUpdatedAt: number;\n /** The ETag that data came with, if any: put back with it. */\n readonly etag: string | undefined;\n }[];\n}\n\n/** The options of {@link queries}. */\nexport interface QueriesOptions<R> {\n /**\n * The route map's manifest, as given to `createClient` (the generator\n * writes it): its `cache` entries are the routes' declared tags and\n * invalidations. Default: none, so only the tags of the responses'\n * `Cache-Tag`/`Surrogate-Key` headers apply.\n */\n manifest?: RouteManifest<R>;\n}\n\n/** The factories {@link queries} returns over a client (§6.4). */\nexport interface Queries<R> {\n /**\n * A key for route `key` (`[key, { params, query }]`), for `getQueryData`,\n * `setQueryData` and filters. Leave the parts out for the route's prefix,\n * `[key]`, which every query of the route matches.\n */\n key: <K extends keyof R & string>(\n key: K,\n parts?: {\n /** Path params (written as strings, as the queries' keys hold them). */\n params?: object;\n /** The query object. */\n query?: object;\n },\n ) => QueryKey;\n /**\n * Query options for a GET route, by path: `q.query(\"/users/:id\", { params:\n * { id } })`. A BYO schema in the options' `validate.response` for a\n * success status types the data as its output (§5.4).\n */\n query: <\n P extends PathsOf<R, \"GET\">,\n V extends ValidationConfig[\"response\"] = undefined,\n >(\n path: P,\n ...args: QueryArgs<EntryAt<R, `GET ${P}`>, V>\n ) => ApiQueryOptions<\n SuccessData<EntryAt<R, `GET ${P}`>, undefined, V>,\n ErrorOf<EntryAt<R, `GET ${P}`>>,\n `GET ${P}`\n >;\n /**\n * Infinite query options for a GET route (§6.4), the page in one of its\n * query's fields: `q.infinite(\"/users\", { query: { q } }, { pageParam:\n * \"page\", next: (last) => last.next })`. That field may be left out of\n * the options' query.\n */\n infinite: <\n P extends PathsOf<R, \"GET\">,\n F extends keyof QueryOf<EntryAt<R, `GET ${P}`>> & string,\n V extends ValidationConfig[\"response\"] = undefined,\n >(\n path: P,\n options: InfiniteCallOptions<EntryAt<R, `GET ${P}`>, F, V>,\n page: InfiniteConfig<\n SuccessData<EntryAt<R, `GET ${P}`>, undefined, V>,\n FieldOf<QueryOf<EntryAt<R, `GET ${P}`>>, F>,\n F\n >,\n ) => ApiInfiniteOptions<\n SuccessData<EntryAt<R, `GET ${P}`>, undefined, V>,\n ErrorOf<EntryAt<R, `GET ${P}`>>,\n FieldOf<QueryOf<EntryAt<R, `GET ${P}`>>, F>,\n `GET ${P}`\n >;\n /**\n * Mutation options for any route, by key: `q.mutation(\"POST /users\", {\n * optimistic })`. A BYO schema in the config's `validate.response` for a\n * success status types the data as its output (§5.4).\n */\n mutation: <\n K extends keyof R & string,\n S extends ValidationConfig[\"response\"] = undefined,\n >(\n key: K,\n config?: MutationConfig<R, MutationVariables<R[K]>, S>,\n ) => ApiMutationOptions<\n SuccessData<R[K], undefined, S>,\n ErrorOf<R[K]>,\n MutationVariables<R[K]>,\n K\n >;\n /**\n * Query options for a GraphQL query (`graphql.md` §3.1), over a client\n * from `./graphql`'s `createGraphQLClient`: `q.graphql(gh, UserQuery, {\n * id })`. The key is `[url, operationName, variables]` (an anonymous\n * operation's text in place of its name); the query function resolves\n * the operation's `data` and rejects with `GraphQLResponseError` for a\n * response with errors (partial data included) and the client's errors\n * otherwise. `tags` become `meta.tags`, beside its responses' `Cache-Tag`\n * / `Surrogate-Key`.\n */\n graphql: <\n D extends GraphQLDocument,\n S extends StandardSchemaV1 | undefined = undefined,\n >(\n gh: GraphQLQueryClient,\n document: D,\n ...args: GraphQLQueryArgs<VariablesOf<D>, S>\n ) => GraphQLQueryOptions<\n [S] extends [StandardSchemaV1]\n ? StandardSchemaV1.InferOutput<S>\n : ResultOf<D>\n >;\n /** {@link invalidateTags}, the same function. */\n invalidateTags: typeof invalidateTags;\n}\n\n/** A GraphQL client (`createGraphQLClient`), as `q.graphql()` takes it. */\ninterface GraphQLQueryClient {\n /** Its query call. */\n readonly query: (...args: never[]) => Promise<unknown>;\n}\n\n/**\n * The options of `q.graphql()`: a GraphQL call's, without `signal`\n * (query-core's is used) or the throw switches (the query function always\n * throws), plus the query's tags.\n */\nexport type GraphQLQueryCallOptions<S> = Omit<\n GraphQLCallOptions<undefined, undefined, S>,\n \"signal\" | \"throwOnError\" | \"throwOnGraphQLErrors\"\n> & {\n /** The query's `meta.tags`, which {@link invalidateTags} and {@link live} match. Default: none. */\n tags?: readonly string[];\n};\n\n/** `q.graphql()`'s arguments after the document: the variables are required when the operation has a required one. */\ntype GraphQLQueryArgs<V, S> = [RequiredKeysOf<V>] extends [never]\n ? [variables?: V, options?: GraphQLQueryCallOptions<S>]\n : [variables: V, options?: GraphQLQueryCallOptions<S>];\n\n/** A GraphQL query's key: `[url, operationName (or the text), variables]`. */\ntype GraphQLQueryKey = readonly [string, string, unknown];\n\n/** What `q.graphql()` returns: options any query-core method takes. */\nexport interface GraphQLQueryOptions<TData> {\n /** `[url, operationName, variables]`, tagged with the data type. */\n queryKey: DataTag<\n GraphQLQueryKey,\n TData,\n GraphQLResponseError<TData> | ClientError\n >;\n /** Runs the query through the GraphQL client; resolves its `data`. */\n queryFn: (context: QueryFunctionContext<GraphQLQueryKey>) => Promise<TData>;\n /** `tags`: as given. */\n meta: { tags: string[] };\n}\n\n/** The keys of `T` whose property is required. */\ntype RequiredKeysOf<T> = {\n [K in keyof T]-?: Record<never, never> extends Pick<T, K> ? never : K;\n}[keyof T];\n\n/** The query with field `F` optional. */\ntype PageQuery<Q, F extends keyof Q> = Omit<Q, F> & Partial<Pick<Q, F>>;\n\n/**\n * An infinite query's call options: the page field optional in `query`.\n * `V` is its `validate.response`, as {@link QueryCallOptions}' (each page's\n * data typed by a BYO schema's output).\n */\nexport type InfiniteCallOptions<\n E,\n F extends keyof QueryOf<E>,\n V extends ValidationConfig[\"response\"] = ValidationConfig[\"response\"],\n> = Omit<QueryCallOptions<E, V>, \"query\"> &\n ([RequiredKeysOf<PageQuery<QueryOf<E>, F>>] extends [never]\n ? {\n /** The query, the page field optional. */\n query?: PageQuery<QueryOf<E>, F>;\n }\n : {\n /** The query, the page field optional. */\n query: PageQuery<QueryOf<E>, F>;\n });\n\n/* ------------------------------------------------------------------ */\n/* The per-client store: ETags and response tags */\n/* ------------------------------------------------------------------ */\n\n/** What the layer keeps per `QueryClient`, by query hash. */\ninterface Store {\n /** The ETag of each query's current data. */\n readonly etags: Map<string, string>;\n /** The ETag a fetch just read (`null`: none), applied when its data is. */\n readonly pending: Map<string, string | null>;\n /** The tags of each query's last response headers. */\n readonly headerTags: Map<string, readonly string[]>;\n}\n\n/** One store per `QueryClient`, alive as long as it is. */\nconst stores = new WeakMap<QueryClient, Store>();\n\n/**\n * The client's store, created on first use with a cache listener that\n * applies a fetch's ETag when its data lands, drops it when the data is\n * written by hand (a `manual` success: `setQueryData`), and forgets a query\n * the cache removed.\n */\nfunction storeFor(client: QueryClient): Store {\n let store = stores.get(client);\n if (store) return store;\n const created: Store = {\n etags: new Map(),\n pending: new Map(),\n headerTags: new Map(),\n };\n store = created;\n stores.set(client, created);\n client.getQueryCache().subscribe((event) => {\n const hash = event.query.queryHash;\n if (event.type === \"removed\") {\n created.etags.delete(hash);\n created.pending.delete(hash);\n created.headerTags.delete(hash);\n return;\n }\n if (event.type !== \"updated\" || event.action.type !== \"success\") return;\n if (event.action.manual) {\n created.etags.delete(hash);\n created.pending.delete(hash);\n return;\n }\n if (!created.pending.has(hash)) return;\n const etag = created.pending.get(hash);\n created.pending.delete(hash);\n if (etag == null) created.etags.delete(hash);\n else created.etags.set(hash, etag);\n });\n return created;\n}\n\n/**\n * The tags a response's headers carry: `Cache-Tag` split on commas,\n * `Surrogate-Key` on whitespace, de-duplicated; `undefined` when it has\n * neither header.\n */\nfunction headerTagsOf(response: Response): string[] | undefined {\n const cacheTag = response.headers.get(\"cache-tag\");\n const surrogate = response.headers.get(\"surrogate-key\");\n if (cacheTag === null && surrogate === null) return undefined;\n const tags = new Set<string>();\n for (const tag of cacheTag?.split(\",\") ?? []) {\n if (tag.trim()) tags.add(tag.trim());\n }\n for (const tag of surrogate?.split(/\\s+/) ?? []) {\n if (tag) tags.add(tag);\n }\n return [...tags];\n}\n\n/** Whether a response forbids keeping it: `Cache-Control: no-store`. */\nfunction noStore(response: Response): boolean {\n return /(?:^|,)\\s*no-store\\s*(?:,|$)/i.test(\n response.headers.get(\"cache-control\") ?? \"\",\n );\n}\n\n/** The query `key` names in `client`'s cache, if any. */\nfunction queryAt(client: QueryClient, key: QueryKey): Query | undefined {\n const cache = client.getQueryCache();\n return cache.get(hashKey(key)) ?? cache.find({ queryKey: key, exact: true });\n}\n\n/**\n * Every tag of a cached query: its `meta.tags` (the route's declared tags)\n * and the tags its last response's headers carried. What\n * {@link invalidateTags} matches, and what {@link live} subscribes to.\n */\nexport function tagsOfQuery(client: QueryClient, query: Query): string[] {\n const declared = query.meta?.tags;\n const tags = new Set<string>(\n Array.isArray(declared)\n ? declared.filter((tag): tag is string => typeof tag === \"string\")\n : [],\n );\n for (const tag of stores.get(client)?.headerTags.get(query.queryHash) ?? [])\n tags.add(tag);\n return [...tags];\n}\n\n/**\n * Invalidates every query carrying one of `tags` (§6.4): a tag its route\n * declares (`meta.tags`) or one its last response sent in `Cache-Tag` or\n * `Surrogate-Key`. bun-cache's verb, for the client cache. Matching is\n * exact and case sensitive. Resolves when the refetches it started settle,\n * as `invalidateQueries` does.\n *\n * @param client The `QueryClient`.\n * @param tags The tags to invalidate.\n * @param filters More of `invalidateQueries`' filters (`type`, `refetchType`, …); its `predicate` is this function's.\n * @param options `invalidateQueries`' options (`cancelRefetch`, `throwOnError`).\n */\nexport function invalidateTags(\n client: QueryClient,\n tags: readonly string[],\n filters?: Omit<InvalidateQueryFilters, \"predicate\">,\n options?: InvalidateOptions,\n): Promise<void> {\n const wanted = new Set(tags);\n if (wanted.size === 0) return Promise.resolve();\n return client.invalidateQueries(\n {\n ...filters,\n predicate: (query) =>\n tagsOfQuery(client, query).some((tag) => wanted.has(tag)),\n },\n options,\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Live invalidation */\n/* ------------------------------------------------------------------ */\n\n/** {@link live}'s options. */\nexport interface LiveOptions {\n /**\n * How to reach the server's live channel: `\"websocket\"` (bun-common's\n * `liveContract` at `/__live` under the client's `baseUrl`) or `\"sse\"`\n * (its fallback, `/__live/sse`). Default: `\"websocket\"` where the\n * platform has a `WebSocket`, else `\"sse\"`; a socket that has not opened\n * 3 s after the start (a proxy refusing upgrades) gives way to `\"sse\"`.\n */\n transport?: \"websocket\" | \"sse\";\n /**\n * Called with the tags the server refused to subscribe this client to\n * (its per-tag authorization: a `hello` listing them as `denied`, or the\n * SSE fallback's `403` `LIVE_TAGS_DENIED` when it refuses every tag,\n * which ends that stream without a reconnect), each time it says so (a\n * reconnect, or a new tag, asks again). Those queries are not kept fresh\n * by the server. Default: each refused tag is logged\n * once, as a warning, through the client's `logger`.\n */\n onDenied?: (tags: string[]) => void;\n}\n\n/** The symbol {@link queries} keeps `live()` over its client under, for `./react`'s `useLive`. */\nconst LIVE = Symbol.for(\"@kingsleyweb/bun-client/query#live\");\n\n/** The implementation, loaded on the first {@link live} call. */\nlet liveModule: Promise<typeof import(\"./live\")> | undefined;\n\n/**\n * Keeps `queryClient`'s observed queries fresh over bun-common's live\n * channel (`websocket.md` §9; `liveInvalidation()` on the server): it\n * subscribes to the tags of every query with an observer ({@link\n * tagsOfQuery}: the route's declared tags and its responses' `Cache-Tag` /\n * `Surrogate-Key`), refcounted, and invalidates the queries under a tag\n * when the server says it was invalidated — once per invalidation, however\n * many of its tags they hold. After a reconnect it resumes from the last\n * invalidation it heard; when the server cannot replay what was missed (a\n * `gap`, or a restarted server's new epoch) every query is invalidated.\n * Answers the function that stops it.\n *\n * The implementation (and `./channel` or `./sse` under it) loads with\n * `import()` on the first call, so this entry stays small; nothing is\n * subscribed until it has.\n *\n * ```ts\n * const stop = live(api, queryClient);\n * ```\n *\n * @param api The client (`createClient`): its `baseUrl`, headers, auth and\n * logger apply.\n * @param queryClient The `QueryClient` whose queries are kept fresh.\n * @param options See {@link LiveOptions}.\n */\nexport function live(\n api: {\n /** The client's URL builder. */\n readonly url: (...args: never[]) => string;\n /** The client's request. */\n readonly request: (...args: never[]) => Promise<unknown>;\n },\n queryClient: QueryClient,\n options: LiveOptions = {},\n): () => void {\n let stop: (() => void) | undefined;\n let stopped = false;\n void (liveModule ??= import(\"./live\")).then(\n (module) => {\n if (!stopped)\n stop = module.startLive(api, queryClient, options, tagsOfQuery);\n },\n (error: unknown) => {\n const logger =\n (\n (api as unknown as Record<symbol, unknown>)[\n Symbol.for(\"@kingsleyweb/bun-client\")\n ] as { logger?: Pick<Console, \"error\"> } | undefined\n )?.logger ?? console;\n logger.error(\"live(): could not load\", error);\n },\n );\n return () => {\n stopped = true;\n stop?.();\n };\n}\n\n/* ------------------------------------------------------------------ */\n/* The factories */\n/* ------------------------------------------------------------------ */\n\n/** The symbol a GraphQL client keeps what `q.graphql()` reads under (`./graphql`). */\nconst GRAPHQL = Symbol.for(\"@kingsleyweb/bun-client/graphql\");\n\n/** The client as the factories call it, untyped. */\ninterface RuntimeClient {\n /** `Client.request`, its options untyped. */\n request: (key: string, options?: object) => Promise<unknown>;\n}\n\n/** Call options as the factories read them. */\ninterface RuntimeCall {\n /** Path params. */\n params?: Readonly<Record<string, unknown>>;\n /** The query object. */\n query?: Readonly<Record<string, unknown>>;\n /** The call's middleware. */\n middleware?: readonly ClientMiddleware[];\n}\n\n/** The params as a key writes them: every value a string. */\nfunction keyParams(\n params: Readonly<Record<string, unknown>> | undefined,\n): Record<string, string> {\n const out: Record<string, string> = {};\n for (const [name, value] of Object.entries(params ?? {})) {\n if (value !== undefined && value !== null) out[name] = String(value);\n }\n return out;\n}\n\n/** `{name}` in a template, the name captured. */\nconst PLACEHOLDER = /\\{([^{}]+)\\}/g;\n\n/**\n * Fills each template's `{name}` from `params`; a template naming a param\n * the call does not have is left out (it would name no real tag).\n */\nfunction fillTags(\n templates: readonly string[] | undefined,\n params: Readonly<Record<string, unknown>> | undefined,\n): string[] {\n const out: string[] = [];\n for (const template of templates ?? []) {\n let missing = false;\n const tag = template.replace(PLACEHOLDER, (_match, name: string) => {\n const value = params?.[name];\n if (value === undefined || value === null) {\n missing = true;\n return \"\";\n }\n return String(value);\n });\n if (!missing && !out.includes(tag)) out.push(tag);\n }\n return out;\n}\n\n/** The value as a plain object, or `{}`. */\nfunction asRecord(value: unknown): Readonly<Record<string, unknown>> {\n return typeof value === \"object\" && value !== null\n ? (value as Record<string, unknown>)\n : {};\n}\n\n/**\n * Typed query, infinite query and mutation options over a client (§6.4).\n *\n * ```ts\n * import { QueryClient } from \"@tanstack/query-core\";\n * import { queries, observe } from \"@kingsleyweb/bun-client/query\";\n *\n * const api = createClient<Routes>({ baseUrl: \"/api\", manifest });\n * const q = queries(api, { manifest });\n * const queryClient = new QueryClient();\n *\n * await queryClient.fetchQuery(q.query(\"/users/:id\", { params: { id: \"7\" } }));\n * const user = observe(queryClient, q.query(\"/users/:id\", { params: { id: \"7\" } }));\n * await q.invalidateTags(queryClient, [\"user:7\"]);\n * ```\n *\n * @param api A client from `createClient`. Its configuration applies to\n * every call (base URL, headers, auth, retries, validation).\n * @param options The manifest, for the declared tags.\n */\nexport function queries<R extends RouteMap<R>, F extends ClientFlags>(\n api: Client<R, F>,\n options: QueriesOptions<R> = {},\n): Queries<R> {\n const client = api as unknown as RuntimeClient;\n const manifest = (options.manifest ?? {}) as Readonly<\n Record<\n string,\n | {\n cache?: {\n tags?: readonly string[];\n invalidates?: readonly string[];\n };\n }\n | undefined\n >\n >;\n\n const keyOf = (call: RuntimeCall): KeyParts => ({\n params: keyParams(call.params),\n query: { ...call.query },\n });\n\n /**\n * Runs one call: `throwOnError` on, so it resolves the success body and\n * rejects with the client's error; an innermost middleware sends\n * `If-None-Match` when asked and keeps the response for its headers.\n */\n const send = async (\n routeKey: string,\n call: RuntimeCall,\n signal: AbortSignal,\n ifNoneMatch: string | undefined,\n ): Promise<{ data?: unknown; error?: unknown; response?: Response }> => {\n let response: Response | undefined;\n const capture: ClientMiddleware = async (ctx, next) => {\n if (ifNoneMatch !== undefined)\n ctx.request.headers.set(\"if-none-match\", ifNoneMatch);\n response = await next();\n return response;\n };\n try {\n const data = await client.request(routeKey, {\n ...call,\n signal,\n throwOnError: true,\n middleware: [...(call.middleware ?? []), capture],\n });\n return { data, response };\n } catch (error) {\n return { error, response };\n }\n };\n\n const query = (path: string, given?: RuntimeCall) => {\n const routeKey = `GET ${path}`;\n const call = given ?? {};\n return {\n queryKey: [routeKey, keyOf(call)] as const,\n queryFn: async (context: QueryFunctionContext): Promise<unknown> => {\n const store = storeFor(context.client);\n const cached = queryAt(context.client, context.queryKey);\n const hash = cached?.queryHash;\n const previous = cached?.state.data;\n const etag =\n hash !== undefined && previous !== undefined\n ? store.etags.get(hash)\n : undefined;\n const outcome = await send(routeKey, call, context.signal, etag);\n const { response } = outcome;\n const notModified = etag !== undefined && response?.status === 304;\n if (outcome.error !== undefined && !notModified)\n throw outcome.error as Error;\n if (notModified && outcome.error !== undefined) {\n // The client read a 304 as an error (undeclared, or not 2xx):\n // it is the server confirming the data we hold.\n await response?.body?.cancel().catch(() => undefined);\n }\n if (hash !== undefined) {\n const tags = response && headerTagsOf(response);\n if (tags !== undefined) store.headerTags.set(hash, tags);\n else if (!notModified) store.headerTags.delete(hash);\n store.pending.set(\n hash,\n response === undefined || noStore(response)\n ? null\n : (response.headers.get(\"etag\") ?? (notModified ? etag : null)),\n );\n }\n return notModified ? previous : outcome.data;\n },\n meta: { tags: fillTags(manifest[routeKey]?.cache?.tags, call.params) },\n };\n };\n\n const infinite = (\n path: string,\n given: RuntimeCall,\n page: {\n pageParam: string;\n initialPageParam?: unknown;\n next: PageFunction<unknown, unknown>;\n previous?: PageFunction<unknown, unknown>;\n },\n ) => {\n const routeKey = `GET ${path}`;\n const { [page.pageParam]: initial, ...rest } = given.query ?? {};\n const call: RuntimeCall = { ...given, query: rest };\n return {\n queryKey: [routeKey, keyOf(call), \"infinite\"] as const,\n queryFn: async (\n context: QueryFunctionContext<QueryKey, unknown>,\n ): Promise<unknown> => {\n const query =\n context.pageParam === undefined || context.pageParam === null\n ? rest\n : { ...rest, [page.pageParam]: context.pageParam };\n const outcome = await send(\n routeKey,\n { ...call, query },\n context.signal,\n undefined,\n );\n const tags = outcome.response && headerTagsOf(outcome.response);\n if (tags !== undefined) {\n // An infinite query carries the tags of every page it holds.\n const hash = queryAt(context.client, context.queryKey)?.queryHash;\n if (hash !== undefined) {\n const store = storeFor(context.client);\n const known = store.headerTags.get(hash) ?? [];\n store.headerTags.set(hash, [...new Set([...known, ...tags])]);\n }\n }\n if (outcome.error !== undefined) throw outcome.error as Error;\n return outcome.data;\n },\n initialPageParam:\n \"initialPageParam\" in page ? page.initialPageParam : initial,\n getNextPageParam: page.next,\n ...(page.previous === undefined\n ? {}\n : { getPreviousPageParam: page.previous }),\n meta: { tags: fillTags(manifest[routeKey]?.cache?.tags, call.params) },\n };\n };\n\n const mutation = (\n routeKey: string,\n config: {\n optimistic?: Readonly<\n Record<\n string,\n ((old: unknown, variables: unknown) => unknown) | undefined\n >\n >;\n validate?: unknown;\n } = {},\n ) => {\n const invalidates = manifest[routeKey]?.cache?.invalidates ?? [];\n const writers = Object.entries(config.optimistic ?? {}).filter(\n (\n entry,\n ): entry is [string, (old: unknown, variables: unknown) => unknown] =>\n typeof entry[1] === \"function\",\n );\n\n /** The cached, non-infinite queries of `target` whose params agree with the variables'. */\n const targets = (\n queryClient: QueryClient,\n target: string,\n params: Readonly<Record<string, string>>,\n ): Query[] =>\n queryClient\n .getQueryCache()\n .findAll({ queryKey: [target] })\n .filter((cached) => {\n const key = cached.queryKey;\n if (key.length !== 2) return false;\n const own = asRecord(asRecord(key[1]).params);\n return Object.entries(own).every(\n ([name, value]) => !(name in params) || params[name] === value,\n );\n });\n\n return {\n mutationKey: [routeKey] as const,\n mutationFn: (variables: unknown) =>\n client.request(routeKey, {\n ...(config.validate === undefined\n ? {}\n : { validate: config.validate }),\n ...asRecord(variables),\n throwOnError: true,\n }),\n onMutate: async (\n variables: unknown,\n context: MutationFunctionContext,\n ): Promise<OptimisticSnapshot> => {\n const written: OptimisticSnapshot[\"written\"][number][] = [];\n const store = storeFor(context.client);\n if (writers.length === 0) return { written };\n const params = keyParams(\n asRecord(asRecord(variables).params) as Record<string, unknown>,\n );\n for (const [target] of writers)\n await context.client.cancelQueries({ queryKey: [target] });\n for (const [target, write] of writers) {\n for (const cached of targets(context.client, target, params)) {\n const old = cached.state.data;\n if (old === undefined) continue;\n const next = write(old, variables);\n if (next === undefined) continue;\n written.push({\n queryKey: cached.queryKey,\n data: old,\n dataUpdatedAt: cached.state.dataUpdatedAt,\n etag: store.etags.get(cached.queryHash),\n });\n context.client.setQueryData(cached.queryKey, next);\n }\n }\n return { written };\n },\n onError: (\n _error: unknown,\n _variables: unknown,\n snapshot: OptimisticSnapshot | undefined,\n context: MutationFunctionContext,\n ): void => {\n // Put back in reverse, so a query written twice ends as it began:\n // the state itself (not `setQueryData`, whose structural sharing\n // would hand back a copy), and the ETag of that data.\n const store = storeFor(context.client);\n for (const { queryKey, data, dataUpdatedAt, etag } of [\n ...(snapshot?.written ?? []),\n ].reverse()) {\n const cached = queryAt(context.client, queryKey);\n if (cached === undefined) continue;\n cached.setState({ data, dataUpdatedAt });\n if (etag !== undefined) store.etags.set(cached.queryHash, etag);\n }\n },\n onSuccess: async (\n _data: unknown,\n variables: unknown,\n _snapshot: OptimisticSnapshot | undefined,\n context: MutationFunctionContext,\n ): Promise<void> => {\n await invalidateTags(\n context.client,\n fillTags(\n invalidates,\n asRecord(asRecord(variables).params) as Record<string, unknown>,\n ),\n );\n },\n onSettled: async (\n _data: unknown,\n _error: unknown,\n _variables: unknown,\n snapshot: OptimisticSnapshot | undefined,\n context: MutationFunctionContext,\n ): Promise<void> => {\n await Promise.all(\n (snapshot?.written ?? []).map(({ queryKey }) =>\n context.client.invalidateQueries({ queryKey, exact: true }),\n ),\n );\n },\n meta: { invalidates: [...invalidates] },\n };\n };\n\n const graphql = (\n gh: object,\n document: unknown,\n variables?: unknown,\n given: { tags?: readonly string[] } & RuntimeCall = {},\n ) => {\n const internals = (gh as Record<symbol, unknown>)[GRAPHQL] as\n | {\n url: string;\n describe: (document: unknown) => { source: string; name?: string };\n }\n | undefined;\n if (internals === undefined)\n throw new TypeError(\n \"q.graphql() takes a client from createGraphQLClient (./graphql)\",\n );\n const operation = internals.describe(document);\n const { tags, ...call } = given;\n return {\n queryKey: [\n internals.url,\n operation.name ?? operation.source,\n variables ?? {},\n ] as const,\n queryFn: async (context: QueryFunctionContext): Promise<unknown> => {\n let response: Response | undefined;\n const capture: ClientMiddleware = async (_ctx, next) =>\n (response = await next());\n try {\n const result = await (\n gh as {\n query: (\n document: unknown,\n variables: unknown,\n options: object,\n ) => Promise<{ data?: unknown }>;\n }\n ).query(document, variables, {\n ...call,\n signal: context.signal,\n throwOnError: true,\n throwOnGraphQLErrors: true,\n middleware: [...(call.middleware ?? []), capture],\n });\n return result.data;\n } finally {\n // The tags of its responses' headers, as a route query keeps them.\n const hash = queryAt(context.client, context.queryKey)?.queryHash;\n const found = response && headerTagsOf(response);\n if (hash !== undefined) {\n const store = storeFor(context.client);\n if (found !== undefined) store.headerTags.set(hash, found);\n else if (response !== undefined) store.headerTags.delete(hash);\n }\n }\n },\n meta: { tags: [...(tags ?? [])] },\n };\n };\n\n const factories = {\n key: (routeKey: string, parts?: RuntimeCall): QueryKey =>\n parts === undefined ? [routeKey] : [routeKey, keyOf(parts)],\n query,\n infinite,\n mutation,\n graphql,\n invalidateTags,\n // `./react`'s `useLive`: `live()` over this layer's client, so the\n // React entry starts it without importing this module.\n [LIVE]: (queryClient: QueryClient, liveOptions?: LiveOptions) =>\n live(\n client as unknown as Parameters<typeof live>[0],\n queryClient,\n liveOptions,\n ),\n };\n return factories as unknown as Queries<R>;\n}\n\n/* ------------------------------------------------------------------ */\n/* observe() */\n/* ------------------------------------------------------------------ */\n\n/** What {@link observe} reports of a query (§6.3). */\nexport interface QuerySnapshot<TData, TError> {\n /** `\"pending\"` (no data yet), `\"success\"` or `\"error\"`. */\n readonly status: \"pending\" | \"success\" | \"error\";\n /** The data; `undefined` until the first success. */\n readonly data: TData | undefined;\n /** The last error, or `null`. */\n readonly error: TError | null;\n /** Whether a fetch is running (the first one or a background one). */\n readonly isFetching: boolean;\n /** Whether the data is stale (by `staleTime`) or invalidated. */\n readonly isStale: boolean;\n /** When the data last arrived (or a `304` confirmed it), ms since the epoch; `0` before. */\n readonly dataUpdatedAt: number;\n}\n\n/** What {@link observe} reports of an infinite query. */\nexport interface InfiniteQuerySnapshot<TData, TError> extends QuerySnapshot<\n TData,\n TError\n> {\n /** Whether `next` gave a next page. */\n readonly hasNextPage: boolean;\n /** Whether `previous` gave a previous page. */\n readonly hasPreviousPage: boolean;\n /** Whether the next page is being fetched. */\n readonly isFetchingNextPage: boolean;\n /** Whether the previous page is being fetched. */\n readonly isFetchingPreviousPage: boolean;\n}\n\n/**\n * A query as an external store (§6.3): what a binding subscribes to\n * (`useSyncExternalStore(o.subscribe, o.getSnapshot)`) and what a vanilla\n * app uses directly.\n */\nexport interface ObservedQuery<\n TData,\n TError,\n TSnapshot = QuerySnapshot<TData, TError>,\n> {\n /**\n * Calls `listener` after each change of the snapshot; returns the\n * unsubscribe. The first subscriber starts the observer (and its fetch,\n * if the data is missing or stale); the last one to leave stops it, so the\n * query goes inactive and query-core's gc may collect it.\n */\n subscribe: (listener: () => void) => () => void;\n /** The current snapshot: the same object until something in it changes. */\n getSnapshot: () => TSnapshot;\n /** Fetches again, whether or not the data is stale; resolves the snapshot after. */\n refetch: () => Promise<TSnapshot>;\n /** Replaces the observed options (another key: another query). */\n setOptions: (options: object) => void;\n}\n\n/** {@link ObservedQuery} for an infinite query, with its paging. */\nexport interface ObservedInfiniteQuery<TData, TError> extends ObservedQuery<\n TData,\n TError,\n InfiniteQuerySnapshot<TData, TError>\n> {\n /** Fetches the next page; resolves the snapshot after. */\n fetchNextPage: () => Promise<InfiniteQuerySnapshot<TData, TError>>;\n /** Fetches the previous page; resolves the snapshot after. */\n fetchPreviousPage: () => Promise<InfiniteQuerySnapshot<TData, TError>>;\n}\n\n/** Infinite query options: what tells `observe()` to use an `InfiniteQueryObserver`. */\ntype AnyInfiniteOptions<TData, TError, TPage, TKey extends QueryKey> = {\n /** query-core's next-page function, present in every infinite query's options. */\n getNextPageParam: unknown;\n} & InfiniteQueryObserverOptions<\n TData,\n TError,\n InfiniteData<TData, TPage>,\n TKey,\n TPage\n>;\n\n/** The snapshot of an observer's result, by the fields §6.3 names. */\nfunction snapshotOf(\n result: QueryObserverResult<unknown, unknown>,\n infinite: boolean,\n): Record<string, unknown> {\n const base: Record<string, unknown> = {\n status: result.status,\n data: result.data,\n error: result.error,\n isFetching: result.isFetching,\n isStale: result.isStale,\n dataUpdatedAt: result.dataUpdatedAt,\n };\n if (!infinite) return base;\n const paged = result as InfiniteQueryObserverResult<unknown, unknown>;\n base.hasNextPage = paged.hasNextPage;\n base.hasPreviousPage = paged.hasPreviousPage;\n base.isFetchingNextPage = paged.isFetchingNextPage;\n base.isFetchingPreviousPage = paged.isFetchingPreviousPage;\n return base;\n}\n\n/** Whether two snapshots hold the same values, field by field. */\nfunction sameSnapshot(\n a: Readonly<Record<string, unknown>>,\n b: Readonly<Record<string, unknown>>,\n): boolean {\n for (const name of Object.keys(a)) {\n if (!Object.is(a[name], b[name])) return false;\n }\n return true;\n}\n\n/**\n * Observes a query without a framework (§6.3): a `subscribe`/`getSnapshot`\n * store over query-core's `QueryObserver`, or its `InfiniteQueryObserver`\n * for infinite options (`q.infinite()`'s, or any with `getNextPageParam`).\n *\n * ```ts\n * const user = observe(queryClient, q.query(\"/users/:id\", { params: { id: \"7\" } }));\n * const stop = user.subscribe(() => render(user.getSnapshot()));\n * ```\n *\n * @param client The `QueryClient`.\n * @param options Query options: `q.query()`'s or `q.infinite()`'s, with\n * anything of query-core's spread over them (`staleTime`, `enabled`, …).\n */\nexport function observe<TData, TError, TPage, K extends string>(\n client: QueryClient,\n options: ApiInfiniteOptions<TData, TError, TPage, K> &\n Partial<\n InfiniteQueryObserverOptions<\n TData,\n TError,\n InfiniteData<TData, TPage | undefined>,\n ApiInfiniteKey<K>,\n TPage | undefined\n >\n >,\n): ObservedInfiniteQuery<InfiniteData<TData, TPage | undefined>, TError>;\nexport function observe<TData, TError, K extends string>(\n client: QueryClient,\n options: ApiQueryOptions<TData, TError, K> &\n Partial<QueryObserverOptions<TData, TError, TData, TData, ApiQueryKey<K>>>,\n): ObservedQuery<TData, TError>;\nexport function observe<\n TData,\n TError = DefaultError,\n TPage = unknown,\n TKey extends QueryKey = QueryKey,\n>(\n client: QueryClient,\n options: AnyInfiniteOptions<TData, TError, TPage, TKey>,\n): ObservedInfiniteQuery<InfiniteData<TData, TPage>, TError>;\nexport function observe<\n TData,\n TError = DefaultError,\n TKey extends QueryKey = QueryKey,\n>(\n client: QueryClient,\n options: QueryObserverOptions<TData, TError, TData, TData, TKey>,\n): ObservedQuery<TData, TError>;\nexport function observe(\n client: QueryClient,\n options: object,\n): ObservedInfiniteQuery<unknown, unknown> {\n const infinite =\n typeof (options as { getNextPageParam?: unknown }).getNextPageParam ===\n \"function\";\n const observer: QueryObserver = infinite\n ? (new InfiniteQueryObserver(\n client,\n options as InfiniteQueryObserverOptions,\n ) as unknown as QueryObserver)\n : new QueryObserver(client, options as QueryObserverOptions);\n const listeners = new Set<() => void>();\n let snapshot = snapshotOf(observer.getCurrentResult(), infinite);\n let detach: (() => void) | undefined;\n\n /** Takes the observer's result; a new snapshot only when a field changed. */\n const take = (result: QueryObserverResult<unknown, unknown>): boolean => {\n const next = snapshotOf(result, infinite);\n if (sameSnapshot(snapshot, next)) return false;\n snapshot = next;\n return true;\n };\n\n const store = {\n subscribe: (listener: () => void): (() => void) => {\n const own = () => listener();\n listeners.add(own);\n if (detach === undefined) {\n detach = observer.subscribe((result) => {\n if (!take(result)) return;\n for (const notify of [...listeners]) notify();\n });\n }\n return () => {\n if (!listeners.delete(own)) return;\n if (listeners.size === 0 && detach !== undefined) {\n detach();\n detach = undefined;\n }\n };\n },\n getSnapshot: () => snapshot,\n refetch: async () => {\n take(await observer.refetch());\n return snapshot;\n },\n setOptions: (next: object) => {\n observer.setOptions(next as QueryObserverOptions);\n take(observer.getCurrentResult());\n },\n fetchNextPage: async () => {\n take(\n await (observer as unknown as InfiniteQueryObserver).fetchNextPage(),\n );\n return snapshot;\n },\n fetchPreviousPage: async () => {\n take(\n await (\n observer as unknown as InfiniteQueryObserver\n ).fetchPreviousPage(),\n );\n return snapshot;\n },\n };\n if (!infinite) {\n delete (store as Partial<typeof store>).fetchNextPage;\n delete (store as Partial<typeof store>).fetchPreviousPage;\n }\n return store as unknown as ObservedInfiniteQuery<unknown, unknown>;\n}\n",
11
+ "/**\n * Generated by `bun-client generate` (@kingsleyweb/bun-client) from an\n * OpenAPI document: the route map `createClient<Routes>()` reads and the\n * `manifest` it takes. Do not edit; regenerate it, and run the same command\n * with `--check` in CI.\n *\n * typesHash: 572b0657fd84256a\n */\nimport type { RouteManifest } from \"@kingsleyweb/bun-client\";\n\n/**\n * The documents' hash, as the header records it: the `buster` of a\n * persisted query cache (`@kingsleyweb/bun-client/persist`).\n */\nexport const typesHash = \"572b0657fd84256a\";\n\n/** One job of a flow, with the jobs it waits on. A flow holds at most 100 jobs and nests at most 10 levels (the top job is level 1); more is 400 VALIDATION at the first job past the bound. */\nexport interface AddFlowNode {\n /** The job name; must be addable (`MetaDto.addableNames`), or 403 NAME_NOT_ADDABLE with this path in `context.path`. */\n name: string;\n /** The payload. JSON; `null` is allowed. */\n data: unknown;\n /** The options POST /queues/{queue}/jobs accepts, plus `ignoreFailure`. Repeat, debounce, throttle, dead-letter and retention options are not accepted over HTTP. */\n opts?: {\n /** A new job's id, at most 191 characters. bun-jobs may still refuse it (400 INVALID_ARGUMENT): control characters, a leading \".\", a lone surrogate, or more than 191 UTF-16 units. */\n jobId?: string;\n priority?: number;\n delay?: number;\n runAt?: number | string;\n attempts?: number;\n backoff?: number;\n timeout?: number;\n /** On a child: its parent carries on without it if it fails. `true` on the top job is 400 VALIDATION. */\n ignoreFailure?: boolean;\n };\n /** The queue this job goes in, in the same namespace: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Defaults to its parent's; on the top job, omit it or give the path's queue. */\n queue?: string;\n /** The jobs this one waits on, added before it, in this order. */\n children?: AddFlowNode[];\n}\n\nexport interface AddFlowResult {\n /** `false` when `jobId` matched an existing job, which is returned; nothing is then added below it. */\n added: boolean;\n job: Job;\n /** Its children's results, in the order the body gave them; `[]` when `added` is `false`. */\n children: AddFlowResult[];\n}\n\n/** Of the jobs **added** (by `createdAt`) during the range, how many are in each state **now**. Only jobs still stored are counted: one removed since, by retention or a remove, clean or drain, is not, so `total` can be less than what was added. Not the analytics series: that counts completions and failed attempts by **finish** time over every job; `failed` here is the state (failed, a retry pending) and `dead` the jobs that gave up. */\nexport interface AddedByState {\n /** Start of the range read, **inclusive**, epoch ms. */\n from: number;\n /** End of the range read, **exclusive**, epoch ms. */\n to: number;\n /** When the counts were read, epoch ms: the instant every state is as of. */\n at: number;\n counts: JobCounts;\n /** The sum of `counts`: the jobs added in the range that are still stored. */\n total: number;\n /** Queues summed: on `GET /overview/added` every queue the caller may see; `1` on the per-queue route. */\n queues: number;\n}\n\n/** What one series covers. `from` is the first bucket's start, `to` the **last** bucket's start and `end` the exclusive end; one resolution per series. */\nexport interface AnalyticsRange {\n resolution: 1 | 60;\n /** The served width in ms. */\n interval: number;\n /** Start of the **first** bucket, epoch ms. */\n from: number;\n /** Start of the **last** bucket, epoch ms, inclusive — not the request's exclusive `to`. */\n to: number;\n /** `to + interval`: the exclusive end of the covered time. An axis runs `from … end`. */\n end: number;\n /** What the request asked for, before any clamping. */\n requested: {\n /** `from` as asked, or the default, epoch ms, inclusive. */\n from: number;\n /** `to` as asked, or the default (now), epoch ms, **exclusive**. */\n to: number;\n resolution?: 1 | 60;\n };\n /** Whether the served range or resolution differs from what was asked. */\n clamped: boolean;\n /** Why, when `clamped`: `retention` (older than kept at the finer width), `maxBuckets` (too many buckets at it), `resolution` (the kind cannot be observed that finely), `driver` (the backend does not record it). */\n reason?: \"retention\" | \"maxBuckets\" | \"resolution\" | \"driver\";\n}\n\n/** `rewritten`, `unchanged`, `skippedExplicit`, `skippedUnmarked` and `moved` add up to `examined`. */\nexport interface ApplyJobDefaultsResult {\n seq: number;\n keys: (\n | \"attempts\"\n | \"backoff\"\n | \"timeout\"\n | \"priority\"\n | \"removeOnComplete\"\n | \"removeOnFail\"\n | \"keepLogs\"\n | \"keepStacktraces\"\n )[];\n dryRun: boolean;\n examined: number;\n rewritten: number;\n unchanged: number;\n skippedExplicit: number;\n skippedUnmarked: number;\n /** Jobs that left the walked states between this call's read and its write, untouched. A lower bound: Redis, SQL and memory lock or run a batch atomically and report 0. */\n moved: number;\n /** Rewritten jobs whose `attemptsMade` already reaches the new `attempts`: each runs once more and dies if that attempt fails. Counted within `rewritten`. */\n exhausted: number;\n next: string | null;\n /** `next === null`. */\n done: boolean;\n}\n\n/** Asks `authorize` about `events.subscribe` on the channel exactly as a `subscribe` frame would, after the same parsing and availability checks. It does not check `events.connect`: that is in `actions`. */\nexport interface ChannelPermission {\n /** The channel as asked. */\n channel: string;\n /** The canonical channel name (the job id re-encoded), whenever the name parsed — refused afterwards or not. Absent only for INVALID_CHANNEL. */\n key?: string;\n /** Whether a `subscribe` to it would be accepted. */\n allowed: boolean;\n /** The code a `subscribe` ack would reject it with: INVALID_CHANNEL, CHANNEL_NOT_AVAILABLE, QUEUE_NOT_FOUND, RUNNER_NOT_FOUND, UNAUTHORIZED or FORBIDDEN. */\n code?: string;\n /** The HTTP-equivalent status of the refusal. */\n status?: number;\n /** A safe, human reason. */\n detail?: string;\n}\n\nexport interface Error {\n name: string;\n message: string;\n code?: string | number;\n /** The stack trace: present only when the API was created with `serialize.exposeStacks` (off by default). */\n stack?: string;\n data?: Record<string, unknown>;\n /** The cause, shaped as an Error. */\n cause?: unknown;\n}\n\nexport interface Job {\n queue: string;\n id: string;\n name: string;\n state: JobState;\n priority: number;\n runAt: number;\n createdAt: number;\n processedOn: number | null;\n finishedOn: number | null;\n expiresAt: number | null;\n attemptsMade: number;\n maxAttempts: number;\n stalledCount: number;\n progress: number | Record<string, unknown> | null;\n failedReason: Error | null;\n lockExpiresAt: number | null;\n workerId: string | null;\n processedBy: JobWorker | null;\n repeatKey: string | null;\n flow: JobFlow | null;\n /** With `include=data`. */\n data?: unknown;\n /** With `include=returnValue`. */\n returnValue?: unknown;\n /** With `include=stacktrace`: recent failures, newest first. An entry carries `stack` only when the API was created with `serialize.exposeStacks` (off by default); otherwise it is the error's `name` and `message`, plus `code`, `data` and `cause` when it had them. */\n stacktrace?: Error[];\n opts?: JobOptions;\n}\n\nexport interface JobCounts {\n waiting: number;\n delayed: number;\n active: number;\n completed: number;\n failed: number;\n dead: number;\n \"waiting-children\": number;\n}\n\n/** A queue's job defaults. Precedence, highest first: an option passed on the job's own `add()`; the stored override; the code's defaults (a `define()` definition's, then the queue's `defaultJobOptions`); the built-ins. */\nexport interface JobDefaults {\n queue: string;\n effective: JobDefaultsValues;\n code: JobDefaultsValues;\n /** `code` is this API's own queue instance's `defaultJobOptions` over the built-ins; another producer may be configured otherwise. */\n codeSource: \"api\";\n /** The keys the stored override replaces, in `JOB_DEFAULT_KEYS` order. */\n overridden: (\n | \"attempts\"\n | \"backoff\"\n | \"timeout\"\n | \"priority\"\n | \"removeOnComplete\"\n | \"removeOnFail\"\n | \"keepLogs\"\n | \"keepStacktraces\"\n )[];\n /** The stored override itself; `{}` when there is none. */\n override: {\n attempts?: number;\n backoff?:\n | number\n | {\n type?: string;\n delay?: number;\n factor?: number;\n max?: number;\n jitter?: number | boolean;\n [key: string]: unknown;\n };\n timeout?: number;\n priority?: number;\n removeOnComplete?:\n | boolean\n | number\n | {\n count?: number;\n ttl?: number;\n };\n removeOnFail?:\n | boolean\n | number\n | {\n count?: number;\n ttl?: number;\n };\n keepLogs?: number;\n keepStacktraces?: number;\n };\n /** The override's version: send it as `expectedSeq`, and as `seq` to apply it. `0` when nothing was ever stored. */\n seq: number;\n /** When the override was last written, epoch ms; absent when it never was. */\n updatedAt?: number;\n /** How long a producer may keep adding jobs with the previous defaults after a change: this API's queue's `jobDefaultsRefreshInterval`. */\n propagationMs: number;\n pending: JobDefaultsPending;\n}\n\n/** A merge patch: a key left out is untouched, `null` clears it so the code's value applies again. A retention object needs `count`, `ttl` or both, and a backoff's `max` is at least its `delay` (400 VALIDATION otherwise). */\nexport interface JobDefaultsBody {\n attempts?: number | null;\n backoff?:\n | number\n | {\n type: \"fixed\" | \"exponential\";\n /** Base delay, ms: 0 … 86400000. */\n delay: number;\n /** Longest delay before jitter, ms, and at least `delay`: 0 … 86400000. */\n max?: number;\n /** Fraction of each delay randomised. */\n jitter?: number;\n }\n | null;\n timeout?: number | null;\n priority?: number | null;\n removeOnComplete?:\n | boolean\n | number\n | {\n /** Most finished jobs kept: 0 … 1000000. */\n count?: number;\n /** Oldest finished job kept, ms: 0 … 31536000000. */\n ttl?: number;\n }\n | null;\n removeOnFail?:\n | boolean\n | number\n | {\n /** Most finished jobs kept: 0 … 1000000. */\n count?: number;\n /** Oldest finished job kept, ms: 0 … 31536000000. */\n ttl?: number;\n }\n | null;\n keepLogs?: number | null;\n keepStacktraces?: number | null;\n /** The `seq` last read. Answered 409 CONTROL_CONTENDED when it no longer matches. Omit it for a last-writer-wins write. */\n expectedSeq?: number;\n}\n\n/** Jobs pending in each state the apply action walks, from the queue's counts: an upper bound on what it would change. Apply with `dryRun` for the exact figure. */\nexport interface JobDefaultsPending {\n waiting: number;\n delayed: number;\n failed: number;\n \"waiting-children\": number;\n total: number;\n}\n\nexport interface JobDefaultsValues {\n attempts: number;\n backoff:\n | number\n | {\n type?: string;\n delay?: number;\n factor?: number;\n max?: number;\n jitter?: number | boolean;\n [key: string]: unknown;\n };\n timeout: number;\n priority: number;\n removeOnComplete:\n | boolean\n | number\n | {\n count?: number;\n ttl?: number;\n };\n removeOnFail:\n | boolean\n | number\n | {\n count?: number;\n ttl?: number;\n };\n /** Log lines a job keeps; `0` (a code value only) keeps every line. */\n keepLogs: number;\n keepStacktraces: number;\n}\n\nexport interface JobFlow {\n parent: JobRef | null;\n children: JobRef[];\n pending: number;\n values: Record<string, unknown>;\n failures: Record<string, Error>;\n recorded: boolean;\n}\n\nexport interface JobOptions {\n priority: number;\n attempts: number;\n backoff:\n | number\n | {\n type?: string;\n delay?: number;\n factor?: number;\n max?: number;\n jitter?: number | boolean;\n [key: string]: unknown;\n };\n timeout: number;\n removeOnComplete:\n | boolean\n | number\n | {\n count?: number;\n ttl?: number;\n };\n removeOnFail:\n | boolean\n | number\n | {\n count?: number;\n ttl?: number;\n };\n keepStacktraces: number;\n deadLetter?: string;\n keepLogs?: number;\n ignoreFailure?: boolean;\n /** The options this job's own `add()` passed explicitly, which stored queue defaults never replace, in `JOB_DEFAULT_KEYS` order. Absent on a job added before bun-jobs recorded it; the apply action skips such a job unless `includeUnmarked`. */\n explicit?: (\n | \"attempts\"\n | \"backoff\"\n | \"timeout\"\n | \"priority\"\n | \"removeOnComplete\"\n | \"removeOnFail\"\n | \"keepLogs\"\n | \"keepStacktraces\"\n )[];\n [key: string]: unknown;\n}\n\nexport interface JobPage {\n items: Job[];\n page: PageInfo;\n}\n\nexport interface JobRef {\n queue: string;\n id: string;\n}\n\n/** Where a job is in its lifecycle. */\nexport type JobState =\n | \"waiting\"\n | \"delayed\"\n | \"active\"\n | \"completed\"\n | \"failed\"\n | \"dead\"\n | \"waiting-children\";\n\n/** The worker that ran the job's **last** attempt, recorded at its claim and kept after the job settles. Earlier attempts are not recorded. */\nexport interface JobWorker {\n /** The claiming incarnation's id (`Worker.id`). Changes when its process restarts, so on a finished job it usually names a worker that is gone. */\n id: string;\n /** Its stable key (`Worker.key`), unique within the job's queue. Absent when the claimer recorded only the id. */\n key?: string;\n /** Omitted with `serialize.exposeHosts: false`, and when not recorded. */\n host?: string;\n /** Omitted with `serialize.exposeHosts: false`, and when not recorded. */\n pid?: number;\n}\n\nexport interface JobsBucket {\n at: number;\n completed: number;\n failed: number;\n}\n\n/** One series: what it covers, its contiguous buckets, and their sums. */\nexport interface JobsSeries {\n range: AnalyticsRange;\n /** One bucket per interval, oldest first, contiguous. */\n buckets: JobsBucket[];\n totals: JobsTotals;\n}\n\nexport interface JobsTotals {\n completed: number;\n failed: number;\n}\n\n/** What this API exposes and what its backend supports, so a client can explain an absent feature. */\nexport interface Meta {\n namespace: string;\n mode: \"jobs\" | \"runner\" | \"both\";\n readOnly: boolean;\n protocol: 1;\n driver: {\n name: string;\n capabilities: {\n blockingWait: boolean;\n events: \"push\" | \"poll\" | \"local\";\n multiProcess: boolean;\n multiHost: boolean;\n /** Whether the backend records the worker that ran each job's last attempt and filters on it. `false` when the driver does not declare it. */\n jobAttribution: boolean;\n };\n };\n features: {\n logs: boolean;\n update: boolean;\n limits: boolean;\n flows: boolean;\n /** Whether the backend can add flows, so POST /queues/{queue}/flows exists wherever `jobs.add` is enabled. Like every flag it follows the mode, not `actions` or `readOnly`. */\n addFlow: boolean;\n search: boolean;\n workers: boolean;\n workerControl: boolean;\n throughput: boolean;\n runnerLogs: boolean;\n runnerMetrics: boolean;\n workerMetrics: boolean;\n /** The backend records the worker that ran each job's last attempt (`processedBy`), and the job list serves `workerKey`, `workerId`, `finishedFrom` and `finishedTo`. `false` in `runner` mode, and wherever `processedBy` is always `null`. */\n jobAttribution: boolean;\n /** The backend serves reads by creation time from an index or memory: `GET /overview/added` and `GET /queues/{queue}/counts/added` exist, and the job list accepts `sort=createdAt` (400 `INVALID_ARGUMENT`, with a detail, where this is `false`). `false` on the Redis and file drivers, and in `runner` mode. */\n addedByState: boolean;\n /** The backend can store a queue's job defaults (it has queue state), so `GET`/`PUT`/`DELETE /queues/{queue}/job-defaults` exist and producers on this version add under them. `true` on every built-in driver; `false` in `runner` mode. */\n jobDefaults: boolean;\n /** The backend can rewrite pending jobs with them, so `POST /queues/{queue}/job-defaults/apply` exists. `true` on every built-in driver; `false` in `runner` mode and on a custom driver without `rewritePendingOptions`. */\n jobDefaultsApply: boolean;\n /** `GET /queues/{queue}/demand` and `GET /demand` are served. They need no driver method, so `true` on every backend and `false` only in `runner` mode. Whether an answer's figures are exact is its own `exact` (`false` on a custom driver without `countDemand`), not this flag. */\n demand: boolean;\n /** The compute provider routes, `GET /providers`, `POST /providers/{id}/validate` and `GET /providers/{id}/schema`, are served. They need no driver method, so `false` only in `runner` mode; like every flag it ignores permissions (`providers.read` and `providers.validate` are opt-in: see `/meta/permissions`). Whether any provider is configured is `GET /providers`' own answer, an empty list. */\n providers: boolean;\n /** Summon status may be read from storage: `GET /queues/{queue}/summon` answers `local: false` for a queue whose controller runs in another process (instead of 409), `GET /summon` lists such queues with `local: false` — a shared unit (`group.unit: \"shared\"`) in another process included, answered on any of its queues and listed once, read from its group's state — and the summon group routes (`GET /summon/groups`, `GET /summon/groups/{group}`) are served. Needs the driver's queue-state reads (`getQueueState`, `listQueueState`); `false` in `runner` mode. Like every flag it ignores permissions. */\n summonStoredStatus: boolean;\n /** `POST /queues/{queue}/summon/reset` is served and accepts `{ \"budget\": true }`, which also clears the queue's summon budget usage. `false` only in `runner` mode; like every flag it ignores permissions (`queues.summon` is opt-in: see `/meta/permissions`), and whether a queue has a summon controller is that route's own answer. */\n summonResetBudget: boolean;\n /** `GET /queues/{queue}/summon` (and the reset's answer) carries `policy` for a queue whose controller runs in the API's process: the policy it runs with, defaults filled in, with `explicit` naming the keys the policy set. It needs no driver method, so `false` only in `runner` mode; absent from an API older than the field. A status read from storage (`local: false`) has no `policy` either way: only the process running the controller knows it. Like every flag it ignores permissions. */\n summonPolicy: boolean;\n /** `GET /summon`, the list of the summon controllers in the API's process, is served. It needs no driver method, so `false` only in `runner` mode; absent from an API older than the route. Like every flag it ignores permissions (the route asks `queues.list`, then `queues.read` per controller), and whether any controller runs is the route's own answer, an empty list. */\n summonList: boolean;\n };\n events: \"push\" | \"poll\" | \"local\";\n publishing: boolean | null;\n websocket: {\n path: string;\n heartbeatMs: number;\n maxSubscriptions: number;\n /** The socket's dedicated port (the bound one, when configured as `0`). Absent when the socket shares the host's port. */\n port?: number;\n } | null;\n docs: {\n openapi: string;\n asyncapi?: string;\n ui?: string;\n asyncapiUi?: string;\n } | null;\n csrf: MetaCsrf;\n limits: MetaLimits;\n analytics: {\n /** Bucket widths this deployment can serve, in seconds, finest first. */\n resolutions: (1 | 60)[];\n /** How long each resolution is kept, in ms, keyed by the resolution in seconds. A resolution this deployment does not keep is absent. */\n retentionMs: {\n \"1\"?: number;\n \"60\"?: number;\n };\n /** Longest span one request may ask for, in ms. */\n maxSpanMs: number;\n /** Most buckets one series may hold; a longer span is served at a coarser resolution. */\n maxBuckets: number;\n /** Most series one batch read returns; an explicit over-ask is 400 BULK_LIMIT. */\n maxSeries: number;\n /** Which kinds are being recorded right now. */\n recording: {\n resolution: \"minute\" | \"second\";\n secondRetentionMs: number;\n workers: boolean;\n runners: boolean;\n durations: boolean;\n };\n /** The busyness sample interval, in ms — the workers' report interval, not a bucket width. */\n busynessIntervalMs: number;\n } | null;\n addableNames: string[] | null;\n /** Whether `POST /runners/{runner}/trigger` is registered and accepts `args`. */\n runnerTriggerArgs: boolean;\n}\n\n/** The CSRF rules. `{ header: null, requireJson: false }` when CSRF is off. */\nexport interface MetaCsrf {\n header: string | null;\n /** Whether every POST, and any mutation with a body, must be sent as `Content-Type: application/json` — a bodiless POST included (415 otherwise). */\n requireJson: boolean;\n}\n\n/** The caps the routes enforce, as configured: each is the value the route itself reads. */\nexport interface MetaLimits {\n /** `limit` of a job list when none is given. */\n defaultPageSize: number;\n /** Largest `limit` a job list accepts. */\n maxPageSize: number;\n /** Most ids in a bulk body; more is 400 BULK_LIMIT. Also the most children listed. */\n maxBulkIds: number;\n /** Largest `limit` of a retry-all. */\n maxRetryAll: number;\n /** Most ids a retry-all answers with; when it moved more, `ids` holds the first this many and `truncated` is `true`. */\n maxRetryAllIds: number;\n /** Largest `limit` of a clean. */\n maxClean: number;\n /** The `limit` a clean uses when none is given: `min(1000, maxClean)`. */\n defaultClean: number;\n /** Largest `limit` of a log page. */\n maxLogPage: number;\n /** Largest `limit` of a runner history page. */\n maxHistory: number;\n /** Largest request body a mutation accepts, in bytes; more is 413 PAYLOAD_TOO_LARGE. */\n maxJobDataBytes: number;\n /** Most queues /overview summarises, and the largest `limit` of GET /queues. */\n maxQueues: number;\n /** Most jobs one POST /queues/{queue}/job-defaults/apply call examines: its largest `limit`. */\n maxApplyDefaults: number;\n /** Most jobs one POST /queues/{queue}/flows body may hold, the top job included; more is 400 VALIDATION. */\n maxFlowNodes: number;\n /** Most levels one POST /queues/{queue}/flows body may nest, the top job being level 1; deeper is 400 VALIDATION. */\n maxFlowDepth: number;\n}\n\nexport interface Overview {\n queues: number;\n pausedQueues: number;\n counts: JobCounts;\n total: number;\n /** Whether more queues exist than `limits.maxQueues` summarised. */\n truncated: boolean;\n /** Live workers across every queue summarised. Absent when the backend keeps no worker records. */\n workers?: number;\n throughput?: {\n minutes: number;\n completed: number;\n failed: number;\n };\n throughputSeries?: OverviewThroughputSeries;\n analytics?: OverviewAnalytics;\n}\n\n/** The namespace's analytics over the requested range, from the roll-up buckets. `runners` and `workers` are the roll-ups `GET /analytics/runners` and `GET /analytics/workers` answer (without a batch), present only on a backend with the grouped reads, where each costs a fixed number of reads whatever the fleet (plus a lock read per runner row returned). Without them they are left out: each row would cost a read per runner and per worker key on every overview poll. */\nexport interface OverviewAnalytics {\n range: AnalyticsRange;\n jobs: JobsSeries;\n runners?: OverviewRunnersAnalytics;\n workers?: OverviewWorkersAnalytics;\n}\n\nexport interface OverviewRunnersAnalytics {\n series: RunnerRunsSeries;\n /** Runs in flight **right now**, from the locks: an instant, not a figure about the range. At least this many — a run in another process in `parallel` mode holds no single-run lock to see. */\n runningNow: number;\n /** A row per runner, at most 100, sorted by started runs descending then by id. */\n rows: RunnerAnalyticsRow[];\n /** Whether more rows matched than the 100 `rows` holds. */\n truncated: boolean;\n /** How many rows matched before the cap: the list the route already held, never a second read. */\n totalRows: number;\n}\n\n/** Namespace-wide throughput, one bucket per minute, in the shape of a queue's: each minute summed over the queues summarised. Present exactly when `throughput` is. */\nexport interface OverviewThroughputSeries {\n interval: number;\n from: number;\n to: number;\n buckets: ThroughputBucket[];\n completed: number;\n failed: number;\n}\n\nexport interface OverviewWorkersAnalytics {\n series: WorkerJobsSeries;\n /** A row per worker key, at most 100, sorted by `completed` descending then by key. */\n rows: WorkerAnalyticsRow[];\n /** Whether more rows matched than the 100 `rows` holds. */\n truncated: boolean;\n /** How many rows matched before the cap: the list the route already held, never a second read. */\n totalRows: number;\n}\n\nexport interface PageInfo {\n /** Items skipped before this page — and, on a page reached with a `cursor`, where the seek landed, so a walked page can still say where it sits. **Absent only on a cursor page whose backend did not count what precedes it**: `GET /queues/{queue}/jobs` on SQL or MongoDB, where counting the jobs before the key is an index range scan of exactly the size the `offset` would have walked, which would make the cursor page cost what the offset page cost. Every offset page carries it, and so does every page of the runner history. */\n offset?: number;\n limit: number;\n total?: number;\n hasMore: boolean;\n next?: string | null;\n}\n\n/** For every action the API routes (plus `events.connect` and `events.subscribe` when it has a socket), whether the caller may perform it; a pruned action is absent. `channel` is present when the query asked about one. */\nexport interface Permissions {\n /** Keyed by action. An action whose routes are pruned (by `mode`, `readOnly`, `actions` or the driver) is absent, not `false`. */\n actions: {\n \"meta.read\"?: boolean;\n \"docs.read\"?: boolean;\n \"queues.list\"?: boolean;\n \"queues.read\"?: boolean;\n \"queues.pause\"?: boolean;\n \"queues.resume\"?: boolean;\n \"queues.drain\"?: boolean;\n \"queues.clean\"?: boolean;\n \"queues.limits\"?: boolean;\n \"queues.defaults\"?: boolean;\n \"queues.applyDefaults\"?: boolean;\n \"queues.summon\"?: boolean;\n \"providers.read\"?: boolean;\n \"providers.validate\"?: boolean;\n \"metrics.read\"?: boolean;\n \"workers.list\"?: boolean;\n \"workers.read\"?: boolean;\n \"workers.pause\"?: boolean;\n \"workers.resume\"?: boolean;\n \"workers.stop\"?: boolean;\n \"workers.start\"?: boolean;\n \"workers.configure\"?: boolean;\n \"jobs.list\"?: boolean;\n \"jobs.read\"?: boolean;\n \"jobs.logs\"?: boolean;\n \"jobs.add\"?: boolean;\n \"jobs.update\"?: boolean;\n \"jobs.retry\"?: boolean;\n \"jobs.retryAll\"?: boolean;\n \"jobs.remove\"?: boolean;\n \"jobs.clearLogs\"?: boolean;\n \"jobs.promote\"?: boolean;\n \"jobs.fail\"?: boolean;\n \"repeatables.list\"?: boolean;\n \"repeatables.remove\"?: boolean;\n \"repeatables.disable\"?: boolean;\n \"repeatables.enable\"?: boolean;\n \"definitions.list\"?: boolean;\n \"runners.list\"?: boolean;\n \"runners.read\"?: boolean;\n \"runners.logs\"?: boolean;\n \"runners.trigger\"?: boolean;\n \"runners.pause\"?: boolean;\n \"runners.resume\"?: boolean;\n \"runners.kill\"?: boolean;\n \"runners.reschedule\"?: boolean;\n \"runners.resetStats\"?: boolean;\n \"runners.clearHistory\"?: boolean;\n \"runners.configure\"?: boolean;\n \"events.connect\"?: boolean;\n \"events.subscribe\"?: boolean;\n };\n channel?: ChannelPermission;\n}\n\n/** RFC 9457 problem details, served as application/problem+json. */\nexport interface Problem {\n /** urn:bun-jobs:error:<CODE> */\n type: string;\n title: string;\n status: number;\n code: string;\n detail?: string;\n instance?: string;\n issues?: {\n target:\n \"params\" | \"query\" | \"body\" | \"headers\" | \"cookies\" | \"signedCookies\";\n /** Dotted path within the target, or \"\" for the target itself. */\n path: string;\n message: string;\n }[];\n context?: Record<string, unknown>;\n}\n\n/** A provider's config as a JSON Schema, for a config form. Only for a config schema that implements Standard JSON Schema. */\nexport interface ProviderConfigSchema {\n /** The provider's id, as asked. */\n id: string;\n /** The JSON Schema dialect. */\n target: \"draft-2020-12\";\n /** The config's input JSON Schema, from `~standard.jsonSchema.input({ target })`, made secret-free. `default`, `example`, `examples`, `const` and every `x-*` key are removed everywhere (root, nested, `$defs`, combinators): a form built from it has no pre-filled values. `enum` is kept, except under a property that is a declared secret or has a credential's name, and in every definition such a property reaches through `$ref`, transitively (one reached from both a secret and a non-secret property counts as secret; a pointer into a definition counts as all of it, and one anywhere else in the document, `#` included, drops every enum). Enums with non-scalar values are dropped wherever they are. Every other string is redacted as a detail is; a string equal to a declared secret is replaced, a number equal to one dropped. */\n schema: Record<string, unknown>;\n}\n\n/** The compute providers configured in the API's process, and the plugin API versions it speaks. */\nexport interface ProviderList {\n api: {\n /** The core plugin API version, `major.minor`. */\n core: string;\n /** The summon facet version, `major.minor`. */\n summon: string;\n };\n /** The compute providers configured in the API's process, oldest first; empty when none is. */\n providers: {\n /** The instance's id, `name@version~<n>`: the nth instance of that `name@version` configured in the API's process. Stable for that process's life, meaningless in another. */\n id: string;\n provider: {\n /** The provider's unique name. `custom:<kind>` for one made by `defineSummoner`. Never parse it. */\n name: string;\n /** The provider's version, semver. */\n version: string;\n /** A short label for badges, e.g. `ecs`. */\n kind: string;\n /** A human name; show `kind` when absent. */\n displayName?: string;\n /** Where its documentation lives. */\n homepage?: string;\n apiVersion: {\n /** The core plugin API version, `major.minor`. */\n core: string;\n /** The summon facet version. */\n summon?: string;\n };\n };\n /** How far its config has got: `ready` (validated, facets built), `pending` (an asynchronous schema is still validating it), `failed` (the latest validation rejected, or building its facets threw). About the config alone: a controller refusing a ready provider for its policy shows on that queue's summon status, not here. */\n readiness: \"ready\" | \"pending\" | \"failed\";\n /** Secret-free facts from its `describe()`, `{}` until its config is known or when `describe()` throws. Dropped whatever the provider says: a fact whose key has, or ends with, a credential word (`token`, `secret`, `key`, `password`, `passwd`, `pwd`, `credential`, `auth`, `authorization`, `bearer`, `private`, `cookie`, `session`: `apiKey`, `apikey`, `sessiontoken` and `secretArn` go, `keyspace` stays), one whose value holds a URL with userinfo (`://user:pass@`) or another credential shape (`Bearer …`, a JWT, or a `word:value` / `word=value` pair whose word contains a sensitive word such as `token`, `secret`, `auth` or `session` — which also drops `session-workers:prod`, `max_tokens=4096`, an ARN with `auth-api:prod` in it), and a `host` or `hostname` fact unless `serialize.exposeHosts` is on. */\n facts: Record<string, string>;\n /** Whether it defines a preflight, so `POST /providers/{id}/validate` checks the platform and not the config alone. */\n preflight: boolean;\n /** Whether its config schema implements Standard JSON Schema, so `GET /providers/{id}/schema` answers one. */\n configSchema: boolean;\n }[];\n}\n\n/** A preflight's verdict, answered with 200 whatever the platform said. */\nexport interface ProviderValidation {\n /** The provider's id, as asked. */\n id: string;\n /** Whether the preflight passed: it answered, and no check is `fail`. */\n ok: boolean;\n /** What the preflight answered; empty when it threw, timed out, or the provider has none. */\n checks: {\n /** A stable id for the check, e.g. `credentials`. */\n id: string;\n /** Whether it passed; `warn` works but something is off. */\n status: \"pass\" | \"warn\" | \"fail\";\n /** A short explanation, redacted and cut to 128 characters. */\n detail?: string;\n }[];\n /** Why there are no checks: the config did not validate or its facets could not be built (`misconfigured`), or the preflight threw or timed out. */\n error?: {\n /** How the failure classifies, as a `ProviderError`'s kind: `auth` and `misconfigured` are the config's or the credentials' fault; `transient`, `throttled` and `quota` the platform's for now; `conflict` a provider bug. A throw that is not a `ProviderError`, and a timeout, are `transient`. */\n kind:\n | \"transient\"\n | \"throttled\"\n | \"quota\"\n | \"auth\"\n | \"misconfigured\"\n | \"conflict\";\n /** A short, secret-free explanation: the `ProviderError`'s `platformCode` (else its code), another error's code or name, `timeout`, or `invalid config: <paths>`. Redacted and cut to 128 characters. */\n detail: string;\n };\n}\n\nexport interface QueueDemand {\n /** The queue's name. */\n queue: string;\n /** The instant it describes, epoch ms. */\n at: number;\n /** Whether claiming is paused. A paused queue demands nothing. */\n paused: boolean;\n /** Jobs in `waiting`. */\n waiting: number;\n /** Jobs in `delayed` or `failed` (retry pending) whose `runAt` has passed, not yet promoted. */\n dueNow: number;\n /** Jobs in `active` whose worker died holding them: what the backend's stalled sweep would recover now. */\n stalled: number;\n /** Jobs in `active`, stalled ones included. */\n active: number;\n /** Live workers on the queue, from their heartbeat records, parked and paused ones included. `0` on a backend that keeps no worker records. */\n workers: number;\n nextDueAt: number | null;\n /** `paused ? 0 : waiting + dueNow + stalled`: work a worker could claim now. What a launch-style scaler (a KEDA `ScaledJob`, an ACA event job) reads. */\n demand: number;\n /** `paused ? 0 : demand + (active − stalled)`: every unfinished job, each once. What a scale-style scaler (a KEDA `ScaledObject`, CREMA) reads, since it stays above zero while a worker is busy. */\n outstanding: number;\n /** `true` when a figure reached the count cap (10,000, `DEFAULT_DEMAND_CAP`, fixed), so the figures are lower bounds. `demand` and `outstanding` are sums of capped figures and can exceed it. */\n capped: boolean;\n /** `false` when the backend has no `countDemand` and the figures come from a fallback: `dueNow` is 1 or 0, `stalled` is `active` when no worker is live. Right as a trigger, approximate as a count. The only signal of approximate figures: `features.demand` says only that the routes are served. */\n exact: boolean;\n}\n\nexport interface QueueDemandList {\n queues: QueueDemand[];\n /** Whether more queues are visible than `limits.maxQueues`, so some were not read. Only when `queues` was not sent. */\n truncated: boolean;\n}\n\nexport interface QueueDetail {\n name: string;\n counts: JobCounts;\n total: number;\n paused: boolean;\n limits?: QueueLimits | null;\n}\n\nexport interface QueueLimits {\n rate?: {\n max: number;\n duration: number;\n };\n concurrency?: number;\n names?: Record<\n string,\n {\n rate?: {\n max: number;\n duration: number;\n };\n concurrency?: number;\n }\n >;\n}\n\nexport interface QueueSummary {\n name: string;\n counts: JobCounts;\n total: number;\n paused: boolean;\n}\n\nexport interface QueueThroughput {\n interval: number;\n from: number;\n to: number;\n buckets: ThroughputBucket[];\n completed: number;\n failed: number;\n}\n\nexport interface Repeatable {\n queue: string;\n key: string;\n name: string;\n opts: JobOptions;\n cron?: string;\n tz?: string;\n every?: number;\n startAt?: number;\n endAt?: number;\n limit?: number;\n catchUp?: boolean;\n count: number;\n nextRunAt: number | null;\n nextJobId: string | null;\n /** Whether the series is disabled: it schedules nothing until enabled. */\n disabled: boolean;\n createdAt: number;\n updatedAt: number;\n /** With `include=data`. */\n data?: unknown;\n}\n\nexport interface RunLogLine {\n /** The line's 1-based place in its run's output, assigned by the store and never reused. A gap means the caps dropped those lines; the page's `lastSeq` sent back as `since` is the tail cursor. */\n seq: number;\n /** When it was captured, epoch ms. */\n at: number;\n stream: \"stdout\" | \"stderr\" | \"log\";\n /** The line's text, with its trailing newline already removed. The store calls this field `text`. */\n message: string;\n /** The severity a `log`-stream line carried. Absent on `stdout` and `stderr`, which have no levels, and on a forwarded line that came without one. */\n level?: \"trace\" | \"debug\" | \"info\" | \"warn\" | \"error\" | \"fatal\";\n /** Only ever `true`: capture cut this line at the per-line byte cap. Absent means the line is whole. */\n truncated?: true;\n}\n\nexport interface RunLogPage {\n items: RunLogLine[];\n page: PageInfo;\n /** How many of this run's lines the caps have dropped, in total. The run's own number, unfiltered by `since` or `stream`. */\n dropped: number;\n /** Whether a cap is trimming this run's log right now, so the page is a moving tail. Derived by the route, not stored. */\n capped: boolean;\n /** Whether the run is still going, so more lines may follow. Derived by the route from the run's status, not stored. */\n live: boolean;\n /** The highest `seq` this run's log holds, or `0` when it holds nothing. Unfiltered, which is what makes it a correct `since` cursor for a filtered tail. */\n lastSeq: number;\n}\n\nexport interface RunRecord {\n runId: string;\n runnerId: string;\n attempt: number;\n source: \"schedule\" | \"manual\" | \"queued\" | \"resume\";\n mode: \"child-process\" | \"worker-thread\" | \"in-process\";\n host?: string;\n pid?: number;\n startedAt: number;\n finishedAt?: number;\n durationMs?: number;\n status: \"running\" | \"success\" | \"failed\" | \"timeout\" | \"killed\";\n exitCode?: number | null;\n signal?: string | null;\n error?: Error;\n result?: unknown;\n detached?: boolean;\n /** Lines this run's log holds, after the caps; `0` when it logged nothing. Written when the run settles, so a run still going has neither counter — read the log route for a live count. Absent on a settled run means the backend stores no run logs, or this run's log has aged out. */\n logLines?: number;\n /** Lines the caps dropped from this run, oldest first; `0` when none were. Written with `logLines` when the run settles, and absent in the same cases. */\n logsDropped?: number;\n}\n\nexport interface RunnerAnalytics {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n runs: RunnerRunsSeries;\n /** Runs in flight **right now**, from the locks: an instant, not a figure about the range. At least this many — a run in another process in `parallel` mode holds no single-run lock to see. */\n runningNow: number;\n durations?: RunnerDurationSeries;\n}\n\nexport interface RunnerAnalyticsRow {\n runner: string;\n totals: RunnerRunsTotals;\n /** Runs in flight **right now**, from the locks: an instant, not a figure about the range. At least this many — a run in another process in `parallel` mode holds no single-run lock to see. */\n runningNow: number;\n durations?: RunnerDurationTotals;\n}\n\nexport interface RunnerAnalyticsSeries {\n runner: string;\n runs: RunnerRunsSeries;\n}\n\nexport interface RunnerConfig {\n effective: RunnerConfigValues;\n code?: RunnerConfigValues;\n /** Setting names, in `RUNNER_CONFIG_KEYS` order. */\n overridden: (\"executionMode\" | \"runMode\" | \"maxConcurrency\")[];\n /** The execution modes an override may choose and this runner's owner can adopt: its `allowedOverrides.executionModes`, less `child-process` and `worker-thread` when it was built from a driver instance (unless one is its code's own mode). May be empty. Absent means all three. */\n allowed?: (\"child-process\" | \"worker-thread\" | \"in-process\")[];\n seq: number;\n /** The version an owner has adopted; below `seq` means it has not been picked up yet. */\n appliedSeq?: number;\n /** Why an owner refused the override, in whole or in part; absent when the last one was adopted entire. `keys` names the refused settings. */\n error?: {\n at: number;\n message: string;\n /** The settings the owner refused, in `RUNNER_CONFIG_KEYS` order; every other overridden setting was adopted. A whole-override refusal names every overridden key. `[]` on an error an owner recorded before this field existed. */\n keys: (\"executionMode\" | \"runMode\" | \"maxConcurrency\")[];\n };\n updatedAt?: number;\n}\n\nexport interface RunnerConfigBody {\n executionMode?: \"child-process\" | \"worker-thread\" | \"in-process\" | null;\n concurrency?:\n | {\n runMode: \"single\";\n }\n | {\n runMode: \"parallel\";\n maxConcurrency: number | null;\n }\n | null;\n}\n\nexport interface RunnerConfigValues {\n executionMode: \"child-process\" | \"worker-thread\" | \"in-process\";\n runMode: \"parallel\" | \"single\";\n maxConcurrency: number | null;\n}\n\n/** Runs that **finished** in the bucket. `minMs`/`maxMs`/`meanMs` are exact; `p50Ms`/`p95Ms` come from a 24-bin log histogram (ratio 2) and are always within a factor of 2 of the truth, typically within 20–30%. */\nexport interface RunnerDurationBucket {\n at: number;\n count: number;\n minMs: number;\n maxMs: number;\n meanMs: number;\n p50Ms?: number;\n p95Ms?: number;\n histogram?: number[];\n}\n\n/** One series: what it covers, its contiguous buckets, and their sums. */\nexport interface RunnerDurationSeries {\n range: AnalyticsRange;\n /** One bucket per interval, oldest first, contiguous. */\n buckets: RunnerDurationBucket[];\n totals: RunnerDurationTotals;\n}\n\nexport interface RunnerDurationTotals {\n count: number;\n minMs: number;\n maxMs: number;\n meanMs: number;\n p50Ms?: number;\n p95Ms?: number;\n}\n\nexport interface RunnerInfo {\n id: string;\n namespace: string;\n isLocal: boolean;\n name: string;\n file?: string;\n schedule: RunnerSchedule;\n nextRunAt: number | null;\n executionMode?: \"child-process\" | \"worker-thread\" | \"in-process\";\n runMode?: \"parallel\" | \"single\";\n queueRuns?: boolean;\n maxQueuedRuns?: number;\n maxConcurrency?: number;\n isPaused: boolean;\n isRunning: boolean;\n runningOn?: {\n runId: string;\n since: number;\n host?: string;\n pid?: number;\n };\n queuedTriggers: number;\n config?: RunnerConfig;\n stats: RunnerStats;\n lastRun?: RunRecord;\n lastError?: {\n name: string;\n message: string;\n };\n updatedAt?: number;\n local?: {\n /** The runner's lifecycle in its own process: `idle` = registered, not started; `running` = started with its schedule armed (a run may or may not be in flight: see `isRunning`); `paused`; `stopped`. */\n status: \"idle\" | \"running\" | \"paused\" | \"stopped\";\n activeRuns: RunRecord[];\n nextRunAt: number | null;\n };\n}\n\nexport interface RunnerRunsBucket {\n at: number;\n started: number;\n succeeded: number;\n failed: number;\n timeout: number;\n killed: number;\n skipped: number;\n}\n\n/** One series: what it covers, its contiguous buckets, and their sums. */\nexport interface RunnerRunsSeries {\n range: AnalyticsRange;\n /** One bucket per interval, oldest first, contiguous. */\n buckets: RunnerRunsBucket[];\n totals: RunnerRunsTotals;\n}\n\n/** `started` does not balance the rest: runs straddle the range's edges. The honest in-flight number is `runningNow`. */\nexport interface RunnerRunsTotals {\n started: number;\n succeeded: number;\n failed: number;\n timeout: number;\n killed: number;\n skipped: number;\n}\n\nexport type RunnerSchedule =\n | {\n cron: string;\n tz?: string;\n }\n | {\n every: number;\n anchor?: number;\n }\n | {\n at: number;\n }\n | null;\n\nexport interface RunnerStats {\n success: number;\n failed: number;\n timeout: number;\n killed: number;\n skipped: number;\n queued: number;\n total: number;\n}\n\nexport interface RunnersAnalytics {\n series: RunnerRunsSeries;\n /** Runs in flight **right now**, from the locks: an instant, not a figure about the range. At least this many — a run in another process in `parallel` mode holds no single-run lock to see. */\n runningNow: number;\n /** A row per runner, at most 100, sorted by started runs descending then by id. */\n rows: RunnerAnalyticsRow[];\n /** Whether more rows matched than the 100 `rows` holds. */\n truncated: boolean;\n /** How many rows matched before the cap: the list the route already held, never a second read. */\n totalRows: number;\n /** One series per runner named in `ids`, in the order asked; absent when `ids` named none. */\n seriesByRunner?: RunnerAnalyticsSeries[];\n}\n\n/** Attempts counted against the summon budget in the current UTC hour and day, shared by every controller on the queue, with the answering controller's limits and when each window resets. */\nexport interface SummonBudget {\n /** Attempts this UTC hour. */\n hour: number;\n /** The hourly limit. Absent while the budget is off. */\n perHour?: number;\n /** Attempts this UTC day. */\n day: number;\n /** The daily limit. Absent while the budget is off. */\n perDay?: number;\n /** Present, and `true`, when the policy turned the budget off (`budget: false`): no limit applies, and the counts are shown for information. */\n off?: true;\n /** Set when no limits were stored with this state (it was written before limits were persisted): the counts are real, the limits are not known. Cleared on the queue's next summon. Only read from storage (`local: false`); `perHour`, `perDay` and `off` are then absent. */\n limitsUnknown?: true;\n /** When the hour window ends and `hour` starts again from 0, epoch ms: the next UTC hour. */\n hourResetsAt: number;\n /** When the day window ends and `day` starts again from 0, epoch ms: the next UTC midnight. */\n dayResetsAt: number;\n}\n\nexport interface SummonCapabilities {\n /** How it starts compute: `launch` starts new units, `scale` sets a count, `wake` starts one of a fixed pool. */\n style: \"launch\" | \"scale\" | \"wake\";\n dedupe:\n | {\n /** A request token the platform remembers (ECS `clientToken`). */\n kind: \"token\";\n /** The longest key it accepts. */\n maxLength: number;\n /** The characters it accepts, as a character-class body. */\n charset: string;\n /** What the token is unique within, e.g. `cluster`. */\n scope: string;\n /** How long the platform remembers it, in ms, when documented. */\n ttlMs?: number;\n /** Whether a same-token request with different parameters is an error. */\n strict: boolean;\n }\n | {\n /** A name the platform will not create twice. */\n kind: \"name\";\n /** The longest name it accepts. */\n maxLength: number;\n /** The characters it accepts, as a character-class body. */\n charset: string;\n }\n | {\n /** No platform dedupe: the marker's compare-and-set is the whole guard. */\n kind: \"none\";\n };\n /** How per-attempt values reach the process: `argv`, or `none` when the command line is fixed. */\n passes: \"argv\" | \"none\";\n /** The default time an attempt counts as a worker on its way, in ms. */\n bootBudgetMs: number;\n shutdown: {\n /** The stop signal; `none` for an in-invocation platform. */\n signal: \"SIGTERM\" | \"SIGINT\" | \"none\";\n /** The grace after the signal, in ms. */\n graceMs: number;\n /** The most the platform allows the grace to be raised to, when known. */\n graceMaxMs?: number;\n };\n maxLifetimeMs: number | null;\n /** Whether the summoner maps the requested lifetime onto the platform's cap. */\n enforcesLifetime: boolean;\n /** The most units one call may start, when limited. */\n maxCountPerCall?: number;\n /** `wake` only: how many units the pool has. */\n poolSize?: number;\n}\n\nexport interface SummonCheck {\n /** What the check did: `none` (nothing needs a worker), `skipped` (a guard held it back; see `reason`), `summoned` (an attempt was claimed and the summoner called; see `id` and `outcome`), or `released` (a scale-style summoner was set back to zero). */\n action: \"none\" | \"skipped\" | \"summoned\" | \"released\";\n /** For `skipped`: which guard held the attempt back. */\n reason?:\n | \"served\"\n | \"pending\"\n | \"cooldown\"\n | \"backoff\"\n | \"circuit-open\"\n | \"budget\"\n | \"contended\"\n | \"closed\"\n | \"inert\";\n /** For `summoned`: the attempt's id. */\n id?: string;\n /** For `summoned`: what the summoner answered, or `failed`. */\n outcome?:\n | \"started\"\n | \"deduped\"\n | \"already-running\"\n | \"registered\"\n | \"unavailable\"\n | \"failed\"\n | \"lost\"\n | \"budget-exhausted\"\n | \"released\";\n demand?: QueueDemand;\n}\n\n/** Every summon group with shared state in the namespace, read from storage. */\nexport interface SummonGroupList {\n /** The groups, in name order. Empty when none has state. */\n groups: SummonGroupStatus[];\n}\n\n/** A summon group's shared state (`SummonPolicy.group`): the attempts counted against the group in the current UTC hour and day across every queue in it, with the limits for the group — the answering controller's, or read from storage the ones the last charge persisted (absent, and `off: true`, while the group's budget is off) — each queue's share of today's, and its shared circuits. */\nexport interface SummonGroupStatus {\n /** The group's name. */\n name: string;\n /** `shared` when the group is one shared unit (`group.unit: \"shared\"`): one controller summons for all of its queues, and the unit's attempts, failures and circuit are kept in the group's state, so `GET /queues/{queue}/summon` on any of its queues answers them. From a controller in the group, its policy says so; read from storage, the group's state does, once the unit has claimed. Absent for a group of per-queue controllers. */\n unit?: \"shared\";\n budget: SummonBudget;\n /** Each queue's share of today's attempts, by queue name: every queue that charged the group since UTC midnight. */\n queues: Record<\n string,\n {\n /** Attempts this queue charged to the group this UTC day. */\n day: number;\n /** When it last charged one, epoch ms. */\n lastAt: number;\n }\n >;\n /** The group's shared circuit for the answering controller's summoner kind, when a controller in the group runs in the API's process and its group shares its circuit (`group.circuit`) — or, read from storage, the kind a queue's last claim persisted: while open, no queue of the group using that kind is summoned for. */\n circuit?: {\n /** Consecutive failures counted across the group for this provider kind; reset by a registration on any of its queues. */\n failures: number;\n /** When the open circuit closes, epoch ms, while it is open. */\n openUntil?: number;\n /** The failure that last opened it. */\n openedBy?: {\n /** The queue whose attempt failed. */\n queue: string;\n /** The attempt. */\n id: string;\n /** Its short, secret-free detail. */\n detail?: string;\n };\n };\n /** Every provider kind's shared circuit the group's state holds, by `kind`, as `circuit` shows one, so any API process shows every kind's. Absent while none has counted a failure. */\n circuits?: Record<\n string,\n {\n /** Consecutive failures counted across the group for this provider kind; reset by a registration on any of its queues. */\n failures: number;\n /** When the open circuit closes, epoch ms, while it is open. */\n openUntil?: number;\n /** The failure that last opened it. */\n openedBy?: {\n /** The queue whose attempt failed. */\n queue: string;\n /** The attempt. */\n id: string;\n /** Its short, secret-free detail. */\n detail?: string;\n };\n }\n >;\n}\n\n/** Every summoning queue the API can read, with its budget usage and circuit. */\nexport interface SummonList {\n /** Every summoning queue, by queue name — with a controller in the API's process (`local: true`) or summon state in storage (`local: false`) — less the queues the caller may not read. Empty when none summons. */\n controllers: {\n /** The queue's namespace. */\n namespace: string;\n /** The queue. A shared unit (`group.unit: \"shared\"`) is one item, whose `queue` is the first of its `queues` the caller may read. */\n queue: string;\n /** For a shared unit (`group.unit: \"shared\"`): the queues it serves that this API can reach and the caller may read (`queues.read`), in the policy's order, the first being `queue`. A shared unit is listed once, and only when the caller may read at least one of its queues; a `partial:` detail on `last` names only these queues. Absent for a controller of one queue. */\n queues?: string[];\n /** For a shared unit: the summon group it is the unit of (`SummonPolicy.group.name`), as `group.name` of `GET /queues/{queue}/summon` has it. Absent for a controller of one queue (its group, if any, is on its own status). */\n group?: string;\n /** Whether its controller runs in the API's process. `false`: read from the queue's summon state in storage, as `GET /queues/{queue}/summon` answers with `local: false`; then `readiness` is absent. */\n local: boolean;\n /** The summoner's kind, e.g. `ecs`: a label for badges. Read from storage, the kind the queue's last claim persisted, empty when none did. */\n kind: string;\n /** Whether the summoner can be called, as `GET /queues/{queue}/summon` has it: `ready`, `pending` while its provider's config is still validating, or `failed`. Only when `local`. */\n readiness?: \"ready\" | \"pending\" | \"failed\";\n /** Whether the controller is inert, as `GET /queues/{queue}/summon` has it: it summons nothing, whatever `readiness` says. Read from storage (`local: false`), `true` only for summon state a newer bun-jobs wrote (`inertReason: newer-marker`). */\n inert?: boolean;\n /** Why it is inert, as `GET /queues/{queue}/summon` has it: `summoned-process` (the API's process was itself summoned, or is a runner child, and the policy has no `fromSummoned`) or `newer-marker` (a newer bun-jobs wrote the queue's summon state). Never `unreadable-marker` here: the list leaves a queue whose summon state cannot be read out. */\n inertReason?: \"summoned-process\" | \"newer-marker\" | \"unreadable-marker\";\n /** When the queue's open circuit closes, epoch ms, while it is open, as `GET /queues/{queue}/summon` has it. */\n circuitOpenUntil?: number;\n last?: {\n /** The attempt it concerns; empty for an outcome no attempt owns. */\n id: string;\n /** What happened. Show an outcome you do not know as the raw string. */\n outcome:\n | \"started\"\n | \"deduped\"\n | \"already-running\"\n | \"registered\"\n | \"unavailable\"\n | \"failed\"\n | \"lost\"\n | \"budget-exhausted\"\n | \"released\";\n /** When, epoch ms. */\n at: number;\n /** A short, secret-free explanation. */\n detail?: string;\n /** For a shared unit's partial registration (`outcome: registered`, detail `partial:<queues>`): the queues its attempt registered no worker on, in the policy's order, the same ones the detail names. Stored with the outcome, so a status read from storage (`local: false`) has it too. Absent otherwise, and on an outcome an older bun-jobs wrote, whose detail still names them. Only the queues the caller may read; `detail` then names the same ones. */\n missing?: string[];\n };\n budget?: SummonBudget;\n }[];\n}\n\n/** The policy a queue's summon controller runs with, as it resolved it: every value in effect, defaults filled in, durations in ms. Never an `env` value, a summoner, or the provider's config. Field names are the policy's option names, so a path in `explicit` is the field's path here, except `group.circuit.*` (shown as `circuit.group`) and the budget (shown by the status's `budget` and `group.budget`). The platform's shutdown signal and grace are not a policy value: read them from `summoner.capabilities.shutdown`. */\nexport interface SummonPolicyStatus {\n /** What makes the controller check: one item per trigger kind, on or off, in `onAdd`, `events`, `poll` order. */\n triggers: {\n /** Which trigger: `onAdd` (a job added through a queue the controller is attached to), `events` (an event another process published through the driver) or `poll`. Show a kind you do not know as text. */\n kind: \"onAdd\" | \"events\" | \"poll\";\n /** Whether it is on. */\n on: boolean;\n /** `onAdd` and `events`: how long add and event triggers are coalesced (`triggers.debounce`), in ms. */\n debounce?: number;\n /** `poll`, while on: how often the controller checks, in ms. */\n every?: number;\n }[];\n /** How long an attempt counts as a worker on its way: the policy's `bootBudget`, else the summoner's `capabilities.bootBudgetMs`. Absent while the summoner is not ready and the policy set none (the default is not known yet), in ms. */\n bootBudget?: number;\n /** The most summoned workers at once. Once the summoner is ready, the value after a wake pool's clamp to its `poolSize`; while it is not (`readiness` `pending` or `failed`), the configured value, before that clamp, since the pool's size is not known yet. */\n maxWorkers: number;\n jobsPerWorker: number | null;\n /** The most unregistered attempts at once (defaults to `maxWorkers`, so a default follows `maxWorkers`: after a wake pool's clamp once the summoner is ready, before it while it is not). */\n maxPending: number;\n /** The least time between two attempts, in ms. */\n cooldown: number;\n /** The wait after a failed or lost attempt: `initial`, doubling per consecutive failure, up to `max`. */\n backoff: {\n /** The first wait, in ms. */\n initial: number;\n /** The longest wait, in ms. */\n max: number;\n };\n /** Consecutive failed or lost attempts that open the circuit, and how long it stays open before a trial. */\n circuit: {\n /** Consecutive failed or lost attempts that open it. */\n failures: number;\n /** How long it stays open before one trial attempt, in ms. */\n resetAfter: number;\n /** The summon group's shared circuit thresholds, when `group.circuit` is on for a per-queue controller (each defaulting to the policy's own). Absent otherwise, and for a shared unit, whose circuit is its group's own. */\n group?: {\n /** Consecutive failures across the group, of one provider kind, that open it. */\n failures: number;\n /** How long it stays open, in ms. */\n resetAfter: number;\n };\n };\n /** The longest a summoned worker may live (passed as `--bun-jobs-summon-max-lifetime-ms`); the platform's own cap is `summoner.capabilities.maxLifetimeMs`, in ms. */\n maxLifetime: number;\n /** Which live workers count as serving the queue. */\n servedBy: \"any-worker\" | \"summoned-only\";\n /** Scale style only: when the count goes back to zero. */\n scaleDown: {\n /** How long the queue must be idle first, in ms. */\n after: number;\n };\n /** How long one summoner call may take, in ms. */\n summonTimeout: number;\n /** The names of the policy's static `env`, sorted. Never their values. */\n env: string[];\n /** Whether the controller may run in a summoned process or runner child. */\n fromSummoned: boolean;\n /** Whether an `onSummonFailed` hook is set. */\n onSummonFailed: boolean;\n /** A shared unit only (`group.unit: \"shared\"`): each of its queues' capacity, by queue, in the unit's order — only the queues the caller may read (`queues.read`) and this API can reach, as `queues` has them. Absent for a controller of one queue. Its keys are in the unit's order, except that queue names that look like integers (`\"2\"`) come first, in ascending order, as JavaScript orders an object's keys. */\n perQueue?: Record<\n string,\n {\n jobsPerWorker: number | null;\n /** The most units this queue's demand alone may ask for: at most `maxWorkers`, so clamped as it is. */\n maxWorkers: number;\n /** What the unit's `overrides` entry for this queue set, in this order. */\n explicit: (\"jobsPerWorker\" | \"maxWorkers\")[];\n }\n >;\n /** The keys the policy set (any value but `undefined`), in `SUMMON_POLICY_KEYS` order; every other value is a default. A per-queue group member's override is merged into its policy, so its keys count as set too. On a shared unit, whose circuit is its group entry's own, `group.circuit.*` is never listed (it changes nothing there, and `circuit.group` is absent). */\n explicit: (\n | \"triggers.onAdd\"\n | \"triggers.events\"\n | \"triggers.poll\"\n | \"triggers.debounce\"\n | \"bootBudget\"\n | \"maxWorkers\"\n | \"jobsPerWorker\"\n | \"maxPending\"\n | \"cooldown\"\n | \"backoff.initial\"\n | \"backoff.max\"\n | \"circuit.failures\"\n | \"circuit.resetAfter\"\n | \"group.circuit.failures\"\n | \"group.circuit.resetAfter\"\n | \"budget\"\n | \"budget.perHour\"\n | \"budget.perDay\"\n | \"maxLifetime\"\n | \"servedBy\"\n | \"scaleDown.after\"\n | \"summonTimeout\"\n | \"env\"\n | \"fromSummoned\"\n | \"onSummonFailed\"\n )[];\n}\n\n/** A queue's summon status: its shared summon state (read from the backend, so the same from every process) plus the local controller's policy (`policy`: only when `local` is `true`, since only the process running the controller knows it; advertised by `/meta.features.summonPolicy`). */\nexport interface SummonStatus {\n /** The queue. For a shared unit, the first of `queues`: the first of its queues the caller may read. */\n queue: string;\n /** For a shared unit (`group.unit: \"shared\"`): the queues it serves that the caller may read (`queues.read`, asked as this route asks it) and this API can reach (its `queues` option: reachability, not access control), in the policy's order, always including the one asked about. The status is the unit's, the same whichever of its queues was asked about, and `queue` is the first of these; a `partial:` detail on `last` names only these queues too (bare `partial` when it names none of them). Read from storage (`local: false`), of the queues its last claim persisted. Absent for a controller of one queue. */\n queues?: string[];\n /** Summon groups whose shared units also summon for this controller's queues, as of its last check: the group named on live summoned worker records of its queues, other than its own. One queue with two summoning controllers can start a unit for each in a cold start. Only the groups seen on queues the caller may read (`queues.read`). Sorted; absent when there are none, before the first check, and read from storage (`local: false`). A per-queue controller's unit writes no group on its records, so it is never listed. */\n overlaps?: string[];\n /** Whether the controller runs in the API's process. `false`: read from the queue's summon state in storage, for a queue whose controller runs elsewhere — no `summoner`, the budget's limits the ones its last claim persisted (`off` when its budget was off, absent when none was persisted; for a shared unit, the group's own limits, since a stricter `budget` in its policy is known only to its controller), and \"summon now\" and reset still 409 `SUMMON_NOT_CONFIGURED`. A queue a shared unit in another process serves is answered with the unit's status, read from its group's state, when the unit claimed at or after the queue's own summon state did. Advertised by `/meta.features.summonStoredStatus`. */\n local: boolean;\n /** Whether that controller is inert: it summons nothing, and \"summon now\" answers `skipped` with reason `inert`. Read from storage (`local: false`), `true` only for summon state this build cannot read: state a newer bun-jobs wrote, or state not in the shape of summon state at all (with nothing pending, no failures and no `budget`). */\n inert: boolean;\n /** Why it is inert: `summoned-process` (the API's process was itself summoned, or is a runner child, and the policy has no `fromSummoned`), `newer-marker` (a newer bun-jobs wrote the queue's summon state) or `unreadable-marker` (the queue's summon state cannot be read at all; `GET /summon` leaves such a queue out). Show a reason you do not know as text. */\n inertReason?: \"summoned-process\" | \"newer-marker\" | \"unreadable-marker\";\n summoner?: {\n provider: {\n /** The provider's unique name. `custom:<kind>` for one made by `defineSummoner`. Never parse it. */\n name: string;\n /** The provider's version, semver. */\n version: string;\n /** A short label for badges, e.g. `ecs`. */\n kind: string;\n /** A human name; show `kind` when absent. */\n displayName?: string;\n /** Where its documentation lives. */\n homepage?: string;\n apiVersion: {\n /** The core plugin API version, `major.minor`. */\n core: string;\n /** The summon facet version. */\n summon?: string;\n };\n };\n /** The configured provider's id in the API's process, `name@version~<n>`: what `POST /providers/{id}/validate` (\"Test connection\") and `GET /providers/{id}/schema` take, percent-encoded. Stable for that process's life. Absent only for a summoner nothing can trace to a configured instance. */\n providerId?: string;\n /** Whether the summoner can be called: `ready`; `pending` while its provider's asynchronous config check is still running; `failed` when that check rejected (each attempt fails without a call and validates again; the redacted detail is on `last.detail`) or this queue's controller refused the provider for good for its policy (then `GET /providers` still says `ready`: that readiness is the config's alone). */\n readiness: \"ready\" | \"pending\" | \"failed\";\n capabilities?: SummonCapabilities;\n /** Secret-free facts from the summoner's `describe()`, `{}` until its config is known. Dropped whatever the provider says: a fact whose key has, or ends with, a credential word (`token`, `secret`, `key`, `password`, `passwd`, `pwd`, `credential`, `auth`, `authorization`, `bearer`, `private`, `cookie`, `session`: `apiKey`, `apikey`, `sessiontoken` and `secretArn` go, `keyspace` stays), one whose value holds a URL with userinfo (`://user:pass@`) or another credential shape (`Bearer …`, a JWT, or a `word:value` / `word=value` pair whose word contains a sensitive word such as `token`, `secret`, `auth` or `session` — which also drops `session-workers:prod`, `max_tokens=4096`, an ARN with `auth-api:prod` in it), and a `host` or `hostname` fact unless `serialize.exposeHosts` is on. */\n facts: Record<string, string>;\n };\n /** Attempts in flight, oldest first. */\n pending: {\n /** The attempt's id: what the summoned worker's `summon.id` will say. */\n id: string;\n /** When it was claimed, epoch ms. */\n at: number;\n /** When it stops counting as a worker on its way, epoch ms: past it, with no worker registered, the attempt is `lost`. */\n until: number;\n /** How many workers it asked for. */\n count: number;\n /** The summoner's kind. */\n kind: string;\n /** The platform's identifiers for what it started. Omitted unless `serialize.exposeSummonHandles` is on (default off): a task ARN carries the AWS account id. */\n handles?: string[];\n /** For a shared unit (`group.unit: \"shared\"`): how far this attempt has got on each queue the unit serves, by queue. `registered` once a worker of the unit holds the attempt's claim on that queue and is live there, or has left with a clean exit mark; `missing` once the attempt's `until` has passed with no worker registered there and none still starting, by the server's clock plus the 5 s allowance the controller grants every comparison between processes; `pending` before that. Worked out from the queues' claims and live worker records each time the status is read: never stored, and absent for a controller of one queue and when those reads fail (the status is then answered without it). An attempt with a `missing` queue settles at the controller's next check as `registered` with `partial:<queues>` (see `last.missing`), or as `lost` when every queue is missing. Only the queues the caller may read (`queues.read`). */\n coverage?: Record<string, \"registered\" | \"pending\" | \"missing\">;\n }[];\n /** Consecutive failed or lost attempts; reset by a registration or a reset. */\n failures: number;\n /** When the backoff after a failure ends, epoch ms, while one runs. */\n backoffUntil?: number;\n /** When the open circuit closes, epoch ms, while it is open. */\n circuitOpenUntil?: number;\n budget?: SummonBudget;\n last?: {\n /** The attempt it concerns; empty for an outcome no attempt owns. */\n id: string;\n /** What happened. Show an outcome you do not know as the raw string. */\n outcome:\n | \"started\"\n | \"deduped\"\n | \"already-running\"\n | \"registered\"\n | \"unavailable\"\n | \"failed\"\n | \"lost\"\n | \"budget-exhausted\"\n | \"released\";\n /** When, epoch ms. */\n at: number;\n /** A short, secret-free explanation. */\n detail?: string;\n /** For a shared unit's partial registration (`outcome: registered`, detail `partial:<queues>`): the queues its attempt registered no worker on, in the policy's order, the same ones the detail names. Stored with the outcome, so a status read from storage (`local: false`) has it too. Absent otherwise, and on an outcome an older bun-jobs wrote, whose detail still names them. Only the queues the caller may read; `detail` then names the same ones. */\n missing?: string[];\n };\n group?: SummonGroupStatus;\n policy?: SummonPolicyStatus;\n}\n\nexport interface ThroughputBucket {\n at: number;\n completed: number;\n failed: number;\n}\n\nexport type TriggerOutcome =\n | {\n outcome: \"started\";\n runId: string;\n }\n | {\n outcome: \"queued\";\n position: number;\n }\n | {\n outcome: \"skipped\";\n reason:\n | \"paused\"\n | \"busy\"\n | \"lock-held\"\n | \"max-concurrency\"\n | \"queue-full\"\n | \"stopped\";\n };\n\nexport interface Worker {\n id: string;\n /** The stable identity a config override is keyed by; absent on a worker that predates remote control. */\n key?: string;\n service?: string;\n queue: string;\n state?: WorkerState;\n concurrency: number;\n active: number;\n paused: boolean;\n startedAt: number;\n processStartedAt?: number;\n heartbeatAt: number;\n expiresAt: number;\n /** Whether it has missed a report (over 1.5 × its effective `reportInterval`): listed, but late. Absent when it reports no config to judge it by. */\n stale?: boolean;\n version?: string;\n /** Jobs this incarnation has completed since it started, as of its last report. Per incarnation; absent on an older worker. */\n completed?: number;\n /** Attempts this incarnation has failed since it started, as of its last report. Absent on an older worker. */\n failed?: number;\n /** Resident set size in bytes at its last report (`process.memoryUsage.rss()`). The memory of the **process**, not of the worker: two workers in one process report the same number, so never sum it across rows — take one row per `pid` (with `host`). Absent on an older worker. */\n rssBytes?: number;\n /** How long this worker's own heartbeat record write took, in milliseconds: the round trip to the driver, not a network ping. The **last sample**, not an average — a write cannot time itself, so it is the previous report's. Absent on a worker's first report and on an older worker. */\n heartbeatRttMs?: number;\n /** Whether this worker **takes part in** the queue's housekeeping sweeps — the minute pass: pruning expired results, healing repeat series, sweeping stale queue state — which is what its `maintenance` option decides. Taking part, not performing: the minute pass is leased, so on a queue of five `true` workers exactly one holds the lease on any given pass and the rest stand down — do not show it as \"sweeping now\". It says nothing about liveness: promoting delayed jobs, recovering stalled ones and healing flows happen on every worker and cannot be turned off. Absent on an older worker, and absent is **not** `false`: it means too old to say — so a queue counts as having no sweeper only when at least one live worker reports `false` and none reports `true`, never merely because none reports it at all. */\n sweeps?: boolean;\n target?: WorkerTargetInfo;\n summon?: WorkerSummonProvenance;\n config?: WorkerConfig;\n control?: WorkerControl;\n /** Omitted with `serialize.exposeHosts: false`. */\n host?: string;\n /** Omitted with `serialize.exposeHosts: false`. */\n pid?: number;\n}\n\nexport interface WorkerAnalytics {\n key: string;\n queue: string;\n jobs: WorkerJobsSeries;\n busyness?: WorkerBusynessSeries;\n}\n\nexport interface WorkerAnalyticsRow {\n /** The worker's stable key — never the per-incarnation id. */\n key: string;\n queue: string;\n totals: WorkerJobsTotals;\n busyness?: WorkerBusynessTotals;\n}\n\nexport interface WorkerAnalyticsSeries {\n key: string;\n queue: string;\n jobs: WorkerJobsSeries;\n}\n\n/** Sampled on the worker's heartbeat, not counted. `samples: 0` means the worker was not reporting, not that it was idle. */\nexport interface WorkerBusynessBucket {\n at: number;\n samples: number;\n activeMean: number;\n activeMax: number;\n concurrency: number;\n}\n\n/** One series: what it covers, its contiguous buckets, and their sums. */\nexport interface WorkerBusynessSeries {\n range: AnalyticsRange;\n /** One bucket per interval, oldest first, contiguous. */\n buckets: WorkerBusynessBucket[];\n totals: WorkerBusynessTotals;\n}\n\nexport interface WorkerBusynessTotals {\n samples: number;\n activeMean: number;\n activeMax: number;\n concurrency: number;\n}\n\nexport interface WorkerConfig {\n effective: WorkerConfigValues;\n code: WorkerConfigValues;\n /** Setting names, in `WORKER_CONFIG_KEYS` order. */\n overridden: (\n | \"concurrency\"\n | \"pollInterval\"\n | \"maxBlock\"\n | \"lockDuration\"\n | \"heartbeatInterval\"\n | \"stalledInterval\"\n | \"maxStalledCount\"\n | \"reportInterval\"\n | \"drainDelay\"\n )[];\n /** Setting names, in `WORKER_CONFIG_KEYS` order. */\n derived?: (\n | \"concurrency\"\n | \"pollInterval\"\n | \"maxBlock\"\n | \"lockDuration\"\n | \"heartbeatInterval\"\n | \"stalledInterval\"\n | \"maxStalledCount\"\n | \"reportInterval\"\n | \"drainDelay\"\n )[];\n seq: number;\n updatedAt?: number;\n}\n\nexport interface WorkerConfigBody {\n concurrency?: number | null;\n pollInterval?: number | null;\n maxBlock?: number | null;\n lockDuration?: number | null;\n heartbeatInterval?: number | null;\n stalledInterval?: number | null;\n maxStalledCount?: number | null;\n reportInterval?: number | null;\n drainDelay?: number | null;\n /** The `seq` last read. Answered 409 CONTROL_CONTENDED when it no longer matches. Omit it for a last-writer-wins write. */\n expectedSeq?: number;\n}\n\nexport interface WorkerConfigOverride {\n queue: string;\n key: string;\n values: WorkerConfigPatch;\n seq: number;\n updatedAt: number;\n /** Live workers carrying this key, and whether each has applied this version. */\n instances: {\n id: string;\n applied: boolean;\n }[];\n}\n\n/** The settings an override replaces; a key absent from it is left at the worker's own value. */\nexport interface WorkerConfigPatch {\n /** 1 … 1000. */\n concurrency?: number;\n /** 10 … 3600000, in ms. */\n pollInterval?: number;\n /** 10 … 3600000, in ms. */\n maxBlock?: number;\n /** 1000 … 86400000, in ms. */\n lockDuration?: number;\n /** 100 … 43200000, in ms. */\n heartbeatInterval?: number;\n /** 1000 … 86400000, in ms. */\n stalledInterval?: number;\n /** 0 … 100. */\n maxStalledCount?: number;\n /** 1000 … 600000, in ms. */\n reportInterval?: number;\n /** 0 … 86400000, in ms. */\n drainDelay?: number;\n}\n\nexport interface WorkerConfigResult {\n queue: string;\n key: string;\n values: WorkerConfigPatch;\n seq: number;\n /** The live workers it reaches, and whether each has applied it yet. */\n instances: {\n id: string;\n applied: boolean;\n state?: WorkerState;\n }[];\n}\n\n/** Every editable worker setting: milliseconds except `concurrency` and `maxStalledCount`, which are counts. */\nexport interface WorkerConfigValues {\n /** 1 … 1000. */\n concurrency: number;\n /** 10 … 3600000, in ms. */\n pollInterval: number;\n /** 10 … 3600000, in ms. */\n maxBlock: number;\n /** 1000 … 86400000, in ms. */\n lockDuration: number;\n /** 100 … 43200000, in ms. */\n heartbeatInterval: number;\n /** 1000 … 86400000, in ms. */\n stalledInterval: number;\n /** 0 … 100. */\n maxStalledCount: number;\n /** 1000 … 600000, in ms. */\n reportInterval: number;\n /** 0 … 86400000, in ms. */\n drainDelay: number;\n}\n\nexport interface WorkerControl {\n /** Whether the worker listens for control at all: its `control` option, and a backend that can store the desired state. */\n enabled: boolean;\n /** How it hears about a change: a driver subscription, or only its own polling. */\n mode: \"subscribe\" | \"poll\";\n appliedSeq: number;\n configSeq: number;\n /** Whether it is mid-apply — `state === \"restarting\"`. */\n pending: boolean;\n stopPersistence: WorkerStopPersistence;\n /** Whether one request may override `stopPersistence` by sending `persist` on the stop route. */\n stopPersistenceOverridable: boolean;\n lastError?: {\n at: number;\n message: string;\n action?: \"pause\" | \"resume\" | \"stop\" | \"start\" | \"config\" | \"reset\";\n seq?: number;\n };\n}\n\nexport interface WorkerControlBody {\n /** Wait up to this many ms for the worker to acknowledge. `0` (the default) stores the instruction and answers 202 at once. At most 30000. `?wait=` is the spelling a client uses, and wins over this one. */\n wait?: number;\n /** `stop` only: abandon the jobs still running after this many ms instead of waiting for them. Their locks then lapse and another worker recovers them as stalled — the work is delayed and run again from the start, which is why waiting is the default. At most 3600000. */\n timeout?: number;\n persist?: WorkerStopPersistence;\n}\n\nexport interface WorkerControlResult {\n /** The state that was asked for. `stopping` and `restarting` are transients a caller never requests. */\n desired: \"running\" | \"paused\" | \"stopped\";\n seq: number;\n /** Whether the worker has been seen to apply it — always `false` without `wait`, unless it was already in that state. */\n applied: boolean;\n persisted?: WorkerStopPersistence;\n worker?: Worker;\n}\n\nexport interface WorkerJobsBucket {\n at: number;\n completed: number;\n failed: number;\n}\n\n/** One series: what it covers, its contiguous buckets, and their sums. */\nexport interface WorkerJobsSeries {\n range: AnalyticsRange;\n /** One bucket per interval, oldest first, contiguous. */\n buckets: WorkerJobsBucket[];\n totals: WorkerJobsTotals;\n}\n\nexport interface WorkerJobsTotals {\n completed: number;\n failed: number;\n}\n\n/** What the worker is doing. `stopping` and `restarting` are transients it passes through. */\nexport type WorkerState =\n \"running\" | \"paused\" | \"stopping\" | \"stopped\" | \"restarting\";\n\n/** `\"process\"`: only this incarnation is stopped, so a redeploy brings the worker back running. `\"key\"`: the stop is stored against the stable key, so every replica — including one started later — comes up stopped. */\nexport type WorkerStopPersistence = \"process\" | \"key\";\n\n/** Where a summoned worker came from — the worker record's `summon`. Absent means one of two things, and a client cannot tell which: the worker was not summoned, or it is too old to say. So show absence as no badge, never as a claim about how the worker was started. */\nexport interface WorkerSummonProvenance {\n /** The summon attempt's id: always present on a summoned worker. */\n id: string;\n /** The summoner's kind, e.g. `\"ecs\"` or `\"fly\"`: what a badge names. */\n kind?: string;\n /** The platform's own name for the unit (a task ARN, a Fly machine id). Omitted unless `serialize.exposeSummonHandles` is on (default off): an ECS task ARN contains the AWS account id. */\n handle?: string;\n /** The mode as requested by the summoner: `\"exit-on-idle\"`, `\"until-stopped\"` or `\"in-invocation\"`. Absent when none was requested, never defaulted. Show a mode you do not know as the raw string: a later server may add one. */\n mode?: \"exit-on-idle\" | \"until-stopped\" | \"in-invocation\";\n /** The latest it should stop, epoch ms, as requested by the summoner. Absent when none was requested, never defaulted. */\n deadlineAt?: number;\n /** The summon group whose shared unit this worker belongs to, when the unit was summoned for several queues: what a badge shows as \"unit of media\". Absent for a unit summoned for one queue, never defaulted. */\n group?: string;\n /** The mode the worker actually runs in, as `runSummoned` resolved it: its own option, else the requested `mode`, else `\"exit-on-idle\"` — so it may be present with no `mode`. Absent on a worker not run by `runSummoned`, or too old to say. Show a mode you do not know as the raw string. */\n resolvedMode?: \"exit-on-idle\" | \"until-stopped\" | \"in-invocation\";\n}\n\n/** Where a worker's attempts run, and whether it runs a function or a file — the worker record's `target`. Absent on an older worker, and absent is **not** `\"in-process\"`: it means too old to say, so show it as unknown, never as the default. Unrelated to the `target` of a worker event's envelope, which is the queue name. */\nexport interface WorkerTargetInfo {\n /** Where the attempts run: `\"in-process\"`, `\"worker-thread\"`, `\"child-process\"`, `\"container\"`, or `\"custom\"` (a target the application supplied). Show a kind you do not know as the raw string: a later server may add one. */\n kind:\n \"in-process\" | \"worker-thread\" | \"child-process\" | \"container\" | \"custom\";\n /** Whether the attempts run a function or a processor file. The pairs that occur: `\"in-process\"` with `\"function\"` or `\"file\"`; `\"worker-thread\"`, `\"child-process\"` and `\"container\"` with `\"file\"` only (a function cannot be sent to a thread, a process or a container); `\"custom\"` with `\"function\"` or `\"file\"`. */\n processor: \"function\" | \"file\";\n /** For `\"custom\"`: the target's own name. Absent for every other kind. */\n name?: string;\n /** For `\"container\"`: the image each attempt runs in and the runtime it asked for. Never the container's environment. Absent for every other kind. */\n container?: {\n /** The image, exactly as the target names it: `name@sha256:…` or `name:tag`. */\n image: string;\n /** The OCI runtime the target asked for, e.g. `\"runsc\"`; absent for the engine's default. */\n runtime?: string;\n };\n /** For a file processor: the absolute path it resolved to. Omitted unless `serialize.exposeProcessorFiles` is on. */\n file?: string;\n}\n\nexport interface WorkersAnalytics {\n series: WorkerJobsSeries;\n /** A row per worker key, at most 100, sorted by `completed` descending then by key. */\n rows: WorkerAnalyticsRow[];\n /** Whether more rows matched than the 100 `rows` holds. */\n truncated: boolean;\n /** How many rows matched before the cap: the list the route already held, never a second read. */\n totalRows: number;\n /** One series per (queue, key) the keys in `keys` matched, in the order asked; absent when `keys` named none. */\n seriesByKey?: WorkerAnalyticsSeries[];\n}\n\nexport interface Routes {\n /** Job throughput across the namespace, over a range */\n \"GET /analytics/jobs\": {\n operationId: \"getJobsAnalytics\";\n params: Record<never, never>;\n query: {\n from?: number | string;\n to?: number | string;\n resolution?: 1 | 60;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: JobsSeries;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Every runner's outcomes summed, a row per runner, and a batch of series */\n \"GET /analytics/runners\": {\n operationId: \"getRunnersAnalytics\";\n params: Record<never, never>;\n query: {\n from?: number | string;\n to?: number | string;\n resolution?: 1 | 60;\n /** Runners whose own series to return as well, in `seriesByRunner` — the page on screen. Repeat the key or separate with commas. At most 20; more is 400 `BULK_LIMIT`, not a truncation. An id this API cannot reach is left out. */\n ids?: string[];\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: RunnersAnalytics;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Every worker's throughput summed, a row per worker key, and a batch of series */\n \"GET /analytics/workers\": {\n operationId: \"getWorkersAnalytics\";\n params: Record<never, never>;\n query: {\n from?: number | string;\n to?: number | string;\n resolution?: 1 | 60;\n /** Stable worker keys whose own series to return as well, in `seriesByKey` — the page on screen. Repeat the key or separate with commas. At most 20; more is 400 `BULK_LIMIT`, not a truncation. A key matches every queue the listing has it on; one no listed worker carries is left out. */\n keys?: string[];\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: WorkersAnalytics;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** The AsyncAPI 3.0 document for the live-events socket */\n \"GET /asyncapi.json\": {\n operationId: \"getAsyncApiDocument\";\n params: Record<never, never>;\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n asyncapi: string;\n [key: string]: unknown;\n };\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n };\n };\n /** The job definitions this context knows */\n \"GET /definitions\": {\n operationId: \"listDefinitions\";\n params: Record<never, never>;\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n items: {\n name: string;\n /** The definition's job options, as JSON. */\n options: Record<string, unknown>;\n /** The definition's `schema: { data, result }` as JSON Schema; a side whose vendor could not be converted is `{}`. */\n schema?: {\n /** The data schema as a JSON Schema document, of what a client sends. */\n data?: Record<string, unknown>;\n /** The result schema as a JSON Schema document, of what a client receives. */\n result?: Record<string, unknown>;\n };\n }[];\n };\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n };\n };\n /** Demand of several queues, or the namespace as one scrape */\n \"GET /demand\": {\n operationId: \"listQueueDemand\";\n params: Record<never, never>;\n query: {\n /** The queues to read, repeated or comma-separated, in the order given, each once; every visible queue when absent. A name the caller cannot see (unknown, outside the allowlist, or refused `queues.read` under `listQueues: \"authorized\"`) is left out, never an error. At most 500 distinct names (`limits.maxQueues`); more is 400 `VALIDATION`, and a repeat does not count. */\n queues?: string[];\n /** `json` for the JSON body, `prometheus` for the Prometheus text exposition (`text/plain; version=0.0.4`). Overrides `Accept`; without it, an `Accept` preferring `text/plain` over JSON selects the exposition. */\n format?: \"json\" | \"prometheus\";\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: QueueDemandList | string;\n 400: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n };\n };\n /** What this API exposes and what its backend supports */\n \"GET /meta\": {\n operationId: \"getMeta\";\n params: Record<never, never>;\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: Meta;\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n };\n };\n /** Which actions the caller may perform */\n \"GET /meta/permissions\": {\n operationId: \"getPermissions\";\n params: Record<never, never>;\n query: {\n queue?: string;\n runner?: string;\n /** A WebSocket channel name (`queue/mail`, `queue/mail/job/<encodeURIComponent(id)>`, `runner/nightly`, …): the answer's `channel` then says whether subscribing to it would be authorized. */\n channel?: string;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: Permissions;\n 400: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n };\n };\n /** The OpenAPI 3.1 document for exactly what is routed */\n \"GET /openapi.json\": {\n operationId: \"getOpenApiDocument\";\n params: Record<never, never>;\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n openapi: string;\n [key: string]: unknown;\n };\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n };\n };\n /** Job counts across every reachable queue */\n \"GET /overview\": {\n operationId: \"getOverview\";\n params: Record<never, never>;\n query: {\n /** Deprecated: use `from`/`to`. Minutes back from the current one; at most 1440. Ignored when `from` or `to` is given. */\n minutes?: number;\n from?: number | string;\n to?: number | string;\n resolution?: 1 | 60;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: Overview;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Of the jobs added in a range, how many are in each state now */\n \"GET /overview/added\": {\n operationId: \"getAddedByState\";\n params: Record<never, never>;\n query: {\n from?: number | string;\n to?: number | string;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: AddedByState;\n 400: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"INVALID_ARGUMENT\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"INVALID_ARGUMENT\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"INVALID_ARGUMENT\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n };\n };\n /** The compute providers configured in this process */\n \"GET /providers\": {\n operationId: \"listProviders\";\n params: Record<never, never>;\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: ProviderList;\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n };\n };\n /** A provider's config as a JSON Schema, for a config form */\n \"GET /providers/:id/schema\": {\n operationId: \"getProviderSchema\";\n params: {\n /** The configured provider's id, `name@version~<n>`: from `GET /providers` or a summon status's `summoner.providerId`. `@`, `:` and `~` are URL-safe; percent-encode a scoped name's `/`. */\n id: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: ProviderConfigSchema;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"PROVIDER_NOT_FOUND\"\n | \"PROVIDER_SCHEMA_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"PROVIDER_NOT_FOUND\"\n | \"PROVIDER_SCHEMA_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"PROVIDER_NOT_FOUND\"\n | \"PROVIDER_SCHEMA_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"PROVIDER_NOT_FOUND\"\n | \"PROVIDER_SCHEMA_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Test connection: run a provider's preflight */\n \"POST /providers/:id/validate\": {\n operationId: \"validateProvider\";\n params: {\n /** The configured provider's id, `name@version~<n>`: from `GET /providers` or a summon status's `summoner.providerId`. `@`, `:` and `~` are URL-safe; percent-encode a scoped name's `/`. */\n id: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body:\n | {\n /** How long to wait for the preflight, in ms. Past it the answer is `ok: false` with an `error` of kind `transient` and detail `\"timeout\"`, and the preflight's signal aborts. A request that joins a run already in flight shares that run's timeout. */\n timeoutMs?: number;\n }\n | undefined;\n responses: {\n 200: ProviderValidation;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"PROVIDER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"PROVIDER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"PROVIDER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"PROVIDER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"PROVIDER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"PROVIDER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Every reachable queue, at a glance */\n \"GET /queues\": {\n operationId: \"listQueues\";\n params: Record<never, never>;\n query: {\n /** A substring of the queue name, ignoring case. */\n search?: string;\n /** Matching queues skipped, in name order. */\n offset?: number;\n /** Queues summarised; at most 500 (`limits.maxQueues`). */\n limit?: number;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n items: QueueSummary[];\n /** Whether more queues follow this page: `page.hasMore`. */\n truncated: boolean;\n page: PageInfo;\n };\n 400: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n };\n };\n /** One queue: counts, paused flag and limits */\n \"GET /queues/:queue\": {\n operationId: \"getQueue\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: QueueDetail;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** One queue's throughput, over a range */\n \"GET /queues/:queue/analytics/jobs\": {\n operationId: \"getQueueJobsAnalytics\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: {\n from?: number | string;\n to?: number | string;\n resolution?: 1 | 60;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: JobsSeries;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** One worker key's throughput and busyness, over a range */\n \"GET /queues/:queue/analytics/workers/:key\": {\n operationId: \"getWorkerAnalytics\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A worker id or stable key: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n key: string;\n };\n query: {\n from?: number | string;\n to?: number | string;\n resolution?: 1 | 60;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: WorkerAnalytics;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Remove jobs in one state older than a cutoff */\n \"POST /queues/:queue/clean\": {\n operationId: \"cleanQueue\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n state:\n | \"completed\"\n | \"failed\"\n | \"dead\"\n | \"waiting\"\n | \"delayed\"\n | \"waiting-children\";\n /** Only jobs older than this many milliseconds. */\n olderThan: number;\n limit?: number;\n };\n responses: {\n 200: {\n count: number;\n ids: string[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Jobs per state in one queue */\n \"GET /queues/:queue/counts\": {\n operationId: \"getQueueCounts\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: JobCounts;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Of one queue's jobs added in a range, how many are in each state now */\n \"GET /queues/:queue/counts/added\": {\n operationId: \"getQueueAddedByState\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: {\n from?: number | string;\n to?: number | string;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: AddedByState;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** How much work one queue has for a worker: the depth a scaler polls */\n \"GET /queues/:queue/demand\": {\n operationId: \"getQueueDemand\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: {\n /** `json` for the JSON body, `prometheus` for the Prometheus text exposition (`text/plain; version=0.0.4`). Overrides `Accept`; without it, an `Accept` preferring `text/plain` over JSON selects the exposition. */\n format?: \"json\" | \"prometheus\";\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: QueueDemand | string;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Drop the queue's pending jobs */\n \"POST /queues/:queue/drain\": {\n operationId: \"drainQueue\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body:\n | {\n /** Also drop delayed jobs. */\n delayed?: boolean;\n }\n | undefined;\n responses: {\n 200: {\n count: number;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Add a flow: a job and the jobs it waits on */\n \"POST /queues/:queue/flows\": {\n operationId: \"addFlow\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: AddFlowNode;\n responses: {\n 200: AddFlowResult;\n 201: AddFlowResult;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** The queue's job defaults: effective, code and stored override */\n \"GET /queues/:queue/job-defaults\": {\n operationId: \"getJobDefaults\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: JobDefaults;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Merge settings into the queue's stored job defaults */\n \"PUT /queues/:queue/job-defaults\": {\n operationId: \"setJobDefaults\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: JobDefaultsBody;\n responses: {\n 200: JobDefaults;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Clear the queue's stored job defaults */\n \"DELETE /queues/:queue/job-defaults\": {\n operationId: \"resetJobDefaults\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: {\n /** The `seq` last read. Answered 409 CONTROL_CONTENDED when it no longer matches, and nothing is reset. */\n expectedSeq?: number;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: JobDefaults;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Rewrite pending jobs with the stored job defaults */\n \"POST /queues/:queue/job-defaults/apply\": {\n operationId: \"applyJobDefaults\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n /** The override version being applied: the `seq` the user confirmed. 409 DEFAULTS_CHANGED when the stored override has moved on. */\n seq: number;\n /** Which overridden keys to write. Defaults to every key the override sets; one it does not set is 400 INVALID_ARGUMENT. */\n keys?: (\n | \"attempts\"\n | \"backoff\"\n | \"timeout\"\n | \"priority\"\n | \"removeOnComplete\"\n | \"removeOnFail\"\n | \"keepLogs\"\n | \"keepStacktraces\"\n )[];\n /** Which states to walk, in this order. Defaults to waiting, delayed, failed, waiting-children; a repeat is 400 INVALID_ARGUMENT. */\n states?: (\"waiting\" | \"delayed\" | \"failed\" | \"waiting-children\")[];\n /** Most jobs to examine in this call; at most 1000 (`limits.maxApplyDefaults`). */\n limit?: number;\n /** The previous call's `next`, to continue the walk. Opaque; one this walk did not issue is 400 INVALID_ARGUMENT. */\n cursor?: string;\n /** Examine and count exactly as a real call, write nothing. */\n dryRun?: boolean;\n /** Also rewrite jobs added before bun-jobs recorded which options were explicit, treating every option of theirs as defaulted. */\n includeUnmarked?: boolean;\n };\n responses: {\n 200: ApplyJobDefaultsResult;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DEFAULTS_CHANGED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DEFAULTS_CHANGED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DEFAULTS_CHANGED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DEFAULTS_CHANGED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DEFAULTS_CHANGED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DEFAULTS_CHANGED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DEFAULTS_CHANGED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** A page of the queue's jobs */\n \"GET /queues/:queue/jobs\": {\n operationId: \"listJobs\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: {\n /** States to list; every state when absent. */\n state?: JobState[];\n /** The previous page's `page.next`, to continue the walk at the job after the last one you were shown. **Opaque — never build or parse one**: it holds the backend's ordering key, and the backends do not agree on it. One this route did not issue, or one belonging to another queue, other states, the other sort or the other order, is 400 `INVALID_ARGUMENT`, never a silent restart at page one. Takes precedence over `offset`. Unlike an offset it cannot jump to page N — it walks — and unlike an offset nothing shifts under it when a job leaves the list ahead of it. Refused for `state=active` on its own in the natural order; see the route description. */\n cursor?: string;\n /** Matching jobs to skip. This is how a client jumps to page N and *samples* a list; `cursor` is how it *walks* one without losing a job to another leaving the list meanwhile. Ignored when `cursor` is sent. */\n offset?: number;\n limit?: number;\n /** `asc` is the order `sort` names, `desc` its reverse: newest first is `order=desc`, with either sort. */\n order?: \"asc\" | \"desc\";\n /** `natural` (the default) is each state's own order: `waiting` by priority then `createdAt` (claim order), `delayed` and `failed` by `runAt`, `active` by lock expiry, `completed` and `dead` by `finishedOn`, `waiting-children` by `createdAt`; several states, or none named, by `createdAt`. `createdAt` orders by creation time whatever the states, ties within a millisecond by `id`. It is served only where `features.addedByState` is true (memory, SQL, MongoDB); elsewhere it is 400 `INVALID_ARGUMENT`, never a page silently in the natural order. On SQL and MongoDB a page of one large state sorted by `createdAt` is a top-N sort over every job of that state. */\n sort?: \"natural\" | \"createdAt\";\n include?: (\"data\" | \"returnValue\" | \"stacktrace\" | \"opts\")[];\n /** Only jobs with this name, exactly. Repeat the key, or comma-separate, for several. */\n name?: string[];\n /** Only jobs whose id or name contains this, ignoring case. Matched literally, never against the payload, and linear in the jobs in the states asked for. */\n search?: string;\n /** Only jobs whose last attempt was run by a worker with one of these stable keys (`processedBy.key`), exactly. Repeat the key, or comma-separate, for several; at most 100. Matched within the states and range asked for, not through an index of its own: pair it with `finishedFrom`/`finishedTo`. */\n workerKey?: string[];\n /** Only jobs whose last attempt was run by one of these incarnations (`processedBy.id`), exactly. Repeatable like `workerKey`; at most 100. */\n workerId?: string[];\n finishedFrom?: number | string;\n finishedTo?: number | string;\n /** Also count every job that matched. Costs a full count on a filtered read. */\n total?: boolean;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: JobPage;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Add a job */\n \"POST /queues/:queue/jobs\": {\n operationId: \"addJob\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n name: string;\n /** The payload. JSON; `null` is allowed. */\n data: unknown;\n /** Repeat, debounce, throttle, dead-letter, retention and flow options are not accepted over HTTP. */\n opts?: {\n /** A new job's id, at most 191 characters. bun-jobs may still refuse it (400 INVALID_ARGUMENT): control characters, a leading \".\", a lone surrogate, or more than 191 UTF-16 units. */\n jobId?: string;\n priority?: number;\n delay?: number;\n runAt?: number | string;\n attempts?: number;\n backoff?: number;\n timeout?: number;\n };\n };\n responses: {\n 200: {\n /** `false` when `jobId` matched an existing job, which is returned. */\n added: boolean;\n job: Job;\n };\n 201: {\n /** `false` when `jobId` matched an existing job, which is returned. */\n added: boolean;\n job: Job;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"NAME_NOT_ADDABLE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** One job */\n \"GET /queues/:queue/jobs/:id\": {\n operationId: \"getJob\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A job id, at most 1024 characters. Percent-encode it in a path: `/` is `%2F`. */\n id: string;\n };\n query: {\n include?: (\"data\" | \"returnValue\" | \"stacktrace\" | \"opts\")[];\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: Job;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Change a stored job's data, priority or run time */\n \"PATCH /queues/:queue/jobs/:id\": {\n operationId: \"updateJob\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A job id, at most 1024 characters. Percent-encode it in a path: `/` is `%2F`. */\n id: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n /** The new payload. */\n data?: unknown;\n priority?: number;\n runAt?: number | string;\n onlyIn?: JobState[];\n };\n responses: {\n 200: Job;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SERIALIZATION\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Remove a job */\n \"DELETE /queues/:queue/jobs/:id\": {\n operationId: \"removeJob\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A job id, at most 1024 characters. Percent-encode it in a path: `/` is `%2F`. */\n id: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 204: undefined;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** A job's place in a flow: its parent, and each child with its outcome */\n \"GET /queues/:queue/jobs/:id/children\": {\n operationId: \"getJobChildren\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A job id, at most 1024 characters. Percent-encode it in a path: `/` is `%2F`. */\n id: string;\n };\n query: {\n include?: (\"data\" | \"returnValue\" | \"stacktrace\" | \"opts\")[];\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n parent: JobRef | null;\n pending: number;\n children: {\n queue: string;\n id: string;\n job: Job | null;\n value?: unknown;\n failure?: Error;\n }[];\n truncated: boolean;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Fail a job for good */\n \"POST /queues/:queue/jobs/:id/fail\": {\n operationId: \"failJob\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A job id, at most 1024 characters. Percent-encode it in a path: `/` is `%2F`. */\n id: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n /** Why the job is failed; becomes its `failedReason` message exactly as sent. It must contain a character other than whitespace. */\n reason: string;\n };\n responses: {\n 200: {\n failed: true;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** A page of a job's log lines */\n \"GET /queues/:queue/jobs/:id/logs\": {\n operationId: \"getJobLogs\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A job id, at most 1024 characters. Percent-encode it in a path: `/` is `%2F`. */\n id: string;\n };\n query: {\n offset?: number;\n limit?: number;\n order?: \"asc\" | \"desc\";\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n items: string[];\n page: PageInfo;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Empty a job's log */\n \"DELETE /queues/:queue/jobs/:id/logs\": {\n operationId: \"clearJobLogs\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A job id, at most 1024 characters. Percent-encode it in a path: `/` is `%2F`. */\n id: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n /** How many lines were removed: what the log held a moment before, so `0` for a job that had logged nothing. */\n removed: number;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_ACTIVE\"\n | \"JOB_NOT_FOUND\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Make a delayed or retry-pending job claimable now */\n \"POST /queues/:queue/jobs/:id/promote\": {\n operationId: \"promoteJob\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A job id, at most 1024 characters. Percent-encode it in a path: `/` is `%2F`. */\n id: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: unknown;\n responses: {\n 200: {\n promoted: true;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Return a finished job to the queue */\n \"POST /queues/:queue/jobs/:id/retry\": {\n operationId: \"retryJob\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A job id, at most 1024 characters. Percent-encode it in a path: `/` is `%2F`. */\n id: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body:\n | {\n resetAttempts?: boolean;\n }\n | undefined;\n responses: {\n 200: {\n retried: true;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"JOB_NOT_FOUND\"\n | \"JOB_STATE_CONFLICT\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Several jobs by id, in the order asked */\n \"POST /queues/:queue/jobs/lookup\": {\n operationId: \"lookupJobs\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n /** At most 1000 ids; more is 400 BULK_LIMIT. */\n ids: string[];\n include?: (\"data\" | \"returnValue\" | \"stacktrace\" | \"opts\")[];\n };\n responses: {\n 200: {\n items: (Job | null)[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Make several delayed jobs claimable now */\n \"POST /queues/:queue/jobs/promote\": {\n operationId: \"promoteJobs\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n /** At most 1000 ids; more is 400 BULK_LIMIT. */\n ids: string[];\n };\n responses: {\n 200: {\n promoted: string[];\n skipped: string[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Remove several jobs */\n \"POST /queues/:queue/jobs/remove\": {\n operationId: \"removeJobs\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n /** At most 1000 ids; more is 400 BULK_LIMIT. */\n ids: string[];\n };\n responses: {\n 200: {\n removed: string[];\n skipped: string[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Return several finished jobs to the queue */\n \"POST /queues/:queue/jobs/retry\": {\n operationId: \"retryJobs\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n /** At most 1000 ids; more is 400 BULK_LIMIT. */\n ids: string[];\n resetAttempts?: boolean;\n };\n responses: {\n 200: {\n retried: string[];\n skipped: string[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"BULK_LIMIT\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Re-drive every finished job in a state that matches */\n \"POST /queues/:queue/jobs/retry-all\": {\n operationId: \"retryAllJobs\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n state: \"dead\" | \"failed\" | \"completed\";\n name?: string;\n /** A substring of the last failure, as \"<error name>: <message>\". Patterns are not accepted. */\n reason?: string;\n limit?: number;\n resetAttempts?: boolean;\n };\n responses: {\n 200: {\n count: number;\n /** The first 1000 ids retried. */\n ids: string[];\n truncated: boolean;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"OPERATION_IN_PROGRESS\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** The queue's stored limits, or null */\n \"GET /queues/:queue/limits\": {\n operationId: \"getQueueLimits\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: QueueLimits | null;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Replace the queue's limits */\n \"PUT /queues/:queue/limits\": {\n operationId: \"setQueueLimits\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n rate?: {\n max: number;\n duration: number | string;\n };\n concurrency?: number;\n names?: Record<\n string,\n {\n rate?: {\n max: number;\n duration: number | string;\n };\n concurrency?: number;\n }\n >;\n };\n responses: {\n 200: QueueLimits | null;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Remove the queue's limits */\n \"DELETE /queues/:queue/limits\": {\n operationId: \"removeQueueLimits\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: QueueLimits | null;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"LIMITS_CONTENDED\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Stop every worker in every process claiming from the queue */\n \"POST /queues/:queue/pause\": {\n operationId: \"pauseQueue\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: unknown;\n responses: {\n 200: {\n paused: boolean;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** The queue's repeat series */\n \"GET /queues/:queue/repeatables\": {\n operationId: \"listRepeatables\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: {\n include?: \"data\"[];\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n items: Repeatable[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Remove a repeat series and the occurrence it had scheduled */\n \"DELETE /queues/:queue/repeatables/:key\": {\n operationId: \"removeRepeatable\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n key: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 204: undefined;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Stop a repeat series without removing it */\n \"POST /queues/:queue/repeatables/:key/disable\": {\n operationId: \"disableRepeatable\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n key: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: unknown;\n responses: {\n 200: {\n disabled: true;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Restart a disabled repeat series */\n \"POST /queues/:queue/repeatables/:key/enable\": {\n operationId: \"enableRepeatable\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n key: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: unknown;\n responses: {\n 200: {\n enabled: true;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"REPEATABLE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Let workers claim from the queue again */\n \"POST /queues/:queue/resume\": {\n operationId: \"resumeQueue\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: unknown;\n responses: {\n 200: {\n paused: boolean;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** A queue's summon status: attempts in flight, failures, circuit, budget */\n \"GET /queues/:queue/summon\": {\n operationId: \"getQueueSummon\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: SummonStatus;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 503: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Summon now: run one summon check at once */\n \"POST /queues/:queue/summon\": {\n operationId: \"summonQueue\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body:\n | {\n /** Skip the cooldown. Defaults to `true`: \"summon now\" means now. Never skips the circuit, the budget, the attempts already on their way, or the compare-and-set that keeps two controllers from summoning twice. */\n force?: boolean;\n }\n | undefined;\n responses: {\n 200: SummonCheck;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 503: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Clear a queue's summon failures, backoff and open circuit */\n \"POST /queues/:queue/summon/reset\": {\n operationId: \"resetQueueSummon\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body:\n | {\n /** Also clear the queue's summon budget usage: the attempts counted this UTC hour and day go to 0, in the same write as the reset. Defaults to `false`. Advertised by `/meta.features.summonResetBudget`. */\n budget?: boolean;\n }\n | undefined;\n responses: {\n 200: SummonStatus;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 503: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Jobs completed and attempts failed, a minute per bucket */\n \"GET /queues/:queue/throughput\": {\n operationId: \"getQueueThroughput\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: {\n /** Deprecated: use `from`/`to`. Minutes back from the current one; at most 1440. Ignored when `from` or `to` is given. */\n minutes?: number;\n from?: number | string;\n to?: number | string;\n resolution?: 1 | 60;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: QueueThroughput;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"RANGE_NOT_RETAINED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Every configuration override stored on the queue */\n \"GET /queues/:queue/worker-configs\": {\n operationId: \"listWorkerConfigs\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n items: WorkerConfigOverride[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Merge settings into one stable key's override */\n \"PUT /queues/:queue/worker-configs/:key\": {\n operationId: \"configureWorker\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A worker id or stable key: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n key: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: WorkerConfigBody;\n responses: {\n 200: WorkerConfigResult;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Drop one stable key's override entirely */\n \"DELETE /queues/:queue/worker-configs/:key\": {\n operationId: \"resetWorkerConfig\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A worker id or stable key: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n key: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: WorkerConfigResult;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CONTROL_CONTENDED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** The workers consuming this queue, in any process */\n \"GET /queues/:queue/workers\": {\n operationId: \"listQueueWorkers\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n };\n query: {\n /** Only workers in these services. */\n service?: string[];\n /** Only workers on these hosts. Refused 400 INVALID_ARGUMENT when `serialize.exposeHosts` is off. */\n host?: string[];\n /** Only workers in these states. A worker that reports none is matched as `paused` or `running`, from its `paused` flag. */\n state?: WorkerState[];\n /** Only workers with these stable keys. */\n key?: string[];\n /** Also report stored overrides whose worker is no longer live, as `offline`. */\n includeOffline?: boolean;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n items: Worker[];\n /** Stored overrides with no live worker; present only when `includeOffline` was asked for. */\n offline?: WorkerConfigOverride[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** One worker, by its incarnation id */\n \"GET /queues/:queue/workers/:worker\": {\n operationId: \"getWorker\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A worker id or stable key: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n worker: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: Worker;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_FOUND\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_FOUND\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_FOUND\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_FOUND\";\n };\n 410: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_FOUND\";\n };\n };\n };\n /** Stop the worker claiming new jobs */\n \"POST /queues/:queue/workers/:worker/pause\": {\n operationId: \"pauseWorker\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A worker id or stable key: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n worker: string;\n };\n query: {\n /** Wait up to this many ms for the worker to acknowledge. `0` (the default) stores the instruction and answers 202 at once. At most 30000. */\n wait?: number;\n };\n headers: Record<never, never>;\n body: WorkerControlBody | undefined;\n responses: {\n 200: WorkerControlResult;\n 202: WorkerControlResult;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 410: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n };\n };\n /** Let a paused worker claim again */\n \"POST /queues/:queue/workers/:worker/resume\": {\n operationId: \"resumeWorker\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A worker id or stable key: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n worker: string;\n };\n query: {\n /** Wait up to this many ms for the worker to acknowledge. `0` (the default) stores the instruction and answers 202 at once. At most 30000. */\n wait?: number;\n };\n headers: Record<never, never>;\n body: WorkerControlBody | undefined;\n responses: {\n 200: WorkerControlResult;\n 202: WorkerControlResult;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 410: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n };\n };\n /** Bring a parked worker back, clearing any pause */\n \"POST /queues/:queue/workers/:worker/start\": {\n operationId: \"startWorker\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A worker id or stable key: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n worker: string;\n };\n query: {\n /** Wait up to this many ms for the worker to acknowledge. `0` (the default) stores the instruction and answers 202 at once. At most 30000. */\n wait?: number;\n };\n headers: Record<never, never>;\n body: WorkerControlBody | undefined;\n responses: {\n 200: WorkerControlResult;\n 202: WorkerControlResult;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 410: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n };\n };\n /** Park the worker: drain its jobs and stop claiming */\n \"POST /queues/:queue/workers/:worker/stop\": {\n operationId: \"stopWorker\";\n params: {\n /** A queue name: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n queue: string;\n /** A worker id or stable key: letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n worker: string;\n };\n query: {\n /** Wait up to this many ms for the worker to acknowledge. `0` (the default) stores the instruction and answers 202 at once. At most 30000. */\n wait?: number;\n };\n headers: Record<never, never>;\n body: WorkerControlBody | undefined;\n responses: {\n 200: WorkerControlResult;\n 202: WorkerControlResult;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 410: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"QUEUE_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\"\n | \"WORKER_GONE\"\n | \"WORKER_NOT_CONTROLLABLE\"\n | \"WORKER_NOT_FOUND\"\n | \"WORKER_PERSISTENCE_NOT_ALLOWED\"\n | \"WORKER_STATE_CONFLICT\";\n };\n };\n };\n /** Every runner in the namespace */\n \"GET /runners\": {\n operationId: \"listRunners\";\n params: Record<never, never>;\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n items: {\n id: string;\n /** Registered in this process. Every runner can be read, triggered, paused, resumed and rescheduled; only a local one can be killed or have its stats reset. */\n isLocal: boolean;\n /**\n * Deprecated: the same as `isLocal`, which matches the runner detail's name. Still sent; removed in a future major version.\n *\n * @deprecated\n */\n local: boolean;\n name?: string;\n /** The runner's lifecycle in its own process: `idle` = registered, not started; `running` = started with its schedule armed (a run may or may not be in flight: see `isRunning`); `paused`; `stopped`. */\n status?: \"idle\" | \"running\" | \"paused\" | \"stopped\";\n /** Paused, from the backend: the same from every process, local or not. */\n isPaused: boolean;\n /** A run is in flight anywhere, from the backend's lock. `status: \"running\"` means only that the runner is started with its schedule armed. */\n isRunning: boolean;\n }[];\n };\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n };\n };\n /** One runner: schedule, state, lock holder, counters and last run */\n \"GET /runners/:runner\": {\n operationId: \"getRunner\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: RunnerInfo;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** One runner's runs by outcome and its durations, over a range */\n \"GET /runners/:runner/analytics\": {\n operationId: \"getRunnerAnalytics\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: {\n from?: number | string;\n to?: number | string;\n resolution?: 1 | 60;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: RunnerAnalytics;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RANGE_NOT_RETAINED\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RANGE_NOT_RETAINED\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RANGE_NOT_RETAINED\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RANGE_NOT_RETAINED\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Override the runner's executor and overlap settings */\n \"PUT /runners/:runner/config\": {\n operationId: \"configureRunner\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: RunnerConfigBody;\n responses: {\n 200: RunnerConfig;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Drop every override, back to what the runner's code asks for */\n \"DELETE /runners/:runner/config\": {\n operationId: \"resetRunnerConfig\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: RunnerConfig;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CONFIG_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_CONFIGURABLE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** A page of the runner's runs, newest first, from any process */\n \"GET /runners/:runner/history\": {\n operationId: \"getRunnerHistory\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: {\n /** The previous page's `page.next`, to continue the walk at the record after the last one you were shown. **Opaque — never build or parse one**: it holds the backend's ordering key, and the backends do not agree on it. One this route did not issue, or one belonging to another runner or the other `order`, is 400 `INVALID_ARGUMENT`, never a silent restart at page one. Takes precedence over `offset`. Unlike an offset it cannot jump to page N — it walks — and unlike an offset nothing shifts under it when a run starts between two requests. */\n cursor?: string;\n /** Records skipped before the page. Deliberately uncapped: `keepHistory` may store far more runs than `limits.maxHistory`, and paging is what makes every one of them reachable. This is how a client jumps to page N; `cursor` is how it walks the list without losing a record to a run starting meanwhile. Ignored when `cursor` is sent. */\n offset?: number;\n /** Records on the page, at most `limits.maxHistory`. The cap bounds a **page**, not how far back you can read — ask for more and it is 400 `VALIDATION`, never a silently shortened page. */\n limit?: number;\n /** By start time: `desc` — the default, and the only order served before paging existed — is newest first; `asc` is oldest first. The same list, paged from opposite ends. */\n order?: \"asc\" | \"desc\";\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n items: RunRecord[];\n page: PageInfo;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_ARGUMENT\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Remove the runner's finished runs, keeping those in progress */\n \"DELETE /runners/:runner/history\": {\n operationId: \"clearRunnerHistory\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: {\n /** How long, in milliseconds, a run whose record still says `running` counts as in progress when nothing else vouches for it — neither this process executing it nor the runner's live lock holder. Older, it is taken for a run whose process crashed and is removed. Defaults to one day, which is also the minimum: raise it for runners whose runs legitimately last longer. At most thirty days. */\n staleAfter?: number;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n /** How many runs were removed, each with its record and its log. */\n removed: number;\n /** The runs left in place because they are still in progress, newest first. `[]` when nothing was running. */\n kept: string[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Kill one run, or every active run, in this process */\n \"POST /runners/:runner/kill\": {\n operationId: \"killRunner\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body:\n | {\n /** One run; every active run when absent. */\n runId?: string;\n /** Skip straight to the end of the kill escalation. */\n force?: boolean;\n reason?: string;\n /** Answer only once the runs have settled (200), instead of at once (202). */\n wait?: boolean;\n }\n | undefined;\n responses: {\n 200: {\n runIds: string[];\n };\n 202: {\n runIds: string[];\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Pause the runner everywhere */\n \"POST /runners/:runner/pause\": {\n operationId: \"pauseRunner\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: unknown;\n responses: {\n 200: {\n paused: boolean;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Resume the runner everywhere */\n \"POST /runners/:runner/resume\": {\n operationId: \"resumeRunner\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body:\n | {\n /** Also ask for a run straight away. */\n triggerNow?: boolean;\n }\n | undefined;\n responses: {\n 200: {\n paused: boolean;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** A page of one run's captured output */\n \"GET /runners/:runner/runs/:runId/logs\": {\n operationId: \"getRunLogs\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n /** A run id, at most 200 characters. Percent-encode it in a path. */\n runId: string;\n };\n query: {\n /** Only lines numbered **above** this — an exclusive lower bound on `seq`. Send back the previous page's `lastSeq` to tail without repeating or skipping a line. */\n since?: number;\n /** Lines skipped, within what `since` and `stream` leave. */\n offset?: number;\n limit?: number;\n order?: \"asc\" | \"desc\";\n /** Only lines from this stream; every stream when absent. */\n stream?: \"stdout\" | \"stderr\" | \"log\";\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: RunLogPage;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"LOGS_NOT_RETAINED\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"LOGS_NOT_RETAINED\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"LOGS_NOT_RETAINED\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"LOGS_NOT_RETAINED\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"LOGS_NOT_RETAINED\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUN_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Replace and persist the runner's schedule */\n \"PUT /runners/:runner/schedule\": {\n operationId: \"rescheduleRunner\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: {\n schedule:\n | string\n | number\n | {\n cron: string;\n tz?: string;\n }\n | {\n every: number;\n anchor?: number | string;\n }\n | {\n at: number | string;\n }\n | null;\n };\n responses: {\n 200: {\n schedule: RunnerSchedule;\n nextRunAt: number | null;\n };\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"INVALID_SCHEDULE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"INVALID_SCHEDULE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"INVALID_SCHEDULE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"INVALID_SCHEDULE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"INVALID_SCHEDULE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"INVALID_SCHEDULE\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** The runner's lifetime counters, shared by every process */\n \"GET /runners/:runner/stats\": {\n operationId: \"getRunnerStats\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: RunnerStats;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"RUNNER_NOT_FOUND\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Reset the runner's counters to zero */\n \"POST /runners/:runner/stats/reset\": {\n operationId: \"resetRunnerStats\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: unknown;\n responses: {\n 204: undefined;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_NOT_LOCAL\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Ask for a run */\n \"POST /runners/:runner/trigger\": {\n operationId: \"triggerRunner\";\n params: {\n /** Letters, digits, \"_\", \".\" and \"-\", and not \".\" or \"..\". Anything else is 400 INVALID_NAME. */\n runner: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body:\n | {\n /** Run even while paused. */\n force?: boolean;\n /** Arguments for the run. Refused (400 ARGS_NOT_ALLOWED) unless the API was created with `runnerTriggerArgs: true`. */\n args?: unknown;\n }\n | undefined;\n responses: {\n 200: TriggerOutcome;\n 202: TriggerOutcome;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"ARGS_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_STOPPED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"ARGS_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_STOPPED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"ARGS_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_STOPPED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 404: Omit<Problem, \"code\"> & {\n code:\n | \"ARGS_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_STOPPED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"ARGS_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_STOPPED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"ARGS_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_STOPPED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"ARGS_NOT_ALLOWED\"\n | \"CSRF_REJECTED\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"RUNNER_NOT_FOUND\"\n | \"RUNNER_STOPPED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Every summoning queue the API can read, with its budget usage and circuit */\n \"GET /summon\": {\n operationId: \"listSummonControllers\";\n params: Record<never, never>;\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: SummonList;\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n };\n };\n /** Every summon group: its shared budget usage and circuits */\n \"GET /summon/groups\": {\n operationId: \"listSummonGroups\";\n params: Record<never, never>;\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: SummonGroupList;\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"UNAUTHORIZED\";\n };\n };\n };\n /** A summon group's shared budget usage and circuits */\n \"GET /summon/groups/:group\": {\n operationId: \"getSummonGroup\";\n params: {\n /** A summon group's name (`SummonPolicy.group.name`): letters, digits, \"_\", \".\" and \"-\", and not \".\", \"..\" or the reserved \"__bunjobs\". Anything else is 400 INVALID_NAME. */\n group: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: SummonGroupStatus;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n 503: Omit<Problem, \"code\"> & {\n code:\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_NAME\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"VALIDATION\";\n };\n };\n };\n /** Clear a summon group's shared circuit or budget usage */\n \"POST /summon/groups/:group/reset\": {\n operationId: \"resetSummonGroup\";\n params: {\n /** A summon group's name (`SummonPolicy.group.name`): letters, digits, \"_\", \".\" and \"-\", and not \".\", \"..\" or the reserved \"__bunjobs\". Anything else is 400 INVALID_NAME. */\n group: string;\n };\n query: Record<never, never>;\n headers: Record<never, never>;\n body:\n | {\n /** Close the group's shared circuit, for every provider kind, and clear its counts. Defaults to `false`. */\n circuit?: boolean;\n /** Clear the group's budget usage: its attempts this UTC hour and day, and every queue's share, go to 0. Defaults to `false`. */\n budget?: boolean;\n }\n | undefined;\n responses: {\n 200: SummonGroupStatus;\n 400: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 409: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 413: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 415: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n 503: Omit<Problem, \"code\"> & {\n code:\n | \"CSRF_REJECTED\"\n | \"DRIVER_ERROR\"\n | \"FORBIDDEN\"\n | \"INVALID_JSON\"\n | \"INVALID_NAME\"\n | \"PAYLOAD_TOO_LARGE\"\n | \"SUMMON_MARKER_CONTENDED\"\n | \"SUMMON_NOT_CONFIGURED\"\n | \"UNAUTHORIZED\"\n | \"UNSUPPORTED_MEDIA_TYPE\"\n | \"VALIDATION\";\n };\n };\n };\n /** Every worker in the namespace */\n \"GET /workers\": {\n operationId: \"listWorkers\";\n params: Record<never, never>;\n query: {\n /** Only workers on these queues. */\n queue?: string[];\n /** Only workers in these services. */\n service?: string[];\n /** Only workers on these hosts. Refused 400 INVALID_ARGUMENT when `serialize.exposeHosts` is off. */\n host?: string[];\n /** Only workers in these states. A worker that reports none is matched as `paused` or `running`, from its `paused` flag. */\n state?: WorkerState[];\n /** Only workers with these stable keys. */\n key?: string[];\n /** Also report stored overrides whose worker is no longer live, as `offline`. */\n includeOffline?: boolean;\n };\n headers: Record<never, never>;\n body: undefined;\n responses: {\n 200: {\n items: Worker[];\n /** Stored overrides with no live worker; present only when `includeOffline` was asked for. */\n offline?: WorkerConfigOverride[];\n };\n 400: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"INVALID_ARGUMENT\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 401: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"INVALID_ARGUMENT\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n 403: Omit<Problem, \"code\"> & {\n code: \"FORBIDDEN\" | \"INVALID_ARGUMENT\" | \"UNAUTHORIZED\" | \"VALIDATION\";\n };\n };\n };\n}\n\nexport const manifest = {\n \"GET /analytics/jobs\": {\n operationId: \"getJobsAnalytics\",\n statuses: [200, 400, 401, 403],\n },\n \"GET /analytics/runners\": {\n operationId: \"getRunnersAnalytics\",\n statuses: [200, 400, 401, 403],\n },\n \"GET /analytics/workers\": {\n operationId: \"getWorkersAnalytics\",\n statuses: [200, 400, 401, 403],\n },\n \"GET /asyncapi.json\": {\n operationId: \"getAsyncApiDocument\",\n statuses: [200, 401, 403],\n },\n \"GET /definitions\": {\n operationId: \"listDefinitions\",\n statuses: [200, 401, 403],\n },\n \"GET /demand\": {\n operationId: \"listQueueDemand\",\n statuses: [200, 400, 401, 403],\n },\n \"GET /meta\": { operationId: \"getMeta\", statuses: [200, 401, 403] },\n \"GET /meta/permissions\": {\n operationId: \"getPermissions\",\n statuses: [200, 400, 401, 403],\n },\n \"GET /openapi.json\": {\n operationId: \"getOpenApiDocument\",\n statuses: [200, 401, 403],\n },\n \"GET /overview\": {\n operationId: \"getOverview\",\n statuses: [200, 400, 401, 403],\n },\n \"GET /overview/added\": {\n operationId: \"getAddedByState\",\n statuses: [200, 400, 401, 403],\n },\n \"GET /providers\": { operationId: \"listProviders\", statuses: [200, 401, 403] },\n \"GET /providers/:id/schema\": {\n operationId: \"getProviderSchema\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"POST /providers/:id/validate\": {\n operationId: \"validateProvider\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"GET /queues\": { operationId: \"listQueues\", statuses: [200, 400, 401, 403] },\n \"GET /queues/:queue\": {\n operationId: \"getQueue\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"GET /queues/:queue/analytics/jobs\": {\n operationId: \"getQueueJobsAnalytics\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"GET /queues/:queue/analytics/workers/:key\": {\n operationId: \"getWorkerAnalytics\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"POST /queues/:queue/clean\": {\n operationId: \"cleanQueue\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"GET /queues/:queue/counts\": {\n operationId: \"getQueueCounts\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"GET /queues/:queue/counts/added\": {\n operationId: \"getQueueAddedByState\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"GET /queues/:queue/demand\": {\n operationId: \"getQueueDemand\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"POST /queues/:queue/drain\": {\n operationId: \"drainQueue\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"POST /queues/:queue/flows\": {\n operationId: \"addFlow\",\n statuses: [200, 201, 400, 401, 403, 404, 413, 415],\n },\n \"GET /queues/:queue/job-defaults\": {\n operationId: \"getJobDefaults\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"PUT /queues/:queue/job-defaults\": {\n operationId: \"setJobDefaults\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"DELETE /queues/:queue/job-defaults\": {\n operationId: \"resetJobDefaults\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"POST /queues/:queue/job-defaults/apply\": {\n operationId: \"applyJobDefaults\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"GET /queues/:queue/jobs\": {\n operationId: \"listJobs\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"POST /queues/:queue/jobs\": {\n operationId: \"addJob\",\n statuses: [200, 201, 400, 401, 403, 404, 413, 415],\n },\n \"GET /queues/:queue/jobs/:id\": {\n operationId: \"getJob\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"PATCH /queues/:queue/jobs/:id\": {\n operationId: \"updateJob\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"DELETE /queues/:queue/jobs/:id\": {\n operationId: \"removeJob\",\n statuses: [204, 400, 401, 403, 404, 409, 413, 415],\n },\n \"GET /queues/:queue/jobs/:id/children\": {\n operationId: \"getJobChildren\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"POST /queues/:queue/jobs/:id/fail\": {\n operationId: \"failJob\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"GET /queues/:queue/jobs/:id/logs\": {\n operationId: \"getJobLogs\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"DELETE /queues/:queue/jobs/:id/logs\": {\n operationId: \"clearJobLogs\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"POST /queues/:queue/jobs/:id/promote\": {\n operationId: \"promoteJob\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"POST /queues/:queue/jobs/:id/retry\": {\n operationId: \"retryJob\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"POST /queues/:queue/jobs/lookup\": {\n operationId: \"lookupJobs\",\n statuses: [200, 400, 401, 403, 404, 413],\n },\n \"POST /queues/:queue/jobs/promote\": {\n operationId: \"promoteJobs\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"POST /queues/:queue/jobs/remove\": {\n operationId: \"removeJobs\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"POST /queues/:queue/jobs/retry\": {\n operationId: \"retryJobs\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"POST /queues/:queue/jobs/retry-all\": {\n operationId: \"retryAllJobs\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"GET /queues/:queue/limits\": {\n operationId: \"getQueueLimits\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"PUT /queues/:queue/limits\": {\n operationId: \"setQueueLimits\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"DELETE /queues/:queue/limits\": {\n operationId: \"removeQueueLimits\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"POST /queues/:queue/pause\": {\n operationId: \"pauseQueue\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"GET /queues/:queue/repeatables\": {\n operationId: \"listRepeatables\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"DELETE /queues/:queue/repeatables/:key\": {\n operationId: \"removeRepeatable\",\n statuses: [204, 400, 401, 403, 404, 413, 415],\n },\n \"POST /queues/:queue/repeatables/:key/disable\": {\n operationId: \"disableRepeatable\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"POST /queues/:queue/repeatables/:key/enable\": {\n operationId: \"enableRepeatable\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"POST /queues/:queue/resume\": {\n operationId: \"resumeQueue\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"GET /queues/:queue/summon\": {\n operationId: \"getQueueSummon\",\n statuses: [200, 400, 401, 403, 404, 409, 503],\n },\n \"POST /queues/:queue/summon\": {\n operationId: \"summonQueue\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415, 503],\n },\n \"POST /queues/:queue/summon/reset\": {\n operationId: \"resetQueueSummon\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415, 503],\n },\n \"GET /queues/:queue/throughput\": {\n operationId: \"getQueueThroughput\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"GET /queues/:queue/worker-configs\": {\n operationId: \"listWorkerConfigs\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"PUT /queues/:queue/worker-configs/:key\": {\n operationId: \"configureWorker\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"DELETE /queues/:queue/worker-configs/:key\": {\n operationId: \"resetWorkerConfig\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"GET /queues/:queue/workers\": {\n operationId: \"listQueueWorkers\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"GET /queues/:queue/workers/:worker\": {\n operationId: \"getWorker\",\n statuses: [200, 400, 401, 403, 404, 410],\n },\n \"POST /queues/:queue/workers/:worker/pause\": {\n operationId: \"pauseWorker\",\n statuses: [200, 202, 400, 401, 403, 404, 409, 410, 413, 415],\n },\n \"POST /queues/:queue/workers/:worker/resume\": {\n operationId: \"resumeWorker\",\n statuses: [200, 202, 400, 401, 403, 404, 409, 410, 413, 415],\n },\n \"POST /queues/:queue/workers/:worker/start\": {\n operationId: \"startWorker\",\n statuses: [200, 202, 400, 401, 403, 404, 409, 410, 413, 415],\n },\n \"POST /queues/:queue/workers/:worker/stop\": {\n operationId: \"stopWorker\",\n statuses: [200, 202, 400, 401, 403, 404, 409, 410, 413, 415],\n },\n \"GET /runners\": { operationId: \"listRunners\", statuses: [200, 401, 403] },\n \"GET /runners/:runner\": {\n operationId: \"getRunner\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"GET /runners/:runner/analytics\": {\n operationId: \"getRunnerAnalytics\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"PUT /runners/:runner/config\": {\n operationId: \"configureRunner\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"DELETE /runners/:runner/config\": {\n operationId: \"resetRunnerConfig\",\n statuses: [200, 400, 401, 403, 404, 409, 413, 415],\n },\n \"GET /runners/:runner/history\": {\n operationId: \"getRunnerHistory\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"DELETE /runners/:runner/history\": {\n operationId: \"clearRunnerHistory\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"POST /runners/:runner/kill\": {\n operationId: \"killRunner\",\n statuses: [200, 202, 400, 401, 403, 404, 409, 413, 415],\n },\n \"POST /runners/:runner/pause\": {\n operationId: \"pauseRunner\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"POST /runners/:runner/resume\": {\n operationId: \"resumeRunner\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"GET /runners/:runner/runs/:runId/logs\": {\n operationId: \"getRunLogs\",\n statuses: [200, 400, 401, 403, 404, 409],\n },\n \"PUT /runners/:runner/schedule\": {\n operationId: \"rescheduleRunner\",\n statuses: [200, 400, 401, 403, 404, 413, 415],\n },\n \"GET /runners/:runner/stats\": {\n operationId: \"getRunnerStats\",\n statuses: [200, 400, 401, 403, 404],\n },\n \"POST /runners/:runner/stats/reset\": {\n operationId: \"resetRunnerStats\",\n statuses: [204, 400, 401, 403, 404, 409, 413, 415],\n },\n \"POST /runners/:runner/trigger\": {\n operationId: \"triggerRunner\",\n statuses: [200, 202, 400, 401, 403, 404, 409, 413, 415],\n },\n \"GET /summon\": {\n operationId: \"listSummonControllers\",\n statuses: [200, 401, 403],\n },\n \"GET /summon/groups\": {\n operationId: \"listSummonGroups\",\n statuses: [200, 401, 403],\n },\n \"GET /summon/groups/:group\": {\n operationId: \"getSummonGroup\",\n statuses: [200, 400, 401, 403, 409, 503],\n },\n \"POST /summon/groups/:group/reset\": {\n operationId: \"resetSummonGroup\",\n statuses: [200, 400, 401, 403, 409, 413, 415, 503],\n },\n \"GET /workers\": {\n operationId: \"listWorkers\",\n statuses: [200, 400, 401, 403],\n },\n} as const satisfies RouteManifest<Routes>;\n",
12
+ "import type { Client, ClientMiddleware } from \"@kingsleyweb/bun-client\";\nimport type { Queries } from \"@kingsleyweb/bun-client/query\";\nimport type { ApiClient } from \"./client\";\nimport type { Routes } from \"./routes.gen\";\nimport {\n createClient,\n NetworkError,\n UnexpectedStatusError,\n} from \"@kingsleyweb/bun-client\";\nimport { queries } from \"@kingsleyweb/bun-client/query\";\nimport { errorFromResponse } from \"./client\";\nimport { ApiError, isProblem } from \"./errors\";\nimport { manifest } from \"./routes.gen\";\n\n/**\n * The typed client (`@kingsleyweb/bun-client`, typed-client plan §11): the\n * management API's routes as `routes.gen.ts` types them, generated from the\n * API's own OpenAPI document (`bun run gen:client`; CI runs\n * `bun run check:client`). A domain moved onto it calls routes by their path\n * literal, with typed params, query and body, and reads a result whose\n * error `code` is the route's own union; its query keys come from\n * `./query`.\n *\n * It sends through the app's {@link ApiClient}: the same `fetch` (so a\n * test's mock sees every request), the same headers (`Accept`, the JSON\n * `Content-Type` on every POST/PUT/PATCH, the CSRF header on mutations) and\n * credentials. Retries and timeouts are TanStack Query's and the browser's,\n * as for the rest of the app, so the client adds none of its own. Its\n * failures reach the screens as the app's {@link ApiError}\n * ({@link toApiError}), which the error views, the retry policy and\n * `isApiError` read.\n *\n * The pilot moved the summon domain (`api/summon.ts`); the others still use\n * `ApiClient.request`.\n */\n\n/** The typed client and its query factories, over one {@link ApiClient}. */\nexport interface TypedApi {\n /** The client: `client.get(\"/summon\")`, `client.post(\"/queues/:queue/summon\", …)`. */\n client: Client<Routes>;\n /** The query factories over it: `q.key(\"GET /summon\")`. */\n q: Queries<Routes>;\n}\n\n/** One {@link TypedApi} per app client, built on first use. */\nconst built = new WeakMap<ApiClient, TypedApi>();\n\n/** The {@link TypedApi} sending through `api`. */\nexport function typedApi(api: ApiClient): TypedApi {\n let typed = built.get(api);\n if (typed === undefined) {\n const client = createClient<Routes>({\n baseUrl: api.base,\n manifest,\n fetch: (request) => send(api, request),\n headers: (ctx) => api.headers(ctx.method),\n middleware: [jsonOnly(api)],\n retry: false,\n timeout: false,\n });\n typed = { client, q: queries(client, { manifest }) };\n built.set(api, typed);\n }\n return typed;\n}\n\n/** Sends the client's `Request` through the app's `fetch`, in the `(url, init)` form it takes. */\nasync function send(api: ApiClient, request: Request): Promise<Response> {\n const headers: Record<string, string> = {};\n request.headers.forEach((value, name) => {\n headers[name] = value;\n });\n const init: RequestInit = {\n method: request.method,\n headers,\n credentials: request.credentials,\n signal: request.signal,\n };\n if (request.method !== \"GET\" && request.method !== \"HEAD\") {\n const body = await request.text();\n if (body !== \"\") {\n init.body = body;\n }\n }\n return api.fetch(request.url, init);\n}\n\n/** Whether a `Content-Type` names JSON (`application/json` or any `+json`). */\nfunction isJsonType(contentType: string): boolean {\n const media = contentType.split(\";\")[0]?.trim().toLowerCase() ?? \"\";\n return media === \"application/json\" || media.endsWith(\"+json\");\n}\n\n/**\n * Refuses a 2xx with a body that is not JSON, as `ApiClient.request` does\n * (`parse`, `INVALID_RESPONSE`): a misrouted proxy's HTML page, say. The\n * typed client would otherwise hand the text to a screen typed for JSON.\n */\nfunction jsonOnly(api: ApiClient): ClientMiddleware {\n return async (ctx, next) => {\n const response = await next();\n if (\n !response.ok ||\n response.status === 204 ||\n isJsonType(response.headers.get(\"content-type\") ?? \"\")\n ) {\n return response;\n }\n const text = await response.clone().text();\n if (text === \"\") {\n return response;\n }\n throw new ApiError({\n kind: \"parse\",\n status: response.status,\n code: \"INVALID_RESPONSE\",\n title: \"The API answered something other than JSON\",\n detail: text.trim().slice(0, 300) || undefined,\n instance: instanceOf(api, ctx.request.url),\n });\n };\n}\n\n/** The path a request was for, under the API base, as an {@link ApiError}'s `instance`. */\nexport function instanceOf(api: ApiClient, url: string): string {\n const { pathname } = new URL(url, \"http://localhost\");\n return pathname.startsWith(api.base)\n ? pathname.slice(api.base.length)\n : pathname;\n}\n\n/** A failed answer the typed client resolved: a declared error status. */\ninterface Failed {\n /** Always `false`. */\n ok: false;\n /** The status. */\n status: number;\n /** The parsed body. */\n error: unknown;\n /** The response, its body read. */\n response: Response;\n}\n\n/**\n * The app's {@link ApiError} for a declared error status the typed client\n * resolved: the problem's fields when the body is a problem, else an `http`\n * error for the status.\n */\nexport function failedError(failed: Failed, instance: string): ApiError {\n if (isProblem(failed.error)) {\n // As `ApiClient.request` builds one: the problem's fields, verbatim.\n return ApiError.fromProblem({ ...failed.error, status: failed.status });\n }\n return new ApiError({\n kind: \"http\",\n status: failed.status,\n code: `HTTP_${failed.status}`,\n title: failed.response.statusText || `Request failed (${failed.status})`,\n ...(typeof failed.error === \"string\" && failed.error.trim() !== \"\"\n ? { detail: failed.error.trim().slice(0, 300) }\n : {}),\n instance,\n });\n}\n\n/**\n * Turns what the typed client threw into what the rest of the app throws:\n * an undeclared status (its body still unread) as the {@link ApiError}\n * `ApiClient.request` would have built from it, and a failed `fetch` as a\n * `network` one. Anything else (an abort above all, or the app's own\n * {@link ApiError} from {@link jsonOnly}) is returned as it is.\n */\nexport async function toApiError(\n error: unknown,\n instance: string,\n): Promise<unknown> {\n if (error instanceof UnexpectedStatusError) {\n const text = await error.response.text().catch(() => \"\");\n return errorFromResponse(error.response, text, instance);\n }\n if (error instanceof NetworkError) {\n const cause = error.cause;\n return new ApiError({\n kind: \"network\",\n status: 0,\n code: \"NETWORK_ERROR\",\n title: \"The API could not be reached\",\n detail: cause instanceof Error ? cause.message : String(cause),\n instance,\n cause,\n });\n }\n return error;\n}\n\n/** A typed call's success, or a thrown {@link ApiError}: what a query function resolves. */\nexport async function dataOf<T extends { ok: true; data: unknown } | Failed>(\n call: Promise<T>,\n instance: string,\n): Promise<Extract<T, { ok: true }>[\"data\"]> {\n let result: T;\n try {\n result = await call;\n } catch (error) {\n throw await toApiError(error, instance);\n }\n if (result.ok) {\n return result.data;\n }\n throw failedError(result, instance);\n}\n",
13
+ "import type { ApiClient } from \"./client\";\nimport type { SummonResetBody } from \"./types\";\nimport { checkShape, isRecord } from \"./shape\";\nimport { dataOf, failedError, toApiError, typedApi } from \"./typed\";\n\n/**\n * Summoning: `GET /queues/:queue/summon` (a queue's status), the two opt-in\n * writes, \"summon now\" and reset (`queues.summon`), and `GET /summon`, every\n * controller in the API's process.\n *\n * `/meta` has no flag for one queue's summoning: the status answers only\n * where a summon controller for the queue runs in the API's process, and 409\n * `SUMMON_NOT_CONFIGURED` everywhere else. So the status read itself is what\n * decides whether a queue has anything to show, and a queue without a\n * summoner reads as `null` rather than as a failure.\n *\n * `features.summonList` says `GET /summon` is served: on wherever the summon\n * routes are (jobs mode), off in runner mode and absent on an older API. Its\n * action is `queues.list`; each controller is then listed only where the\n * caller may read its queue (`queues.read`), so a caller without that sees\n * `{ controllers: [] }`.\n *\n * The domain the typed-client pilot moved onto `@kingsleyweb/bun-client`\n * (`./typed.ts`): every call is typed by the generated route map, params,\n * body and result alike, with no asserted type, and the keys are the query\n * layer's (`[routeKey, { params, query }]`). The few fields a screen cannot\n * draw without are still checked at run time ({@link checkShape}): the\n * client checks no response without schemas, and a host answering `{}` (a\n * misrouted proxy, a stub) should get the screen's error view, not a crash.\n */\n\n/** The code the status answers where no controller for the queue runs in the API's process. */\nexport const SUMMON_NOT_CONFIGURED = \"SUMMON_NOT_CONFIGURED\";\n\n/**\n * Query keys of the summon reads: the query layer's (`q.key`), so they are\n * the keys `q.query()` would give the same calls, `[routeKey, { params,\n * query }]`.\n */\nexport const summonKeys = {\n /** `GET /queues/:queue/summon`. */\n status: (api: ApiClient, queue: string) =>\n typedApi(api).q.key(\"GET /queues/:queue/summon\", { params: { queue } }),\n /** `GET /summon`. */\n list: (api: ApiClient) => typedApi(api).q.key(\"GET /summon\", {}),\n /** `GET /summon/groups`. */\n groups: (api: ApiClient) => typedApi(api).q.key(\"GET /summon/groups\", {}),\n /** What a summon or a reset changes: the queue's status, and every list and group read. */\n changed: (api: ApiClient, queue: string) => [\n summonKeys.status(api, queue),\n typedApi(api).q.key(\"GET /summon\"),\n typedApi(api).q.key(\"GET /summon/groups\"),\n ],\n};\n\n/** `/queues/:queue/summon…` under the API base, as an error's `instance`. */\nfunction summonPath(queue: string, suffix = \"\"): string {\n return `/queues/${encodeURIComponent(queue)}/summon${suffix}`;\n}\n\n/** Whether `fields` has the parts of a status every answer carries. */\nfunction isStatus(fields: Record<string, unknown>): boolean {\n return (\n typeof fields.queue === \"string\" &&\n typeof fields.local === \"boolean\" &&\n typeof fields.inert === \"boolean\" &&\n Array.isArray(fields.pending) &&\n typeof fields.failures === \"number\"\n );\n}\n\n/** Whether a `GET /summon` row has the parts every answer carries; `budget` is absent for summon state a newer bun-jobs wrote, an object otherwise. */\nfunction isListItem(item: unknown): boolean {\n return (\n isRecord(item) &&\n typeof item.queue === \"string\" &&\n (item.budget === undefined || isRecord(item.budget))\n );\n}\n\n/** Whether `value` has the parts of a summon group every answer carries. */\nfunction isGroup(value: unknown): boolean {\n return (\n isRecord(value) &&\n typeof value.name === \"string\" &&\n isRecord(value.budget) &&\n isRecord(value.queues)\n );\n}\n\n/**\n * `GET /queues/:queue/summon`: the queue's summon status, or `null` where the\n * queue has no summoner in the API's process (409 `SUMMON_NOT_CONFIGURED`)\n * or the server has no summon routes (404). Any other failure throws.\n */\nexport async function getSummonStatus(\n api: ApiClient,\n queue: string,\n signal?: AbortSignal,\n) {\n const instance = summonPath(queue);\n let result;\n try {\n result = await typedApi(api).client.get(\"/queues/:queue/summon\", {\n params: { queue },\n signal,\n });\n } catch (error) {\n throw await toApiError(error, instance);\n }\n if (result.ok) {\n return checkShape(\n result.data,\n isStatus,\n \"a queue's summon status\",\n instance,\n );\n }\n // The route's own code union: a misspelt code here does not compile.\n if (\n (result.status === 409 && result.error.code === SUMMON_NOT_CONFIGURED) ||\n result.status === 404\n ) {\n return null;\n }\n throw failedError(result, instance);\n}\n\n/**\n * `POST /queues/:queue/summon`: \"summon now\". `force` skips the cooldown, and\n * nothing else: the circuit, the budget, the attempts already on their way\n * and the compare-and-set still hold.\n */\nexport async function summonNow(api: ApiClient, queue: string, force: boolean) {\n const path = summonPath(queue);\n const check = await dataOf(\n typedApi(api).client.post(\"/queues/:queue/summon\", {\n params: { queue },\n body: { force },\n }),\n path,\n );\n return checkShape(\n check,\n (fields) => typeof fields.action === \"string\",\n \"a summon check\",\n path,\n );\n}\n\n/**\n * `GET /summon`: every summoning queue the API can reach, by queue — with a\n * controller in the API's process (`local: true`) or read from storage\n * (`local: false`) — with its readiness (local only), last outcome and\n * budget usage (absent for summon state a newer bun-jobs wrote). An empty\n * list, never a 409, where none summons.\n */\nexport async function listSummonControllers(\n api: ApiClient,\n signal?: AbortSignal,\n) {\n const path = \"/summon\";\n const list = await dataOf(typedApi(api).client.get(path, { signal }), path);\n return checkShape(\n list,\n (fields) =>\n Array.isArray(fields.controllers) && fields.controllers.every(isListItem),\n \"the summon controllers\",\n path,\n );\n}\n\n/**\n * `GET /summon/groups` (action `queues.list`): every summon group with shared\n * state in the namespace, read from storage, each redacted to the member\n * queues the caller may read (`queues.read`) — so a group's `queues` is never\n * its whole membership. Served where `features.summonStoredStatus` is on.\n */\nexport async function listSummonGroups(api: ApiClient, signal?: AbortSignal) {\n const path = \"/summon/groups\";\n const groups = await dataOf(typedApi(api).client.get(path, { signal }), path);\n return checkShape(\n groups,\n (fields) => Array.isArray(fields.groups) && fields.groups.every(isGroup),\n \"the summon groups\",\n path,\n );\n}\n\n/**\n * `POST /queues/:queue/summon/reset`: clears the failures, the backoff and\n * the open circuit — and, with `budget: true`, the budget usage this UTC\n * hour and day — and answers the status after it.\n *\n * Without `budget` it sends no body, as before the body existed, so an API\n * that predates it (`features.summonResetBudget` false) is asked nothing it\n * would refuse.\n */\nexport async function resetSummon(\n api: ApiClient,\n queue: string,\n options: SummonResetBody = {},\n) {\n const path = summonPath(queue, \"/reset\");\n const status = await dataOf(\n typedApi(api).client.post(\"/queues/:queue/summon/reset\", {\n params: { queue },\n body: options.budget === true ? { budget: true } : undefined,\n }),\n path,\n );\n return checkShape(status, isStatus, \"a queue's summon status\", path);\n}\n",
14
+ "/** A queue's Summon tab: the queue screen with `panel=summon`, relative to the app's base. */\nexport function summonTabPath(queue: string): string {\n return `/queues/${encodeURIComponent(queue)}?panel=summon`;\n}\n\n/**\n * A summon group's row on the Summoning screen: `/summon?group=<name>`,\n * relative to the app's base, the name encoded.\n */\nexport function summonGroupPath(name: string): string {\n return `/summon?group=${encodeURIComponent(name)}`;\n}\n",
15
+ "import type { SummonBudgetDto } from \"../../../api/types\";\nimport { formatNumber } from \"../../../format\";\n\n/**\n * A summon budget in plain words: how many attempts each UTC window has\n * left, whether one is exhausted, and when each resets — as the Summon panel\n * and the Summoning screen both show it.\n *\n * Pure: the time of day is read in UTC, since the server counts the windows\n * in UTC (`hourResetsAt` is the next UTC hour, `dayResetsAt` the next UTC\n * midnight), and `now` is passed in, so a test can fix it. The relative hint\n * (\"in 23m\") is the app's `RelativeTime`, rendered beside these words.\n */\n\n/** One of the budget's two windows. */\nexport type BudgetWindow = \"hour\" | \"day\";\n\n/** One window of a budget that is on. */\nexport interface BudgetWindowView {\n /** Which window. */\n window: BudgetWindow;\n /** Attempts counted in it. */\n used: number;\n /** Its limit. */\n limit: number;\n /** Attempts left before it is exhausted; never below 0, even over the limit. */\n remaining: number;\n /** Whether it is at or over its limit: nothing is summoned until it resets. */\n exhausted: boolean;\n /** When it resets and its count starts again from 0, epoch ms. */\n resetsAt: number;\n /** The attempts left: `\"28 of 30 left this hour\"`. */\n left: string;\n /** The attempts used: `\"2 of 30 used this hour\"`. */\n usedText: string;\n /** When it resets, absolute and in UTC: `\"14:00 UTC\"`, `\"midnight UTC\"`. */\n resetAt: string;\n}\n\n/** A budget the policy limits. */\nexport interface BudgetOnView {\n /** The budget is on. */\n state: \"on\";\n /** The UTC hour. */\n hour: BudgetWindowView;\n /** The UTC day. */\n day: BudgetWindowView;\n /** Whether either window is exhausted. */\n exhausted: boolean;\n /** Both windows' used counts, in one line: `\"Used 2 of 30 this hour, 10 of 300 today (UTC)\"`. */\n usedText: string;\n}\n\n/** A budget the policy turned off: counts, and no limit. */\nexport interface BudgetOffView {\n /** The budget is off. */\n state: \"off\";\n /**\n * The counts: `\"Off: 41 this hour, 120 today (UTC), no limit\"`; for a\n * queue in a summon group, `\"Off: the group's budget applies\"`.\n */\n text: string;\n /**\n * The tooltip: when the counts reset, `\"Counts reset at 14:00 UTC and at\n * midnight UTC\"`; for a queue in a summon group, its own counts first.\n */\n resets: string;\n}\n\n/**\n * A budget whose limits were never stored (`limitsUnknown`): read from\n * storage, for a queue whose controller runs in another process and has not\n * claimed since it began recording them. The counts are real; the limits are\n * not known here, which is not the same as none.\n */\nexport interface BudgetUnknownView {\n /** The limits are unknown. */\n state: \"unknown\";\n /** The counts: `\"1 this hour, 1 today (UTC), limits unknown\"`. */\n text: string;\n /** Why, and when the counts reset. */\n hint: string;\n}\n\n/** A budget in plain words: {@link BudgetOnView}, {@link BudgetOffView} or {@link BudgetUnknownView}. */\nexport type BudgetView = BudgetOnView | BudgetOffView | BudgetUnknownView;\n\n/** How far ahead a reset may be and still be named by its time of day alone. */\nconst SAME_DAY_MS = 86_400_000;\n\n/** What each window is called in a sentence. */\nconst PHRASE: Readonly<Record<BudgetWindow, string>> = {\n hour: \"this hour\",\n day: \"today\",\n};\n\n/**\n * `ms` as a UTC time of day: `\"14:00 UTC\"`, or `\"midnight UTC\"` on the hour\n * a day starts. A reset more than a day away from `now` (or as far behind\n * it: a stale read, a skewed clock) also names its date,\n * `\"2026-01-02 14:00 UTC\"`, since a time of day alone would mislead.\n */\nexport function utcResetLabel(ms: number, now: number): string {\n const iso = new Date(ms).toISOString();\n const time = iso.slice(11, 16);\n if (Math.abs(ms - now) >= SAME_DAY_MS) {\n return `${iso.slice(0, 10)} ${time} UTC`;\n }\n return time === \"00:00\" ? \"midnight UTC\" : `${time} UTC`;\n}\n\n/** One window of a budget that is on. */\nexport function budgetWindow(\n window: BudgetWindow,\n used: number,\n limit: number,\n resetsAt: number,\n now: number,\n): BudgetWindowView {\n const remaining = Math.max(0, limit - used);\n const phrase = PHRASE[window];\n return {\n window,\n used,\n limit,\n remaining,\n exhausted: used >= limit,\n resetsAt,\n left: `${formatNumber(remaining)} of ${formatNumber(limit)} left ${phrase}`,\n usedText: `${formatNumber(used)} of ${formatNumber(limit)} used ${phrase}`,\n resetAt: utcResetLabel(resetsAt, now),\n };\n}\n\n/**\n * Whether a budget is off: turned off by the policy, or missing a limit\n * without `limitsUnknown`, which the contract sends only then. A budget whose\n * limits are unknown is not off.\n */\nexport function budgetOff(budget: SummonBudgetDto): boolean {\n return (\n budget.off === true ||\n (budget.limitsUnknown !== true &&\n (budget.perHour === undefined || budget.perDay === undefined))\n );\n}\n\n/** Whether a budget's limits are unknown here (`limitsUnknown`), and it is not off. */\nexport function budgetLimitsUnknown(budget: SummonBudgetDto): boolean {\n return budget.off !== true && budget.limitsUnknown === true;\n}\n\n/**\n * Both windows' used counts in one line, `\"Used 2 of 30 this hour, 10 of 300\n * today (UTC)\"`; `undefined` for a budget that is off or whose limits are\n * unknown, whose counts are already its whole text.\n */\nexport function budgetUsedText(budget: SummonBudgetDto): string | undefined {\n if (budgetOff(budget) || budgetLimitsUnknown(budget)) {\n return undefined;\n }\n return `Used ${formatNumber(budget.hour)} of ${formatNumber(budget.perHour ?? 0)} this hour, ${formatNumber(budget.day)} of ${formatNumber(budget.perDay ?? 0)} today (UTC)`;\n}\n\n/** Options of {@link summonBudgetView}. */\nexport interface SummonBudgetViewOptions {\n /**\n * Whether the queue is in a summon group, whose budget then applies to\n * it. Only a queue budget the policy turned off (`off: true`) reads\n * differently: \"Off: the group's budget applies\", with the queue's own\n * counts in its tooltip, rather than \"…, no limit\", which would be untrue.\n * Defaults to `false`.\n */\n group?: boolean;\n}\n\n/**\n * A budget in plain words. Off when the policy turned it off (`off: true`),\n * and also when a limit is missing, which the contract sends only then: the\n * counts are shown with no limit rather than against an invented one. With\n * `limitsUnknown` the counts are shown as such, never as off. A queue in a\n * summon group whose own budget is off reads as the group's budget applying\n * ({@link SummonBudgetViewOptions.group}).\n */\nexport function summonBudgetView(\n budget: SummonBudgetDto,\n now: number,\n options: SummonBudgetViewOptions = {},\n): BudgetView {\n const resets = `Counts reset at ${utcResetLabel(budget.hourResetsAt, now)} and at ${utcResetLabel(budget.dayResetsAt, now)}`;\n if (budgetLimitsUnknown(budget)) {\n return {\n state: \"unknown\",\n text: `${formatNumber(budget.hour)} this hour, ${formatNumber(budget.day)} today (UTC), limits unknown`,\n hint: `Its limits are set where its controller runs, and show here after its next summon attempt. ${resets}`,\n };\n }\n if (\n budget.off === true ||\n budget.perHour === undefined ||\n budget.perDay === undefined\n ) {\n // Spelled out rather than `budgetOff()`, so the limits narrow below.\n if (options.group === true && budget.off === true) {\n return {\n state: \"off\",\n text: \"Off: the group's budget applies\",\n resets: `This queue's own count: ${formatNumber(budget.hour)} this hour, ${formatNumber(budget.day)} today (UTC). ${resets}`,\n };\n }\n return {\n state: \"off\",\n text: `Off: ${formatNumber(budget.hour)} this hour, ${formatNumber(budget.day)} today (UTC), no limit`,\n resets,\n };\n }\n const hour = budgetWindow(\n \"hour\",\n budget.hour,\n budget.perHour,\n budget.hourResetsAt,\n now,\n );\n const day = budgetWindow(\n \"day\",\n budget.day,\n budget.perDay,\n budget.dayResetsAt,\n now,\n );\n return {\n state: \"on\",\n hour,\n day,\n exhausted: hour.exhausted || day.exhausted,\n usedText: budgetUsedText(budget) ?? \"\",\n };\n}\n",
16
+ "import type { SummonBudgetDto } from \"../../../api/types\";\nimport type { BudgetWindowView } from \"./budgetText\";\nimport { Badge } from \"../../../components/Badge\";\nimport { cx } from \"../../../components/classNames\";\nimport { RelativeTime } from \"../../../components/RelativeTime\";\nimport { useNow } from \"../../../hooks/useNow\";\n// Not `./summonBudget`: Bun resolves an extensionless name differing from\n// this file's only in case to this file itself (oven-sh/bun#44659).\nimport { summonBudgetView } from \"./budgetText\";\n\n/** Props of {@link SummonBudget}. */\nexport interface SummonBudgetProps {\n /** The budget, as a summon status or `GET /summon` has it. */\n budget: SummonBudgetDto;\n /**\n * `data-testid` of the whole; each window's line gets it with `-hour` or\n * `-day` appended.\n */\n testId: string;\n /**\n * Whether the queue is in a summon group: a budget the policy turned off\n * then reads \"Off: the group's budget applies\", its counts in the tooltip.\n * Defaults to `false`.\n */\n group?: boolean;\n}\n\n/**\n * A summon budget: per UTC window, a meter of what is left, the attempts\n * left, and when the window resets — absolute in UTC, with the relative time\n * beside it. A window at its limit reads \"Exhausted\", in the warning tone. The\n * used counts are the tooltip. A budget the policy turned off shows its\n * counts and \"no limit\", with the reset times as the tooltip; one whose limits\n * were never stored (`limitsUnknown`) shows its counts and \"limits unknown\",\n * never \"Off\". In a summon group, an off budget says the group's applies.\n */\nexport function SummonBudget({\n budget,\n testId,\n group = false,\n}: SummonBudgetProps) {\n const now = useNow();\n const view = summonBudgetView(budget, now, { group });\n if (view.state === \"unknown\") {\n return (\n <span\n className=\"summon-budget\"\n data-testid={testId}\n data-limits-unknown=\"true\"\n title={view.hint}\n >\n {view.text}\n </span>\n );\n }\n if (view.state === \"off\") {\n return (\n <span\n className=\"summon-budget\"\n data-testid={testId}\n title={view.resets}\n >\n {view.text}\n </span>\n );\n }\n return (\n <span\n className=\"summon-budget\"\n data-testid={testId}\n data-exhausted={view.exhausted}\n title={view.usedText}\n >\n <BudgetLine\n view={view.hour}\n testId={`${testId}-hour`}\n />\n {/* The lines are blocks on screen; read aloud or copied, they need a break. */}\n <span className=\"visually-hidden\">; </span>\n <BudgetLine\n view={view.day}\n testId={`${testId}-day`}\n />\n </span>\n );\n}\n\n/** Props of {@link BudgetLine}. */\ninterface BudgetLineProps {\n /** The window. */\n view: BudgetWindowView;\n /** Its `data-testid`. */\n testId: string;\n}\n\n/** One window: its meter, what is left and when it resets. */\nfunction BudgetLine({ view, testId }: BudgetLineProps) {\n // A meter needs max > min; a limit of 0 is a window always exhausted.\n const max = Math.max(view.limit, 1);\n return (\n <span\n className={cx(\"summon-budget-window\", view.exhausted && \"is-exhausted\")}\n data-testid={testId}\n data-exhausted={view.exhausted}\n title={view.usedText}\n >\n <meter\n className=\"summon-budget-meter\"\n min={0}\n max={max}\n low={max * 0.2}\n high={max * 0.5}\n optimum={max}\n value={Math.min(view.remaining, max)}\n aria-hidden=\"true\"\n />\n <span>\n {view.exhausted && (\n <>\n <Badge\n tone=\"warning\"\n title=\"Nothing is summoned until this window resets.\"\n >\n Exhausted\n </Badge>{\" \"}\n </>\n )}\n {view.left}, resets at {view.resetAt} (\n <RelativeTime value={view.resetsAt} />)\n </span>\n </span>\n );\n}\n",
17
+ "import type { SummonGroupStatusDto } from \"../../../api/types\";\n\n/**\n * A summon group in the shapes its views draw: the member queues' shares of\n * today's attempts, in order, and the shared circuit per provider kind. Pure,\n * so the Summon tab's group card and the Summoning screen's groups section\n * read a group the same way.\n *\n * A group arrives redacted to the member queues the caller may read, so\n * nothing here counts the members: a share list is what was charged today by\n * the queues shown, never the whole group. For a shared unit (`unit:\n * \"shared\"`) a share is the attempts that served the queue, each attempt\n * counted on every queue it served, so the shares do not add up to the\n * group budget's count.\n */\n\n/** One member queue's share of the group's attempts today. */\nexport interface GroupShare {\n /** The queue. */\n queue: string;\n /**\n * Attempts it charged to the group this UTC day; for a shared unit, the\n * attempts that served it, each also counted on the unit's other queues.\n */\n day: number;\n /** When it last charged one (for a shared unit, when one last served it), epoch ms. */\n lastAt: number;\n}\n\n/** The group's shared circuit for one provider kind. */\nexport interface GroupCircuit {\n /** The provider kind, e.g. `\"ecs\"`; `undefined` when the summoner's kind is not known here. */\n kind: string | undefined;\n /** Consecutive failures counted across the group for this kind. */\n failures: number;\n /** When the open circuit closes, epoch ms; `undefined` while it is closed. */\n openUntil: number | undefined;\n /** The failure that last opened it, when the group's state names one the caller may read. */\n openedBy: NonNullable<SummonGroupStatusDto[\"circuit\"]>[\"openedBy\"];\n}\n\n/**\n * The member queues' shares of today's attempts, most attempts first, then\n * by queue name, so the order is stable between reads.\n */\nexport function groupShares(group: SummonGroupStatusDto): GroupShare[] {\n return Object.entries(group.queues)\n .map(([queue, share]) => ({ queue, day: share.day, lastAt: share.lastAt }))\n .sort(\n (a, b) =>\n b.day - a.day || (a.queue < b.queue ? -1 : a.queue > b.queue ? 1 : 0),\n );\n}\n\n/**\n * The group's shared circuits, one per provider kind, in kind order: every\n * kind's from `circuits` when the answer has any, else the one `circuit`,\n * keyed by `kind` (the answering summoner's, `undefined` when not known\n * here). Empty when the group shares no circuit, or none has counted a\n * failure yet: there is then nothing to show.\n */\nexport function groupCircuits(\n group: SummonGroupStatusDto,\n kind: string | undefined,\n): GroupCircuit[] {\n const every = Object.entries(group.circuits ?? {});\n if (every.length > 0) {\n return every\n .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))\n .map(([name, circuit]) => ({\n kind: name,\n failures: circuit.failures,\n openUntil: circuit.openUntil,\n openedBy: circuit.openedBy,\n }));\n }\n if (group.circuit === undefined) {\n return [];\n }\n return [\n {\n kind,\n failures: group.circuit.failures,\n openUntil: group.circuit.openUntil,\n openedBy: group.circuit.openedBy,\n },\n ];\n}\n\n/** A circuit's kind as a label: the kind, or \"this summoner\" when it is not known here. */\nexport function circuitKindLabel(kind: string | undefined): string {\n return kind === undefined || kind === \"\" ? \"this summoner\" : kind;\n}\n\n/**\n * Whether a group is one shared unit (`unit: \"shared\"`): one summoned\n * process serves every queue in it. Its shares then count each attempt on\n * every member queue it served, so they do not add up to the group budget's\n * count; a per-queue group's are each queue's own charges.\n */\nexport function groupIsShared(\n group: Pick<SummonGroupStatusDto, \"unit\">,\n): boolean {\n return group.unit === \"shared\";\n}\n\n/** The tooltip of a shared unit's mark, on the group card and the groups list. */\nexport const SHARED_UNIT_TITLE =\n \"One summoned process serves every queue of this group.\";\n\n/** The Summoning screen's groups list: what a group's Unit cell says. */\nexport function groupUnitLabel(\n group: Pick<SummonGroupStatusDto, \"unit\">,\n): string {\n return groupIsShared(group) ? \"Shared\" : \"Per queue\";\n}\n\n/** How the group card words its shares of today's attempts. */\nexport interface GroupSharesText {\n /** The shares' subheading. */\n heading: string;\n /** A note under the subheading; `undefined` for a per-queue group, which needs none. */\n note: string | undefined;\n /** The line shown when no queue has a share today. */\n empty: string;\n /** The share table's accessible name. */\n tableLabel: string;\n}\n\n/**\n * The group card's words for its shares: a per-queue group's are the\n * attempts each queue charged to it; a shared unit's are the attempts that\n * served each queue, each attempt counted on every queue it served.\n */\nexport function groupSharesText(\n group: Pick<SummonGroupStatusDto, \"name\" | \"unit\">,\n): GroupSharesText {\n return groupIsShared(group)\n ? {\n heading: \"Attempts serving each queue today\",\n note: \"One attempt serves every queue of the unit, so each counts it: these do not add up to the group's budget.\",\n empty: \"No attempts served the unit's queues today.\",\n tableLabel: `Attempts serving each queue of the group ${group.name} today`,\n }\n : {\n heading: \"Charged today\",\n note: undefined,\n empty: \"No attempts charged to the group today.\",\n tableLabel: `Attempts charged to the group ${group.name} today`,\n };\n}\n\n/** The Summoning screen's groups list: the header of each group's shares of today's attempts. */\nexport const GROUPS_TODAY_HEADER = \"Today, per queue\";\n\n/** That header's tooltip: what a count means for each kind of group. */\nexport const GROUPS_TODAY_TITLE =\n \"For a per-queue group, each count is the attempts that queue charged to the group today. For a shared unit, each attempt is counted on every queue it served, so the counts do not add up to the group's.\";\n\n/** The muted note in a shared unit's \"Today, per queue\" cell. */\nexport const SHARED_UNIT_ROW_NOTE = \"each attempt serves every queue\";\n",
18
+ "import type { SummonGroupStatusDto } from \"../../../api/types\";\nimport type { GroupCircuit, GroupShare } from \"./summonGroupText\";\nimport { Badge } from \"../../../components/Badge\";\nimport { cx } from \"../../../components/classNames\";\nimport { KeyValue } from \"../../../components/KeyValue\";\nimport { RelativeTime } from \"../../../components/RelativeTime\";\nimport { Table } from \"../../../components/Table\";\nimport { displayText, formatNumber, plural } from \"../../../format\";\nimport { useNow } from \"../../../hooks/useNow\";\nimport { useFeature, useUntargetedCanFn } from \"../../../meta/hooks\";\nimport { Link } from \"../../../router\";\nimport { summonGroupPath, summonTabPath } from \"../../summoning/paths\";\nimport { budgetUsedText, utcResetLabel } from \"./budgetText\";\nimport { SummonBudget } from \"./SummonBudget\";\nimport {\n circuitKindLabel,\n groupCircuits,\n groupIsShared,\n groupShares,\n groupSharesText,\n SHARED_UNIT_TITLE,\n} from \"./summonGroupText\";\n\n/** Props of {@link SummonGroupCard}. */\nexport interface SummonGroupCardProps {\n /** The group, as the queue's summon status has it (`status.group`). */\n group: SummonGroupStatusDto;\n /** The queue whose Summon tab this is: its share's row is marked. */\n queue: string;\n /**\n * The queue's summoner kind (`status.summoner.provider.kind`), naming the\n * group's one `circuit` when the answer has no `circuits`; `undefined` when\n * not known here, which reads \"this summoner\".\n */\n kind: string | undefined;\n}\n\n/**\n * The summon group a queue's controller is in, on its Summon tab: the\n * group's name (linked to its row on the Summoning screen, where that\n * screen lists groups), the group's budget, the shared circuit per provider\n * kind, and today's attempts charged to the group by each member queue.\n *\n * A shared unit (`unit: \"shared\"`) is marked \"Shared unit\", and its shares\n * are the attempts that served each queue: one attempt serves every queue of\n * the unit and is counted on each, so they do not add up to the group's\n * budget, and the card says so ({@link groupSharesText}).\n *\n * The group arrives redacted to the member queues the caller may read, so\n * the share table is what those queues charged today, never a count of the\n * group's members.\n */\nexport function SummonGroupCard({ group, queue, kind }: SummonGroupCardProps) {\n const shares = groupShares(group);\n const circuits = groupCircuits(group, kind);\n const sharesText = groupSharesText(group);\n return (\n <section\n className=\"summon-group\"\n data-testid=\"summon-group\"\n aria-label={`Summon group ${group.name}`}\n >\n <h3 className=\"summon-heading\">\n Summon group <GroupName name={group.name} />\n {groupIsShared(group) && (\n <>\n {\" \"}\n <Badge\n tone=\"neutral\"\n title={SHARED_UNIT_TITLE}\n testId=\"summon-group-unit\"\n >\n Shared unit\n </Badge>\n </>\n )}\n </h3>\n <KeyValue\n items={[\n {\n key: \"group-budget\",\n label: \"Group budget\",\n value: (\n <SummonBudget\n budget={group.budget}\n testId=\"summon-group-budget\"\n />\n ),\n hint: budgetUsedText(group.budget),\n },\n ...circuits.map((circuit) => ({\n key: `circuit-${circuit.kind ?? \"\"}`,\n label: `Shared circuit, ${circuitKindLabel(circuit.kind)}`,\n value: <CircuitState circuit={circuit} />,\n })),\n ]}\n />\n <h4 className=\"summon-subheading\">{sharesText.heading}</h4>\n {/* Only beside shares: \"these do not add up\" says nothing about none. */}\n {sharesText.note !== undefined && shares.length > 0 && (\n <p\n className=\"muted summon-group-note\"\n data-testid=\"summon-group-shares-note\"\n >\n {sharesText.note}\n </p>\n )}\n {shares.length === 0 ? (\n <p\n className=\"muted\"\n data-testid=\"summon-group-shares-empty\"\n >\n {sharesText.empty}\n </p>\n ) : (\n <SharesTable\n label={sharesText.tableLabel}\n queue={queue}\n shares={shares}\n />\n )}\n </section>\n );\n}\n\n/**\n * The group's name, linked to its row on the Summoning screen where that\n * screen is routed (`features.summonList`, `queues.list`) and lists groups\n * (`features.summonStoredStatus`); plain text elsewhere, since the link\n * would land on a page without it.\n */\nfunction GroupName({\n name,\n}: {\n /** The group's name. */\n name: string;\n}) {\n const listed = useFeature(\"summonList\") === true;\n const stored = useFeature(\"summonStoredStatus\") === true;\n // The untargeted map: what the nav, and so the routes, were built from.\n const canList = useUntargetedCanFn()(\"queues.list\");\n if (!(listed && stored && canList)) {\n return <span data-testid=\"summon-group-name\">{name}</span>;\n }\n return (\n <Link\n to={summonGroupPath(name)}\n title={`The group ${name} on the Summoning screen`}\n data-testid=\"summon-group-name\"\n >\n {name}\n </Link>\n );\n}\n\n/** Props of {@link SharesTable}. */\ninterface SharesTableProps {\n /** The table's accessible name ({@link groupSharesText}). */\n label: string;\n /** The queue whose Summon tab this is: its row is marked. */\n queue: string;\n /** The shares, in order. */\n shares: GroupShare[];\n}\n\n/**\n * Today's attempts charged to the group (for a shared unit, serving each\n * queue), per member queue the caller may read.\n */\nfunction SharesTable({ label, queue, shares }: SharesTableProps) {\n return (\n <Table label={label}>\n <thead>\n <tr>\n <th scope=\"col\">Queue</th>\n <th\n scope=\"col\"\n className=\"num\"\n >\n Attempts today\n </th>\n <th scope=\"col\">Last</th>\n </tr>\n </thead>\n <tbody>\n {shares.map((share) => {\n const current = share.queue === queue;\n return (\n <tr\n key={share.queue}\n data-testid={`summon-group-share-${share.queue}`}\n aria-current={current ? \"true\" : undefined}\n className={cx(current && \"is-current\")}\n >\n <th scope=\"row\">\n <Link\n to={summonTabPath(share.queue)}\n title={`The Summon tab of ${share.queue}`}\n >\n {share.queue}\n </Link>\n {current && <span className=\"muted\"> (this queue)</span>}\n </th>\n <td className=\"num\">{formatNumber(share.day)}</td>\n <td>\n <RelativeTime value={share.lastAt} />\n </td>\n </tr>\n );\n })}\n </tbody>\n </Table>\n );\n}\n\n/** Props of {@link CircuitState}. */\nexport interface CircuitStateProps {\n /** The shared circuit of one provider kind. */\n circuit: GroupCircuit;\n /**\n * One short line, `\"ecs: open until …\"` or `\"ecs: closed\"`, as the\n * Summoning screen's groups list has it; the failures and the detail move\n * to the tooltip. Defaults to `false`: the card's fuller wording.\n */\n compact?: boolean;\n /** `data-testid` of the whole; defaults to `summon-group-circuit-<kind>` (`this-summoner` when the kind is unknown). */\n testId?: string;\n}\n\n/**\n * A group's shared circuit for one provider kind: \"Closed\" with its failure\n * count, or \"Open\" in the warning tone until it closes — absolute in UTC,\n * with the relative time beside it, as a budget's reset — with who opened it\n * (linked to that queue's Summon tab) and the failure's detail, where the\n * group's state names one the caller may read.\n */\nexport function CircuitState({\n circuit,\n compact = false,\n testId,\n}: CircuitStateProps) {\n const now = useNow();\n const label = circuitKindLabel(circuit.kind);\n const id =\n testId ??\n `summon-group-circuit-${circuit.kind === undefined || circuit.kind === \"\" ? \"this-summoner\" : circuit.kind}`;\n const failures = `${plural(circuit.failures, \"consecutive failure\")} across the group`;\n const opened = circuit.openedBy;\n const detail =\n opened?.detail === undefined ? undefined : displayText(opened.detail);\n const openUntil = circuit.openUntil;\n if (openUntil === undefined) {\n return compact ? (\n <span\n data-testid={id}\n data-open=\"false\"\n title={failures}\n >\n {label}: closed\n </span>\n ) : (\n <span\n data-testid={id}\n data-open=\"false\"\n >\n <Badge tone=\"success\">Closed</Badge>{\" \"}\n <span className=\"muted\">{failures}</span>\n </span>\n );\n }\n const openedBy = opened !== undefined && (\n <>\n , opened by{\" \"}\n <Link\n to={summonTabPath(opened.queue)}\n title={`The Summon tab of ${opened.queue}`}\n >\n {opened.queue}\n </Link>\n </>\n );\n if (compact) {\n return (\n <span\n className=\"summon-group-circuit is-open\"\n data-testid={id}\n data-open=\"true\"\n title={detail === undefined ? failures : `${failures}: ${detail}`}\n >\n {label}: open until {utcResetLabel(openUntil, now)} (\n <RelativeTime value={openUntil} />){openedBy}\n </span>\n );\n }\n return (\n <span\n className=\"summon-group-circuit is-open\"\n data-testid={id}\n data-open=\"true\"\n >\n <Badge\n tone=\"warning\"\n title=\"After repeated failures across the group nothing is summoned for this kind until then, apart from one trial attempt.\"\n >\n Open\n </Badge>{\" \"}\n until {utcResetLabel(openUntil, now)} (\n <RelativeTime value={openUntil} />){openedBy}\n {detail !== undefined && <span className=\"muted\"> — {detail}</span>}\n </span>\n );\n}\n"
19
+ ],
20
+ "mappings": "oJA+BO,MAAM,UAAoB,KAAM,CAE5B,IAET,WAAW,CAAC,EAAiB,EAA8B,CAAC,EAAG,CAC7D,MAAM,EAAS,CAAE,MAAO,EAAQ,KAAM,CAAC,EACvC,KAAK,KAAO,cACZ,KAAK,IAAM,EAAQ,IAEvB,CAiBO,MAAM,WAA+B,CAAY,CAE7C,OAEA,MAEA,SAET,WAAW,CACT,EACA,EACA,EACA,EACA,CACA,MAAM,QAAQ,UAAe,GAAO,EAAS,MAAO,CAAE,KAAI,CAAC,EAC3D,KAAK,KAAO,YACZ,KAAK,OAAS,EACd,KAAK,MAAQ,EACb,KAAK,SAAW,EAEpB,CAOO,MAAM,UAA8B,CAAY,CAE5C,OAEA,SAEA,SAET,WAAW,CAAC,EAAoB,EAA6B,EAAc,CACzE,MACE,GAAG,GAAO,EAAS,gBAAgB,EAAS,gDAAgD,EAAS,KAAK,IAAI,KAC9G,CAAE,KAAI,CACR,EACA,KAAK,KAAO,wBACZ,KAAK,OAAS,EAAS,OACvB,KAAK,SAAW,EAChB,KAAK,SAAW,EAEpB,CA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