-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add TypeScript definitions #121
Conversation
Thanks for the contribution @programmarchy 👍 |
You're welcome. I tried to make the existing definitions as accurate as possible based on the JS code. However, it's worth noting there are a couple definitions missing, e.g. |
Thanks @programmarchy . I will discuss this with my team next week and keep you posted should I need help with the release. Appreciate your help ! |
refresh_token: string; | ||
expires_in: number; | ||
x_refresh_token_expires_in: number; | ||
id_token: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this property be optional?
I.e. it'd be there when open_id is in the scope
Any updates on this? We could really use this in 2022... |
@joshnies There's little point to this library, in my opinion. You're better off using an OAuth2 client like client-oauth2 to get the tokens you need for API requests. That's all this library really does, except for the If you're interested, here's a snippet from a TypeScript API client I created: https://gist.github.com/programmarchy/080075d3aaea8cf001c354a2584ca1e8 Fair warning, though: you'll have to "fill in the blanks" for certain things like token storage. Also, the types are not fully fleshed out since I only created types for API endpoints that I needed for my projects. You're welcome to repurpose it for your needs, though. |
Roger, I'll check it out, thanks @programmarchy ! |
Adds TypeScript definitions for this module.