@ringer-tel/telique
Version:
TypeScript SDK for Ringer APIs
76 lines (65 loc) • 2.38 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* Telique API
* The Ringer Telique API provides access to telecommunications data, including caller name (CNAM) data, line type information, and more. The API also includes services for checking phone numbers against Do Not Originate (DNO) and Do Not Call (DNC) databases, as well as STIR/SHAKEN call authentication validation. ## Authentication This API uses IP whitelist authentication. Your server\'s IP address must be registered with Ringer before making API calls. Contact support@ringer.tel to register your IP address.
*
* The version of the OpenAPI document: 1.0.18
* 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';
/**
*
* @export
* @interface DnoResponse
*/
export interface DnoResponse {
/**
* The phone number that was looked up
* @type {string}
* @memberof DnoResponse
*/
phoneNumber: string;
/**
* Indicates whether the number exists in the database
* @type {boolean}
* @memberof DnoResponse
*/
recordExists: boolean;
}
/**
* Check if a given object implements the DnoResponse interface.
*/
export function instanceOfDnoResponse(value: object): value is DnoResponse {
if (!('phoneNumber' in value) || value['phoneNumber'] === undefined) return false;
if (!('recordExists' in value) || value['recordExists'] === undefined) return false;
return true;
}
export function DnoResponseFromJSON(json: any): DnoResponse {
return DnoResponseFromJSONTyped(json, false);
}
export function DnoResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DnoResponse {
if (json == null) {
return json;
}
return {
'phoneNumber': json['phoneNumber'],
'recordExists': json['recordExists'],
};
}
export function DnoResponseToJSON(json: any): DnoResponse {
return DnoResponseToJSONTyped(json, false);
}
export function DnoResponseToJSONTyped(value?: DnoResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'phoneNumber': value['phoneNumber'],
'recordExists': value['recordExists'],
};
}