(token: TokenInfo)
| 65 | } |
| 66 | |
| 67 | export function tokenToWire(token: TokenInfo): TokenInfoWire { |
| 68 | return { |
| 69 | access_token: token.accessToken, |
| 70 | refresh_token: token.refreshToken, |
| 71 | expires_at: token.expiresAt, |
| 72 | scope: token.scope, |
| 73 | token_type: token.tokenType, |
| 74 | expires_in: token.expiresIn, |
| 75 | }; |
| 76 | } |
| 77 | |
| 78 | export function tokenFromWire(wire: Partial<TokenInfoWire>): TokenInfo { |
| 79 | return { |