UNPKG

@ringer-tel/ivy

Version:
147 lines (136 loc) 5.26 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'; /** * Data required to create a new site. * @export * @interface SiteCreateRequest */ export interface SiteCreateRequest { /** * A user-friendly name for the site (e.g., "Main Office", "Sales Department"). * @type {string} * @memberof SiteCreateRequest */ name: string; /** * The DNS extension for the site, used to form part of its unique SIP domain. * @type {string} * @memberof SiteCreateRequest */ dnsExtension: string; /** * Indicates if the site is active. Inactive sites cannot place or receive calls. * @type {boolean} * @memberof SiteCreateRequest */ active: boolean; /** * Default Caller ID name for outbound calls originating from this site. * @type {string} * @memberof SiteCreateRequest */ callerIdName: string; /** * Default Caller ID number for outbound calls from this site (e.g., main business number). * @type {string} * @memberof SiteCreateRequest */ callerIdNumber: string; /** * Identifier of the thin client (call processing node) assigned to this site. * @type {number} * @memberof SiteCreateRequest */ thinClientId: number; /** * Access Control List (e.g., IP addresses or ranges) defining who can connect to this site's SIP services. * @type {string} * @memberof SiteCreateRequest */ acl: string; /** * Maximum number of concurrent call channels allowed for this site. * @type {number} * @memberof SiteCreateRequest */ 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 SiteCreateRequest */ permittedCountryCodes: Array<string>; /** * URL to the music on hold audio file for the site. * @type {string} * @memberof SiteCreateRequest */ musicOnHoldUrl?: string | null; } /** * Check if a given object implements the SiteCreateRequest interface. */ export function instanceOfSiteCreateRequest(value: object): value is SiteCreateRequest { 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; return true; } export function SiteCreateRequestFromJSON(json: any): SiteCreateRequest { return SiteCreateRequestFromJSONTyped(json, false); } export function SiteCreateRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SiteCreateRequest { 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'], }; } export function SiteCreateRequestToJSON(json: any): SiteCreateRequest { return SiteCreateRequestToJSONTyped(json, false); } export function SiteCreateRequestToJSONTyped(value?: SiteCreateRequest | 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'], }; }