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

improve & correct the type declarations for BLOB (aws/smithy) types #4786

Closed
1 of 2 tasks
kuhe opened this issue Jun 2, 2023 · 3 comments · Fixed by #4836
Closed
1 of 2 tasks

improve & correct the type declarations for BLOB (aws/smithy) types #4786

kuhe opened this issue Jun 2, 2023 · 3 comments · Fixed by #4836
Assignees
Labels
feature-request New feature or enhancement. May require GitHub community feedback. p2 This is a standard priority issue

Comments

@kuhe
Copy link
Contributor

kuhe commented Jun 2, 2023

Describe the feature

shape members with type BLOB are treated too narrowly, being declared in the base request/response types as Uint8Array.

Example, Lambda's InvokeCommand's InvocationRequest.Payload.

Depending on the request handler (commonly node.http or fetch), this payload is passed with no modification as the request body. These native http implementations accept multiple types for their request bodies including string and other streaming formats.

Use Case

The type is too narrow and can confuse TypeScript users into thinking they need to convert their already-acceptable payloads, such as strings, into a Uint8Array before sending them over the SDK request.

Proposed Solution

expand the type declaration for BLOB types in client models to include accepted request body types in the environment's default request handler.

This should at the very least include strings.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

current

Environment details (OS name and version, etc.)

all

@kuhe kuhe added feature-request New feature or enhancement. May require GitHub community feedback. needs-triage This issue or PR still needs to be triaged. labels Jun 2, 2023
@RanVaknin RanVaknin added p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Jun 2, 2023
@kuhe kuhe self-assigned this Jun 12, 2023
@kuhe
Copy link
Contributor Author

kuhe commented Jun 12, 2023

some previous discussion: #2252

@kuhe
Copy link
Contributor Author

kuhe commented Jun 15, 2023

work on this will be logged in #4786

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request New feature or enhancement. May require GitHub community feedback. p2 This is a standard priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants