aws / aws-sdk

Landing page for the AWS SDKs on GitHub
https://aws.amazon.com/tools/
Other
68 stars 12 forks source link

[client-sqs] Missing Types for SQS Commands #623

Closed acommodari closed 1 month ago

acommodari commented 8 months ago

Checkboxes for prior research

Describe the bug

Attribute Names as well as select CommandInput properties are missing from some Commands in SQS but are shown on the AWS Docs.

For my case I'm talking about ReceiveMessageCommand more specifically:

const command = new ReceiveMessageCommand({
    AttributeNames: ['ApproximateReceiveCount', 'SentTimestamp'], // <- issue is here
    MaxNumberOfMessages: 10,
    MessageAttributeNames: ['ApproximateReceiveCount'],
    QueueUrl: queue,
    WaitTimeSeconds: 20,
});

These 2 Attribute Names are suddenly not working anymore as they are missing from the QueueAttributeName type. Also I noticed AttributeNames is now deprecated but its replacement MessageSystemAttributeNames is not an option in the types.

SDK version number

@aws-sdk/client-sqs@^3.429

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

v18.18.2

Reproduction Steps

I'm not sure of the exact point where this issue was introduced. I can say that in version @aws-sdk/client-sqs@^3.427 it was fine and when i upgraded to @aws-sdk/client-sqs@^3.429 and later it no longer worked. I am using typescript@^5.2.2 and the code that triggers type errors is mentioned in the section above.

Observed Behavior

Screenshot 2023-10-18 at 10 09 24 AM

Expected Behavior

As mentioned in the aws docs link i provided these attribute names should work. Also missing new property should be added.

ReceiveMessageCommand is the only error I'm getting but there could be other Commands that are affected by something similar.

Possible Solution

Add the missing Attributes to the type as well as the missing property.

Additional Information/Context

No response

yenfryherrerafeliz commented 8 months ago

Hi @acommodari, thanks for reporting this. I have confirmed that MessageSystemAttributeNames is not available as an option in the ReceiveMessage request parameters, for what I will reach out to the SQS service regarding this. Once I have more details I will get back to you.

Thanks!

yenfryherrerafeliz commented 8 months ago

V1073281478

aBurmeseDev commented 1 month ago

Hi @acommodari - thanks for your patience. I wanted to share an update that the fix has now been released by service team as of last week and I was able to confirm it with latest version of SDK. Resolving this now.

github-actions[bot] commented 1 month ago

This issue is now closed.

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.