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

[BUG] Security namespace is missing from the Client type declaration #670

Open
stowns opened this issue Dec 14, 2023 · 3 comments
Open

[BUG] Security namespace is missing from the Client type declaration #670

stowns opened this issue Dec 14, 2023 · 3 comments

Comments

@stowns
Copy link

stowns commented Dec 14, 2023

What is the bug?

A clear and concise description of the bug.
It appears that security is missing from the Client type declaration which causes "Property 'security' does not exist on type 'Client'" in IDE's.

How can one reproduce the bug?

Steps to reproduce the behavior.

import { Client  } from '@opensearch-project/opensearch';
const client = new Client(...)
client.security

What is the expected behavior?

A clear and concise description of what you expected to happen.
The security namespace exists on the client.

What is your host/environment?

Operating system, version.
MacOS 13.6.2

Do you have any screenshots?

If applicable, add screenshots to help explain your problem.

Do you have any additional context?

Add any other context about the problem.
@opensearch-project/opensearch: 2.4.0

The tests added in the commit are in javascript. I believe this is why the issue wasn't observed

@nhtruong
Copy link
Collaborator

It's already been added to https://github.com/opensearch-project/opensearch-js/blob/main/api/new.d.ts#L1966
I'm not sure why we have 2 places to declare types for API methods 😅

@GTRanger
Copy link

GTRanger commented Feb 6, 2024

The new.d.ts export is not what is used by default with the import statement import { Client } from '@opensearch-project/opensearch';. Rather, it still points to the definitions in index.d.ts. The default exports need to be updated to use the new type definitions.

@nhtruong
Copy link
Collaborator

nhtruong commented Feb 7, 2024

@GTRanger Did this PR resolve the issue?

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

3 participants