Skip to content

Typing for body in createKey does not match example #7

@CarstenLeue

Description

@CarstenLeue

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions