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

missing possible parameters in client methods #1247

Open
d-michail opened this issue Nov 23, 2023 · 5 comments
Open

missing possible parameters in client methods #1247

d-michail opened this issue Nov 23, 2023 · 5 comments

Comments

@d-michail
Copy link

Hi,

I am experiencing a small issue with the minio client types. I am trying to call a few functions like getObject, listObjects and copyObject but the type definitions seem to be incomplete.

As an example I am using

client.getObject(bucket, uuId, { versionId: 'myversion' })

The underlying implementation supports the call, but the type does not, assuming that I always use a callback for the 3rd parameter. Am I missing something obvious here, or is it just a bug in the types definition? If it is, I can possibly send a PR.

@aldy505
Copy link
Contributor

aldy505 commented Nov 24, 2023

This is supposed to be typing's mistake. But I can see that it should be fixed on #1186

@prakashsvmx
Copy link
Member

prakashsvmx commented Nov 24, 2023

Please use the latest async await /promise style. The callback style is deprecated.
We are migrating to typescript, the migration is still in progress.

@d-michail

@shirecoding
Copy link

shirecoding commented Oct 3, 2024

i can confirm this is still the case,

Expected 4 arguments, but got 3.ts(2554)
client.d.mts(314, 72): An argument for 'putOpts' was not provided.
(method) TypedClient.setObjectTagging(bucketName: string, objectName: string, tags: Tags, putOpts: TaggingOpts): Promise<void>

setObjectTagging(bucketName: string, objectName: string, tags: Tags, putOpts: TaggingOpts): Promise<void>;

putOpts in setObjectTagging is now not optional? it was optional in minio 7 and in the docs

@woodytang
Copy link

i can confirm this is still the case,

Expected 4 arguments, but got 3.ts(2554)
client.d.mts(314, 72): An argument for 'putOpts' was not provided.
(method) TypedClient.setObjectTagging(bucketName: string, objectName: string, tags: Tags, putOpts: TaggingOpts): Promise<void>

setObjectTagging(bucketName: string, objectName: string, tags: Tags, putOpts: TaggingOpts): Promise<void>;

putOpts in setObjectTagging is now not optional? it was optional in minio 7 and in the docs

exactly same here!

@prakashsvmx
Copy link
Member

We will update it in a new PR. feel free to send a PR too.

async setObjectTagging(bucketName: string, objectName: string, tags: Tags, putOpts: TaggingOpts) {

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

5 participants