watson-developer-cloud / node-sdk

:comet: Node.js library to access IBM Watson services.

Home Page:https://www.npmjs.com/package/ibm-watson

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The return type for `AssistantV2.exportSkills` is wrong

saevarb opened this issue · comments

Overview
When using exportSkills, the type of the result is wrong when the export isn't finished. The return type is

    /** SkillsExport. */
    interface SkillsExport {
        /** An array of objects describing the skills for the assistant. Included in responses only if
         *  **status**=`Available`.
         */
        assistant_skills: Skill[];
        /** Status information about the skills for the assistant. Included in responses only if **status**=`Available`. */
        assistant_state: AssistantState;
    }

but until the export has been completed, you receive values of the form

{
  status: 'Processing',
  assistant_id: '....'
}

Expected behavior
I expect the types to be correct.

Actual behavior
The types are wrong.

How to reproduce
Use the SDK to export skills. Observe that the result type is wrong.

Screenshots
If applicable, add screenshots to help explain your problem.

SDK Version
8.0.0

Given that the node-sdk is generated from an openapi definition this is unfortunately something we do not plan to address.