UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
82 lines (81 loc) 4.06 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.DeepNewsSourceParamsToJSONTyped = exports.DeepNewsSourceParamsToJSON = exports.DeepNewsSourceParamsFromJSONTyped = exports.DeepNewsSourceParamsFromJSON = exports.instanceOfDeepNewsSourceParams = exports.DeepNewsSourceParamsEngineEnum = void 0; const MCPFilterParams_1 = require("./MCPFilterParams"); const Sources2_1 = require("./Sources2"); const DeepNewsModel_1 = require("./DeepNewsModel"); /** * @export */ exports.DeepNewsSourceParamsEngineEnum = { V1: 'v1', V15: 'v1.5' }; /** * Check if a given object implements the DeepNewsSourceParams interface. */ function instanceOfDeepNewsSourceParams(value) { return true; } exports.instanceOfDeepNewsSourceParams = instanceOfDeepNewsSourceParams; function DeepNewsSourceParamsFromJSON(json) { return DeepNewsSourceParamsFromJSONTyped(json, false); } exports.DeepNewsSourceParamsFromJSON = DeepNewsSourceParamsFromJSON; function DeepNewsSourceParamsFromJSONTyped(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'], }; } exports.DeepNewsSourceParamsFromJSONTyped = DeepNewsSourceParamsFromJSONTyped; function DeepNewsSourceParamsToJSON(json) { return DeepNewsSourceParamsToJSONTyped(json, false); } exports.DeepNewsSourceParamsToJSON = DeepNewsSourceParamsToJSON; function DeepNewsSourceParamsToJSONTyped(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'], }; } exports.DeepNewsSourceParamsToJSONTyped = DeepNewsSourceParamsToJSONTyped;