@ringer-tel/ivy
Version:
TypeScript SDK for Ringer APIs
189 lines (177 loc) • 6.58 kB
text/typescript
/* 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 { SchemasLink } from './SchemasLink';
import {
SchemasLinkFromJSON,
SchemasLinkFromJSONTyped,
SchemasLinkToJSON,
SchemasLinkToJSONTyped,
} from './SchemasLink';
/**
* Detailed information about a specific site.
* @export
* @interface SiteResponse
*/
export interface SiteResponse {
/**
* A user-friendly name for the site (e.g., "Main Office", "Sales Department").
* @type {string}
* @memberof SiteResponse
*/
name: string;
/**
* The DNS extension for the site, used to form part of its unique SIP domain.
* @type {string}
* @memberof SiteResponse
*/
dnsExtension: string;
/**
* Indicates if the site is active. Inactive sites cannot place or receive calls.
* @type {boolean}
* @memberof SiteResponse
*/
active: boolean;
/**
* Default Caller ID name for outbound calls originating from this site.
* @type {string}
* @memberof SiteResponse
*/
callerIdName: string;
/**
* Default Caller ID number for outbound calls from this site (e.g., main business number).
* @type {string}
* @memberof SiteResponse
*/
callerIdNumber: string;
/**
* Identifier of the thin client (call processing node) assigned to this site.
* @type {number}
* @memberof SiteResponse
*/
thinClientId: number;
/**
* Access Control List (e.g., IP addresses or ranges) defining who can connect to this site's SIP services.
* @type {string}
* @memberof SiteResponse
*/
acl: string;
/**
* Maximum number of concurrent call channels allowed for this site.
* @type {number}
* @memberof SiteResponse
*/
channelLimit: number;
/**
* List of permitted outbound country codes or dialing zones for this site. Reference Country Codes API for available values.
* @type {Array<string>}
* @memberof SiteResponse
*/
permittedCountryCodes: Array<string>;
/**
* URL to the music on hold audio file for the site.
* @type {string}
* @memberof SiteResponse
*/
musicOnHoldUrl?: string | null;
/**
* Unique identifier for the site.
* @type {number}
* @memberof SiteResponse
*/
id: number;
/**
* The fully qualified DNS name for the site (e.g., hq.ivy.teliax.com).
* @type {string}
* @memberof SiteResponse
*/
dnsName: string;
/**
* Name of the assigned thin client.
* @type {string}
* @memberof SiteResponse
*/
thinClientName?: string | null;
/**
* HATEOAS links related to this site.
* @type {Array<SchemasLink>}
* @memberof SiteResponse
*/
links?: Array<SchemasLink> | null;
}
/**
* Check if a given object implements the SiteResponse interface.
*/
export function instanceOfSiteResponse(value: object): value is SiteResponse {
if (!('name' in value) || value['name'] === undefined) return false;
if (!('dnsExtension' in value) || value['dnsExtension'] === undefined) return false;
if (!('active' in value) || value['active'] === undefined) return false;
if (!('callerIdName' in value) || value['callerIdName'] === undefined) return false;
if (!('callerIdNumber' in value) || value['callerIdNumber'] === undefined) return false;
if (!('thinClientId' in value) || value['thinClientId'] === undefined) return false;
if (!('acl' in value) || value['acl'] === undefined) return false;
if (!('channelLimit' in value) || value['channelLimit'] === undefined) return false;
if (!('permittedCountryCodes' in value) || value['permittedCountryCodes'] === undefined) return false;
if (!('id' in value) || value['id'] === undefined) return false;
if (!('dnsName' in value) || value['dnsName'] === undefined) return false;
return true;
}
export function SiteResponseFromJSON(json: any): SiteResponse {
return SiteResponseFromJSONTyped(json, false);
}
export function SiteResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteResponse {
if (json == null) {
return json;
}
return {
'name': json['name'],
'dnsExtension': json['dns_extension'],
'active': json['active'],
'callerIdName': json['caller_id_name'],
'callerIdNumber': json['caller_id_number'],
'thinClientId': json['thin_client_id'],
'acl': json['acl'],
'channelLimit': json['channel_limit'],
'permittedCountryCodes': json['permitted_country_codes'],
'musicOnHoldUrl': json['music_on_hold_url'] == null ? undefined : json['music_on_hold_url'],
'id': json['id'],
'dnsName': json['dns_name'],
'thinClientName': json['thin_client_name'] == null ? undefined : json['thin_client_name'],
'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(SchemasLinkFromJSON)),
};
}
export function SiteResponseToJSON(json: any): SiteResponse {
return SiteResponseToJSONTyped(json, false);
}
export function SiteResponseToJSONTyped(value?: SiteResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'dns_extension': value['dnsExtension'],
'active': value['active'],
'caller_id_name': value['callerIdName'],
'caller_id_number': value['callerIdNumber'],
'thin_client_id': value['thinClientId'],
'acl': value['acl'],
'channel_limit': value['channelLimit'],
'permitted_country_codes': value['permittedCountryCodes'],
'music_on_hold_url': value['musicOnHoldUrl'],
'id': value['id'],
'dns_name': value['dnsName'],
'thin_client_name': value['thinClientName'],
'links': value['links'] == null ? undefined : ((value['links'] as Array<any>).map(SchemasLinkToJSON)),
};
}