hyf

Context-aware query service for Radroots
git clone https://radroots.dev/git/hyf.git
Log | Files | Refs | README | LICENSE

buyer_request_match.request.schema.json (15560B)


      1 {
      2   "$comment": "hyf_v1_jev additive wire envelope; strict unknown-field rejection",
      3   "type": "object",
      4   "properties": {
      5     "version": {
      6       "type": "integer",
      7       "const": 1
      8     },
      9     "request_id": {
     10       "type": "string",
     11       "minLength": 1
     12     },
     13     "trace_id": {
     14       "type": "string",
     15       "minLength": 1
     16     },
     17     "capability": {
     18       "type": "string",
     19       "const": "buyer_request.match"
     20     },
     21     "context": {
     22       "type": "object",
     23       "properties": {
     24         "consumer": {
     25           "type": "string"
     26         },
     27         "execution_mode_preference": {
     28           "type": "string",
     29           "enum": [
     30             "deterministic",
     31             "assisted"
     32           ]
     33         },
     34         "deadline_ms": {
     35           "type": "integer",
     36           "minimum": 1
     37         },
     38         "evaluation_time": {
     39           "type": "string"
     40         },
     41         "timezone": {
     42           "type": "string"
     43         },
     44         "locale": {
     45           "type": "string"
     46         },
     47         "versions": {
     48           "type": "object",
     49           "properties": {
     50             "schema": {
     51               "type": "string"
     52             },
     53             "taxonomy": {
     54               "type": "string"
     55             },
     56             "normalization": {
     57               "type": "string"
     58             },
     59             "review_policy": {
     60               "type": "string"
     61             },
     62             "ranking_policy": {
     63               "type": "string"
     64             },
     65             "question_bundle": {
     66               "type": "string"
     67             },
     68             "model": {
     69               "type": "string"
     70             }
     71           },
     72           "required": [
     73             "model",
     74             "normalization",
     75             "question_bundle",
     76             "ranking_policy",
     77             "review_policy",
     78             "schema",
     79             "taxonomy"
     80           ],
     81           "additionalProperties": false
     82         },
     83         "return_provenance": {
     84           "type": "boolean"
     85         }
     86       },
     87       "required": [
     88         "evaluation_time",
     89         "versions"
     90       ],
     91       "additionalProperties": false
     92     },
     93     "input": {
     94       "type": "object",
     95       "properties": {
     96         "need": {
     97           "type": "object",
     98           "properties": {
     99             "need_id": {
    100               "type": "string"
    101             },
    102             "revision": {
    103               "type": "string"
    104             },
    105             "demand_lines": {
    106               "type": "array",
    107               "items": {
    108                 "type": "object",
    109                 "properties": {
    110                   "line_id": {
    111                     "type": "string"
    112                   },
    113                   "product": {
    114                     "type": "object",
    115                     "properties": {
    116                       "phrase": {
    117                         "type": "string"
    118                       },
    119                       "catalogue_id": {
    120                         "type": [
    121                           "string",
    122                           "null"
    123                         ]
    124                       },
    125                       "resolution": {
    126                         "type": "string",
    127                         "enum": [
    128                           "resolved",
    129                           "unresolved"
    130                         ]
    131                       }
    132                     },
    133                     "required": [
    134                       "catalogue_id",
    135                       "phrase",
    136                       "resolution"
    137                     ],
    138                     "additionalProperties": false
    139                   },
    140                   "quantity": {
    141                     "type": "object",
    142                     "properties": {
    143                       "state": {
    144                         "type": "string",
    145                         "enum": [
    146                           "known",
    147                           "unknown"
    148                         ]
    149                       },
    150                       "value": {
    151                         "type": [
    152                           "string",
    153                           "null"
    154                         ]
    155                       },
    156                       "unit": {
    157                         "type": [
    158                           "string",
    159                           "null"
    160                         ]
    161                       },
    162                       "qualifier": {
    163                         "type": "string",
    164                         "enum": [
    165                           "exact",
    166                           "approximate"
    167                         ]
    168                       }
    169                     },
    170                     "required": [
    171                       "state",
    172                       "qualifier"
    173                     ],
    174                     "additionalProperties": false
    175                   },
    176                   "conditions": {
    177                     "type": "array",
    178                     "items": {
    179                       "type": "object",
    180                       "properties": {
    181                         "kind": {
    182                           "type": "string",
    183                           "enum": [
    184                             "fulfillment",
    185                             "window",
    186                             "grade",
    187                             "price",
    188                             "attribute",
    189                             "substitution"
    190                           ]
    191                         },
    192                         "strength": {
    193                           "type": "string",
    194                           "enum": [
    195                             "mandatory",
    196                             "preferred",
    197                             "excluded",
    198                             "permitted"
    199                           ]
    200                         },
    201                         "value": {
    202                           "type": [
    203                             "string",
    204                             "null"
    205                           ]
    206                         },
    207                         "evidence": {
    208                           "type": "array",
    209                           "items": {
    210                             "type": "object",
    211                             "properties": {
    212                               "source_id": {
    213                                 "type": "string"
    214                               },
    215                               "revision": {
    216                                 "type": "string"
    217                               },
    218                               "start": {
    219                                 "type": "integer",
    220                                 "minimum": 0
    221                               },
    222                               "end": {
    223                                 "type": "integer",
    224                                 "minimum": 0
    225                               },
    226                               "method": {
    227                                 "type": "string"
    228                               }
    229                             },
    230                             "required": [
    231                               "end",
    232                               "method",
    233                               "revision",
    234                               "source_id",
    235                               "start"
    236                             ],
    237                             "additionalProperties": false
    238                           }
    239                         }
    240                       },
    241                       "required": [
    242                         "kind",
    243                         "strength",
    244                         "evidence"
    245                       ],
    246                       "additionalProperties": false
    247                     }
    248                   },
    249                   "evidence": {
    250                     "type": "array",
    251                     "items": {
    252                       "type": "object",
    253                       "properties": {
    254                         "source_id": {
    255                           "type": "string"
    256                         },
    257                         "revision": {
    258                           "type": "string"
    259                         },
    260                         "start": {
    261                           "type": "integer",
    262                           "minimum": 0
    263                         },
    264                         "end": {
    265                           "type": "integer",
    266                           "minimum": 0
    267                         },
    268                         "method": {
    269                           "type": "string"
    270                         }
    271                       },
    272                       "required": [
    273                         "end",
    274                         "method",
    275                         "revision",
    276                         "source_id",
    277                         "start"
    278                       ],
    279                       "additionalProperties": false
    280                     }
    281                   },
    282                   "review_required": {
    283                     "type": "boolean"
    284                   }
    285                 },
    286                 "required": [
    287                   "line_id",
    288                   "product",
    289                   "quantity",
    290                   "conditions",
    291                   "evidence",
    292                   "review_required"
    293                 ],
    294                 "additionalProperties": false
    295               }
    296             },
    297             "partial_fulfillment": {
    298               "type": "string",
    299               "enum": [
    300                 "allowed",
    301                 "disallowed",
    302                 "unstated"
    303               ]
    304             }
    305           },
    306           "required": [
    307             "need_id",
    308             "revision",
    309             "demand_lines",
    310             "partial_fulfillment"
    311           ],
    312           "additionalProperties": false
    313         },
    314         "snapshots": {
    315           "type": "array",
    316           "items": {
    317             "type": "object",
    318             "properties": {
    319               "lot_id": {
    320                 "type": "string"
    321               },
    322               "revision": {
    323                 "type": "string"
    324               },
    325               "supplier_id": {
    326                 "type": "string"
    327               },
    328               "product": {
    329                 "type": "object",
    330                 "properties": {
    331                   "phrase": {
    332                     "type": "string"
    333                   },
    334                   "catalogue_id": {
    335                     "type": [
    336                       "string",
    337                       "null"
    338                     ]
    339                   },
    340                   "resolution": {
    341                     "type": "string",
    342                     "enum": [
    343                       "resolved",
    344                       "unresolved"
    345                     ]
    346                   }
    347                 },
    348                 "required": [
    349                   "catalogue_id",
    350                   "phrase",
    351                   "resolution"
    352                 ],
    353                 "additionalProperties": false
    354               },
    355               "unreserved_quantity": {
    356                 "type": "object",
    357                 "properties": {
    358                   "state": {
    359                     "type": "string",
    360                     "enum": [
    361                       "known",
    362                       "unknown"
    363                     ]
    364                   },
    365                   "value": {
    366                     "type": [
    367                       "string",
    368                       "null"
    369                     ]
    370                   },
    371                   "unit": {
    372                     "type": [
    373                       "string",
    374                       "null"
    375                     ]
    376                   },
    377                   "qualifier": {
    378                     "type": "string",
    379                     "enum": [
    380                       "exact",
    381                       "approximate"
    382                     ]
    383                   }
    384                 },
    385                 "required": [
    386                   "state",
    387                   "qualifier"
    388                 ],
    389                 "additionalProperties": false
    390               },
    391               "attributes": {
    392                 "type": "array",
    393                 "items": {
    394                   "type": "object",
    395                   "properties": {
    396                     "name": {
    397                       "type": "string"
    398                     },
    399                     "verified": {
    400                       "type": "boolean"
    401                     }
    402                   },
    403                   "required": [
    404                     "name",
    405                     "verified"
    406                   ],
    407                   "additionalProperties": false
    408                 }
    409               },
    410               "fulfillment": {
    411                 "type": "object",
    412                 "properties": {
    413                   "method": {
    414                     "type": "string",
    415                     "enum": [
    416                       "pickup",
    417                       "delivery",
    418                       "unspecified"
    419                     ]
    420                   },
    421                   "area": {
    422                     "type": [
    423                       "string",
    424                       "null"
    425                     ]
    426                   },
    427                   "window": {
    428                     "type": [
    429                       "string",
    430                       "null"
    431                     ]
    432                   }
    433                 },
    434                 "required": [
    435                   "area",
    436                   "method",
    437                   "window"
    438                 ],
    439                 "additionalProperties": false
    440               },
    441               "price": {
    442                 "type": "object",
    443                 "properties": {
    444                   "state": {
    445                     "type": "string",
    446                     "enum": [
    447                       "known",
    448                       "unknown"
    449                     ]
    450                   },
    451                   "amount": {
    452                     "type": [
    453                       "string",
    454                       "null"
    455                     ]
    456                   },
    457                   "currency": {
    458                     "type": [
    459                       "string",
    460                       "null"
    461                     ]
    462                   },
    463                   "basis": {
    464                     "type": [
    465                       "string",
    466                       "null"
    467                     ]
    468                   }
    469                 },
    470                 "required": [
    471                   "amount",
    472                   "basis",
    473                   "currency",
    474                   "state"
    475                 ],
    476                 "additionalProperties": false
    477               }
    478             },
    479             "required": [
    480               "lot_id",
    481               "revision",
    482               "supplier_id",
    483               "product",
    484               "unreserved_quantity"
    485             ],
    486             "additionalProperties": false
    487           }
    488         },
    489         "coverage": {
    490           "type": "object",
    491           "properties": {
    492             "scope": {
    493               "type": "string",
    494               "enum": [
    495                 "supplied_only"
    496               ]
    497             },
    498             "truncated": {
    499               "type": "boolean"
    500             },
    501             "evaluated": {
    502               "type": "integer",
    503               "minimum": 0
    504             },
    505             "excluded": {
    506               "type": "integer",
    507               "minimum": 0
    508             }
    509           },
    510           "required": [
    511             "scope",
    512             "truncated"
    513           ],
    514           "additionalProperties": false
    515         },
    516         "policy": {
    517           "type": "object",
    518           "properties": {
    519             "ranking_policy": {
    520               "type": "string"
    521             },
    522             "review_policy": {
    523               "type": "string"
    524             }
    525           },
    526           "required": [
    527             "ranking_policy",
    528             "review_policy"
    529           ],
    530           "additionalProperties": false
    531         }
    532       },
    533       "required": [
    534         "need",
    535         "snapshots",
    536         "coverage"
    537       ],
    538       "additionalProperties": false
    539     }
    540   },
    541   "required": [
    542     "version",
    543     "request_id",
    544     "capability",
    545     "input"
    546   ],
    547   "additionalProperties": false
    548 }