UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
71 lines (70 loc) 2.07 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.18.6 * 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. */ /** * Check if a given object implements the AlertLog interface. */ export function instanceOfAlertLog(value) { if (!('id' in value)) return false; if (!('createdAt' in value)) return false; if (!('alertId' in value)) return false; if (!('userId' in value)) return false; if (!('alert' in value)) return false; if (!('reasoning' in value)) return false; if (!('articleIds' in value)) return false; return true; } export function AlertLogFromJSON(json) { return AlertLogFromJSONTyped(json, false); } export function AlertLogFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'id': json['id'], 'createdAt': (new Date(json['created_at'])), 'alertId': json['alert_id'], 'userId': json['user_id'], 'alert': json['alert'], 'reasoning': json['reasoning'], 'report': json['report'] == null ? undefined : json['report'], 'reportUrl': json['report_url'] == null ? undefined : json['report_url'], 'articleIds': json['article_ids'], 'webhook': json['webhook'] == null ? undefined : json['webhook'], }; } export function AlertLogToJSON(value) { if (value == null) { return value; } return { 'id': value['id'], 'created_at': ((value['createdAt']).toISOString()), 'alert_id': value['alertId'], 'user_id': value['userId'], 'alert': value['alert'], 'reasoning': value['reasoning'], 'report': value['report'], 'report_url': value['reportUrl'], 'article_ids': value['articleIds'], 'webhook': value['webhook'], }; }