fix(patents): restore patent detail API and align frontend service types
LocationBasedServices/smartguide/pipeline/pr-dev This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev This commit looks good
Re-add getPatentByIdOrTitle endpoint and OrgPatentMatchTypeFilter export lost during dev merge; update institution-patents to use options-based API.
This commit is contained in:
@@ -368,12 +368,26 @@ export class PatentsService extends BaseService {
|
||||
}
|
||||
|
||||
public getPatentById(patentId: string): Observable<PatentEntry> {
|
||||
return this.getPatentByIdOrTitle(patentId);
|
||||
}
|
||||
|
||||
public getPatentByIdOrTitle(
|
||||
identifier: string,
|
||||
prefix?: string,
|
||||
title?: string,
|
||||
fillingDate?: string,
|
||||
): Observable<PatentEntry> {
|
||||
let params = new HttpParams();
|
||||
if (prefix) params = params.set('prefix', prefix);
|
||||
if (title) params = params.set('title', title);
|
||||
if (fillingDate) params = params.set('filling_date', fillingDate);
|
||||
|
||||
const localVarHeaders = this.defaultHeaders;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
const localVarPath = `/api/inse-service/patents/${this.configuration.encodeParam(
|
||||
{
|
||||
name: 'patentId',
|
||||
value: patentId,
|
||||
name: 'identifier',
|
||||
value: identifier,
|
||||
in: 'path',
|
||||
style: 'simple',
|
||||
explode: false,
|
||||
@@ -383,6 +397,7 @@ export class PatentsService extends BaseService {
|
||||
)}`;
|
||||
|
||||
return this.httpClient.get<PatentEntry>(`${basePath}${localVarPath}`, {
|
||||
params,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
});
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
*/
|
||||
import { OrgPatentEntry } from './orgPatentEntry';
|
||||
|
||||
export type OrgPatentMatchTypeFilter = 'all' | 'institution' | 'name' | 'both';
|
||||
|
||||
export interface OrgPatentsResponse {
|
||||
institution_id: string;
|
||||
institution_name?: string | null;
|
||||
|
||||
Reference in New Issue
Block a user