UNPKG

@ringer-tel/ivy

Version:
162 lines (148 loc) 5.12 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.6 * 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'; /** * Summary details of a specific call event. * @export * @interface CallRecordItemSummary */ export interface CallRecordItemSummary { /** * Unique identifier for this call summary record. * @type {number} * @memberof CallRecordItemSummary */ id: number; /** * Dialed Number Identifier (DNIS). * @type {string} * @memberof CallRecordItemSummary */ dni: string; /** * Name associated with the DNI (e.g., location or service). * @type {string} * @memberof CallRecordItemSummary */ dniName?: string | null; /** * Automatic Number Identification (ANI) of the caller. * @type {string} * @memberof CallRecordItemSummary */ rawAni: string; /** * A descriptive name for the call type or leg. * @type {string} * @memberof CallRecordItemSummary */ name?: string | null; /** * Dialing zone or rate category for the call. * @type {string} * @memberof CallRecordItemSummary */ zone?: string | null; /** * * @type {string} * @memberof CallRecordItemSummary */ direction: CallRecordItemSummaryDirectionEnum; /** * * @type {Date} * @memberof CallRecordItemSummary */ startStamp: Date; /** * * @type {Date} * @memberof CallRecordItemSummary */ answerStamp?: Date | null; /** * * @type {Date} * @memberof CallRecordItemSummary */ endStamp?: Date | null; /** * Duration of the answered part of the call in seconds. * @type {number} * @memberof CallRecordItemSummary */ duration?: number; } /** * @export */ export const CallRecordItemSummaryDirectionEnum = { Inbound: 'inbound', Outbound: 'outbound' } as const; export type CallRecordItemSummaryDirectionEnum = typeof CallRecordItemSummaryDirectionEnum[keyof typeof CallRecordItemSummaryDirectionEnum]; /** * Check if a given object implements the CallRecordItemSummary interface. */ export function instanceOfCallRecordItemSummary(value: object): value is CallRecordItemSummary { if (!('id' in value) || value['id'] === undefined) return false; if (!('dni' in value) || value['dni'] === undefined) return false; if (!('rawAni' in value) || value['rawAni'] === undefined) return false; if (!('direction' in value) || value['direction'] === undefined) return false; if (!('startStamp' in value) || value['startStamp'] === undefined) return false; return true; } export function CallRecordItemSummaryFromJSON(json: any): CallRecordItemSummary { return CallRecordItemSummaryFromJSONTyped(json, false); } export function CallRecordItemSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): CallRecordItemSummary { if (json == null) { return json; } return { 'id': json['id'], 'dni': json['dni'], 'dniName': json['dni_name'] == null ? undefined : json['dni_name'], 'rawAni': json['raw_ani'], 'name': json['name'] == null ? undefined : json['name'], 'zone': json['zone'] == null ? undefined : json['zone'], 'direction': json['direction'], 'startStamp': (new Date(json['start_stamp'])), 'answerStamp': json['answer_stamp'] == null ? undefined : (new Date(json['answer_stamp'])), 'endStamp': json['end_stamp'] == null ? undefined : (new Date(json['end_stamp'])), 'duration': json['duration'] == null ? undefined : json['duration'], }; } export function CallRecordItemSummaryToJSON(json: any): CallRecordItemSummary { return CallRecordItemSummaryToJSONTyped(json, false); } export function CallRecordItemSummaryToJSONTyped(value?: CallRecordItemSummary | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'dni': value['dni'], 'dni_name': value['dniName'], 'raw_ani': value['rawAni'], 'name': value['name'], 'zone': value['zone'], 'direction': value['direction'], 'start_stamp': ((value['startStamp']).toISOString()), 'answer_stamp': value['answerStamp'] == null ? undefined : ((value['answerStamp'] as any).toISOString()), 'end_stamp': value['endStamp'] == null ? undefined : ((value['endStamp'] as any).toISOString()), 'duration': value['duration'], }; }