UNPKG

@ringer-tel/ivy

Version:
101 lines (90 loc) 3.15 kB
/* tslint:disable */ /* eslint-disable */ /** * Ringer Business API * This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites, phone numbers, payments, users, and other business resources. Operations typically require authentication and appropriate permissions. * * The version of the OpenAPI document: 1.0.5 * Contact: support@ringer.tel * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; /** * Response containing the access token and related information. * @export * @interface TokenResponse */ export interface TokenResponse { /** * The issued OAuth 2.0 access token. * @type {string} * @memberof TokenResponse */ accessToken: string; /** * Type of the token issued (typically "Bearer"). * @type {string} * @memberof TokenResponse */ tokenType: string; /** * The lifetime in seconds of the access token. * @type {number} * @memberof TokenResponse */ expiresIn: number; /** * Token that can be used to obtain a new access token when the current access token expires. * @type {string} * @memberof TokenResponse */ refreshToken?: string | null; /** * Space-separated list of scopes that have been granted for this access token. * @type {string} * @memberof TokenResponse */ scope?: string | null; } /** * Check if a given object implements the TokenResponse interface. */ export function instanceOfTokenResponse(value: object): value is TokenResponse { if (!('accessToken' in value) || value['accessToken'] === undefined) return false; if (!('tokenType' in value) || value['tokenType'] === undefined) return false; if (!('expiresIn' in value) || value['expiresIn'] === undefined) return false; return true; } export function TokenResponseFromJSON(json: any): TokenResponse { return TokenResponseFromJSONTyped(json, false); } export function TokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenResponse { if (json == null) { return json; } return { 'accessToken': json['access_token'], 'tokenType': json['token_type'], 'expiresIn': json['expires_in'], 'refreshToken': json['refresh_token'] == null ? undefined : json['refresh_token'], 'scope': json['scope'] == null ? undefined : json['scope'], }; } export function TokenResponseToJSON(json: any): TokenResponse { return TokenResponseToJSONTyped(json, false); } export function TokenResponseToJSONTyped(value?: TokenResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'access_token': value['accessToken'], 'token_type': value['tokenType'], 'expires_in': value['expiresIn'], 'refresh_token': value['refreshToken'], 'scope': value['scope'], }; }