UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
86 lines (85 loc) 4.38 kB
"use strict"; /* 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.66 * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DeepNewsReportParamsToJSONTyped = exports.DeepNewsReportParamsToJSON = exports.DeepNewsReportParamsFromJSONTyped = exports.DeepNewsReportParamsFromJSON = exports.instanceOfDeepNewsReportParams = exports.DeepNewsReportParamsEngineEnum = void 0; const MCPFilterParams_1 = require("./MCPFilterParams"); const Sources2_1 = require("./Sources2"); const DeepNewsModel_1 = require("./DeepNewsModel"); /** * @export */ exports.DeepNewsReportParamsEngineEnum = { V1: 'v1', V15: 'v1.5' }; /** * Check if a given object implements the DeepNewsReportParams interface. */ function instanceOfDeepNewsReportParams(value) { return true; } exports.instanceOfDeepNewsReportParams = instanceOfDeepNewsReportParams; function DeepNewsReportParamsFromJSON(json) { return DeepNewsReportParamsFromJSONTyped(json, false); } exports.DeepNewsReportParamsFromJSON = DeepNewsReportParamsFromJSON; function DeepNewsReportParamsFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'sources': json['sources'] == null ? undefined : (0, Sources2_1.Sources2FromJSON)(json['sources']), 'filterParams': json['filter_params'] == null ? undefined : (0, MCPFilterParams_1.MCPFilterParamsFromJSON)(json['filter_params']), 'includeEntities': json['include_entities'] == null ? undefined : json['include_entities'], 'includeGraphs': json['include_graphs'] == null ? undefined : json['include_graphs'], 'includeCoordinates': json['include_coordinates'] == null ? undefined : json['include_coordinates'], 'engine': json['engine'] == null ? undefined : json['engine'], 'maxParallelToolCalls': json['max_parallel_tool_calls'] == null ? undefined : json['max_parallel_tool_calls'], 'enableSourcePruning': json['enable_source_pruning'] == null ? undefined : json['enable_source_pruning'], 'cutoffDatetime': json['cutoff_datetime'] == null ? undefined : (new Date(json['cutoff_datetime'])), 'model': json['model'] == null ? undefined : (0, DeepNewsModel_1.DeepNewsModelFromJSON)(json['model']), 'searchDepth': json['search_depth'] == null ? undefined : json['search_depth'], 'maxDepth': json['max_depth'] == null ? undefined : json['max_depth'], 'startCitationNumber': json['start_citation_number'] == null ? undefined : json['start_citation_number'], 'journalistMode': json['journalist_mode'] == null ? undefined : json['journalist_mode'], }; } exports.DeepNewsReportParamsFromJSONTyped = DeepNewsReportParamsFromJSONTyped; function DeepNewsReportParamsToJSON(json) { return DeepNewsReportParamsToJSONTyped(json, false); } exports.DeepNewsReportParamsToJSON = DeepNewsReportParamsToJSON; function DeepNewsReportParamsToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'sources': (0, Sources2_1.Sources2ToJSON)(value['sources']), 'filter_params': (0, MCPFilterParams_1.MCPFilterParamsToJSON)(value['filterParams']), 'include_entities': value['includeEntities'], 'include_graphs': value['includeGraphs'], 'include_coordinates': value['includeCoordinates'], 'engine': value['engine'], 'max_parallel_tool_calls': value['maxParallelToolCalls'], 'enable_source_pruning': value['enableSourcePruning'], 'cutoff_datetime': value['cutoffDatetime'] == null ? undefined : (value['cutoffDatetime'].toISOString()), 'model': (0, DeepNewsModel_1.DeepNewsModelToJSON)(value['model']), 'search_depth': value['searchDepth'], 'max_depth': value['maxDepth'], 'start_citation_number': value['startCitationNumber'], 'journalist_mode': value['journalistMode'], }; } exports.DeepNewsReportParamsToJSONTyped = DeepNewsReportParamsToJSONTyped;