UNPKG

@ringer-tel/ivy

Version:
159 lines (147 loc) 5.22 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'; import type { Link } from './Link'; import { LinkFromJSON, LinkFromJSONTyped, LinkToJSON, LinkToJSONTyped, } from './Link'; /** * * @export * @interface AvailableForward */ export interface AvailableForward { /** * A user-friendly name for the forward configuration. * @type {string} * @memberof AvailableForward */ name: string; /** * The external phone number (E.164 format recommended) to which calls will be forwarded. * @type {string} * @memberof AvailableForward */ destinationDialString: string; /** * How long (in seconds) the forward will be attempted before failing over or disconnecting. * @type {number} * @memberof AvailableForward */ timeout?: number; /** * Whether this call forward rule is currently active. * @type {boolean} * @memberof AvailableForward */ active?: boolean; /** * System code for the destination if the forward attempt fails or times out. * @type {string} * @memberof AvailableForward */ failOverDestinationCode?: string | null; /** * Optional. Identifier of the user primarily associated with this forward. * @type {number} * @memberof AvailableForward */ userId?: number | null; /** * Unique identifier for the forward. * @type {number} * @memberof AvailableForward */ id: number; /** * Identifier of the site this forward belongs to. * @type {number} * @memberof AvailableForward */ siteId: number; /** * * @type {Array<Link>} * @memberof AvailableForward */ links?: Array<Link> | null; /** * Whether the forward is currently assigned (e.g., to the user specified in query). * @type {boolean} * @memberof AvailableForward */ assigned: boolean; /** * ID of the user this forward is assigned to in this context, if any. * @type {number} * @memberof AvailableForward */ assignedTo?: number | null; } /** * Check if a given object implements the AvailableForward interface. */ export function instanceOfAvailableForward(value: object): value is AvailableForward { if (!('name' in value) || value['name'] === undefined) return false; if (!('destinationDialString' in value) || value['destinationDialString'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; if (!('siteId' in value) || value['siteId'] === undefined) return false; if (!('assigned' in value) || value['assigned'] === undefined) return false; return true; } export function AvailableForwardFromJSON(json: any): AvailableForward { return AvailableForwardFromJSONTyped(json, false); } export function AvailableForwardFromJSONTyped(json: any, ignoreDiscriminator: boolean): AvailableForward { if (json == null) { return json; } return { 'name': json['name'], 'destinationDialString': json['destination_dial_string'], 'timeout': json['timeout'] == null ? undefined : json['timeout'], 'active': json['active'] == null ? undefined : json['active'], 'failOverDestinationCode': json['fail_over_destination_code'] == null ? undefined : json['fail_over_destination_code'], 'userId': json['user_id'] == null ? undefined : json['user_id'], 'id': json['id'], 'siteId': json['site_id'], 'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(LinkFromJSON)), 'assigned': json['assigned'], 'assignedTo': json['assigned_to'] == null ? undefined : json['assigned_to'], }; } export function AvailableForwardToJSON(json: any): AvailableForward { return AvailableForwardToJSONTyped(json, false); } export function AvailableForwardToJSONTyped(value?: AvailableForward | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'name': value['name'], 'destination_dial_string': value['destinationDialString'], 'timeout': value['timeout'], 'active': value['active'], 'fail_over_destination_code': value['failOverDestinationCode'], 'user_id': value['userId'], 'id': value['id'], 'site_id': value['siteId'], 'links': value['links'] == null ? undefined : ((value['links'] as Array<any>).map(LinkToJSON)), 'assigned': value['assigned'], 'assigned_to': value['assignedTo'], }; }