watson-developer-cloud / node-sdk

:comet: Node.js library to access IBM Watson services.
https://www.npmjs.com/package/ibm-watson
Apache License 2.0
1.48k stars 669 forks source link

The return type for `AssistantV2.exportSkills` is wrong #1200

Closed saevarb closed 9 months ago

saevarb commented 10 months ago

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

apaparazzi0329 commented 9 months ago

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