From 2babbef08affeb60cdcf368b51362a1bd490cd55 Mon Sep 17 00:00:00 2001 From: Khuder Khalti Date: Thu, 25 Jun 2026 20:31:07 +0200 Subject: [PATCH] fix(patents): move interfaces to model file --- webapp/src/app/api/api/patents.service.ts | 35 ++----------------- webapp/src/app/api/model/patentEntry.ts | 42 ++++++++++++++--------- 2 files changed, 27 insertions(+), 50 deletions(-) diff --git a/webapp/src/app/api/api/patents.service.ts b/webapp/src/app/api/api/patents.service.ts index ea88b25d..80ecb189 100644 --- a/webapp/src/app/api/api/patents.service.ts +++ b/webapp/src/app/api/api/patents.service.ts @@ -1,7 +1,6 @@ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, - HttpHeaders, HttpParams, HttpResponse, HttpEvent, @@ -12,39 +11,9 @@ import { Observable } from 'rxjs'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; import { BaseService } from '../api.base.service'; +import { IpcClassification, PatentEntry } from '../model/patentEntry'; -export interface IpcClassification { - symbol: string; - section: string | null; - class: string | null; - subclass: string | null; - main_group: string | null; - subgroup: string | null; -} - -export interface PatentEntry { - patent_id: string; - source: string; - title: string | null; - abstract: string | null; - publication_date: string | null; - publication_year: string | null; - application_number: string | null; - application_date: string | null; - kind: string | null; - application_type: string | null; - number_of_claims: number | null; - status: string | null; - inventors: string[]; - assignees: string[]; - ipc: string[]; - ipc_descriptions: IpcClassification[]; - cpc: string[]; - cpc_descriptions: IpcClassification[]; - country: string | null; -} - -interface PatentsByAuthorResponse { +export interface PatentsByAuthorResponse { author_id: string; author_name: string | null; patent_count: number; diff --git a/webapp/src/app/api/model/patentEntry.ts b/webapp/src/app/api/model/patentEntry.ts index a6a3619c..94f21db2 100644 --- a/webapp/src/app/api/model/patentEntry.ts +++ b/webapp/src/app/api/model/patentEntry.ts @@ -1,22 +1,30 @@ -/** - * Innovation Search Engine API - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ +export interface IpcClassification { + symbol: string; + section: string | null; + class: string | null; + subclass: string | null; + main_group: string | null; + subgroup: string | null; +} export interface PatentEntry { patent_id: string; source: string; - title?: string | null; - abstract?: string | null; - publication_date?: string | null; - publication_year?: string | null; - inventors?: Array; - assignees?: Array; - ipc?: Array; - country?: string | null; + title: string | null; + abstract: string | null; + publication_date: string | null; + publication_year: string | null; + application_number: string | null; + application_date: string | null; + kind: string | null; + application_type: string | null; + number_of_claims: number | null; + status: string | null; + inventors: string[]; + assignees: string[]; + ipc: string[]; + ipc_descriptions: IpcClassification[]; + cpc: string[]; + cpc_descriptions: IpcClassification[]; + country: string | null; }