@goperigon/perigon-ts
Version:
Typescript client for Perigon API
1,704 lines (1,673 loc) • 234 kB
TypeScript
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
declare const BASE_PATH: string;
interface ConfigurationParameters {
basePath?: string;
fetchApi?: FetchAPI;
middleware?: Middleware[];
queryParamsStringify?: (params: HTTPQuery) => string;
/** Access token (Bearer) */
apiKey?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
headers?: HTTPHeaders;
credentials?: RequestCredentials;
}
declare class Configuration {
private configuration;
constructor(configuration?: ConfigurationParameters);
set config(configuration: Configuration);
get basePath(): string;
get fetchApi(): ((input: RequestInfo | URL, init?: RequestInit) => Promise<Response>) | undefined;
get middleware(): Middleware[];
get queryParamsStringify(): typeof querystring;
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
get headers(): HTTPHeaders | undefined;
get credentials(): RequestCredentials | undefined;
}
declare const DefaultConfig: Configuration;
/**
* This is the base class for all generated API classes.
*/
declare class BaseAPI {
protected configuration: Configuration;
private static readonly jsonRegex;
private middleware;
constructor(configuration?: Configuration);
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware["pre"]>): T;
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware["post"]>): T;
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* @param mime - MIME (Multipurpose Internet Mail Extensions)
* @return True if the given MIME is JSON, false otherwise.
*/
protected isJsonMime(mime: string | null | undefined): boolean;
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
private createFetchParams;
private fetchApi;
/**
* Create a shallow clone of `this` by constructing a new instance
* and then shallow cloning data members.
*/
private clone;
}
declare class ResponseError extends Error {
response: Response;
name: "ResponseError";
constructor(response: Response, msg?: string);
}
declare class FetchError extends Error {
cause: Error;
name: "FetchError";
constructor(cause: Error, msg?: string);
}
declare class RequiredError extends Error {
field: string;
name: "RequiredError";
constructor(field: string, msg?: string);
}
declare const COLLECTION_FORMATS: {
csv: string;
ssv: string;
tsv: string;
pipes: string;
};
type FetchAPI = WindowOrWorkerGlobalScope["fetch"];
type Json = any;
type HTTPMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS" | "HEAD";
type HTTPHeaders = {
[key: string]: string;
};
type HTTPQuery = {
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
};
type HTTPBody = Json | FormData | URLSearchParams;
type HTTPRequestInit = {
headers?: HTTPHeaders;
method: HTTPMethod;
credentials?: RequestCredentials;
body?: HTTPBody;
};
type ModelPropertyNaming = "camelCase" | "snake_case" | "PascalCase" | "original";
type InitOverrideFunction = (requestContext: {
init: HTTPRequestInit;
context: RequestOpts;
}) => Promise<RequestInit>;
interface FetchParams {
url: string;
init: RequestInit;
}
interface RequestOpts {
path: string;
method: HTTPMethod;
headers: HTTPHeaders;
query?: HTTPQuery;
body?: HTTPBody;
}
declare function querystring(params: HTTPQuery, prefix?: string): string;
declare function exists(json: any, key: string): boolean;
declare function mapValues(data: any, fn: (item: any) => any): {
[key: string]: any;
};
declare function canConsumeForm(consumes: Consume[]): boolean;
interface Consume {
contentType: string;
}
interface RequestContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
}
interface ResponseContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
response: Response;
}
interface ErrorContext {
fetch: FetchAPI;
url: string;
init: RequestInit;
error: unknown;
response?: Response;
}
interface Middleware {
pre?(context: RequestContext): Promise<FetchParams | void>;
post?(context: ResponseContext): Promise<Response | void>;
onError?(context: ErrorContext): Promise<Response | void>;
}
interface ApiResponse<T> {
raw: Response;
value(): Promise<T>;
}
interface ResponseTransformer<T> {
(json: any): T;
}
declare class JSONApiResponse<T> {
raw: Response;
private transformer;
constructor(raw: Response, transformer?: ResponseTransformer<T>);
value(): Promise<T>;
}
declare class VoidApiResponse {
raw: Response;
constructor(raw: Response);
value(): Promise<void>;
}
declare class BlobApiResponse {
raw: Response;
constructor(raw: Response);
value(): Promise<Blob>;
}
declare class TextApiResponse {
raw: Response;
constructor(raw: Response);
value(): Promise<string>;
}
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
*/
declare const AllEndpointSortBy: {
readonly Relevance: "relevance";
readonly Date: "date";
readonly ReverseDate: "reverseDate";
readonly ReverseAddDate: "reverseAddDate";
readonly AddDate: "addDate";
readonly PubDate: "pubDate";
readonly RefreshDate: "refreshDate";
};
type AllEndpointSortBy = (typeof AllEndpointSortBy)[keyof typeof AllEndpointSortBy];
declare function instanceOfAllEndpointSortBy(value: any): boolean;
declare function AllEndpointSortByFromJSON(json: any): AllEndpointSortBy;
declare function AllEndpointSortByFromJSONTyped(json: any, ignoreDiscriminator: boolean): AllEndpointSortBy;
declare function AllEndpointSortByToJSON(value?: AllEndpointSortBy | null): any;
declare function AllEndpointSortByToJSONTyped(value: any, ignoreDiscriminator: boolean): AllEndpointSortBy;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 NameCount
*/
interface NameCount {
/**
*
* @type {string}
* @memberof NameCount
*/
name?: string | null;
/**
*
* @type {number}
* @memberof NameCount
*/
count?: number | null;
}
/**
* Check if a given object implements the NameCount interface.
*/
declare function instanceOfNameCount(value: object): value is NameCount;
declare function NameCountFromJSON(json: any): NameCount;
declare function NameCountFromJSONTyped(json: any, ignoreDiscriminator: boolean): NameCount;
declare function NameCountToJSON(json: any): NameCount;
declare function NameCountToJSONTyped(value?: NameCount | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 LocationHolder
*/
interface LocationHolder {
/**
*
* @type {string}
* @memberof LocationHolder
*/
country?: string | null;
/**
*
* @type {string}
* @memberof LocationHolder
*/
state?: string | null;
/**
*
* @type {string}
* @memberof LocationHolder
*/
county?: string | null;
/**
*
* @type {string}
* @memberof LocationHolder
*/
city?: string | null;
/**
*
* @type {string}
* @memberof LocationHolder
*/
area?: string | null;
}
/**
* Check if a given object implements the LocationHolder interface.
*/
declare function instanceOfLocationHolder(value: object): value is LocationHolder;
declare function LocationHolderFromJSON(json: any): LocationHolder;
declare function LocationHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationHolder;
declare function LocationHolderToJSON(json: any): LocationHolder;
declare function LocationHolderToJSONTyped(value?: LocationHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 Journalist
*/
interface Journalist {
/**
*
* @type {string}
* @memberof Journalist
*/
id?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
name?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
fullName?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
headline?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
description?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
title?: string | null;
/**
*
* @type {Array<LocationHolder>}
* @memberof Journalist
*/
locations?: Array<LocationHolder> | null;
/**
*
* @type {string}
* @memberof Journalist
*/
updatedAt?: string | null;
/**
*
* @type {Array<NameCount>}
* @memberof Journalist
*/
topTopics?: Array<NameCount> | null;
/**
*
* @type {Array<NameCount>}
* @memberof Journalist
*/
topSources?: Array<NameCount> | null;
/**
*
* @type {Array<NameCount>}
* @memberof Journalist
*/
topCategories?: Array<NameCount> | null;
/**
*
* @type {Array<NameCount>}
* @memberof Journalist
*/
topLabels?: Array<NameCount> | null;
/**
*
* @type {Array<NameCount>}
* @memberof Journalist
*/
topCountries?: Array<NameCount> | null;
/**
*
* @type {number}
* @memberof Journalist
*/
avgMonthlyPosts?: number | null;
/**
*
* @type {string}
* @memberof Journalist
*/
twitterHandle?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
twitterBio?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
imageUrl?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
linkedinUrl?: string | null;
/**
*
* @type {number}
* @memberof Journalist
*/
linkedinConnections?: number | null;
/**
*
* @type {number}
* @memberof Journalist
*/
linkedinFollowers?: number | null;
/**
*
* @type {string}
* @memberof Journalist
*/
facebookUrl?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
instagramUrl?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
websiteUrl?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
blogUrl?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
tumblrUrl?: string | null;
/**
*
* @type {string}
* @memberof Journalist
*/
youtubeUrl?: string | null;
}
/**
* Check if a given object implements the Journalist interface.
*/
declare function instanceOfJournalist(value: object): value is Journalist;
declare function JournalistFromJSON(json: any): Journalist;
declare function JournalistFromJSONTyped(json: any, ignoreDiscriminator: boolean): Journalist;
declare function JournalistToJSON(json: any): Journalist;
declare function JournalistToJSONTyped(value?: Journalist | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 Coordinate
*/
interface Coordinate {
/**
*
* @type {number}
* @memberof Coordinate
*/
lat?: number | null;
/**
*
* @type {number}
* @memberof Coordinate
*/
lon?: number | null;
}
/**
* Check if a given object implements the Coordinate interface.
*/
declare function instanceOfCoordinate(value: object): value is Coordinate;
declare function CoordinateFromJSON(json: any): Coordinate;
declare function CoordinateFromJSONTyped(json: any, ignoreDiscriminator: boolean): Coordinate;
declare function CoordinateToJSON(json: any): Coordinate;
declare function CoordinateToJSONTyped(value?: Coordinate | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 SourceLocation
*/
interface SourceLocation {
/**
*
* @type {string}
* @memberof SourceLocation
*/
country?: string | null;
/**
*
* @type {string}
* @memberof SourceLocation
*/
state?: string | null;
/**
*
* @type {string}
* @memberof SourceLocation
*/
county?: string | null;
/**
*
* @type {string}
* @memberof SourceLocation
*/
city?: string | null;
/**
*
* @type {Coordinate}
* @memberof SourceLocation
*/
coordinates?: Coordinate;
}
/**
* Check if a given object implements the SourceLocation interface.
*/
declare function instanceOfSourceLocation(value: object): value is SourceLocation;
declare function SourceLocationFromJSON(json: any): SourceLocation;
declare function SourceLocationFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceLocation;
declare function SourceLocationToJSON(json: any): SourceLocation;
declare function SourceLocationToJSONTyped(value?: SourceLocation | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 SourceHolder
*/
interface SourceHolder {
/**
*
* @type {string}
* @memberof SourceHolder
*/
domain?: string | null;
/**
*
* @type {boolean}
* @memberof SourceHolder
*/
paywall?: boolean | null;
/**
*
* @type {SourceLocation}
* @memberof SourceHolder
*/
location?: SourceLocation;
}
/**
* Check if a given object implements the SourceHolder interface.
*/
declare function instanceOfSourceHolder(value: object): value is SourceHolder;
declare function SourceHolderFromJSON(json: any): SourceHolder;
declare function SourceHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceHolder;
declare function SourceHolderToJSON(json: any): SourceHolder;
declare function SourceHolderToJSONTyped(value?: SourceHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 CompanyHolder
*/
interface CompanyHolder {
/**
*
* @type {string}
* @memberof CompanyHolder
*/
id?: string | null;
/**
*
* @type {string}
* @memberof CompanyHolder
*/
name?: string | null;
/**
*
* @type {Array<string>}
* @memberof CompanyHolder
*/
domains?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof CompanyHolder
*/
symbols?: Array<string> | null;
}
/**
* Check if a given object implements the CompanyHolder interface.
*/
declare function instanceOfCompanyHolder(value: object): value is CompanyHolder;
declare function CompanyHolderFromJSON(json: any): CompanyHolder;
declare function CompanyHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompanyHolder;
declare function CompanyHolderToJSON(json: any): CompanyHolder;
declare function CompanyHolderToJSONTyped(value?: CompanyHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 EntityHolder
*/
interface EntityHolder {
/**
*
* @type {string}
* @memberof EntityHolder
*/
data?: string | null;
/**
*
* @type {string}
* @memberof EntityHolder
*/
type?: string | null;
/**
*
* @type {number}
* @memberof EntityHolder
*/
mentions?: number | null;
}
/**
* Check if a given object implements the EntityHolder interface.
*/
declare function instanceOfEntityHolder(value: object): value is EntityHolder;
declare function EntityHolderFromJSON(json: any): EntityHolder;
declare function EntityHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): EntityHolder;
declare function EntityHolderToJSON(json: any): EntityHolder;
declare function EntityHolderToJSONTyped(value?: EntityHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 CategoryHolder
*/
interface CategoryHolder {
/**
*
* @type {string}
* @memberof CategoryHolder
*/
name?: string | null;
}
/**
* Check if a given object implements the CategoryHolder interface.
*/
declare function instanceOfCategoryHolder(value: object): value is CategoryHolder;
declare function CategoryHolderFromJSON(json: any): CategoryHolder;
declare function CategoryHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryHolder;
declare function CategoryHolderToJSON(json: any): CategoryHolder;
declare function CategoryHolderToJSONTyped(value?: CategoryHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 PersonHolder
*/
interface PersonHolder {
/**
*
* @type {string}
* @memberof PersonHolder
*/
wikidataId?: string | null;
/**
*
* @type {string}
* @memberof PersonHolder
*/
name?: string | null;
}
/**
* Check if a given object implements the PersonHolder interface.
*/
declare function instanceOfPersonHolder(value: object): value is PersonHolder;
declare function PersonHolderFromJSON(json: any): PersonHolder;
declare function PersonHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): PersonHolder;
declare function PersonHolderToJSON(json: any): PersonHolder;
declare function PersonHolderToJSONTyped(value?: PersonHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 LabelHolder
*/
interface LabelHolder {
/**
*
* @type {string}
* @memberof LabelHolder
*/
name?: string | null;
}
/**
* Check if a given object implements the LabelHolder interface.
*/
declare function instanceOfLabelHolder(value: object): value is LabelHolder;
declare function LabelHolderFromJSON(json: any): LabelHolder;
declare function LabelHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): LabelHolder;
declare function LabelHolderToJSON(json: any): LabelHolder;
declare function LabelHolderToJSONTyped(value?: LabelHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 RecordStatHolder
*/
interface RecordStatHolder {
/**
*
* @type {string}
* @memberof RecordStatHolder
*/
name?: string | null;
/**
*
* @type {number}
* @memberof RecordStatHolder
*/
count?: number | null;
}
/**
* Check if a given object implements the RecordStatHolder interface.
*/
declare function instanceOfRecordStatHolder(value: object): value is RecordStatHolder;
declare function RecordStatHolderFromJSON(json: any): RecordStatHolder;
declare function RecordStatHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecordStatHolder;
declare function RecordStatHolderToJSON(json: any): RecordStatHolder;
declare function RecordStatHolderToJSONTyped(value?: RecordStatHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 PersonCount
*/
interface PersonCount {
/**
*
* @type {string}
* @memberof PersonCount
*/
wikidataId?: string | null;
/**
*
* @type {string}
* @memberof PersonCount
*/
name?: string | null;
/**
*
* @type {number}
* @memberof PersonCount
*/
count?: number | null;
}
/**
* Check if a given object implements the PersonCount interface.
*/
declare function instanceOfPersonCount(value: object): value is PersonCount;
declare function PersonCountFromJSON(json: any): PersonCount;
declare function PersonCountFromJSONTyped(json: any, ignoreDiscriminator: boolean): PersonCount;
declare function PersonCountToJSON(json: any): PersonCount;
declare function PersonCountToJSONTyped(value?: PersonCount | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 LocationCount
*/
interface LocationCount {
/**
*
* @type {string}
* @memberof LocationCount
*/
state?: string | null;
/**
*
* @type {string}
* @memberof LocationCount
*/
county?: string | null;
/**
*
* @type {string}
* @memberof LocationCount
*/
city?: string | null;
/**
*
* @type {string}
* @memberof LocationCount
*/
area?: string | null;
/**
*
* @type {number}
* @memberof LocationCount
*/
count?: number | null;
}
/**
* Check if a given object implements the LocationCount interface.
*/
declare function instanceOfLocationCount(value: object): value is LocationCount;
declare function LocationCountFromJSON(json: any): LocationCount;
declare function LocationCountFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocationCount;
declare function LocationCountToJSON(json: any): LocationCount;
declare function LocationCountToJSONTyped(value?: LocationCount | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 CompanyCount
*/
interface CompanyCount {
/**
*
* @type {string}
* @memberof CompanyCount
*/
id?: string | null;
/**
*
* @type {string}
* @memberof CompanyCount
*/
name?: string | null;
/**
*
* @type {Array<string>}
* @memberof CompanyCount
*/
domains?: Array<string> | null;
/**
*
* @type {Array<string>}
* @memberof CompanyCount
*/
symbols?: Array<string> | null;
/**
*
* @type {number}
* @memberof CompanyCount
*/
count?: number | null;
}
/**
* Check if a given object implements the CompanyCount interface.
*/
declare function instanceOfCompanyCount(value: object): value is CompanyCount;
declare function CompanyCountFromJSON(json: any): CompanyCount;
declare function CompanyCountFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompanyCount;
declare function CompanyCountToJSON(json: any): CompanyCount;
declare function CompanyCountToJSONTyped(value?: CompanyCount | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 KeyPoint
*/
interface KeyPoint {
/**
*
* @type {string}
* @memberof KeyPoint
*/
point?: string | null;
/**
*
* @type {Array<string>}
* @memberof KeyPoint
*/
references?: Array<string> | null;
}
/**
* Check if a given object implements the KeyPoint interface.
*/
declare function instanceOfKeyPoint(value: object): value is KeyPoint;
declare function KeyPointFromJSON(json: any): KeyPoint;
declare function KeyPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeyPoint;
declare function KeyPointToJSON(json: any): KeyPoint;
declare function KeyPointToJSONTyped(value?: KeyPoint | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 TopicHolder
*/
interface TopicHolder {
/**
*
* @type {string}
* @memberof TopicHolder
*/
name?: string | null;
}
/**
* Check if a given object implements the TopicHolder interface.
*/
declare function instanceOfTopicHolder(value: object): value is TopicHolder;
declare function TopicHolderFromJSON(json: any): TopicHolder;
declare function TopicHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): TopicHolder;
declare function TopicHolderToJSON(json: any): TopicHolder;
declare function TopicHolderToJSONTyped(value?: TopicHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 Question
*/
interface Question {
/**
*
* @type {string}
* @memberof Question
*/
question?: string | null;
/**
*
* @type {string}
* @memberof Question
*/
answer?: string | null;
/**
*
* @type {Array<string>}
* @memberof Question
*/
references?: Array<string> | null;
}
/**
* Check if a given object implements the Question interface.
*/
declare function instanceOfQuestion(value: object): value is Question;
declare function QuestionFromJSON(json: any): Question;
declare function QuestionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Question;
declare function QuestionToJSON(json: any): Question;
declare function QuestionToJSONTyped(value?: Question | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 SentimentHolder
*/
interface SentimentHolder {
/**
*
* @type {number}
* @memberof SentimentHolder
*/
positive?: number | null;
/**
*
* @type {number}
* @memberof SentimentHolder
*/
negative?: number | null;
/**
*
* @type {number}
* @memberof SentimentHolder
*/
neutral?: number | null;
}
/**
* Check if a given object implements the SentimentHolder interface.
*/
declare function instanceOfSentimentHolder(value: object): value is SentimentHolder;
declare function SentimentHolderFromJSON(json: any): SentimentHolder;
declare function SentimentHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): SentimentHolder;
declare function SentimentHolderToJSON(json: any): SentimentHolder;
declare function SentimentHolderToJSONTyped(value?: SentimentHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 NewsCluster
*/
interface NewsCluster {
/**
*
* @type {string}
* @memberof NewsCluster
*/
createdAt?: string | null;
/**
*
* @type {string}
* @memberof NewsCluster
*/
updatedAt?: string | null;
/**
*
* @type {string}
* @memberof NewsCluster
*/
initializedAt?: string | null;
/**
*
* @type {string}
* @memberof NewsCluster
*/
id?: string | null;
/**
*
* @type {string}
* @memberof NewsCluster
*/
duplicateOf?: string | null;
/**
*
* @type {string}
* @memberof NewsCluster
*/
slug?: string | null;
/**
*
* @type {string}
* @memberof NewsCluster
*/
name?: string | null;
/**
*
* @type {string}
* @memberof NewsCluster
*/
summary?: string | null;
/**
*
* @type {string}
* @memberof NewsCluster
*/
shortSummary?: string | null;
/**
*
* @type {Array<string>}
* @memberof NewsCluster
*/
summaryReferences?: Array<string> | null;
/**
*
* @type {SourceHolder}
* @memberof NewsCluster
*/
imageSource?: SourceHolder;
/**
*
* @type {string}
* @memberof NewsCluster
*/
imageUrl?: string | null;
/**
*
* @type {Array<KeyPoint>}
* @memberof NewsCluster
*/
keyPoints?: Array<KeyPoint> | null;
/**
*
* @type {Array<Question>}
* @memberof NewsCluster
*/
questions?: Array<Question> | null;
/**
*
* @type {Array<string>}
* @memberof NewsCluster
*/
uniqueSources?: Array<string> | null;
/**
*
* @type {Array<Article>}
* @memberof NewsCluster
*/
selectedArticles?: Array<Article> | null;
/**
*
* @type {SentimentHolder}
* @memberof NewsCluster
*/
sentiment?: SentimentHolder;
/**
*
* @type {number}
* @memberof NewsCluster
*/
uniqueCount?: number | null;
/**
*
* @type {number}
* @memberof NewsCluster
*/
reprintCount?: number | null;
/**
*
* @type {number}
* @memberof NewsCluster
*/
totalCount?: number | null;
/**
*
* @type {Array<RecordStatHolder>}
* @memberof NewsCluster
*/
countries?: Array<RecordStatHolder> | null;
/**
*
* @type {Array<string>}
* @memberof NewsCluster
*/
topCountries?: Array<string> | null;
/**
*
* @type {Array<RecordStatHolder>}
* @memberof NewsCluster
*/
topics?: Array<RecordStatHolder> | null;
/**
*
* @type {Array<TopicHolder>}
* @memberof NewsCluster
*/
topTopics?: Array<TopicHolder> | null;
/**
*
* @type {Array<RecordStatHolder>}
* @memberof NewsCluster
*/
categories?: Array<RecordStatHolder> | null;
/**
*
* @type {Array<CategoryHolder>}
* @memberof NewsCluster
*/
topCategories?: Array<CategoryHolder> | null;
/**
*
* @type {Array<RecordStatHolder>}
* @memberof NewsCluster
*/
taxonomies?: Array<RecordStatHolder> | null;
/**
*
* @type {Array<CategoryHolder>}
* @memberof NewsCluster
*/
topTaxonomies?: Array<CategoryHolder> | null;
/**
*
* @type {Array<PersonCount>}
* @memberof NewsCluster
*/
people?: Array<PersonCount> | null;
/**
*
* @type {Array<PersonHolder>}
* @memberof NewsCluster
*/
topPeople?: Array<PersonHolder> | null;
/**
*
* @type {Array<CompanyCount>}
* @memberof NewsCluster
*/
companies?: Array<CompanyCount> | null;
/**
*
* @type {Array<CompanyHolder>}
* @memberof NewsCluster
*/
topCompanies?: Array<CompanyHolder> | null;
/**
*
* @type {Array<LocationCount>}
* @memberof NewsCluster
*/
locations?: Array<LocationCount> | null;
/**
*
* @type {Array<LocationHolder>}
* @memberof NewsCluster
*/
topLocations?: Array<LocationHolder> | null;
/**
*
* @type {{ [key: string]: Array<string>; }}
* @memberof NewsCluster
*/
highlights?: {
[key: string]: Array<string>;
} | null;
}
/**
* Check if a given object implements the NewsCluster interface.
*/
declare function instanceOfNewsCluster(value: object): value is NewsCluster;
declare function NewsClusterFromJSON(json: any): NewsCluster;
declare function NewsClusterFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewsCluster;
declare function NewsClusterToJSON(json: any): NewsCluster;
declare function NewsClusterToJSONTyped(value?: NewsCluster | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 KeywordHolder
*/
interface KeywordHolder {
/**
*
* @type {string}
* @memberof KeywordHolder
*/
name?: string | null;
/**
*
* @type {number}
* @memberof KeywordHolder
*/
weight?: number | null;
}
/**
* Check if a given object implements the KeywordHolder interface.
*/
declare function instanceOfKeywordHolder(value: object): value is KeywordHolder;
declare function KeywordHolderFromJSON(json: any): KeywordHolder;
declare function KeywordHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): KeywordHolder;
declare function KeywordHolderToJSON(json: any): KeywordHolder;
declare function KeywordHolderToJSONTyped(value?: KeywordHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 EventTypeHolder
*/
interface EventTypeHolder {
/**
*
* @type {string}
* @memberof EventTypeHolder
*/
name?: string | null;
/**
*
* @type {string}
* @memberof EventTypeHolder
*/
type?: string | null;
}
/**
* Check if a given object implements the EventTypeHolder interface.
*/
declare function instanceOfEventTypeHolder(value: object): value is EventTypeHolder;
declare function EventTypeHolderFromJSON(json: any): EventTypeHolder;
declare function EventTypeHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventTypeHolder;
declare function EventTypeHolderToJSON(json: any): EventTypeHolder;
declare function EventTypeHolderToJSONTyped(value?: EventTypeHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 CategoryWithScoreHolder
*/
interface CategoryWithScoreHolder {
/**
*
* @type {string}
* @memberof CategoryWithScoreHolder
*/
name?: string | null;
/**
*
* @type {number}
* @memberof CategoryWithScoreHolder
*/
score?: number | null;
}
/**
* Check if a given object implements the CategoryWithScoreHolder interface.
*/
declare function instanceOfCategoryWithScoreHolder(value: object): value is CategoryWithScoreHolder;
declare function CategoryWithScoreHolderFromJSON(json: any): CategoryWithScoreHolder;
declare function CategoryWithScoreHolderFromJSONTyped(json: any, ignoreDiscriminator: boolean): CategoryWithScoreHolder;
declare function CategoryWithScoreHolderToJSON(json: any): CategoryWithScoreHolder;
declare function CategoryWithScoreHolderToJSONTyped(value?: CategoryWithScoreHolder | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 Place
*/
interface Place {
/**
*
* @type {string}
* @memberof Place
*/
osmId?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
road?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
quarter?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
suburb?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
city?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
town?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
county?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
stateDistrict?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
state?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
postcode?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
country?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
countryCode?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
amenity?: string | null;
/**
*
* @type {string}
* @memberof Place
*/
neighbourhood?: string | null;
/**
*
* @type {Coordinate}
* @memberof Place
*/
coordinates?: Coordinate;
}
/**
* Check if a given object implements the Place interface.
*/
declare function instanceOfPlace(value: object): value is Place;
declare function PlaceFromJSON(json: any): Place;
declare function PlaceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Place;
declare function PlaceToJSON(json: any): Place;
declare function PlaceToJSONTyped(value?: Place | null, ignoreDiscriminator?: boolean): any;
/**
* Perigon API
* The Perigon API provides access to comprehensive news and web content data. To use the API, simply sign up for a Perigon Business Solutions account to obtain your API key. Your available features may vary based on your plan. See the Authentication section for details on how to use your API key.
*
* The version of the OpenAPI document: 1.0.0
* Contact: data@perigon.io
*
* 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 IdNameHolder
*/
interface IdNameHolder {
/**
*
* @type {string}
* @memberof IdNameHolder
*/
id?: string | null;
/**
*
* @type {string}
* @memberof IdNameHolder
*/
name?: string | null;
}
/**
* Check if a given object implements the IdNameHolder interface.
*/
declare function