693 lines
21 KiB
TypeScript
693 lines
21 KiB
TypeScript
/**
|
|
* 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.
|
|
*/
|
|
/* tslint:disable:no-unused-variable member-ordering */
|
|
|
|
import { Inject, Injectable, Optional } from '@angular/core';
|
|
import {
|
|
HttpClient,
|
|
HttpHeaders,
|
|
HttpParams,
|
|
HttpResponse,
|
|
HttpEvent,
|
|
HttpParameterCodec,
|
|
HttpContext,
|
|
} from '@angular/common/http';
|
|
import { CustomHttpParameterCodec } from '../encoder';
|
|
import { Observable } from 'rxjs';
|
|
|
|
// @ts-ignore
|
|
import { AllPatentsResponse } from '../model/allPatentsResponse';
|
|
// @ts-ignore
|
|
import { HTTPValidationError } from '../model/hTTPValidationError';
|
|
// @ts-ignore
|
|
import { OrgPatentsResponse } from '../model/orgPatentsResponse';
|
|
// @ts-ignore
|
|
import { PatentEntry } from '../model/patentEntry';
|
|
// @ts-ignore
|
|
import { PatentsByAuthorResponse } from '../model/patentsByAuthorResponse';
|
|
// @ts-ignore
|
|
import { PatentsByInstitutionResponse } from '../model/patentsByInstitutionResponse';
|
|
|
|
// @ts-ignore
|
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
import { Configuration } from '../configuration';
|
|
import { BaseService } from '../api.base.service';
|
|
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
export class PatentsService extends BaseService {
|
|
constructor(
|
|
protected httpClient: HttpClient,
|
|
@Optional() @Inject(BASE_PATH) basePath: string | string[],
|
|
@Optional() configuration?: Configuration,
|
|
) {
|
|
super(basePath, configuration);
|
|
}
|
|
|
|
/**
|
|
* Get all patents with pagination and search.
|
|
* @endpoint get /api/inse-service/patents
|
|
* @param page
|
|
* @param size
|
|
* @param search
|
|
* @param source
|
|
* @param sortBy
|
|
* @param sortDirection
|
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
* @param reportProgress flag to report request and response progress.
|
|
*/
|
|
public getAllPatents(
|
|
page?: number,
|
|
size?: number,
|
|
search?: string,
|
|
source?: string,
|
|
sortBy?: string,
|
|
sortDirection?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<AllPatentsResponse>;
|
|
public getAllPatents(
|
|
page?: number,
|
|
size?: number,
|
|
search?: string,
|
|
source?: string,
|
|
sortBy?: string,
|
|
sortDirection?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpResponse<AllPatentsResponse>>;
|
|
public getAllPatents(
|
|
page?: number,
|
|
size?: number,
|
|
search?: string,
|
|
source?: string,
|
|
sortBy?: string,
|
|
sortDirection?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpEvent<AllPatentsResponse>>;
|
|
public getAllPatents(
|
|
page?: number,
|
|
size?: number,
|
|
search?: string,
|
|
source?: string,
|
|
sortBy?: string,
|
|
sortDirection?: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<any> {
|
|
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>page,
|
|
'page',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>size,
|
|
'size',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>search,
|
|
'search',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>source,
|
|
'source',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>sortBy,
|
|
'sort_by',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>sortDirection,
|
|
'sort_direction',
|
|
);
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined =
|
|
options?.httpHeaderAccept ??
|
|
this.configuration.selectHeaderAccept(['application/json']);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set(
|
|
'Accept',
|
|
localVarHttpHeaderAcceptSelected,
|
|
);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext =
|
|
options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
} else if (
|
|
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
|
) {
|
|
responseType_ = 'json';
|
|
} else {
|
|
responseType_ = 'blob';
|
|
}
|
|
}
|
|
|
|
let localVarPath = `/api/inse-service/patents`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<AllPatentsResponse>(
|
|
'get',
|
|
`${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
params: localVarQueryParameters,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined
|
|
? { transferCache: localVarTransferCache }
|
|
: {}),
|
|
reportProgress: reportProgress,
|
|
},
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get pre-indexed org patents for an institution.
|
|
* @endpoint get /api/inse-service/institutions/{id}/org-patents
|
|
* @param id
|
|
* @param matchType Filter patents by match type.
|
|
* @param page
|
|
* @param size
|
|
* @param source
|
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
* @param reportProgress flag to report request and response progress.
|
|
*/
|
|
public getOrgPatentsByInstitution(
|
|
id: string,
|
|
matchType?: 'institution' | 'name' | 'both' | 'all',
|
|
page?: number,
|
|
size?: number,
|
|
source?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<OrgPatentsResponse>;
|
|
public getOrgPatentsByInstitution(
|
|
id: string,
|
|
matchType?: 'institution' | 'name' | 'both' | 'all',
|
|
page?: number,
|
|
size?: number,
|
|
source?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpResponse<OrgPatentsResponse>>;
|
|
public getOrgPatentsByInstitution(
|
|
id: string,
|
|
matchType?: 'institution' | 'name' | 'both' | 'all',
|
|
page?: number,
|
|
size?: number,
|
|
source?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpEvent<OrgPatentsResponse>>;
|
|
public getOrgPatentsByInstitution(
|
|
id: string,
|
|
matchType?: 'institution' | 'name' | 'both' | 'all',
|
|
page?: number,
|
|
size?: number,
|
|
source?: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<any> {
|
|
if (id === null || id === undefined) {
|
|
throw new Error(
|
|
'Required parameter id was null or undefined when calling getOrgPatentsByInstitution.',
|
|
);
|
|
}
|
|
|
|
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>matchType,
|
|
'match_type',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>page,
|
|
'page',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>size,
|
|
'size',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>source,
|
|
'source',
|
|
);
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined =
|
|
options?.httpHeaderAccept ??
|
|
this.configuration.selectHeaderAccept(['application/json']);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set(
|
|
'Accept',
|
|
localVarHttpHeaderAcceptSelected,
|
|
);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext =
|
|
options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
} else if (
|
|
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
|
) {
|
|
responseType_ = 'json';
|
|
} else {
|
|
responseType_ = 'blob';
|
|
}
|
|
}
|
|
|
|
let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/org-patents`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<OrgPatentsResponse>(
|
|
'get',
|
|
`${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
params: localVarQueryParameters,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined
|
|
? { transferCache: localVarTransferCache }
|
|
: {}),
|
|
reportProgress: reportProgress,
|
|
},
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Returns one publication by OpenAlex ID or DOI.
|
|
* @endpoint get /api/inse-service/patents/{identifier}
|
|
* @param identifier
|
|
* @param prefix Application Prefix (EP or US)
|
|
* @param title Do we want to fallback to title search if ID and DOI dont work?
|
|
* @param fillingDate Filling date in YYYY-MM-DD format
|
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
* @param reportProgress flag to report request and response progress.
|
|
*/
|
|
public getPatentByIdOrTitle(
|
|
identifier: string,
|
|
prefix?: string,
|
|
title?: string,
|
|
fillingDate?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<PatentEntry>;
|
|
public getPatentByIdOrTitle(
|
|
identifier: string,
|
|
prefix?: string,
|
|
title?: string,
|
|
fillingDate?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpResponse<PatentEntry>>;
|
|
public getPatentByIdOrTitle(
|
|
identifier: string,
|
|
prefix?: string,
|
|
title?: string,
|
|
fillingDate?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpEvent<PatentEntry>>;
|
|
public getPatentByIdOrTitle(
|
|
identifier: string,
|
|
prefix?: string,
|
|
title?: string,
|
|
fillingDate?: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<any> {
|
|
if (identifier === null || identifier === undefined) {
|
|
throw new Error(
|
|
'Required parameter identifier was null or undefined when calling getPatentByIdOrTitle.',
|
|
);
|
|
}
|
|
|
|
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>prefix,
|
|
'prefix',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>title,
|
|
'title',
|
|
);
|
|
localVarQueryParameters = this.addToHttpParams(
|
|
localVarQueryParameters,
|
|
<any>fillingDate,
|
|
'filling_date',
|
|
);
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined =
|
|
options?.httpHeaderAccept ??
|
|
this.configuration.selectHeaderAccept(['application/json']);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set(
|
|
'Accept',
|
|
localVarHttpHeaderAcceptSelected,
|
|
);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext =
|
|
options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
} else if (
|
|
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
|
) {
|
|
responseType_ = 'json';
|
|
} else {
|
|
responseType_ = 'blob';
|
|
}
|
|
}
|
|
|
|
let localVarPath = `/api/inse-service/patents/${this.configuration.encodeParam({ name: 'identifier', value: identifier, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<PatentEntry>(
|
|
'get',
|
|
`${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
params: localVarQueryParameters,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined
|
|
? { transferCache: localVarTransferCache }
|
|
: {}),
|
|
reportProgress: reportProgress,
|
|
},
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get patents matched to an author by name.
|
|
* @endpoint get /api/inse-service/authors/{author_id}/patents
|
|
* @param authorId
|
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
* @param reportProgress flag to report request and response progress.
|
|
*/
|
|
public getPatentsByAuthor(
|
|
authorId: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<PatentsByAuthorResponse>;
|
|
public getPatentsByAuthor(
|
|
authorId: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpResponse<PatentsByAuthorResponse>>;
|
|
public getPatentsByAuthor(
|
|
authorId: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpEvent<PatentsByAuthorResponse>>;
|
|
public getPatentsByAuthor(
|
|
authorId: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<any> {
|
|
if (authorId === null || authorId === undefined) {
|
|
throw new Error(
|
|
'Required parameter authorId was null or undefined when calling getPatentsByAuthor.',
|
|
);
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined =
|
|
options?.httpHeaderAccept ??
|
|
this.configuration.selectHeaderAccept(['application/json']);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set(
|
|
'Accept',
|
|
localVarHttpHeaderAcceptSelected,
|
|
);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext =
|
|
options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
} else if (
|
|
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
|
) {
|
|
responseType_ = 'json';
|
|
} else {
|
|
responseType_ = 'blob';
|
|
}
|
|
}
|
|
|
|
let localVarPath = `/api/inse-service/authors/${this.configuration.encodeParam({ name: 'authorId', value: authorId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/patents`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<PatentsByAuthorResponse>(
|
|
'get',
|
|
`${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined
|
|
? { transferCache: localVarTransferCache }
|
|
: {}),
|
|
reportProgress: reportProgress,
|
|
},
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get patents matched to an institution by assignee name.
|
|
* @endpoint get /api/inse-service/institutions/{id}/patents
|
|
* @param id
|
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
|
* @param reportProgress flag to report request and response progress.
|
|
*/
|
|
public getPatentsByInstitution(
|
|
id: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<PatentsByInstitutionResponse>;
|
|
public getPatentsByInstitution(
|
|
id: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpResponse<PatentsByInstitutionResponse>>;
|
|
public getPatentsByInstitution(
|
|
id: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<HttpEvent<PatentsByInstitutionResponse>>;
|
|
public getPatentsByInstitution(
|
|
id: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false,
|
|
options?: {
|
|
httpHeaderAccept?: 'application/json';
|
|
context?: HttpContext;
|
|
transferCache?: boolean;
|
|
},
|
|
): Observable<any> {
|
|
if (id === null || id === undefined) {
|
|
throw new Error(
|
|
'Required parameter id was null or undefined when calling getPatentsByInstitution.',
|
|
);
|
|
}
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined =
|
|
options?.httpHeaderAccept ??
|
|
this.configuration.selectHeaderAccept(['application/json']);
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
localVarHeaders = localVarHeaders.set(
|
|
'Accept',
|
|
localVarHttpHeaderAcceptSelected,
|
|
);
|
|
}
|
|
|
|
const localVarHttpContext: HttpContext =
|
|
options?.context ?? new HttpContext();
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
responseType_ = 'text';
|
|
} else if (
|
|
this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)
|
|
) {
|
|
responseType_ = 'json';
|
|
} else {
|
|
responseType_ = 'blob';
|
|
}
|
|
}
|
|
|
|
let localVarPath = `/api/inse-service/institutions/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/patents`;
|
|
const { basePath, withCredentials } = this.configuration;
|
|
return this.httpClient.request<PatentsByInstitutionResponse>(
|
|
'get',
|
|
`${basePath}${localVarPath}`,
|
|
{
|
|
context: localVarHttpContext,
|
|
responseType: <any>responseType_,
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
headers: localVarHeaders,
|
|
observe: observe,
|
|
...(localVarTransferCache !== undefined
|
|
? { transferCache: localVarTransferCache }
|
|
: {}),
|
|
reportProgress: reportProgress,
|
|
},
|
|
);
|
|
}
|
|
}
|