@kortexya/reasoninglayer 1.8.1 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -109,7 +109,7 @@ type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | object;
109
109
  * This is the single source of truth for the version constant.
110
110
  * The `scripts/release.sh` script updates this value alongside `package.json`.
111
111
  */
112
- declare const SDK_VERSION = "1.8.1";
112
+ declare const SDK_VERSION = "1.10.1";
113
113
  /**
114
114
  * Authentication mode for the SDK.
115
115
  *
@@ -37371,6 +37371,16 @@ interface AnalyzeDocumentsRequest {
37371
37371
  /** Max rules to evaluate per document (0 = unlimited, the default). */
37372
37372
  maxRules?: number;
37373
37373
  }
37374
+ /** Per-call options for {@link DocumentsClient.analyze}. */
37375
+ interface AnalyzeOptions {
37376
+ /**
37377
+ * Abort signal to cancel the in-flight analysis request. Analyse runs many
37378
+ * sequential LLM calls per document and can take a while, so callers (e.g. a
37379
+ * "Cancel" button) can pass an {@link AbortController} signal to tear the
37380
+ * request down rather than waiting for it to complete.
37381
+ */
37382
+ signal?: AbortSignal;
37383
+ }
37374
37384
  /** Status of a single rule check. */
37375
37385
  type DocumentRuleStatus = 'pass' | 'fail' | 'inconclusive' | 'not_applicable';
37376
37386
  /** Severity of a single rule. */
@@ -37450,6 +37460,7 @@ interface DocumentAnalysisReport {
37450
37460
  }
37451
37461
 
37452
37462
  type documents_AnalyzeDocumentsRequest = AnalyzeDocumentsRequest;
37463
+ type documents_AnalyzeOptions = AnalyzeOptions;
37453
37464
  type documents_DocumentAnalysisReport = DocumentAnalysisReport;
37454
37465
  type documents_DocumentExtractedEntity = DocumentExtractedEntity;
37455
37466
  type documents_DocumentInput = DocumentInput;
@@ -37459,7 +37470,7 @@ type documents_DocumentRuleResult = DocumentRuleResult;
37459
37470
  type documents_DocumentRuleSeverity = DocumentRuleSeverity;
37460
37471
  type documents_DocumentRuleStatus = DocumentRuleStatus;
37461
37472
  declare namespace documents {
37462
- export type { documents_AnalyzeDocumentsRequest as AnalyzeDocumentsRequest, documents_DocumentAnalysisReport as DocumentAnalysisReport, documents_DocumentExtractedEntity as DocumentExtractedEntity, documents_DocumentInput as DocumentInput, documents_DocumentProofStep as DocumentProofStep, documents_DocumentResult as DocumentResult, documents_DocumentRuleResult as DocumentRuleResult, documents_DocumentRuleSeverity as DocumentRuleSeverity, documents_DocumentRuleStatus as DocumentRuleStatus };
37473
+ export type { documents_AnalyzeDocumentsRequest as AnalyzeDocumentsRequest, documents_AnalyzeOptions as AnalyzeOptions, documents_DocumentAnalysisReport as DocumentAnalysisReport, documents_DocumentExtractedEntity as DocumentExtractedEntity, documents_DocumentInput as DocumentInput, documents_DocumentProofStep as DocumentProofStep, documents_DocumentResult as DocumentResult, documents_DocumentRuleResult as DocumentRuleResult, documents_DocumentRuleSeverity as DocumentRuleSeverity, documents_DocumentRuleStatus as DocumentRuleStatus };
37463
37474
  }
37464
37475
 
37465
37476
  /**
@@ -37483,9 +37494,10 @@ declare class DocumentsClient {
37483
37494
  * Analyse documents against the knowledge base's compliance rules.
37484
37495
  *
37485
37496
  * @param request - Documents (name + content) plus optional rule-sort focus.
37497
+ * @param options - Per-call options (e.g. an {@link AbortSignal} to cancel).
37486
37498
  * @returns Per-document rule results, scores, entities and proof traces.
37487
37499
  */
37488
- analyze(request: AnalyzeDocumentsRequest): Promise<DocumentAnalysisReport>;
37500
+ analyze(request: AnalyzeDocumentsRequest, options?: AnalyzeOptions): Promise<DocumentAnalysisReport>;
37489
37501
  }
37490
37502
 
37491
37503
  declare class Oversight<SecurityDataType = unknown> {
package/dist/index.d.ts CHANGED
@@ -109,7 +109,7 @@ type JsonValue$1 = string | number | boolean | null | JsonValue$1[] | object;
109
109
  * This is the single source of truth for the version constant.
110
110
  * The `scripts/release.sh` script updates this value alongside `package.json`.
111
111
  */
112
- declare const SDK_VERSION = "1.8.1";
112
+ declare const SDK_VERSION = "1.10.1";
113
113
  /**
114
114
  * Authentication mode for the SDK.
115
115
  *
@@ -37371,6 +37371,16 @@ interface AnalyzeDocumentsRequest {
37371
37371
  /** Max rules to evaluate per document (0 = unlimited, the default). */
37372
37372
  maxRules?: number;
37373
37373
  }
37374
+ /** Per-call options for {@link DocumentsClient.analyze}. */
37375
+ interface AnalyzeOptions {
37376
+ /**
37377
+ * Abort signal to cancel the in-flight analysis request. Analyse runs many
37378
+ * sequential LLM calls per document and can take a while, so callers (e.g. a
37379
+ * "Cancel" button) can pass an {@link AbortController} signal to tear the
37380
+ * request down rather than waiting for it to complete.
37381
+ */
37382
+ signal?: AbortSignal;
37383
+ }
37374
37384
  /** Status of a single rule check. */
37375
37385
  type DocumentRuleStatus = 'pass' | 'fail' | 'inconclusive' | 'not_applicable';
37376
37386
  /** Severity of a single rule. */
@@ -37450,6 +37460,7 @@ interface DocumentAnalysisReport {
37450
37460
  }
37451
37461
 
37452
37462
  type documents_AnalyzeDocumentsRequest = AnalyzeDocumentsRequest;
37463
+ type documents_AnalyzeOptions = AnalyzeOptions;
37453
37464
  type documents_DocumentAnalysisReport = DocumentAnalysisReport;
37454
37465
  type documents_DocumentExtractedEntity = DocumentExtractedEntity;
37455
37466
  type documents_DocumentInput = DocumentInput;
@@ -37459,7 +37470,7 @@ type documents_DocumentRuleResult = DocumentRuleResult;
37459
37470
  type documents_DocumentRuleSeverity = DocumentRuleSeverity;
37460
37471
  type documents_DocumentRuleStatus = DocumentRuleStatus;
37461
37472
  declare namespace documents {
37462
- export type { documents_AnalyzeDocumentsRequest as AnalyzeDocumentsRequest, documents_DocumentAnalysisReport as DocumentAnalysisReport, documents_DocumentExtractedEntity as DocumentExtractedEntity, documents_DocumentInput as DocumentInput, documents_DocumentProofStep as DocumentProofStep, documents_DocumentResult as DocumentResult, documents_DocumentRuleResult as DocumentRuleResult, documents_DocumentRuleSeverity as DocumentRuleSeverity, documents_DocumentRuleStatus as DocumentRuleStatus };
37473
+ export type { documents_AnalyzeDocumentsRequest as AnalyzeDocumentsRequest, documents_AnalyzeOptions as AnalyzeOptions, documents_DocumentAnalysisReport as DocumentAnalysisReport, documents_DocumentExtractedEntity as DocumentExtractedEntity, documents_DocumentInput as DocumentInput, documents_DocumentProofStep as DocumentProofStep, documents_DocumentResult as DocumentResult, documents_DocumentRuleResult as DocumentRuleResult, documents_DocumentRuleSeverity as DocumentRuleSeverity, documents_DocumentRuleStatus as DocumentRuleStatus };
37463
37474
  }
37464
37475
 
37465
37476
  /**
@@ -37483,9 +37494,10 @@ declare class DocumentsClient {
37483
37494
  * Analyse documents against the knowledge base's compliance rules.
37484
37495
  *
37485
37496
  * @param request - Documents (name + content) plus optional rule-sort focus.
37497
+ * @param options - Per-call options (e.g. an {@link AbortSignal} to cancel).
37486
37498
  * @returns Per-document rule results, scores, entities and proof traces.
37487
37499
  */
37488
- analyze(request: AnalyzeDocumentsRequest): Promise<DocumentAnalysisReport>;
37500
+ analyze(request: AnalyzeDocumentsRequest, options?: AnalyzeOptions): Promise<DocumentAnalysisReport>;
37489
37501
  }
37490
37502
 
37491
37503
  declare class Oversight<SecurityDataType = unknown> {
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // src/config.ts
8
- var SDK_VERSION = "1.8.1";
8
+ var SDK_VERSION = "1.10.1";
9
9
  function resolveConfig(config) {
10
10
  if (!config.baseUrl) {
11
11
  throw new Error("ClientConfig.baseUrl is required");
@@ -18587,11 +18587,13 @@ var DocumentsClient = class {
18587
18587
  * Analyse documents against the knowledge base's compliance rules.
18588
18588
  *
18589
18589
  * @param request - Documents (name + content) plus optional rule-sort focus.
18590
+ * @param options - Per-call options (e.g. an {@link AbortSignal} to cancel).
18590
18591
  * @returns Per-document rule results, scores, entities and proof traces.
18591
18592
  */
18592
- async analyze(request) {
18593
+ async analyze(request, options) {
18593
18594
  const response = await this.api.analyzeDocuments(
18594
- AnalyzeDocumentsRequestFromFrontToApi(request)
18595
+ AnalyzeDocumentsRequestFromFrontToApi(request),
18596
+ { signal: options?.signal }
18595
18597
  );
18596
18598
  return DocumentAnalysisResponseFromApiToFront(response.data);
18597
18599
  }
@@ -22871,6 +22873,246 @@ var VerificationClient = class {
22871
22873
  }
22872
22874
  };
22873
22875
 
22876
+ // src/normalizers/research.ts
22877
+ function PaperMetadataFromApiToFront(dto) {
22878
+ return {
22879
+ title: dto.title,
22880
+ authors: dto.authors,
22881
+ doi: dto.doi ?? null,
22882
+ pmid: dto.pmid ?? null,
22883
+ arxivId: dto.arxiv_id ?? null,
22884
+ journal: dto.journal ?? null,
22885
+ year: dto.year ?? null,
22886
+ abstractText: dto.abstract_text ?? null,
22887
+ citationCount: dto.citation_count ?? null,
22888
+ source: dto.source,
22889
+ fullTextUrl: dto.full_text_url ?? null
22890
+ };
22891
+ }
22892
+ function PaperSearchResultFromApiToFront(dto) {
22893
+ return {
22894
+ metadata: PaperMetadataFromApiToFront(dto.metadata),
22895
+ relevanceScore: dto.relevance_score ?? null
22896
+ };
22897
+ }
22898
+ function SearchPapersResponseFromApiToFront(raw) {
22899
+ const dto = raw;
22900
+ return {
22901
+ results: (dto.results ?? []).map(PaperSearchResultFromApiToFront),
22902
+ totalFound: dto.total_found
22903
+ };
22904
+ }
22905
+ function CreateResearchSessionResponseFromApiToFront(raw) {
22906
+ const dto = raw;
22907
+ return {
22908
+ sessionId: dto.session_id,
22909
+ status: dto.status,
22910
+ question: dto.question,
22911
+ createdAt: dto.created_at
22912
+ };
22913
+ }
22914
+ function ResearchCycleResultFromApiToFront(dto) {
22915
+ return {
22916
+ cycleNumber: dto.cycle_number,
22917
+ gapsDetected: dto.gaps_detected,
22918
+ gapsResolved: dto.gaps_resolved,
22919
+ papersRetrieved: dto.papers_retrieved,
22920
+ papersIngested: dto.papers_ingested,
22921
+ claimsVerified: dto.claims_verified,
22922
+ contradictionsDetected: dto.contradictions_detected,
22923
+ processingTimeMs: dto.processing_time_ms,
22924
+ searchQueries: dto.search_queries ?? []
22925
+ };
22926
+ }
22927
+ function ResearchSessionResponseFromApiToFront(raw) {
22928
+ const dto = raw;
22929
+ return {
22930
+ sessionId: dto.session_id,
22931
+ question: dto.question,
22932
+ status: dto.status,
22933
+ error: dto.error ?? null,
22934
+ cycles: (dto.cycles ?? []).map(ResearchCycleResultFromApiToFront),
22935
+ totalPapersIngested: dto.total_papers_ingested,
22936
+ totalFindings: dto.total_findings,
22937
+ totalContradictions: dto.total_contradictions,
22938
+ totalGaps: dto.total_gaps,
22939
+ createdAt: dto.created_at,
22940
+ updatedAt: dto.updated_at
22941
+ };
22942
+ }
22943
+ function ResearchCycleResponseFromApiToFront(raw) {
22944
+ const dto = raw;
22945
+ return {
22946
+ sessionId: dto.session_id,
22947
+ status: dto.status,
22948
+ cycle: ResearchCycleResultFromApiToFront(dto.cycle),
22949
+ converged: dto.converged
22950
+ };
22951
+ }
22952
+ function EvidenceItemSummaryFromApiToFront(dto) {
22953
+ return {
22954
+ termId: dto.term_id,
22955
+ description: dto.description,
22956
+ qualityWeight: dto.quality_weight,
22957
+ supports: dto.supports,
22958
+ contribution: dto.contribution,
22959
+ paperDoi: dto.paper_doi ?? null
22960
+ };
22961
+ }
22962
+ function ProvenanceStepFromApiToFront(dto) {
22963
+ return {
22964
+ stepType: dto.step_type,
22965
+ description: dto.description,
22966
+ entityId: dto.entity_id ?? null,
22967
+ timestamp: dto.timestamp ?? null
22968
+ };
22969
+ }
22970
+ function ResearchFindingFromApiToFront(dto) {
22971
+ return {
22972
+ claimId: dto.claim_id,
22973
+ statement: dto.statement,
22974
+ truthfulness: dto.truthfulness,
22975
+ label: dto.label,
22976
+ supportingEvidence: (dto.supporting_evidence ?? []).map(EvidenceItemSummaryFromApiToFront),
22977
+ contradictingEvidence: (dto.contradicting_evidence ?? []).map(EvidenceItemSummaryFromApiToFront),
22978
+ provenanceChain: (dto.provenance_chain ?? []).map(ProvenanceStepFromApiToFront),
22979
+ residuated: dto.residuated,
22980
+ residuationReason: dto.residuation_reason ?? null
22981
+ };
22982
+ }
22983
+ function ResearchFindingsResponseFromApiToFront(raw) {
22984
+ const dto = raw;
22985
+ return {
22986
+ sessionId: dto.session_id,
22987
+ findings: (dto.findings ?? []).map(ResearchFindingFromApiToFront),
22988
+ total: dto.total
22989
+ };
22990
+ }
22991
+ function KnowledgeGapFromApiToFront(dto) {
22992
+ return {
22993
+ sortName: dto.sort_name,
22994
+ infoGain: dto.info_gain,
22995
+ neededBy: dto.needed_by ?? [],
22996
+ wakeTrigger: dto.wake_trigger,
22997
+ suggestedSearchQuery: dto.suggested_search_query ?? null
22998
+ };
22999
+ }
23000
+ function ResearchGapsResponseFromApiToFront(raw) {
23001
+ const dto = raw;
23002
+ return {
23003
+ sessionId: dto.session_id,
23004
+ gaps: (dto.gaps ?? []).map(KnowledgeGapFromApiToFront),
23005
+ total: dto.total
23006
+ };
23007
+ }
23008
+ function ContradictionFromApiToFront(dto) {
23009
+ return {
23010
+ claimAId: dto.claim_a_id,
23011
+ claimBId: dto.claim_b_id,
23012
+ statementA: dto.statement_a,
23013
+ statementB: dto.statement_b,
23014
+ confidence: dto.confidence,
23015
+ explanation: dto.explanation
23016
+ };
23017
+ }
23018
+ function ResearchContradictionsResponseFromApiToFront(raw) {
23019
+ const dto = raw;
23020
+ return {
23021
+ sessionId: dto.session_id,
23022
+ contradictions: (dto.contradictions ?? []).map(ContradictionFromApiToFront),
23023
+ total: dto.total
23024
+ };
23025
+ }
23026
+ function ResearchStatisticsFromApiToFront(dto) {
23027
+ return {
23028
+ totalCycles: dto.total_cycles,
23029
+ totalPapersRetrieved: dto.total_papers_retrieved,
23030
+ totalPapersIngested: dto.total_papers_ingested,
23031
+ totalClaimsExtracted: dto.total_claims_extracted,
23032
+ totalClaimsVerified: dto.total_claims_verified,
23033
+ totalContradictions: dto.total_contradictions,
23034
+ totalProcessingTimeMs: dto.total_processing_time_ms,
23035
+ gapsResolved: dto.gaps_resolved,
23036
+ gapsRemaining: dto.gaps_remaining
23037
+ };
23038
+ }
23039
+ function ReportVerificationFromApiToFront(dto) {
23040
+ return {
23041
+ verdict: dto.verdict,
23042
+ score: dto.score,
23043
+ computationTimeMs: dto.computation_time_ms
23044
+ };
23045
+ }
23046
+ function ResearchReportResponseFromApiToFront(raw) {
23047
+ const dto = raw;
23048
+ return {
23049
+ sessionId: dto.session_id,
23050
+ question: dto.question,
23051
+ summary: dto.summary,
23052
+ findings: (dto.findings ?? []).map(ResearchFindingFromApiToFront),
23053
+ knowledgeGaps: (dto.knowledge_gaps ?? []).map(KnowledgeGapFromApiToFront),
23054
+ contradictions: (dto.contradictions ?? []).map(ContradictionFromApiToFront),
23055
+ statistics: ResearchStatisticsFromApiToFront(dto.statistics),
23056
+ generatedContent: dto.generated_content ?? null,
23057
+ verification: dto.verification ? ReportVerificationFromApiToFront(dto.verification) : null
23058
+ };
23059
+ }
23060
+ function IngestPaperResponseFromApiToFront(raw) {
23061
+ const dto = raw;
23062
+ return {
23063
+ success: dto.success,
23064
+ metadata: dto.metadata ? PaperMetadataFromApiToFront(dto.metadata) : null,
23065
+ entitiesExtracted: dto.entities_extracted,
23066
+ claimsExtracted: dto.claims_extracted,
23067
+ error: dto.error ?? null
23068
+ };
23069
+ }
23070
+ function VerifyClaimResponseFromApiToFront(raw) {
23071
+ const dto = raw;
23072
+ return {
23073
+ truthfulness: dto.truthfulness,
23074
+ label: dto.label,
23075
+ supportingCount: dto.supporting_count,
23076
+ contradictingCount: dto.contradicting_count,
23077
+ residuated: dto.residuated,
23078
+ residuationReason: dto.residuation_reason ?? null
23079
+ };
23080
+ }
23081
+ function CreateResearchSessionRequestFromFrontToApi(model) {
23082
+ return {
23083
+ question: model.question,
23084
+ max_cycles: model.maxCycles,
23085
+ max_papers: model.maxPapers,
23086
+ paper_sources: model.paperSources
23087
+ };
23088
+ }
23089
+ function RunResearchCycleRequestFromFrontToApi(model) {
23090
+ return {
23091
+ additional_queries: model.additionalQueries,
23092
+ max_papers_this_cycle: model.maxPapersThisCycle
23093
+ };
23094
+ }
23095
+ function SearchPapersRequestFromFrontToApi(model) {
23096
+ return {
23097
+ query: model.query,
23098
+ max_results: model.maxResults,
23099
+ sources: model.sources
23100
+ };
23101
+ }
23102
+ function IngestPaperRequestFromFrontToApi(model) {
23103
+ return {
23104
+ identifier: model.identifier,
23105
+ identifier_type: model.identifierType,
23106
+ session_id: model.sessionId
23107
+ };
23108
+ }
23109
+ function VerifyClaimRequestFromFrontToApi(model) {
23110
+ return {
23111
+ claim_term_id: model.claimTermId,
23112
+ evidence_sort_id: model.evidenceSortId
23113
+ };
23114
+ }
23115
+
22874
23116
  // src/resources/research.ts
22875
23117
  var ResearchClient = class {
22876
23118
  /** @internal */
@@ -22907,12 +23149,12 @@ var ResearchClient = class {
22907
23149
  const response = await this.http.request({
22908
23150
  path: "/api/v1/research/sessions",
22909
23151
  method: "POST",
22910
- body: request,
23152
+ body: CreateResearchSessionRequestFromFrontToApi(request),
22911
23153
  secure: true,
22912
23154
  type: "application/json" /* Json */,
22913
23155
  format: "json"
22914
23156
  });
22915
- return response.data;
23157
+ return CreateResearchSessionResponseFromApiToFront(response.data);
22916
23158
  }
22917
23159
  /**
22918
23160
  * Get the current state of a research session.
@@ -22942,7 +23184,7 @@ var ResearchClient = class {
22942
23184
  secure: true,
22943
23185
  format: "json"
22944
23186
  });
22945
- return response.data;
23187
+ return ResearchSessionResponseFromApiToFront(response.data);
22946
23188
  }
22947
23189
  /**
22948
23190
  * Run a single research cycle within a session.
@@ -22973,12 +23215,12 @@ var ResearchClient = class {
22973
23215
  const response = await this.http.request({
22974
23216
  path: `/api/v1/research/sessions/${encodeURIComponent(sessionId)}/run`,
22975
23217
  method: "POST",
22976
- body: request,
23218
+ body: request ? RunResearchCycleRequestFromFrontToApi(request) : void 0,
22977
23219
  secure: true,
22978
23220
  type: "application/json" /* Json */,
22979
23221
  format: "json"
22980
23222
  });
22981
- return response.data;
23223
+ return ResearchCycleResponseFromApiToFront(response.data);
22982
23224
  }
22983
23225
  /**
22984
23226
  * Run the research session to completion (all remaining cycles).
@@ -23007,7 +23249,7 @@ var ResearchClient = class {
23007
23249
  secure: true,
23008
23250
  format: "json"
23009
23251
  });
23010
- return response.data;
23252
+ return ResearchSessionResponseFromApiToFront(response.data);
23011
23253
  }
23012
23254
  /**
23013
23255
  * Delete a research session and all associated data.
@@ -23060,7 +23302,7 @@ var ResearchClient = class {
23060
23302
  secure: true,
23061
23303
  format: "json"
23062
23304
  });
23063
- return response.data;
23305
+ return ResearchFindingsResponseFromApiToFront(response.data);
23064
23306
  }
23065
23307
  /**
23066
23308
  * Get knowledge gaps for a research session.
@@ -23093,7 +23335,7 @@ var ResearchClient = class {
23093
23335
  secure: true,
23094
23336
  format: "json"
23095
23337
  });
23096
- return response.data;
23338
+ return ResearchGapsResponseFromApiToFront(response.data);
23097
23339
  }
23098
23340
  /**
23099
23341
  * Get detected contradictions for a research session.
@@ -23125,7 +23367,7 @@ var ResearchClient = class {
23125
23367
  secure: true,
23126
23368
  format: "json"
23127
23369
  });
23128
- return response.data;
23370
+ return ResearchContradictionsResponseFromApiToFront(response.data);
23129
23371
  }
23130
23372
  /**
23131
23373
  * Get the full research report for a session.
@@ -23159,7 +23401,7 @@ var ResearchClient = class {
23159
23401
  secure: true,
23160
23402
  format: "json"
23161
23403
  });
23162
- return response.data;
23404
+ return ResearchReportResponseFromApiToFront(response.data);
23163
23405
  }
23164
23406
  /**
23165
23407
  * Search for papers across external scientific databases.
@@ -23191,12 +23433,12 @@ var ResearchClient = class {
23191
23433
  const response = await this.http.request({
23192
23434
  path: "/api/v1/research/papers/search",
23193
23435
  method: "POST",
23194
- body: request,
23436
+ body: SearchPapersRequestFromFrontToApi(request),
23195
23437
  secure: true,
23196
23438
  type: "application/json" /* Json */,
23197
23439
  format: "json"
23198
23440
  });
23199
- return response.data;
23441
+ return SearchPapersResponseFromApiToFront(response.data);
23200
23442
  }
23201
23443
  /**
23202
23444
  * Ingest a specific paper into the knowledge base.
@@ -23228,12 +23470,12 @@ var ResearchClient = class {
23228
23470
  const response = await this.http.request({
23229
23471
  path: "/api/v1/research/papers/ingest",
23230
23472
  method: "POST",
23231
- body: request,
23473
+ body: IngestPaperRequestFromFrontToApi(request),
23232
23474
  secure: true,
23233
23475
  type: "application/json" /* Json */,
23234
23476
  format: "json"
23235
23477
  });
23236
- return response.data;
23478
+ return IngestPaperResponseFromApiToFront(response.data);
23237
23479
  }
23238
23480
  /**
23239
23481
  * Verify a specific claim against evidence in the knowledge base.
@@ -23266,12 +23508,12 @@ var ResearchClient = class {
23266
23508
  const response = await this.http.request({
23267
23509
  path: "/api/v1/research/claims/verify",
23268
23510
  method: "POST",
23269
- body: request,
23511
+ body: VerifyClaimRequestFromFrontToApi(request),
23270
23512
  secure: true,
23271
23513
  type: "application/json" /* Json */,
23272
23514
  format: "json"
23273
23515
  });
23274
- return response.data;
23516
+ return VerifyClaimResponseFromApiToFront(response.data);
23275
23517
  }
23276
23518
  };
23277
23519