architect / functions

AWS Lambda Node runtime helpers for Architect apps
https://arc.codes
163 stars 38 forks source link

Update types imported from aws-sdk #555

Closed tbeseda closed 8 months ago

tbeseda commented 8 months ago

This update to arc/functions types removes references to aws-sdk and overall improves accuracy of all types. there are still a couple concessions that I think could be improved in the future, but this iteration is certainly the best we've had yet.

in the future, I think these types can be simplified by inheriting more from aws-lite directly. further, if a future version of arc/fns removes the callback pattern for most methods, we could eliminate all overload typing which accounts for a large chunk of definitions. just a note for future work.

tbeseda commented 8 months ago

Can you check my work on this change to arc.ws._api, @ryanblock ? I changed it to return the client.ApiGatewayManagementApi instead of the bare AwsLite client. This is how arc.tables._client behaves, returning client.DynamoDB https://github.com/architect/functions/pull/555/files#diff-b466cfb9345982c0a62503cb95b55fb4f4cc46a1c461b82cb3e8f7b0c89b2845

ryanblock commented 8 months ago

Great catch, thank you @tbeseda!