coveo/platform-client

API Response for ML Model Registration differs from types

tcarrio opened this issue ยท 1 comments

An example response from the POST machinelearning/model model registration endpoint:

{
      "commandLineParameters": [],
      "engineId": "topclicks",
      "exportOffset": "PT0S",
      "exportPeriod": "P3M",
      "intervalTime": 1,
      "intervalUnit": "WEEK",
      "modelDisplayName": "Model0",
      "modelName": "art_example",
      "modelId": "carriohnlaoec0_topclicks_art_example", // <-- not "id"
      "startTime": 1614961440000,
      "platformVersion": 2,
      "orgId": "carriohnlaoec0",
      "resourceId": "carriohnlaoec0_topclicks_art_example"
}

The types for MLModelCreated declare there to be an id property for the returned value, but it is actually modelId.

I may be following up with a PR to resolve this if time comes up, for now I can address the field using modelResponse["modelId"]

๐ŸŽ‰ This issue has been resolved in version 18.15.1 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€