minio / minio-js

MinIO Client SDK for Javascript
https://docs.min.io/docs/javascript-client-quickstart-guide.html
Apache License 2.0
920 stars 271 forks source link

type lifeCycleRule incorrect #1306

Closed juliebrunetto83 closed 1 month ago

juliebrunetto83 commented 2 months ago

It seems that the typing of the Expiration key in lifeCycleRule is incorrect. Date, Days, DeleteMarker, DeleteAll have all become required since the last update. This creates a typing error when I call the setBucketLifecycle function. What should I do ?

prakashsvmx commented 2 months ago

https://github.com/minio/minio-js/blob/06758a5fdf462fbc21267c133959c3bb7fbd7873/src/internal/type.ts#L359

Looks they are optional.

juliebrunetto83 commented 2 months ago

I was referring inside the Expiration key. Date, Days, DeleteMarker, DeleteAll, they are all required.

prakashsvmx commented 2 months ago

https://github.com/minio/minio-js/blob/06758a5fdf462fbc21267c133959c3bb7fbd7873/src/internal/type.ts#L323

Yeah looks like.. we can mark them optional. Feel free to send a PR.

prakashsvmx commented 2 months ago

fixed as part of #1308