UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
53 lines (52 loc) 1.97 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.22 * Contact: contact@emergentmethods.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { DomainHitsSurfaceDayItemFromJSON, DomainHitsSurfaceDayItemToJSON, } from './DomainHitsSurfaceDayItem'; /** * Check if a given object implements the DomainHitsSurfaceTimeWindowResponse interface. */ export function instanceOfDomainHitsSurfaceTimeWindowResponse(value) { if (!('data' in value) || value['data'] === undefined) return false; if (!('totalHits' in value) || value['totalHits'] === undefined) return false; if (!('totalSurfaced' in value) || value['totalSurfaced'] === undefined) return false; return true; } export function DomainHitsSurfaceTimeWindowResponseFromJSON(json) { return DomainHitsSurfaceTimeWindowResponseFromJSONTyped(json, false); } export function DomainHitsSurfaceTimeWindowResponseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'data': (json['data'].map(DomainHitsSurfaceDayItemFromJSON)), 'totalHits': json['total_hits'], 'totalSurfaced': json['total_surfaced'], }; } export function DomainHitsSurfaceTimeWindowResponseToJSON(json) { return DomainHitsSurfaceTimeWindowResponseToJSONTyped(json, false); } export function DomainHitsSurfaceTimeWindowResponseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'data': (value['data'].map(DomainHitsSurfaceDayItemToJSON)), 'total_hits': value['totalHits'], 'total_surfaced': value['totalSurfaced'], }; }