@qlever-llc/trellis 0.10.8 → 0.10.10

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 (210) hide show
  1. package/esm/contract_support/mod.d.ts +1 -1
  2. package/esm/contract_support/mod.d.ts.map +1 -1
  3. package/esm/contract_support/mod.js +1 -1
  4. package/esm/contract_support/protocol.d.ts +67 -0
  5. package/esm/contract_support/protocol.d.ts.map +1 -1
  6. package/esm/contract_support/protocol.js +90 -0
  7. package/esm/generated-sdk/auth/api.d.ts.map +1 -1
  8. package/esm/generated-sdk/auth/client.d.ts.map +1 -1
  9. package/esm/generated-sdk/auth/contract.d.ts.map +1 -1
  10. package/esm/generated-sdk/auth/contract.js +9590 -7
  11. package/esm/generated-sdk/auth/mod.d.ts +3 -3
  12. package/esm/generated-sdk/auth/mod.d.ts.map +1 -1
  13. package/esm/generated-sdk/auth/mod.js +1 -1
  14. package/esm/generated-sdk/auth/owned_api.d.ts.map +1 -1
  15. package/esm/generated-sdk/auth/owned_api.js +305 -62
  16. package/esm/generated-sdk/auth/schemas.d.ts.map +1 -1
  17. package/esm/generated-sdk/auth/schemas.js +6492 -139
  18. package/esm/generated-sdk/auth/types.d.ts +254 -254
  19. package/esm/generated-sdk/auth/types.d.ts.map +1 -1
  20. package/esm/generated-sdk/health/api.d.ts.map +1 -1
  21. package/esm/generated-sdk/health/client.d.ts.map +1 -1
  22. package/esm/generated-sdk/health/contract.d.ts.map +1 -1
  23. package/esm/generated-sdk/health/contract.js +117 -7
  24. package/esm/generated-sdk/health/mod.d.ts +2 -2
  25. package/esm/generated-sdk/health/mod.d.ts.map +1 -1
  26. package/esm/generated-sdk/health/mod.js +1 -1
  27. package/esm/generated-sdk/health/owned_api.d.ts.map +1 -1
  28. package/esm/generated-sdk/health/schemas.d.ts.map +1 -1
  29. package/esm/generated-sdk/health/schemas.js +79 -1
  30. package/esm/generated-sdk/health/types.d.ts +4 -4
  31. package/esm/generated-sdk/health/types.d.ts.map +1 -1
  32. package/esm/generated-sdk/jobs/api.d.ts.map +1 -1
  33. package/esm/generated-sdk/jobs/api.js +12 -4
  34. package/esm/generated-sdk/jobs/client.d.ts.map +1 -1
  35. package/esm/generated-sdk/jobs/contract.d.ts.map +1 -1
  36. package/esm/generated-sdk/jobs/contract.js +1080 -7
  37. package/esm/generated-sdk/jobs/mod.d.ts +2 -2
  38. package/esm/generated-sdk/jobs/mod.d.ts.map +1 -1
  39. package/esm/generated-sdk/jobs/mod.js +1 -1
  40. package/esm/generated-sdk/jobs/owned_api.d.ts.map +1 -1
  41. package/esm/generated-sdk/jobs/owned_api.js +26 -6
  42. package/esm/generated-sdk/jobs/schemas.d.ts.map +1 -1
  43. package/esm/generated-sdk/jobs/schemas.js +768 -18
  44. package/esm/generated-sdk/jobs/types.d.ts +14 -14
  45. package/esm/generated-sdk/jobs/types.d.ts.map +1 -1
  46. package/esm/generated-sdk/state/api.d.ts.map +1 -1
  47. package/esm/generated-sdk/state/api.js +3 -1
  48. package/esm/generated-sdk/state/client.d.ts.map +1 -1
  49. package/esm/generated-sdk/state/contract.d.ts.map +1 -1
  50. package/esm/generated-sdk/state/contract.js +638 -7
  51. package/esm/generated-sdk/state/mod.d.ts +2 -2
  52. package/esm/generated-sdk/state/mod.d.ts.map +1 -1
  53. package/esm/generated-sdk/state/mod.js +1 -1
  54. package/esm/generated-sdk/state/owned_api.d.ts.map +1 -1
  55. package/esm/generated-sdk/state/owned_api.js +36 -8
  56. package/esm/generated-sdk/state/schemas.d.ts.map +1 -1
  57. package/esm/generated-sdk/state/schemas.js +441 -14
  58. package/esm/generated-sdk/state/types.d.ts +15 -15
  59. package/esm/generated-sdk/state/types.d.ts.map +1 -1
  60. package/esm/generated-sdk/trellis-core/api.d.ts.map +1 -1
  61. package/esm/generated-sdk/trellis-core/client.d.ts.map +1 -1
  62. package/esm/generated-sdk/trellis-core/contract.d.ts.map +1 -1
  63. package/esm/generated-sdk/trellis-core/contract.js +744 -7
  64. package/esm/generated-sdk/trellis-core/mod.d.ts +2 -2
  65. package/esm/generated-sdk/trellis-core/mod.d.ts.map +1 -1
  66. package/esm/generated-sdk/trellis-core/mod.js +1 -1
  67. package/esm/generated-sdk/trellis-core/owned_api.d.ts.map +1 -1
  68. package/esm/generated-sdk/trellis-core/owned_api.js +1 -1
  69. package/esm/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
  70. package/esm/generated-sdk/trellis-core/schemas.js +626 -8
  71. package/esm/generated-sdk/trellis-core/types.d.ts +14 -14
  72. package/esm/generated-sdk/trellis-core/types.d.ts.map +1 -1
  73. package/esm/index.d.ts +2 -2
  74. package/esm/index.d.ts.map +1 -1
  75. package/esm/index.js +1 -1
  76. package/esm/server/service.d.ts +40 -9
  77. package/esm/server/service.d.ts.map +1 -1
  78. package/esm/server/service.js +28 -4
  79. package/esm/service/deno.d.ts +1 -1
  80. package/esm/service/deno.d.ts.map +1 -1
  81. package/esm/service/mod.d.ts +1 -1
  82. package/esm/service/mod.d.ts.map +1 -1
  83. package/esm/service/node.d.ts +1 -1
  84. package/esm/service/node.d.ts.map +1 -1
  85. package/package.json +2 -2
  86. package/script/contract_support/mod.d.ts +1 -1
  87. package/script/contract_support/mod.d.ts.map +1 -1
  88. package/script/contract_support/mod.js +8 -1
  89. package/script/contract_support/protocol.d.ts +67 -0
  90. package/script/contract_support/protocol.d.ts.map +1 -1
  91. package/script/contract_support/protocol.js +96 -1
  92. package/script/generated-sdk/auth/api.d.ts.map +1 -1
  93. package/script/generated-sdk/auth/client.d.ts.map +1 -1
  94. package/script/generated-sdk/auth/contract.d.ts.map +1 -1
  95. package/script/generated-sdk/auth/contract.js +9590 -7
  96. package/script/generated-sdk/auth/mod.d.ts +3 -3
  97. package/script/generated-sdk/auth/mod.d.ts.map +1 -1
  98. package/script/generated-sdk/auth/mod.js +2 -2
  99. package/script/generated-sdk/auth/owned_api.d.ts.map +1 -1
  100. package/script/generated-sdk/auth/owned_api.js +304 -61
  101. package/script/generated-sdk/auth/schemas.d.ts.map +1 -1
  102. package/script/generated-sdk/auth/schemas.js +6492 -139
  103. package/script/generated-sdk/auth/types.d.ts +254 -254
  104. package/script/generated-sdk/auth/types.d.ts.map +1 -1
  105. package/script/generated-sdk/health/api.d.ts.map +1 -1
  106. package/script/generated-sdk/health/client.d.ts.map +1 -1
  107. package/script/generated-sdk/health/contract.d.ts.map +1 -1
  108. package/script/generated-sdk/health/contract.js +117 -7
  109. package/script/generated-sdk/health/mod.d.ts +2 -2
  110. package/script/generated-sdk/health/mod.d.ts.map +1 -1
  111. package/script/generated-sdk/health/mod.js +2 -2
  112. package/script/generated-sdk/health/owned_api.d.ts.map +1 -1
  113. package/script/generated-sdk/health/schemas.d.ts.map +1 -1
  114. package/script/generated-sdk/health/schemas.js +79 -1
  115. package/script/generated-sdk/health/types.d.ts +4 -4
  116. package/script/generated-sdk/health/types.d.ts.map +1 -1
  117. package/script/generated-sdk/jobs/api.d.ts.map +1 -1
  118. package/script/generated-sdk/jobs/api.js +12 -4
  119. package/script/generated-sdk/jobs/client.d.ts.map +1 -1
  120. package/script/generated-sdk/jobs/contract.d.ts.map +1 -1
  121. package/script/generated-sdk/jobs/contract.js +1080 -7
  122. package/script/generated-sdk/jobs/mod.d.ts +2 -2
  123. package/script/generated-sdk/jobs/mod.d.ts.map +1 -1
  124. package/script/generated-sdk/jobs/mod.js +2 -2
  125. package/script/generated-sdk/jobs/owned_api.d.ts.map +1 -1
  126. package/script/generated-sdk/jobs/owned_api.js +25 -5
  127. package/script/generated-sdk/jobs/schemas.d.ts.map +1 -1
  128. package/script/generated-sdk/jobs/schemas.js +768 -18
  129. package/script/generated-sdk/jobs/types.d.ts +14 -14
  130. package/script/generated-sdk/jobs/types.d.ts.map +1 -1
  131. package/script/generated-sdk/state/api.d.ts.map +1 -1
  132. package/script/generated-sdk/state/api.js +3 -1
  133. package/script/generated-sdk/state/client.d.ts.map +1 -1
  134. package/script/generated-sdk/state/contract.d.ts.map +1 -1
  135. package/script/generated-sdk/state/contract.js +638 -7
  136. package/script/generated-sdk/state/mod.d.ts +2 -2
  137. package/script/generated-sdk/state/mod.d.ts.map +1 -1
  138. package/script/generated-sdk/state/mod.js +2 -2
  139. package/script/generated-sdk/state/owned_api.d.ts.map +1 -1
  140. package/script/generated-sdk/state/owned_api.js +35 -7
  141. package/script/generated-sdk/state/schemas.d.ts.map +1 -1
  142. package/script/generated-sdk/state/schemas.js +441 -14
  143. package/script/generated-sdk/state/types.d.ts +15 -15
  144. package/script/generated-sdk/state/types.d.ts.map +1 -1
  145. package/script/generated-sdk/trellis-core/api.d.ts.map +1 -1
  146. package/script/generated-sdk/trellis-core/client.d.ts.map +1 -1
  147. package/script/generated-sdk/trellis-core/contract.d.ts.map +1 -1
  148. package/script/generated-sdk/trellis-core/contract.js +744 -7
  149. package/script/generated-sdk/trellis-core/mod.d.ts +2 -2
  150. package/script/generated-sdk/trellis-core/mod.d.ts.map +1 -1
  151. package/script/generated-sdk/trellis-core/mod.js +2 -2
  152. package/script/generated-sdk/trellis-core/owned_api.d.ts.map +1 -1
  153. package/script/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
  154. package/script/generated-sdk/trellis-core/schemas.js +626 -8
  155. package/script/generated-sdk/trellis-core/types.d.ts +14 -14
  156. package/script/generated-sdk/trellis-core/types.d.ts.map +1 -1
  157. package/script/index.d.ts +2 -2
  158. package/script/index.d.ts.map +1 -1
  159. package/script/index.js +9 -2
  160. package/script/server/service.d.ts +40 -9
  161. package/script/server/service.d.ts.map +1 -1
  162. package/script/server/service.js +27 -3
  163. package/script/service/deno.d.ts +1 -1
  164. package/script/service/deno.d.ts.map +1 -1
  165. package/script/service/mod.d.ts +1 -1
  166. package/script/service/mod.d.ts.map +1 -1
  167. package/script/service/node.d.ts +1 -1
  168. package/script/service/node.d.ts.map +1 -1
  169. package/src/contract_support/mod.ts +12 -0
  170. package/src/contract_support/protocol.ts +137 -0
  171. package/src/index.ts +12 -0
  172. package/src/sdk/_generated/auth/api.ts +10 -21
  173. package/src/sdk/_generated/auth/client.ts +1178 -160
  174. package/src/sdk/_generated/auth/contract.ts +9637 -13
  175. package/src/sdk/_generated/auth/mod.ts +22 -3
  176. package/src/sdk/_generated/auth/owned_api.ts +897 -264
  177. package/src/sdk/_generated/auth/schemas.ts +6630 -278
  178. package/src/sdk/_generated/auth/types.ts +2950 -359
  179. package/src/sdk/_generated/core/api.ts +10 -21
  180. package/src/sdk/_generated/core/client.ts +105 -12
  181. package/src/sdk/_generated/core/contract.ts +774 -13
  182. package/src/sdk/_generated/core/mod.ts +17 -2
  183. package/src/sdk/_generated/core/owned_api.ts +40 -24
  184. package/src/sdk/_generated/core/schemas.ts +626 -9
  185. package/src/sdk/_generated/core/types.ts +233 -18
  186. package/src/sdk/_generated/health/api.ts +10 -21
  187. package/src/sdk/_generated/health/client.ts +104 -8
  188. package/src/sdk/_generated/health/contract.ts +144 -13
  189. package/src/sdk/_generated/health/mod.ts +17 -2
  190. package/src/sdk/_generated/health/owned_api.ts +4 -9
  191. package/src/sdk/_generated/health/schemas.ts +79 -2
  192. package/src/sdk/_generated/health/types.ts +31 -4
  193. package/src/sdk/_generated/jobs/api.ts +20 -18
  194. package/src/sdk/_generated/jobs/client.ts +199 -28
  195. package/src/sdk/_generated/jobs/contract.ts +1119 -13
  196. package/src/sdk/_generated/jobs/mod.ts +17 -2
  197. package/src/sdk/_generated/jobs/owned_api.ts +64 -27
  198. package/src/sdk/_generated/jobs/schemas.ts +776 -20
  199. package/src/sdk/_generated/jobs/types.ts +407 -34
  200. package/src/sdk/_generated/state/api.ts +11 -18
  201. package/src/sdk/_generated/state/client.ts +169 -22
  202. package/src/sdk/_generated/state/contract.ts +670 -13
  203. package/src/sdk/_generated/state/mod.ts +17 -2
  204. package/src/sdk/_generated/state/owned_api.ts +65 -25
  205. package/src/sdk/_generated/state/schemas.ts +441 -15
  206. package/src/sdk/_generated/state/types.ts +229 -26
  207. package/src/server/service.ts +133 -7
  208. package/src/service/deno.ts +4 -0
  209. package/src/service/mod.ts +4 -0
  210. package/src/service/node.ts +4 -0
@@ -1,12 +1,1100 @@
1
1
  // Generated from ./generated/contracts/manifests/trellis.jobs@v1.json
2
- import type { ContractDependencyUse, SdkContractModule, TrellisContractV1, UseSpec } from "../../../index.js";
2
+ import type {
3
+ ContractDependencyUse,
4
+ SdkContractModule,
5
+ TrellisContractV1,
6
+ UseSpec,
7
+ } from "../../../index.js";
3
8
  import { API } from "./api.js";
4
9
 
5
- const CONTRACT_MODULE_METADATA = Symbol.for("@qlever-llc/trellis/contracts/contract-module");
10
+ const CONTRACT_MODULE_METADATA = Symbol.for(
11
+ "@qlever-llc/trellis/contracts/contract-module",
12
+ );
6
13
 
7
14
  export const CONTRACT_ID = "trellis.jobs@v1" as const;
8
- export const CONTRACT_DIGEST = "jSB8nKGOQqIxdFDdUqO-gOTt3Dijg--SOXJtJ1ChpoY" as const;
9
- export const CONTRACT = {"capabilities":{"trellis.jobs::admin.mutate":{"consequence":"Can change background job execution state.","description":"Cancel, retry, replay, or dismiss Jobs service work items.","displayName":"Mutate jobs admin data"},"trellis.jobs::admin.read":{"description":"View Jobs service health, services, jobs, and dead-letter queues.","displayName":"Read jobs admin data"}},"description":"Trellis-managed background job administration API.","displayName":"Trellis Jobs","docs":{"markdown":"Provides health, service, job, retry, cancel, and dead-letter queue RPCs for Trellis-managed background work.","summary":"Background job administration APIs."},"errors":{"NotFoundError":{"schema":{"schema":"NotFoundErrorData"},"type":"NotFoundError"}},"format":"trellis.contract.v1","id":"trellis.jobs@v1","kind":"service","rpc":{"Jobs.Cancel":{"capabilities":{"call":["trellis.jobs::admin.mutate"]},"docs":{"markdown":"Requests cancellation for one background job.","summary":"Cancel a job."},"errors":[{"type":"UnexpectedError"},{"type":"ValidationError"},{"type":"NotFoundError"}],"input":{"schema":"JobsCancelRequest"},"output":{"schema":"JobsCancelResponse"},"subject":"rpc.v1.Jobs.Cancel","version":"v1"},"Jobs.DismissDLQ":{"capabilities":{"call":["trellis.jobs::admin.mutate"]},"docs":{"markdown":"Marks one dead-letter job as dismissed.","summary":"Dismiss a dead-letter job."},"errors":[{"type":"UnexpectedError"},{"type":"ValidationError"},{"type":"NotFoundError"}],"input":{"schema":"JobsDismissDLQRequest"},"output":{"schema":"JobsDismissDLQResponse"},"subject":"rpc.v1.Jobs.DismissDLQ","version":"v1"},"Jobs.Get":{"capabilities":{"call":["trellis.jobs::admin.read"]},"docs":{"markdown":"Returns one background job by id.","summary":"Read a job."},"errors":[{"type":"UnexpectedError"},{"type":"ValidationError"},{"type":"NotFoundError"}],"input":{"schema":"JobsGetRequest"},"output":{"schema":"JobsGetResponse"},"subject":"rpc.v1.Jobs.Get","version":"v1"},"Jobs.Health":{"capabilities":{"call":["trellis.jobs::admin.read"]},"docs":{"markdown":"Returns Jobs service health and worker status details.","summary":"Read jobs health."},"errors":[{"type":"UnexpectedError"}],"input":{"schema":"Empty"},"output":{"schema":"JobsHealthResponse"},"subject":"rpc.v1.Jobs.Health","version":"v1"},"Jobs.List":{"capabilities":{"call":["trellis.jobs::admin.read"]},"docs":{"markdown":"Lists jobs matching the requested filters.","summary":"List jobs."},"errors":[{"type":"UnexpectedError"},{"type":"ValidationError"}],"input":{"schema":"JobsListRequest"},"output":{"schema":"JobsListResponse"},"subject":"rpc.v1.Jobs.List","version":"v1"},"Jobs.ListDLQ":{"capabilities":{"call":["trellis.jobs::admin.read"]},"docs":{"markdown":"Lists jobs currently in dead-letter queues.","summary":"List dead-letter jobs."},"errors":[{"type":"UnexpectedError"},{"type":"ValidationError"}],"input":{"schema":"JobsListDLQRequest"},"output":{"schema":"JobsListDLQResponse"},"subject":"rpc.v1.Jobs.ListDLQ","version":"v1"},"Jobs.ListServices":{"capabilities":{"call":["trellis.jobs::admin.read"]},"docs":{"markdown":"Lists services that own or execute background job queues.","summary":"List job services."},"errors":[{"type":"UnexpectedError"},{"type":"ValidationError"}],"input":{"schema":"JobsListServicesRequest"},"output":{"schema":"JobsListServicesResponse"},"subject":"rpc.v1.Jobs.ListServices","version":"v1"},"Jobs.ReplayDLQ":{"capabilities":{"call":["trellis.jobs::admin.mutate"]},"docs":{"markdown":"Moves one dead-letter job back to processing.","summary":"Replay a dead-letter job."},"errors":[{"type":"UnexpectedError"},{"type":"ValidationError"},{"type":"NotFoundError"}],"input":{"schema":"JobsReplayDLQRequest"},"output":{"schema":"JobsReplayDLQResponse"},"subject":"rpc.v1.Jobs.ReplayDLQ","version":"v1"},"Jobs.Retry":{"capabilities":{"call":["trellis.jobs::admin.mutate"]},"docs":{"markdown":"Moves a failed job back into retry processing.","summary":"Retry a job."},"errors":[{"type":"UnexpectedError"},{"type":"ValidationError"},{"type":"NotFoundError"}],"input":{"schema":"JobsRetryRequest"},"output":{"schema":"JobsRetryResponse"},"subject":"rpc.v1.Jobs.Retry","version":"v1"}},"schemas":{"Empty":{"properties":{},"type":"object"},"Job":{"properties":{"completedAt":{"format":"date-time","type":"string"},"context":{"properties":{"requestId":{"minLength":1,"type":"string"},"traceId":{"pattern":"^[0-9a-f]{32}$","type":"string"},"traceparent":{"pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","type":"string"},"tracestate":{"minLength":1,"type":"string"}},"required":["requestId","traceId","traceparent"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deadline":{"format":"date-time","type":"string"},"id":{"minLength":1,"type":"string"},"lastError":{"type":"string"},"logs":{"items":{"properties":{"level":{"anyOf":[{"const":"info","type":"string"},{"const":"warn","type":"string"},{"const":"error","type":"string"}]},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","level","message"],"type":"object"},"type":"array"},"maxTries":{"minimum":1,"type":"integer"},"payload":{},"progress":{"properties":{"current":{"minimum":0,"type":"integer"},"message":{"type":"string"},"step":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"type":"object"},"result":{},"service":{"minLength":1,"type":"string"},"startedAt":{"format":"date-time","type":"string"},"state":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"tries":{"minimum":0,"type":"integer"},"type":{"minLength":1,"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","context","service","type","state","payload","createdAt","updatedAt","tries","maxTries"],"type":"object"},"JobContext":{"properties":{"requestId":{"minLength":1,"type":"string"},"traceId":{"pattern":"^[0-9a-f]{32}$","type":"string"},"traceparent":{"pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","type":"string"},"tracestate":{"minLength":1,"type":"string"}},"required":["requestId","traceId","traceparent"],"type":"object"},"JobLogEntry":{"properties":{"level":{"anyOf":[{"const":"info","type":"string"},{"const":"warn","type":"string"},{"const":"error","type":"string"}]},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","level","message"],"type":"object"},"JobProgress":{"properties":{"current":{"minimum":0,"type":"integer"},"message":{"type":"string"},"step":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"type":"object"},"JobState":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"JobsCancelRequest":{"description":"Jobs admin ids are globally addressable; callers identify jobs by id only.","properties":{"id":{"minLength":1,"type":"string"}},"required":["id"],"type":"object"},"JobsCancelResponse":{"properties":{"job":{"properties":{"completedAt":{"format":"date-time","type":"string"},"context":{"properties":{"requestId":{"minLength":1,"type":"string"},"traceId":{"pattern":"^[0-9a-f]{32}$","type":"string"},"traceparent":{"pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","type":"string"},"tracestate":{"minLength":1,"type":"string"}},"required":["requestId","traceId","traceparent"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deadline":{"format":"date-time","type":"string"},"id":{"minLength":1,"type":"string"},"lastError":{"type":"string"},"logs":{"items":{"properties":{"level":{"anyOf":[{"const":"info","type":"string"},{"const":"warn","type":"string"},{"const":"error","type":"string"}]},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","level","message"],"type":"object"},"type":"array"},"maxTries":{"minimum":1,"type":"integer"},"payload":{},"progress":{"properties":{"current":{"minimum":0,"type":"integer"},"message":{"type":"string"},"step":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"type":"object"},"result":{},"service":{"minLength":1,"type":"string"},"startedAt":{"format":"date-time","type":"string"},"state":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"tries":{"minimum":0,"type":"integer"},"type":{"minLength":1,"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","context","service","type","state","payload","createdAt","updatedAt","tries","maxTries"],"type":"object"}},"required":["job"],"type":"object"},"JobsDismissDLQRequest":{"description":"Jobs admin ids are globally addressable; callers identify jobs by id only.","properties":{"id":{"minLength":1,"type":"string"}},"required":["id"],"type":"object"},"JobsDismissDLQResponse":{"properties":{"job":{"properties":{"completedAt":{"format":"date-time","type":"string"},"context":{"properties":{"requestId":{"minLength":1,"type":"string"},"traceId":{"pattern":"^[0-9a-f]{32}$","type":"string"},"traceparent":{"pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","type":"string"},"tracestate":{"minLength":1,"type":"string"}},"required":["requestId","traceId","traceparent"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deadline":{"format":"date-time","type":"string"},"id":{"minLength":1,"type":"string"},"lastError":{"type":"string"},"logs":{"items":{"properties":{"level":{"anyOf":[{"const":"info","type":"string"},{"const":"warn","type":"string"},{"const":"error","type":"string"}]},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","level","message"],"type":"object"},"type":"array"},"maxTries":{"minimum":1,"type":"integer"},"payload":{},"progress":{"properties":{"current":{"minimum":0,"type":"integer"},"message":{"type":"string"},"step":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"type":"object"},"result":{},"service":{"minLength":1,"type":"string"},"startedAt":{"format":"date-time","type":"string"},"state":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"tries":{"minimum":0,"type":"integer"},"type":{"minLength":1,"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","context","service","type","state","payload","createdAt","updatedAt","tries","maxTries"],"type":"object"}},"required":["job"],"type":"object"},"JobsGetRequest":{"description":"Jobs admin ids are globally addressable; callers identify jobs by id only.","properties":{"id":{"minLength":1,"type":"string"}},"required":["id"],"type":"object"},"JobsGetResponse":{"properties":{"job":{"properties":{"completedAt":{"format":"date-time","type":"string"},"context":{"properties":{"requestId":{"minLength":1,"type":"string"},"traceId":{"pattern":"^[0-9a-f]{32}$","type":"string"},"traceparent":{"pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","type":"string"},"tracestate":{"minLength":1,"type":"string"}},"required":["requestId","traceId","traceparent"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deadline":{"format":"date-time","type":"string"},"id":{"minLength":1,"type":"string"},"lastError":{"type":"string"},"logs":{"items":{"properties":{"level":{"anyOf":[{"const":"info","type":"string"},{"const":"warn","type":"string"},{"const":"error","type":"string"}]},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","level","message"],"type":"object"},"type":"array"},"maxTries":{"minimum":1,"type":"integer"},"payload":{},"progress":{"properties":{"current":{"minimum":0,"type":"integer"},"message":{"type":"string"},"step":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"type":"object"},"result":{},"service":{"minLength":1,"type":"string"},"startedAt":{"format":"date-time","type":"string"},"state":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"tries":{"minimum":0,"type":"integer"},"type":{"minLength":1,"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","context","service","type","state","payload","createdAt","updatedAt","tries","maxTries"],"type":"object"}},"required":["job"],"type":"object"},"JobsHealthResponse":{"properties":{"checks":{"items":{"patternProperties":{"^.*$":{}},"type":"object"},"type":"array"},"service":{"minLength":1,"type":"string"},"status":{},"timestamp":{"format":"date-time","type":"string"}},"required":["service","status","timestamp","checks"],"type":"object"},"JobsListDLQRequest":{"properties":{"limit":{"minimum":1,"type":"integer"},"offset":{"minimum":0,"type":"integer"},"service":{"minLength":1,"type":"string"},"since":{"format":"date-time","type":"string"},"type":{"minLength":1,"type":"string"}},"required":["limit"],"type":"object"},"JobsListDLQResponse":{"properties":{"count":{"minimum":0,"type":"integer"},"entries":{"items":{"properties":{"completedAt":{"format":"date-time","type":"string"},"context":{"properties":{"requestId":{"minLength":1,"type":"string"},"traceId":{"pattern":"^[0-9a-f]{32}$","type":"string"},"traceparent":{"pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","type":"string"},"tracestate":{"minLength":1,"type":"string"}},"required":["requestId","traceId","traceparent"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deadline":{"format":"date-time","type":"string"},"id":{"minLength":1,"type":"string"},"lastError":{"type":"string"},"logs":{"items":{"properties":{"level":{"anyOf":[{"const":"info","type":"string"},{"const":"warn","type":"string"},{"const":"error","type":"string"}]},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","level","message"],"type":"object"},"type":"array"},"maxTries":{"minimum":1,"type":"integer"},"payload":{},"progress":{"properties":{"current":{"minimum":0,"type":"integer"},"message":{"type":"string"},"step":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"type":"object"},"result":{},"service":{"minLength":1,"type":"string"},"startedAt":{"format":"date-time","type":"string"},"state":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"tries":{"minimum":0,"type":"integer"},"type":{"minLength":1,"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","context","service","type","state","payload","createdAt","updatedAt","tries","maxTries"],"type":"object"},"type":"array"},"limit":{"minimum":1,"type":"integer"},"nextOffset":{"minimum":0,"type":"integer"},"offset":{"minimum":0,"type":"integer"}},"required":["entries","count","offset","limit"],"type":"object"},"JobsListRequest":{"properties":{"limit":{"minimum":1,"type":"integer"},"offset":{"minimum":0,"type":"integer"},"service":{"minLength":1,"type":"string"},"since":{"format":"date-time","type":"string"},"state":{"items":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"type":"array"},"type":{"minLength":1,"type":"string"}},"required":["limit"],"type":"object"},"JobsListResponse":{"properties":{"count":{"minimum":0,"type":"integer"},"entries":{"items":{"properties":{"completedAt":{"format":"date-time","type":"string"},"context":{"properties":{"requestId":{"minLength":1,"type":"string"},"traceId":{"pattern":"^[0-9a-f]{32}$","type":"string"},"traceparent":{"pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","type":"string"},"tracestate":{"minLength":1,"type":"string"}},"required":["requestId","traceId","traceparent"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deadline":{"format":"date-time","type":"string"},"id":{"minLength":1,"type":"string"},"lastError":{"type":"string"},"logs":{"items":{"properties":{"level":{"anyOf":[{"const":"info","type":"string"},{"const":"warn","type":"string"},{"const":"error","type":"string"}]},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","level","message"],"type":"object"},"type":"array"},"maxTries":{"minimum":1,"type":"integer"},"payload":{},"progress":{"properties":{"current":{"minimum":0,"type":"integer"},"message":{"type":"string"},"step":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"type":"object"},"result":{},"service":{"minLength":1,"type":"string"},"startedAt":{"format":"date-time","type":"string"},"state":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"tries":{"minimum":0,"type":"integer"},"type":{"minLength":1,"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","context","service","type","state","payload","createdAt","updatedAt","tries","maxTries"],"type":"object"},"type":"array"},"limit":{"minimum":1,"type":"integer"},"nextOffset":{"minimum":0,"type":"integer"},"offset":{"minimum":0,"type":"integer"}},"required":["entries","count","offset","limit"],"type":"object"},"JobsListServicesRequest":{"properties":{"limit":{"minimum":1,"type":"integer"},"offset":{"minimum":0,"type":"integer"}},"required":["limit"],"type":"object"},"JobsListServicesResponse":{"properties":{"count":{"minimum":0,"type":"integer"},"entries":{"items":{"properties":{"healthy":{"type":"boolean"},"name":{"minLength":1,"type":"string"},"workers":{"items":{"properties":{"concurrency":{"minimum":1,"type":"integer"},"instanceId":{"minLength":1,"type":"string"},"jobType":{"minLength":1,"type":"string"},"service":{"minLength":1,"type":"string"},"timestamp":{"format":"date-time","type":"string"},"version":{"minLength":1,"type":"string"}},"required":["service","jobType","instanceId","timestamp"],"type":"object"},"type":"array"}},"required":["name","healthy","workers"],"type":"object"},"type":"array"},"limit":{"minimum":1,"type":"integer"},"nextOffset":{"minimum":0,"type":"integer"},"offset":{"minimum":0,"type":"integer"}},"required":["entries","count","offset","limit"],"type":"object"},"JobsReplayDLQRequest":{"description":"Jobs admin ids are globally addressable; callers identify jobs by id only.","properties":{"id":{"minLength":1,"type":"string"}},"required":["id"],"type":"object"},"JobsReplayDLQResponse":{"properties":{"job":{"properties":{"completedAt":{"format":"date-time","type":"string"},"context":{"properties":{"requestId":{"minLength":1,"type":"string"},"traceId":{"pattern":"^[0-9a-f]{32}$","type":"string"},"traceparent":{"pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","type":"string"},"tracestate":{"minLength":1,"type":"string"}},"required":["requestId","traceId","traceparent"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deadline":{"format":"date-time","type":"string"},"id":{"minLength":1,"type":"string"},"lastError":{"type":"string"},"logs":{"items":{"properties":{"level":{"anyOf":[{"const":"info","type":"string"},{"const":"warn","type":"string"},{"const":"error","type":"string"}]},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","level","message"],"type":"object"},"type":"array"},"maxTries":{"minimum":1,"type":"integer"},"payload":{},"progress":{"properties":{"current":{"minimum":0,"type":"integer"},"message":{"type":"string"},"step":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"type":"object"},"result":{},"service":{"minLength":1,"type":"string"},"startedAt":{"format":"date-time","type":"string"},"state":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"tries":{"minimum":0,"type":"integer"},"type":{"minLength":1,"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","context","service","type","state","payload","createdAt","updatedAt","tries","maxTries"],"type":"object"}},"required":["job"],"type":"object"},"JobsRetryRequest":{"description":"Jobs admin ids are globally addressable; callers identify jobs by id only.","properties":{"id":{"minLength":1,"type":"string"}},"required":["id"],"type":"object"},"JobsRetryResponse":{"properties":{"job":{"properties":{"completedAt":{"format":"date-time","type":"string"},"context":{"properties":{"requestId":{"minLength":1,"type":"string"},"traceId":{"pattern":"^[0-9a-f]{32}$","type":"string"},"traceparent":{"pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$","type":"string"},"tracestate":{"minLength":1,"type":"string"}},"required":["requestId","traceId","traceparent"],"type":"object"},"createdAt":{"format":"date-time","type":"string"},"deadline":{"format":"date-time","type":"string"},"id":{"minLength":1,"type":"string"},"lastError":{"type":"string"},"logs":{"items":{"properties":{"level":{"anyOf":[{"const":"info","type":"string"},{"const":"warn","type":"string"},{"const":"error","type":"string"}]},"message":{"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","level","message"],"type":"object"},"type":"array"},"maxTries":{"minimum":1,"type":"integer"},"payload":{},"progress":{"properties":{"current":{"minimum":0,"type":"integer"},"message":{"type":"string"},"step":{"type":"string"},"total":{"minimum":0,"type":"integer"}},"type":"object"},"result":{},"service":{"minLength":1,"type":"string"},"startedAt":{"format":"date-time","type":"string"},"state":{"anyOf":[{"const":"pending","type":"string"},{"const":"active","type":"string"},{"const":"retry","type":"string"},{"const":"completed","type":"string"},{"const":"failed","type":"string"},{"const":"cancelled","type":"string"},{"const":"expired","type":"string"},{"const":"dead","type":"string"},{"const":"dismissed","type":"string"}]},"tries":{"minimum":0,"type":"integer"},"type":{"minLength":1,"type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","context","service","type","state","payload","createdAt","updatedAt","tries","maxTries"],"type":"object"}},"required":["job"],"type":"object"},"NotFoundErrorData":{"properties":{"context":{"patternProperties":{"^.*$":{}},"type":"object"},"id":{"minLength":1,"type":"string"},"jobId":{"minLength":1,"type":"string"},"message":{"type":"string"},"resource":{"minLength":1,"type":"string"},"traceId":{"type":"string"},"type":{"const":"NotFoundError","type":"string"}},"required":["id","type","message","resource"],"type":"object"}},"uses":{"required":{"auth":{"contract":"trellis.auth@v1","rpc":{"call":["Auth.Requests.Validate"]}},"core":{"contract":"trellis.core@v1","rpc":{"call":["Trellis.Bindings.Get","Trellis.Catalog"]}},"health":{"contract":"trellis.health@v1","events":{"publish":["Health.Heartbeat"]}}}}} as TrellisContractV1;
15
+ export const CONTRACT_DIGEST =
16
+ "jSB8nKGOQqIxdFDdUqO-gOTt3Dijg--SOXJtJ1ChpoY" as const;
17
+ export const CONTRACT = {
18
+ "capabilities": {
19
+ "trellis.jobs::admin.mutate": {
20
+ "consequence": "Can change background job execution state.",
21
+ "description":
22
+ "Cancel, retry, replay, or dismiss Jobs service work items.",
23
+ "displayName": "Mutate jobs admin data",
24
+ },
25
+ "trellis.jobs::admin.read": {
26
+ "description":
27
+ "View Jobs service health, services, jobs, and dead-letter queues.",
28
+ "displayName": "Read jobs admin data",
29
+ },
30
+ },
31
+ "description": "Trellis-managed background job administration API.",
32
+ "displayName": "Trellis Jobs",
33
+ "docs": {
34
+ "markdown":
35
+ "Provides health, service, job, retry, cancel, and dead-letter queue RPCs for Trellis-managed background work.",
36
+ "summary": "Background job administration APIs.",
37
+ },
38
+ "errors": {
39
+ "NotFoundError": {
40
+ "schema": { "schema": "NotFoundErrorData" },
41
+ "type": "NotFoundError",
42
+ },
43
+ },
44
+ "format": "trellis.contract.v1",
45
+ "id": "trellis.jobs@v1",
46
+ "kind": "service",
47
+ "rpc": {
48
+ "Jobs.Cancel": {
49
+ "capabilities": { "call": ["trellis.jobs::admin.mutate"] },
50
+ "docs": {
51
+ "markdown": "Requests cancellation for one background job.",
52
+ "summary": "Cancel a job.",
53
+ },
54
+ "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, {
55
+ "type": "NotFoundError",
56
+ }],
57
+ "input": { "schema": "JobsCancelRequest" },
58
+ "output": { "schema": "JobsCancelResponse" },
59
+ "subject": "rpc.v1.Jobs.Cancel",
60
+ "version": "v1",
61
+ },
62
+ "Jobs.DismissDLQ": {
63
+ "capabilities": { "call": ["trellis.jobs::admin.mutate"] },
64
+ "docs": {
65
+ "markdown": "Marks one dead-letter job as dismissed.",
66
+ "summary": "Dismiss a dead-letter job.",
67
+ },
68
+ "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, {
69
+ "type": "NotFoundError",
70
+ }],
71
+ "input": { "schema": "JobsDismissDLQRequest" },
72
+ "output": { "schema": "JobsDismissDLQResponse" },
73
+ "subject": "rpc.v1.Jobs.DismissDLQ",
74
+ "version": "v1",
75
+ },
76
+ "Jobs.Get": {
77
+ "capabilities": { "call": ["trellis.jobs::admin.read"] },
78
+ "docs": {
79
+ "markdown": "Returns one background job by id.",
80
+ "summary": "Read a job.",
81
+ },
82
+ "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, {
83
+ "type": "NotFoundError",
84
+ }],
85
+ "input": { "schema": "JobsGetRequest" },
86
+ "output": { "schema": "JobsGetResponse" },
87
+ "subject": "rpc.v1.Jobs.Get",
88
+ "version": "v1",
89
+ },
90
+ "Jobs.Health": {
91
+ "capabilities": { "call": ["trellis.jobs::admin.read"] },
92
+ "docs": {
93
+ "markdown": "Returns Jobs service health and worker status details.",
94
+ "summary": "Read jobs health.",
95
+ },
96
+ "errors": [{ "type": "UnexpectedError" }],
97
+ "input": { "schema": "Empty" },
98
+ "output": { "schema": "JobsHealthResponse" },
99
+ "subject": "rpc.v1.Jobs.Health",
100
+ "version": "v1",
101
+ },
102
+ "Jobs.List": {
103
+ "capabilities": { "call": ["trellis.jobs::admin.read"] },
104
+ "docs": {
105
+ "markdown": "Lists jobs matching the requested filters.",
106
+ "summary": "List jobs.",
107
+ },
108
+ "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }],
109
+ "input": { "schema": "JobsListRequest" },
110
+ "output": { "schema": "JobsListResponse" },
111
+ "subject": "rpc.v1.Jobs.List",
112
+ "version": "v1",
113
+ },
114
+ "Jobs.ListDLQ": {
115
+ "capabilities": { "call": ["trellis.jobs::admin.read"] },
116
+ "docs": {
117
+ "markdown": "Lists jobs currently in dead-letter queues.",
118
+ "summary": "List dead-letter jobs.",
119
+ },
120
+ "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }],
121
+ "input": { "schema": "JobsListDLQRequest" },
122
+ "output": { "schema": "JobsListDLQResponse" },
123
+ "subject": "rpc.v1.Jobs.ListDLQ",
124
+ "version": "v1",
125
+ },
126
+ "Jobs.ListServices": {
127
+ "capabilities": { "call": ["trellis.jobs::admin.read"] },
128
+ "docs": {
129
+ "markdown": "Lists services that own or execute background job queues.",
130
+ "summary": "List job services.",
131
+ },
132
+ "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }],
133
+ "input": { "schema": "JobsListServicesRequest" },
134
+ "output": { "schema": "JobsListServicesResponse" },
135
+ "subject": "rpc.v1.Jobs.ListServices",
136
+ "version": "v1",
137
+ },
138
+ "Jobs.ReplayDLQ": {
139
+ "capabilities": { "call": ["trellis.jobs::admin.mutate"] },
140
+ "docs": {
141
+ "markdown": "Moves one dead-letter job back to processing.",
142
+ "summary": "Replay a dead-letter job.",
143
+ },
144
+ "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, {
145
+ "type": "NotFoundError",
146
+ }],
147
+ "input": { "schema": "JobsReplayDLQRequest" },
148
+ "output": { "schema": "JobsReplayDLQResponse" },
149
+ "subject": "rpc.v1.Jobs.ReplayDLQ",
150
+ "version": "v1",
151
+ },
152
+ "Jobs.Retry": {
153
+ "capabilities": { "call": ["trellis.jobs::admin.mutate"] },
154
+ "docs": {
155
+ "markdown": "Moves a failed job back into retry processing.",
156
+ "summary": "Retry a job.",
157
+ },
158
+ "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, {
159
+ "type": "NotFoundError",
160
+ }],
161
+ "input": { "schema": "JobsRetryRequest" },
162
+ "output": { "schema": "JobsRetryResponse" },
163
+ "subject": "rpc.v1.Jobs.Retry",
164
+ "version": "v1",
165
+ },
166
+ },
167
+ "schemas": {
168
+ "Empty": { "properties": {}, "type": "object" },
169
+ "Job": {
170
+ "properties": {
171
+ "completedAt": { "format": "date-time", "type": "string" },
172
+ "context": {
173
+ "properties": {
174
+ "requestId": { "minLength": 1, "type": "string" },
175
+ "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" },
176
+ "traceparent": {
177
+ "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$",
178
+ "type": "string",
179
+ },
180
+ "tracestate": { "minLength": 1, "type": "string" },
181
+ },
182
+ "required": ["requestId", "traceId", "traceparent"],
183
+ "type": "object",
184
+ },
185
+ "createdAt": { "format": "date-time", "type": "string" },
186
+ "deadline": { "format": "date-time", "type": "string" },
187
+ "id": { "minLength": 1, "type": "string" },
188
+ "lastError": { "type": "string" },
189
+ "logs": {
190
+ "items": {
191
+ "properties": {
192
+ "level": {
193
+ "anyOf": [{ "const": "info", "type": "string" }, {
194
+ "const": "warn",
195
+ "type": "string",
196
+ }, { "const": "error", "type": "string" }],
197
+ },
198
+ "message": { "type": "string" },
199
+ "timestamp": { "format": "date-time", "type": "string" },
200
+ },
201
+ "required": ["timestamp", "level", "message"],
202
+ "type": "object",
203
+ },
204
+ "type": "array",
205
+ },
206
+ "maxTries": { "minimum": 1, "type": "integer" },
207
+ "payload": {},
208
+ "progress": {
209
+ "properties": {
210
+ "current": { "minimum": 0, "type": "integer" },
211
+ "message": { "type": "string" },
212
+ "step": { "type": "string" },
213
+ "total": { "minimum": 0, "type": "integer" },
214
+ },
215
+ "type": "object",
216
+ },
217
+ "result": {},
218
+ "service": { "minLength": 1, "type": "string" },
219
+ "startedAt": { "format": "date-time", "type": "string" },
220
+ "state": {
221
+ "anyOf": [
222
+ { "const": "pending", "type": "string" },
223
+ { "const": "active", "type": "string" },
224
+ { "const": "retry", "type": "string" },
225
+ { "const": "completed", "type": "string" },
226
+ { "const": "failed", "type": "string" },
227
+ { "const": "cancelled", "type": "string" },
228
+ { "const": "expired", "type": "string" },
229
+ { "const": "dead", "type": "string" },
230
+ { "const": "dismissed", "type": "string" },
231
+ ],
232
+ },
233
+ "tries": { "minimum": 0, "type": "integer" },
234
+ "type": { "minLength": 1, "type": "string" },
235
+ "updatedAt": { "format": "date-time", "type": "string" },
236
+ },
237
+ "required": [
238
+ "id",
239
+ "context",
240
+ "service",
241
+ "type",
242
+ "state",
243
+ "payload",
244
+ "createdAt",
245
+ "updatedAt",
246
+ "tries",
247
+ "maxTries",
248
+ ],
249
+ "type": "object",
250
+ },
251
+ "JobContext": {
252
+ "properties": {
253
+ "requestId": { "minLength": 1, "type": "string" },
254
+ "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" },
255
+ "traceparent": {
256
+ "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$",
257
+ "type": "string",
258
+ },
259
+ "tracestate": { "minLength": 1, "type": "string" },
260
+ },
261
+ "required": ["requestId", "traceId", "traceparent"],
262
+ "type": "object",
263
+ },
264
+ "JobLogEntry": {
265
+ "properties": {
266
+ "level": {
267
+ "anyOf": [{ "const": "info", "type": "string" }, {
268
+ "const": "warn",
269
+ "type": "string",
270
+ }, { "const": "error", "type": "string" }],
271
+ },
272
+ "message": { "type": "string" },
273
+ "timestamp": { "format": "date-time", "type": "string" },
274
+ },
275
+ "required": ["timestamp", "level", "message"],
276
+ "type": "object",
277
+ },
278
+ "JobProgress": {
279
+ "properties": {
280
+ "current": { "minimum": 0, "type": "integer" },
281
+ "message": { "type": "string" },
282
+ "step": { "type": "string" },
283
+ "total": { "minimum": 0, "type": "integer" },
284
+ },
285
+ "type": "object",
286
+ },
287
+ "JobState": {
288
+ "anyOf": [
289
+ { "const": "pending", "type": "string" },
290
+ { "const": "active", "type": "string" },
291
+ { "const": "retry", "type": "string" },
292
+ { "const": "completed", "type": "string" },
293
+ { "const": "failed", "type": "string" },
294
+ { "const": "cancelled", "type": "string" },
295
+ { "const": "expired", "type": "string" },
296
+ { "const": "dead", "type": "string" },
297
+ { "const": "dismissed", "type": "string" },
298
+ ],
299
+ },
300
+ "JobsCancelRequest": {
301
+ "description":
302
+ "Jobs admin ids are globally addressable; callers identify jobs by id only.",
303
+ "properties": { "id": { "minLength": 1, "type": "string" } },
304
+ "required": ["id"],
305
+ "type": "object",
306
+ },
307
+ "JobsCancelResponse": {
308
+ "properties": {
309
+ "job": {
310
+ "properties": {
311
+ "completedAt": { "format": "date-time", "type": "string" },
312
+ "context": {
313
+ "properties": {
314
+ "requestId": { "minLength": 1, "type": "string" },
315
+ "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" },
316
+ "traceparent": {
317
+ "pattern":
318
+ "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$",
319
+ "type": "string",
320
+ },
321
+ "tracestate": { "minLength": 1, "type": "string" },
322
+ },
323
+ "required": ["requestId", "traceId", "traceparent"],
324
+ "type": "object",
325
+ },
326
+ "createdAt": { "format": "date-time", "type": "string" },
327
+ "deadline": { "format": "date-time", "type": "string" },
328
+ "id": { "minLength": 1, "type": "string" },
329
+ "lastError": { "type": "string" },
330
+ "logs": {
331
+ "items": {
332
+ "properties": {
333
+ "level": {
334
+ "anyOf": [{ "const": "info", "type": "string" }, {
335
+ "const": "warn",
336
+ "type": "string",
337
+ }, { "const": "error", "type": "string" }],
338
+ },
339
+ "message": { "type": "string" },
340
+ "timestamp": { "format": "date-time", "type": "string" },
341
+ },
342
+ "required": ["timestamp", "level", "message"],
343
+ "type": "object",
344
+ },
345
+ "type": "array",
346
+ },
347
+ "maxTries": { "minimum": 1, "type": "integer" },
348
+ "payload": {},
349
+ "progress": {
350
+ "properties": {
351
+ "current": { "minimum": 0, "type": "integer" },
352
+ "message": { "type": "string" },
353
+ "step": { "type": "string" },
354
+ "total": { "minimum": 0, "type": "integer" },
355
+ },
356
+ "type": "object",
357
+ },
358
+ "result": {},
359
+ "service": { "minLength": 1, "type": "string" },
360
+ "startedAt": { "format": "date-time", "type": "string" },
361
+ "state": {
362
+ "anyOf": [
363
+ { "const": "pending", "type": "string" },
364
+ { "const": "active", "type": "string" },
365
+ { "const": "retry", "type": "string" },
366
+ { "const": "completed", "type": "string" },
367
+ { "const": "failed", "type": "string" },
368
+ { "const": "cancelled", "type": "string" },
369
+ { "const": "expired", "type": "string" },
370
+ { "const": "dead", "type": "string" },
371
+ { "const": "dismissed", "type": "string" },
372
+ ],
373
+ },
374
+ "tries": { "minimum": 0, "type": "integer" },
375
+ "type": { "minLength": 1, "type": "string" },
376
+ "updatedAt": { "format": "date-time", "type": "string" },
377
+ },
378
+ "required": [
379
+ "id",
380
+ "context",
381
+ "service",
382
+ "type",
383
+ "state",
384
+ "payload",
385
+ "createdAt",
386
+ "updatedAt",
387
+ "tries",
388
+ "maxTries",
389
+ ],
390
+ "type": "object",
391
+ },
392
+ },
393
+ "required": ["job"],
394
+ "type": "object",
395
+ },
396
+ "JobsDismissDLQRequest": {
397
+ "description":
398
+ "Jobs admin ids are globally addressable; callers identify jobs by id only.",
399
+ "properties": { "id": { "minLength": 1, "type": "string" } },
400
+ "required": ["id"],
401
+ "type": "object",
402
+ },
403
+ "JobsDismissDLQResponse": {
404
+ "properties": {
405
+ "job": {
406
+ "properties": {
407
+ "completedAt": { "format": "date-time", "type": "string" },
408
+ "context": {
409
+ "properties": {
410
+ "requestId": { "minLength": 1, "type": "string" },
411
+ "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" },
412
+ "traceparent": {
413
+ "pattern":
414
+ "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$",
415
+ "type": "string",
416
+ },
417
+ "tracestate": { "minLength": 1, "type": "string" },
418
+ },
419
+ "required": ["requestId", "traceId", "traceparent"],
420
+ "type": "object",
421
+ },
422
+ "createdAt": { "format": "date-time", "type": "string" },
423
+ "deadline": { "format": "date-time", "type": "string" },
424
+ "id": { "minLength": 1, "type": "string" },
425
+ "lastError": { "type": "string" },
426
+ "logs": {
427
+ "items": {
428
+ "properties": {
429
+ "level": {
430
+ "anyOf": [{ "const": "info", "type": "string" }, {
431
+ "const": "warn",
432
+ "type": "string",
433
+ }, { "const": "error", "type": "string" }],
434
+ },
435
+ "message": { "type": "string" },
436
+ "timestamp": { "format": "date-time", "type": "string" },
437
+ },
438
+ "required": ["timestamp", "level", "message"],
439
+ "type": "object",
440
+ },
441
+ "type": "array",
442
+ },
443
+ "maxTries": { "minimum": 1, "type": "integer" },
444
+ "payload": {},
445
+ "progress": {
446
+ "properties": {
447
+ "current": { "minimum": 0, "type": "integer" },
448
+ "message": { "type": "string" },
449
+ "step": { "type": "string" },
450
+ "total": { "minimum": 0, "type": "integer" },
451
+ },
452
+ "type": "object",
453
+ },
454
+ "result": {},
455
+ "service": { "minLength": 1, "type": "string" },
456
+ "startedAt": { "format": "date-time", "type": "string" },
457
+ "state": {
458
+ "anyOf": [
459
+ { "const": "pending", "type": "string" },
460
+ { "const": "active", "type": "string" },
461
+ { "const": "retry", "type": "string" },
462
+ { "const": "completed", "type": "string" },
463
+ { "const": "failed", "type": "string" },
464
+ { "const": "cancelled", "type": "string" },
465
+ { "const": "expired", "type": "string" },
466
+ { "const": "dead", "type": "string" },
467
+ { "const": "dismissed", "type": "string" },
468
+ ],
469
+ },
470
+ "tries": { "minimum": 0, "type": "integer" },
471
+ "type": { "minLength": 1, "type": "string" },
472
+ "updatedAt": { "format": "date-time", "type": "string" },
473
+ },
474
+ "required": [
475
+ "id",
476
+ "context",
477
+ "service",
478
+ "type",
479
+ "state",
480
+ "payload",
481
+ "createdAt",
482
+ "updatedAt",
483
+ "tries",
484
+ "maxTries",
485
+ ],
486
+ "type": "object",
487
+ },
488
+ },
489
+ "required": ["job"],
490
+ "type": "object",
491
+ },
492
+ "JobsGetRequest": {
493
+ "description":
494
+ "Jobs admin ids are globally addressable; callers identify jobs by id only.",
495
+ "properties": { "id": { "minLength": 1, "type": "string" } },
496
+ "required": ["id"],
497
+ "type": "object",
498
+ },
499
+ "JobsGetResponse": {
500
+ "properties": {
501
+ "job": {
502
+ "properties": {
503
+ "completedAt": { "format": "date-time", "type": "string" },
504
+ "context": {
505
+ "properties": {
506
+ "requestId": { "minLength": 1, "type": "string" },
507
+ "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" },
508
+ "traceparent": {
509
+ "pattern":
510
+ "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$",
511
+ "type": "string",
512
+ },
513
+ "tracestate": { "minLength": 1, "type": "string" },
514
+ },
515
+ "required": ["requestId", "traceId", "traceparent"],
516
+ "type": "object",
517
+ },
518
+ "createdAt": { "format": "date-time", "type": "string" },
519
+ "deadline": { "format": "date-time", "type": "string" },
520
+ "id": { "minLength": 1, "type": "string" },
521
+ "lastError": { "type": "string" },
522
+ "logs": {
523
+ "items": {
524
+ "properties": {
525
+ "level": {
526
+ "anyOf": [{ "const": "info", "type": "string" }, {
527
+ "const": "warn",
528
+ "type": "string",
529
+ }, { "const": "error", "type": "string" }],
530
+ },
531
+ "message": { "type": "string" },
532
+ "timestamp": { "format": "date-time", "type": "string" },
533
+ },
534
+ "required": ["timestamp", "level", "message"],
535
+ "type": "object",
536
+ },
537
+ "type": "array",
538
+ },
539
+ "maxTries": { "minimum": 1, "type": "integer" },
540
+ "payload": {},
541
+ "progress": {
542
+ "properties": {
543
+ "current": { "minimum": 0, "type": "integer" },
544
+ "message": { "type": "string" },
545
+ "step": { "type": "string" },
546
+ "total": { "minimum": 0, "type": "integer" },
547
+ },
548
+ "type": "object",
549
+ },
550
+ "result": {},
551
+ "service": { "minLength": 1, "type": "string" },
552
+ "startedAt": { "format": "date-time", "type": "string" },
553
+ "state": {
554
+ "anyOf": [
555
+ { "const": "pending", "type": "string" },
556
+ { "const": "active", "type": "string" },
557
+ { "const": "retry", "type": "string" },
558
+ { "const": "completed", "type": "string" },
559
+ { "const": "failed", "type": "string" },
560
+ { "const": "cancelled", "type": "string" },
561
+ { "const": "expired", "type": "string" },
562
+ { "const": "dead", "type": "string" },
563
+ { "const": "dismissed", "type": "string" },
564
+ ],
565
+ },
566
+ "tries": { "minimum": 0, "type": "integer" },
567
+ "type": { "minLength": 1, "type": "string" },
568
+ "updatedAt": { "format": "date-time", "type": "string" },
569
+ },
570
+ "required": [
571
+ "id",
572
+ "context",
573
+ "service",
574
+ "type",
575
+ "state",
576
+ "payload",
577
+ "createdAt",
578
+ "updatedAt",
579
+ "tries",
580
+ "maxTries",
581
+ ],
582
+ "type": "object",
583
+ },
584
+ },
585
+ "required": ["job"],
586
+ "type": "object",
587
+ },
588
+ "JobsHealthResponse": {
589
+ "properties": {
590
+ "checks": {
591
+ "items": { "patternProperties": { "^.*$": {} }, "type": "object" },
592
+ "type": "array",
593
+ },
594
+ "service": { "minLength": 1, "type": "string" },
595
+ "status": {},
596
+ "timestamp": { "format": "date-time", "type": "string" },
597
+ },
598
+ "required": ["service", "status", "timestamp", "checks"],
599
+ "type": "object",
600
+ },
601
+ "JobsListDLQRequest": {
602
+ "properties": {
603
+ "limit": { "minimum": 1, "type": "integer" },
604
+ "offset": { "minimum": 0, "type": "integer" },
605
+ "service": { "minLength": 1, "type": "string" },
606
+ "since": { "format": "date-time", "type": "string" },
607
+ "type": { "minLength": 1, "type": "string" },
608
+ },
609
+ "required": ["limit"],
610
+ "type": "object",
611
+ },
612
+ "JobsListDLQResponse": {
613
+ "properties": {
614
+ "count": { "minimum": 0, "type": "integer" },
615
+ "entries": {
616
+ "items": {
617
+ "properties": {
618
+ "completedAt": { "format": "date-time", "type": "string" },
619
+ "context": {
620
+ "properties": {
621
+ "requestId": { "minLength": 1, "type": "string" },
622
+ "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" },
623
+ "traceparent": {
624
+ "pattern":
625
+ "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$",
626
+ "type": "string",
627
+ },
628
+ "tracestate": { "minLength": 1, "type": "string" },
629
+ },
630
+ "required": ["requestId", "traceId", "traceparent"],
631
+ "type": "object",
632
+ },
633
+ "createdAt": { "format": "date-time", "type": "string" },
634
+ "deadline": { "format": "date-time", "type": "string" },
635
+ "id": { "minLength": 1, "type": "string" },
636
+ "lastError": { "type": "string" },
637
+ "logs": {
638
+ "items": {
639
+ "properties": {
640
+ "level": {
641
+ "anyOf": [{ "const": "info", "type": "string" }, {
642
+ "const": "warn",
643
+ "type": "string",
644
+ }, { "const": "error", "type": "string" }],
645
+ },
646
+ "message": { "type": "string" },
647
+ "timestamp": { "format": "date-time", "type": "string" },
648
+ },
649
+ "required": ["timestamp", "level", "message"],
650
+ "type": "object",
651
+ },
652
+ "type": "array",
653
+ },
654
+ "maxTries": { "minimum": 1, "type": "integer" },
655
+ "payload": {},
656
+ "progress": {
657
+ "properties": {
658
+ "current": { "minimum": 0, "type": "integer" },
659
+ "message": { "type": "string" },
660
+ "step": { "type": "string" },
661
+ "total": { "minimum": 0, "type": "integer" },
662
+ },
663
+ "type": "object",
664
+ },
665
+ "result": {},
666
+ "service": { "minLength": 1, "type": "string" },
667
+ "startedAt": { "format": "date-time", "type": "string" },
668
+ "state": {
669
+ "anyOf": [
670
+ { "const": "pending", "type": "string" },
671
+ { "const": "active", "type": "string" },
672
+ { "const": "retry", "type": "string" },
673
+ { "const": "completed", "type": "string" },
674
+ { "const": "failed", "type": "string" },
675
+ { "const": "cancelled", "type": "string" },
676
+ { "const": "expired", "type": "string" },
677
+ { "const": "dead", "type": "string" },
678
+ { "const": "dismissed", "type": "string" },
679
+ ],
680
+ },
681
+ "tries": { "minimum": 0, "type": "integer" },
682
+ "type": { "minLength": 1, "type": "string" },
683
+ "updatedAt": { "format": "date-time", "type": "string" },
684
+ },
685
+ "required": [
686
+ "id",
687
+ "context",
688
+ "service",
689
+ "type",
690
+ "state",
691
+ "payload",
692
+ "createdAt",
693
+ "updatedAt",
694
+ "tries",
695
+ "maxTries",
696
+ ],
697
+ "type": "object",
698
+ },
699
+ "type": "array",
700
+ },
701
+ "limit": { "minimum": 1, "type": "integer" },
702
+ "nextOffset": { "minimum": 0, "type": "integer" },
703
+ "offset": { "minimum": 0, "type": "integer" },
704
+ },
705
+ "required": ["entries", "count", "offset", "limit"],
706
+ "type": "object",
707
+ },
708
+ "JobsListRequest": {
709
+ "properties": {
710
+ "limit": { "minimum": 1, "type": "integer" },
711
+ "offset": { "minimum": 0, "type": "integer" },
712
+ "service": { "minLength": 1, "type": "string" },
713
+ "since": { "format": "date-time", "type": "string" },
714
+ "state": {
715
+ "items": {
716
+ "anyOf": [
717
+ { "const": "pending", "type": "string" },
718
+ { "const": "active", "type": "string" },
719
+ { "const": "retry", "type": "string" },
720
+ { "const": "completed", "type": "string" },
721
+ { "const": "failed", "type": "string" },
722
+ { "const": "cancelled", "type": "string" },
723
+ { "const": "expired", "type": "string" },
724
+ { "const": "dead", "type": "string" },
725
+ { "const": "dismissed", "type": "string" },
726
+ ],
727
+ },
728
+ "type": "array",
729
+ },
730
+ "type": { "minLength": 1, "type": "string" },
731
+ },
732
+ "required": ["limit"],
733
+ "type": "object",
734
+ },
735
+ "JobsListResponse": {
736
+ "properties": {
737
+ "count": { "minimum": 0, "type": "integer" },
738
+ "entries": {
739
+ "items": {
740
+ "properties": {
741
+ "completedAt": { "format": "date-time", "type": "string" },
742
+ "context": {
743
+ "properties": {
744
+ "requestId": { "minLength": 1, "type": "string" },
745
+ "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" },
746
+ "traceparent": {
747
+ "pattern":
748
+ "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$",
749
+ "type": "string",
750
+ },
751
+ "tracestate": { "minLength": 1, "type": "string" },
752
+ },
753
+ "required": ["requestId", "traceId", "traceparent"],
754
+ "type": "object",
755
+ },
756
+ "createdAt": { "format": "date-time", "type": "string" },
757
+ "deadline": { "format": "date-time", "type": "string" },
758
+ "id": { "minLength": 1, "type": "string" },
759
+ "lastError": { "type": "string" },
760
+ "logs": {
761
+ "items": {
762
+ "properties": {
763
+ "level": {
764
+ "anyOf": [{ "const": "info", "type": "string" }, {
765
+ "const": "warn",
766
+ "type": "string",
767
+ }, { "const": "error", "type": "string" }],
768
+ },
769
+ "message": { "type": "string" },
770
+ "timestamp": { "format": "date-time", "type": "string" },
771
+ },
772
+ "required": ["timestamp", "level", "message"],
773
+ "type": "object",
774
+ },
775
+ "type": "array",
776
+ },
777
+ "maxTries": { "minimum": 1, "type": "integer" },
778
+ "payload": {},
779
+ "progress": {
780
+ "properties": {
781
+ "current": { "minimum": 0, "type": "integer" },
782
+ "message": { "type": "string" },
783
+ "step": { "type": "string" },
784
+ "total": { "minimum": 0, "type": "integer" },
785
+ },
786
+ "type": "object",
787
+ },
788
+ "result": {},
789
+ "service": { "minLength": 1, "type": "string" },
790
+ "startedAt": { "format": "date-time", "type": "string" },
791
+ "state": {
792
+ "anyOf": [
793
+ { "const": "pending", "type": "string" },
794
+ { "const": "active", "type": "string" },
795
+ { "const": "retry", "type": "string" },
796
+ { "const": "completed", "type": "string" },
797
+ { "const": "failed", "type": "string" },
798
+ { "const": "cancelled", "type": "string" },
799
+ { "const": "expired", "type": "string" },
800
+ { "const": "dead", "type": "string" },
801
+ { "const": "dismissed", "type": "string" },
802
+ ],
803
+ },
804
+ "tries": { "minimum": 0, "type": "integer" },
805
+ "type": { "minLength": 1, "type": "string" },
806
+ "updatedAt": { "format": "date-time", "type": "string" },
807
+ },
808
+ "required": [
809
+ "id",
810
+ "context",
811
+ "service",
812
+ "type",
813
+ "state",
814
+ "payload",
815
+ "createdAt",
816
+ "updatedAt",
817
+ "tries",
818
+ "maxTries",
819
+ ],
820
+ "type": "object",
821
+ },
822
+ "type": "array",
823
+ },
824
+ "limit": { "minimum": 1, "type": "integer" },
825
+ "nextOffset": { "minimum": 0, "type": "integer" },
826
+ "offset": { "minimum": 0, "type": "integer" },
827
+ },
828
+ "required": ["entries", "count", "offset", "limit"],
829
+ "type": "object",
830
+ },
831
+ "JobsListServicesRequest": {
832
+ "properties": {
833
+ "limit": { "minimum": 1, "type": "integer" },
834
+ "offset": { "minimum": 0, "type": "integer" },
835
+ },
836
+ "required": ["limit"],
837
+ "type": "object",
838
+ },
839
+ "JobsListServicesResponse": {
840
+ "properties": {
841
+ "count": { "minimum": 0, "type": "integer" },
842
+ "entries": {
843
+ "items": {
844
+ "properties": {
845
+ "healthy": { "type": "boolean" },
846
+ "name": { "minLength": 1, "type": "string" },
847
+ "workers": {
848
+ "items": {
849
+ "properties": {
850
+ "concurrency": { "minimum": 1, "type": "integer" },
851
+ "instanceId": { "minLength": 1, "type": "string" },
852
+ "jobType": { "minLength": 1, "type": "string" },
853
+ "service": { "minLength": 1, "type": "string" },
854
+ "timestamp": { "format": "date-time", "type": "string" },
855
+ "version": { "minLength": 1, "type": "string" },
856
+ },
857
+ "required": ["service", "jobType", "instanceId", "timestamp"],
858
+ "type": "object",
859
+ },
860
+ "type": "array",
861
+ },
862
+ },
863
+ "required": ["name", "healthy", "workers"],
864
+ "type": "object",
865
+ },
866
+ "type": "array",
867
+ },
868
+ "limit": { "minimum": 1, "type": "integer" },
869
+ "nextOffset": { "minimum": 0, "type": "integer" },
870
+ "offset": { "minimum": 0, "type": "integer" },
871
+ },
872
+ "required": ["entries", "count", "offset", "limit"],
873
+ "type": "object",
874
+ },
875
+ "JobsReplayDLQRequest": {
876
+ "description":
877
+ "Jobs admin ids are globally addressable; callers identify jobs by id only.",
878
+ "properties": { "id": { "minLength": 1, "type": "string" } },
879
+ "required": ["id"],
880
+ "type": "object",
881
+ },
882
+ "JobsReplayDLQResponse": {
883
+ "properties": {
884
+ "job": {
885
+ "properties": {
886
+ "completedAt": { "format": "date-time", "type": "string" },
887
+ "context": {
888
+ "properties": {
889
+ "requestId": { "minLength": 1, "type": "string" },
890
+ "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" },
891
+ "traceparent": {
892
+ "pattern":
893
+ "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$",
894
+ "type": "string",
895
+ },
896
+ "tracestate": { "minLength": 1, "type": "string" },
897
+ },
898
+ "required": ["requestId", "traceId", "traceparent"],
899
+ "type": "object",
900
+ },
901
+ "createdAt": { "format": "date-time", "type": "string" },
902
+ "deadline": { "format": "date-time", "type": "string" },
903
+ "id": { "minLength": 1, "type": "string" },
904
+ "lastError": { "type": "string" },
905
+ "logs": {
906
+ "items": {
907
+ "properties": {
908
+ "level": {
909
+ "anyOf": [{ "const": "info", "type": "string" }, {
910
+ "const": "warn",
911
+ "type": "string",
912
+ }, { "const": "error", "type": "string" }],
913
+ },
914
+ "message": { "type": "string" },
915
+ "timestamp": { "format": "date-time", "type": "string" },
916
+ },
917
+ "required": ["timestamp", "level", "message"],
918
+ "type": "object",
919
+ },
920
+ "type": "array",
921
+ },
922
+ "maxTries": { "minimum": 1, "type": "integer" },
923
+ "payload": {},
924
+ "progress": {
925
+ "properties": {
926
+ "current": { "minimum": 0, "type": "integer" },
927
+ "message": { "type": "string" },
928
+ "step": { "type": "string" },
929
+ "total": { "minimum": 0, "type": "integer" },
930
+ },
931
+ "type": "object",
932
+ },
933
+ "result": {},
934
+ "service": { "minLength": 1, "type": "string" },
935
+ "startedAt": { "format": "date-time", "type": "string" },
936
+ "state": {
937
+ "anyOf": [
938
+ { "const": "pending", "type": "string" },
939
+ { "const": "active", "type": "string" },
940
+ { "const": "retry", "type": "string" },
941
+ { "const": "completed", "type": "string" },
942
+ { "const": "failed", "type": "string" },
943
+ { "const": "cancelled", "type": "string" },
944
+ { "const": "expired", "type": "string" },
945
+ { "const": "dead", "type": "string" },
946
+ { "const": "dismissed", "type": "string" },
947
+ ],
948
+ },
949
+ "tries": { "minimum": 0, "type": "integer" },
950
+ "type": { "minLength": 1, "type": "string" },
951
+ "updatedAt": { "format": "date-time", "type": "string" },
952
+ },
953
+ "required": [
954
+ "id",
955
+ "context",
956
+ "service",
957
+ "type",
958
+ "state",
959
+ "payload",
960
+ "createdAt",
961
+ "updatedAt",
962
+ "tries",
963
+ "maxTries",
964
+ ],
965
+ "type": "object",
966
+ },
967
+ },
968
+ "required": ["job"],
969
+ "type": "object",
970
+ },
971
+ "JobsRetryRequest": {
972
+ "description":
973
+ "Jobs admin ids are globally addressable; callers identify jobs by id only.",
974
+ "properties": { "id": { "minLength": 1, "type": "string" } },
975
+ "required": ["id"],
976
+ "type": "object",
977
+ },
978
+ "JobsRetryResponse": {
979
+ "properties": {
980
+ "job": {
981
+ "properties": {
982
+ "completedAt": { "format": "date-time", "type": "string" },
983
+ "context": {
984
+ "properties": {
985
+ "requestId": { "minLength": 1, "type": "string" },
986
+ "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" },
987
+ "traceparent": {
988
+ "pattern":
989
+ "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$",
990
+ "type": "string",
991
+ },
992
+ "tracestate": { "minLength": 1, "type": "string" },
993
+ },
994
+ "required": ["requestId", "traceId", "traceparent"],
995
+ "type": "object",
996
+ },
997
+ "createdAt": { "format": "date-time", "type": "string" },
998
+ "deadline": { "format": "date-time", "type": "string" },
999
+ "id": { "minLength": 1, "type": "string" },
1000
+ "lastError": { "type": "string" },
1001
+ "logs": {
1002
+ "items": {
1003
+ "properties": {
1004
+ "level": {
1005
+ "anyOf": [{ "const": "info", "type": "string" }, {
1006
+ "const": "warn",
1007
+ "type": "string",
1008
+ }, { "const": "error", "type": "string" }],
1009
+ },
1010
+ "message": { "type": "string" },
1011
+ "timestamp": { "format": "date-time", "type": "string" },
1012
+ },
1013
+ "required": ["timestamp", "level", "message"],
1014
+ "type": "object",
1015
+ },
1016
+ "type": "array",
1017
+ },
1018
+ "maxTries": { "minimum": 1, "type": "integer" },
1019
+ "payload": {},
1020
+ "progress": {
1021
+ "properties": {
1022
+ "current": { "minimum": 0, "type": "integer" },
1023
+ "message": { "type": "string" },
1024
+ "step": { "type": "string" },
1025
+ "total": { "minimum": 0, "type": "integer" },
1026
+ },
1027
+ "type": "object",
1028
+ },
1029
+ "result": {},
1030
+ "service": { "minLength": 1, "type": "string" },
1031
+ "startedAt": { "format": "date-time", "type": "string" },
1032
+ "state": {
1033
+ "anyOf": [
1034
+ { "const": "pending", "type": "string" },
1035
+ { "const": "active", "type": "string" },
1036
+ { "const": "retry", "type": "string" },
1037
+ { "const": "completed", "type": "string" },
1038
+ { "const": "failed", "type": "string" },
1039
+ { "const": "cancelled", "type": "string" },
1040
+ { "const": "expired", "type": "string" },
1041
+ { "const": "dead", "type": "string" },
1042
+ { "const": "dismissed", "type": "string" },
1043
+ ],
1044
+ },
1045
+ "tries": { "minimum": 0, "type": "integer" },
1046
+ "type": { "minLength": 1, "type": "string" },
1047
+ "updatedAt": { "format": "date-time", "type": "string" },
1048
+ },
1049
+ "required": [
1050
+ "id",
1051
+ "context",
1052
+ "service",
1053
+ "type",
1054
+ "state",
1055
+ "payload",
1056
+ "createdAt",
1057
+ "updatedAt",
1058
+ "tries",
1059
+ "maxTries",
1060
+ ],
1061
+ "type": "object",
1062
+ },
1063
+ },
1064
+ "required": ["job"],
1065
+ "type": "object",
1066
+ },
1067
+ "NotFoundErrorData": {
1068
+ "properties": {
1069
+ "context": { "patternProperties": { "^.*$": {} }, "type": "object" },
1070
+ "id": { "minLength": 1, "type": "string" },
1071
+ "jobId": { "minLength": 1, "type": "string" },
1072
+ "message": { "type": "string" },
1073
+ "resource": { "minLength": 1, "type": "string" },
1074
+ "traceId": { "type": "string" },
1075
+ "type": { "const": "NotFoundError", "type": "string" },
1076
+ },
1077
+ "required": ["id", "type", "message", "resource"],
1078
+ "type": "object",
1079
+ },
1080
+ },
1081
+ "uses": {
1082
+ "required": {
1083
+ "auth": {
1084
+ "contract": "trellis.auth@v1",
1085
+ "rpc": { "call": ["Auth.Requests.Validate"] },
1086
+ },
1087
+ "core": {
1088
+ "contract": "trellis.core@v1",
1089
+ "rpc": { "call": ["Trellis.Bindings.Get", "Trellis.Catalog"] },
1090
+ },
1091
+ "health": {
1092
+ "contract": "trellis.health@v1",
1093
+ "events": { "publish": ["Health.Heartbeat"] },
1094
+ },
1095
+ },
1096
+ },
1097
+ } as TrellisContractV1;
10
1098
 
11
1099
  function assertSelectedKeysExist(
12
1100
  kind: "rpc" | "operations" | "events" | "feeds",
@@ -19,14 +1107,20 @@ function assertSelectedKeysExist(
19
1107
 
20
1108
  for (const key of keys) {
21
1109
  if (!Object.hasOwn(api, key)) {
22
- throw new Error(`Contract '${CONTRACT_ID}' does not expose ${kind} key '${key}'`);
1110
+ throw new Error(
1111
+ `Contract '${CONTRACT_ID}' does not expose ${kind} key '${key}'`,
1112
+ );
23
1113
  }
24
1114
  }
25
1115
  }
26
1116
 
27
1117
  function assertValidUseSpec(spec: UseSpec<typeof API.owned>) {
28
1118
  assertSelectedKeysExist("rpc", spec.rpc?.call, API.owned.rpc);
29
- assertSelectedKeysExist("operations", spec.operations?.call, API.owned.operations);
1119
+ assertSelectedKeysExist(
1120
+ "operations",
1121
+ spec.operations?.call,
1122
+ API.owned.operations,
1123
+ );
30
1124
  assertSelectedKeysExist("events", spec.events?.publish, API.owned.events);
31
1125
  assertSelectedKeysExist("events", spec.events?.subscribe, API.owned.events);
32
1126
  assertSelectedKeysExist("feeds", spec.feeds?.subscribe, API.owned.feeds);
@@ -37,22 +1131,30 @@ export const sdk: SdkContractModule<typeof CONTRACT_ID, typeof API.owned> = {
37
1131
  CONTRACT_DIGEST,
38
1132
  CONTRACT,
39
1133
  API,
40
- use: (<const TSpec extends UseSpec<typeof API.owned>>(spec: TSpec) => {
1134
+ use: <const TSpec extends UseSpec<typeof API.owned>>(spec: TSpec) => {
41
1135
  assertValidUseSpec(spec);
42
1136
 
43
1137
  const dependencyUse = {
44
1138
  contract: CONTRACT_ID,
45
1139
  ...(spec.rpc?.call ? { rpc: { call: [...spec.rpc.call] } } : {}),
46
- ...(spec.operations?.call ? { operations: { call: [...spec.operations.call] } } : {}),
1140
+ ...(spec.operations?.call
1141
+ ? { operations: { call: [...spec.operations.call] } }
1142
+ : {}),
47
1143
  ...((spec.events?.publish || spec.events?.subscribe)
48
1144
  ? {
49
1145
  events: {
50
- ...(spec.events.publish ? { publish: [...spec.events.publish] } : {}),
51
- ...(spec.events.subscribe ? { subscribe: [...spec.events.subscribe] } : {}),
1146
+ ...(spec.events.publish
1147
+ ? { publish: [...spec.events.publish] }
1148
+ : {}),
1149
+ ...(spec.events.subscribe
1150
+ ? { subscribe: [...spec.events.subscribe] }
1151
+ : {}),
52
1152
  },
53
1153
  }
54
1154
  : {}),
55
- ...(spec.feeds?.subscribe ? { feeds: { subscribe: [...spec.feeds.subscribe] } } : {}),
1155
+ ...(spec.feeds?.subscribe
1156
+ ? { feeds: { subscribe: [...spec.feeds.subscribe] } }
1157
+ : {}),
56
1158
  };
57
1159
 
58
1160
  Object.defineProperty(dependencyUse, CONTRACT_MODULE_METADATA, {
@@ -60,8 +1162,12 @@ export const sdk: SdkContractModule<typeof CONTRACT_ID, typeof API.owned> = {
60
1162
  enumerable: false,
61
1163
  });
62
1164
 
63
- return dependencyUse as ContractDependencyUse<typeof CONTRACT_ID, typeof API.owned, TSpec>;
64
- }),
1165
+ return dependencyUse as ContractDependencyUse<
1166
+ typeof CONTRACT_ID,
1167
+ typeof API.owned,
1168
+ TSpec
1169
+ >;
1170
+ },
65
1171
  };
66
1172
 
67
1173
  export const use = sdk.use;