Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing for body in createKey does not match example #7

Open
CarstenLeue opened this issue Nov 29, 2021 · 1 comment
Open

Typing for body in createKey does not match example #7

CarstenLeue opened this issue Nov 29, 2021 · 1 comment

Comments

@CarstenLeue
Copy link

In the example https://www.npmjs.com/package/@ibm-cloud/ibm-key-protect the type of body is an object:

const body = {
    metadata: {
      collectionType: 'application/vnd.ibm.kms.key+json',
      collectionTotal: 1,
    },
    resources: [
      {
        type: 'application/vnd.ibm.kms.key+json',
        name: 'nodejsKey',
        extractable: false,
      },
    ],
  };

But the TS type for the payload (https://github.com/IBM/keyprotect-nodejs-client/blob/master/ibm-key-protect-api/v2.ts#L2447) says:

NodeJS.ReadableStream|Buffer

This does not match and it makes it hard to use the API in TS.

@thu2thu2
Copy link
Contributor

thu2thu2 commented Dec 7, 2021

Thanks for pointing out the issue, we will provide a fix in the future release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants