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 (13218B)


      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       "pattern": "\\S"
     12     },
     13     "trace_id": {
     14       "type": "string",
     15       "minLength": 1,
     16       "pattern": "\\S"
     17     },
     18     "capability": {
     19       "const": "buyer_request.match"
     20     },
     21     "context": {
     22       "$ref": "common.schema.json#/$defs/context"
     23     },
     24     "input": {
     25       "type": "object",
     26       "properties": {
     27         "need": {
     28           "type": "object",
     29           "properties": {
     30             "need_id": {
     31               "type": "string",
     32               "minLength": 64,
     33               "maxLength": 64,
     34               "pattern": "^[0-9a-f]{64}(?![\\s\\S])"
     35             },
     36             "revision": {
     37               "type": "string",
     38               "minLength": 1,
     39               "pattern": "\\S"
     40             },
     41             "participant_id": {
     42               "type": "string",
     43               "minLength": 64,
     44               "maxLength": 64,
     45               "pattern": "^[0-9a-f]{64}(?![\\s\\S])"
     46             },
     47             "demand_lines": {
     48               "type": "array",
     49               "items": {
     50                 "type": "object",
     51                 "properties": {
     52                   "line_id": {
     53                     "type": "string",
     54                     "minLength": 1,
     55                     "pattern": "\\S"
     56                   },
     57                   "product": {
     58                     "$ref": "common.schema.json#/$defs/product_ref"
     59                   },
     60                   "quantity": {
     61                     "$ref": "common.schema.json#/$defs/reported_quantity"
     62                   },
     63                   "conditions": {
     64                     "type": "array",
     65                     "items": {
     66                       "type": "object",
     67                       "properties": {
     68                         "kind": {
     69                           "type": "string",
     70                           "enum": [
     71                             "fulfillment",
     72                             "window",
     73                             "grade",
     74                             "price",
     75                             "attribute",
     76                             "substitution"
     77                           ]
     78                         },
     79                         "strength": {
     80                           "type": "string",
     81                           "enum": [
     82                             "mandatory",
     83                             "preferred",
     84                             "excluded",
     85                             "permitted"
     86                           ]
     87                         },
     88                         "value": {
     89                           "anyOf": [
     90                             {
     91                               "type": "string",
     92                               "minLength": 1,
     93                               "pattern": "\\S"
     94                             },
     95                             {
     96                               "type": "null"
     97                             }
     98                           ]
     99                         },
    100                         "evidence": {
    101                           "type": "array",
    102                           "items": {
    103                             "$ref": "common.schema.json#/$defs/evidence_ref"
    104                           },
    105                           "maxItems": 128
    106                         }
    107                       },
    108                       "required": [
    109                         "kind",
    110                         "strength",
    111                         "value",
    112                         "evidence"
    113                       ],
    114                       "additionalProperties": false
    115                     },
    116                     "maxItems": 128
    117                   },
    118                   "evidence": {
    119                     "type": "array",
    120                     "items": {
    121                       "$ref": "common.schema.json#/$defs/evidence_ref"
    122                     },
    123                     "maxItems": 128
    124                   },
    125                   "review_required": {
    126                     "type": "boolean"
    127                   }
    128                 },
    129                 "required": [
    130                   "line_id",
    131                   "product",
    132                   "quantity",
    133                   "conditions",
    134                   "evidence",
    135                   "review_required"
    136                 ],
    137                 "additionalProperties": false
    138               },
    139               "maxItems": 128
    140             },
    141             "partial_fulfillment": {
    142               "type": "boolean"
    143             }
    144           },
    145           "required": [
    146             "need_id",
    147             "revision",
    148             "participant_id",
    149             "demand_lines",
    150             "partial_fulfillment"
    151           ],
    152           "additionalProperties": false
    153         },
    154         "candidates": {
    155           "type": "array",
    156           "items": {
    157             "type": "object",
    158             "properties": {
    159               "candidate_id": {
    160                 "type": "string",
    161                 "minLength": 64,
    162                 "maxLength": 64,
    163                 "pattern": "^[0-9a-f]{64}(?![\\s\\S])"
    164               },
    165               "listing_id": {
    166                 "type": "string",
    167                 "minLength": 64,
    168                 "maxLength": 64,
    169                 "pattern": "^[0-9a-f]{64}(?![\\s\\S])"
    170               },
    171               "revision": {
    172                 "type": "string",
    173                 "minLength": 1,
    174                 "pattern": "\\S"
    175               },
    176               "participant_id": {
    177                 "type": "string",
    178                 "minLength": 64,
    179                 "maxLength": 64,
    180                 "pattern": "^[0-9a-f]{64}(?![\\s\\S])"
    181               },
    182               "product": {
    183                 "$ref": "common.schema.json#/$defs/product_ref"
    184               },
    185               "declared_quantity": {
    186                 "$ref": "common.schema.json#/$defs/reported_quantity"
    187               },
    188               "price": {
    189                 "anyOf": [
    190                   {
    191                     "$ref": "common.schema.json#/$defs/money"
    192                   },
    193                   {
    194                     "type": "null"
    195                   }
    196                 ]
    197               },
    198               "sdk_projection": {
    199                 "type": "object",
    200                 "properties": {
    201                   "projection_id": {
    202                     "type": "string",
    203                     "minLength": 64,
    204                     "maxLength": 64,
    205                     "pattern": "^[0-9a-f]{64}(?![\\s\\S])"
    206                   },
    207                   "source_revision": {
    208                     "type": "string",
    209                     "minLength": 1,
    210                     "pattern": "\\S"
    211                   },
    212                   "feasibility": {
    213                     "type": "string",
    214                     "enum": [
    215                       "pass",
    216                       "fail",
    217                       "unknown"
    218                     ]
    219                   },
    220                   "checks": {
    221                     "type": "array",
    222                     "items": {
    223                       "type": "object",
    224                       "properties": {
    225                         "kind": {
    226                           "type": "string",
    227                           "minLength": 1,
    228                           "pattern": "\\S"
    229                         },
    230                         "result": {
    231                           "type": "string",
    232                           "enum": [
    233                             "pass",
    234                             "fail",
    235                             "unknown"
    236                           ]
    237                         },
    238                         "reason": {
    239                           "type": "string",
    240                           "minLength": 1,
    241                           "pattern": "\\S"
    242                         },
    243                         "evidence": {
    244                           "type": "array",
    245                           "items": {
    246                             "$ref": "common.schema.json#/$defs/evidence_ref"
    247                           },
    248                           "maxItems": 128
    249                         }
    250                       },
    251                       "required": [
    252                         "kind",
    253                         "result",
    254                         "reason",
    255                         "evidence"
    256                       ],
    257                       "additionalProperties": false
    258                     },
    259                     "maxItems": 128
    260                   },
    261                   "revalidate_before_use": {
    262                     "const": true
    263                   }
    264                 },
    265                 "required": [
    266                   "projection_id",
    267                   "source_revision",
    268                   "feasibility",
    269                   "checks",
    270                   "revalidate_before_use"
    271                 ],
    272                 "additionalProperties": false
    273               }
    274             },
    275             "required": [
    276               "candidate_id",
    277               "listing_id",
    278               "revision",
    279               "participant_id",
    280               "product",
    281               "declared_quantity",
    282               "price",
    283               "sdk_projection"
    284             ],
    285             "additionalProperties": false
    286           },
    287           "maxItems": 64
    288         },
    289         "coverage": {
    290           "type": "object",
    291           "properties": {
    292             "scope": {
    293               "const": "supplied_only"
    294             },
    295             "truncated": {
    296               "type": "boolean"
    297             },
    298             "evaluated": {
    299               "type": "array",
    300               "items": {
    301                 "type": "string",
    302                 "minLength": 64,
    303                 "maxLength": 64,
    304                 "pattern": "^[0-9a-f]{64}(?![\\s\\S])"
    305               },
    306               "maxItems": 128
    307             },
    308             "excluded": {
    309               "type": "array",
    310               "items": {
    311                 "type": "string",
    312                 "minLength": 64,
    313                 "maxLength": 64,
    314                 "pattern": "^[0-9a-f]{64}(?![\\s\\S])"
    315               },
    316               "maxItems": 128
    317             }
    318           },
    319           "required": [
    320             "scope",
    321             "truncated",
    322             "evaluated",
    323             "excluded"
    324           ],
    325           "additionalProperties": false
    326         },
    327         "references": {
    328           "type": "object",
    329           "properties": {
    330             "taxonomy": {
    331               "type": "object",
    332               "properties": {
    333                 "version": {
    334                   "type": "string",
    335                   "minLength": 1,
    336                   "pattern": "\\S"
    337                 },
    338                 "provenance": {
    339                   "type": "string",
    340                   "minLength": 1,
    341                   "pattern": "\\S"
    342                 },
    343                 "products": {
    344                   "type": "array",
    345                   "items": {
    346                     "type": "object",
    347                     "properties": {
    348                       "catalogue_id": {
    349                         "type": "string",
    350                         "minLength": 1,
    351                         "pattern": "\\S"
    352                       },
    353                       "terms": {
    354                         "type": "array",
    355                         "items": {
    356                           "type": "string",
    357                           "minLength": 1,
    358                           "pattern": "\\S"
    359                         },
    360                         "maxItems": 128
    361                       }
    362                     },
    363                     "required": [
    364                       "catalogue_id",
    365                       "terms"
    366                     ],
    367                     "additionalProperties": false
    368                   },
    369                   "maxItems": 128
    370                 }
    371               },
    372               "required": [
    373                 "version",
    374                 "provenance",
    375                 "products"
    376               ],
    377               "additionalProperties": false
    378             },
    379             "normalization": {
    380               "type": "object",
    381               "properties": {
    382                 "version": {
    383                   "type": "string",
    384                   "minLength": 1,
    385                   "pattern": "\\S"
    386                 },
    387                 "provenance": {
    388                   "type": "string",
    389                   "minLength": 1,
    390                   "pattern": "\\S"
    391                 },
    392                 "currency_registry": {
    393                   "const": "radroots.currency_registry.v1"
    394                 }
    395               },
    396               "required": [
    397                 "version",
    398                 "provenance",
    399                 "currency_registry"
    400               ],
    401               "additionalProperties": false
    402             }
    403           },
    404           "required": [
    405             "taxonomy",
    406             "normalization"
    407           ],
    408           "additionalProperties": false
    409         }
    410       },
    411       "required": [
    412         "need",
    413         "candidates",
    414         "coverage",
    415         "references"
    416       ],
    417       "additionalProperties": false
    418     }
    419   },
    420   "required": [
    421     "version",
    422     "request_id",
    423     "capability",
    424     "context",
    425     "input"
    426   ],
    427   "additionalProperties": false,
    428   "$schema": "https://json-schema.org/draft/2020-12/schema",
    429   "$id": "hyf_ops_v3/buyer_request_match.request.schema.json",
    430   "$comment": "D57 hyf_ops_v3 pre-activation contract. No business write or trusted context can be minted by source/model text. Full semantic input-use and SDK revalidation remain required."
    431 }