fix: resolve patents build error
LocationBasedServices/smartguide/pipeline/head This commit looks good

This commit is contained in:
2026-06-15 20:41:32 +02:00
parent 0dd03e0ae0
commit c298a388d0
4 changed files with 11 additions and 40 deletions
+11 -21
View File
@@ -60,6 +60,13 @@ export interface PatentsByAuthorResponse {
search_meta?: PatentSearchMeta | null;
}
type GetPatentsByAuthorOptions = {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
refresh?: boolean;
};
@Injectable({
providedIn: 'root',
})
@@ -83,42 +90,25 @@ export class PatentsService extends BaseService {
authorId: string,
observe?: 'body',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
options?: GetPatentsByAuthorOptions,
): Observable<PatentsByAuthorResponse>;
public getPatentsByAuthor(
authorId: string,
observe?: 'response',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
options?: GetPatentsByAuthorOptions,
): Observable<HttpResponse<PatentsByAuthorResponse>>;
public getPatentsByAuthor(
authorId: string,
observe?: 'events',
reportProgress?: boolean,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
},
options?: GetPatentsByAuthorOptions,
): Observable<HttpEvent<PatentsByAuthorResponse>>;
public getPatentsByAuthor(
authorId: string,
observe: any = 'body',
reportProgress: boolean = false,
options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
refresh?: boolean;
},
options?: GetPatentsByAuthorOptions,
): Observable<any> {
if (authorId === null || authorId === undefined) {
throw new Error(
@@ -20,14 +20,6 @@
<span class="summary-value">{{ getUsptoCount() }}</span>
<span class="summary-label"> USPTO</span>
</p>
@if (fromCache) {
<p class="summary-line summary-line--meta">
<span class="summary-label">Aus Cache</span>
@if (lastBuiltAt) {
<span class="summary-label"> · {{ formatDate(lastBuiltAt) }}</span>
}
</p>
}
<button
class="rebuild-button"
type="button"
@@ -23,11 +23,6 @@
color: #333;
}
.summary-line--meta {
color: #666;
font-size: 13px;
}
.rebuild-button {
margin-left: auto;
padding: 8px 14px;
@@ -38,8 +38,6 @@ export class PersonPatentsComponent implements OnInit {
authorName: string | null = null;
selectedPatent: PatentEntry | null = null;
searchMeta: PatentSearchMeta | null = null;
fromCache = false;
lastBuiltAt: string | null = null;
loading = true;
rebuilding = false;
@@ -137,14 +135,10 @@ export class PersonPatentsComponent implements OnInit {
private applyResult(result: {
patents?: PatentEntry[];
author_name?: string | null;
from_cache?: boolean;
last_built_at?: string | null;
search_meta?: PatentSearchMeta | null;
}): void {
this.patents = result.patents ?? [];
this.authorName = result.author_name ?? null;
this.fromCache = result.from_cache ?? false;
this.lastBuiltAt = result.last_built_at ?? null;
this.searchMeta = result.search_meta ?? null;
this.applyFilter();
this.loading = false;