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

TypeScript definition for HealthReportResponse is missing the optional status key. #2227

Closed
nitinl-cogapp opened this issue Aug 3, 2023 · 2 comments · Fixed by #2228
Closed
Assignees

Comments

@nitinl-cogapp
Copy link

🐛 Bug Report

TypeScript definition for HealthReportResponse is missing the optional status key.

To Reproduce

Steps to reproduce the behavior:

Paste your code here:

// get health report
const health = await elasticsearchClient.healthReport();

// attempt to access `status` gives "Property 'status' does not exist on type 'HealthReportResponse'.ts(2339)"
console.log(health.status)

Expected behavior

health.status should be of type: 'green' | 'unknown' | 'yellow' | 'red' | undefined

Your Environment

  • node version: 8.16.1
  • @elastic/elasticsearch version: 8.9.0
  • os: Mac
@JoshMock
Copy link
Member

JoshMock commented Aug 8, 2023

@nitinl-cogapp I transferred this to the elasticsearch-specification repo, where we maintain the spec that all clients use to generate type definitions and API signatures. I've opened #2228 to fix this. When it merges, we'll be able to ship this improvement in the next client release.

@JoshMock JoshMock self-assigned this Aug 8, 2023
@nitinl-cogapp
Copy link
Author

Ah great thank you @JoshMock. Feel free to close this issue & the PR I opened if it'll avoid duplication of effort.

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

Successfully merging a pull request may close this issue.

2 participants