Skip to content

Commit

Permalink
Merge pull request #153 from KnisterPeter/type-returned-tokens
Browse files Browse the repository at this point in the history
fix: add types for returned tokens
  • Loading branch information
peter-murray authored Dec 30, 2019
2 parents ee03b8d + f1ea35b commit 979fdc0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion lib/api/Remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,23 @@ module.exports = class Remote {
return this._getRemoteApi().createRemoteUsername(remoteBridgeId, deviceType);
}

/**
* @typedef {Object} RemoteAccessCredentials
* @property {String} cientId
* @property {String} clientSecret
* @property {Object} tokens
* @property {Object} [tokens.access]
* @property {String} tokens.access.value
* @property {String} tokens.access.expiresAt
* @property {Object} [tokens.refresh]
* @property {String} tokens.refresh.value
* @property {String} tokens.refresh.expiresAt
* @property {String} username
*/

/**
* Obtains the remote access credentials that are in use for the remote connection.
* @returns {{clientId: {String}, clientSecret: {String}, tokens: {}, username: {String}}}
* @returns {RemoteAccessCredentials}
*/
getRemoteAccessCredentials() {
const config = this._getHueApi()._getConfig();
Expand Down

0 comments on commit 979fdc0

Please sign in to comment.