smarty / smartystreets-javascript-sdk

The official client libraries for accessing SmartyStreets APIs from javascript.
https://smartystreets.com/docs/sdk/javascript
Apache License 2.0
31 stars 30 forks source link

No example given for SDK: International Autocomplete #42

Closed WellSky-MaryWelch closed 2 years ago

WellSky-MaryWelch commented 2 years ago

There doesn't seem to be an example listed for how to use/access the International Address Autocomplete using the SDK. https://github.com/smartystreets/smartystreets-javascript-sdk/tree/master/examples

mattsafish commented 2 years ago

https://github.com/smartystreets/smartystreets-javascript-sdk/blob/master/examples/international_address_autocomplete.js

Shoutout @alexkess101 for the example.

However, the types have not been updated for the javascript-sdk and don't include internationalAddressAutocomplete.

alexkess101 commented 2 years ago

@mattsafish could you clarify what you mean when you say the types have not been updated? Are you asking for typescript examples as well?

mattsafish commented 2 years ago

@alexkess101 the type definitions for international address autocomplete are not in the most recently available @types/smartystreets-javascript-sdk. I commented on this issue since I believe it pertained to the nature of international address autocomplete being a recent addition, that in addition to the example only recently being added @types has not been accordingly updated. Your JavaScript example worked just fine for me using import syntax after I declared the types manually with help from your example and the source code. Sorry for not being clear.

camiblanch commented 2 years ago

@mattsafish Are you referring to the definitions seen here?

mattsafish commented 2 years ago

@camiblanch Yes those

camiblanch commented 2 years ago

@mattsafish SmartyStreets didn't create the those typescript definitions that you see and we don't currently have plans to maintain them. I recommend creating a pull request to the typescript definitions repository here or contacting @newbish who created the original typescript definitions for smartystreets-javascript-sdk.