farm_update_interpret.response.schema.json (8739B)
1 { 2 "type": "object", 3 "properties": { 4 "version": { 5 "type": "integer", 6 "const": 1 7 }, 8 "request_id": { 9 "type": "string", 10 "minLength": 1 11 }, 12 "trace_id": { 13 "type": "string" 14 }, 15 "ok": { 16 "type": "boolean" 17 }, 18 "output": { 19 "type": "object", 20 "properties": { 21 "claims": { 22 "type": "array", 23 "items": { 24 "type": "object", 25 "properties": { 26 "claim_id": { 27 "type": "string" 28 }, 29 "product": { 30 "type": "object", 31 "properties": { 32 "phrase": { 33 "type": "string" 34 }, 35 "catalogue_id": { 36 "type": [ 37 "string", 38 "null" 39 ] 40 }, 41 "resolution": { 42 "type": "string", 43 "enum": [ 44 "resolved", 45 "unresolved" 46 ] 47 } 48 }, 49 "required": [ 50 "catalogue_id", 51 "phrase", 52 "resolution" 53 ], 54 "additionalProperties": false 55 }, 56 "status": { 57 "type": "string", 58 "enum": [ 59 "offered", 60 "forecast", 61 "unavailable", 62 "correction", 63 "unclear" 64 ] 65 }, 66 "quantity": { 67 "type": "object", 68 "properties": { 69 "state": { 70 "type": "string", 71 "enum": [ 72 "known", 73 "unknown" 74 ] 75 }, 76 "value": { 77 "type": [ 78 "string", 79 "null" 80 ] 81 }, 82 "unit": { 83 "type": [ 84 "string", 85 "null" 86 ] 87 }, 88 "qualifier": { 89 "type": "string", 90 "enum": [ 91 "exact", 92 "approximate" 93 ] 94 } 95 }, 96 "required": [ 97 "state", 98 "qualifier" 99 ], 100 "additionalProperties": false 101 }, 102 "evidence": { 103 "type": "array", 104 "items": { 105 "type": "object", 106 "properties": { 107 "source_id": { 108 "type": "string" 109 }, 110 "revision": { 111 "type": "string" 112 }, 113 "start": { 114 "type": "integer", 115 "minimum": 0 116 }, 117 "end": { 118 "type": "integer", 119 "minimum": 0 120 }, 121 "method": { 122 "type": "string" 123 } 124 }, 125 "required": [ 126 "end", 127 "method", 128 "revision", 129 "source_id", 130 "start" 131 ], 132 "additionalProperties": false 133 } 134 }, 135 "review_required": { 136 "type": "boolean" 137 } 138 }, 139 "required": [ 140 "claim_id", 141 "product", 142 "status", 143 "evidence", 144 "review_required" 145 ], 146 "additionalProperties": false 147 } 148 }, 149 "proposed_changes": { 150 "type": "array", 151 "items": { 152 "type": "object", 153 "properties": { 154 "target": { 155 "type": "object", 156 "properties": { 157 "kind": { 158 "type": "string", 159 "enum": [ 160 "listing", 161 "product", 162 "farm" 163 ] 164 }, 165 "id": { 166 "type": [ 167 "string", 168 "null" 169 ] 170 } 171 }, 172 "required": [ 173 "id", 174 "kind" 175 ], 176 "additionalProperties": false 177 }, 178 "operation": { 179 "type": "string", 180 "enum": [ 181 "addition", 182 "remaining", 183 "replacement", 184 "withdrawal", 185 "correction", 186 "unresolved" 187 ] 188 }, 189 "expected_revision": { 190 "type": [ 191 "string", 192 "null" 193 ] 194 }, 195 "evidence": { 196 "type": "array", 197 "items": { 198 "type": "object", 199 "properties": { 200 "source_id": { 201 "type": "string" 202 }, 203 "revision": { 204 "type": "string" 205 }, 206 "start": { 207 "type": "integer", 208 "minimum": 0 209 }, 210 "end": { 211 "type": "integer", 212 "minimum": 0 213 }, 214 "method": { 215 "type": "string" 216 } 217 }, 218 "required": [ 219 "end", 220 "method", 221 "revision", 222 "source_id", 223 "start" 224 ], 225 "additionalProperties": false 226 } 227 } 228 }, 229 "required": [ 230 "target", 231 "operation", 232 "evidence" 233 ], 234 "additionalProperties": false 235 } 236 }, 237 "review": { 238 "type": "object", 239 "properties": { 240 "required": { 241 "type": "boolean" 242 }, 243 "clarifications": { 244 "type": "array", 245 "items": { 246 "type": "object", 247 "properties": { 248 "field": { 249 "type": "string" 250 }, 251 "reason": { 252 "type": "string" 253 } 254 }, 255 "required": [ 256 "field", 257 "reason" 258 ], 259 "additionalProperties": false 260 } 261 } 262 }, 263 "required": [ 264 "clarifications", 265 "required" 266 ], 267 "additionalProperties": false 268 }, 269 "execution": { 270 "type": "object", 271 "properties": { 272 "status": { 273 "type": "string", 274 "enum": [ 275 "complete", 276 "degraded", 277 "failed" 278 ] 279 }, 280 "provider_calls": { 281 "type": "integer", 282 "minimum": 0 283 }, 284 "model": { 285 "type": [ 286 "string", 287 "null" 288 ] 289 }, 290 "question_bundle": { 291 "type": [ 292 "string", 293 "null" 294 ] 295 } 296 }, 297 "required": [ 298 "model", 299 "provider_calls", 300 "question_bundle", 301 "status" 302 ], 303 "additionalProperties": false 304 } 305 }, 306 "required": [ 307 "claims", 308 "proposed_changes", 309 "review", 310 "execution" 311 ], 312 "additionalProperties": false 313 }, 314 "error": { 315 "type": "object", 316 "properties": { 317 "code": { 318 "type": "string" 319 }, 320 "message": { 321 "type": "string" 322 } 323 }, 324 "required": [ 325 "code", 326 "message" 327 ], 328 "additionalProperties": false 329 }, 330 "meta": { 331 "type": "object", 332 "additionalProperties": true 333 } 334 }, 335 "required": [ 336 "version", 337 "request_id", 338 "ok" 339 ], 340 "additionalProperties": false 341 }