@goperigon/perigon-ts 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,3 +1,3 @@
1
- 'use strict';var zod=require('zod');var Te="https://api.perigon.io".replace(/\/+$/,""),P=class{constructor(a={}){this.configuration=a;}set config(a){this.configuration=a;}get basePath(){return Te}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||v}get accessToken(){let a=this.configuration.apiKey;return a?typeof a=="function"?a:async()=>a:void 0}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},Re=new P,R=class R{constructor(a=Re){this.configuration=a;this.fetchApi=async(a,o)=>{let n={url:a,init:o};for(let r of this.middleware)r.pre&&(n=await r.pre({fetch:this.fetchApi,...n})||n);let i;try{i=await(this.configuration.fetchApi||fetch)(n.url,n.init);}catch(r){for(let c of this.middleware)c.onError&&(i=await c.onError({fetch:this.fetchApi,url:n.url,init:n.init,error:r,response:i?i.clone():void 0})||i);if(i===void 0)throw r instanceof Error?new C(r,"The request failed and the interceptors did not return an alternative response"):r}for(let r of this.middleware)r.post&&(i=await r.post({fetch:this.fetchApi,url:n.url,init:n.init,response:i.clone()})||i);return i};this.middleware=a.middleware;}withMiddleware(...a){let o=this.clone();return o.middleware=o.middleware.concat(...a),o}withPreMiddleware(...a){let o=a.map(n=>({pre:n}));return this.withMiddleware(...o)}withPostMiddleware(...a){let o=a.map(n=>({post:n}));return this.withMiddleware(...o)}isJsonMime(a){return a?R.jsonRegex.test(a):false}async request(a,o){let{url:n,init:i}=await this.createFetchParams(a,o),r=await this.fetchApi(n,i);if(r&&r.status>=200&&r.status<300)return r;throw new O(r,"Response returned an error code")}async createFetchParams(a,o){let n=this.configuration.basePath+a.path;a.query!==void 0&&Object.keys(a.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(a.query));let i=Object.assign({},this.configuration.headers,a.headers);Object.keys(i).forEach(_=>i[_]===void 0?delete i[_]:{});let r=typeof o=="function"?o:async()=>o,c={method:a.method,headers:i,body:a.body,credentials:this.configuration.credentials},s={...c,...await r({init:c,context:a})},l;Ee(s.body)||s.body instanceof URLSearchParams||fe(s.body)?l=s.body:this.isJsonMime(i["Content-Type"])?l=JSON.stringify(s.body):l=s.body;let p={...s,body:l};return {url:n,init:p}}clone(){let a=this.constructor,o=new a(this.configuration);return o.middleware=this.middleware.slice(),o}};R.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");var T=R;function fe(u){return typeof Blob<"u"&&u instanceof Blob}function Ee(u){return typeof FormData<"u"&&u instanceof FormData}var O=class extends Error{constructor(o,n){super(n);this.response=o;this.name="ResponseError";}},C=class extends Error{constructor(o,n){super(n);this.cause=o;this.name="FetchError";}},H=class extends Error{constructor(o,n){super(n);this.field=o;this.name="RequiredError";}},bt={csv:",",ssv:" ",tsv:" ",pipes:"|"};function v(u,a=""){return Object.keys(u).map(o=>j(o,u[o],a)).filter(o=>o.length>0).join("&")}function j(u,a,o=""){let n=o+(o.length?`[${u}]`:u);if(a instanceof Array){let i=a.map(r=>encodeURIComponent(String(r))).join(`&${encodeURIComponent(n)}=`);return `${encodeURIComponent(n)}=${i}`}if(a instanceof Set){let i=Array.from(a);return j(u,i,o)}return a instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(a.toISOString())}`:a instanceof Object?v(a,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(a))}`}function gt(u,a){let o=u[a];return o!=null}function dt(u,a){let o={};for(let n of Object.keys(u))o[n]=a(u[n]);return o}function ht(u){for(let a of u)if(a.contentType==="multipart/form-data")return true;return false}var m=class{constructor(a,o=n=>n){this.raw=a;this.transformer=o;}async value(){return this.transformer(await this.raw.json())}},q=class{constructor(a){this.raw=a;}async value(){}},z=class{constructor(a){this.raw=a;}async value(){return await this.raw.blob()}},L=class{constructor(a){this.raw=a;}async value(){return await this.raw.text()}};var I=zod.z.enum(["createdAt","updatedAt","relevance","count","totalCount"]),Tt={CreatedAt:"createdAt",UpdatedAt:"updatedAt",Relevance:"relevance",Count:"count",TotalCount:"totalCount"},w=zod.z.enum(["relevance","date","reverseDate","reverseAddDate","addDate","pubDate","refreshDate"]),Rt={Relevance:"relevance",Date:"date",ReverseDate:"reverseDate",ReverseAddDate:"reverseAddDate",AddDate:"addDate",PubDate:"pubDate",RefreshDate:"refreshDate"},N=zod.z.object({name:zod.z.string().optional().nullable()}),Ie=zod.z.object({name:zod.z.string().optional().nullable(),score:zod.z.number().optional().nullable()}),U=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),domains:zod.z.array(zod.z.string()).optional().nullable(),symbols:zod.z.array(zod.z.string()).optional().nullable()}),Ae=zod.z.object({data:zod.z.string().optional().nullable(),type:zod.z.string().optional().nullable(),mentions:zod.z.number().optional().nullable()}),Pe=zod.z.object({name:zod.z.string().optional().nullable(),type:zod.z.string().optional().nullable()}),Oe=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable()}),k=zod.z.object({country:zod.z.string().optional().nullable(),state:zod.z.string().optional().nullable(),county:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),area:zod.z.string().optional().nullable()}),g=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),A=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),fullName:zod.z.string().optional().nullable(),headline:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),title:zod.z.string().optional().nullable(),locations:zod.z.array(k).optional().nullable(),updatedAt:zod.z.string().optional().nullable(),topTopics:zod.z.array(g).optional().nullable(),topSources:zod.z.array(g).optional().nullable(),topCategories:zod.z.array(g).optional().nullable(),topLabels:zod.z.array(g).optional().nullable(),topCountries:zod.z.array(g).optional().nullable(),avgMonthlyPosts:zod.z.number().optional().nullable(),twitterHandle:zod.z.string().optional().nullable(),twitterBio:zod.z.string().optional().nullable(),imageUrl:zod.z.string().optional().nullable(),linkedinUrl:zod.z.string().optional().nullable(),linkedinConnections:zod.z.number().optional().nullable(),linkedinFollowers:zod.z.number().optional().nullable(),facebookUrl:zod.z.string().optional().nullable(),instagramUrl:zod.z.string().optional().nullable(),websiteUrl:zod.z.string().optional().nullable(),blogUrl:zod.z.string().optional().nullable(),tumblrUrl:zod.z.string().optional().nullable(),youtubeUrl:zod.z.string().optional().nullable()}),Ce=zod.z.object({name:zod.z.string().optional().nullable(),weight:zod.z.number().optional().nullable()}),Ne=zod.z.object({name:zod.z.string().optional().nullable()}),we=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),domains:zod.z.array(zod.z.string()).optional().nullable(),symbols:zod.z.array(zod.z.string()).optional().nullable(),count:zod.z.number().optional().nullable()}),ke=zod.z.object({point:zod.z.string().optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable()}),De=zod.z.object({state:zod.z.string().optional().nullable(),county:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),area:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),_e=zod.z.object({wikidataId:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),M=zod.z.object({wikidataId:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable()}),He=zod.z.object({question:zod.z.string().optional().nullable(),answer:zod.z.string().optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable()}),f=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),W=zod.z.object({positive:zod.z.number().optional().nullable(),negative:zod.z.number().optional().nullable(),neutral:zod.z.number().optional().nullable()}),B=zod.z.object({lat:zod.z.number().optional().nullable(),lon:zod.z.number().optional().nullable()}),G=zod.z.object({country:zod.z.string().optional().nullable(),state:zod.z.string().optional().nullable(),county:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),coordinates:B.optional().nullable()}),Q=zod.z.object({domain:zod.z.string().optional().nullable(),paywall:zod.z.boolean().optional().nullable(),location:G.optional().nullable()}),V=zod.z.object({name:zod.z.string().optional().nullable()}),J=zod.z.object({createdAt:zod.z.string().optional().nullable(),updatedAt:zod.z.string().optional().nullable(),initializedAt:zod.z.string().optional().nullable(),id:zod.z.string().optional().nullable(),duplicateOf:zod.z.string().optional().nullable(),slug:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),summary:zod.z.string().optional().nullable(),shortSummary:zod.z.string().optional().nullable(),summaryReferences:zod.z.array(zod.z.string()).optional().nullable(),imageSource:Q.optional().nullable(),imageUrl:zod.z.string().optional().nullable(),keyPoints:zod.z.array(ke).optional().nullable(),questions:zod.z.array(He).optional().nullable(),uniqueSources:zod.z.array(zod.z.string()).optional().nullable(),selectedArticles:zod.z.array(zod.z.unknown()).optional().nullable(),sentiment:W.optional().nullable(),uniqueCount:zod.z.number().optional().nullable(),reprintCount:zod.z.number().optional().nullable(),totalCount:zod.z.number().optional().nullable(),countries:zod.z.array(f).optional().nullable(),topCountries:zod.z.array(zod.z.string()).optional().nullable(),topics:zod.z.array(f).optional().nullable(),topTopics:zod.z.array(V).optional().nullable(),categories:zod.z.array(f).optional().nullable(),topCategories:zod.z.array(N).optional().nullable(),taxonomies:zod.z.array(f).optional().nullable(),topTaxonomies:zod.z.array(N).optional().nullable(),people:zod.z.array(_e).optional().nullable(),topPeople:zod.z.array(M).optional().nullable(),companies:zod.z.array(we).optional().nullable(),topCompanies:zod.z.array(U).optional().nullable(),locations:zod.z.array(De).optional().nullable(),topLocations:zod.z.array(k).optional().nullable(),highlights:zod.z.record(zod.z.string(),zod.z.array(zod.z.string())).optional().nullable()}),qe=zod.z.object({osmId:zod.z.string().optional().nullable(),road:zod.z.string().optional().nullable(),quarter:zod.z.string().optional().nullable(),suburb:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),town:zod.z.string().optional().nullable(),county:zod.z.string().optional().nullable(),stateDistrict:zod.z.string().optional().nullable(),state:zod.z.string().optional().nullable(),postcode:zod.z.string().optional().nullable(),country:zod.z.string().optional().nullable(),countryCode:zod.z.string().optional().nullable(),amenity:zod.z.string().optional().nullable(),neighbourhood:zod.z.string().optional().nullable(),coordinates:B.optional().nullable()}),D=zod.z.object({url:zod.z.string().optional().nullable(),authorsByline:zod.z.string().optional().nullable(),articleId:zod.z.string().optional().nullable(),clusterId:zod.z.string().optional().nullable(),source:Q.optional().nullable(),imageUrl:zod.z.string().optional().nullable(),country:zod.z.string().optional().nullable(),language:zod.z.string().optional().nullable(),pubDate:zod.z.string().optional().nullable(),addDate:zod.z.string().optional().nullable(),refreshDate:zod.z.string().optional().nullable(),score:zod.z.number().optional().nullable(),title:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),content:zod.z.string().optional().nullable(),medium:zod.z.string().optional().nullable(),links:zod.z.array(zod.z.string()).optional().nullable(),labels:zod.z.array(Ne).optional().nullable(),eventTypes:zod.z.array(Pe).optional().nullable(),matchedAuthors:zod.z.array(Oe).optional().nullable(),claim:zod.z.string().optional().nullable(),verdict:zod.z.string().optional().nullable(),keywords:zod.z.array(Ce).optional().nullable(),topics:zod.z.array(V).optional().nullable(),categories:zod.z.array(N).optional().nullable(),taxonomies:zod.z.array(Ie).optional().nullable(),entities:zod.z.array(Ae).optional().nullable(),companies:zod.z.array(U).optional().nullable(),sentiment:W.optional().nullable(),summary:zod.z.string().optional().nullable(),shortSummary:zod.z.string().optional().nullable(),translation:zod.z.string().optional().nullable(),translatedTitle:zod.z.string().optional().nullable(),translatedDescription:zod.z.string().optional().nullable(),translatedSummary:zod.z.string().optional().nullable(),locations:zod.z.array(k).optional().nullable(),reprint:zod.z.boolean().optional().nullable(),reprintGroupId:zod.z.string().optional().nullable(),places:zod.z.array(qe).optional().nullable(),people:zod.z.array(M).optional().nullable(),cluster:J.optional().nullable(),journalists:zod.z.array(A).optional().nullable(),highlights:zod.z.record(zod.z.string(),zod.z.array(zod.z.string())).optional().nullable()}),F=zod.z.object({lat:zod.z.number().optional().nullable(),lon:zod.z.number().optional().nullable(),radius:zod.z.number().optional().nullable()}),ze=zod.z.object({articleId:zod.z.array(zod.z.string()).optional().nullable(),clusterId:zod.z.array(zod.z.string()).optional().nullable(),source:zod.z.array(zod.z.string()).optional().nullable(),excludeSource:zod.z.array(zod.z.string()).optional().nullable(),sourceGroup:zod.z.array(zod.z.string()).optional().nullable(),language:zod.z.array(zod.z.string()).optional().nullable(),excludeLanguage:zod.z.array(zod.z.string()).optional().nullable(),label:zod.z.array(zod.z.string()).optional().nullable(),excludeLabel:zod.z.array(zod.z.string()).optional().nullable(),taxonomy:zod.z.array(zod.z.string()).optional().nullable(),category:zod.z.array(zod.z.string()).optional().nullable(),topic:zod.z.array(zod.z.string()).optional().nullable(),excludeTopic:zod.z.array(zod.z.string()).optional().nullable(),country:zod.z.array(zod.z.string()).optional().nullable(),excludeCountry:zod.z.array(zod.z.string()).optional().nullable(),locationsCountry:zod.z.array(zod.z.string()).optional().nullable(),excludeLocationsCountry:zod.z.array(zod.z.string()).optional().nullable(),state:zod.z.array(zod.z.string()).optional().nullable(),excludeState:zod.z.array(zod.z.string()).optional().nullable(),county:zod.z.array(zod.z.string()).optional().nullable(),excludeCounty:zod.z.array(zod.z.string()).optional().nullable(),city:zod.z.array(zod.z.string()).optional().nullable(),excludeCity:zod.z.array(zod.z.string()).optional().nullable(),sourceCountry:zod.z.array(zod.z.string()).optional().nullable(),sourceState:zod.z.array(zod.z.string()).optional().nullable(),sourceCounty:zod.z.array(zod.z.string()).optional().nullable(),sourceCity:zod.z.array(zod.z.string()).optional().nullable(),coordinates:F.optional().nullable(),sourceCoordinates:F.optional().nullable(),companyId:zod.z.array(zod.z.string()).optional().nullable(),excludeCompanyId:zod.z.array(zod.z.string()).optional().nullable(),companyDomain:zod.z.array(zod.z.string()).optional().nullable(),excludeCompanyDomain:zod.z.array(zod.z.string()).optional().nullable(),companySymbol:zod.z.array(zod.z.string()).optional().nullable(),excludeCompanySymbol:zod.z.array(zod.z.string()).optional().nullable(),companyName:zod.z.array(zod.z.string()).optional().nullable(),personWikidataId:zod.z.array(zod.z.string()).optional().nullable(),excludePersonWikidataId:zod.z.array(zod.z.string()).optional().nullable(),personName:zod.z.array(zod.z.string()).optional().nullable(),excludePersonName:zod.z.array(zod.z.string()).optional().nullable(),AND:zod.z.array(zod.z.unknown()).optional().nullable(),OR:zod.z.array(zod.z.unknown()).optional().nullable(),NOT:zod.z.array(zod.z.unknown()).optional().nullable()}),Y=zod.z.object({prompt:zod.z.string(),filter:ze.optional().nullable(),pubDateFrom:zod.z.string().optional().nullable(),pubDateTo:zod.z.string().optional().nullable(),showReprints:zod.z.boolean().optional().nullable(),size:zod.z.number().optional().nullable(),page:zod.z.number().optional().nullable()}),Le=zod.z.object({score:zod.z.number().optional().nullable(),data:D.optional().nullable()}),K=zod.z.object({status:zod.z.number(),results:zod.z.array(Le)}),y=zod.z.object({classLoaderName:zod.z.string().optional(),moduleName:zod.z.string().optional(),moduleVersion:zod.z.string().optional(),methodName:zod.z.string().optional(),fileName:zod.z.string().optional(),lineNumber:zod.z.number().optional(),nativeMethod:zod.z.boolean().optional(),className:zod.z.string().optional()}),h=zod.z.object({stackTrace:zod.z.array(y).optional(),message:zod.z.string().optional(),localizedMessage:zod.z.string().optional()}),S=zod.z.object({stackTrace:zod.z.array(y).optional(),message:zod.z.string().optional(),localizedMessage:zod.z.string().optional()}),ft=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),statusCode:zod.z.enum(["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),ve=zod.z.object({symbol:zod.z.string().optional().nullable(),exchange:zod.z.string().optional().nullable(),exchangeShortName:zod.z.string().optional().nullable(),ipoDate:zod.z.string().optional().nullable()}),je=zod.z.object({careers:zod.z.string().optional().nullable(),about:zod.z.string().optional().nullable(),blog:zod.z.string().optional().nullable(),events:zod.z.string().optional().nullable(),sitemap:zod.z.string().optional().nullable(),updates:zod.z.string().optional().nullable(),linkedin:zod.z.string().optional().nullable(),facebook:zod.z.string().optional().nullable(),instagram:zod.z.string().optional().nullable(),medium:zod.z.string().optional().nullable(),reddit:zod.z.string().optional().nullable(),threads:zod.z.string().optional().nullable(),tiktok:zod.z.string().optional().nullable(),x:zod.z.string().optional().nullable(),wellfound:zod.z.string().optional().nullable(),youtube:zod.z.string().optional().nullable(),wikipedia:zod.z.string().optional().nullable()}),Fe=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),updatedAt:zod.z.string().optional().nullable(),primaryRecordId:zod.z.string().optional().nullable(),altNames:zod.z.array(zod.z.string()).optional().nullable(),domains:zod.z.array(zod.z.string()).optional().nullable(),monthlyVisits:zod.z.number().optional().nullable(),globalRank:zod.z.number().optional().nullable(),description:zod.z.string().optional().nullable(),ceo:zod.z.string().optional().nullable(),industry:zod.z.string().optional().nullable(),sector:zod.z.string().optional().nullable(),country:zod.z.string().optional().nullable(),fullTimeEmployees:zod.z.number().optional().nullable(),address:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),state:zod.z.string().optional().nullable(),zip:zod.z.string().optional().nullable(),logo:zod.z.string().optional().nullable(),favicon:zod.z.string().optional().nullable(),isEtf:zod.z.boolean().optional().nullable(),isActivelyTrading:zod.z.boolean().optional().nullable(),isFund:zod.z.boolean().optional().nullable(),isAdr:zod.z.boolean().optional().nullable(),symbols:zod.z.array(ve).optional().nullable(),naics:zod.z.string().optional().nullable(),sic:zod.z.string().optional().nullable(),yearFounded:zod.z.number().optional().nullable(),revenue:zod.z.string().optional().nullable(),webResources:je.optional().nullable()}),$=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(Fe)}),Et=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),x=zod.z.object({url:zod.z.string().optional().nullable()}),xt=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),X=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(A)}),It=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),b=zod.z.object({time:zod.z.string().optional().nullable(),precision:zod.z.string().optional().nullable()}),d=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable()}),Ue=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable(),startTime:b.optional().nullable(),endTime:b.optional().nullable()}),Me=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable(),startTime:b.optional().nullable(),endTime:b.optional().nullable(),employer:d.optional().nullable()}),We=zod.z.object({wikidataId:zod.z.string().optional().nullable(),createdAt:zod.z.string().optional().nullable(),updatedAt:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),gender:d.optional().nullable(),dateOfBirth:b.optional().nullable(),dateOfDeath:b.optional().nullable(),description:zod.z.string().optional().nullable(),aliases:zod.z.array(zod.z.string()).optional().nullable(),occupation:zod.z.array(d).optional().nullable(),position:zod.z.array(Me).optional().nullable(),politicalParty:zod.z.array(Ue).optional().nullable(),image:x.optional().nullable(),_abstract:zod.z.string().optional().nullable()}),Z=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(We)}),ee=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),articles:zod.z.array(D)}),Be=zod.z.object({pageId:zod.z.string().optional().nullable(),sectionId:zod.z.string().optional().nullable(),wikiPageId:zod.z.number().optional().nullable(),wikiRevisionId:zod.z.number().optional().nullable(),wikiRevisionTs:zod.z.string().optional().nullable(),wikiCode:zod.z.string().optional().nullable(),wikiNamespace:zod.z.number().optional().nullable(),wikiTitle:zod.z.string().optional().nullable(),wikidataId:zod.z.string().optional().nullable(),wikidataInstanceOf:zod.z.array(d).optional().nullable(),redirectTitles:zod.z.array(zod.z.string()).optional().nullable(),pageviews:zod.z.number().optional().nullable(),title:zod.z.string().optional().nullable(),styleLevel:zod.z.number().optional().nullable(),content:zod.z.string().optional().nullable()}),Ge=zod.z.object({score:zod.z.number().optional().nullable(),data:Be.optional().nullable()}),E=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),Qe=zod.z.object({id:zod.z.string().optional().nullable(),domain:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),primaryRecordId:zod.z.string().optional().nullable(),updatedAt:zod.z.string().optional().nullable(),altNames:zod.z.array(zod.z.string()).optional().nullable(),description:zod.z.string().optional().nullable(),avgMonthlyPosts:zod.z.number().optional().nullable(),paywall:zod.z.boolean().optional().nullable(),location:G.optional().nullable(),topCategories:zod.z.array(E).optional().nullable(),topTopics:zod.z.array(E).optional().nullable(),topCountries:zod.z.array(E).optional().nullable(),topLabels:zod.z.array(E).optional().nullable(),avgBiasRating:zod.z.string().optional().nullable(),adFontesBiasRating:zod.z.string().optional().nullable(),allSidesBiasRating:zod.z.string().optional().nullable(),mbfcBiasRating:zod.z.string().optional().nullable(),monthlyVisits:zod.z.number().optional().nullable(),globalRank:zod.z.number().optional().nullable(),logoLarge:x.optional().nullable(),logoFavIcon:x.optional().nullable(),logoSquare:x.optional().nullable()}),te=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(Qe)}),ae=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(J)}),oe=zod.z.object({prompt:zod.z.string().optional().nullable(),maxArticleCount:zod.z.number().optional().nullable(),returnedArticleCount:zod.z.number().optional().nullable(),summarizeFields:zod.z.enum(["TITLE","CONTENT","SUMMARY"]).optional().nullable(),method:zod.z.enum(["ARTICLES","CLUSTERS"]).optional().nullable(),model:zod.z.enum(["gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","llama-3.3-70b-versatile","deepseek-r1-distill-llama-70b"]).optional().nullable(),temperature:zod.z.number().optional().nullable(),topP:zod.z.number().optional().nullable(),maxTokens:zod.z.number().optional().nullable()}),ne=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),summary:zod.z.string(),results:zod.z.array(D)}),At=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),status:zod.z.enum(["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),Ve=zod.z.object({category:zod.z.string().optional().nullable(),subcategory:zod.z.string().optional().nullable()}),Je=zod.z.object({id:zod.z.number().optional().nullable(),createdAt:zod.z.string().optional().nullable(),updatedAt:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),labels:Ve.optional().nullable()}),re=zod.z.object({total:zod.z.number(),data:zod.z.array(Je)}),Ye=zod.z.object({id:zod.z.string().optional().nullable(),title:zod.z.string().optional().nullable(),styleLevel:zod.z.number().optional().nullable(),loc:zod.z.array(zod.z.number()).optional().nullable(),textRaw:zod.z.string().optional().nullable(),textRich:zod.z.string().optional().nullable()}),Ke=zod.z.object({id:zod.z.string().optional().nullable(),scrapedAt:zod.z.string().optional().nullable(),wikiPageId:zod.z.number().optional().nullable(),wikiRevisionId:zod.z.number().optional().nullable(),wikiRevisionTs:zod.z.string().optional().nullable(),wikiCode:zod.z.string().optional().nullable(),wikiNamespace:zod.z.number().optional().nullable(),wikiTitle:zod.z.string().optional().nullable(),url:zod.z.string().optional().nullable(),topImage:zod.z.string().optional().nullable(),wikidataId:zod.z.string().optional().nullable(),wikidataInstanceOf:zod.z.array(d).optional().nullable(),redirectTitles:zod.z.array(zod.z.string()).optional().nullable(),summary:zod.z.string().optional().nullable(),sections:zod.z.array(Ye).optional().nullable(),categories:zod.z.array(zod.z.string()).optional().nullable(),externalLinks:zod.z.array(zod.z.string()).optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable(),pageviews:zod.z.number().optional().nullable()}),$e=zod.z.object({pageId:zod.z.array(zod.z.string()).optional().nullable(),sectionId:zod.z.array(zod.z.string()).optional().nullable(),wikiPageId:zod.z.array(zod.z.number()).optional().nullable(),wikiRevisionId:zod.z.array(zod.z.number()).optional().nullable(),wikiCode:zod.z.array(zod.z.string()).optional().nullable(),wikiNamespace:zod.z.array(zod.z.number()).optional().nullable(),wikidataId:zod.z.array(zod.z.string()).optional().nullable(),wikidataInstanceOfId:zod.z.array(zod.z.string()).optional().nullable(),wikidataInstanceOfLabel:zod.z.array(zod.z.string()).optional().nullable(),AND:zod.z.array(zod.z.unknown()).optional().nullable(),OR:zod.z.array(zod.z.unknown()).optional().nullable(),NOT:zod.z.array(zod.z.unknown()).optional().nullable()}),ie=zod.z.object({prompt:zod.z.string(),filter:$e.optional().nullable(),wikiRevisionFrom:zod.z.string().optional().nullable(),wikiRevisionTo:zod.z.string().optional().nullable(),pageviewsFrom:zod.z.number().optional().nullable(),pageviewsTo:zod.z.number().optional().nullable(),size:zod.z.number().optional().nullable(),page:zod.z.number().optional().nullable()}),le=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(Ke)}),se=zod.z.object({status:zod.z.number(),results:zod.z.array(Ge)});var Xe=zod.z.object({id:zod.z.string()}),Ze=zod.z.object({...Xe.shape}),ue=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),desc:zod.z.string().optional(),content:zod.z.string().optional(),url:zod.z.string().optional(),articleId:zod.z.array(zod.z.string()).optional(),clusterId:zod.z.array(zod.z.string()).optional(),sortBy:w.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),from:zod.z.date().optional(),to:zod.z.date().optional(),addDateFrom:zod.z.date().optional(),addDateTo:zod.z.date().optional(),refreshDateFrom:zod.z.date().optional(),refreshDateTo:zod.z.date().optional(),medium:zod.z.array(zod.z.string()).optional(),source:zod.z.array(zod.z.string()).optional(),sourceGroup:zod.z.array(zod.z.string()).optional(),excludeSourceGroup:zod.z.array(zod.z.string()).optional(),excludeSource:zod.z.array(zod.z.string()).optional(),paywall:zod.z.boolean().optional(),byline:zod.z.array(zod.z.string()).optional(),author:zod.z.array(zod.z.string()).optional(),excludeAuthor:zod.z.array(zod.z.string()).optional(),journalistId:zod.z.array(zod.z.string()).optional(),excludeJournalistId:zod.z.array(zod.z.string()).optional(),language:zod.z.array(zod.z.string()).optional(),excludeLanguage:zod.z.array(zod.z.string()).optional(),searchTranslation:zod.z.boolean().optional(),label:zod.z.array(zod.z.string()).optional(),excludeLabel:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),excludeCategory:zod.z.array(zod.z.string()).optional(),topic:zod.z.array(zod.z.string()).optional(),excludeTopic:zod.z.array(zod.z.string()).optional(),linkTo:zod.z.string().optional(),showReprints:zod.z.boolean().optional(),reprintGroupId:zod.z.string().optional(),city:zod.z.array(zod.z.string()).optional(),excludeCity:zod.z.array(zod.z.string()).optional(),area:zod.z.array(zod.z.string()).optional(),state:zod.z.array(zod.z.string()).optional(),excludeState:zod.z.array(zod.z.string()).optional(),county:zod.z.array(zod.z.string()).optional(),excludeCounty:zod.z.array(zod.z.string()).optional(),locationsCountry:zod.z.array(zod.z.string()).optional(),country:zod.z.array(zod.z.string()).optional(),excludeLocationsCountry:zod.z.array(zod.z.string()).optional(),location:zod.z.array(zod.z.string()).optional(),lat:zod.z.number().optional(),lon:zod.z.number().optional(),maxDistance:zod.z.number().optional(),sourceCity:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),sourceLat:zod.z.number().optional(),sourceLon:zod.z.number().optional(),sourceMaxDistance:zod.z.number().optional(),personWikidataId:zod.z.array(zod.z.string()).optional(),excludePersonWikidataId:zod.z.array(zod.z.string()).optional(),personName:zod.z.array(zod.z.string()).optional(),excludePersonName:zod.z.array(zod.z.string()).optional(),companyId:zod.z.array(zod.z.string()).optional(),excludeCompanyId:zod.z.array(zod.z.string()).optional(),companyName:zod.z.string().optional(),companyDomain:zod.z.array(zod.z.string()).optional(),excludeCompanyDomain:zod.z.array(zod.z.string()).optional(),companySymbol:zod.z.array(zod.z.string()).optional(),excludeCompanySymbol:zod.z.array(zod.z.string()).optional(),showNumResults:zod.z.boolean().optional(),positiveSentimentFrom:zod.z.number().optional(),positiveSentimentTo:zod.z.number().optional(),neutralSentimentFrom:zod.z.number().optional(),neutralSentimentTo:zod.z.number().optional(),negativeSentimentFrom:zod.z.number().optional(),negativeSentimentTo:zod.z.number().optional(),taxonomy:zod.z.array(zod.z.string()).optional(),prefixTaxonomy:zod.z.string().optional(),showHighlighting:zod.z.boolean().optional(),highlightFragmentSize:zod.z.number().optional(),highlightNumFragments:zod.z.number().optional(),highlightPreTag:zod.z.string().optional(),highlightPostTag:zod.z.string().optional(),highlightQ:zod.z.string().optional()}),et=zod.z.object({...ue.shape}),ce=zod.z.object({id:zod.z.array(zod.z.string()).optional(),symbol:zod.z.array(zod.z.string()).optional(),domain:zod.z.array(zod.z.string()).optional(),country:zod.z.array(zod.z.string()).optional(),exchange:zod.z.array(zod.z.string()).optional(),numEmployeesFrom:zod.z.number().optional(),numEmployeesTo:zod.z.number().optional(),ipoFrom:zod.z.date().optional(),ipoTo:zod.z.date().optional(),q:zod.z.string().optional(),name:zod.z.string().optional(),industry:zod.z.string().optional(),sector:zod.z.string().optional(),size:zod.z.number().optional(),page:zod.z.number().optional()}),tt=zod.z.object({...ce.shape}),me=zod.z.object({id:zod.z.array(zod.z.string()).optional(),q:zod.z.string().optional(),name:zod.z.string().optional(),twitter:zod.z.string().optional(),size:zod.z.number().optional(),page:zod.z.number().optional(),source:zod.z.array(zod.z.string()).optional(),topic:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),label:zod.z.array(zod.z.string()).optional(),minMonthlyPosts:zod.z.number().optional(),maxMonthlyPosts:zod.z.number().optional(),country:zod.z.array(zod.z.string()).optional(),updatedAtFrom:zod.z.date().optional(),updatedAtTo:zod.z.date().optional(),showNumResults:zod.z.boolean().optional()}),at=zod.z.object({...me.shape}),ye=zod.z.object({name:zod.z.string().optional(),wikidataId:zod.z.array(zod.z.string()).optional(),occupationId:zod.z.array(zod.z.string()).optional(),occupationLabel:zod.z.string().optional(),page:zod.z.number().optional(),size:zod.z.number().optional()}),ot=zod.z.object({...ye.shape}),be=zod.z.object({domain:zod.z.array(zod.z.string()).optional(),name:zod.z.string().optional(),sourceGroup:zod.z.string().optional(),sortBy:I.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),minMonthlyVisits:zod.z.any().optional(),maxMonthlyVisits:zod.z.any().optional(),minMonthlyPosts:zod.z.any().optional(),maxMonthlyPosts:zod.z.any().optional(),country:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),sourceCity:zod.z.array(zod.z.string()).optional(),sourceLat:zod.z.number().optional(),sourceLon:zod.z.number().optional(),sourceMaxDistance:zod.z.number().optional(),category:zod.z.array(zod.z.string()).optional(),topic:zod.z.array(zod.z.string()).optional(),label:zod.z.array(zod.z.string()).optional(),paywall:zod.z.boolean().optional(),showSubdomains:zod.z.boolean().optional(),showNumResults:zod.z.boolean().optional()}),nt=zod.z.object({...be.shape}),ge=zod.z.object({q:zod.z.string().optional(),name:zod.z.string().optional(),clusterId:zod.z.array(zod.z.string()).optional(),excludeClusterId:zod.z.array(zod.z.string()).optional(),sortBy:I.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),from:zod.z.date().optional(),to:zod.z.date().optional(),initializedFrom:zod.z.date().optional(),initializedTo:zod.z.date().optional(),updatedFrom:zod.z.date().optional(),updatedTo:zod.z.date().optional(),topic:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),taxonomy:zod.z.array(zod.z.string()).optional(),source:zod.z.array(zod.z.string()).optional(),sourceGroup:zod.z.array(zod.z.string()).optional(),minUniqueSources:zod.z.number().optional(),personWikidataId:zod.z.array(zod.z.string()).optional(),personName:zod.z.string().optional(),companyId:zod.z.array(zod.z.string()).optional(),companyName:zod.z.string().optional(),companyDomain:zod.z.array(zod.z.string()).optional(),companySymbol:zod.z.array(zod.z.string()).optional(),country:zod.z.array(zod.z.string()).optional(),state:zod.z.array(zod.z.string()).optional(),city:zod.z.array(zod.z.string()).optional(),area:zod.z.array(zod.z.string()).optional(),minClusterSize:zod.z.number().optional(),maxClusterSize:zod.z.number().optional(),nameExists:zod.z.boolean().optional(),positiveSentimentFrom:zod.z.number().optional(),positiveSentimentTo:zod.z.number().optional(),neutralSentimentFrom:zod.z.number().optional(),neutralSentimentTo:zod.z.number().optional(),negativeSentimentFrom:zod.z.number().optional(),negativeSentimentTo:zod.z.number().optional(),showStoryPageInfo:zod.z.boolean().optional(),showNumResults:zod.z.boolean().optional(),showDuplicates:zod.z.boolean().optional(),showHighlighting:zod.z.boolean().optional(),highlightFragmentSize:zod.z.number().optional(),highlightNumFragments:zod.z.number().optional(),highlightPreTag:zod.z.string().optional(),highlightPostTag:zod.z.string().optional(),highlightQ:zod.z.string().optional()}),rt=zod.z.object({...ge.shape}),de=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),desc:zod.z.string().optional(),content:zod.z.string().optional(),url:zod.z.string().optional(),articleId:zod.z.array(zod.z.string()).optional(),clusterId:zod.z.array(zod.z.string()).optional(),sortBy:w.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),from:zod.z.date().optional(),to:zod.z.date().optional(),addDateFrom:zod.z.date().optional(),addDateTo:zod.z.date().optional(),refreshDateFrom:zod.z.date().optional(),refreshDateTo:zod.z.date().optional(),medium:zod.z.array(zod.z.string()).optional(),source:zod.z.array(zod.z.string()).optional(),sourceGroup:zod.z.array(zod.z.string()).optional(),excludeSourceGroup:zod.z.array(zod.z.string()).optional(),excludeSource:zod.z.array(zod.z.string()).optional(),paywall:zod.z.boolean().optional(),byline:zod.z.array(zod.z.string()).optional(),author:zod.z.array(zod.z.string()).optional(),excludeAuthor:zod.z.array(zod.z.string()).optional(),journalistId:zod.z.array(zod.z.string()).optional(),excludeJournalistId:zod.z.array(zod.z.string()).optional(),language:zod.z.array(zod.z.string()).optional(),excludeLanguage:zod.z.array(zod.z.string()).optional(),searchTranslation:zod.z.boolean().optional(),label:zod.z.array(zod.z.string()).optional(),excludeLabel:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),excludeCategory:zod.z.array(zod.z.string()).optional(),topic:zod.z.array(zod.z.string()).optional(),excludeTopic:zod.z.array(zod.z.string()).optional(),linkTo:zod.z.string().optional(),showReprints:zod.z.boolean().optional(),reprintGroupId:zod.z.string().optional(),city:zod.z.array(zod.z.string()).optional(),excludeCity:zod.z.array(zod.z.string()).optional(),area:zod.z.array(zod.z.string()).optional(),state:zod.z.array(zod.z.string()).optional(),excludeState:zod.z.array(zod.z.string()).optional(),county:zod.z.array(zod.z.string()).optional(),excludeCounty:zod.z.array(zod.z.string()).optional(),locationsCountry:zod.z.array(zod.z.string()).optional(),country:zod.z.array(zod.z.string()).optional(),excludeLocationsCountry:zod.z.array(zod.z.string()).optional(),location:zod.z.array(zod.z.string()).optional(),lat:zod.z.number().optional(),lon:zod.z.number().optional(),maxDistance:zod.z.number().optional(),sourceCity:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),sourceLat:zod.z.number().optional(),sourceLon:zod.z.number().optional(),sourceMaxDistance:zod.z.number().optional(),personWikidataId:zod.z.array(zod.z.string()).optional(),excludePersonWikidataId:zod.z.array(zod.z.string()).optional(),personName:zod.z.array(zod.z.string()).optional(),excludePersonName:zod.z.array(zod.z.string()).optional(),companyId:zod.z.array(zod.z.string()).optional(),excludeCompanyId:zod.z.array(zod.z.string()).optional(),companyName:zod.z.string().optional(),companyDomain:zod.z.array(zod.z.string()).optional(),excludeCompanyDomain:zod.z.array(zod.z.string()).optional(),companySymbol:zod.z.array(zod.z.string()).optional(),excludeCompanySymbol:zod.z.array(zod.z.string()).optional(),showNumResults:zod.z.boolean().optional(),positiveSentimentFrom:zod.z.number().optional(),positiveSentimentTo:zod.z.number().optional(),neutralSentimentFrom:zod.z.number().optional(),neutralSentimentTo:zod.z.number().optional(),negativeSentimentFrom:zod.z.number().optional(),negativeSentimentTo:zod.z.number().optional(),taxonomy:zod.z.array(zod.z.string()).optional(),prefixTaxonomy:zod.z.string().optional(),showHighlighting:zod.z.boolean().optional(),highlightFragmentSize:zod.z.number().optional(),highlightNumFragments:zod.z.number().optional(),highlightPreTag:zod.z.string().optional(),highlightPostTag:zod.z.string().optional(),highlightQ:zod.z.string().optional()}),it=zod.z.object({summaryBody:oe}),lt=zod.z.object({...de.shape,...it.shape}),he=zod.z.object({name:zod.z.string().optional(),category:zod.z.string().optional(),subcategory:zod.z.string().optional(),page:zod.z.number().optional(),size:zod.z.number().optional()}),st=zod.z.object({...he.shape}),Se=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),summary:zod.z.string().optional(),text:zod.z.string().optional(),reference:zod.z.string().optional(),id:zod.z.array(zod.z.string()).optional(),wikiPageId:zod.z.array(zod.z.number()).optional(),wikiRevisionId:zod.z.array(zod.z.number()).optional(),wikiCode:zod.z.array(zod.z.string()).optional(),wikiNamespace:zod.z.array(zod.z.number()).optional(),wikidataId:zod.z.array(zod.z.string()).optional(),wikidataInstanceOfId:zod.z.array(zod.z.string()).optional(),wikidataInstanceOfLabel:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),sectionId:zod.z.array(zod.z.string()).optional(),wikiRevisionFrom:zod.z.date().optional(),wikiRevisionTo:zod.z.date().optional(),scrapedAtFrom:zod.z.date().optional(),scrapedAtTo:zod.z.date().optional(),pageviewsFrom:zod.z.any().optional(),pageviewsTo:zod.z.any().optional(),withPageviews:zod.z.boolean().optional(),showNumResults:zod.z.boolean().optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),sortBy:I.optional()}),pt=zod.z.object({...Se.shape}),ut=zod.z.object({articleSearchParams:Y}),ct=zod.z.object({...ut.shape}),mt=zod.z.object({wikipediaSearchParams:ie}),yt=zod.z.object({...mt.shape}),pe=class extends T{async getJournalistById(a,o){let n=Ze.parse(a),i={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(i.Authorization=`Bearer ${l}`);}let r=await this.request({path:"/v1/journalists/{id}".replace("{id}",encodeURIComponent(String(n.id))),method:"GET",headers:i},o);return await new m(r,s=>A.parse(s)).value()}async searchArticles(a={},o){let n=et.parse(a),i=ue.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/articles/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>ee.parse(l)).value()}async searchCompanies(a={},o){let n=tt.parse(a),i=ce.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/companies/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>$.parse(l)).value()}async searchJournalists(a={},o){let n=at.parse(a),i=me.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/journalists/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>X.parse(l)).value()}async searchPeople(a={},o){let n=ot.parse(a),i=ye.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/people/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>Z.parse(l)).value()}async searchSources(a={},o){let n=nt.parse(a),i=be.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/sources/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>te.parse(l)).value()}async searchStories(a={},o){let n=rt.parse(a),i=ge.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/stories/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>ae.parse(l)).value()}async searchSummarizer(a,o){let n=lt.parse(a),i=de.parse(n),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/summarize",method:"POST",headers:r,query:i,body:n.summaryBody},o);return await new m(c,l=>ne.parse(l)).value()}async searchTopics(a={},o){let n=st.parse(a),i=he.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/topics/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>re.parse(l)).value()}async searchWikipedia(a={},o){let n=pt.parse(a),i=Se.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/wikipedia/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>le.parse(l)).value()}async vectorSearchArticles(a,o){let n=ct.parse(a),i={};if(i["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(i.Authorization=`Bearer ${l}`);}let r=await this.request({path:"/v1/vector/news/all",method:"POST",headers:i,body:n.articleSearchParams},o);return await new m(r,s=>K.parse(s)).value()}async vectorSearchWikipedia(a,o){let n=yt.parse(a),i={};if(i["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(i.Authorization=`Bearer ${l}`);}let r=await this.request({path:"/v1/vector/wikipedia/all",method:"POST",headers:i,body:n.wikipediaSearchParams},o);return await new m(r,s=>se.parse(s)).value()}};
2
- exports.AllEndpointSortBy=Rt;exports.AllEndpointSortBySchema=w;exports.ArticleSchema=D;exports.ArticleSearchFilterSchema=ze;exports.ArticleSearchParamsSchema=Y;exports.ArticlesVectorSearchResultSchema=K;exports.AuthExceptionSchema=ft;exports.BASE_PATH=Te;exports.BaseAPI=T;exports.BlobApiResponse=z;exports.COLLECTION_FORMATS=bt;exports.CategoryHolderSchema=N;exports.CategoryWithScoreHolderSchema=Ie;exports.CompanyCountSchema=we;exports.CompanyHolderSchema=U;exports.CompanySchema=Fe;exports.CompanySearchResultSchema=$;exports.Configuration=P;exports.CoordinateFilterSchema=F;exports.CoordinateSchema=B;exports.DefaultConfig=Re;exports.EntityHolderSchema=Ae;exports.EventTypeHolderSchema=Pe;exports.FetchError=C;exports.GetJournalistByIdPathSchema=Xe;exports.GetJournalistByIdRequestSchema=Ze;exports.IdNameHolderSchema=Oe;exports.IllegalParameterExceptionSchema=Et;exports.ImageHolderSchema=x;exports.InternalErrorExceptionCauseSchema=h;exports.InternalErrorExceptionCauseStackTraceInnerSchema=y;exports.InternalErrorExceptionSchema=xt;exports.InternalErrorExceptionSuppressedInnerSchema=S;exports.JSONApiResponse=m;exports.JournalistSchema=A;exports.JournalistSearchResultSchema=X;exports.KeyPointSchema=ke;exports.KeywordHolderSchema=Ce;exports.LabelHolderSchema=Ne;exports.LocationCountSchema=De;exports.LocationHolderSchema=k;exports.NameCountSchema=g;exports.NewsClusterSchema=J;exports.NotFoundExceptionSchema=It;exports.PeopleSearchResultSchema=Z;exports.PersonCountSchema=_e;exports.PersonHolderSchema=M;exports.PersonSchema=We;exports.PlaceSchema=qe;exports.QuerySearchResultSchema=ee;exports.QuestionSchema=He;exports.RecordStatHolderSchema=f;exports.RequiredError=H;exports.ResponseError=O;exports.ScoredDataArticleSchema=Le;exports.ScoredDataWikiDataSchema=Ge;exports.SearchArticlesQuerySchema=ue;exports.SearchArticlesRequestSchema=et;exports.SearchCompaniesQuerySchema=ce;exports.SearchCompaniesRequestSchema=tt;exports.SearchJournalistsQuerySchema=me;exports.SearchJournalistsRequestSchema=at;exports.SearchPeopleQuerySchema=ye;exports.SearchPeopleRequestSchema=ot;exports.SearchSourcesQuerySchema=be;exports.SearchSourcesRequestSchema=nt;exports.SearchStoriesQuerySchema=ge;exports.SearchStoriesRequestSchema=rt;exports.SearchSummarizerBodySchema=it;exports.SearchSummarizerQuerySchema=de;exports.SearchSummarizerRequestSchema=lt;exports.SearchTopicsQuerySchema=he;exports.SearchTopicsRequestSchema=st;exports.SearchWikipediaQuerySchema=Se;exports.SearchWikipediaRequestSchema=pt;exports.SentimentHolderSchema=W;exports.SortBy=Tt;exports.SortBySchema=I;exports.SourceHolderSchema=Q;exports.SourceLocationSchema=G;exports.SourceSchema=Qe;exports.SourceSearchResultSchema=te;exports.SourceTopStatHolderSchema=E;exports.StorySearchResultSchema=ae;exports.SummaryBodySchema=oe;exports.SummarySearchResultSchema=ne;exports.SymbolHolderSchema=ve;exports.TextApiResponse=L;exports.TooManyRequestsExceptionSchema=At;exports.TopicDtoSchema=Je;exports.TopicHolderSchema=V;exports.TopicLabelsSchema=Ve;exports.TopicSearchResultSchema=re;exports.V1Api=pe;exports.VectorSearchArticlesBodySchema=ut;exports.VectorSearchArticlesRequestSchema=ct;exports.VectorSearchWikipediaBodySchema=mt;exports.VectorSearchWikipediaRequestSchema=yt;exports.VoidApiResponse=q;exports.WebResourcesSchema=je;exports.WikiDataSchema=Be;exports.WikiPageSchema=Ke;exports.WikiPageSectionHolderSchema=Ye;exports.WikidataDateHolderSchema=b;exports.WikidataLabelHolderSchema=d;exports.WikidataPoliticalPartyHolderSchema=Ue;exports.WikidataPositionHolderSchema=Me;exports.WikipediaSearchFilterSchema=$e;exports.WikipediaSearchParamsSchema=ie;exports.WikipediaSearchResultSchema=le;exports.WikipediaVectorSearchResultSchema=se;exports.canConsumeForm=ht;exports.exists=gt;exports.mapValues=dt;exports.querystring=v;//# sourceMappingURL=index.cjs.map
1
+ 'use strict';var zod=require('zod');var Re="https://api.perigon.io".replace(/\/+$/,""),P=class{constructor(a={}){this.configuration=a;}set config(a){this.configuration=a;}get basePath(){return Re}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||U}get accessToken(){let a=this.configuration.apiKey;return a?typeof a=="function"?a:async()=>a:void 0}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},Ee=new P,O=class extends Error{constructor(o,n){super(n);this.cause=o;this.name="FetchError";}},m=class extends Error{constructor(a,o){let n=`HTTP ${a.status}: ${a.statusText}`;super(n),this.name="HttpError",this.status=a.status,this.statusText=a.statusText,this.response=a,this.body=o;}},C=class extends m{constructor(a,o){super(a,o),this.name="BadRequestError",this.message=o?.message||"Bad request - please check your input parameters";}},w=class extends m{constructor(a,o){super(a,o),this.name="UnauthorizedError",this.message="Authentication required - please check your credentials";}},N=class extends m{constructor(a,o){super(a,o),this.name="ForbiddenError",this.message="Access denied - insufficient permissions";}},k=class extends m{constructor(a,o){super(a,o),this.name="NotFoundError",this.message=o?.message||"Resource not found";}},D=class extends m{constructor(a,o){super(a,o),this.name="RateLimitError",this.message="Rate limit exceeded - please try again later";let n=a.headers.get("retry-after");n&&(this.retryAfter=parseInt(n,10));}},_=class extends m{constructor(a,o){super(a,o),this.name="ServerError",this.message="Server error - please try again later";}},F=class extends Error{constructor(a){super("Network error - please check your connection"),this.name="NetworkError",this.cause=a;}};function xe(l,a){return l.status===400?new C(l,a):l.status===401?new w(l,a):l.status===403?new N(l,a):l.status===404?new k(l,a):l.status===429?new D(l,a):l.status>499?new _(l,a):new m(l,a)}var f=class f{constructor(a=Ee){this.configuration=a;this.fetchApi=async(a,o)=>{let n={url:a,init:o};for(let r of this.middleware)r.pre&&(n=await r.pre({fetch:this.fetchApi,...n})||n);let i;try{i=await(this.configuration.fetchApi||fetch)(n.url,n.init);}catch(r){for(let c of this.middleware)c.onError&&(i=await c.onError({fetch:this.fetchApi,url:n.url,init:n.init,error:r,response:i?i.clone():void 0})||i);if(i===void 0)throw r instanceof Error?new O(r,"The request failed and the interceptors did not return an alternative response"):r}for(let r of this.middleware)r.post&&(i=await r.post({fetch:this.fetchApi,url:n.url,init:n.init,response:i.clone()})||i);return i};this.middleware=a.middleware;}withMiddleware(...a){let o=this.clone();return o.middleware=o.middleware.concat(...a),o}withPreMiddleware(...a){let o=a.map(n=>({pre:n}));return this.withMiddleware(...o)}withPostMiddleware(...a){let o=a.map(n=>({post:n}));return this.withMiddleware(...o)}isJsonMime(a){return a?f.jsonRegex.test(a):false}async request(a,o){let{url:n,init:i}=await this.createFetchParams(a,o),r=await this.fetchApi(n,i);if(r&&r.status>=200&&r.status<300)return r;let c;try{r.headers.get("content-type")?.includes("application/json")&&(c=await r.json());}catch{}throw xe(r,c)}async createFetchParams(a,o){let n=this.configuration.basePath+a.path;a.query!==void 0&&Object.keys(a.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(a.query));let i=Object.assign({},this.configuration.headers,a.headers);Object.keys(i).forEach(j=>i[j]===void 0?delete i[j]:{});let r=typeof o=="function"?o:async()=>o,c={method:a.method,headers:i,body:a.body,credentials:this.configuration.credentials},s={...c,...await r({init:c,context:a})},p;Ae(s.body)||s.body instanceof URLSearchParams||Ie(s.body)?p=s.body:this.isJsonMime(i["Content-Type"])?p=JSON.stringify(s.body):p=s.body;let u={...s,body:p};return {url:n,init:u}}clone(){let a=this.constructor,o=new a(this.configuration);return o.middleware=this.middleware.slice(),o}};f.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");var T=f;function Ie(l){return typeof Blob<"u"&&l instanceof Blob}function Ae(l){return typeof FormData<"u"&&l instanceof FormData}var ht={csv:",",ssv:" ",tsv:" ",pipes:"|"};function U(l,a=""){return Object.keys(l).map(o=>v(o,l[o],a)).filter(o=>o.length>0).join("&")}function v(l,a,o=""){let n=o+(o.length?`[${l}]`:l);if(a instanceof Array){let i=a.map(r=>encodeURIComponent(String(r))).join(`&${encodeURIComponent(n)}=`);return `${encodeURIComponent(n)}=${i}`}if(a instanceof Set){let i=Array.from(a);return v(l,i,o)}return a instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(a.toISOString())}`:a instanceof Object?U(a,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(a))}`}function St(l,a){let o=l[a];return o!=null}var I=zod.z.enum(["createdAt","updatedAt","relevance","count","totalCount"]),ft={CreatedAt:"createdAt",UpdatedAt:"updatedAt",Relevance:"relevance",Count:"count",TotalCount:"totalCount"},q=zod.z.enum(["relevance","date","reverseDate","reverseAddDate","addDate","pubDate","refreshDate"]),Rt={Relevance:"relevance",Date:"date",ReverseDate:"reverseDate",ReverseAddDate:"reverseAddDate",AddDate:"addDate",PubDate:"pubDate",RefreshDate:"refreshDate"},H=zod.z.object({name:zod.z.string().optional().nullable()}),Oe=zod.z.object({name:zod.z.string().optional().nullable(),score:zod.z.number().optional().nullable()}),W=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),domains:zod.z.array(zod.z.string()).optional().nullable(),symbols:zod.z.array(zod.z.string()).optional().nullable()}),Ce=zod.z.object({data:zod.z.string().optional().nullable(),type:zod.z.string().optional().nullable(),mentions:zod.z.number().optional().nullable()}),we=zod.z.object({name:zod.z.string().optional().nullable(),type:zod.z.string().optional().nullable()}),Ne=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable()}),z=zod.z.object({country:zod.z.string().optional().nullable(),state:zod.z.string().optional().nullable(),county:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),area:zod.z.string().optional().nullable()}),g=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),A=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),fullName:zod.z.string().optional().nullable(),headline:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),title:zod.z.string().optional().nullable(),locations:zod.z.array(z).optional().nullable(),updatedAt:zod.z.string().optional().nullable(),topTopics:zod.z.array(g).optional().nullable(),topSources:zod.z.array(g).optional().nullable(),topCategories:zod.z.array(g).optional().nullable(),topLabels:zod.z.array(g).optional().nullable(),topCountries:zod.z.array(g).optional().nullable(),avgMonthlyPosts:zod.z.number().optional().nullable(),twitterHandle:zod.z.string().optional().nullable(),twitterBio:zod.z.string().optional().nullable(),imageUrl:zod.z.string().optional().nullable(),linkedinUrl:zod.z.string().optional().nullable(),linkedinConnections:zod.z.number().optional().nullable(),linkedinFollowers:zod.z.number().optional().nullable(),facebookUrl:zod.z.string().optional().nullable(),instagramUrl:zod.z.string().optional().nullable(),websiteUrl:zod.z.string().optional().nullable(),blogUrl:zod.z.string().optional().nullable(),tumblrUrl:zod.z.string().optional().nullable(),youtubeUrl:zod.z.string().optional().nullable()}),ke=zod.z.object({name:zod.z.string().optional().nullable(),weight:zod.z.number().optional().nullable()}),De=zod.z.object({name:zod.z.string().optional().nullable()}),_e=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),domains:zod.z.array(zod.z.string()).optional().nullable(),symbols:zod.z.array(zod.z.string()).optional().nullable(),count:zod.z.number().optional().nullable()}),He=zod.z.object({point:zod.z.string().optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable()}),qe=zod.z.object({state:zod.z.string().optional().nullable(),county:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),area:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),ze=zod.z.object({wikidataId:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),B=zod.z.object({wikidataId:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable()}),Le=zod.z.object({question:zod.z.string().optional().nullable(),answer:zod.z.string().optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable()}),R=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),G=zod.z.object({positive:zod.z.number().optional().nullable(),negative:zod.z.number().optional().nullable(),neutral:zod.z.number().optional().nullable()}),Q=zod.z.object({lat:zod.z.number().optional().nullable(),lon:zod.z.number().optional().nullable()}),V=zod.z.object({country:zod.z.string().optional().nullable(),state:zod.z.string().optional().nullable(),county:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),coordinates:Q.optional().nullable()}),Y=zod.z.object({domain:zod.z.string().optional().nullable(),paywall:zod.z.boolean().optional().nullable(),location:V.optional().nullable()}),K=zod.z.object({name:zod.z.string().optional().nullable()}),J=zod.z.object({createdAt:zod.z.string().optional().nullable(),updatedAt:zod.z.string().optional().nullable(),initializedAt:zod.z.string().optional().nullable(),id:zod.z.string().optional().nullable(),duplicateOf:zod.z.string().optional().nullable(),slug:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),summary:zod.z.string().optional().nullable(),shortSummary:zod.z.string().optional().nullable(),summaryReferences:zod.z.array(zod.z.string()).optional().nullable(),imageSource:Y.optional().nullable(),imageUrl:zod.z.string().optional().nullable(),keyPoints:zod.z.array(He).optional().nullable(),questions:zod.z.array(Le).optional().nullable(),uniqueSources:zod.z.array(zod.z.string()).optional().nullable(),selectedArticles:zod.z.array(zod.z.unknown()).optional().nullable(),sentiment:G.optional().nullable(),uniqueCount:zod.z.number().optional().nullable(),reprintCount:zod.z.number().optional().nullable(),totalCount:zod.z.number().optional().nullable(),countries:zod.z.array(R).optional().nullable(),topCountries:zod.z.array(zod.z.string()).optional().nullable(),topics:zod.z.array(R).optional().nullable(),topTopics:zod.z.array(K).optional().nullable(),categories:zod.z.array(R).optional().nullable(),topCategories:zod.z.array(H).optional().nullable(),taxonomies:zod.z.array(R).optional().nullable(),topTaxonomies:zod.z.array(H).optional().nullable(),people:zod.z.array(ze).optional().nullable(),topPeople:zod.z.array(B).optional().nullable(),companies:zod.z.array(_e).optional().nullable(),topCompanies:zod.z.array(W).optional().nullable(),locations:zod.z.array(qe).optional().nullable(),topLocations:zod.z.array(z).optional().nullable(),highlights:zod.z.record(zod.z.string(),zod.z.array(zod.z.string())).optional().nullable()}),je=zod.z.object({osmId:zod.z.string().optional().nullable(),road:zod.z.string().optional().nullable(),quarter:zod.z.string().optional().nullable(),suburb:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),town:zod.z.string().optional().nullable(),county:zod.z.string().optional().nullable(),stateDistrict:zod.z.string().optional().nullable(),state:zod.z.string().optional().nullable(),postcode:zod.z.string().optional().nullable(),country:zod.z.string().optional().nullable(),countryCode:zod.z.string().optional().nullable(),amenity:zod.z.string().optional().nullable(),neighbourhood:zod.z.string().optional().nullable(),coordinates:Q.optional().nullable()}),L=zod.z.object({url:zod.z.string().optional().nullable(),authorsByline:zod.z.string().optional().nullable(),articleId:zod.z.string().optional().nullable(),clusterId:zod.z.string().optional().nullable(),source:Y.optional().nullable(),imageUrl:zod.z.string().optional().nullable(),country:zod.z.string().optional().nullable(),language:zod.z.string().optional().nullable(),pubDate:zod.z.string().optional().nullable(),addDate:zod.z.string().optional().nullable(),refreshDate:zod.z.string().optional().nullable(),score:zod.z.number().optional().nullable(),title:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),content:zod.z.string().optional().nullable(),medium:zod.z.string().optional().nullable(),links:zod.z.array(zod.z.string()).optional().nullable(),labels:zod.z.array(De).optional().nullable(),eventTypes:zod.z.array(we).optional().nullable(),matchedAuthors:zod.z.array(Ne).optional().nullable(),claim:zod.z.string().optional().nullable(),verdict:zod.z.string().optional().nullable(),keywords:zod.z.array(ke).optional().nullable(),topics:zod.z.array(K).optional().nullable(),categories:zod.z.array(H).optional().nullable(),taxonomies:zod.z.array(Oe).optional().nullable(),entities:zod.z.array(Ce).optional().nullable(),companies:zod.z.array(W).optional().nullable(),sentiment:G.optional().nullable(),summary:zod.z.string().optional().nullable(),shortSummary:zod.z.string().optional().nullable(),translation:zod.z.string().optional().nullable(),translatedTitle:zod.z.string().optional().nullable(),translatedDescription:zod.z.string().optional().nullable(),translatedSummary:zod.z.string().optional().nullable(),locations:zod.z.array(z).optional().nullable(),reprint:zod.z.boolean().optional().nullable(),reprintGroupId:zod.z.string().optional().nullable(),places:zod.z.array(je).optional().nullable(),people:zod.z.array(B).optional().nullable(),cluster:J.optional().nullable(),journalists:zod.z.array(A).optional().nullable(),highlights:zod.z.record(zod.z.string(),zod.z.array(zod.z.string())).optional().nullable()}),M=zod.z.object({lat:zod.z.number().optional().nullable(),lon:zod.z.number().optional().nullable(),radius:zod.z.number().optional().nullable()}),Fe=zod.z.object({articleId:zod.z.array(zod.z.string()).optional().nullable(),clusterId:zod.z.array(zod.z.string()).optional().nullable(),source:zod.z.array(zod.z.string()).optional().nullable(),excludeSource:zod.z.array(zod.z.string()).optional().nullable(),sourceGroup:zod.z.array(zod.z.string()).optional().nullable(),language:zod.z.array(zod.z.string()).optional().nullable(),excludeLanguage:zod.z.array(zod.z.string()).optional().nullable(),label:zod.z.array(zod.z.string()).optional().nullable(),excludeLabel:zod.z.array(zod.z.string()).optional().nullable(),taxonomy:zod.z.array(zod.z.string()).optional().nullable(),category:zod.z.array(zod.z.string()).optional().nullable(),topic:zod.z.array(zod.z.string()).optional().nullable(),excludeTopic:zod.z.array(zod.z.string()).optional().nullable(),country:zod.z.array(zod.z.string()).optional().nullable(),excludeCountry:zod.z.array(zod.z.string()).optional().nullable(),locationsCountry:zod.z.array(zod.z.string()).optional().nullable(),excludeLocationsCountry:zod.z.array(zod.z.string()).optional().nullable(),state:zod.z.array(zod.z.string()).optional().nullable(),excludeState:zod.z.array(zod.z.string()).optional().nullable(),county:zod.z.array(zod.z.string()).optional().nullable(),excludeCounty:zod.z.array(zod.z.string()).optional().nullable(),city:zod.z.array(zod.z.string()).optional().nullable(),excludeCity:zod.z.array(zod.z.string()).optional().nullable(),sourceCountry:zod.z.array(zod.z.string()).optional().nullable(),sourceState:zod.z.array(zod.z.string()).optional().nullable(),sourceCounty:zod.z.array(zod.z.string()).optional().nullable(),sourceCity:zod.z.array(zod.z.string()).optional().nullable(),coordinates:M.optional().nullable(),sourceCoordinates:M.optional().nullable(),companyId:zod.z.array(zod.z.string()).optional().nullable(),excludeCompanyId:zod.z.array(zod.z.string()).optional().nullable(),companyDomain:zod.z.array(zod.z.string()).optional().nullable(),excludeCompanyDomain:zod.z.array(zod.z.string()).optional().nullable(),companySymbol:zod.z.array(zod.z.string()).optional().nullable(),excludeCompanySymbol:zod.z.array(zod.z.string()).optional().nullable(),companyName:zod.z.array(zod.z.string()).optional().nullable(),personWikidataId:zod.z.array(zod.z.string()).optional().nullable(),excludePersonWikidataId:zod.z.array(zod.z.string()).optional().nullable(),personName:zod.z.array(zod.z.string()).optional().nullable(),excludePersonName:zod.z.array(zod.z.string()).optional().nullable(),AND:zod.z.array(zod.z.unknown()).optional().nullable(),OR:zod.z.array(zod.z.unknown()).optional().nullable(),NOT:zod.z.array(zod.z.unknown()).optional().nullable()}),$=zod.z.object({prompt:zod.z.string(),filter:Fe.optional().nullable(),pubDateFrom:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),pubDateTo:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),showReprints:zod.z.boolean().optional().nullable(),size:zod.z.number().optional().nullable(),page:zod.z.number().optional().nullable()}),Ue=zod.z.object({score:zod.z.number().optional().nullable(),data:L.optional().nullable()}),X=zod.z.object({status:zod.z.number(),results:zod.z.array(Ue)}),y=zod.z.object({classLoaderName:zod.z.string().optional(),moduleName:zod.z.string().optional(),moduleVersion:zod.z.string().optional(),methodName:zod.z.string().optional(),fileName:zod.z.string().optional(),lineNumber:zod.z.number().optional(),nativeMethod:zod.z.boolean().optional(),className:zod.z.string().optional()}),h=zod.z.object({stackTrace:zod.z.array(y).optional(),message:zod.z.string().optional(),localizedMessage:zod.z.string().optional()}),S=zod.z.object({stackTrace:zod.z.array(y).optional(),message:zod.z.string().optional(),localizedMessage:zod.z.string().optional()}),Et=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),statusCode:zod.z.enum(["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),ve=zod.z.object({symbol:zod.z.string().optional().nullable(),exchange:zod.z.string().optional().nullable(),exchangeShortName:zod.z.string().optional().nullable(),ipoDate:zod.z.string().optional().nullable()}),Me=zod.z.object({careers:zod.z.string().optional().nullable(),about:zod.z.string().optional().nullable(),blog:zod.z.string().optional().nullable(),events:zod.z.string().optional().nullable(),sitemap:zod.z.string().optional().nullable(),updates:zod.z.string().optional().nullable(),linkedin:zod.z.string().optional().nullable(),facebook:zod.z.string().optional().nullable(),instagram:zod.z.string().optional().nullable(),medium:zod.z.string().optional().nullable(),reddit:zod.z.string().optional().nullable(),threads:zod.z.string().optional().nullable(),tiktok:zod.z.string().optional().nullable(),x:zod.z.string().optional().nullable(),wellfound:zod.z.string().optional().nullable(),youtube:zod.z.string().optional().nullable(),wikipedia:zod.z.string().optional().nullable()}),We=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),updatedAt:zod.z.string().optional().nullable(),primaryRecordId:zod.z.string().optional().nullable(),altNames:zod.z.array(zod.z.string()).optional().nullable(),domains:zod.z.array(zod.z.string()).optional().nullable(),monthlyVisits:zod.z.number().optional().nullable(),globalRank:zod.z.number().optional().nullable(),description:zod.z.string().optional().nullable(),ceo:zod.z.string().optional().nullable(),industry:zod.z.string().optional().nullable(),sector:zod.z.string().optional().nullable(),country:zod.z.string().optional().nullable(),fullTimeEmployees:zod.z.number().optional().nullable(),address:zod.z.string().optional().nullable(),city:zod.z.string().optional().nullable(),state:zod.z.string().optional().nullable(),zip:zod.z.string().optional().nullable(),logo:zod.z.string().optional().nullable(),favicon:zod.z.string().optional().nullable(),isEtf:zod.z.boolean().optional().nullable(),isActivelyTrading:zod.z.boolean().optional().nullable(),isFund:zod.z.boolean().optional().nullable(),isAdr:zod.z.boolean().optional().nullable(),symbols:zod.z.array(ve).optional().nullable(),naics:zod.z.string().optional().nullable(),sic:zod.z.string().optional().nullable(),yearFounded:zod.z.number().optional().nullable(),revenue:zod.z.string().optional().nullable(),webResources:Me.optional().nullable()}),Z=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(We)}),xt=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),x=zod.z.object({url:zod.z.string().optional().nullable()}),It=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),ee=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(A)}),At=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),b=zod.z.object({time:zod.z.string().optional().nullable(),precision:zod.z.string().optional().nullable()}),d=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable()}),Be=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable(),startTime:b.optional().nullable(),endTime:b.optional().nullable()}),Ge=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable(),startTime:b.optional().nullable(),endTime:b.optional().nullable(),employer:d.optional().nullable()}),Qe=zod.z.object({wikidataId:zod.z.string().optional().nullable(),createdAt:zod.z.string().optional().nullable(),updatedAt:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),gender:d.optional().nullable(),dateOfBirth:b.optional().nullable(),dateOfDeath:b.optional().nullable(),description:zod.z.string().optional().nullable(),aliases:zod.z.array(zod.z.string()).optional().nullable(),occupation:zod.z.array(d).optional().nullable(),position:zod.z.array(Ge).optional().nullable(),politicalParty:zod.z.array(Be).optional().nullable(),image:x.optional().nullable(),_abstract:zod.z.string().optional().nullable()}),te=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(Qe)}),ae=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),articles:zod.z.array(L)}),Ve=zod.z.object({pageId:zod.z.string().optional().nullable(),sectionId:zod.z.string().optional().nullable(),wikiPageId:zod.z.number().optional().nullable(),wikiRevisionId:zod.z.number().optional().nullable(),wikiRevisionTs:zod.z.string().optional().nullable(),wikiCode:zod.z.string().optional().nullable(),wikiNamespace:zod.z.number().optional().nullable(),wikiTitle:zod.z.string().optional().nullable(),wikidataId:zod.z.string().optional().nullable(),wikidataInstanceOf:zod.z.array(d).optional().nullable(),redirectTitles:zod.z.array(zod.z.string()).optional().nullable(),pageviews:zod.z.number().optional().nullable(),title:zod.z.string().optional().nullable(),styleLevel:zod.z.number().optional().nullable(),content:zod.z.string().optional().nullable()}),Ye=zod.z.object({score:zod.z.number().optional().nullable(),data:Ve.optional().nullable()}),E=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),Ke=zod.z.object({id:zod.z.string().optional().nullable(),domain:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),primaryRecordId:zod.z.string().optional().nullable(),updatedAt:zod.z.string().optional().nullable(),altNames:zod.z.array(zod.z.string()).optional().nullable(),description:zod.z.string().optional().nullable(),avgMonthlyPosts:zod.z.number().optional().nullable(),paywall:zod.z.boolean().optional().nullable(),location:V.optional().nullable(),topCategories:zod.z.array(E).optional().nullable(),topTopics:zod.z.array(E).optional().nullable(),topCountries:zod.z.array(E).optional().nullable(),topLabels:zod.z.array(E).optional().nullable(),avgBiasRating:zod.z.string().optional().nullable(),adFontesBiasRating:zod.z.string().optional().nullable(),allSidesBiasRating:zod.z.string().optional().nullable(),mbfcBiasRating:zod.z.string().optional().nullable(),monthlyVisits:zod.z.number().optional().nullable(),globalRank:zod.z.number().optional().nullable(),logoLarge:x.optional().nullable(),logoFavIcon:x.optional().nullable(),logoSquare:x.optional().nullable()}),oe=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(Ke)}),ne=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(J)}),re=zod.z.object({prompt:zod.z.string().optional().nullable(),maxArticleCount:zod.z.number().optional().nullable(),returnedArticleCount:zod.z.number().optional().nullable(),summarizeFields:zod.z.enum(["TITLE","CONTENT","SUMMARY"]).optional().nullable(),method:zod.z.enum(["ARTICLES","CLUSTERS"]).optional().nullable(),model:zod.z.enum(["gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","llama-3.3-70b-versatile","deepseek-r1-distill-llama-70b"]).optional().nullable(),temperature:zod.z.number().optional().nullable(),topP:zod.z.number().optional().nullable(),maxTokens:zod.z.number().optional().nullable()}),ie=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),summary:zod.z.string(),results:zod.z.array(L)}),Pt=zod.z.object({cause:h.optional().nullable(),stackTrace:zod.z.array(y).optional().nullable(),status:zod.z.enum(["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]).optional().nullable(),message:zod.z.string().optional().nullable(),suppressed:zod.z.array(S).optional().nullable(),localizedMessage:zod.z.string().optional().nullable()}),Je=zod.z.object({category:zod.z.string().optional().nullable(),subcategory:zod.z.string().optional().nullable()}),$e=zod.z.object({id:zod.z.number().optional().nullable(),createdAt:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),updatedAt:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),name:zod.z.string().optional().nullable(),labels:Je.optional().nullable()}),le=zod.z.object({total:zod.z.number(),data:zod.z.array($e)}),Xe=zod.z.object({id:zod.z.string().optional().nullable(),title:zod.z.string().optional().nullable(),styleLevel:zod.z.number().optional().nullable(),loc:zod.z.array(zod.z.number()).optional().nullable(),textRaw:zod.z.string().optional().nullable(),textRich:zod.z.string().optional().nullable()}),Ze=zod.z.object({id:zod.z.string().optional().nullable(),scrapedAt:zod.z.string().optional().nullable(),wikiPageId:zod.z.number().optional().nullable(),wikiRevisionId:zod.z.number().optional().nullable(),wikiRevisionTs:zod.z.string().optional().nullable(),wikiCode:zod.z.string().optional().nullable(),wikiNamespace:zod.z.number().optional().nullable(),wikiTitle:zod.z.string().optional().nullable(),url:zod.z.string().optional().nullable(),topImage:zod.z.string().optional().nullable(),wikidataId:zod.z.string().optional().nullable(),wikidataInstanceOf:zod.z.array(d).optional().nullable(),redirectTitles:zod.z.array(zod.z.string()).optional().nullable(),summary:zod.z.string().optional().nullable(),sections:zod.z.array(Xe).optional().nullable(),categories:zod.z.array(zod.z.string()).optional().nullable(),externalLinks:zod.z.array(zod.z.string()).optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable(),pageviews:zod.z.number().optional().nullable()}),et=zod.z.object({pageId:zod.z.array(zod.z.string()).optional().nullable(),sectionId:zod.z.array(zod.z.string()).optional().nullable(),wikiPageId:zod.z.array(zod.z.number()).optional().nullable(),wikiRevisionId:zod.z.array(zod.z.number()).optional().nullable(),wikiCode:zod.z.array(zod.z.string()).optional().nullable(),wikiNamespace:zod.z.array(zod.z.number()).optional().nullable(),wikidataId:zod.z.array(zod.z.string()).optional().nullable(),wikidataInstanceOfId:zod.z.array(zod.z.string()).optional().nullable(),wikidataInstanceOfLabel:zod.z.array(zod.z.string()).optional().nullable(),AND:zod.z.array(zod.z.unknown()).optional().nullable(),OR:zod.z.array(zod.z.unknown()).optional().nullable(),NOT:zod.z.array(zod.z.unknown()).optional().nullable()}),se=zod.z.object({prompt:zod.z.string(),filter:et.optional().nullable(),wikiRevisionFrom:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),wikiRevisionTo:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),pageviewsFrom:zod.z.number().optional().nullable(),pageviewsTo:zod.z.number().optional().nullable(),size:zod.z.number().optional().nullable(),page:zod.z.number().optional().nullable()}),pe=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(Ze)}),ue=zod.z.object({status:zod.z.number(),results:zod.z.array(Ye)});var tt=zod.z.object({id:zod.z.string()}),at=zod.z.object({...tt.shape}),me=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),desc:zod.z.string().optional(),content:zod.z.string().optional(),url:zod.z.string().optional(),articleId:zod.z.array(zod.z.string()).optional(),clusterId:zod.z.array(zod.z.string()).optional(),sortBy:q.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),from:zod.z.date().optional(),to:zod.z.date().optional(),addDateFrom:zod.z.date().optional(),addDateTo:zod.z.date().optional(),refreshDateFrom:zod.z.date().optional(),refreshDateTo:zod.z.date().optional(),medium:zod.z.array(zod.z.string()).optional(),source:zod.z.array(zod.z.string()).optional(),sourceGroup:zod.z.array(zod.z.string()).optional(),excludeSourceGroup:zod.z.array(zod.z.string()).optional(),excludeSource:zod.z.array(zod.z.string()).optional(),paywall:zod.z.boolean().optional(),byline:zod.z.array(zod.z.string()).optional(),author:zod.z.array(zod.z.string()).optional(),excludeAuthor:zod.z.array(zod.z.string()).optional(),journalistId:zod.z.array(zod.z.string()).optional(),excludeJournalistId:zod.z.array(zod.z.string()).optional(),language:zod.z.array(zod.z.string()).optional(),excludeLanguage:zod.z.array(zod.z.string()).optional(),searchTranslation:zod.z.boolean().optional(),label:zod.z.array(zod.z.string()).optional(),excludeLabel:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),excludeCategory:zod.z.array(zod.z.string()).optional(),topic:zod.z.array(zod.z.string()).optional(),excludeTopic:zod.z.array(zod.z.string()).optional(),linkTo:zod.z.string().optional(),showReprints:zod.z.boolean().optional(),reprintGroupId:zod.z.string().optional(),city:zod.z.array(zod.z.string()).optional(),excludeCity:zod.z.array(zod.z.string()).optional(),area:zod.z.array(zod.z.string()).optional(),state:zod.z.array(zod.z.string()).optional(),excludeState:zod.z.array(zod.z.string()).optional(),county:zod.z.array(zod.z.string()).optional(),excludeCounty:zod.z.array(zod.z.string()).optional(),locationsCountry:zod.z.array(zod.z.string()).optional(),country:zod.z.array(zod.z.string()).optional(),excludeLocationsCountry:zod.z.array(zod.z.string()).optional(),location:zod.z.array(zod.z.string()).optional(),lat:zod.z.number().optional(),lon:zod.z.number().optional(),maxDistance:zod.z.number().optional(),sourceCity:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),sourceLat:zod.z.number().optional(),sourceLon:zod.z.number().optional(),sourceMaxDistance:zod.z.number().optional(),personWikidataId:zod.z.array(zod.z.string()).optional(),excludePersonWikidataId:zod.z.array(zod.z.string()).optional(),personName:zod.z.array(zod.z.string()).optional(),excludePersonName:zod.z.array(zod.z.string()).optional(),companyId:zod.z.array(zod.z.string()).optional(),excludeCompanyId:zod.z.array(zod.z.string()).optional(),companyName:zod.z.string().optional(),companyDomain:zod.z.array(zod.z.string()).optional(),excludeCompanyDomain:zod.z.array(zod.z.string()).optional(),companySymbol:zod.z.array(zod.z.string()).optional(),excludeCompanySymbol:zod.z.array(zod.z.string()).optional(),showNumResults:zod.z.boolean().optional(),positiveSentimentFrom:zod.z.number().optional(),positiveSentimentTo:zod.z.number().optional(),neutralSentimentFrom:zod.z.number().optional(),neutralSentimentTo:zod.z.number().optional(),negativeSentimentFrom:zod.z.number().optional(),negativeSentimentTo:zod.z.number().optional(),taxonomy:zod.z.array(zod.z.string()).optional(),prefixTaxonomy:zod.z.string().optional(),showHighlighting:zod.z.boolean().optional(),highlightFragmentSize:zod.z.number().optional(),highlightNumFragments:zod.z.number().optional(),highlightPreTag:zod.z.string().optional(),highlightPostTag:zod.z.string().optional(),highlightQ:zod.z.string().optional()}),ot=zod.z.object({...me.shape}),ye=zod.z.object({id:zod.z.array(zod.z.string()).optional(),symbol:zod.z.array(zod.z.string()).optional(),domain:zod.z.array(zod.z.string()).optional(),country:zod.z.array(zod.z.string()).optional(),exchange:zod.z.array(zod.z.string()).optional(),numEmployeesFrom:zod.z.number().optional(),numEmployeesTo:zod.z.number().optional(),ipoFrom:zod.z.date().optional(),ipoTo:zod.z.date().optional(),q:zod.z.string().optional(),name:zod.z.string().optional(),industry:zod.z.string().optional(),sector:zod.z.string().optional(),size:zod.z.number().optional(),page:zod.z.number().optional()}),nt=zod.z.object({...ye.shape}),be=zod.z.object({id:zod.z.array(zod.z.string()).optional(),q:zod.z.string().optional(),name:zod.z.string().optional(),twitter:zod.z.string().optional(),size:zod.z.number().optional(),page:zod.z.number().optional(),source:zod.z.array(zod.z.string()).optional(),topic:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),label:zod.z.array(zod.z.string()).optional(),minMonthlyPosts:zod.z.number().optional(),maxMonthlyPosts:zod.z.number().optional(),country:zod.z.array(zod.z.string()).optional(),updatedAtFrom:zod.z.date().optional(),updatedAtTo:zod.z.date().optional(),showNumResults:zod.z.boolean().optional()}),rt=zod.z.object({...be.shape}),ge=zod.z.object({name:zod.z.string().optional(),wikidataId:zod.z.array(zod.z.string()).optional(),occupationId:zod.z.array(zod.z.string()).optional(),occupationLabel:zod.z.string().optional(),page:zod.z.number().optional(),size:zod.z.number().optional()}),it=zod.z.object({...ge.shape}),de=zod.z.object({domain:zod.z.array(zod.z.string()).optional(),name:zod.z.string().optional(),sourceGroup:zod.z.string().optional(),sortBy:I.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),minMonthlyVisits:zod.z.any().optional(),maxMonthlyVisits:zod.z.any().optional(),minMonthlyPosts:zod.z.any().optional(),maxMonthlyPosts:zod.z.any().optional(),country:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),sourceCity:zod.z.array(zod.z.string()).optional(),sourceLat:zod.z.number().optional(),sourceLon:zod.z.number().optional(),sourceMaxDistance:zod.z.number().optional(),category:zod.z.array(zod.z.string()).optional(),topic:zod.z.array(zod.z.string()).optional(),label:zod.z.array(zod.z.string()).optional(),paywall:zod.z.boolean().optional(),showSubdomains:zod.z.boolean().optional(),showNumResults:zod.z.boolean().optional()}),lt=zod.z.object({...de.shape}),he=zod.z.object({q:zod.z.string().optional(),name:zod.z.string().optional(),clusterId:zod.z.array(zod.z.string()).optional(),excludeClusterId:zod.z.array(zod.z.string()).optional(),sortBy:I.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),from:zod.z.date().optional(),to:zod.z.date().optional(),initializedFrom:zod.z.date().optional(),initializedTo:zod.z.date().optional(),updatedFrom:zod.z.date().optional(),updatedTo:zod.z.date().optional(),topic:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),taxonomy:zod.z.array(zod.z.string()).optional(),source:zod.z.array(zod.z.string()).optional(),sourceGroup:zod.z.array(zod.z.string()).optional(),minUniqueSources:zod.z.number().optional(),personWikidataId:zod.z.array(zod.z.string()).optional(),personName:zod.z.string().optional(),companyId:zod.z.array(zod.z.string()).optional(),companyName:zod.z.string().optional(),companyDomain:zod.z.array(zod.z.string()).optional(),companySymbol:zod.z.array(zod.z.string()).optional(),country:zod.z.array(zod.z.string()).optional(),state:zod.z.array(zod.z.string()).optional(),city:zod.z.array(zod.z.string()).optional(),area:zod.z.array(zod.z.string()).optional(),minClusterSize:zod.z.number().optional(),maxClusterSize:zod.z.number().optional(),nameExists:zod.z.boolean().optional(),positiveSentimentFrom:zod.z.number().optional(),positiveSentimentTo:zod.z.number().optional(),neutralSentimentFrom:zod.z.number().optional(),neutralSentimentTo:zod.z.number().optional(),negativeSentimentFrom:zod.z.number().optional(),negativeSentimentTo:zod.z.number().optional(),showStoryPageInfo:zod.z.boolean().optional(),showNumResults:zod.z.boolean().optional(),showDuplicates:zod.z.boolean().optional(),showHighlighting:zod.z.boolean().optional(),highlightFragmentSize:zod.z.number().optional(),highlightNumFragments:zod.z.number().optional(),highlightPreTag:zod.z.string().optional(),highlightPostTag:zod.z.string().optional(),highlightQ:zod.z.string().optional()}),st=zod.z.object({...he.shape}),Se=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),desc:zod.z.string().optional(),content:zod.z.string().optional(),url:zod.z.string().optional(),articleId:zod.z.array(zod.z.string()).optional(),clusterId:zod.z.array(zod.z.string()).optional(),sortBy:q.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),from:zod.z.date().optional(),to:zod.z.date().optional(),addDateFrom:zod.z.date().optional(),addDateTo:zod.z.date().optional(),refreshDateFrom:zod.z.date().optional(),refreshDateTo:zod.z.date().optional(),medium:zod.z.array(zod.z.string()).optional(),source:zod.z.array(zod.z.string()).optional(),sourceGroup:zod.z.array(zod.z.string()).optional(),excludeSourceGroup:zod.z.array(zod.z.string()).optional(),excludeSource:zod.z.array(zod.z.string()).optional(),paywall:zod.z.boolean().optional(),byline:zod.z.array(zod.z.string()).optional(),author:zod.z.array(zod.z.string()).optional(),excludeAuthor:zod.z.array(zod.z.string()).optional(),journalistId:zod.z.array(zod.z.string()).optional(),excludeJournalistId:zod.z.array(zod.z.string()).optional(),language:zod.z.array(zod.z.string()).optional(),excludeLanguage:zod.z.array(zod.z.string()).optional(),searchTranslation:zod.z.boolean().optional(),label:zod.z.array(zod.z.string()).optional(),excludeLabel:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),excludeCategory:zod.z.array(zod.z.string()).optional(),topic:zod.z.array(zod.z.string()).optional(),excludeTopic:zod.z.array(zod.z.string()).optional(),linkTo:zod.z.string().optional(),showReprints:zod.z.boolean().optional(),reprintGroupId:zod.z.string().optional(),city:zod.z.array(zod.z.string()).optional(),excludeCity:zod.z.array(zod.z.string()).optional(),area:zod.z.array(zod.z.string()).optional(),state:zod.z.array(zod.z.string()).optional(),excludeState:zod.z.array(zod.z.string()).optional(),county:zod.z.array(zod.z.string()).optional(),excludeCounty:zod.z.array(zod.z.string()).optional(),locationsCountry:zod.z.array(zod.z.string()).optional(),country:zod.z.array(zod.z.string()).optional(),excludeLocationsCountry:zod.z.array(zod.z.string()).optional(),location:zod.z.array(zod.z.string()).optional(),lat:zod.z.number().optional(),lon:zod.z.number().optional(),maxDistance:zod.z.number().optional(),sourceCity:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),sourceLat:zod.z.number().optional(),sourceLon:zod.z.number().optional(),sourceMaxDistance:zod.z.number().optional(),personWikidataId:zod.z.array(zod.z.string()).optional(),excludePersonWikidataId:zod.z.array(zod.z.string()).optional(),personName:zod.z.array(zod.z.string()).optional(),excludePersonName:zod.z.array(zod.z.string()).optional(),companyId:zod.z.array(zod.z.string()).optional(),excludeCompanyId:zod.z.array(zod.z.string()).optional(),companyName:zod.z.string().optional(),companyDomain:zod.z.array(zod.z.string()).optional(),excludeCompanyDomain:zod.z.array(zod.z.string()).optional(),companySymbol:zod.z.array(zod.z.string()).optional(),excludeCompanySymbol:zod.z.array(zod.z.string()).optional(),showNumResults:zod.z.boolean().optional(),positiveSentimentFrom:zod.z.number().optional(),positiveSentimentTo:zod.z.number().optional(),neutralSentimentFrom:zod.z.number().optional(),neutralSentimentTo:zod.z.number().optional(),negativeSentimentFrom:zod.z.number().optional(),negativeSentimentTo:zod.z.number().optional(),taxonomy:zod.z.array(zod.z.string()).optional(),prefixTaxonomy:zod.z.string().optional(),showHighlighting:zod.z.boolean().optional(),highlightFragmentSize:zod.z.number().optional(),highlightNumFragments:zod.z.number().optional(),highlightPreTag:zod.z.string().optional(),highlightPostTag:zod.z.string().optional(),highlightQ:zod.z.string().optional()}),pt=zod.z.object({summaryBody:re}),ut=zod.z.object({...Se.shape,...pt.shape}),Te=zod.z.object({name:zod.z.string().optional(),category:zod.z.string().optional(),subcategory:zod.z.string().optional(),page:zod.z.number().optional(),size:zod.z.number().optional()}),ct=zod.z.object({...Te.shape}),fe=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),summary:zod.z.string().optional(),text:zod.z.string().optional(),reference:zod.z.string().optional(),id:zod.z.array(zod.z.string()).optional(),wikiPageId:zod.z.array(zod.z.number()).optional(),wikiRevisionId:zod.z.array(zod.z.number()).optional(),wikiCode:zod.z.array(zod.z.string()).optional(),wikiNamespace:zod.z.array(zod.z.number()).optional(),wikidataId:zod.z.array(zod.z.string()).optional(),wikidataInstanceOfId:zod.z.array(zod.z.string()).optional(),wikidataInstanceOfLabel:zod.z.array(zod.z.string()).optional(),category:zod.z.array(zod.z.string()).optional(),sectionId:zod.z.array(zod.z.string()).optional(),wikiRevisionFrom:zod.z.date().optional(),wikiRevisionTo:zod.z.date().optional(),scrapedAtFrom:zod.z.date().optional(),scrapedAtTo:zod.z.date().optional(),pageviewsFrom:zod.z.any().optional(),pageviewsTo:zod.z.any().optional(),withPageviews:zod.z.boolean().optional(),showNumResults:zod.z.boolean().optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),sortBy:I.optional()}),mt=zod.z.object({...fe.shape}),yt=zod.z.object({articleSearchParams:$}),bt=zod.z.object({...yt.shape}),gt=zod.z.object({wikipediaSearchParams:se}),dt=zod.z.object({...gt.shape}),ce=class extends T{async getJournalistById(a,o){let n=at.parse(a),i={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,p=await s("apiKeyAuth",[]);p&&(i.Authorization=`Bearer ${p}`);}let c=await(await this.request({path:"/v1/journalists/{id}".replace("{id}",encodeURIComponent(String(n.id))),method:"GET",headers:i},o)).json();return A.parse(c)}async searchArticles(a={},o){let n=ot.parse(a),i=me.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/articles/all",method:"GET",headers:r,query:i},o)).json();return ae.parse(s)}async searchCompanies(a={},o){let n=nt.parse(a),i=ye.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/companies/all",method:"GET",headers:r,query:i},o)).json();return Z.parse(s)}async searchJournalists(a={},o){let n=rt.parse(a),i=be.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/journalists/all",method:"GET",headers:r,query:i},o)).json();return ee.parse(s)}async searchPeople(a={},o){let n=it.parse(a),i=ge.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/people/all",method:"GET",headers:r,query:i},o)).json();return te.parse(s)}async searchSources(a={},o){let n=lt.parse(a),i=de.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/sources/all",method:"GET",headers:r,query:i},o)).json();return oe.parse(s)}async searchStories(a={},o){let n=st.parse(a),i=he.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/stories/all",method:"GET",headers:r,query:i},o)).json();return ne.parse(s)}async searchSummarizer(a,o){let n=ut.parse(a),i=Se.parse(n),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/summarize",method:"POST",headers:r,query:i,body:n.summaryBody},o)).json();return ie.parse(s)}async searchTopics(a={},o){let n=ct.parse(a),i=Te.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/topics/all",method:"GET",headers:r,query:i},o)).json();return le.parse(s)}async searchWikipedia(a={},o){let n=mt.parse(a),i=fe.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/wikipedia/all",method:"GET",headers:r,query:i},o)).json();return pe.parse(s)}async vectorSearchArticles(a,o){let n=bt.parse(a),i={};if(i["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,p=await s("apiKeyAuth",[]);p&&(i.Authorization=`Bearer ${p}`);}let c=await(await this.request({path:"/v1/vector/news/all",method:"POST",headers:i,body:n.articleSearchParams},o)).json();return X.parse(c)}async vectorSearchWikipedia(a,o){let n=dt.parse(a),i={};if(i["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,p=await s("apiKeyAuth",[]);p&&(i.Authorization=`Bearer ${p}`);}let c=await(await this.request({path:"/v1/vector/wikipedia/all",method:"POST",headers:i,body:n.wikipediaSearchParams},o)).json();return ue.parse(c)}};
2
+ exports.AllEndpointSortBy=Rt;exports.AllEndpointSortBySchema=q;exports.ArticleSchema=L;exports.ArticleSearchFilterSchema=Fe;exports.ArticleSearchParamsSchema=$;exports.ArticlesVectorSearchResultSchema=X;exports.AuthExceptionSchema=Et;exports.BASE_PATH=Re;exports.BadRequestError=C;exports.BaseAPI=T;exports.COLLECTION_FORMATS=ht;exports.CategoryHolderSchema=H;exports.CategoryWithScoreHolderSchema=Oe;exports.CompanyCountSchema=_e;exports.CompanyHolderSchema=W;exports.CompanySchema=We;exports.CompanySearchResultSchema=Z;exports.Configuration=P;exports.CoordinateFilterSchema=M;exports.CoordinateSchema=Q;exports.DefaultConfig=Ee;exports.EntityHolderSchema=Ce;exports.EventTypeHolderSchema=we;exports.FetchError=O;exports.ForbiddenError=N;exports.GetJournalistByIdPathSchema=tt;exports.GetJournalistByIdRequestSchema=at;exports.HttpError=m;exports.IdNameHolderSchema=Ne;exports.IllegalParameterExceptionSchema=xt;exports.ImageHolderSchema=x;exports.InternalErrorExceptionCauseSchema=h;exports.InternalErrorExceptionCauseStackTraceInnerSchema=y;exports.InternalErrorExceptionSchema=It;exports.InternalErrorExceptionSuppressedInnerSchema=S;exports.JournalistSchema=A;exports.JournalistSearchResultSchema=ee;exports.KeyPointSchema=He;exports.KeywordHolderSchema=ke;exports.LabelHolderSchema=De;exports.LocationCountSchema=qe;exports.LocationHolderSchema=z;exports.NameCountSchema=g;exports.NetworkError=F;exports.NewsClusterSchema=J;exports.NotFoundError=k;exports.NotFoundExceptionSchema=At;exports.PeopleSearchResultSchema=te;exports.PersonCountSchema=ze;exports.PersonHolderSchema=B;exports.PersonSchema=Qe;exports.PlaceSchema=je;exports.QuerySearchResultSchema=ae;exports.QuestionSchema=Le;exports.RateLimitError=D;exports.RecordStatHolderSchema=R;exports.ScoredDataArticleSchema=Ue;exports.ScoredDataWikiDataSchema=Ye;exports.SearchArticlesQuerySchema=me;exports.SearchArticlesRequestSchema=ot;exports.SearchCompaniesQuerySchema=ye;exports.SearchCompaniesRequestSchema=nt;exports.SearchJournalistsQuerySchema=be;exports.SearchJournalistsRequestSchema=rt;exports.SearchPeopleQuerySchema=ge;exports.SearchPeopleRequestSchema=it;exports.SearchSourcesQuerySchema=de;exports.SearchSourcesRequestSchema=lt;exports.SearchStoriesQuerySchema=he;exports.SearchStoriesRequestSchema=st;exports.SearchSummarizerBodySchema=pt;exports.SearchSummarizerQuerySchema=Se;exports.SearchSummarizerRequestSchema=ut;exports.SearchTopicsQuerySchema=Te;exports.SearchTopicsRequestSchema=ct;exports.SearchWikipediaQuerySchema=fe;exports.SearchWikipediaRequestSchema=mt;exports.SentimentHolderSchema=G;exports.ServerError=_;exports.SortBy=ft;exports.SortBySchema=I;exports.SourceHolderSchema=Y;exports.SourceLocationSchema=V;exports.SourceSchema=Ke;exports.SourceSearchResultSchema=oe;exports.SourceTopStatHolderSchema=E;exports.StorySearchResultSchema=ne;exports.SummaryBodySchema=re;exports.SummarySearchResultSchema=ie;exports.SymbolHolderSchema=ve;exports.TooManyRequestsExceptionSchema=Pt;exports.TopicDtoSchema=$e;exports.TopicHolderSchema=K;exports.TopicLabelsSchema=Je;exports.TopicSearchResultSchema=le;exports.UnauthorizedError=w;exports.V1Api=ce;exports.VectorSearchArticlesBodySchema=yt;exports.VectorSearchArticlesRequestSchema=bt;exports.VectorSearchWikipediaBodySchema=gt;exports.VectorSearchWikipediaRequestSchema=dt;exports.WebResourcesSchema=Me;exports.WikiDataSchema=Ve;exports.WikiPageSchema=Ze;exports.WikiPageSectionHolderSchema=Xe;exports.WikidataDateHolderSchema=b;exports.WikidataLabelHolderSchema=d;exports.WikidataPoliticalPartyHolderSchema=Be;exports.WikidataPositionHolderSchema=Ge;exports.WikipediaSearchFilterSchema=et;exports.WikipediaSearchParamsSchema=se;exports.WikipediaSearchResultSchema=pe;exports.WikipediaVectorSearchResultSchema=ue;exports.createHttpError=xe;exports.exists=St;exports.querystring=U;//# sourceMappingURL=index.cjs.map
3
3
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.ts CHANGED
@@ -1,16 +1,5 @@
1
1
  import { z } from 'zod';
2
2
 
3
- /**
4
- * Perigon API
5
- * 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.
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: data@perigon.io
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
3
  declare const BASE_PATH: string;
15
4
  interface ConfigurationParameters {
16
5
  fetchApi?: FetchAPI;
@@ -34,6 +23,41 @@ declare class Configuration {
34
23
  get credentials(): RequestCredentials | undefined;
35
24
  }
36
25
  declare const DefaultConfig: Configuration;
26
+ declare class FetchError extends Error {
27
+ cause: Error;
28
+ name: "FetchError";
29
+ constructor(cause: Error, msg?: string);
30
+ }
31
+ declare class HttpError extends Error {
32
+ readonly status: number;
33
+ readonly statusText: string;
34
+ readonly response: Response;
35
+ readonly body?: any;
36
+ constructor(response: Response, body?: any);
37
+ }
38
+ declare class BadRequestError extends HttpError {
39
+ constructor(response: Response, body?: any);
40
+ }
41
+ declare class UnauthorizedError extends HttpError {
42
+ constructor(response: Response, body?: any);
43
+ }
44
+ declare class ForbiddenError extends HttpError {
45
+ constructor(response: Response, body?: any);
46
+ }
47
+ declare class NotFoundError extends HttpError {
48
+ constructor(response: Response, body?: any);
49
+ }
50
+ declare class RateLimitError extends HttpError {
51
+ readonly retryAfter?: number;
52
+ constructor(response: Response, body?: any);
53
+ }
54
+ declare class ServerError extends HttpError {
55
+ constructor(response: Response, body?: any);
56
+ }
57
+ declare class NetworkError extends Error {
58
+ constructor(originalError: Error);
59
+ }
60
+ declare function createHttpError(response: Response, body?: any): HttpError;
37
61
  /**
38
62
  * This is the base class for all generated API classes.
39
63
  */
@@ -65,21 +89,6 @@ declare class BaseAPI {
65
89
  */
66
90
  private clone;
67
91
  }
68
- declare class ResponseError extends Error {
69
- response: Response;
70
- name: "ResponseError";
71
- constructor(response: Response, msg?: string);
72
- }
73
- declare class FetchError extends Error {
74
- cause: Error;
75
- name: "FetchError";
76
- constructor(cause: Error, msg?: string);
77
- }
78
- declare class RequiredError extends Error {
79
- field: string;
80
- name: "RequiredError";
81
- constructor(field: string, msg?: string);
82
- }
83
92
  declare const COLLECTION_FORMATS: {
84
93
  csv: string;
85
94
  ssv: string;
@@ -120,13 +129,6 @@ interface RequestOpts {
120
129
  }
121
130
  declare function querystring(params: HTTPQuery, prefix?: string): string;
122
131
  declare function exists(json: any, key: string): boolean;
123
- declare function mapValues(data: any, fn: (item: any) => any): {
124
- [key: string]: any;
125
- };
126
- declare function canConsumeForm(consumes: Consume[]): boolean;
127
- interface Consume {
128
- contentType: string;
129
- }
130
132
  interface RequestContext {
131
133
  fetch: FetchAPI;
132
134
  url: string;
@@ -150,34 +152,6 @@ interface Middleware {
150
152
  post?(context: ResponseContext): Promise<Response | void>;
151
153
  onError?(context: ErrorContext): Promise<Response | void>;
152
154
  }
153
- interface ApiResponse<T> {
154
- raw: Response;
155
- value(): Promise<T>;
156
- }
157
- interface ResponseTransformer<T> {
158
- (json: any): T;
159
- }
160
- declare class JSONApiResponse<T> {
161
- raw: Response;
162
- private transformer;
163
- constructor(raw: Response, transformer?: ResponseTransformer<T>);
164
- value(): Promise<T>;
165
- }
166
- declare class VoidApiResponse {
167
- raw: Response;
168
- constructor(raw: Response);
169
- value(): Promise<void>;
170
- }
171
- declare class BlobApiResponse {
172
- raw: Response;
173
- constructor(raw: Response);
174
- value(): Promise<Blob>;
175
- }
176
- declare class TextApiResponse {
177
- raw: Response;
178
- constructor(raw: Response);
179
- value(): Promise<string>;
180
- }
181
155
 
182
156
  /**
183
157
  * Perigon API
@@ -3443,11 +3417,11 @@ declare const ArticleSearchParamsSchema: z.ZodObject<{
3443
3417
  /**
3444
3418
  * 'pubDateFrom' filter, will search articles published after the specified date, the date could be passed as ISO or 'yyyy-mm-dd'. Date time in ISO format, ie. 2024-01-01T00:00:00 - Default: Only articles with a pubDate within the last 30 days of the request
3445
3419
  */
3446
- pubDateFrom: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3420
+ pubDateFrom: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
3447
3421
  /**
3448
3422
  * 'pubDateFrom' filter, will search articles published before the specified date, the date could be passed as ISO or 'yyyy-mm-dd'. Date time in ISO format, ie. 2024-01-01T00:00:00
3449
3423
  */
3450
- pubDateTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
3424
+ pubDateTo: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
3451
3425
  /**
3452
3426
  * Whether to return reprints in the response or not. Reprints are usually wired articles from sources like AP or Reuters that are reprinted in multiple sources at the same time. By default, this parameter is 'true'.
3453
3427
  */
@@ -3515,8 +3489,8 @@ declare const ArticleSearchParamsSchema: z.ZodObject<{
3515
3489
  OR?: unknown[] | null | undefined;
3516
3490
  NOT?: unknown[] | null | undefined;
3517
3491
  } | null | undefined;
3518
- pubDateFrom?: string | null | undefined;
3519
- pubDateTo?: string | null | undefined;
3492
+ pubDateFrom?: Date | null | undefined;
3493
+ pubDateTo?: Date | null | undefined;
3520
3494
  showReprints?: boolean | null | undefined;
3521
3495
  size?: number | null | undefined;
3522
3496
  page?: number | null | undefined;
@@ -16979,8 +16953,8 @@ declare const TopicLabelsSchema: z.ZodObject<{
16979
16953
  type TopicLabels = z.infer<typeof TopicLabelsSchema>;
16980
16954
  declare const TopicDtoSchema: z.ZodObject<{
16981
16955
  id: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
16982
- createdAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
16983
- updatedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
16956
+ createdAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
16957
+ updatedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
16984
16958
  name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
16985
16959
  labels: z.ZodNullable<z.ZodOptional<z.ZodObject<{
16986
16960
  category: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -16994,8 +16968,8 @@ declare const TopicDtoSchema: z.ZodObject<{
16994
16968
  }>>>;
16995
16969
  }, "strip", z.ZodTypeAny, {
16996
16970
  name?: string | null | undefined;
16997
- createdAt?: string | null | undefined;
16998
- updatedAt?: string | null | undefined;
16971
+ createdAt?: Date | null | undefined;
16972
+ updatedAt?: Date | null | undefined;
16999
16973
  id?: number | null | undefined;
17000
16974
  labels?: {
17001
16975
  category?: string | null | undefined;
@@ -17016,8 +16990,8 @@ declare const TopicSearchResultSchema: z.ZodObject<{
17016
16990
  total: z.ZodNumber;
17017
16991
  data: z.ZodArray<z.ZodObject<{
17018
16992
  id: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
17019
- createdAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17020
- updatedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
16993
+ createdAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
16994
+ updatedAt: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
17021
16995
  name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17022
16996
  labels: z.ZodNullable<z.ZodOptional<z.ZodObject<{
17023
16997
  category: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -17031,8 +17005,8 @@ declare const TopicSearchResultSchema: z.ZodObject<{
17031
17005
  }>>>;
17032
17006
  }, "strip", z.ZodTypeAny, {
17033
17007
  name?: string | null | undefined;
17034
- createdAt?: string | null | undefined;
17035
- updatedAt?: string | null | undefined;
17008
+ createdAt?: Date | null | undefined;
17009
+ updatedAt?: Date | null | undefined;
17036
17010
  id?: number | null | undefined;
17037
17011
  labels?: {
17038
17012
  category?: string | null | undefined;
@@ -17051,8 +17025,8 @@ declare const TopicSearchResultSchema: z.ZodObject<{
17051
17025
  }, "strip", z.ZodTypeAny, {
17052
17026
  data: {
17053
17027
  name?: string | null | undefined;
17054
- createdAt?: string | null | undefined;
17055
- updatedAt?: string | null | undefined;
17028
+ createdAt?: Date | null | undefined;
17029
+ updatedAt?: Date | null | undefined;
17056
17030
  id?: number | null | undefined;
17057
17031
  labels?: {
17058
17032
  category?: string | null | undefined;
@@ -17370,11 +17344,11 @@ declare const WikipediaSearchParamsSchema: z.ZodObject<{
17370
17344
  /**
17371
17345
  * 'wikiRevisionFrom' filter, will search pages modified after the specified date, the date could be passed as ISO or 'yyyy-mm-dd'. Date time in ISO format, ie. 2024-01-01T00:00:00.
17372
17346
  */
17373
- wikiRevisionFrom: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17347
+ wikiRevisionFrom: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
17374
17348
  /**
17375
17349
  * 'wikiRevisionFrom' filter, will search pages modified before the specified date, the date could be passed as ISO or 'yyyy-mm-dd'. Date time in ISO format, ie. 2024-01-01T00:00:00.
17376
17350
  */
17377
- wikiRevisionTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
17351
+ wikiRevisionTo: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
17378
17352
  /**
17379
17353
  * 'pageviewsFrom' filter, will search pages with at least the provided number of views per day.
17380
17354
  */
@@ -17409,8 +17383,8 @@ declare const WikipediaSearchParamsSchema: z.ZodObject<{
17409
17383
  } | null | undefined;
17410
17384
  size?: number | null | undefined;
17411
17385
  page?: number | null | undefined;
17412
- wikiRevisionFrom?: string | null | undefined;
17413
- wikiRevisionTo?: string | null | undefined;
17386
+ wikiRevisionFrom?: Date | null | undefined;
17387
+ wikiRevisionTo?: Date | null | undefined;
17414
17388
  pageviewsFrom?: number | null | undefined;
17415
17389
  pageviewsTo?: number | null | undefined;
17416
17390
  }, {
@@ -21933,8 +21907,8 @@ declare const VectorSearchArticlesBodySchema: z.ZodObject<{
21933
21907
  OR?: unknown[] | null | undefined;
21934
21908
  NOT?: unknown[] | null | undefined;
21935
21909
  }>>>;
21936
- pubDateFrom: z.ZodNullable<z.ZodOptional<z.ZodString>>;
21937
- pubDateTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
21910
+ pubDateFrom: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
21911
+ pubDateTo: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
21938
21912
  showReprints: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
21939
21913
  size: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
21940
21914
  page: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
@@ -21993,8 +21967,8 @@ declare const VectorSearchArticlesBodySchema: z.ZodObject<{
21993
21967
  OR?: unknown[] | null | undefined;
21994
21968
  NOT?: unknown[] | null | undefined;
21995
21969
  } | null | undefined;
21996
- pubDateFrom?: string | null | undefined;
21997
- pubDateTo?: string | null | undefined;
21970
+ pubDateFrom?: Date | null | undefined;
21971
+ pubDateTo?: Date | null | undefined;
21998
21972
  showReprints?: boolean | null | undefined;
21999
21973
  size?: number | null | undefined;
22000
21974
  page?: number | null | undefined;
@@ -22115,8 +22089,8 @@ declare const VectorSearchArticlesBodySchema: z.ZodObject<{
22115
22089
  OR?: unknown[] | null | undefined;
22116
22090
  NOT?: unknown[] | null | undefined;
22117
22091
  } | null | undefined;
22118
- pubDateFrom?: string | null | undefined;
22119
- pubDateTo?: string | null | undefined;
22092
+ pubDateFrom?: Date | null | undefined;
22093
+ pubDateTo?: Date | null | undefined;
22120
22094
  showReprints?: boolean | null | undefined;
22121
22095
  size?: number | null | undefined;
22122
22096
  page?: number | null | undefined;
@@ -22364,8 +22338,8 @@ declare const VectorSearchArticlesRequestSchema: z.ZodObject<{
22364
22338
  OR?: unknown[] | null | undefined;
22365
22339
  NOT?: unknown[] | null | undefined;
22366
22340
  }>>>;
22367
- pubDateFrom: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22368
- pubDateTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22341
+ pubDateFrom: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
22342
+ pubDateTo: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
22369
22343
  showReprints: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
22370
22344
  size: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
22371
22345
  page: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
@@ -22424,8 +22398,8 @@ declare const VectorSearchArticlesRequestSchema: z.ZodObject<{
22424
22398
  OR?: unknown[] | null | undefined;
22425
22399
  NOT?: unknown[] | null | undefined;
22426
22400
  } | null | undefined;
22427
- pubDateFrom?: string | null | undefined;
22428
- pubDateTo?: string | null | undefined;
22401
+ pubDateFrom?: Date | null | undefined;
22402
+ pubDateTo?: Date | null | undefined;
22429
22403
  showReprints?: boolean | null | undefined;
22430
22404
  size?: number | null | undefined;
22431
22405
  page?: number | null | undefined;
@@ -22546,8 +22520,8 @@ declare const VectorSearchArticlesRequestSchema: z.ZodObject<{
22546
22520
  OR?: unknown[] | null | undefined;
22547
22521
  NOT?: unknown[] | null | undefined;
22548
22522
  } | null | undefined;
22549
- pubDateFrom?: string | null | undefined;
22550
- pubDateTo?: string | null | undefined;
22523
+ pubDateFrom?: Date | null | undefined;
22524
+ pubDateTo?: Date | null | undefined;
22551
22525
  showReprints?: boolean | null | undefined;
22552
22526
  size?: number | null | undefined;
22553
22527
  page?: number | null | undefined;
@@ -22663,8 +22637,8 @@ declare const VectorSearchWikipediaBodySchema: z.ZodObject<{
22663
22637
  wikidataInstanceOfId?: string[] | null | undefined;
22664
22638
  wikidataInstanceOfLabel?: string[] | null | undefined;
22665
22639
  }>>>;
22666
- wikiRevisionFrom: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22667
- wikiRevisionTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22640
+ wikiRevisionFrom: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
22641
+ wikiRevisionTo: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
22668
22642
  pageviewsFrom: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
22669
22643
  pageviewsTo: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
22670
22644
  size: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
@@ -22687,8 +22661,8 @@ declare const VectorSearchWikipediaBodySchema: z.ZodObject<{
22687
22661
  } | null | undefined;
22688
22662
  size?: number | null | undefined;
22689
22663
  page?: number | null | undefined;
22690
- wikiRevisionFrom?: string | null | undefined;
22691
- wikiRevisionTo?: string | null | undefined;
22664
+ wikiRevisionFrom?: Date | null | undefined;
22665
+ wikiRevisionTo?: Date | null | undefined;
22692
22666
  pageviewsFrom?: number | null | undefined;
22693
22667
  pageviewsTo?: number | null | undefined;
22694
22668
  }, {
@@ -22733,8 +22707,8 @@ declare const VectorSearchWikipediaBodySchema: z.ZodObject<{
22733
22707
  } | null | undefined;
22734
22708
  size?: number | null | undefined;
22735
22709
  page?: number | null | undefined;
22736
- wikiRevisionFrom?: string | null | undefined;
22737
- wikiRevisionTo?: string | null | undefined;
22710
+ wikiRevisionFrom?: Date | null | undefined;
22711
+ wikiRevisionTo?: Date | null | undefined;
22738
22712
  pageviewsFrom?: number | null | undefined;
22739
22713
  pageviewsTo?: number | null | undefined;
22740
22714
  };
@@ -22810,8 +22784,8 @@ declare const VectorSearchWikipediaRequestSchema: z.ZodObject<{
22810
22784
  wikidataInstanceOfId?: string[] | null | undefined;
22811
22785
  wikidataInstanceOfLabel?: string[] | null | undefined;
22812
22786
  }>>>;
22813
- wikiRevisionFrom: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22814
- wikiRevisionTo: z.ZodNullable<z.ZodOptional<z.ZodString>>;
22787
+ wikiRevisionFrom: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
22788
+ wikiRevisionTo: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodString]>, Date, string>>>;
22815
22789
  pageviewsFrom: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
22816
22790
  pageviewsTo: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
22817
22791
  size: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
@@ -22834,8 +22808,8 @@ declare const VectorSearchWikipediaRequestSchema: z.ZodObject<{
22834
22808
  } | null | undefined;
22835
22809
  size?: number | null | undefined;
22836
22810
  page?: number | null | undefined;
22837
- wikiRevisionFrom?: string | null | undefined;
22838
- wikiRevisionTo?: string | null | undefined;
22811
+ wikiRevisionFrom?: Date | null | undefined;
22812
+ wikiRevisionTo?: Date | null | undefined;
22839
22813
  pageviewsFrom?: number | null | undefined;
22840
22814
  pageviewsTo?: number | null | undefined;
22841
22815
  }, {
@@ -22880,8 +22854,8 @@ declare const VectorSearchWikipediaRequestSchema: z.ZodObject<{
22880
22854
  } | null | undefined;
22881
22855
  size?: number | null | undefined;
22882
22856
  page?: number | null | undefined;
22883
- wikiRevisionFrom?: string | null | undefined;
22884
- wikiRevisionTo?: string | null | undefined;
22857
+ wikiRevisionFrom?: Date | null | undefined;
22858
+ wikiRevisionTo?: Date | null | undefined;
22885
22859
  pageviewsFrom?: number | null | undefined;
22886
22860
  pageviewsTo?: number | null | undefined;
22887
22861
  };
@@ -22977,4 +22951,4 @@ declare class V1Api extends BaseAPI {
22977
22951
  vectorSearchWikipedia(requestParameters: VectorSearchWikipediaRequest, initOverrides?: RequestInit | InitOverrideFunction): Promise<WikipediaVectorSearchResult>;
22978
22952
  }
22979
22953
 
22980
- export { AllEndpointSortBy, AllEndpointSortBySchema, type ApiResponse, type Article, ArticleSchema, type ArticleSearchFilter, ArticleSearchFilterSchema, type ArticleSearchParams, ArticleSearchParamsSchema, type ArticlesVectorSearchResult, ArticlesVectorSearchResultSchema, type AuthException, AuthExceptionSchema, BASE_PATH, BaseAPI, BlobApiResponse, COLLECTION_FORMATS, type CategoryHolder, CategoryHolderSchema, type CategoryWithScoreHolder, CategoryWithScoreHolderSchema, type Company, type CompanyCount, CompanyCountSchema, type CompanyHolder, CompanyHolderSchema, CompanySchema, type CompanySearchResult, CompanySearchResultSchema, Configuration, type ConfigurationParameters, type Consume, type Coordinate, type CoordinateFilter, CoordinateFilterSchema, CoordinateSchema, DefaultConfig, type EntityHolder, EntityHolderSchema, type ErrorContext, type EventTypeHolder, EventTypeHolderSchema, type FetchAPI, FetchError, type FetchParams, GetJournalistByIdPathSchema, type GetJournalistByIdRequest, GetJournalistByIdRequestSchema, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, type IdNameHolder, IdNameHolderSchema, type IllegalParameterException, IllegalParameterExceptionSchema, type ImageHolder, ImageHolderSchema, type InitOverrideFunction, type InternalErrorException, type InternalErrorExceptionCause, InternalErrorExceptionCauseSchema, type InternalErrorExceptionCauseStackTraceInner, InternalErrorExceptionCauseStackTraceInnerSchema, InternalErrorExceptionSchema, type InternalErrorExceptionSuppressedInner, InternalErrorExceptionSuppressedInnerSchema, JSONApiResponse, type Journalist, JournalistSchema, type JournalistSearchResult, JournalistSearchResultSchema, type Json, type KeyPoint, KeyPointSchema, type KeywordHolder, KeywordHolderSchema, type LabelHolder, LabelHolderSchema, type LocationCount, LocationCountSchema, type LocationHolder, LocationHolderSchema, type Middleware, type ModelPropertyNaming, type NameCount, NameCountSchema, type NewsCluster, NewsClusterSchema, type NotFoundException, NotFoundExceptionSchema, type PeopleSearchResult, PeopleSearchResultSchema, type Person, type PersonCount, PersonCountSchema, type PersonHolder, PersonHolderSchema, PersonSchema, type Place, PlaceSchema, type QuerySearchResult, QuerySearchResultSchema, type Question, QuestionSchema, type RecordStatHolder, RecordStatHolderSchema, type RequestContext, type RequestOpts, RequiredError, type ResponseContext, ResponseError, type ResponseTransformer, type ScoredDataArticle, ScoredDataArticleSchema, type ScoredDataWikiData, ScoredDataWikiDataSchema, SearchArticlesQuerySchema, type SearchArticlesRequest, SearchArticlesRequestSchema, SearchCompaniesQuerySchema, type SearchCompaniesRequest, SearchCompaniesRequestSchema, SearchJournalistsQuerySchema, type SearchJournalistsRequest, SearchJournalistsRequestSchema, SearchPeopleQuerySchema, type SearchPeopleRequest, SearchPeopleRequestSchema, SearchSourcesQuerySchema, type SearchSourcesRequest, SearchSourcesRequestSchema, SearchStoriesQuerySchema, type SearchStoriesRequest, SearchStoriesRequestSchema, SearchSummarizerBodySchema, SearchSummarizerQuerySchema, type SearchSummarizerRequest, SearchSummarizerRequestSchema, SearchTopicsQuerySchema, type SearchTopicsRequest, SearchTopicsRequestSchema, SearchWikipediaQuerySchema, type SearchWikipediaRequest, SearchWikipediaRequestSchema, type SentimentHolder, SentimentHolderSchema, SortBy, SortBySchema, type Source, type SourceHolder, SourceHolderSchema, type SourceLocation, SourceLocationSchema, SourceSchema, type SourceSearchResult, SourceSearchResultSchema, type SourceTopStatHolder, SourceTopStatHolderSchema, type StorySearchResult, StorySearchResultSchema, type SummaryBody, SummaryBodySchema, type SummarySearchResult, SummarySearchResultSchema, type SymbolHolder, SymbolHolderSchema, TextApiResponse, type TooManyRequestsException, TooManyRequestsExceptionSchema, type TopicDto, TopicDtoSchema, type TopicHolder, TopicHolderSchema, type TopicLabels, TopicLabelsSchema, type TopicSearchResult, TopicSearchResultSchema, V1Api, VectorSearchArticlesBodySchema, type VectorSearchArticlesRequest, VectorSearchArticlesRequestSchema, VectorSearchWikipediaBodySchema, type VectorSearchWikipediaRequest, VectorSearchWikipediaRequestSchema, VoidApiResponse, type WebResources, WebResourcesSchema, type WikiData, WikiDataSchema, type WikiPage, WikiPageSchema, type WikiPageSectionHolder, WikiPageSectionHolderSchema, type WikidataDateHolder, WikidataDateHolderSchema, type WikidataLabelHolder, WikidataLabelHolderSchema, type WikidataPoliticalPartyHolder, WikidataPoliticalPartyHolderSchema, type WikidataPositionHolder, WikidataPositionHolderSchema, type WikipediaSearchFilter, WikipediaSearchFilterSchema, type WikipediaSearchParams, WikipediaSearchParamsSchema, type WikipediaSearchResult, WikipediaSearchResultSchema, type WikipediaVectorSearchResult, WikipediaVectorSearchResultSchema, canConsumeForm, exists, mapValues, querystring };
22954
+ export { AllEndpointSortBy, AllEndpointSortBySchema, type Article, ArticleSchema, type ArticleSearchFilter, ArticleSearchFilterSchema, type ArticleSearchParams, ArticleSearchParamsSchema, type ArticlesVectorSearchResult, ArticlesVectorSearchResultSchema, type AuthException, AuthExceptionSchema, BASE_PATH, BadRequestError, BaseAPI, COLLECTION_FORMATS, type CategoryHolder, CategoryHolderSchema, type CategoryWithScoreHolder, CategoryWithScoreHolderSchema, type Company, type CompanyCount, CompanyCountSchema, type CompanyHolder, CompanyHolderSchema, CompanySchema, type CompanySearchResult, CompanySearchResultSchema, Configuration, type ConfigurationParameters, type Coordinate, type CoordinateFilter, CoordinateFilterSchema, CoordinateSchema, DefaultConfig, type EntityHolder, EntityHolderSchema, type ErrorContext, type EventTypeHolder, EventTypeHolderSchema, type FetchAPI, FetchError, type FetchParams, ForbiddenError, GetJournalistByIdPathSchema, type GetJournalistByIdRequest, GetJournalistByIdRequestSchema, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, HttpError, type IdNameHolder, IdNameHolderSchema, type IllegalParameterException, IllegalParameterExceptionSchema, type ImageHolder, ImageHolderSchema, type InitOverrideFunction, type InternalErrorException, type InternalErrorExceptionCause, InternalErrorExceptionCauseSchema, type InternalErrorExceptionCauseStackTraceInner, InternalErrorExceptionCauseStackTraceInnerSchema, InternalErrorExceptionSchema, type InternalErrorExceptionSuppressedInner, InternalErrorExceptionSuppressedInnerSchema, type Journalist, JournalistSchema, type JournalistSearchResult, JournalistSearchResultSchema, type Json, type KeyPoint, KeyPointSchema, type KeywordHolder, KeywordHolderSchema, type LabelHolder, LabelHolderSchema, type LocationCount, LocationCountSchema, type LocationHolder, LocationHolderSchema, type Middleware, type ModelPropertyNaming, type NameCount, NameCountSchema, NetworkError, type NewsCluster, NewsClusterSchema, NotFoundError, type NotFoundException, NotFoundExceptionSchema, type PeopleSearchResult, PeopleSearchResultSchema, type Person, type PersonCount, PersonCountSchema, type PersonHolder, PersonHolderSchema, PersonSchema, type Place, PlaceSchema, type QuerySearchResult, QuerySearchResultSchema, type Question, QuestionSchema, RateLimitError, type RecordStatHolder, RecordStatHolderSchema, type RequestContext, type RequestOpts, type ResponseContext, type ScoredDataArticle, ScoredDataArticleSchema, type ScoredDataWikiData, ScoredDataWikiDataSchema, SearchArticlesQuerySchema, type SearchArticlesRequest, SearchArticlesRequestSchema, SearchCompaniesQuerySchema, type SearchCompaniesRequest, SearchCompaniesRequestSchema, SearchJournalistsQuerySchema, type SearchJournalistsRequest, SearchJournalistsRequestSchema, SearchPeopleQuerySchema, type SearchPeopleRequest, SearchPeopleRequestSchema, SearchSourcesQuerySchema, type SearchSourcesRequest, SearchSourcesRequestSchema, SearchStoriesQuerySchema, type SearchStoriesRequest, SearchStoriesRequestSchema, SearchSummarizerBodySchema, SearchSummarizerQuerySchema, type SearchSummarizerRequest, SearchSummarizerRequestSchema, SearchTopicsQuerySchema, type SearchTopicsRequest, SearchTopicsRequestSchema, SearchWikipediaQuerySchema, type SearchWikipediaRequest, SearchWikipediaRequestSchema, type SentimentHolder, SentimentHolderSchema, ServerError, SortBy, SortBySchema, type Source, type SourceHolder, SourceHolderSchema, type SourceLocation, SourceLocationSchema, SourceSchema, type SourceSearchResult, SourceSearchResultSchema, type SourceTopStatHolder, SourceTopStatHolderSchema, type StorySearchResult, StorySearchResultSchema, type SummaryBody, SummaryBodySchema, type SummarySearchResult, SummarySearchResultSchema, type SymbolHolder, SymbolHolderSchema, type TooManyRequestsException, TooManyRequestsExceptionSchema, type TopicDto, TopicDtoSchema, type TopicHolder, TopicHolderSchema, type TopicLabels, TopicLabelsSchema, type TopicSearchResult, TopicSearchResultSchema, UnauthorizedError, V1Api, VectorSearchArticlesBodySchema, type VectorSearchArticlesRequest, VectorSearchArticlesRequestSchema, VectorSearchWikipediaBodySchema, type VectorSearchWikipediaRequest, VectorSearchWikipediaRequestSchema, type WebResources, WebResourcesSchema, type WikiData, WikiDataSchema, type WikiPage, WikiPageSchema, type WikiPageSectionHolder, WikiPageSectionHolderSchema, type WikidataDateHolder, WikidataDateHolderSchema, type WikidataLabelHolder, WikidataLabelHolderSchema, type WikidataPoliticalPartyHolder, WikidataPoliticalPartyHolderSchema, type WikidataPositionHolder, WikidataPositionHolderSchema, type WikipediaSearchFilter, WikipediaSearchFilterSchema, type WikipediaSearchParams, WikipediaSearchParamsSchema, type WikipediaSearchResult, WikipediaSearchResultSchema, type WikipediaVectorSearchResult, WikipediaVectorSearchResultSchema, createHttpError, exists, querystring };
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import {z as z$1}from'zod';var Te="https://api.perigon.io".replace(/\/+$/,""),P=class{constructor(a={}){this.configuration=a;}set config(a){this.configuration=a;}get basePath(){return Te}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||v}get accessToken(){let a=this.configuration.apiKey;return a?typeof a=="function"?a:async()=>a:void 0}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},Re=new P,R=class R{constructor(a=Re){this.configuration=a;this.fetchApi=async(a,o)=>{let n={url:a,init:o};for(let r of this.middleware)r.pre&&(n=await r.pre({fetch:this.fetchApi,...n})||n);let i;try{i=await(this.configuration.fetchApi||fetch)(n.url,n.init);}catch(r){for(let c of this.middleware)c.onError&&(i=await c.onError({fetch:this.fetchApi,url:n.url,init:n.init,error:r,response:i?i.clone():void 0})||i);if(i===void 0)throw r instanceof Error?new C(r,"The request failed and the interceptors did not return an alternative response"):r}for(let r of this.middleware)r.post&&(i=await r.post({fetch:this.fetchApi,url:n.url,init:n.init,response:i.clone()})||i);return i};this.middleware=a.middleware;}withMiddleware(...a){let o=this.clone();return o.middleware=o.middleware.concat(...a),o}withPreMiddleware(...a){let o=a.map(n=>({pre:n}));return this.withMiddleware(...o)}withPostMiddleware(...a){let o=a.map(n=>({post:n}));return this.withMiddleware(...o)}isJsonMime(a){return a?R.jsonRegex.test(a):false}async request(a,o){let{url:n,init:i}=await this.createFetchParams(a,o),r=await this.fetchApi(n,i);if(r&&r.status>=200&&r.status<300)return r;throw new O(r,"Response returned an error code")}async createFetchParams(a,o){let n=this.configuration.basePath+a.path;a.query!==void 0&&Object.keys(a.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(a.query));let i=Object.assign({},this.configuration.headers,a.headers);Object.keys(i).forEach(_=>i[_]===void 0?delete i[_]:{});let r=typeof o=="function"?o:async()=>o,c={method:a.method,headers:i,body:a.body,credentials:this.configuration.credentials},s={...c,...await r({init:c,context:a})},l;Ee(s.body)||s.body instanceof URLSearchParams||fe(s.body)?l=s.body:this.isJsonMime(i["Content-Type"])?l=JSON.stringify(s.body):l=s.body;let p={...s,body:l};return {url:n,init:p}}clone(){let a=this.constructor,o=new a(this.configuration);return o.middleware=this.middleware.slice(),o}};R.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");var T=R;function fe(u){return typeof Blob<"u"&&u instanceof Blob}function Ee(u){return typeof FormData<"u"&&u instanceof FormData}var O=class extends Error{constructor(o,n){super(n);this.response=o;this.name="ResponseError";}},C=class extends Error{constructor(o,n){super(n);this.cause=o;this.name="FetchError";}},H=class extends Error{constructor(o,n){super(n);this.field=o;this.name="RequiredError";}},bt={csv:",",ssv:" ",tsv:" ",pipes:"|"};function v(u,a=""){return Object.keys(u).map(o=>j(o,u[o],a)).filter(o=>o.length>0).join("&")}function j(u,a,o=""){let n=o+(o.length?`[${u}]`:u);if(a instanceof Array){let i=a.map(r=>encodeURIComponent(String(r))).join(`&${encodeURIComponent(n)}=`);return `${encodeURIComponent(n)}=${i}`}if(a instanceof Set){let i=Array.from(a);return j(u,i,o)}return a instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(a.toISOString())}`:a instanceof Object?v(a,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(a))}`}function gt(u,a){let o=u[a];return o!=null}function dt(u,a){let o={};for(let n of Object.keys(u))o[n]=a(u[n]);return o}function ht(u){for(let a of u)if(a.contentType==="multipart/form-data")return true;return false}var m=class{constructor(a,o=n=>n){this.raw=a;this.transformer=o;}async value(){return this.transformer(await this.raw.json())}},q=class{constructor(a){this.raw=a;}async value(){}},z=class{constructor(a){this.raw=a;}async value(){return await this.raw.blob()}},L=class{constructor(a){this.raw=a;}async value(){return await this.raw.text()}};var I=z$1.enum(["createdAt","updatedAt","relevance","count","totalCount"]),Tt={CreatedAt:"createdAt",UpdatedAt:"updatedAt",Relevance:"relevance",Count:"count",TotalCount:"totalCount"},w=z$1.enum(["relevance","date","reverseDate","reverseAddDate","addDate","pubDate","refreshDate"]),Rt={Relevance:"relevance",Date:"date",ReverseDate:"reverseDate",ReverseAddDate:"reverseAddDate",AddDate:"addDate",PubDate:"pubDate",RefreshDate:"refreshDate"},N=z$1.object({name:z$1.string().optional().nullable()}),Ie=z$1.object({name:z$1.string().optional().nullable(),score:z$1.number().optional().nullable()}),U=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),domains:z$1.array(z$1.string()).optional().nullable(),symbols:z$1.array(z$1.string()).optional().nullable()}),Ae=z$1.object({data:z$1.string().optional().nullable(),type:z$1.string().optional().nullable(),mentions:z$1.number().optional().nullable()}),Pe=z$1.object({name:z$1.string().optional().nullable(),type:z$1.string().optional().nullable()}),Oe=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable()}),k=z$1.object({country:z$1.string().optional().nullable(),state:z$1.string().optional().nullable(),county:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),area:z$1.string().optional().nullable()}),g=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),A=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),fullName:z$1.string().optional().nullable(),headline:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),title:z$1.string().optional().nullable(),locations:z$1.array(k).optional().nullable(),updatedAt:z$1.string().optional().nullable(),topTopics:z$1.array(g).optional().nullable(),topSources:z$1.array(g).optional().nullable(),topCategories:z$1.array(g).optional().nullable(),topLabels:z$1.array(g).optional().nullable(),topCountries:z$1.array(g).optional().nullable(),avgMonthlyPosts:z$1.number().optional().nullable(),twitterHandle:z$1.string().optional().nullable(),twitterBio:z$1.string().optional().nullable(),imageUrl:z$1.string().optional().nullable(),linkedinUrl:z$1.string().optional().nullable(),linkedinConnections:z$1.number().optional().nullable(),linkedinFollowers:z$1.number().optional().nullable(),facebookUrl:z$1.string().optional().nullable(),instagramUrl:z$1.string().optional().nullable(),websiteUrl:z$1.string().optional().nullable(),blogUrl:z$1.string().optional().nullable(),tumblrUrl:z$1.string().optional().nullable(),youtubeUrl:z$1.string().optional().nullable()}),Ce=z$1.object({name:z$1.string().optional().nullable(),weight:z$1.number().optional().nullable()}),Ne=z$1.object({name:z$1.string().optional().nullable()}),we=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),domains:z$1.array(z$1.string()).optional().nullable(),symbols:z$1.array(z$1.string()).optional().nullable(),count:z$1.number().optional().nullable()}),ke=z$1.object({point:z$1.string().optional().nullable(),references:z$1.array(z$1.string()).optional().nullable()}),De=z$1.object({state:z$1.string().optional().nullable(),county:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),area:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),_e=z$1.object({wikidataId:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),M=z$1.object({wikidataId:z$1.string().optional().nullable(),name:z$1.string().optional().nullable()}),He=z$1.object({question:z$1.string().optional().nullable(),answer:z$1.string().optional().nullable(),references:z$1.array(z$1.string()).optional().nullable()}),f=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),W=z$1.object({positive:z$1.number().optional().nullable(),negative:z$1.number().optional().nullable(),neutral:z$1.number().optional().nullable()}),B=z$1.object({lat:z$1.number().optional().nullable(),lon:z$1.number().optional().nullable()}),G=z$1.object({country:z$1.string().optional().nullable(),state:z$1.string().optional().nullable(),county:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),coordinates:B.optional().nullable()}),Q=z$1.object({domain:z$1.string().optional().nullable(),paywall:z$1.boolean().optional().nullable(),location:G.optional().nullable()}),V=z$1.object({name:z$1.string().optional().nullable()}),J=z$1.object({createdAt:z$1.string().optional().nullable(),updatedAt:z$1.string().optional().nullable(),initializedAt:z$1.string().optional().nullable(),id:z$1.string().optional().nullable(),duplicateOf:z$1.string().optional().nullable(),slug:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),summary:z$1.string().optional().nullable(),shortSummary:z$1.string().optional().nullable(),summaryReferences:z$1.array(z$1.string()).optional().nullable(),imageSource:Q.optional().nullable(),imageUrl:z$1.string().optional().nullable(),keyPoints:z$1.array(ke).optional().nullable(),questions:z$1.array(He).optional().nullable(),uniqueSources:z$1.array(z$1.string()).optional().nullable(),selectedArticles:z$1.array(z$1.unknown()).optional().nullable(),sentiment:W.optional().nullable(),uniqueCount:z$1.number().optional().nullable(),reprintCount:z$1.number().optional().nullable(),totalCount:z$1.number().optional().nullable(),countries:z$1.array(f).optional().nullable(),topCountries:z$1.array(z$1.string()).optional().nullable(),topics:z$1.array(f).optional().nullable(),topTopics:z$1.array(V).optional().nullable(),categories:z$1.array(f).optional().nullable(),topCategories:z$1.array(N).optional().nullable(),taxonomies:z$1.array(f).optional().nullable(),topTaxonomies:z$1.array(N).optional().nullable(),people:z$1.array(_e).optional().nullable(),topPeople:z$1.array(M).optional().nullable(),companies:z$1.array(we).optional().nullable(),topCompanies:z$1.array(U).optional().nullable(),locations:z$1.array(De).optional().nullable(),topLocations:z$1.array(k).optional().nullable(),highlights:z$1.record(z$1.string(),z$1.array(z$1.string())).optional().nullable()}),qe=z$1.object({osmId:z$1.string().optional().nullable(),road:z$1.string().optional().nullable(),quarter:z$1.string().optional().nullable(),suburb:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),town:z$1.string().optional().nullable(),county:z$1.string().optional().nullable(),stateDistrict:z$1.string().optional().nullable(),state:z$1.string().optional().nullable(),postcode:z$1.string().optional().nullable(),country:z$1.string().optional().nullable(),countryCode:z$1.string().optional().nullable(),amenity:z$1.string().optional().nullable(),neighbourhood:z$1.string().optional().nullable(),coordinates:B.optional().nullable()}),D=z$1.object({url:z$1.string().optional().nullable(),authorsByline:z$1.string().optional().nullable(),articleId:z$1.string().optional().nullable(),clusterId:z$1.string().optional().nullable(),source:Q.optional().nullable(),imageUrl:z$1.string().optional().nullable(),country:z$1.string().optional().nullable(),language:z$1.string().optional().nullable(),pubDate:z$1.string().optional().nullable(),addDate:z$1.string().optional().nullable(),refreshDate:z$1.string().optional().nullable(),score:z$1.number().optional().nullable(),title:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),content:z$1.string().optional().nullable(),medium:z$1.string().optional().nullable(),links:z$1.array(z$1.string()).optional().nullable(),labels:z$1.array(Ne).optional().nullable(),eventTypes:z$1.array(Pe).optional().nullable(),matchedAuthors:z$1.array(Oe).optional().nullable(),claim:z$1.string().optional().nullable(),verdict:z$1.string().optional().nullable(),keywords:z$1.array(Ce).optional().nullable(),topics:z$1.array(V).optional().nullable(),categories:z$1.array(N).optional().nullable(),taxonomies:z$1.array(Ie).optional().nullable(),entities:z$1.array(Ae).optional().nullable(),companies:z$1.array(U).optional().nullable(),sentiment:W.optional().nullable(),summary:z$1.string().optional().nullable(),shortSummary:z$1.string().optional().nullable(),translation:z$1.string().optional().nullable(),translatedTitle:z$1.string().optional().nullable(),translatedDescription:z$1.string().optional().nullable(),translatedSummary:z$1.string().optional().nullable(),locations:z$1.array(k).optional().nullable(),reprint:z$1.boolean().optional().nullable(),reprintGroupId:z$1.string().optional().nullable(),places:z$1.array(qe).optional().nullable(),people:z$1.array(M).optional().nullable(),cluster:J.optional().nullable(),journalists:z$1.array(A).optional().nullable(),highlights:z$1.record(z$1.string(),z$1.array(z$1.string())).optional().nullable()}),F=z$1.object({lat:z$1.number().optional().nullable(),lon:z$1.number().optional().nullable(),radius:z$1.number().optional().nullable()}),ze=z$1.object({articleId:z$1.array(z$1.string()).optional().nullable(),clusterId:z$1.array(z$1.string()).optional().nullable(),source:z$1.array(z$1.string()).optional().nullable(),excludeSource:z$1.array(z$1.string()).optional().nullable(),sourceGroup:z$1.array(z$1.string()).optional().nullable(),language:z$1.array(z$1.string()).optional().nullable(),excludeLanguage:z$1.array(z$1.string()).optional().nullable(),label:z$1.array(z$1.string()).optional().nullable(),excludeLabel:z$1.array(z$1.string()).optional().nullable(),taxonomy:z$1.array(z$1.string()).optional().nullable(),category:z$1.array(z$1.string()).optional().nullable(),topic:z$1.array(z$1.string()).optional().nullable(),excludeTopic:z$1.array(z$1.string()).optional().nullable(),country:z$1.array(z$1.string()).optional().nullable(),excludeCountry:z$1.array(z$1.string()).optional().nullable(),locationsCountry:z$1.array(z$1.string()).optional().nullable(),excludeLocationsCountry:z$1.array(z$1.string()).optional().nullable(),state:z$1.array(z$1.string()).optional().nullable(),excludeState:z$1.array(z$1.string()).optional().nullable(),county:z$1.array(z$1.string()).optional().nullable(),excludeCounty:z$1.array(z$1.string()).optional().nullable(),city:z$1.array(z$1.string()).optional().nullable(),excludeCity:z$1.array(z$1.string()).optional().nullable(),sourceCountry:z$1.array(z$1.string()).optional().nullable(),sourceState:z$1.array(z$1.string()).optional().nullable(),sourceCounty:z$1.array(z$1.string()).optional().nullable(),sourceCity:z$1.array(z$1.string()).optional().nullable(),coordinates:F.optional().nullable(),sourceCoordinates:F.optional().nullable(),companyId:z$1.array(z$1.string()).optional().nullable(),excludeCompanyId:z$1.array(z$1.string()).optional().nullable(),companyDomain:z$1.array(z$1.string()).optional().nullable(),excludeCompanyDomain:z$1.array(z$1.string()).optional().nullable(),companySymbol:z$1.array(z$1.string()).optional().nullable(),excludeCompanySymbol:z$1.array(z$1.string()).optional().nullable(),companyName:z$1.array(z$1.string()).optional().nullable(),personWikidataId:z$1.array(z$1.string()).optional().nullable(),excludePersonWikidataId:z$1.array(z$1.string()).optional().nullable(),personName:z$1.array(z$1.string()).optional().nullable(),excludePersonName:z$1.array(z$1.string()).optional().nullable(),AND:z$1.array(z$1.unknown()).optional().nullable(),OR:z$1.array(z$1.unknown()).optional().nullable(),NOT:z$1.array(z$1.unknown()).optional().nullable()}),Y=z$1.object({prompt:z$1.string(),filter:ze.optional().nullable(),pubDateFrom:z$1.string().optional().nullable(),pubDateTo:z$1.string().optional().nullable(),showReprints:z$1.boolean().optional().nullable(),size:z$1.number().optional().nullable(),page:z$1.number().optional().nullable()}),Le=z$1.object({score:z$1.number().optional().nullable(),data:D.optional().nullable()}),K=z$1.object({status:z$1.number(),results:z$1.array(Le)}),y=z$1.object({classLoaderName:z$1.string().optional(),moduleName:z$1.string().optional(),moduleVersion:z$1.string().optional(),methodName:z$1.string().optional(),fileName:z$1.string().optional(),lineNumber:z$1.number().optional(),nativeMethod:z$1.boolean().optional(),className:z$1.string().optional()}),h=z$1.object({stackTrace:z$1.array(y).optional(),message:z$1.string().optional(),localizedMessage:z$1.string().optional()}),S=z$1.object({stackTrace:z$1.array(y).optional(),message:z$1.string().optional(),localizedMessage:z$1.string().optional()}),ft=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),statusCode:z$1.enum(["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),ve=z$1.object({symbol:z$1.string().optional().nullable(),exchange:z$1.string().optional().nullable(),exchangeShortName:z$1.string().optional().nullable(),ipoDate:z$1.string().optional().nullable()}),je=z$1.object({careers:z$1.string().optional().nullable(),about:z$1.string().optional().nullable(),blog:z$1.string().optional().nullable(),events:z$1.string().optional().nullable(),sitemap:z$1.string().optional().nullable(),updates:z$1.string().optional().nullable(),linkedin:z$1.string().optional().nullable(),facebook:z$1.string().optional().nullable(),instagram:z$1.string().optional().nullable(),medium:z$1.string().optional().nullable(),reddit:z$1.string().optional().nullable(),threads:z$1.string().optional().nullable(),tiktok:z$1.string().optional().nullable(),x:z$1.string().optional().nullable(),wellfound:z$1.string().optional().nullable(),youtube:z$1.string().optional().nullable(),wikipedia:z$1.string().optional().nullable()}),Fe=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),updatedAt:z$1.string().optional().nullable(),primaryRecordId:z$1.string().optional().nullable(),altNames:z$1.array(z$1.string()).optional().nullable(),domains:z$1.array(z$1.string()).optional().nullable(),monthlyVisits:z$1.number().optional().nullable(),globalRank:z$1.number().optional().nullable(),description:z$1.string().optional().nullable(),ceo:z$1.string().optional().nullable(),industry:z$1.string().optional().nullable(),sector:z$1.string().optional().nullable(),country:z$1.string().optional().nullable(),fullTimeEmployees:z$1.number().optional().nullable(),address:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),state:z$1.string().optional().nullable(),zip:z$1.string().optional().nullable(),logo:z$1.string().optional().nullable(),favicon:z$1.string().optional().nullable(),isEtf:z$1.boolean().optional().nullable(),isActivelyTrading:z$1.boolean().optional().nullable(),isFund:z$1.boolean().optional().nullable(),isAdr:z$1.boolean().optional().nullable(),symbols:z$1.array(ve).optional().nullable(),naics:z$1.string().optional().nullable(),sic:z$1.string().optional().nullable(),yearFounded:z$1.number().optional().nullable(),revenue:z$1.string().optional().nullable(),webResources:je.optional().nullable()}),$=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(Fe)}),Et=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),x=z$1.object({url:z$1.string().optional().nullable()}),xt=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),X=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(A)}),It=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),b=z$1.object({time:z$1.string().optional().nullable(),precision:z$1.string().optional().nullable()}),d=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable()}),Ue=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable(),startTime:b.optional().nullable(),endTime:b.optional().nullable()}),Me=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable(),startTime:b.optional().nullable(),endTime:b.optional().nullable(),employer:d.optional().nullable()}),We=z$1.object({wikidataId:z$1.string().optional().nullable(),createdAt:z$1.string().optional().nullable(),updatedAt:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),gender:d.optional().nullable(),dateOfBirth:b.optional().nullable(),dateOfDeath:b.optional().nullable(),description:z$1.string().optional().nullable(),aliases:z$1.array(z$1.string()).optional().nullable(),occupation:z$1.array(d).optional().nullable(),position:z$1.array(Me).optional().nullable(),politicalParty:z$1.array(Ue).optional().nullable(),image:x.optional().nullable(),_abstract:z$1.string().optional().nullable()}),Z=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(We)}),ee=z$1.object({status:z$1.number(),numResults:z$1.number(),articles:z$1.array(D)}),Be=z$1.object({pageId:z$1.string().optional().nullable(),sectionId:z$1.string().optional().nullable(),wikiPageId:z$1.number().optional().nullable(),wikiRevisionId:z$1.number().optional().nullable(),wikiRevisionTs:z$1.string().optional().nullable(),wikiCode:z$1.string().optional().nullable(),wikiNamespace:z$1.number().optional().nullable(),wikiTitle:z$1.string().optional().nullable(),wikidataId:z$1.string().optional().nullable(),wikidataInstanceOf:z$1.array(d).optional().nullable(),redirectTitles:z$1.array(z$1.string()).optional().nullable(),pageviews:z$1.number().optional().nullable(),title:z$1.string().optional().nullable(),styleLevel:z$1.number().optional().nullable(),content:z$1.string().optional().nullable()}),Ge=z$1.object({score:z$1.number().optional().nullable(),data:Be.optional().nullable()}),E=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),Qe=z$1.object({id:z$1.string().optional().nullable(),domain:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),primaryRecordId:z$1.string().optional().nullable(),updatedAt:z$1.string().optional().nullable(),altNames:z$1.array(z$1.string()).optional().nullable(),description:z$1.string().optional().nullable(),avgMonthlyPosts:z$1.number().optional().nullable(),paywall:z$1.boolean().optional().nullable(),location:G.optional().nullable(),topCategories:z$1.array(E).optional().nullable(),topTopics:z$1.array(E).optional().nullable(),topCountries:z$1.array(E).optional().nullable(),topLabels:z$1.array(E).optional().nullable(),avgBiasRating:z$1.string().optional().nullable(),adFontesBiasRating:z$1.string().optional().nullable(),allSidesBiasRating:z$1.string().optional().nullable(),mbfcBiasRating:z$1.string().optional().nullable(),monthlyVisits:z$1.number().optional().nullable(),globalRank:z$1.number().optional().nullable(),logoLarge:x.optional().nullable(),logoFavIcon:x.optional().nullable(),logoSquare:x.optional().nullable()}),te=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(Qe)}),ae=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(J)}),oe=z$1.object({prompt:z$1.string().optional().nullable(),maxArticleCount:z$1.number().optional().nullable(),returnedArticleCount:z$1.number().optional().nullable(),summarizeFields:z$1.enum(["TITLE","CONTENT","SUMMARY"]).optional().nullable(),method:z$1.enum(["ARTICLES","CLUSTERS"]).optional().nullable(),model:z$1.enum(["gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","llama-3.3-70b-versatile","deepseek-r1-distill-llama-70b"]).optional().nullable(),temperature:z$1.number().optional().nullable(),topP:z$1.number().optional().nullable(),maxTokens:z$1.number().optional().nullable()}),ne=z$1.object({status:z$1.number(),numResults:z$1.number(),summary:z$1.string(),results:z$1.array(D)}),At=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),status:z$1.enum(["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),Ve=z$1.object({category:z$1.string().optional().nullable(),subcategory:z$1.string().optional().nullable()}),Je=z$1.object({id:z$1.number().optional().nullable(),createdAt:z$1.string().optional().nullable(),updatedAt:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),labels:Ve.optional().nullable()}),re=z$1.object({total:z$1.number(),data:z$1.array(Je)}),Ye=z$1.object({id:z$1.string().optional().nullable(),title:z$1.string().optional().nullable(),styleLevel:z$1.number().optional().nullable(),loc:z$1.array(z$1.number()).optional().nullable(),textRaw:z$1.string().optional().nullable(),textRich:z$1.string().optional().nullable()}),Ke=z$1.object({id:z$1.string().optional().nullable(),scrapedAt:z$1.string().optional().nullable(),wikiPageId:z$1.number().optional().nullable(),wikiRevisionId:z$1.number().optional().nullable(),wikiRevisionTs:z$1.string().optional().nullable(),wikiCode:z$1.string().optional().nullable(),wikiNamespace:z$1.number().optional().nullable(),wikiTitle:z$1.string().optional().nullable(),url:z$1.string().optional().nullable(),topImage:z$1.string().optional().nullable(),wikidataId:z$1.string().optional().nullable(),wikidataInstanceOf:z$1.array(d).optional().nullable(),redirectTitles:z$1.array(z$1.string()).optional().nullable(),summary:z$1.string().optional().nullable(),sections:z$1.array(Ye).optional().nullable(),categories:z$1.array(z$1.string()).optional().nullable(),externalLinks:z$1.array(z$1.string()).optional().nullable(),references:z$1.array(z$1.string()).optional().nullable(),pageviews:z$1.number().optional().nullable()}),$e=z$1.object({pageId:z$1.array(z$1.string()).optional().nullable(),sectionId:z$1.array(z$1.string()).optional().nullable(),wikiPageId:z$1.array(z$1.number()).optional().nullable(),wikiRevisionId:z$1.array(z$1.number()).optional().nullable(),wikiCode:z$1.array(z$1.string()).optional().nullable(),wikiNamespace:z$1.array(z$1.number()).optional().nullable(),wikidataId:z$1.array(z$1.string()).optional().nullable(),wikidataInstanceOfId:z$1.array(z$1.string()).optional().nullable(),wikidataInstanceOfLabel:z$1.array(z$1.string()).optional().nullable(),AND:z$1.array(z$1.unknown()).optional().nullable(),OR:z$1.array(z$1.unknown()).optional().nullable(),NOT:z$1.array(z$1.unknown()).optional().nullable()}),ie=z$1.object({prompt:z$1.string(),filter:$e.optional().nullable(),wikiRevisionFrom:z$1.string().optional().nullable(),wikiRevisionTo:z$1.string().optional().nullable(),pageviewsFrom:z$1.number().optional().nullable(),pageviewsTo:z$1.number().optional().nullable(),size:z$1.number().optional().nullable(),page:z$1.number().optional().nullable()}),le=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(Ke)}),se=z$1.object({status:z$1.number(),results:z$1.array(Ge)});var Xe=z$1.object({id:z$1.string()}),Ze=z$1.object({...Xe.shape}),ue=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),desc:z$1.string().optional(),content:z$1.string().optional(),url:z$1.string().optional(),articleId:z$1.array(z$1.string()).optional(),clusterId:z$1.array(z$1.string()).optional(),sortBy:w.optional(),page:z$1.number().optional(),size:z$1.number().optional(),from:z$1.date().optional(),to:z$1.date().optional(),addDateFrom:z$1.date().optional(),addDateTo:z$1.date().optional(),refreshDateFrom:z$1.date().optional(),refreshDateTo:z$1.date().optional(),medium:z$1.array(z$1.string()).optional(),source:z$1.array(z$1.string()).optional(),sourceGroup:z$1.array(z$1.string()).optional(),excludeSourceGroup:z$1.array(z$1.string()).optional(),excludeSource:z$1.array(z$1.string()).optional(),paywall:z$1.boolean().optional(),byline:z$1.array(z$1.string()).optional(),author:z$1.array(z$1.string()).optional(),excludeAuthor:z$1.array(z$1.string()).optional(),journalistId:z$1.array(z$1.string()).optional(),excludeJournalistId:z$1.array(z$1.string()).optional(),language:z$1.array(z$1.string()).optional(),excludeLanguage:z$1.array(z$1.string()).optional(),searchTranslation:z$1.boolean().optional(),label:z$1.array(z$1.string()).optional(),excludeLabel:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),excludeCategory:z$1.array(z$1.string()).optional(),topic:z$1.array(z$1.string()).optional(),excludeTopic:z$1.array(z$1.string()).optional(),linkTo:z$1.string().optional(),showReprints:z$1.boolean().optional(),reprintGroupId:z$1.string().optional(),city:z$1.array(z$1.string()).optional(),excludeCity:z$1.array(z$1.string()).optional(),area:z$1.array(z$1.string()).optional(),state:z$1.array(z$1.string()).optional(),excludeState:z$1.array(z$1.string()).optional(),county:z$1.array(z$1.string()).optional(),excludeCounty:z$1.array(z$1.string()).optional(),locationsCountry:z$1.array(z$1.string()).optional(),country:z$1.array(z$1.string()).optional(),excludeLocationsCountry:z$1.array(z$1.string()).optional(),location:z$1.array(z$1.string()).optional(),lat:z$1.number().optional(),lon:z$1.number().optional(),maxDistance:z$1.number().optional(),sourceCity:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),sourceLat:z$1.number().optional(),sourceLon:z$1.number().optional(),sourceMaxDistance:z$1.number().optional(),personWikidataId:z$1.array(z$1.string()).optional(),excludePersonWikidataId:z$1.array(z$1.string()).optional(),personName:z$1.array(z$1.string()).optional(),excludePersonName:z$1.array(z$1.string()).optional(),companyId:z$1.array(z$1.string()).optional(),excludeCompanyId:z$1.array(z$1.string()).optional(),companyName:z$1.string().optional(),companyDomain:z$1.array(z$1.string()).optional(),excludeCompanyDomain:z$1.array(z$1.string()).optional(),companySymbol:z$1.array(z$1.string()).optional(),excludeCompanySymbol:z$1.array(z$1.string()).optional(),showNumResults:z$1.boolean().optional(),positiveSentimentFrom:z$1.number().optional(),positiveSentimentTo:z$1.number().optional(),neutralSentimentFrom:z$1.number().optional(),neutralSentimentTo:z$1.number().optional(),negativeSentimentFrom:z$1.number().optional(),negativeSentimentTo:z$1.number().optional(),taxonomy:z$1.array(z$1.string()).optional(),prefixTaxonomy:z$1.string().optional(),showHighlighting:z$1.boolean().optional(),highlightFragmentSize:z$1.number().optional(),highlightNumFragments:z$1.number().optional(),highlightPreTag:z$1.string().optional(),highlightPostTag:z$1.string().optional(),highlightQ:z$1.string().optional()}),et=z$1.object({...ue.shape}),ce=z$1.object({id:z$1.array(z$1.string()).optional(),symbol:z$1.array(z$1.string()).optional(),domain:z$1.array(z$1.string()).optional(),country:z$1.array(z$1.string()).optional(),exchange:z$1.array(z$1.string()).optional(),numEmployeesFrom:z$1.number().optional(),numEmployeesTo:z$1.number().optional(),ipoFrom:z$1.date().optional(),ipoTo:z$1.date().optional(),q:z$1.string().optional(),name:z$1.string().optional(),industry:z$1.string().optional(),sector:z$1.string().optional(),size:z$1.number().optional(),page:z$1.number().optional()}),tt=z$1.object({...ce.shape}),me=z$1.object({id:z$1.array(z$1.string()).optional(),q:z$1.string().optional(),name:z$1.string().optional(),twitter:z$1.string().optional(),size:z$1.number().optional(),page:z$1.number().optional(),source:z$1.array(z$1.string()).optional(),topic:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),label:z$1.array(z$1.string()).optional(),minMonthlyPosts:z$1.number().optional(),maxMonthlyPosts:z$1.number().optional(),country:z$1.array(z$1.string()).optional(),updatedAtFrom:z$1.date().optional(),updatedAtTo:z$1.date().optional(),showNumResults:z$1.boolean().optional()}),at=z$1.object({...me.shape}),ye=z$1.object({name:z$1.string().optional(),wikidataId:z$1.array(z$1.string()).optional(),occupationId:z$1.array(z$1.string()).optional(),occupationLabel:z$1.string().optional(),page:z$1.number().optional(),size:z$1.number().optional()}),ot=z$1.object({...ye.shape}),be=z$1.object({domain:z$1.array(z$1.string()).optional(),name:z$1.string().optional(),sourceGroup:z$1.string().optional(),sortBy:I.optional(),page:z$1.number().optional(),size:z$1.number().optional(),minMonthlyVisits:z$1.any().optional(),maxMonthlyVisits:z$1.any().optional(),minMonthlyPosts:z$1.any().optional(),maxMonthlyPosts:z$1.any().optional(),country:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),sourceCity:z$1.array(z$1.string()).optional(),sourceLat:z$1.number().optional(),sourceLon:z$1.number().optional(),sourceMaxDistance:z$1.number().optional(),category:z$1.array(z$1.string()).optional(),topic:z$1.array(z$1.string()).optional(),label:z$1.array(z$1.string()).optional(),paywall:z$1.boolean().optional(),showSubdomains:z$1.boolean().optional(),showNumResults:z$1.boolean().optional()}),nt=z$1.object({...be.shape}),ge=z$1.object({q:z$1.string().optional(),name:z$1.string().optional(),clusterId:z$1.array(z$1.string()).optional(),excludeClusterId:z$1.array(z$1.string()).optional(),sortBy:I.optional(),page:z$1.number().optional(),size:z$1.number().optional(),from:z$1.date().optional(),to:z$1.date().optional(),initializedFrom:z$1.date().optional(),initializedTo:z$1.date().optional(),updatedFrom:z$1.date().optional(),updatedTo:z$1.date().optional(),topic:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),taxonomy:z$1.array(z$1.string()).optional(),source:z$1.array(z$1.string()).optional(),sourceGroup:z$1.array(z$1.string()).optional(),minUniqueSources:z$1.number().optional(),personWikidataId:z$1.array(z$1.string()).optional(),personName:z$1.string().optional(),companyId:z$1.array(z$1.string()).optional(),companyName:z$1.string().optional(),companyDomain:z$1.array(z$1.string()).optional(),companySymbol:z$1.array(z$1.string()).optional(),country:z$1.array(z$1.string()).optional(),state:z$1.array(z$1.string()).optional(),city:z$1.array(z$1.string()).optional(),area:z$1.array(z$1.string()).optional(),minClusterSize:z$1.number().optional(),maxClusterSize:z$1.number().optional(),nameExists:z$1.boolean().optional(),positiveSentimentFrom:z$1.number().optional(),positiveSentimentTo:z$1.number().optional(),neutralSentimentFrom:z$1.number().optional(),neutralSentimentTo:z$1.number().optional(),negativeSentimentFrom:z$1.number().optional(),negativeSentimentTo:z$1.number().optional(),showStoryPageInfo:z$1.boolean().optional(),showNumResults:z$1.boolean().optional(),showDuplicates:z$1.boolean().optional(),showHighlighting:z$1.boolean().optional(),highlightFragmentSize:z$1.number().optional(),highlightNumFragments:z$1.number().optional(),highlightPreTag:z$1.string().optional(),highlightPostTag:z$1.string().optional(),highlightQ:z$1.string().optional()}),rt=z$1.object({...ge.shape}),de=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),desc:z$1.string().optional(),content:z$1.string().optional(),url:z$1.string().optional(),articleId:z$1.array(z$1.string()).optional(),clusterId:z$1.array(z$1.string()).optional(),sortBy:w.optional(),page:z$1.number().optional(),size:z$1.number().optional(),from:z$1.date().optional(),to:z$1.date().optional(),addDateFrom:z$1.date().optional(),addDateTo:z$1.date().optional(),refreshDateFrom:z$1.date().optional(),refreshDateTo:z$1.date().optional(),medium:z$1.array(z$1.string()).optional(),source:z$1.array(z$1.string()).optional(),sourceGroup:z$1.array(z$1.string()).optional(),excludeSourceGroup:z$1.array(z$1.string()).optional(),excludeSource:z$1.array(z$1.string()).optional(),paywall:z$1.boolean().optional(),byline:z$1.array(z$1.string()).optional(),author:z$1.array(z$1.string()).optional(),excludeAuthor:z$1.array(z$1.string()).optional(),journalistId:z$1.array(z$1.string()).optional(),excludeJournalistId:z$1.array(z$1.string()).optional(),language:z$1.array(z$1.string()).optional(),excludeLanguage:z$1.array(z$1.string()).optional(),searchTranslation:z$1.boolean().optional(),label:z$1.array(z$1.string()).optional(),excludeLabel:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),excludeCategory:z$1.array(z$1.string()).optional(),topic:z$1.array(z$1.string()).optional(),excludeTopic:z$1.array(z$1.string()).optional(),linkTo:z$1.string().optional(),showReprints:z$1.boolean().optional(),reprintGroupId:z$1.string().optional(),city:z$1.array(z$1.string()).optional(),excludeCity:z$1.array(z$1.string()).optional(),area:z$1.array(z$1.string()).optional(),state:z$1.array(z$1.string()).optional(),excludeState:z$1.array(z$1.string()).optional(),county:z$1.array(z$1.string()).optional(),excludeCounty:z$1.array(z$1.string()).optional(),locationsCountry:z$1.array(z$1.string()).optional(),country:z$1.array(z$1.string()).optional(),excludeLocationsCountry:z$1.array(z$1.string()).optional(),location:z$1.array(z$1.string()).optional(),lat:z$1.number().optional(),lon:z$1.number().optional(),maxDistance:z$1.number().optional(),sourceCity:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),sourceLat:z$1.number().optional(),sourceLon:z$1.number().optional(),sourceMaxDistance:z$1.number().optional(),personWikidataId:z$1.array(z$1.string()).optional(),excludePersonWikidataId:z$1.array(z$1.string()).optional(),personName:z$1.array(z$1.string()).optional(),excludePersonName:z$1.array(z$1.string()).optional(),companyId:z$1.array(z$1.string()).optional(),excludeCompanyId:z$1.array(z$1.string()).optional(),companyName:z$1.string().optional(),companyDomain:z$1.array(z$1.string()).optional(),excludeCompanyDomain:z$1.array(z$1.string()).optional(),companySymbol:z$1.array(z$1.string()).optional(),excludeCompanySymbol:z$1.array(z$1.string()).optional(),showNumResults:z$1.boolean().optional(),positiveSentimentFrom:z$1.number().optional(),positiveSentimentTo:z$1.number().optional(),neutralSentimentFrom:z$1.number().optional(),neutralSentimentTo:z$1.number().optional(),negativeSentimentFrom:z$1.number().optional(),negativeSentimentTo:z$1.number().optional(),taxonomy:z$1.array(z$1.string()).optional(),prefixTaxonomy:z$1.string().optional(),showHighlighting:z$1.boolean().optional(),highlightFragmentSize:z$1.number().optional(),highlightNumFragments:z$1.number().optional(),highlightPreTag:z$1.string().optional(),highlightPostTag:z$1.string().optional(),highlightQ:z$1.string().optional()}),it=z$1.object({summaryBody:oe}),lt=z$1.object({...de.shape,...it.shape}),he=z$1.object({name:z$1.string().optional(),category:z$1.string().optional(),subcategory:z$1.string().optional(),page:z$1.number().optional(),size:z$1.number().optional()}),st=z$1.object({...he.shape}),Se=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),summary:z$1.string().optional(),text:z$1.string().optional(),reference:z$1.string().optional(),id:z$1.array(z$1.string()).optional(),wikiPageId:z$1.array(z$1.number()).optional(),wikiRevisionId:z$1.array(z$1.number()).optional(),wikiCode:z$1.array(z$1.string()).optional(),wikiNamespace:z$1.array(z$1.number()).optional(),wikidataId:z$1.array(z$1.string()).optional(),wikidataInstanceOfId:z$1.array(z$1.string()).optional(),wikidataInstanceOfLabel:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),sectionId:z$1.array(z$1.string()).optional(),wikiRevisionFrom:z$1.date().optional(),wikiRevisionTo:z$1.date().optional(),scrapedAtFrom:z$1.date().optional(),scrapedAtTo:z$1.date().optional(),pageviewsFrom:z$1.any().optional(),pageviewsTo:z$1.any().optional(),withPageviews:z$1.boolean().optional(),showNumResults:z$1.boolean().optional(),page:z$1.number().optional(),size:z$1.number().optional(),sortBy:I.optional()}),pt=z$1.object({...Se.shape}),ut=z$1.object({articleSearchParams:Y}),ct=z$1.object({...ut.shape}),mt=z$1.object({wikipediaSearchParams:ie}),yt=z$1.object({...mt.shape}),pe=class extends T{async getJournalistById(a,o){let n=Ze.parse(a),i={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(i.Authorization=`Bearer ${l}`);}let r=await this.request({path:"/v1/journalists/{id}".replace("{id}",encodeURIComponent(String(n.id))),method:"GET",headers:i},o);return await new m(r,s=>A.parse(s)).value()}async searchArticles(a={},o){let n=et.parse(a),i=ue.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/articles/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>ee.parse(l)).value()}async searchCompanies(a={},o){let n=tt.parse(a),i=ce.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/companies/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>$.parse(l)).value()}async searchJournalists(a={},o){let n=at.parse(a),i=me.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/journalists/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>X.parse(l)).value()}async searchPeople(a={},o){let n=ot.parse(a),i=ye.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/people/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>Z.parse(l)).value()}async searchSources(a={},o){let n=nt.parse(a),i=be.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/sources/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>te.parse(l)).value()}async searchStories(a={},o){let n=rt.parse(a),i=ge.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/stories/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>ae.parse(l)).value()}async searchSummarizer(a,o){let n=lt.parse(a),i=de.parse(n),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/summarize",method:"POST",headers:r,query:i,body:n.summaryBody},o);return await new m(c,l=>ne.parse(l)).value()}async searchTopics(a={},o){let n=st.parse(a),i=he.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/topics/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>re.parse(l)).value()}async searchWikipedia(a={},o){let n=pt.parse(a),i=Se.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(r.Authorization=`Bearer ${p}`);}let c=await this.request({path:"/v1/wikipedia/all",method:"GET",headers:r,query:i},o);return await new m(c,l=>le.parse(l)).value()}async vectorSearchArticles(a,o){let n=ct.parse(a),i={};if(i["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(i.Authorization=`Bearer ${l}`);}let r=await this.request({path:"/v1/vector/news/all",method:"POST",headers:i,body:n.articleSearchParams},o);return await new m(r,s=>K.parse(s)).value()}async vectorSearchWikipedia(a,o){let n=yt.parse(a),i={};if(i["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(i.Authorization=`Bearer ${l}`);}let r=await this.request({path:"/v1/vector/wikipedia/all",method:"POST",headers:i,body:n.wikipediaSearchParams},o);return await new m(r,s=>se.parse(s)).value()}};
2
- export{Rt as AllEndpointSortBy,w as AllEndpointSortBySchema,D as ArticleSchema,ze as ArticleSearchFilterSchema,Y as ArticleSearchParamsSchema,K as ArticlesVectorSearchResultSchema,ft as AuthExceptionSchema,Te as BASE_PATH,T as BaseAPI,z as BlobApiResponse,bt as COLLECTION_FORMATS,N as CategoryHolderSchema,Ie as CategoryWithScoreHolderSchema,we as CompanyCountSchema,U as CompanyHolderSchema,Fe as CompanySchema,$ as CompanySearchResultSchema,P as Configuration,F as CoordinateFilterSchema,B as CoordinateSchema,Re as DefaultConfig,Ae as EntityHolderSchema,Pe as EventTypeHolderSchema,C as FetchError,Xe as GetJournalistByIdPathSchema,Ze as GetJournalistByIdRequestSchema,Oe as IdNameHolderSchema,Et as IllegalParameterExceptionSchema,x as ImageHolderSchema,h as InternalErrorExceptionCauseSchema,y as InternalErrorExceptionCauseStackTraceInnerSchema,xt as InternalErrorExceptionSchema,S as InternalErrorExceptionSuppressedInnerSchema,m as JSONApiResponse,A as JournalistSchema,X as JournalistSearchResultSchema,ke as KeyPointSchema,Ce as KeywordHolderSchema,Ne as LabelHolderSchema,De as LocationCountSchema,k as LocationHolderSchema,g as NameCountSchema,J as NewsClusterSchema,It as NotFoundExceptionSchema,Z as PeopleSearchResultSchema,_e as PersonCountSchema,M as PersonHolderSchema,We as PersonSchema,qe as PlaceSchema,ee as QuerySearchResultSchema,He as QuestionSchema,f as RecordStatHolderSchema,H as RequiredError,O as ResponseError,Le as ScoredDataArticleSchema,Ge as ScoredDataWikiDataSchema,ue as SearchArticlesQuerySchema,et as SearchArticlesRequestSchema,ce as SearchCompaniesQuerySchema,tt as SearchCompaniesRequestSchema,me as SearchJournalistsQuerySchema,at as SearchJournalistsRequestSchema,ye as SearchPeopleQuerySchema,ot as SearchPeopleRequestSchema,be as SearchSourcesQuerySchema,nt as SearchSourcesRequestSchema,ge as SearchStoriesQuerySchema,rt as SearchStoriesRequestSchema,it as SearchSummarizerBodySchema,de as SearchSummarizerQuerySchema,lt as SearchSummarizerRequestSchema,he as SearchTopicsQuerySchema,st as SearchTopicsRequestSchema,Se as SearchWikipediaQuerySchema,pt as SearchWikipediaRequestSchema,W as SentimentHolderSchema,Tt as SortBy,I as SortBySchema,Q as SourceHolderSchema,G as SourceLocationSchema,Qe as SourceSchema,te as SourceSearchResultSchema,E as SourceTopStatHolderSchema,ae as StorySearchResultSchema,oe as SummaryBodySchema,ne as SummarySearchResultSchema,ve as SymbolHolderSchema,L as TextApiResponse,At as TooManyRequestsExceptionSchema,Je as TopicDtoSchema,V as TopicHolderSchema,Ve as TopicLabelsSchema,re as TopicSearchResultSchema,pe as V1Api,ut as VectorSearchArticlesBodySchema,ct as VectorSearchArticlesRequestSchema,mt as VectorSearchWikipediaBodySchema,yt as VectorSearchWikipediaRequestSchema,q as VoidApiResponse,je as WebResourcesSchema,Be as WikiDataSchema,Ke as WikiPageSchema,Ye as WikiPageSectionHolderSchema,b as WikidataDateHolderSchema,d as WikidataLabelHolderSchema,Ue as WikidataPoliticalPartyHolderSchema,Me as WikidataPositionHolderSchema,$e as WikipediaSearchFilterSchema,ie as WikipediaSearchParamsSchema,le as WikipediaSearchResultSchema,se as WikipediaVectorSearchResultSchema,ht as canConsumeForm,gt as exists,dt as mapValues,v as querystring};//# sourceMappingURL=index.js.map
1
+ import {z as z$1}from'zod';var Re="https://api.perigon.io".replace(/\/+$/,""),P=class{constructor(a={}){this.configuration=a;}set config(a){this.configuration=a;}get basePath(){return Re}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||U}get accessToken(){let a=this.configuration.apiKey;return a?typeof a=="function"?a:async()=>a:void 0}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},Ee=new P,O=class extends Error{constructor(o,n){super(n);this.cause=o;this.name="FetchError";}},m=class extends Error{constructor(a,o){let n=`HTTP ${a.status}: ${a.statusText}`;super(n),this.name="HttpError",this.status=a.status,this.statusText=a.statusText,this.response=a,this.body=o;}},C=class extends m{constructor(a,o){super(a,o),this.name="BadRequestError",this.message=o?.message||"Bad request - please check your input parameters";}},w=class extends m{constructor(a,o){super(a,o),this.name="UnauthorizedError",this.message="Authentication required - please check your credentials";}},N=class extends m{constructor(a,o){super(a,o),this.name="ForbiddenError",this.message="Access denied - insufficient permissions";}},k=class extends m{constructor(a,o){super(a,o),this.name="NotFoundError",this.message=o?.message||"Resource not found";}},D=class extends m{constructor(a,o){super(a,o),this.name="RateLimitError",this.message="Rate limit exceeded - please try again later";let n=a.headers.get("retry-after");n&&(this.retryAfter=parseInt(n,10));}},_=class extends m{constructor(a,o){super(a,o),this.name="ServerError",this.message="Server error - please try again later";}},F=class extends Error{constructor(a){super("Network error - please check your connection"),this.name="NetworkError",this.cause=a;}};function xe(l,a){return l.status===400?new C(l,a):l.status===401?new w(l,a):l.status===403?new N(l,a):l.status===404?new k(l,a):l.status===429?new D(l,a):l.status>499?new _(l,a):new m(l,a)}var f=class f{constructor(a=Ee){this.configuration=a;this.fetchApi=async(a,o)=>{let n={url:a,init:o};for(let r of this.middleware)r.pre&&(n=await r.pre({fetch:this.fetchApi,...n})||n);let i;try{i=await(this.configuration.fetchApi||fetch)(n.url,n.init);}catch(r){for(let c of this.middleware)c.onError&&(i=await c.onError({fetch:this.fetchApi,url:n.url,init:n.init,error:r,response:i?i.clone():void 0})||i);if(i===void 0)throw r instanceof Error?new O(r,"The request failed and the interceptors did not return an alternative response"):r}for(let r of this.middleware)r.post&&(i=await r.post({fetch:this.fetchApi,url:n.url,init:n.init,response:i.clone()})||i);return i};this.middleware=a.middleware;}withMiddleware(...a){let o=this.clone();return o.middleware=o.middleware.concat(...a),o}withPreMiddleware(...a){let o=a.map(n=>({pre:n}));return this.withMiddleware(...o)}withPostMiddleware(...a){let o=a.map(n=>({post:n}));return this.withMiddleware(...o)}isJsonMime(a){return a?f.jsonRegex.test(a):false}async request(a,o){let{url:n,init:i}=await this.createFetchParams(a,o),r=await this.fetchApi(n,i);if(r&&r.status>=200&&r.status<300)return r;let c;try{r.headers.get("content-type")?.includes("application/json")&&(c=await r.json());}catch{}throw xe(r,c)}async createFetchParams(a,o){let n=this.configuration.basePath+a.path;a.query!==void 0&&Object.keys(a.query).length!==0&&(n+="?"+this.configuration.queryParamsStringify(a.query));let i=Object.assign({},this.configuration.headers,a.headers);Object.keys(i).forEach(j=>i[j]===void 0?delete i[j]:{});let r=typeof o=="function"?o:async()=>o,c={method:a.method,headers:i,body:a.body,credentials:this.configuration.credentials},s={...c,...await r({init:c,context:a})},p;Ae(s.body)||s.body instanceof URLSearchParams||Ie(s.body)?p=s.body:this.isJsonMime(i["Content-Type"])?p=JSON.stringify(s.body):p=s.body;let u={...s,body:p};return {url:n,init:u}}clone(){let a=this.constructor,o=new a(this.configuration);return o.middleware=this.middleware.slice(),o}};f.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");var T=f;function Ie(l){return typeof Blob<"u"&&l instanceof Blob}function Ae(l){return typeof FormData<"u"&&l instanceof FormData}var ht={csv:",",ssv:" ",tsv:" ",pipes:"|"};function U(l,a=""){return Object.keys(l).map(o=>v(o,l[o],a)).filter(o=>o.length>0).join("&")}function v(l,a,o=""){let n=o+(o.length?`[${l}]`:l);if(a instanceof Array){let i=a.map(r=>encodeURIComponent(String(r))).join(`&${encodeURIComponent(n)}=`);return `${encodeURIComponent(n)}=${i}`}if(a instanceof Set){let i=Array.from(a);return v(l,i,o)}return a instanceof Date?`${encodeURIComponent(n)}=${encodeURIComponent(a.toISOString())}`:a instanceof Object?U(a,n):`${encodeURIComponent(n)}=${encodeURIComponent(String(a))}`}function St(l,a){let o=l[a];return o!=null}var I=z$1.enum(["createdAt","updatedAt","relevance","count","totalCount"]),ft={CreatedAt:"createdAt",UpdatedAt:"updatedAt",Relevance:"relevance",Count:"count",TotalCount:"totalCount"},q=z$1.enum(["relevance","date","reverseDate","reverseAddDate","addDate","pubDate","refreshDate"]),Rt={Relevance:"relevance",Date:"date",ReverseDate:"reverseDate",ReverseAddDate:"reverseAddDate",AddDate:"addDate",PubDate:"pubDate",RefreshDate:"refreshDate"},H=z$1.object({name:z$1.string().optional().nullable()}),Oe=z$1.object({name:z$1.string().optional().nullable(),score:z$1.number().optional().nullable()}),W=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),domains:z$1.array(z$1.string()).optional().nullable(),symbols:z$1.array(z$1.string()).optional().nullable()}),Ce=z$1.object({data:z$1.string().optional().nullable(),type:z$1.string().optional().nullable(),mentions:z$1.number().optional().nullable()}),we=z$1.object({name:z$1.string().optional().nullable(),type:z$1.string().optional().nullable()}),Ne=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable()}),z=z$1.object({country:z$1.string().optional().nullable(),state:z$1.string().optional().nullable(),county:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),area:z$1.string().optional().nullable()}),g=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),A=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),fullName:z$1.string().optional().nullable(),headline:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),title:z$1.string().optional().nullable(),locations:z$1.array(z).optional().nullable(),updatedAt:z$1.string().optional().nullable(),topTopics:z$1.array(g).optional().nullable(),topSources:z$1.array(g).optional().nullable(),topCategories:z$1.array(g).optional().nullable(),topLabels:z$1.array(g).optional().nullable(),topCountries:z$1.array(g).optional().nullable(),avgMonthlyPosts:z$1.number().optional().nullable(),twitterHandle:z$1.string().optional().nullable(),twitterBio:z$1.string().optional().nullable(),imageUrl:z$1.string().optional().nullable(),linkedinUrl:z$1.string().optional().nullable(),linkedinConnections:z$1.number().optional().nullable(),linkedinFollowers:z$1.number().optional().nullable(),facebookUrl:z$1.string().optional().nullable(),instagramUrl:z$1.string().optional().nullable(),websiteUrl:z$1.string().optional().nullable(),blogUrl:z$1.string().optional().nullable(),tumblrUrl:z$1.string().optional().nullable(),youtubeUrl:z$1.string().optional().nullable()}),ke=z$1.object({name:z$1.string().optional().nullable(),weight:z$1.number().optional().nullable()}),De=z$1.object({name:z$1.string().optional().nullable()}),_e=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),domains:z$1.array(z$1.string()).optional().nullable(),symbols:z$1.array(z$1.string()).optional().nullable(),count:z$1.number().optional().nullable()}),He=z$1.object({point:z$1.string().optional().nullable(),references:z$1.array(z$1.string()).optional().nullable()}),qe=z$1.object({state:z$1.string().optional().nullable(),county:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),area:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),ze=z$1.object({wikidataId:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),B=z$1.object({wikidataId:z$1.string().optional().nullable(),name:z$1.string().optional().nullable()}),Le=z$1.object({question:z$1.string().optional().nullable(),answer:z$1.string().optional().nullable(),references:z$1.array(z$1.string()).optional().nullable()}),R=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),G=z$1.object({positive:z$1.number().optional().nullable(),negative:z$1.number().optional().nullable(),neutral:z$1.number().optional().nullable()}),Q=z$1.object({lat:z$1.number().optional().nullable(),lon:z$1.number().optional().nullable()}),V=z$1.object({country:z$1.string().optional().nullable(),state:z$1.string().optional().nullable(),county:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),coordinates:Q.optional().nullable()}),Y=z$1.object({domain:z$1.string().optional().nullable(),paywall:z$1.boolean().optional().nullable(),location:V.optional().nullable()}),K=z$1.object({name:z$1.string().optional().nullable()}),J=z$1.object({createdAt:z$1.string().optional().nullable(),updatedAt:z$1.string().optional().nullable(),initializedAt:z$1.string().optional().nullable(),id:z$1.string().optional().nullable(),duplicateOf:z$1.string().optional().nullable(),slug:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),summary:z$1.string().optional().nullable(),shortSummary:z$1.string().optional().nullable(),summaryReferences:z$1.array(z$1.string()).optional().nullable(),imageSource:Y.optional().nullable(),imageUrl:z$1.string().optional().nullable(),keyPoints:z$1.array(He).optional().nullable(),questions:z$1.array(Le).optional().nullable(),uniqueSources:z$1.array(z$1.string()).optional().nullable(),selectedArticles:z$1.array(z$1.unknown()).optional().nullable(),sentiment:G.optional().nullable(),uniqueCount:z$1.number().optional().nullable(),reprintCount:z$1.number().optional().nullable(),totalCount:z$1.number().optional().nullable(),countries:z$1.array(R).optional().nullable(),topCountries:z$1.array(z$1.string()).optional().nullable(),topics:z$1.array(R).optional().nullable(),topTopics:z$1.array(K).optional().nullable(),categories:z$1.array(R).optional().nullable(),topCategories:z$1.array(H).optional().nullable(),taxonomies:z$1.array(R).optional().nullable(),topTaxonomies:z$1.array(H).optional().nullable(),people:z$1.array(ze).optional().nullable(),topPeople:z$1.array(B).optional().nullable(),companies:z$1.array(_e).optional().nullable(),topCompanies:z$1.array(W).optional().nullable(),locations:z$1.array(qe).optional().nullable(),topLocations:z$1.array(z).optional().nullable(),highlights:z$1.record(z$1.string(),z$1.array(z$1.string())).optional().nullable()}),je=z$1.object({osmId:z$1.string().optional().nullable(),road:z$1.string().optional().nullable(),quarter:z$1.string().optional().nullable(),suburb:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),town:z$1.string().optional().nullable(),county:z$1.string().optional().nullable(),stateDistrict:z$1.string().optional().nullable(),state:z$1.string().optional().nullable(),postcode:z$1.string().optional().nullable(),country:z$1.string().optional().nullable(),countryCode:z$1.string().optional().nullable(),amenity:z$1.string().optional().nullable(),neighbourhood:z$1.string().optional().nullable(),coordinates:Q.optional().nullable()}),L=z$1.object({url:z$1.string().optional().nullable(),authorsByline:z$1.string().optional().nullable(),articleId:z$1.string().optional().nullable(),clusterId:z$1.string().optional().nullable(),source:Y.optional().nullable(),imageUrl:z$1.string().optional().nullable(),country:z$1.string().optional().nullable(),language:z$1.string().optional().nullable(),pubDate:z$1.string().optional().nullable(),addDate:z$1.string().optional().nullable(),refreshDate:z$1.string().optional().nullable(),score:z$1.number().optional().nullable(),title:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),content:z$1.string().optional().nullable(),medium:z$1.string().optional().nullable(),links:z$1.array(z$1.string()).optional().nullable(),labels:z$1.array(De).optional().nullable(),eventTypes:z$1.array(we).optional().nullable(),matchedAuthors:z$1.array(Ne).optional().nullable(),claim:z$1.string().optional().nullable(),verdict:z$1.string().optional().nullable(),keywords:z$1.array(ke).optional().nullable(),topics:z$1.array(K).optional().nullable(),categories:z$1.array(H).optional().nullable(),taxonomies:z$1.array(Oe).optional().nullable(),entities:z$1.array(Ce).optional().nullable(),companies:z$1.array(W).optional().nullable(),sentiment:G.optional().nullable(),summary:z$1.string().optional().nullable(),shortSummary:z$1.string().optional().nullable(),translation:z$1.string().optional().nullable(),translatedTitle:z$1.string().optional().nullable(),translatedDescription:z$1.string().optional().nullable(),translatedSummary:z$1.string().optional().nullable(),locations:z$1.array(z).optional().nullable(),reprint:z$1.boolean().optional().nullable(),reprintGroupId:z$1.string().optional().nullable(),places:z$1.array(je).optional().nullable(),people:z$1.array(B).optional().nullable(),cluster:J.optional().nullable(),journalists:z$1.array(A).optional().nullable(),highlights:z$1.record(z$1.string(),z$1.array(z$1.string())).optional().nullable()}),M=z$1.object({lat:z$1.number().optional().nullable(),lon:z$1.number().optional().nullable(),radius:z$1.number().optional().nullable()}),Fe=z$1.object({articleId:z$1.array(z$1.string()).optional().nullable(),clusterId:z$1.array(z$1.string()).optional().nullable(),source:z$1.array(z$1.string()).optional().nullable(),excludeSource:z$1.array(z$1.string()).optional().nullable(),sourceGroup:z$1.array(z$1.string()).optional().nullable(),language:z$1.array(z$1.string()).optional().nullable(),excludeLanguage:z$1.array(z$1.string()).optional().nullable(),label:z$1.array(z$1.string()).optional().nullable(),excludeLabel:z$1.array(z$1.string()).optional().nullable(),taxonomy:z$1.array(z$1.string()).optional().nullable(),category:z$1.array(z$1.string()).optional().nullable(),topic:z$1.array(z$1.string()).optional().nullable(),excludeTopic:z$1.array(z$1.string()).optional().nullable(),country:z$1.array(z$1.string()).optional().nullable(),excludeCountry:z$1.array(z$1.string()).optional().nullable(),locationsCountry:z$1.array(z$1.string()).optional().nullable(),excludeLocationsCountry:z$1.array(z$1.string()).optional().nullable(),state:z$1.array(z$1.string()).optional().nullable(),excludeState:z$1.array(z$1.string()).optional().nullable(),county:z$1.array(z$1.string()).optional().nullable(),excludeCounty:z$1.array(z$1.string()).optional().nullable(),city:z$1.array(z$1.string()).optional().nullable(),excludeCity:z$1.array(z$1.string()).optional().nullable(),sourceCountry:z$1.array(z$1.string()).optional().nullable(),sourceState:z$1.array(z$1.string()).optional().nullable(),sourceCounty:z$1.array(z$1.string()).optional().nullable(),sourceCity:z$1.array(z$1.string()).optional().nullable(),coordinates:M.optional().nullable(),sourceCoordinates:M.optional().nullable(),companyId:z$1.array(z$1.string()).optional().nullable(),excludeCompanyId:z$1.array(z$1.string()).optional().nullable(),companyDomain:z$1.array(z$1.string()).optional().nullable(),excludeCompanyDomain:z$1.array(z$1.string()).optional().nullable(),companySymbol:z$1.array(z$1.string()).optional().nullable(),excludeCompanySymbol:z$1.array(z$1.string()).optional().nullable(),companyName:z$1.array(z$1.string()).optional().nullable(),personWikidataId:z$1.array(z$1.string()).optional().nullable(),excludePersonWikidataId:z$1.array(z$1.string()).optional().nullable(),personName:z$1.array(z$1.string()).optional().nullable(),excludePersonName:z$1.array(z$1.string()).optional().nullable(),AND:z$1.array(z$1.unknown()).optional().nullable(),OR:z$1.array(z$1.unknown()).optional().nullable(),NOT:z$1.array(z$1.unknown()).optional().nullable()}),$=z$1.object({prompt:z$1.string(),filter:Fe.optional().nullable(),pubDateFrom:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),pubDateTo:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),showReprints:z$1.boolean().optional().nullable(),size:z$1.number().optional().nullable(),page:z$1.number().optional().nullable()}),Ue=z$1.object({score:z$1.number().optional().nullable(),data:L.optional().nullable()}),X=z$1.object({status:z$1.number(),results:z$1.array(Ue)}),y=z$1.object({classLoaderName:z$1.string().optional(),moduleName:z$1.string().optional(),moduleVersion:z$1.string().optional(),methodName:z$1.string().optional(),fileName:z$1.string().optional(),lineNumber:z$1.number().optional(),nativeMethod:z$1.boolean().optional(),className:z$1.string().optional()}),h=z$1.object({stackTrace:z$1.array(y).optional(),message:z$1.string().optional(),localizedMessage:z$1.string().optional()}),S=z$1.object({stackTrace:z$1.array(y).optional(),message:z$1.string().optional(),localizedMessage:z$1.string().optional()}),Et=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),statusCode:z$1.enum(["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),ve=z$1.object({symbol:z$1.string().optional().nullable(),exchange:z$1.string().optional().nullable(),exchangeShortName:z$1.string().optional().nullable(),ipoDate:z$1.string().optional().nullable()}),Me=z$1.object({careers:z$1.string().optional().nullable(),about:z$1.string().optional().nullable(),blog:z$1.string().optional().nullable(),events:z$1.string().optional().nullable(),sitemap:z$1.string().optional().nullable(),updates:z$1.string().optional().nullable(),linkedin:z$1.string().optional().nullable(),facebook:z$1.string().optional().nullable(),instagram:z$1.string().optional().nullable(),medium:z$1.string().optional().nullable(),reddit:z$1.string().optional().nullable(),threads:z$1.string().optional().nullable(),tiktok:z$1.string().optional().nullable(),x:z$1.string().optional().nullable(),wellfound:z$1.string().optional().nullable(),youtube:z$1.string().optional().nullable(),wikipedia:z$1.string().optional().nullable()}),We=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),updatedAt:z$1.string().optional().nullable(),primaryRecordId:z$1.string().optional().nullable(),altNames:z$1.array(z$1.string()).optional().nullable(),domains:z$1.array(z$1.string()).optional().nullable(),monthlyVisits:z$1.number().optional().nullable(),globalRank:z$1.number().optional().nullable(),description:z$1.string().optional().nullable(),ceo:z$1.string().optional().nullable(),industry:z$1.string().optional().nullable(),sector:z$1.string().optional().nullable(),country:z$1.string().optional().nullable(),fullTimeEmployees:z$1.number().optional().nullable(),address:z$1.string().optional().nullable(),city:z$1.string().optional().nullable(),state:z$1.string().optional().nullable(),zip:z$1.string().optional().nullable(),logo:z$1.string().optional().nullable(),favicon:z$1.string().optional().nullable(),isEtf:z$1.boolean().optional().nullable(),isActivelyTrading:z$1.boolean().optional().nullable(),isFund:z$1.boolean().optional().nullable(),isAdr:z$1.boolean().optional().nullable(),symbols:z$1.array(ve).optional().nullable(),naics:z$1.string().optional().nullable(),sic:z$1.string().optional().nullable(),yearFounded:z$1.number().optional().nullable(),revenue:z$1.string().optional().nullable(),webResources:Me.optional().nullable()}),Z=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(We)}),xt=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),x=z$1.object({url:z$1.string().optional().nullable()}),It=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),ee=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(A)}),At=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),b=z$1.object({time:z$1.string().optional().nullable(),precision:z$1.string().optional().nullable()}),d=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable()}),Be=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable(),startTime:b.optional().nullable(),endTime:b.optional().nullable()}),Ge=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable(),startTime:b.optional().nullable(),endTime:b.optional().nullable(),employer:d.optional().nullable()}),Qe=z$1.object({wikidataId:z$1.string().optional().nullable(),createdAt:z$1.string().optional().nullable(),updatedAt:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),gender:d.optional().nullable(),dateOfBirth:b.optional().nullable(),dateOfDeath:b.optional().nullable(),description:z$1.string().optional().nullable(),aliases:z$1.array(z$1.string()).optional().nullable(),occupation:z$1.array(d).optional().nullable(),position:z$1.array(Ge).optional().nullable(),politicalParty:z$1.array(Be).optional().nullable(),image:x.optional().nullable(),_abstract:z$1.string().optional().nullable()}),te=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(Qe)}),ae=z$1.object({status:z$1.number(),numResults:z$1.number(),articles:z$1.array(L)}),Ve=z$1.object({pageId:z$1.string().optional().nullable(),sectionId:z$1.string().optional().nullable(),wikiPageId:z$1.number().optional().nullable(),wikiRevisionId:z$1.number().optional().nullable(),wikiRevisionTs:z$1.string().optional().nullable(),wikiCode:z$1.string().optional().nullable(),wikiNamespace:z$1.number().optional().nullable(),wikiTitle:z$1.string().optional().nullable(),wikidataId:z$1.string().optional().nullable(),wikidataInstanceOf:z$1.array(d).optional().nullable(),redirectTitles:z$1.array(z$1.string()).optional().nullable(),pageviews:z$1.number().optional().nullable(),title:z$1.string().optional().nullable(),styleLevel:z$1.number().optional().nullable(),content:z$1.string().optional().nullable()}),Ye=z$1.object({score:z$1.number().optional().nullable(),data:Ve.optional().nullable()}),E=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),Ke=z$1.object({id:z$1.string().optional().nullable(),domain:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),primaryRecordId:z$1.string().optional().nullable(),updatedAt:z$1.string().optional().nullable(),altNames:z$1.array(z$1.string()).optional().nullable(),description:z$1.string().optional().nullable(),avgMonthlyPosts:z$1.number().optional().nullable(),paywall:z$1.boolean().optional().nullable(),location:V.optional().nullable(),topCategories:z$1.array(E).optional().nullable(),topTopics:z$1.array(E).optional().nullable(),topCountries:z$1.array(E).optional().nullable(),topLabels:z$1.array(E).optional().nullable(),avgBiasRating:z$1.string().optional().nullable(),adFontesBiasRating:z$1.string().optional().nullable(),allSidesBiasRating:z$1.string().optional().nullable(),mbfcBiasRating:z$1.string().optional().nullable(),monthlyVisits:z$1.number().optional().nullable(),globalRank:z$1.number().optional().nullable(),logoLarge:x.optional().nullable(),logoFavIcon:x.optional().nullable(),logoSquare:x.optional().nullable()}),oe=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(Ke)}),ne=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(J)}),re=z$1.object({prompt:z$1.string().optional().nullable(),maxArticleCount:z$1.number().optional().nullable(),returnedArticleCount:z$1.number().optional().nullable(),summarizeFields:z$1.enum(["TITLE","CONTENT","SUMMARY"]).optional().nullable(),method:z$1.enum(["ARTICLES","CLUSTERS"]).optional().nullable(),model:z$1.enum(["gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","llama-3.3-70b-versatile","deepseek-r1-distill-llama-70b"]).optional().nullable(),temperature:z$1.number().optional().nullable(),topP:z$1.number().optional().nullable(),maxTokens:z$1.number().optional().nullable()}),ie=z$1.object({status:z$1.number(),numResults:z$1.number(),summary:z$1.string(),results:z$1.array(L)}),Pt=z$1.object({cause:h.optional().nullable(),stackTrace:z$1.array(y).optional().nullable(),status:z$1.enum(["100 CONTINUE","101 SWITCHING_PROTOCOLS","102 PROCESSING","103 CHECKPOINT","200 OK","201 CREATED","202 ACCEPTED","203 NON_AUTHORITATIVE_INFORMATION","204 NO_CONTENT","205 RESET_CONTENT","206 PARTIAL_CONTENT","207 MULTI_STATUS","208 ALREADY_REPORTED","226 IM_USED","300 MULTIPLE_CHOICES","301 MOVED_PERMANENTLY","302 FOUND","302 MOVED_TEMPORARILY","303 SEE_OTHER","304 NOT_MODIFIED","305 USE_PROXY","307 TEMPORARY_REDIRECT","308 PERMANENT_REDIRECT","400 BAD_REQUEST","401 UNAUTHORIZED","402 PAYMENT_REQUIRED","403 FORBIDDEN","404 NOT_FOUND","405 METHOD_NOT_ALLOWED","406 NOT_ACCEPTABLE","407 PROXY_AUTHENTICATION_REQUIRED","408 REQUEST_TIMEOUT","409 CONFLICT","410 GONE","411 LENGTH_REQUIRED","412 PRECONDITION_FAILED","413 PAYLOAD_TOO_LARGE","413 REQUEST_ENTITY_TOO_LARGE","414 URI_TOO_LONG","414 REQUEST_URI_TOO_LONG","415 UNSUPPORTED_MEDIA_TYPE","416 REQUESTED_RANGE_NOT_SATISFIABLE","417 EXPECTATION_FAILED","418 I_AM_A_TEAPOT","419 INSUFFICIENT_SPACE_ON_RESOURCE","420 METHOD_FAILURE","421 DESTINATION_LOCKED","422 UNPROCESSABLE_ENTITY","423 LOCKED","424 FAILED_DEPENDENCY","425 TOO_EARLY","426 UPGRADE_REQUIRED","428 PRECONDITION_REQUIRED","429 TOO_MANY_REQUESTS","431 REQUEST_HEADER_FIELDS_TOO_LARGE","451 UNAVAILABLE_FOR_LEGAL_REASONS","500 INTERNAL_SERVER_ERROR","501 NOT_IMPLEMENTED","502 BAD_GATEWAY","503 SERVICE_UNAVAILABLE","504 GATEWAY_TIMEOUT","505 HTTP_VERSION_NOT_SUPPORTED","506 VARIANT_ALSO_NEGOTIATES","507 INSUFFICIENT_STORAGE","508 LOOP_DETECTED","509 BANDWIDTH_LIMIT_EXCEEDED","510 NOT_EXTENDED","511 NETWORK_AUTHENTICATION_REQUIRED"]).optional().nullable(),message:z$1.string().optional().nullable(),suppressed:z$1.array(S).optional().nullable(),localizedMessage:z$1.string().optional().nullable()}),Je=z$1.object({category:z$1.string().optional().nullable(),subcategory:z$1.string().optional().nullable()}),$e=z$1.object({id:z$1.number().optional().nullable(),createdAt:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),updatedAt:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),name:z$1.string().optional().nullable(),labels:Je.optional().nullable()}),le=z$1.object({total:z$1.number(),data:z$1.array($e)}),Xe=z$1.object({id:z$1.string().optional().nullable(),title:z$1.string().optional().nullable(),styleLevel:z$1.number().optional().nullable(),loc:z$1.array(z$1.number()).optional().nullable(),textRaw:z$1.string().optional().nullable(),textRich:z$1.string().optional().nullable()}),Ze=z$1.object({id:z$1.string().optional().nullable(),scrapedAt:z$1.string().optional().nullable(),wikiPageId:z$1.number().optional().nullable(),wikiRevisionId:z$1.number().optional().nullable(),wikiRevisionTs:z$1.string().optional().nullable(),wikiCode:z$1.string().optional().nullable(),wikiNamespace:z$1.number().optional().nullable(),wikiTitle:z$1.string().optional().nullable(),url:z$1.string().optional().nullable(),topImage:z$1.string().optional().nullable(),wikidataId:z$1.string().optional().nullable(),wikidataInstanceOf:z$1.array(d).optional().nullable(),redirectTitles:z$1.array(z$1.string()).optional().nullable(),summary:z$1.string().optional().nullable(),sections:z$1.array(Xe).optional().nullable(),categories:z$1.array(z$1.string()).optional().nullable(),externalLinks:z$1.array(z$1.string()).optional().nullable(),references:z$1.array(z$1.string()).optional().nullable(),pageviews:z$1.number().optional().nullable()}),et=z$1.object({pageId:z$1.array(z$1.string()).optional().nullable(),sectionId:z$1.array(z$1.string()).optional().nullable(),wikiPageId:z$1.array(z$1.number()).optional().nullable(),wikiRevisionId:z$1.array(z$1.number()).optional().nullable(),wikiCode:z$1.array(z$1.string()).optional().nullable(),wikiNamespace:z$1.array(z$1.number()).optional().nullable(),wikidataId:z$1.array(z$1.string()).optional().nullable(),wikidataInstanceOfId:z$1.array(z$1.string()).optional().nullable(),wikidataInstanceOfLabel:z$1.array(z$1.string()).optional().nullable(),AND:z$1.array(z$1.unknown()).optional().nullable(),OR:z$1.array(z$1.unknown()).optional().nullable(),NOT:z$1.array(z$1.unknown()).optional().nullable()}),se=z$1.object({prompt:z$1.string(),filter:et.optional().nullable(),wikiRevisionFrom:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),wikiRevisionTo:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(l=>new Date(l)).optional().nullable(),pageviewsFrom:z$1.number().optional().nullable(),pageviewsTo:z$1.number().optional().nullable(),size:z$1.number().optional().nullable(),page:z$1.number().optional().nullable()}),pe=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(Ze)}),ue=z$1.object({status:z$1.number(),results:z$1.array(Ye)});var tt=z$1.object({id:z$1.string()}),at=z$1.object({...tt.shape}),me=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),desc:z$1.string().optional(),content:z$1.string().optional(),url:z$1.string().optional(),articleId:z$1.array(z$1.string()).optional(),clusterId:z$1.array(z$1.string()).optional(),sortBy:q.optional(),page:z$1.number().optional(),size:z$1.number().optional(),from:z$1.date().optional(),to:z$1.date().optional(),addDateFrom:z$1.date().optional(),addDateTo:z$1.date().optional(),refreshDateFrom:z$1.date().optional(),refreshDateTo:z$1.date().optional(),medium:z$1.array(z$1.string()).optional(),source:z$1.array(z$1.string()).optional(),sourceGroup:z$1.array(z$1.string()).optional(),excludeSourceGroup:z$1.array(z$1.string()).optional(),excludeSource:z$1.array(z$1.string()).optional(),paywall:z$1.boolean().optional(),byline:z$1.array(z$1.string()).optional(),author:z$1.array(z$1.string()).optional(),excludeAuthor:z$1.array(z$1.string()).optional(),journalistId:z$1.array(z$1.string()).optional(),excludeJournalistId:z$1.array(z$1.string()).optional(),language:z$1.array(z$1.string()).optional(),excludeLanguage:z$1.array(z$1.string()).optional(),searchTranslation:z$1.boolean().optional(),label:z$1.array(z$1.string()).optional(),excludeLabel:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),excludeCategory:z$1.array(z$1.string()).optional(),topic:z$1.array(z$1.string()).optional(),excludeTopic:z$1.array(z$1.string()).optional(),linkTo:z$1.string().optional(),showReprints:z$1.boolean().optional(),reprintGroupId:z$1.string().optional(),city:z$1.array(z$1.string()).optional(),excludeCity:z$1.array(z$1.string()).optional(),area:z$1.array(z$1.string()).optional(),state:z$1.array(z$1.string()).optional(),excludeState:z$1.array(z$1.string()).optional(),county:z$1.array(z$1.string()).optional(),excludeCounty:z$1.array(z$1.string()).optional(),locationsCountry:z$1.array(z$1.string()).optional(),country:z$1.array(z$1.string()).optional(),excludeLocationsCountry:z$1.array(z$1.string()).optional(),location:z$1.array(z$1.string()).optional(),lat:z$1.number().optional(),lon:z$1.number().optional(),maxDistance:z$1.number().optional(),sourceCity:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),sourceLat:z$1.number().optional(),sourceLon:z$1.number().optional(),sourceMaxDistance:z$1.number().optional(),personWikidataId:z$1.array(z$1.string()).optional(),excludePersonWikidataId:z$1.array(z$1.string()).optional(),personName:z$1.array(z$1.string()).optional(),excludePersonName:z$1.array(z$1.string()).optional(),companyId:z$1.array(z$1.string()).optional(),excludeCompanyId:z$1.array(z$1.string()).optional(),companyName:z$1.string().optional(),companyDomain:z$1.array(z$1.string()).optional(),excludeCompanyDomain:z$1.array(z$1.string()).optional(),companySymbol:z$1.array(z$1.string()).optional(),excludeCompanySymbol:z$1.array(z$1.string()).optional(),showNumResults:z$1.boolean().optional(),positiveSentimentFrom:z$1.number().optional(),positiveSentimentTo:z$1.number().optional(),neutralSentimentFrom:z$1.number().optional(),neutralSentimentTo:z$1.number().optional(),negativeSentimentFrom:z$1.number().optional(),negativeSentimentTo:z$1.number().optional(),taxonomy:z$1.array(z$1.string()).optional(),prefixTaxonomy:z$1.string().optional(),showHighlighting:z$1.boolean().optional(),highlightFragmentSize:z$1.number().optional(),highlightNumFragments:z$1.number().optional(),highlightPreTag:z$1.string().optional(),highlightPostTag:z$1.string().optional(),highlightQ:z$1.string().optional()}),ot=z$1.object({...me.shape}),ye=z$1.object({id:z$1.array(z$1.string()).optional(),symbol:z$1.array(z$1.string()).optional(),domain:z$1.array(z$1.string()).optional(),country:z$1.array(z$1.string()).optional(),exchange:z$1.array(z$1.string()).optional(),numEmployeesFrom:z$1.number().optional(),numEmployeesTo:z$1.number().optional(),ipoFrom:z$1.date().optional(),ipoTo:z$1.date().optional(),q:z$1.string().optional(),name:z$1.string().optional(),industry:z$1.string().optional(),sector:z$1.string().optional(),size:z$1.number().optional(),page:z$1.number().optional()}),nt=z$1.object({...ye.shape}),be=z$1.object({id:z$1.array(z$1.string()).optional(),q:z$1.string().optional(),name:z$1.string().optional(),twitter:z$1.string().optional(),size:z$1.number().optional(),page:z$1.number().optional(),source:z$1.array(z$1.string()).optional(),topic:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),label:z$1.array(z$1.string()).optional(),minMonthlyPosts:z$1.number().optional(),maxMonthlyPosts:z$1.number().optional(),country:z$1.array(z$1.string()).optional(),updatedAtFrom:z$1.date().optional(),updatedAtTo:z$1.date().optional(),showNumResults:z$1.boolean().optional()}),rt=z$1.object({...be.shape}),ge=z$1.object({name:z$1.string().optional(),wikidataId:z$1.array(z$1.string()).optional(),occupationId:z$1.array(z$1.string()).optional(),occupationLabel:z$1.string().optional(),page:z$1.number().optional(),size:z$1.number().optional()}),it=z$1.object({...ge.shape}),de=z$1.object({domain:z$1.array(z$1.string()).optional(),name:z$1.string().optional(),sourceGroup:z$1.string().optional(),sortBy:I.optional(),page:z$1.number().optional(),size:z$1.number().optional(),minMonthlyVisits:z$1.any().optional(),maxMonthlyVisits:z$1.any().optional(),minMonthlyPosts:z$1.any().optional(),maxMonthlyPosts:z$1.any().optional(),country:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),sourceCity:z$1.array(z$1.string()).optional(),sourceLat:z$1.number().optional(),sourceLon:z$1.number().optional(),sourceMaxDistance:z$1.number().optional(),category:z$1.array(z$1.string()).optional(),topic:z$1.array(z$1.string()).optional(),label:z$1.array(z$1.string()).optional(),paywall:z$1.boolean().optional(),showSubdomains:z$1.boolean().optional(),showNumResults:z$1.boolean().optional()}),lt=z$1.object({...de.shape}),he=z$1.object({q:z$1.string().optional(),name:z$1.string().optional(),clusterId:z$1.array(z$1.string()).optional(),excludeClusterId:z$1.array(z$1.string()).optional(),sortBy:I.optional(),page:z$1.number().optional(),size:z$1.number().optional(),from:z$1.date().optional(),to:z$1.date().optional(),initializedFrom:z$1.date().optional(),initializedTo:z$1.date().optional(),updatedFrom:z$1.date().optional(),updatedTo:z$1.date().optional(),topic:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),taxonomy:z$1.array(z$1.string()).optional(),source:z$1.array(z$1.string()).optional(),sourceGroup:z$1.array(z$1.string()).optional(),minUniqueSources:z$1.number().optional(),personWikidataId:z$1.array(z$1.string()).optional(),personName:z$1.string().optional(),companyId:z$1.array(z$1.string()).optional(),companyName:z$1.string().optional(),companyDomain:z$1.array(z$1.string()).optional(),companySymbol:z$1.array(z$1.string()).optional(),country:z$1.array(z$1.string()).optional(),state:z$1.array(z$1.string()).optional(),city:z$1.array(z$1.string()).optional(),area:z$1.array(z$1.string()).optional(),minClusterSize:z$1.number().optional(),maxClusterSize:z$1.number().optional(),nameExists:z$1.boolean().optional(),positiveSentimentFrom:z$1.number().optional(),positiveSentimentTo:z$1.number().optional(),neutralSentimentFrom:z$1.number().optional(),neutralSentimentTo:z$1.number().optional(),negativeSentimentFrom:z$1.number().optional(),negativeSentimentTo:z$1.number().optional(),showStoryPageInfo:z$1.boolean().optional(),showNumResults:z$1.boolean().optional(),showDuplicates:z$1.boolean().optional(),showHighlighting:z$1.boolean().optional(),highlightFragmentSize:z$1.number().optional(),highlightNumFragments:z$1.number().optional(),highlightPreTag:z$1.string().optional(),highlightPostTag:z$1.string().optional(),highlightQ:z$1.string().optional()}),st=z$1.object({...he.shape}),Se=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),desc:z$1.string().optional(),content:z$1.string().optional(),url:z$1.string().optional(),articleId:z$1.array(z$1.string()).optional(),clusterId:z$1.array(z$1.string()).optional(),sortBy:q.optional(),page:z$1.number().optional(),size:z$1.number().optional(),from:z$1.date().optional(),to:z$1.date().optional(),addDateFrom:z$1.date().optional(),addDateTo:z$1.date().optional(),refreshDateFrom:z$1.date().optional(),refreshDateTo:z$1.date().optional(),medium:z$1.array(z$1.string()).optional(),source:z$1.array(z$1.string()).optional(),sourceGroup:z$1.array(z$1.string()).optional(),excludeSourceGroup:z$1.array(z$1.string()).optional(),excludeSource:z$1.array(z$1.string()).optional(),paywall:z$1.boolean().optional(),byline:z$1.array(z$1.string()).optional(),author:z$1.array(z$1.string()).optional(),excludeAuthor:z$1.array(z$1.string()).optional(),journalistId:z$1.array(z$1.string()).optional(),excludeJournalistId:z$1.array(z$1.string()).optional(),language:z$1.array(z$1.string()).optional(),excludeLanguage:z$1.array(z$1.string()).optional(),searchTranslation:z$1.boolean().optional(),label:z$1.array(z$1.string()).optional(),excludeLabel:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),excludeCategory:z$1.array(z$1.string()).optional(),topic:z$1.array(z$1.string()).optional(),excludeTopic:z$1.array(z$1.string()).optional(),linkTo:z$1.string().optional(),showReprints:z$1.boolean().optional(),reprintGroupId:z$1.string().optional(),city:z$1.array(z$1.string()).optional(),excludeCity:z$1.array(z$1.string()).optional(),area:z$1.array(z$1.string()).optional(),state:z$1.array(z$1.string()).optional(),excludeState:z$1.array(z$1.string()).optional(),county:z$1.array(z$1.string()).optional(),excludeCounty:z$1.array(z$1.string()).optional(),locationsCountry:z$1.array(z$1.string()).optional(),country:z$1.array(z$1.string()).optional(),excludeLocationsCountry:z$1.array(z$1.string()).optional(),location:z$1.array(z$1.string()).optional(),lat:z$1.number().optional(),lon:z$1.number().optional(),maxDistance:z$1.number().optional(),sourceCity:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),sourceLat:z$1.number().optional(),sourceLon:z$1.number().optional(),sourceMaxDistance:z$1.number().optional(),personWikidataId:z$1.array(z$1.string()).optional(),excludePersonWikidataId:z$1.array(z$1.string()).optional(),personName:z$1.array(z$1.string()).optional(),excludePersonName:z$1.array(z$1.string()).optional(),companyId:z$1.array(z$1.string()).optional(),excludeCompanyId:z$1.array(z$1.string()).optional(),companyName:z$1.string().optional(),companyDomain:z$1.array(z$1.string()).optional(),excludeCompanyDomain:z$1.array(z$1.string()).optional(),companySymbol:z$1.array(z$1.string()).optional(),excludeCompanySymbol:z$1.array(z$1.string()).optional(),showNumResults:z$1.boolean().optional(),positiveSentimentFrom:z$1.number().optional(),positiveSentimentTo:z$1.number().optional(),neutralSentimentFrom:z$1.number().optional(),neutralSentimentTo:z$1.number().optional(),negativeSentimentFrom:z$1.number().optional(),negativeSentimentTo:z$1.number().optional(),taxonomy:z$1.array(z$1.string()).optional(),prefixTaxonomy:z$1.string().optional(),showHighlighting:z$1.boolean().optional(),highlightFragmentSize:z$1.number().optional(),highlightNumFragments:z$1.number().optional(),highlightPreTag:z$1.string().optional(),highlightPostTag:z$1.string().optional(),highlightQ:z$1.string().optional()}),pt=z$1.object({summaryBody:re}),ut=z$1.object({...Se.shape,...pt.shape}),Te=z$1.object({name:z$1.string().optional(),category:z$1.string().optional(),subcategory:z$1.string().optional(),page:z$1.number().optional(),size:z$1.number().optional()}),ct=z$1.object({...Te.shape}),fe=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),summary:z$1.string().optional(),text:z$1.string().optional(),reference:z$1.string().optional(),id:z$1.array(z$1.string()).optional(),wikiPageId:z$1.array(z$1.number()).optional(),wikiRevisionId:z$1.array(z$1.number()).optional(),wikiCode:z$1.array(z$1.string()).optional(),wikiNamespace:z$1.array(z$1.number()).optional(),wikidataId:z$1.array(z$1.string()).optional(),wikidataInstanceOfId:z$1.array(z$1.string()).optional(),wikidataInstanceOfLabel:z$1.array(z$1.string()).optional(),category:z$1.array(z$1.string()).optional(),sectionId:z$1.array(z$1.string()).optional(),wikiRevisionFrom:z$1.date().optional(),wikiRevisionTo:z$1.date().optional(),scrapedAtFrom:z$1.date().optional(),scrapedAtTo:z$1.date().optional(),pageviewsFrom:z$1.any().optional(),pageviewsTo:z$1.any().optional(),withPageviews:z$1.boolean().optional(),showNumResults:z$1.boolean().optional(),page:z$1.number().optional(),size:z$1.number().optional(),sortBy:I.optional()}),mt=z$1.object({...fe.shape}),yt=z$1.object({articleSearchParams:$}),bt=z$1.object({...yt.shape}),gt=z$1.object({wikipediaSearchParams:se}),dt=z$1.object({...gt.shape}),ce=class extends T{async getJournalistById(a,o){let n=at.parse(a),i={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,p=await s("apiKeyAuth",[]);p&&(i.Authorization=`Bearer ${p}`);}let c=await(await this.request({path:"/v1/journalists/{id}".replace("{id}",encodeURIComponent(String(n.id))),method:"GET",headers:i},o)).json();return A.parse(c)}async searchArticles(a={},o){let n=ot.parse(a),i=me.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/articles/all",method:"GET",headers:r,query:i},o)).json();return ae.parse(s)}async searchCompanies(a={},o){let n=nt.parse(a),i=ye.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/companies/all",method:"GET",headers:r,query:i},o)).json();return Z.parse(s)}async searchJournalists(a={},o){let n=rt.parse(a),i=be.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/journalists/all",method:"GET",headers:r,query:i},o)).json();return ee.parse(s)}async searchPeople(a={},o){let n=it.parse(a),i=ge.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/people/all",method:"GET",headers:r,query:i},o)).json();return te.parse(s)}async searchSources(a={},o){let n=lt.parse(a),i=de.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/sources/all",method:"GET",headers:r,query:i},o)).json();return oe.parse(s)}async searchStories(a={},o){let n=st.parse(a),i=he.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/stories/all",method:"GET",headers:r,query:i},o)).json();return ne.parse(s)}async searchSummarizer(a,o){let n=ut.parse(a),i=Se.parse(n),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/summarize",method:"POST",headers:r,query:i,body:n.summaryBody},o)).json();return ie.parse(s)}async searchTopics(a={},o){let n=ct.parse(a),i=Te.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/topics/all",method:"GET",headers:r,query:i},o)).json();return le.parse(s)}async searchWikipedia(a={},o){let n=mt.parse(a),i=fe.parse(n),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,u=await p("apiKeyAuth",[]);u&&(r.Authorization=`Bearer ${u}`);}let s=await(await this.request({path:"/v1/wikipedia/all",method:"GET",headers:r,query:i},o)).json();return pe.parse(s)}async vectorSearchArticles(a,o){let n=bt.parse(a),i={};if(i["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,p=await s("apiKeyAuth",[]);p&&(i.Authorization=`Bearer ${p}`);}let c=await(await this.request({path:"/v1/vector/news/all",method:"POST",headers:i,body:n.articleSearchParams},o)).json();return X.parse(c)}async vectorSearchWikipedia(a,o){let n=dt.parse(a),i={};if(i["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,p=await s("apiKeyAuth",[]);p&&(i.Authorization=`Bearer ${p}`);}let c=await(await this.request({path:"/v1/vector/wikipedia/all",method:"POST",headers:i,body:n.wikipediaSearchParams},o)).json();return ue.parse(c)}};
2
+ export{Rt as AllEndpointSortBy,q as AllEndpointSortBySchema,L as ArticleSchema,Fe as ArticleSearchFilterSchema,$ as ArticleSearchParamsSchema,X as ArticlesVectorSearchResultSchema,Et as AuthExceptionSchema,Re as BASE_PATH,C as BadRequestError,T as BaseAPI,ht as COLLECTION_FORMATS,H as CategoryHolderSchema,Oe as CategoryWithScoreHolderSchema,_e as CompanyCountSchema,W as CompanyHolderSchema,We as CompanySchema,Z as CompanySearchResultSchema,P as Configuration,M as CoordinateFilterSchema,Q as CoordinateSchema,Ee as DefaultConfig,Ce as EntityHolderSchema,we as EventTypeHolderSchema,O as FetchError,N as ForbiddenError,tt as GetJournalistByIdPathSchema,at as GetJournalistByIdRequestSchema,m as HttpError,Ne as IdNameHolderSchema,xt as IllegalParameterExceptionSchema,x as ImageHolderSchema,h as InternalErrorExceptionCauseSchema,y as InternalErrorExceptionCauseStackTraceInnerSchema,It as InternalErrorExceptionSchema,S as InternalErrorExceptionSuppressedInnerSchema,A as JournalistSchema,ee as JournalistSearchResultSchema,He as KeyPointSchema,ke as KeywordHolderSchema,De as LabelHolderSchema,qe as LocationCountSchema,z as LocationHolderSchema,g as NameCountSchema,F as NetworkError,J as NewsClusterSchema,k as NotFoundError,At as NotFoundExceptionSchema,te as PeopleSearchResultSchema,ze as PersonCountSchema,B as PersonHolderSchema,Qe as PersonSchema,je as PlaceSchema,ae as QuerySearchResultSchema,Le as QuestionSchema,D as RateLimitError,R as RecordStatHolderSchema,Ue as ScoredDataArticleSchema,Ye as ScoredDataWikiDataSchema,me as SearchArticlesQuerySchema,ot as SearchArticlesRequestSchema,ye as SearchCompaniesQuerySchema,nt as SearchCompaniesRequestSchema,be as SearchJournalistsQuerySchema,rt as SearchJournalistsRequestSchema,ge as SearchPeopleQuerySchema,it as SearchPeopleRequestSchema,de as SearchSourcesQuerySchema,lt as SearchSourcesRequestSchema,he as SearchStoriesQuerySchema,st as SearchStoriesRequestSchema,pt as SearchSummarizerBodySchema,Se as SearchSummarizerQuerySchema,ut as SearchSummarizerRequestSchema,Te as SearchTopicsQuerySchema,ct as SearchTopicsRequestSchema,fe as SearchWikipediaQuerySchema,mt as SearchWikipediaRequestSchema,G as SentimentHolderSchema,_ as ServerError,ft as SortBy,I as SortBySchema,Y as SourceHolderSchema,V as SourceLocationSchema,Ke as SourceSchema,oe as SourceSearchResultSchema,E as SourceTopStatHolderSchema,ne as StorySearchResultSchema,re as SummaryBodySchema,ie as SummarySearchResultSchema,ve as SymbolHolderSchema,Pt as TooManyRequestsExceptionSchema,$e as TopicDtoSchema,K as TopicHolderSchema,Je as TopicLabelsSchema,le as TopicSearchResultSchema,w as UnauthorizedError,ce as V1Api,yt as VectorSearchArticlesBodySchema,bt as VectorSearchArticlesRequestSchema,gt as VectorSearchWikipediaBodySchema,dt as VectorSearchWikipediaRequestSchema,Me as WebResourcesSchema,Ve as WikiDataSchema,Ze as WikiPageSchema,Xe as WikiPageSectionHolderSchema,b as WikidataDateHolderSchema,d as WikidataLabelHolderSchema,Be as WikidataPoliticalPartyHolderSchema,Ge as WikidataPositionHolderSchema,et as WikipediaSearchFilterSchema,se as WikipediaSearchParamsSchema,pe as WikipediaSearchResultSchema,ue as WikipediaVectorSearchResultSchema,xe as createHttpError,St as exists,U as querystring};//# sourceMappingURL=index.js.map
3
3
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goperigon/perigon-ts",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "Typescript client for Perigon API",
5
5
  "author": "Perigon",
6
6
  "repository": {