@goperigon/perigon-ts 4.7.0 → 4.9.0
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 +2 -2
- package/dist/index.d.ts +43 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';var zod=require('zod');var We="https://api.perigon.io".replace(/\/+$/,""),w=class{constructor(o={}){this.configuration=o;}set config(o){this.configuration=o;}get basePath(){return We}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||B}get accessToken(){let o=this.configuration.apiKey;return o?typeof o=="function"?o:async()=>o:void 0}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},Ge=new w,k=class extends Error{constructor(a,i){super(i);this.cause=a;this.name="FetchError";}},m=class extends Error{constructor(o,a){let i=`HTTP ${o.status}: ${o.statusText}`;super(i),this.name="HttpError",this.status=o.status,this.statusText=o.statusText,this.response=o,this.body=a;}},P=class extends m{constructor(o,a){super(o,a),this.name="BadRequestError",this.message=a?.message||"Bad request - please check your input parameters";}},q=class extends m{constructor(o,a){super(o,a),this.name="UnauthorizedError",this.message="Authentication required - please check your credentials";}},C=class extends m{constructor(o,a){super(o,a),this.name="ForbiddenError",this.message="Access denied - insufficient permissions";}},j=class extends m{constructor(o,a){super(o,a),this.name="NotFoundError",this.message=a?.message||"Resource not found";}},A=class extends m{constructor(o,a){super(o,a),this.name="RateLimitError",this.message="Rate limit exceeded - please try again later";let i=o.headers.get("retry-after");i&&(this.retryAfter=parseInt(i,10));}},I=class extends m{constructor(o,a){super(o,a),this.name="ServerError",this.message="Server error - please try again later";}},D=class extends Error{constructor(o){super("Network error - please check your connection"),this.name="NetworkError",this.cause=o;}};function De(u,o){return u.status===400?new P(u,o):u.status===401?new q(u,o):u.status===403?new C(u,o):u.status===404?new j(u,o):u.status===429?new A(u,o):u.status>499?new I(u,o):new m(u,o)}var b=class b{constructor(o=Ge){this.configuration=o;this.fetchApi=async(o,a)=>{let i={url:o,init:a};for(let n of this.middleware)n.pre&&(i=await n.pre({fetch:this.fetchApi,...i})||i);let r;try{r=await(this.configuration.fetchApi||fetch)(i.url,i.init);}catch(n){for(let p of this.middleware)p.onError&&(r=await p.onError({fetch:this.fetchApi,url:i.url,init:i.init,error:n,response:r?r.clone():void 0})||r);if(r===void 0)throw n instanceof Error?new k(n,"The request failed and the interceptors did not return an alternative response"):n}for(let n of this.middleware)n.post&&(r=await n.post({fetch:this.fetchApi,url:i.url,init:i.init,response:r.clone()})||r);return r};this.middleware=o.middleware;}withMiddleware(...o){let a=this.clone();return a.middleware=a.middleware.concat(...o),a}withPreMiddleware(...o){let a=o.map(i=>({pre:i}));return this.withMiddleware(...a)}withPostMiddleware(...o){let a=o.map(i=>({post:i}));return this.withMiddleware(...a)}isJsonMime(o){return o?b.jsonRegex.test(o):false}async request(o,a){let{url:i,init:r}=await this.createFetchParams(o,a),n=await this.fetchApi(i,r);if(n&&n.status>=200&&n.status<300)return n;let p;try{n.headers.get("content-type")?.includes("application/json")&&(p=await n.json());}catch{}throw De(n,p)}async createFetchParams(o,a){let i=this.configuration.basePath+o.path;o.query!==void 0&&Object.keys(o.query).length!==0&&(i+="?"+this.configuration.queryParamsStringify(o.query));let r=Object.assign({},this.configuration.headers,o.headers);Object.keys(r).forEach(G=>r[G]===void 0?delete r[G]:{});let n=typeof a=="function"?a:async()=>a,p={method:o.method,headers:r,body:o.body,credentials:this.configuration.credentials},s={...p,...await n({init:p,context:o})},l;Fe(s.body)||s.body instanceof URLSearchParams||Be(s.body)?l=s.body:this.isJsonMime(r["Content-Type"])?l=JSON.stringify(s.body):l=s.body;let c={...s,body:l};return {url:i,init:c}}clone(){let o=this.constructor,a=new o(this.configuration);return a.middleware=this.middleware.slice(),a}};b.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");var g=b;function Be(u){return typeof Blob<"u"&&u instanceof Blob}function Fe(u){return typeof FormData<"u"&&u instanceof FormData}var eo={csv:",",ssv:" ",tsv:" ",pipes:"|"};function B(u,o=""){return Object.keys(u).map(a=>F(a,u[a],o)).filter(a=>a.length>0).join("&")}function F(u,o,a=""){let i=a+(a.length?`[${u}]`:u);if(o instanceof Array){let r=o.map(n=>encodeURIComponent(String(n))).join(`&${encodeURIComponent(i)}=`);return `${encodeURIComponent(i)}=${r}`}if(o instanceof Set){let r=Array.from(o);return F(u,r,a)}return o instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(o.toISOString())}`:o instanceof Object?B(o,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(o))}`}function to(u,o){let a=u[o];return a!=null}var R=zod.z.enum(["createdAt","updatedAt","relevance","count","totalCount"]),ao={CreatedAt:"createdAt",UpdatedAt:"updatedAt",Relevance:"relevance",Count:"count",TotalCount:"totalCount"},z=zod.z.enum(["relevance","date","reverseDate","reverseAddDate","addDate","pubDate","refreshDate"]),no={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()}),O=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()}),Le=zod.z.object({data:zod.z.string().optional().nullable(),type:zod.z.string().optional().nullable(),mentions:zod.z.number().optional().nullable()}),Ne=zod.z.object({name:zod.z.string().optional().nullable(),type:zod.z.string().optional().nullable()}),Ue=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().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(),area:zod.z.string().optional().nullable()}),h=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),T=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(v).optional().nullable(),updatedAt:zod.z.string().optional().nullable(),topTopics:zod.z.array(h).optional().nullable(),topSources:zod.z.array(h).optional().nullable(),topCategories:zod.z.array(h).optional().nullable(),topLabels:zod.z.array(h).optional().nullable(),topCountries:zod.z.array(h).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()}),Me=zod.z.object({name:zod.z.string().optional().nullable(),weight:zod.z.number().optional().nullable()}),$e=zod.z.object({name:zod.z.string().optional().nullable()}),Ke=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()}),L=zod.z.object({point:zod.z.string().optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable()}),Qe=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(),count:zod.z.number().optional().nullable()}),Ve=zod.z.object({wikidataId:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),N=zod.z.object({wikidataId:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable()}),U=zod.z.object({question:zod.z.string().optional().nullable(),answer:zod.z.string().optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable()}),S=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),M=zod.z.object({positive:zod.z.number().optional().nullable(),negative:zod.z.number().optional().nullable(),neutral:zod.z.number().optional().nullable()}),$=zod.z.object({lat:zod.z.number().optional().nullable(),lon:zod.z.number().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(),coordinates:$.optional().nullable()}),Q=zod.z.object({domain:zod.z.string().optional().nullable(),paywall:zod.z.boolean().optional().nullable(),location:K.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(L).optional().nullable(),questions:zod.z.array(U).optional().nullable(),uniqueSources:zod.z.array(zod.z.string()).optional().nullable(),selectedArticles:zod.z.array(zod.z.unknown()).optional().nullable(),sentiment:M.optional().nullable(),uniqueCount:zod.z.number().optional().nullable(),reprintCount:zod.z.number().optional().nullable(),totalCount:zod.z.number().optional().nullable(),countries:zod.z.array(S).optional().nullable(),topCountries:zod.z.array(zod.z.string()).optional().nullable(),topics:zod.z.array(S).optional().nullable(),topTopics:zod.z.array(V).optional().nullable(),categories:zod.z.array(S).optional().nullable(),topCategories:zod.z.array(H).optional().nullable(),taxonomies:zod.z.array(S).optional().nullable(),topTaxonomies:zod.z.array(H).optional().nullable(),people:zod.z.array(Ve).optional().nullable(),topPeople:zod.z.array(N).optional().nullable(),companies:zod.z.array(Ke).optional().nullable(),topCompanies:zod.z.array(O).optional().nullable(),locations:zod.z.array(Qe).optional().nullable(),topLocations:zod.z.array(v).optional().nullable(),highlights:zod.z.record(zod.z.string(),zod.z.array(zod.z.string())).optional().nullable(),sourceDiversity:zod.z.number().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:$.optional().nullable()}),W=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(),enContentWordCount:zod.z.number().optional().nullable(),medium:zod.z.string().optional().nullable(),links:zod.z.array(zod.z.string()).optional().nullable(),labels:zod.z.array($e).optional().nullable(),eventTypes:zod.z.array(Ne).optional().nullable(),matchedAuthors:zod.z.array(Ue).optional().nullable(),claim:zod.z.string().optional().nullable(),verdict:zod.z.string().optional().nullable(),keywords:zod.z.array(Me).optional().nullable(),topics:zod.z.array(V).optional().nullable(),categories:zod.z.array(H).optional().nullable(),taxonomies:zod.z.array(Oe).optional().nullable(),entities:zod.z.array(Le).optional().nullable(),companies:zod.z.array(O).optional().nullable(),sentiment:M.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(v).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(N).optional().nullable(),cluster:J.optional().nullable(),journalists:zod.z.array(T).optional().nullable(),highlights:zod.z.record(zod.z.string(),zod.z.array(zod.z.string())).optional().nullable()}),E=zod.z.object({lat:zod.z.number().optional().nullable(),lon:zod.z.number().optional().nullable(),radius:zod.z.number().optional().nullable()}),Ye=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:E.optional().nullable(),sourceCoordinates:E.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:Ye.optional().nullable(),pubDateFrom:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),pubDateTo:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),showReprints:zod.z.boolean().optional().nullable(),size:zod.z.number().optional().nullable(),page:zod.z.number().optional().nullable()}),_e=zod.z.object({score:zod.z.number().optional().nullable(),data:W.optional().nullable()}),_=zod.z.object({status:zod.z.number(),results:zod.z.array(_e)}),Xe=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()}),Ze=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()}),et=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(Xe).optional().nullable(),naics:zod.z.string().optional().nullable(),sic:zod.z.string().optional().nullable(),cusip:zod.z.string().optional().nullable(),cik:zod.z.string().optional().nullable(),isin:zod.z.string().optional().nullable(),yearFounded:zod.z.number().optional().nullable(),revenue:zod.z.string().optional().nullable(),webResources:Ze.optional().nullable()}),X=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(et)}),Z=zod.z.object({name:zod.z.string(),displayName:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),domains:zod.z.array(zod.z.string())}),x=zod.z.object({url:zod.z.string().optional().nullable()}),y=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()}),tt=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable(),startTime:y.optional().nullable(),endTime:y.optional().nullable()}),ot=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable(),startTime:y.optional().nullable(),endTime:y.optional().nullable(),employer:d.optional().nullable()}),at=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:y.optional().nullable(),dateOfDeath:y.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(ot).optional().nullable(),politicalParty:zod.z.array(tt).optional().nullable(),image:x.optional().nullable(),_abstract:zod.z.string().optional().nullable()}),ee=zod.z.object({name:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),id:zod.z.string().optional().nullable(),domain:zod.z.string().optional().nullable(),aliases:zod.z.array(zod.z.string()).optional().nullable()}),te=zod.z.object({name:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),aliases:zod.z.array(zod.z.string()).optional().nullable(),wikidataId:zod.z.string().optional().nullable()}),oe=zod.z.object({name:zod.z.string(),displayName:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),people:zod.z.array(te),companies:zod.z.array(ee),visible:zod.z.boolean().optional().nullable()}),ro=zod.z.object({status:zod.z.number().optional().nullable(),message:zod.z.string().optional().nullable(),timestamp:zod.z.number().optional().nullable()}),ae=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(T)}),ne=zod.z.object({name:zod.z.string().optional().nullable(),displayName:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),domains:zod.z.array(zod.z.string()).optional().nullable()}),re=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(at)}),ie=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),articles:zod.z.array(W)}),nt=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()}),rt=zod.z.object({score:zod.z.number().optional().nullable(),data:nt.optional().nullable()}),f=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),it=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:K.optional().nullable(),topCategories:zod.z.array(f).optional().nullable(),topTopics:zod.z.array(f).optional().nullable(),topCountries:zod.z.array(f).optional().nullable(),topLabels:zod.z.array(f).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()}),le=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(it)}),se=zod.z.object({status:zod.z.number().optional().nullable(),results:zod.z.array(zod.z.unknown()).optional().nullable()}),lt=zod.z.object({clusterId:zod.z.string().optional().nullable(),createdAt:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),triggeredAt:zod.z.string().optional().nullable(),summary:zod.z.string().optional().nullable(),shortSummary:zod.z.string().optional().nullable(),changelog:zod.z.string().optional().nullable(),keyPoints:zod.z.array(L).optional().nullable(),questions:zod.z.array(U).optional().nullable()}),pe=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(lt)}),ue=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(J)}),ce=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-5.4-mini","gpt-5.4-nano","gpt-5-mini","gpt-5-nano","gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","llama-3.3-70b-versatile","openai/gpt-oss-120b"]).optional().nullable(),temperature:zod.z.number().optional().nullable(),topP:zod.z.number().optional().nullable(),maxTokens:zod.z.number().optional().nullable()}),me=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),summary:zod.z.string(),results:zod.z.array(W)}),st=zod.z.object({category:zod.z.string().optional().nullable(),subcategory:zod.z.string().optional().nullable()}),pt=zod.z.object({id:zod.z.number().optional().nullable(),createdAt:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),updatedAt:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),name:zod.z.string().optional().nullable(),labels:st.optional().nullable()}),ye=zod.z.object({total:zod.z.number(),data:zod.z.array(pt)}),he=zod.z.object({name:zod.z.string().optional().nullable(),displayName:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),people:zod.z.array(te).optional().nullable(),companies:zod.z.array(ee).optional().nullable(),visible:zod.z.boolean().optional().nullable()}),ut=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()}),ct=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(ut).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()}),mt=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()}),de=zod.z.object({prompt:zod.z.string(),filter:mt.optional().nullable(),wikiRevisionFrom:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),wikiRevisionTo:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).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()}),ge=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(ct)}),be=zod.z.object({status:zod.z.number(),results:zod.z.array(rt)});var ht=zod.z.object({createSourceGroupParams:Z}),dt=zod.z.object({...ht.shape}),gt=zod.z.object({createWatchlistParams:oe}),bt=zod.z.object({...gt.shape}),St=zod.z.object({id:zod.z.number()}),ft=zod.z.object({...St.shape}),xt=zod.z.object({id:zod.z.number()}),Rt=zod.z.object({...xt.shape}),Tt=zod.z.object({id:zod.z.string()}),wt=zod.z.object({...Tt.shape}),kt=zod.z.object({id:zod.z.number()}),Pt=zod.z.object({...kt.shape}),fe=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:R.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(),minSourceDiversity: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(),expandArticles:zod.z.boolean().optional(),splitBy:zod.z.enum(["HOUR","DAY","WEEK","MONTH","NONE"])}),qt=zod.z.object({...fe.shape}),xe=zod.z.object({clusterId:zod.z.array(zod.z.string()).optional(),from:zod.z.date().optional(),to:zod.z.date().optional(),sortBy:zod.z.enum(["createdAt","triggeredAt"]).optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),changelogExists:zod.z.boolean().optional()}),Ct=zod.z.object({...xe.shape}),jt=zod.z.object({id:zod.z.number()}),At=zod.z.object({...jt.shape}),Re=zod.z.object({name:zod.z.string().optional(),domain:zod.z.string().optional(),page:zod.z.string().optional(),size:zod.z.string().optional(),sortBy:zod.z.string(),sortOrder:zod.z.string()}),It=zod.z.object({...Re.shape}),Te=zod.z.object({name:zod.z.string().optional(),page:zod.z.string().optional(),size:zod.z.string().optional(),sortBy:zod.z.string(),sortOrder:zod.z.string()}),Ht=zod.z.object({...Te.shape}),we=zod.z.object({name:zod.z.array(zod.z.string()).optional()}),zt=zod.z.object({...we.shape}),ke=zod.z.object({name:zod.z.array(zod.z.string()).optional()}),vt=zod.z.object({...ke.shape}),Pe=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),desc:zod.z.string().optional(),content:zod.z.string().optional(),summary: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:z.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(),watchlist:zod.z.array(zod.z.string()).optional(),excludeWatchlist: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(),excludeSourceCity:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),excludeSourceCounty:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),excludeSourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),excludeSourceState: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()}),Wt=zod.z.object({...Pe.shape}),qe=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()}),Gt=zod.z.object({...qe.shape}),Ce=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()}),Dt=zod.z.object({...Ce.shape}),je=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()}),Bt=zod.z.object({...je.shape}),Ae=zod.z.object({domain:zod.z.array(zod.z.string()).optional(),name:zod.z.string().optional(),sourceGroup:zod.z.string().optional(),sortBy:R.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),minMonthlyVisits:zod.z.number().optional(),maxMonthlyVisits:zod.z.number().optional(),minMonthlyPosts:zod.z.number().optional(),maxMonthlyPosts:zod.z.number().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()}),Ft=zod.z.object({...Ae.shape}),Ie=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:R.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(),minSourceDiversity: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(),expandArticles:zod.z.boolean().optional()}),Et=zod.z.object({...Ie.shape}),He=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),desc:zod.z.string().optional(),content:zod.z.string().optional(),summary: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:z.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(),watchlist:zod.z.array(zod.z.string()).optional(),excludeWatchlist: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(),excludeSourceCity:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),excludeSourceCounty:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),excludeSourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),excludeSourceState: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({summaryBody:ce}),Lt=zod.z.object({...He.shape,...Ot.shape}),ze=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()}),Nt=zod.z.object({...ze.shape}),ve=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.number().optional(),pageviewsTo:zod.z.number().optional(),withPageviews:zod.z.boolean().optional(),showNumResults:zod.z.boolean().optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),sortBy:zod.z.enum(["relevance","revisionTsDesc","revisionTsAsc","pageViewsDesc","pageViewsAsc","scrapedAtDesc","scrapedAtAsc"]).optional()}),Ut=zod.z.object({...ve.shape}),Mt=zod.z.object({patchSourceGroupParams:ne}),$t=zod.z.object({id:zod.z.number()}),Kt=zod.z.object({...Mt.shape,...$t.shape}),Qt=zod.z.object({updateWatchlistParams:he}),Vt=zod.z.object({id:zod.z.number()}),Jt=zod.z.object({...Qt.shape,...Vt.shape}),Yt=zod.z.object({articleSearchParams:Y}),_t=zod.z.object({...Yt.shape}),Xt=zod.z.object({wikipediaSearchParams:de}),Zt=zod.z.object({...Xt.shape}),Se=class extends g{async createSourceGroup(o,a){let i=dt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/sourceGroups",method:"POST",headers:r,body:i.createSourceGroupParams},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async createWatchlist(o,a){let i=bt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/watchlists",method:"POST",headers:r,body:i.createWatchlistParams},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async deleteSourceGroup(o,a){let i=ft.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"DELETE",headers:r},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async deleteWatchlist(o,a){let i=Rt.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"DELETE",headers:r},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async getJournalistById(o,a){let i=wt.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let p=await(await this.request({path:"/v1/journalists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:r},a)).json();return T.parse(p)}async getSourceGroup(o,a){let i=Pt.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:r},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async getStoryCounts(o,a){let i=qt.parse(o),r=fe.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/stories/stats",method:"GET",headers:n,query:r},a)).json();return se.parse(s)}async getStoryHistory(o={},a){let i=Ct.parse(o),r=xe.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/stories/history",method:"GET",headers:n,query:r},a)).json();return pe.parse(s)}async getWatchlist(o,a){let i=At.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:r},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async listSourceGroups(o,a){let i=It.parse(o),r=Re.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let p=await this.request({path:"/v1/api/sourceGroups",method:"GET",headers:n,query:r},a),s=p.headers.get("content-type");if(s&&s.includes("application/json"))return await p.json()}async listWatchlists(o,a){let i=Ht.parse(o),r=Te.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let p=await this.request({path:"/v1/api/watchlists",method:"GET",headers:n,query:r},a),s=p.headers.get("content-type");if(s&&s.includes("application/json"))return await p.json()}async resolveSourceGroups(o={},a){let i=zt.parse(o),r=we.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let p=await this.request({path:"/v1/api/sourceGroups/resolve",method:"GET",headers:n,query:r},a),s=p.headers.get("content-type");if(s&&s.includes("application/json"))return await p.json()}async resolveWatchlists(o={},a){let i=vt.parse(o),r=ke.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let p=await this.request({path:"/v1/api/watchlists/resolve",method:"GET",headers:n,query:r},a),s=p.headers.get("content-type");if(s&&s.includes("application/json"))return await p.json()}async searchArticles(o={},a){let i=Wt.parse(o),r=Pe.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/articles/all",method:"GET",headers:n,query:r},a)).json();return ie.parse(s)}async searchCompanies(o={},a){let i=Gt.parse(o),r=qe.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/companies/all",method:"GET",headers:n,query:r},a)).json();return X.parse(s)}async searchJournalists(o={},a){let i=Dt.parse(o),r=Ce.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/journalists/all",method:"GET",headers:n,query:r},a)).json();return ae.parse(s)}async searchPeople(o={},a){let i=Bt.parse(o),r=je.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/people/all",method:"GET",headers:n,query:r},a)).json();return re.parse(s)}async searchSources(o={},a){let i=Ft.parse(o),r=Ae.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/sources/all",method:"GET",headers:n,query:r},a)).json();return le.parse(s)}async searchStories(o={},a){let i=Et.parse(o),r=Ie.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/stories/all",method:"GET",headers:n,query:r},a)).json();return ue.parse(s)}async searchSummarizer(o,a){let i=Lt.parse(o),r=He.parse(i),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/summarize",method:"POST",headers:n,query:r,body:i.summaryBody},a)).json();return me.parse(s)}async searchTopics(o={},a){let i=Nt.parse(o),r=ze.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/topics/all",method:"GET",headers:n,query:r},a)).json();return ye.parse(s)}async searchWikipedia(o={},a){let i=Ut.parse(o),r=ve.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/wikipedia/all",method:"GET",headers:n,query:r},a)).json();return ge.parse(s)}async updateSourceGroup(o,a){let i=Kt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"PATCH",headers:r,body:i.patchSourceGroupParams},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async updateWatchlist(o,a){let i=Jt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"PATCH",headers:r,body:i.updateWatchlistParams},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async vectorSearchArticles(o,a){let i=_t.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let p=await(await this.request({path:"/v1/vector/news/all",method:"POST",headers:r,body:i.articleSearchParams},a)).json();return _.parse(p)}async vectorSearchWikipedia(o,a){let i=Zt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let p=await(await this.request({path:"/v1/vector/wikipedia/all",method:"POST",headers:r,body:i.wikipediaSearchParams},a)).json();return be.parse(p)}},so={Hour:"HOUR",Day:"DAY",Week:"WEEK",Month:"MONTH",None:"NONE"},po={CreatedAt:"createdAt",TriggeredAt:"triggeredAt"},uo={Relevance:"relevance",RevisionTsDesc:"revisionTsDesc",RevisionTsAsc:"revisionTsAsc",PageViewsDesc:"pageViewsDesc",PageViewsAsc:"pageViewsAsc",ScrapedAtDesc:"scrapedAtDesc",ScrapedAtAsc:"scrapedAtAsc"};
|
|
2
|
-
exports.AllEndpointSortBy=
|
|
1
|
+
'use strict';var zod=require('zod');var $e="https://api.perigon.io".replace(/\/+$/,""),v=class{constructor(o={}){this.configuration=o;}set config(o){this.configuration=o;}get basePath(){return $e}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||$}get accessToken(){let o=this.configuration.apiKey;return o?typeof o=="function"?o:async()=>o:void 0}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},Ke=new v,j=class extends Error{constructor(a,i){super(i);this.cause=a;this.name="FetchError";}},y=class extends Error{constructor(o,a){let i=`HTTP ${o.status}: ${o.statusText}`;super(i),this.name="HttpError",this.status=o.status,this.statusText=o.statusText,this.response=o,this.body=a;}},I=class extends y{constructor(o,a){super(o,a),this.name="BadRequestError",this.message=a?.message||"Bad request - please check your input parameters";}},z=class extends y{constructor(o,a){super(o,a),this.name="UnauthorizedError",this.message="Authentication required - please check your credentials";}},W=class extends y{constructor(o,a){super(o,a),this.name="ForbiddenError",this.message="Access denied - insufficient permissions";}},E=class extends y{constructor(o,a){super(o,a),this.name="NotFoundError",this.message=a?.message||"Resource not found";}},D=class extends y{constructor(o,a){super(o,a),this.name="RateLimitError",this.message="Rate limit exceeded - please try again later";let i=o.headers.get("retry-after");i&&(this.retryAfter=parseInt(i,10));}},G=class extends y{constructor(o,a){super(o,a),this.name="ServerError",this.message="Server error - please try again later";}},U=class extends Error{constructor(o){super("Network error - please check your connection"),this.name="NetworkError",this.cause=o;}};function Qe(u,o){return u.status===400?new I(u,o):u.status===401?new z(u,o):u.status===403?new W(u,o):u.status===404?new E(u,o):u.status===429?new D(u,o):u.status>499?new G(u,o):new y(u,o)}var f=class f{constructor(o=Ke){this.configuration=o;this.fetchApi=async(o,a)=>{let i={url:o,init:a};for(let r of this.middleware)r.pre&&(i=await r.pre({fetch:this.fetchApi,...i})||i);let n;try{n=await(this.configuration.fetchApi||fetch)(i.url,i.init);}catch(r){for(let s of this.middleware)s.onError&&(n=await s.onError({fetch:this.fetchApi,url:i.url,init:i.init,error:r,response:n?n.clone():void 0})||n);if(n===void 0)throw r instanceof Error?new j(r,"The request failed and the interceptors did not return an alternative response"):r}for(let r of this.middleware)r.post&&(n=await r.post({fetch:this.fetchApi,url:i.url,init:i.init,response:n.clone()})||n);return n};this.middleware=o.middleware;}withMiddleware(...o){let a=this.clone();return a.middleware=a.middleware.concat(...o),a}withPreMiddleware(...o){let a=o.map(i=>({pre:i}));return this.withMiddleware(...a)}withPostMiddleware(...o){let a=o.map(i=>({post:i}));return this.withMiddleware(...a)}isJsonMime(o){return o?f.jsonRegex.test(o):false}async request(o,a){let{url:i,init:n}=await this.createFetchParams(o,a),r=await this.fetchApi(i,n);if(r&&r.status>=200&&r.status<300)return r;let s;try{r.headers.get("content-type")?.includes("application/json")&&(s=await r.json());}catch{}throw Qe(r,s)}async createFetchParams(o,a){let i=this.configuration.basePath+o.path;o.query!==void 0&&Object.keys(o.query).length!==0&&(i+="?"+this.configuration.queryParamsStringify(o.query));let n=Object.assign({},this.configuration.headers,o.headers);Object.keys(n).forEach(M=>n[M]===void 0?delete n[M]:{});let r=typeof a=="function"?a:async()=>a,s={method:o.method,headers:n,body:o.body,credentials:this.configuration.credentials},l={...s,...await r({init:s,context:o})},p;Je(l.body)||l.body instanceof URLSearchParams||Ve(l.body)?p=l.body:this.isJsonMime(n["Content-Type"])?p=JSON.stringify(l.body):p=l.body;let c={...l,body:p};return {url:i,init:c}}clone(){let o=this.constructor,a=new o(this.configuration);return a.middleware=this.middleware.slice(),a}};f.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");var S=f;function Ve(u){return typeof Blob<"u"&&u instanceof Blob}function Je(u){return typeof FormData<"u"&&u instanceof FormData}var yo={csv:",",ssv:" ",tsv:" ",pipes:"|"};function $(u,o=""){return Object.keys(u).map(a=>K(a,u[a],o)).filter(a=>a.length>0).join("&")}function K(u,o,a=""){let i=a+(a.length?`[${u}]`:u);if(o instanceof Array){let n=o.map(r=>encodeURIComponent(String(r))).join(`&${encodeURIComponent(i)}=`);return `${encodeURIComponent(i)}=${n}`}if(o instanceof Set){let n=Array.from(o);return K(u,n,a)}return o instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(o.toISOString())}`:o instanceof Object?$(o,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(o))}`}function ho(u,o){let a=u[o];return a!=null}var T=zod.z.enum(["createdAt","updatedAt","relevance","count","totalCount"]),bo={CreatedAt:"createdAt",UpdatedAt:"updatedAt",Relevance:"relevance",Count:"count",TotalCount:"totalCount"},F=zod.z.enum(["relevance","date","reverseDate","reverseAddDate","addDate","pubDate","refreshDate"]),So={Relevance:"relevance",Date:"date",ReverseDate:"reverseDate",ReverseAddDate:"reverseAddDate",AddDate:"addDate",PubDate:"pubDate",RefreshDate:"refreshDate"},B=zod.z.object({name:zod.z.string().optional().nullable()}),Ye=zod.z.object({name:zod.z.string().optional().nullable(),score:zod.z.number().optional().nullable()}),V=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()}),Xe=zod.z.object({data:zod.z.string().optional().nullable(),type:zod.z.string().optional().nullable(),mentions:zod.z.number().optional().nullable()}),Ze=zod.z.object({name:zod.z.string().optional().nullable(),type:zod.z.string().optional().nullable()}),et=zod.z.object({id:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable()}),O=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()}),P=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(O).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()}),tt=zod.z.object({name:zod.z.string().optional().nullable(),weight:zod.z.number().optional().nullable()}),ot=zod.z.object({name:zod.z.string().optional().nullable()}),at=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()}),J=zod.z.object({point:zod.z.string().optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable()}),nt=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(),count:zod.z.number().optional().nullable()}),rt=zod.z.object({wikidataId:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),_=zod.z.object({wikidataId:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable()}),Y=zod.z.object({question:zod.z.string().optional().nullable(),answer:zod.z.string().optional().nullable(),references:zod.z.array(zod.z.string()).optional().nullable()}),x=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),X=zod.z.object({positive:zod.z.number().optional().nullable(),negative:zod.z.number().optional().nullable(),neutral:zod.z.number().optional().nullable()}),Z=zod.z.object({lat:zod.z.number().optional().nullable(),lon:zod.z.number().optional().nullable()}),ee=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:Z.optional().nullable()}),te=zod.z.object({domain:zod.z.string().optional().nullable(),paywall:zod.z.boolean().optional().nullable(),location:ee.optional().nullable()}),oe=zod.z.object({name:zod.z.string().optional().nullable()}),ae=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:te.optional().nullable(),imageUrl:zod.z.string().optional().nullable(),keyPoints:zod.z.array(J).optional().nullable(),questions:zod.z.array(Y).optional().nullable(),uniqueSources:zod.z.array(zod.z.string()).optional().nullable(),selectedArticles:zod.z.array(zod.z.unknown()).optional().nullable(),sentiment:X.optional().nullable(),uniqueCount:zod.z.number().optional().nullable(),reprintCount:zod.z.number().optional().nullable(),totalCount:zod.z.number().optional().nullable(),countries:zod.z.array(x).optional().nullable(),topCountries:zod.z.array(zod.z.string()).optional().nullable(),topics:zod.z.array(x).optional().nullable(),topTopics:zod.z.array(oe).optional().nullable(),categories:zod.z.array(x).optional().nullable(),topCategories:zod.z.array(B).optional().nullable(),taxonomies:zod.z.array(x).optional().nullable(),topTaxonomies:zod.z.array(B).optional().nullable(),people:zod.z.array(rt).optional().nullable(),topPeople:zod.z.array(_).optional().nullable(),companies:zod.z.array(at).optional().nullable(),topCompanies:zod.z.array(V).optional().nullable(),locations:zod.z.array(nt).optional().nullable(),topLocations:zod.z.array(O).optional().nullable(),highlights:zod.z.record(zod.z.string(),zod.z.array(zod.z.string())).optional().nullable(),sourceDiversity:zod.z.number().optional().nullable()}),it=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:Z.optional().nullable()}),N=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:te.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(),enContentWordCount:zod.z.number().optional().nullable(),medium:zod.z.string().optional().nullable(),links:zod.z.array(zod.z.string()).optional().nullable(),labels:zod.z.array(ot).optional().nullable(),eventTypes:zod.z.array(Ze).optional().nullable(),matchedAuthors:zod.z.array(et).optional().nullable(),claim:zod.z.string().optional().nullable(),verdict:zod.z.string().optional().nullable(),keywords:zod.z.array(tt).optional().nullable(),topics:zod.z.array(oe).optional().nullable(),categories:zod.z.array(B).optional().nullable(),taxonomies:zod.z.array(Ye).optional().nullable(),entities:zod.z.array(Xe).optional().nullable(),companies:zod.z.array(V).optional().nullable(),sentiment:X.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(O).optional().nullable(),reprint:zod.z.boolean().optional().nullable(),reprintGroupId:zod.z.string().optional().nullable(),places:zod.z.array(it).optional().nullable(),people:zod.z.array(_).optional().nullable(),cluster:ae.optional().nullable(),journalists:zod.z.array(P).optional().nullable(),highlights:zod.z.record(zod.z.string(),zod.z.array(zod.z.string())).optional().nullable()}),Q=zod.z.object({lat:zod.z.number().optional().nullable(),lon:zod.z.number().optional().nullable(),radius:zod.z.number().optional().nullable()}),lt=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:Q.optional().nullable(),sourceCoordinates:Q.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()}),ne=zod.z.object({prompt:zod.z.string(),filter:lt.optional().nullable(),pubDateFrom:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),pubDateTo:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),showReprints:zod.z.boolean().optional().nullable(),size:zod.z.number().optional().nullable(),page:zod.z.number().optional().nullable()}),st=zod.z.object({score:zod.z.number().optional().nullable(),data:N.optional().nullable()}),re=zod.z.object({status:zod.z.number(),results:zod.z.array(st)}),pt=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()}),ut=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()}),ct=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(pt).optional().nullable(),naics:zod.z.string().optional().nullable(),sic:zod.z.string().optional().nullable(),cusip:zod.z.string().optional().nullable(),cik:zod.z.string().optional().nullable(),isin:zod.z.string().optional().nullable(),yearFounded:zod.z.number().optional().nullable(),revenue:zod.z.string().optional().nullable(),webResources:ut.optional().nullable()}),ie=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(ct)}),le=zod.z.object({name:zod.z.string(),displayName:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),domains:zod.z.array(zod.z.string())}),R=zod.z.object({url:zod.z.string().optional().nullable()}),d=zod.z.object({time:zod.z.string().optional().nullable(),precision:zod.z.string().optional().nullable()}),b=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable()}),mt=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable(),startTime:d.optional().nullable(),endTime:d.optional().nullable()}),yt=zod.z.object({wikidataId:zod.z.string().optional().nullable(),label:zod.z.string().optional().nullable(),startTime:d.optional().nullable(),endTime:d.optional().nullable(),employer:b.optional().nullable()}),ht=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:b.optional().nullable(),dateOfBirth:d.optional().nullable(),dateOfDeath:d.optional().nullable(),description:zod.z.string().optional().nullable(),aliases:zod.z.array(zod.z.string()).optional().nullable(),occupation:zod.z.array(b).optional().nullable(),position:zod.z.array(yt).optional().nullable(),politicalParty:zod.z.array(mt).optional().nullable(),image:R.optional().nullable(),_abstract:zod.z.string().optional().nullable()}),se=zod.z.object({name:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),id:zod.z.string().optional().nullable(),domain:zod.z.string().optional().nullable(),aliases:zod.z.array(zod.z.string()).optional().nullable()}),pe=zod.z.object({name:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),aliases:zod.z.array(zod.z.string()).optional().nullable(),wikidataId:zod.z.string().optional().nullable()}),ue=zod.z.object({name:zod.z.string(),displayName:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),people:zod.z.array(pe),companies:zod.z.array(se),visible:zod.z.boolean().optional().nullable()}),fo=zod.z.object({status:zod.z.number().optional().nullable(),message:zod.z.string().optional().nullable(),timestamp:zod.z.number().optional().nullable()}),ce=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(P)}),me=zod.z.object({name:zod.z.string().optional().nullable(),displayName:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),domains:zod.z.array(zod.z.string()).optional().nullable()}),ye=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(ht)}),he=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),articles:zod.z.array(N)}),dt=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(b).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()}),gt=zod.z.object({score:zod.z.number().optional().nullable(),data:dt.optional().nullable()}),w=zod.z.object({name:zod.z.string().optional().nullable(),count:zod.z.number().optional().nullable()}),bt=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:ee.optional().nullable(),topCategories:zod.z.array(w).optional().nullable(),topTopics:zod.z.array(w).optional().nullable(),topCountries:zod.z.array(w).optional().nullable(),topLabels:zod.z.array(w).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:R.optional().nullable(),logoFavIcon:R.optional().nullable(),logoSquare:R.optional().nullable()}),de=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(bt)}),ge=zod.z.object({status:zod.z.number().optional().nullable(),results:zod.z.array(zod.z.unknown()).optional().nullable()}),St=zod.z.object({clusterId:zod.z.string().optional().nullable(),createdAt:zod.z.string().optional().nullable(),name:zod.z.string().optional().nullable(),triggeredAt:zod.z.string().optional().nullable(),summary:zod.z.string().optional().nullable(),shortSummary:zod.z.string().optional().nullable(),changelog:zod.z.string().optional().nullable(),keyPoints:zod.z.array(J).optional().nullable(),questions:zod.z.array(Y).optional().nullable()}),be=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(St)}),Se=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),results:zod.z.array(ae)}),fe=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-5.4-mini","gpt-5.4-nano","gpt-5-mini","gpt-5-nano","gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","llama-3.3-70b-versatile","openai/gpt-oss-120b"]).optional().nullable(),temperature:zod.z.number().optional().nullable(),topP:zod.z.number().optional().nullable(),maxTokens:zod.z.number().optional().nullable()}),xe=zod.z.object({status:zod.z.number(),numResults:zod.z.number(),summary:zod.z.string(),results:zod.z.array(N)}),ft=zod.z.object({category:zod.z.string().optional().nullable(),subcategory:zod.z.string().optional().nullable()}),xt=zod.z.object({id:zod.z.number().optional().nullable(),createdAt:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),updatedAt:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),name:zod.z.string().optional().nullable(),labels:ft.optional().nullable()}),we=zod.z.object({total:zod.z.number(),data:zod.z.array(xt)}),Re=zod.z.object({name:zod.z.string().optional().nullable(),displayName:zod.z.string().optional().nullable(),description:zod.z.string().optional().nullable(),people:zod.z.array(pe).optional().nullable(),companies:zod.z.array(se).optional().nullable(),visible:zod.z.boolean().optional().nullable()}),wt=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()}),Rt=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(b).optional().nullable(),redirectTitles:zod.z.array(zod.z.string()).optional().nullable(),summary:zod.z.string().optional().nullable(),sections:zod.z.array(wt).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()}),Tt=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()}),Te=zod.z.object({prompt:zod.z.string(),filter:Tt.optional().nullable(),wikiRevisionFrom:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),wikiRevisionTo:zod.z.union([zod.z.string().date(),zod.z.string().datetime()]).transform(u=>new Date(u)).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(Rt)}),ke=zod.z.object({status:zod.z.number(),results:zod.z.array(gt)});var kt=zod.z.object({createSourceGroupParams:le}),qt=zod.z.object({...kt.shape}),Ct=zod.z.object({createWatchlistParams:ue}),At=zod.z.object({...Ct.shape}),Ht=zod.z.object({id:zod.z.number()}),vt=zod.z.object({...Ht.shape}),jt=zod.z.object({id:zod.z.number()}),It=zod.z.object({...jt.shape}),zt=zod.z.object({id:zod.z.string()}),Wt=zod.z.object({...zt.shape}),Et=zod.z.object({id:zod.z.number()}),Dt=zod.z.object({...Et.shape}),Ce=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:T.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(),minSourceDiversity: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(),expandArticles:zod.z.boolean().optional(),splitBy:zod.z.enum(["HOUR","DAY","WEEK","MONTH","NONE"])}),Gt=zod.z.object({...Ce.shape}),Ae=zod.z.object({clusterId:zod.z.array(zod.z.string()).optional(),from:zod.z.date().optional(),to:zod.z.date().optional(),sortBy:zod.z.enum(["createdAt","triggeredAt"]).optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),changelogExists:zod.z.boolean().optional()}),Bt=zod.z.object({...Ae.shape}),Ft=zod.z.object({id:zod.z.number()}),Ot=zod.z.object({...Ft.shape}),He=zod.z.object({name:zod.z.string().optional(),domain:zod.z.string().optional(),page:zod.z.string().optional(),size:zod.z.string().optional(),sortBy:zod.z.string(),sortOrder:zod.z.string()}),Nt=zod.z.object({...He.shape}),ve=zod.z.object({name:zod.z.string().optional(),page:zod.z.string().optional(),size:zod.z.string().optional(),sortBy:zod.z.string(),sortOrder:zod.z.string()}),Lt=zod.z.object({...ve.shape}),je=zod.z.object({name:zod.z.array(zod.z.string()).optional()}),Mt=zod.z.object({...je.shape}),Ie=zod.z.object({name:zod.z.array(zod.z.string()).optional()}),Ut=zod.z.object({...Ie.shape}),ze=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),desc:zod.z.string().optional(),content:zod.z.string().optional(),summary: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:F.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(),watchlist:zod.z.array(zod.z.string()).optional(),excludeWatchlist: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(),excludeSourceCity:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),excludeSourceCounty:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),excludeSourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),excludeSourceState: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()}),$t=zod.z.object({...ze.shape}),We=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()}),Kt=zod.z.object({...We.shape}),Ee=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()}),Qt=zod.z.object({...Ee.shape}),De=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()}),Vt=zod.z.object({...De.shape}),Ge=zod.z.object({domain:zod.z.array(zod.z.string()).optional(),name:zod.z.string().optional(),sourceGroup:zod.z.string().optional(),sortBy:T.optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),minMonthlyVisits:zod.z.number().optional(),maxMonthlyVisits:zod.z.number().optional(),minMonthlyPosts:zod.z.number().optional(),maxMonthlyPosts:zod.z.number().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()}),Jt=zod.z.object({...Ge.shape}),Be=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:T.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(),minSourceDiversity: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(),expandArticles:zod.z.boolean().optional()}),_t=zod.z.object({...Be.shape}),Fe=zod.z.object({q:zod.z.string().optional(),title:zod.z.string().optional(),desc:zod.z.string().optional(),content:zod.z.string().optional(),summary: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:F.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(),watchlist:zod.z.array(zod.z.string()).optional(),excludeWatchlist: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(),excludeSourceCity:zod.z.array(zod.z.string()).optional(),sourceCounty:zod.z.array(zod.z.string()).optional(),excludeSourceCounty:zod.z.array(zod.z.string()).optional(),sourceCountry:zod.z.array(zod.z.string()).optional(),excludeSourceCountry:zod.z.array(zod.z.string()).optional(),sourceState:zod.z.array(zod.z.string()).optional(),excludeSourceState: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()}),Yt=zod.z.object({summaryBody:fe}),Xt=zod.z.object({...Fe.shape,...Yt.shape}),Oe=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()}),Zt=zod.z.object({...Oe.shape}),Ne=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.number().optional(),pageviewsTo:zod.z.number().optional(),withPageviews:zod.z.boolean().optional(),showNumResults:zod.z.boolean().optional(),page:zod.z.number().optional(),size:zod.z.number().optional(),sortBy:zod.z.enum(["relevance","revisionTsDesc","revisionTsAsc","pageViewsDesc","pageViewsAsc","scrapedAtDesc","scrapedAtAsc"]).optional()}),eo=zod.z.object({...Ne.shape}),to=zod.z.object({patchSourceGroupParams:me}),oo=zod.z.object({id:zod.z.number()}),ao=zod.z.object({...to.shape,...oo.shape}),no=zod.z.object({updateWatchlistParams:Re}),ro=zod.z.object({id:zod.z.number()}),io=zod.z.object({...no.shape,...ro.shape}),lo=zod.z.object({articleSearchParams:ne}),so=zod.z.object({...lo.shape}),po=zod.z.object({wikipediaSearchParams:Te}),uo=zod.z.object({...po.shape}),qe=class extends S{async createSourceGroup(o,a){let i=qt.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/sourceGroups",method:"POST",headers:n,body:i.createSourceGroupParams},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async createWatchlist(o,a){let i=At.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/watchlists",method:"POST",headers:n,body:i.createWatchlistParams},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async deleteSourceGroup(o,a){let i=vt.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"DELETE",headers:n},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async deleteWatchlist(o,a){let i=It.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"DELETE",headers:n},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async getJournalistById(o,a){let i=Wt.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let s=await(await this.request({path:"/v1/journalists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:n},a)).json();return P.parse(s)}async getSourceGroup(o,a){let i=Dt.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:n},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async getStoryCounts(o,a){let i=Gt.parse(o),n=Ce.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/stories/stats",method:"GET",headers:r,query:n},a)).json();return ge.parse(l)}async getStoryHistory(o={},a){let i=Bt.parse(o),n=Ae.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/stories/history",method:"GET",headers:r,query:n},a)).json();return be.parse(l)}async getWatchlist(o,a){let i=Ot.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:n},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async listSourceGroups(o,a){let i=Nt.parse(o),n=He.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let s=await this.request({path:"/v1/api/sourceGroups",method:"GET",headers:r,query:n},a),l=s.headers.get("content-type");if(l&&l.includes("application/json"))return await s.json()}async listWatchlists(o,a){let i=Lt.parse(o),n=ve.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let s=await this.request({path:"/v1/api/watchlists",method:"GET",headers:r,query:n},a),l=s.headers.get("content-type");if(l&&l.includes("application/json"))return await s.json()}async resolveSourceGroups(o={},a){let i=Mt.parse(o),n=je.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let s=await this.request({path:"/v1/api/sourceGroups/resolve",method:"GET",headers:r,query:n},a),l=s.headers.get("content-type");if(l&&l.includes("application/json"))return await s.json()}async resolveWatchlists(o={},a){let i=Ut.parse(o),n=Ie.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let s=await this.request({path:"/v1/api/watchlists/resolve",method:"GET",headers:r,query:n},a),l=s.headers.get("content-type");if(l&&l.includes("application/json"))return await s.json()}async searchArticles(o={},a){let i=$t.parse(o),n=ze.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/articles/all",method:"GET",headers:r,query:n},a)).json();return he.parse(l)}async searchCompanies(o={},a){let i=Kt.parse(o),n=We.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/companies/all",method:"GET",headers:r,query:n},a)).json();return ie.parse(l)}async searchJournalists(o={},a){let i=Qt.parse(o),n=Ee.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/journalists/all",method:"GET",headers:r,query:n},a)).json();return ce.parse(l)}async searchPeople(o={},a){let i=Vt.parse(o),n=De.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/people/all",method:"GET",headers:r,query:n},a)).json();return ye.parse(l)}async searchSources(o={},a){let i=Jt.parse(o),n=Ge.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/sources/all",method:"GET",headers:r,query:n},a)).json();return de.parse(l)}async searchStories(o={},a){let i=_t.parse(o),n=Be.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/stories/all",method:"GET",headers:r,query:n},a)).json();return Se.parse(l)}async searchSummarizer(o,a){let i=Xt.parse(o),n=Fe.parse(i),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/summarize",method:"POST",headers:r,query:n,body:i.summaryBody},a)).json();return xe.parse(l)}async searchTopics(o={},a){let i=Zt.parse(o),n=Oe.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/topics/all",method:"GET",headers:r,query:n},a)).json();return we.parse(l)}async searchWikipedia(o={},a){let i=eo.parse(o),n=Ne.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/wikipedia/all",method:"GET",headers:r,query:n},a)).json();return Pe.parse(l)}async updateSourceGroup(o,a){let i=ao.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"PATCH",headers:n,body:i.patchSourceGroupParams},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async updateWatchlist(o,a){let i=io.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"PATCH",headers:n,body:i.updateWatchlistParams},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async vectorSearchArticles(o,a){let i=so.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let s=await(await this.request({path:"/v1/vector/news/all",method:"POST",headers:n,body:i.articleSearchParams},a)).json();return re.parse(s)}async vectorSearchWikipedia(o,a){let i=uo.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let s=await(await this.request({path:"/v1/vector/wikipedia/all",method:"POST",headers:n,body:i.wikipediaSearchParams},a)).json();return ke.parse(s)}},Ro={Hour:"HOUR",Day:"DAY",Week:"WEEK",Month:"MONTH",None:"NONE"},To={CreatedAt:"createdAt",TriggeredAt:"triggeredAt"},Po={Relevance:"relevance",RevisionTsDesc:"revisionTsDesc",RevisionTsAsc:"revisionTsAsc",PageViewsDesc:"pageViewsDesc",PageViewsAsc:"pageViewsAsc",ScrapedAtDesc:"scrapedAtDesc",ScrapedAtAsc:"scrapedAtAsc"};var k="perigon-signature";var q=class{constructor(){this.encoder=new TextEncoder;}},C=class extends q{constructor(o){super(),this.byteHexMapping=new Array(256);for(let a=0;a<this.byteHexMapping.length;a++)this.byteHexMapping[a]=a.toString(16).padStart(2,"0");this.subtleCrypto=o??crypto.subtle;}computeHMACSignature(o,a){throw new Error("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(o,a){let i=await this.subtleCrypto.importKey("raw",this.encoder.encode(a),{name:"HMAC",hash:{name:"SHA-256"}},false,["sign"]),n=await this.subtleCrypto.sign("hmac",i,this.encoder.encode(o)),r=new Uint8Array(n),s=new Array(r.length);for(let l=0;l<r.length;l++)s[l]=this.byteHexMapping[r[l]];return s.join("")}secureCompareEqualLength(o,a){let i=0;for(let n=0;n<o.length;++n)i|=o.charCodeAt(n)^a.charCodeAt(n);return i===0}secureCompare(o,a){return o.length===a.length?this.secureCompareEqualLength(o,a):this.secureCompareEqualLength(o,o)}};var A=zod.z.object({signal_id:zod.z.number(),signal_notification_id:zod.z.number(),contact_point_notification_id:zod.z.number(),sent_at:zod.z.string().datetime(),metadata:zod.z.record(zod.z.any())});var co="v1",mo="t",Le="Signature hash does not match the expected signature hash for payload.",Me="Timestamp outside the tolerance zone.",m=class extends Error{},H=class{constructor(o){this.cryptoProvider=o;this.decoder=new TextDecoder("utf8");}verifyHeader(o,a,i,n){let{signature:r,timestamp:s}=this.parseHeader(a);if(s<Date.now()-n)throw new m(Me);let l=this.computeSignature(o,s,i);if(!this.cryptoProvider.secureCompare(l,r))throw new m(Le)}async verifyHeaderAsync(o,a,i,n){let{signature:r,timestamp:s}=this.parseHeader(a);if(s<Date.now()-n)throw new m(Me);let l=await this.computeSignatureAsync(o,s,i);if(!this.cryptoProvider.secureCompare(l,r))throw new m(Le)}parseHeader(o){if(o==null||o=="")throw new m(`No ${k} header value was provided.`);if(Array.isArray(o))throw new m(`Unexpected: An array was passed as a header, which should not be possible for the ${k} header.`);let a=o instanceof Uint8Array?this.decoder.decode(o):o,[i,n]=a.split(",");if(typeof i>"u"||typeof n>"u")throw new m("Signature or timestamp missing");let[r,s]=i.split("="),l=parseInt(s,10);if(r!==mo||Number.isNaN(l))throw new m("Unable to extract timestamp from header");let[p,c]=n.split("=");if(p!==co||!c)throw new m("No signature found with expected schema.");return {signature:c,timestamp:l}}computeSignedPayload(o,a){if(!o)throw new m("No webhook payload was provided.");let i=o instanceof Uint8Array?this.decoder.decode(o):o;return `${a}.${i}`}computeSignature(o,a,i){let n=this.computeSignedPayload(o,a);return this.cryptoProvider.computeHMACSignature(n,i)}async computeSignatureAsync(o,a,i){let n=this.computeSignedPayload(o,a);return await this.cryptoProvider.computeHMACSignatureAsync(n,i)}};var Ue=5*60*1e3,L=class{constructor(o){this.decoder=new TextDecoder("utf8");this.signatureProvider=new H(o??new C);}constructEvent(o,a,i,n){this.signatureProvider.verifyHeader(o,a,i,n??Ue);let r=this.parseVerifiedPayload(o);return A.parse(r)}async constructEventAsync(o,a,i,n){await this.signatureProvider.verifyHeaderAsync(o,a,i,n??Ue);let r=this.parseVerifiedPayload(o);return A.parseAsync(r)}parseVerifiedPayload(o){return o instanceof Uint8Array?JSON.parse(this.decoder.decode(o)):JSON.parse(o)}};
|
|
2
|
+
exports.AllEndpointSortBy=So;exports.AllEndpointSortBySchema=F;exports.ArticleSchema=N;exports.ArticleSearchFilterSchema=lt;exports.ArticleSearchParamsSchema=ne;exports.ArticlesVectorSearchResultSchema=re;exports.BASE_PATH=$e;exports.BadRequestError=I;exports.BaseAPI=S;exports.COLLECTION_FORMATS=yo;exports.CategoryHolderSchema=B;exports.CategoryWithScoreHolderSchema=Ye;exports.CompanyCountSchema=at;exports.CompanyHolderSchema=V;exports.CompanySchema=ct;exports.CompanySearchResultSchema=ie;exports.Configuration=v;exports.CoordinateFilterSchema=Q;exports.CoordinateSchema=Z;exports.CreateSourceGroupBodySchema=kt;exports.CreateSourceGroupParamsSchema=le;exports.CreateSourceGroupRequestSchema=qt;exports.CreateWatchlistBodySchema=Ct;exports.CreateWatchlistParamsSchema=ue;exports.CreateWatchlistRequestSchema=At;exports.CryptoProvider=q;exports.DefaultConfig=Ke;exports.DeleteSourceGroupPathSchema=Ht;exports.DeleteSourceGroupRequestSchema=vt;exports.DeleteWatchlistPathSchema=jt;exports.DeleteWatchlistRequestSchema=It;exports.EntityHolderSchema=Xe;exports.ErrorResponseSchema=fo;exports.EventTypeHolderSchema=Ze;exports.FetchError=j;exports.ForbiddenError=W;exports.GetJournalistByIdPathSchema=zt;exports.GetJournalistByIdRequestSchema=Wt;exports.GetSourceGroupPathSchema=Et;exports.GetSourceGroupRequestSchema=Dt;exports.GetStoryCountsQuerySchema=Ce;exports.GetStoryCountsRequestSchema=Gt;exports.GetStoryCountsSplitByEnum=Ro;exports.GetStoryHistoryQuerySchema=Ae;exports.GetStoryHistoryRequestSchema=Bt;exports.GetStoryHistorySortByEnum=To;exports.GetWatchlistPathSchema=Ft;exports.GetWatchlistRequestSchema=Ot;exports.HttpError=y;exports.IdNameHolderSchema=et;exports.ImageHolderSchema=R;exports.JournalistSchema=P;exports.JournalistSearchResultSchema=ce;exports.KeyPointSchema=J;exports.KeywordHolderSchema=tt;exports.LabelHolderSchema=ot;exports.ListSourceGroupsQuerySchema=He;exports.ListSourceGroupsRequestSchema=Nt;exports.ListWatchlistsQuerySchema=ve;exports.ListWatchlistsRequestSchema=Lt;exports.LocationCountSchema=nt;exports.LocationHolderSchema=O;exports.NameCountSchema=g;exports.NetworkError=U;exports.NewsClusterSchema=ae;exports.NotFoundError=E;exports.PatchSourceGroupParamsSchema=me;exports.PeopleSearchResultSchema=ye;exports.PersonCountSchema=rt;exports.PersonHolderSchema=_;exports.PersonSchema=ht;exports.PlaceSchema=it;exports.QuerySearchResultSchema=he;exports.QuestionSchema=Y;exports.RateLimitError=D;exports.RecordStatHolderSchema=x;exports.ResolveSourceGroupsQuerySchema=je;exports.ResolveSourceGroupsRequestSchema=Mt;exports.ResolveWatchlistsQuerySchema=Ie;exports.ResolveWatchlistsRequestSchema=Ut;exports.ScoredDataArticleSchema=st;exports.ScoredDataWikiDataSchema=gt;exports.SearchArticlesQuerySchema=ze;exports.SearchArticlesRequestSchema=$t;exports.SearchCompaniesQuerySchema=We;exports.SearchCompaniesRequestSchema=Kt;exports.SearchJournalistsQuerySchema=Ee;exports.SearchJournalistsRequestSchema=Qt;exports.SearchPeopleQuerySchema=De;exports.SearchPeopleRequestSchema=Vt;exports.SearchSourcesQuerySchema=Ge;exports.SearchSourcesRequestSchema=Jt;exports.SearchStoriesQuerySchema=Be;exports.SearchStoriesRequestSchema=_t;exports.SearchSummarizerBodySchema=Yt;exports.SearchSummarizerQuerySchema=Fe;exports.SearchSummarizerRequestSchema=Xt;exports.SearchTopicsQuerySchema=Oe;exports.SearchTopicsRequestSchema=Zt;exports.SearchWikipediaQuerySchema=Ne;exports.SearchWikipediaRequestSchema=eo;exports.SearchWikipediaSortByEnum=Po;exports.SentimentHolderSchema=X;exports.ServerError=G;exports.SortBy=bo;exports.SortBySchema=T;exports.SourceHolderSchema=te;exports.SourceLocationSchema=ee;exports.SourceSchema=bt;exports.SourceSearchResultSchema=de;exports.SourceTopStatHolderSchema=w;exports.StatResultSchema=ge;exports.StoryHistoryRecordSchema=St;exports.StoryHistoryResultSchema=be;exports.StorySearchResultSchema=Se;exports.SummaryBodySchema=fe;exports.SummarySearchResultSchema=xe;exports.SymbolHolderSchema=pt;exports.TopicDtoSchema=xt;exports.TopicHolderSchema=oe;exports.TopicLabelsSchema=ft;exports.TopicSearchResultSchema=we;exports.UnauthorizedError=z;exports.UpdateSourceGroupBodySchema=to;exports.UpdateSourceGroupPathSchema=oo;exports.UpdateSourceGroupRequestSchema=ao;exports.UpdateWatchlistBodySchema=no;exports.UpdateWatchlistParamsSchema=Re;exports.UpdateWatchlistPathSchema=ro;exports.UpdateWatchlistRequestSchema=io;exports.V1Api=qe;exports.VectorSearchArticlesBodySchema=lo;exports.VectorSearchArticlesRequestSchema=so;exports.VectorSearchWikipediaBodySchema=po;exports.VectorSearchWikipediaRequestSchema=uo;exports.WEBHOOK_HEADER=k;exports.WatchlistCompanySchema=se;exports.WatchlistPersonSchema=pe;exports.WebResourcesSchema=ut;exports.WebhookEventSchema=A;exports.Webhooks=L;exports.WikiDataSchema=dt;exports.WikiPageSchema=Rt;exports.WikiPageSectionHolderSchema=wt;exports.WikidataDateHolderSchema=d;exports.WikidataLabelHolderSchema=b;exports.WikidataPoliticalPartyHolderSchema=mt;exports.WikidataPositionHolderSchema=yt;exports.WikipediaSearchFilterSchema=Tt;exports.WikipediaSearchParamsSchema=Te;exports.WikipediaSearchResultSchema=Pe;exports.WikipediaVectorSearchResultSchema=ke;exports.createHttpError=Qe;exports.exists=ho;exports.querystring=$;//# sourceMappingURL=index.cjs.map
|
|
3
3
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.ts
CHANGED
|
@@ -24253,4 +24253,46 @@ declare const SearchWikipediaSortByEnum: {
|
|
|
24253
24253
|
};
|
|
24254
24254
|
type SearchWikipediaSortByEnum = (typeof SearchWikipediaSortByEnum)[keyof typeof SearchWikipediaSortByEnum];
|
|
24255
24255
|
|
|
24256
|
-
|
|
24256
|
+
declare const WEBHOOK_HEADER = "perigon-signature";
|
|
24257
|
+
|
|
24258
|
+
declare abstract class CryptoProvider {
|
|
24259
|
+
protected readonly encoder: TextEncoder;
|
|
24260
|
+
abstract computeHMACSignature(payload: string, secret: string): string;
|
|
24261
|
+
abstract computeHMACSignatureAsync(payload: string, secret: string): Promise<string>;
|
|
24262
|
+
abstract secureCompare(a: string, b: string): boolean;
|
|
24263
|
+
}
|
|
24264
|
+
|
|
24265
|
+
type WebhookHeader = string | string[] | Uint8Array | undefined;
|
|
24266
|
+
type WebhookPayload = string | Uint8Array;
|
|
24267
|
+
|
|
24268
|
+
declare const WebhookEventSchema: z.ZodObject<{
|
|
24269
|
+
signal_id: z.ZodNumber;
|
|
24270
|
+
signal_notification_id: z.ZodNumber;
|
|
24271
|
+
contact_point_notification_id: z.ZodNumber;
|
|
24272
|
+
sent_at: z.ZodString;
|
|
24273
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
24274
|
+
}, "strip", z.ZodTypeAny, {
|
|
24275
|
+
signal_id: number;
|
|
24276
|
+
signal_notification_id: number;
|
|
24277
|
+
contact_point_notification_id: number;
|
|
24278
|
+
sent_at: string;
|
|
24279
|
+
metadata: Record<string, any>;
|
|
24280
|
+
}, {
|
|
24281
|
+
signal_id: number;
|
|
24282
|
+
signal_notification_id: number;
|
|
24283
|
+
contact_point_notification_id: number;
|
|
24284
|
+
sent_at: string;
|
|
24285
|
+
metadata: Record<string, any>;
|
|
24286
|
+
}>;
|
|
24287
|
+
type WebhookEvent = z.infer<typeof WebhookEventSchema>;
|
|
24288
|
+
|
|
24289
|
+
declare class Webhooks {
|
|
24290
|
+
private readonly decoder;
|
|
24291
|
+
private readonly signatureProvider;
|
|
24292
|
+
constructor(cryptoProvider?: CryptoProvider);
|
|
24293
|
+
constructEvent(payload: WebhookPayload, header: WebhookHeader, secret: string, tolerance?: number): WebhookEvent;
|
|
24294
|
+
constructEventAsync(payload: WebhookPayload, header: WebhookHeader, secret: string, tolerance?: number): Promise<WebhookEvent>;
|
|
24295
|
+
private parseVerifiedPayload;
|
|
24296
|
+
}
|
|
24297
|
+
|
|
24298
|
+
export { AllEndpointSortBy, AllEndpointSortBySchema, type Article, ArticleSchema, type ArticleSearchFilter, ArticleSearchFilterSchema, type ArticleSearchParams, ArticleSearchParamsSchema, type ArticlesVectorSearchResult, ArticlesVectorSearchResultSchema, 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, CreateSourceGroupBodySchema, type CreateSourceGroupParams, CreateSourceGroupParamsSchema, type CreateSourceGroupRequest, CreateSourceGroupRequestSchema, CreateWatchlistBodySchema, type CreateWatchlistParams, CreateWatchlistParamsSchema, type CreateWatchlistRequest, CreateWatchlistRequestSchema, CryptoProvider, DefaultConfig, DeleteSourceGroupPathSchema, type DeleteSourceGroupRequest, DeleteSourceGroupRequestSchema, DeleteWatchlistPathSchema, type DeleteWatchlistRequest, DeleteWatchlistRequestSchema, type EntityHolder, EntityHolderSchema, type ErrorContext, type ErrorResponse, ErrorResponseSchema, type EventTypeHolder, EventTypeHolderSchema, type FetchAPI, FetchError, type FetchParams, ForbiddenError, GetJournalistByIdPathSchema, type GetJournalistByIdRequest, GetJournalistByIdRequestSchema, GetSourceGroupPathSchema, type GetSourceGroupRequest, GetSourceGroupRequestSchema, GetStoryCountsQuerySchema, type GetStoryCountsRequest, GetStoryCountsRequestSchema, GetStoryCountsSplitByEnum, GetStoryHistoryQuerySchema, type GetStoryHistoryRequest, GetStoryHistoryRequestSchema, GetStoryHistorySortByEnum, GetWatchlistPathSchema, type GetWatchlistRequest, GetWatchlistRequestSchema, type HTTPBody, type HTTPHeaders, type HTTPMethod, type HTTPQuery, type HTTPRequestInit, HttpError, type IdNameHolder, IdNameHolderSchema, type ImageHolder, ImageHolderSchema, type InitOverrideFunction, type Journalist, JournalistSchema, type JournalistSearchResult, JournalistSearchResultSchema, type Json, type KeyPoint, KeyPointSchema, type KeywordHolder, KeywordHolderSchema, type LabelHolder, LabelHolderSchema, ListSourceGroupsQuerySchema, type ListSourceGroupsRequest, ListSourceGroupsRequestSchema, ListWatchlistsQuerySchema, type ListWatchlistsRequest, ListWatchlistsRequestSchema, type LocationCount, LocationCountSchema, type LocationHolder, LocationHolderSchema, type Middleware, type ModelPropertyNaming, type NameCount, NameCountSchema, NetworkError, type NewsCluster, NewsClusterSchema, NotFoundError, type PatchSourceGroupParams, PatchSourceGroupParamsSchema, 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, ResolveSourceGroupsQuerySchema, type ResolveSourceGroupsRequest, ResolveSourceGroupsRequestSchema, ResolveWatchlistsQuerySchema, type ResolveWatchlistsRequest, ResolveWatchlistsRequestSchema, 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, SearchWikipediaSortByEnum, type SentimentHolder, SentimentHolderSchema, ServerError, SortBy, SortBySchema, type Source, type SourceHolder, SourceHolderSchema, type SourceLocation, SourceLocationSchema, SourceSchema, type SourceSearchResult, SourceSearchResultSchema, type SourceTopStatHolder, SourceTopStatHolderSchema, type StatResult, StatResultSchema, type StoryHistoryRecord, StoryHistoryRecordSchema, type StoryHistoryResult, StoryHistoryResultSchema, type StorySearchResult, StorySearchResultSchema, type SummaryBody, SummaryBodySchema, type SummarySearchResult, SummarySearchResultSchema, type SymbolHolder, SymbolHolderSchema, type TopicDto, TopicDtoSchema, type TopicHolder, TopicHolderSchema, type TopicLabels, TopicLabelsSchema, type TopicSearchResult, TopicSearchResultSchema, UnauthorizedError, UpdateSourceGroupBodySchema, UpdateSourceGroupPathSchema, type UpdateSourceGroupRequest, UpdateSourceGroupRequestSchema, UpdateWatchlistBodySchema, type UpdateWatchlistParams, UpdateWatchlistParamsSchema, UpdateWatchlistPathSchema, type UpdateWatchlistRequest, UpdateWatchlistRequestSchema, V1Api, VectorSearchArticlesBodySchema, type VectorSearchArticlesRequest, VectorSearchArticlesRequestSchema, VectorSearchWikipediaBodySchema, type VectorSearchWikipediaRequest, VectorSearchWikipediaRequestSchema, WEBHOOK_HEADER, type WatchlistCompany, WatchlistCompanySchema, type WatchlistPerson, WatchlistPersonSchema, type WebResources, WebResourcesSchema, type WebhookEvent, WebhookEventSchema, type WebhookHeader, type WebhookPayload, Webhooks, 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 We="https://api.perigon.io".replace(/\/+$/,""),w=class{constructor(o={}){this.configuration=o;}set config(o){this.configuration=o;}get basePath(){return We}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||B}get accessToken(){let o=this.configuration.apiKey;return o?typeof o=="function"?o:async()=>o:void 0}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},Ge=new w,k=class extends Error{constructor(a,i){super(i);this.cause=a;this.name="FetchError";}},m=class extends Error{constructor(o,a){let i=`HTTP ${o.status}: ${o.statusText}`;super(i),this.name="HttpError",this.status=o.status,this.statusText=o.statusText,this.response=o,this.body=a;}},P=class extends m{constructor(o,a){super(o,a),this.name="BadRequestError",this.message=a?.message||"Bad request - please check your input parameters";}},q=class extends m{constructor(o,a){super(o,a),this.name="UnauthorizedError",this.message="Authentication required - please check your credentials";}},C=class extends m{constructor(o,a){super(o,a),this.name="ForbiddenError",this.message="Access denied - insufficient permissions";}},j=class extends m{constructor(o,a){super(o,a),this.name="NotFoundError",this.message=a?.message||"Resource not found";}},A=class extends m{constructor(o,a){super(o,a),this.name="RateLimitError",this.message="Rate limit exceeded - please try again later";let i=o.headers.get("retry-after");i&&(this.retryAfter=parseInt(i,10));}},I=class extends m{constructor(o,a){super(o,a),this.name="ServerError",this.message="Server error - please try again later";}},D=class extends Error{constructor(o){super("Network error - please check your connection"),this.name="NetworkError",this.cause=o;}};function De(u,o){return u.status===400?new P(u,o):u.status===401?new q(u,o):u.status===403?new C(u,o):u.status===404?new j(u,o):u.status===429?new A(u,o):u.status>499?new I(u,o):new m(u,o)}var b=class b{constructor(o=Ge){this.configuration=o;this.fetchApi=async(o,a)=>{let i={url:o,init:a};for(let n of this.middleware)n.pre&&(i=await n.pre({fetch:this.fetchApi,...i})||i);let r;try{r=await(this.configuration.fetchApi||fetch)(i.url,i.init);}catch(n){for(let p of this.middleware)p.onError&&(r=await p.onError({fetch:this.fetchApi,url:i.url,init:i.init,error:n,response:r?r.clone():void 0})||r);if(r===void 0)throw n instanceof Error?new k(n,"The request failed and the interceptors did not return an alternative response"):n}for(let n of this.middleware)n.post&&(r=await n.post({fetch:this.fetchApi,url:i.url,init:i.init,response:r.clone()})||r);return r};this.middleware=o.middleware;}withMiddleware(...o){let a=this.clone();return a.middleware=a.middleware.concat(...o),a}withPreMiddleware(...o){let a=o.map(i=>({pre:i}));return this.withMiddleware(...a)}withPostMiddleware(...o){let a=o.map(i=>({post:i}));return this.withMiddleware(...a)}isJsonMime(o){return o?b.jsonRegex.test(o):false}async request(o,a){let{url:i,init:r}=await this.createFetchParams(o,a),n=await this.fetchApi(i,r);if(n&&n.status>=200&&n.status<300)return n;let p;try{n.headers.get("content-type")?.includes("application/json")&&(p=await n.json());}catch{}throw De(n,p)}async createFetchParams(o,a){let i=this.configuration.basePath+o.path;o.query!==void 0&&Object.keys(o.query).length!==0&&(i+="?"+this.configuration.queryParamsStringify(o.query));let r=Object.assign({},this.configuration.headers,o.headers);Object.keys(r).forEach(G=>r[G]===void 0?delete r[G]:{});let n=typeof a=="function"?a:async()=>a,p={method:o.method,headers:r,body:o.body,credentials:this.configuration.credentials},s={...p,...await n({init:p,context:o})},l;Fe(s.body)||s.body instanceof URLSearchParams||Be(s.body)?l=s.body:this.isJsonMime(r["Content-Type"])?l=JSON.stringify(s.body):l=s.body;let c={...s,body:l};return {url:i,init:c}}clone(){let o=this.constructor,a=new o(this.configuration);return a.middleware=this.middleware.slice(),a}};b.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");var g=b;function Be(u){return typeof Blob<"u"&&u instanceof Blob}function Fe(u){return typeof FormData<"u"&&u instanceof FormData}var eo={csv:",",ssv:" ",tsv:" ",pipes:"|"};function B(u,o=""){return Object.keys(u).map(a=>F(a,u[a],o)).filter(a=>a.length>0).join("&")}function F(u,o,a=""){let i=a+(a.length?`[${u}]`:u);if(o instanceof Array){let r=o.map(n=>encodeURIComponent(String(n))).join(`&${encodeURIComponent(i)}=`);return `${encodeURIComponent(i)}=${r}`}if(o instanceof Set){let r=Array.from(o);return F(u,r,a)}return o instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(o.toISOString())}`:o instanceof Object?B(o,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(o))}`}function to(u,o){let a=u[o];return a!=null}var R=z$1.enum(["createdAt","updatedAt","relevance","count","totalCount"]),ao={CreatedAt:"createdAt",UpdatedAt:"updatedAt",Relevance:"relevance",Count:"count",TotalCount:"totalCount"},z=z$1.enum(["relevance","date","reverseDate","reverseAddDate","addDate","pubDate","refreshDate"]),no={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()}),O=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()}),Le=z$1.object({data:z$1.string().optional().nullable(),type:z$1.string().optional().nullable(),mentions:z$1.number().optional().nullable()}),Ne=z$1.object({name:z$1.string().optional().nullable(),type:z$1.string().optional().nullable()}),Ue=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().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(),area:z$1.string().optional().nullable()}),h=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),T=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(v).optional().nullable(),updatedAt:z$1.string().optional().nullable(),topTopics:z$1.array(h).optional().nullable(),topSources:z$1.array(h).optional().nullable(),topCategories:z$1.array(h).optional().nullable(),topLabels:z$1.array(h).optional().nullable(),topCountries:z$1.array(h).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()}),Me=z$1.object({name:z$1.string().optional().nullable(),weight:z$1.number().optional().nullable()}),$e=z$1.object({name:z$1.string().optional().nullable()}),Ke=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()}),L=z$1.object({point:z$1.string().optional().nullable(),references:z$1.array(z$1.string()).optional().nullable()}),Qe=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(),count:z$1.number().optional().nullable()}),Ve=z$1.object({wikidataId:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),N=z$1.object({wikidataId:z$1.string().optional().nullable(),name:z$1.string().optional().nullable()}),U=z$1.object({question:z$1.string().optional().nullable(),answer:z$1.string().optional().nullable(),references:z$1.array(z$1.string()).optional().nullable()}),S=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),M=z$1.object({positive:z$1.number().optional().nullable(),negative:z$1.number().optional().nullable(),neutral:z$1.number().optional().nullable()}),$=z$1.object({lat:z$1.number().optional().nullable(),lon:z$1.number().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(),coordinates:$.optional().nullable()}),Q=z$1.object({domain:z$1.string().optional().nullable(),paywall:z$1.boolean().optional().nullable(),location:K.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(L).optional().nullable(),questions:z$1.array(U).optional().nullable(),uniqueSources:z$1.array(z$1.string()).optional().nullable(),selectedArticles:z$1.array(z$1.unknown()).optional().nullable(),sentiment:M.optional().nullable(),uniqueCount:z$1.number().optional().nullable(),reprintCount:z$1.number().optional().nullable(),totalCount:z$1.number().optional().nullable(),countries:z$1.array(S).optional().nullable(),topCountries:z$1.array(z$1.string()).optional().nullable(),topics:z$1.array(S).optional().nullable(),topTopics:z$1.array(V).optional().nullable(),categories:z$1.array(S).optional().nullable(),topCategories:z$1.array(H).optional().nullable(),taxonomies:z$1.array(S).optional().nullable(),topTaxonomies:z$1.array(H).optional().nullable(),people:z$1.array(Ve).optional().nullable(),topPeople:z$1.array(N).optional().nullable(),companies:z$1.array(Ke).optional().nullable(),topCompanies:z$1.array(O).optional().nullable(),locations:z$1.array(Qe).optional().nullable(),topLocations:z$1.array(v).optional().nullable(),highlights:z$1.record(z$1.string(),z$1.array(z$1.string())).optional().nullable(),sourceDiversity:z$1.number().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:$.optional().nullable()}),W=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(),enContentWordCount:z$1.number().optional().nullable(),medium:z$1.string().optional().nullable(),links:z$1.array(z$1.string()).optional().nullable(),labels:z$1.array($e).optional().nullable(),eventTypes:z$1.array(Ne).optional().nullable(),matchedAuthors:z$1.array(Ue).optional().nullable(),claim:z$1.string().optional().nullable(),verdict:z$1.string().optional().nullable(),keywords:z$1.array(Me).optional().nullable(),topics:z$1.array(V).optional().nullable(),categories:z$1.array(H).optional().nullable(),taxonomies:z$1.array(Oe).optional().nullable(),entities:z$1.array(Le).optional().nullable(),companies:z$1.array(O).optional().nullable(),sentiment:M.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(v).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(N).optional().nullable(),cluster:J.optional().nullable(),journalists:z$1.array(T).optional().nullable(),highlights:z$1.record(z$1.string(),z$1.array(z$1.string())).optional().nullable()}),E=z$1.object({lat:z$1.number().optional().nullable(),lon:z$1.number().optional().nullable(),radius:z$1.number().optional().nullable()}),Ye=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:E.optional().nullable(),sourceCoordinates:E.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:Ye.optional().nullable(),pubDateFrom:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),pubDateTo:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),showReprints:z$1.boolean().optional().nullable(),size:z$1.number().optional().nullable(),page:z$1.number().optional().nullable()}),_e=z$1.object({score:z$1.number().optional().nullable(),data:W.optional().nullable()}),_=z$1.object({status:z$1.number(),results:z$1.array(_e)}),Xe=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()}),Ze=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()}),et=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(Xe).optional().nullable(),naics:z$1.string().optional().nullable(),sic:z$1.string().optional().nullable(),cusip:z$1.string().optional().nullable(),cik:z$1.string().optional().nullable(),isin:z$1.string().optional().nullable(),yearFounded:z$1.number().optional().nullable(),revenue:z$1.string().optional().nullable(),webResources:Ze.optional().nullable()}),X=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(et)}),Z=z$1.object({name:z$1.string(),displayName:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),domains:z$1.array(z$1.string())}),x=z$1.object({url:z$1.string().optional().nullable()}),y=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()}),tt=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable(),startTime:y.optional().nullable(),endTime:y.optional().nullable()}),ot=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable(),startTime:y.optional().nullable(),endTime:y.optional().nullable(),employer:d.optional().nullable()}),at=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:y.optional().nullable(),dateOfDeath:y.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(ot).optional().nullable(),politicalParty:z$1.array(tt).optional().nullable(),image:x.optional().nullable(),_abstract:z$1.string().optional().nullable()}),ee=z$1.object({name:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),id:z$1.string().optional().nullable(),domain:z$1.string().optional().nullable(),aliases:z$1.array(z$1.string()).optional().nullable()}),te=z$1.object({name:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),aliases:z$1.array(z$1.string()).optional().nullable(),wikidataId:z$1.string().optional().nullable()}),oe=z$1.object({name:z$1.string(),displayName:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),people:z$1.array(te),companies:z$1.array(ee),visible:z$1.boolean().optional().nullable()}),ro=z$1.object({status:z$1.number().optional().nullable(),message:z$1.string().optional().nullable(),timestamp:z$1.number().optional().nullable()}),ae=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(T)}),ne=z$1.object({name:z$1.string().optional().nullable(),displayName:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),domains:z$1.array(z$1.string()).optional().nullable()}),re=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(at)}),ie=z$1.object({status:z$1.number(),numResults:z$1.number(),articles:z$1.array(W)}),nt=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()}),rt=z$1.object({score:z$1.number().optional().nullable(),data:nt.optional().nullable()}),f=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),it=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:K.optional().nullable(),topCategories:z$1.array(f).optional().nullable(),topTopics:z$1.array(f).optional().nullable(),topCountries:z$1.array(f).optional().nullable(),topLabels:z$1.array(f).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()}),le=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(it)}),se=z$1.object({status:z$1.number().optional().nullable(),results:z$1.array(z$1.unknown()).optional().nullable()}),lt=z$1.object({clusterId:z$1.string().optional().nullable(),createdAt:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),triggeredAt:z$1.string().optional().nullable(),summary:z$1.string().optional().nullable(),shortSummary:z$1.string().optional().nullable(),changelog:z$1.string().optional().nullable(),keyPoints:z$1.array(L).optional().nullable(),questions:z$1.array(U).optional().nullable()}),pe=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(lt)}),ue=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(J)}),ce=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-5.4-mini","gpt-5.4-nano","gpt-5-mini","gpt-5-nano","gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","llama-3.3-70b-versatile","openai/gpt-oss-120b"]).optional().nullable(),temperature:z$1.number().optional().nullable(),topP:z$1.number().optional().nullable(),maxTokens:z$1.number().optional().nullable()}),me=z$1.object({status:z$1.number(),numResults:z$1.number(),summary:z$1.string(),results:z$1.array(W)}),st=z$1.object({category:z$1.string().optional().nullable(),subcategory:z$1.string().optional().nullable()}),pt=z$1.object({id:z$1.number().optional().nullable(),createdAt:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),updatedAt:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),name:z$1.string().optional().nullable(),labels:st.optional().nullable()}),ye=z$1.object({total:z$1.number(),data:z$1.array(pt)}),he=z$1.object({name:z$1.string().optional().nullable(),displayName:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),people:z$1.array(te).optional().nullable(),companies:z$1.array(ee).optional().nullable(),visible:z$1.boolean().optional().nullable()}),ut=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()}),ct=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(ut).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()}),mt=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()}),de=z$1.object({prompt:z$1.string(),filter:mt.optional().nullable(),wikiRevisionFrom:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),wikiRevisionTo:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).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()}),ge=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(ct)}),be=z$1.object({status:z$1.number(),results:z$1.array(rt)});var ht=z$1.object({createSourceGroupParams:Z}),dt=z$1.object({...ht.shape}),gt=z$1.object({createWatchlistParams:oe}),bt=z$1.object({...gt.shape}),St=z$1.object({id:z$1.number()}),ft=z$1.object({...St.shape}),xt=z$1.object({id:z$1.number()}),Rt=z$1.object({...xt.shape}),Tt=z$1.object({id:z$1.string()}),wt=z$1.object({...Tt.shape}),kt=z$1.object({id:z$1.number()}),Pt=z$1.object({...kt.shape}),fe=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:R.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(),minSourceDiversity: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(),expandArticles:z$1.boolean().optional(),splitBy:z$1.enum(["HOUR","DAY","WEEK","MONTH","NONE"])}),qt=z$1.object({...fe.shape}),xe=z$1.object({clusterId:z$1.array(z$1.string()).optional(),from:z$1.date().optional(),to:z$1.date().optional(),sortBy:z$1.enum(["createdAt","triggeredAt"]).optional(),page:z$1.number().optional(),size:z$1.number().optional(),changelogExists:z$1.boolean().optional()}),Ct=z$1.object({...xe.shape}),jt=z$1.object({id:z$1.number()}),At=z$1.object({...jt.shape}),Re=z$1.object({name:z$1.string().optional(),domain:z$1.string().optional(),page:z$1.string().optional(),size:z$1.string().optional(),sortBy:z$1.string(),sortOrder:z$1.string()}),It=z$1.object({...Re.shape}),Te=z$1.object({name:z$1.string().optional(),page:z$1.string().optional(),size:z$1.string().optional(),sortBy:z$1.string(),sortOrder:z$1.string()}),Ht=z$1.object({...Te.shape}),we=z$1.object({name:z$1.array(z$1.string()).optional()}),zt=z$1.object({...we.shape}),ke=z$1.object({name:z$1.array(z$1.string()).optional()}),vt=z$1.object({...ke.shape}),Pe=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),desc:z$1.string().optional(),content:z$1.string().optional(),summary: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:z.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(),watchlist:z$1.array(z$1.string()).optional(),excludeWatchlist: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(),excludeSourceCity:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),excludeSourceCounty:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),excludeSourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),excludeSourceState: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()}),Wt=z$1.object({...Pe.shape}),qe=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()}),Gt=z$1.object({...qe.shape}),Ce=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()}),Dt=z$1.object({...Ce.shape}),je=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()}),Bt=z$1.object({...je.shape}),Ae=z$1.object({domain:z$1.array(z$1.string()).optional(),name:z$1.string().optional(),sourceGroup:z$1.string().optional(),sortBy:R.optional(),page:z$1.number().optional(),size:z$1.number().optional(),minMonthlyVisits:z$1.number().optional(),maxMonthlyVisits:z$1.number().optional(),minMonthlyPosts:z$1.number().optional(),maxMonthlyPosts:z$1.number().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()}),Ft=z$1.object({...Ae.shape}),Ie=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:R.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(),minSourceDiversity: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(),expandArticles:z$1.boolean().optional()}),Et=z$1.object({...Ie.shape}),He=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),desc:z$1.string().optional(),content:z$1.string().optional(),summary: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:z.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(),watchlist:z$1.array(z$1.string()).optional(),excludeWatchlist: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(),excludeSourceCity:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),excludeSourceCounty:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),excludeSourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),excludeSourceState: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({summaryBody:ce}),Lt=z$1.object({...He.shape,...Ot.shape}),ze=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()}),Nt=z$1.object({...ze.shape}),ve=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.number().optional(),pageviewsTo:z$1.number().optional(),withPageviews:z$1.boolean().optional(),showNumResults:z$1.boolean().optional(),page:z$1.number().optional(),size:z$1.number().optional(),sortBy:z$1.enum(["relevance","revisionTsDesc","revisionTsAsc","pageViewsDesc","pageViewsAsc","scrapedAtDesc","scrapedAtAsc"]).optional()}),Ut=z$1.object({...ve.shape}),Mt=z$1.object({patchSourceGroupParams:ne}),$t=z$1.object({id:z$1.number()}),Kt=z$1.object({...Mt.shape,...$t.shape}),Qt=z$1.object({updateWatchlistParams:he}),Vt=z$1.object({id:z$1.number()}),Jt=z$1.object({...Qt.shape,...Vt.shape}),Yt=z$1.object({articleSearchParams:Y}),_t=z$1.object({...Yt.shape}),Xt=z$1.object({wikipediaSearchParams:de}),Zt=z$1.object({...Xt.shape}),Se=class extends g{async createSourceGroup(o,a){let i=dt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/sourceGroups",method:"POST",headers:r,body:i.createSourceGroupParams},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async createWatchlist(o,a){let i=bt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/watchlists",method:"POST",headers:r,body:i.createWatchlistParams},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async deleteSourceGroup(o,a){let i=ft.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"DELETE",headers:r},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async deleteWatchlist(o,a){let i=Rt.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"DELETE",headers:r},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async getJournalistById(o,a){let i=wt.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let p=await(await this.request({path:"/v1/journalists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:r},a)).json();return T.parse(p)}async getSourceGroup(o,a){let i=Pt.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:r},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async getStoryCounts(o,a){let i=qt.parse(o),r=fe.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/stories/stats",method:"GET",headers:n,query:r},a)).json();return se.parse(s)}async getStoryHistory(o={},a){let i=Ct.parse(o),r=xe.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/stories/history",method:"GET",headers:n,query:r},a)).json();return pe.parse(s)}async getWatchlist(o,a){let i=At.parse(o),r={};if(this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:r},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async listSourceGroups(o,a){let i=It.parse(o),r=Re.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let p=await this.request({path:"/v1/api/sourceGroups",method:"GET",headers:n,query:r},a),s=p.headers.get("content-type");if(s&&s.includes("application/json"))return await p.json()}async listWatchlists(o,a){let i=Ht.parse(o),r=Te.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let p=await this.request({path:"/v1/api/watchlists",method:"GET",headers:n,query:r},a),s=p.headers.get("content-type");if(s&&s.includes("application/json"))return await p.json()}async resolveSourceGroups(o={},a){let i=zt.parse(o),r=we.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let p=await this.request({path:"/v1/api/sourceGroups/resolve",method:"GET",headers:n,query:r},a),s=p.headers.get("content-type");if(s&&s.includes("application/json"))return await p.json()}async resolveWatchlists(o={},a){let i=vt.parse(o),r=ke.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let p=await this.request({path:"/v1/api/watchlists/resolve",method:"GET",headers:n,query:r},a),s=p.headers.get("content-type");if(s&&s.includes("application/json"))return await p.json()}async searchArticles(o={},a){let i=Wt.parse(o),r=Pe.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/articles/all",method:"GET",headers:n,query:r},a)).json();return ie.parse(s)}async searchCompanies(o={},a){let i=Gt.parse(o),r=qe.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/companies/all",method:"GET",headers:n,query:r},a)).json();return X.parse(s)}async searchJournalists(o={},a){let i=Dt.parse(o),r=Ce.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/journalists/all",method:"GET",headers:n,query:r},a)).json();return ae.parse(s)}async searchPeople(o={},a){let i=Bt.parse(o),r=je.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/people/all",method:"GET",headers:n,query:r},a)).json();return re.parse(s)}async searchSources(o={},a){let i=Ft.parse(o),r=Ae.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/sources/all",method:"GET",headers:n,query:r},a)).json();return le.parse(s)}async searchStories(o={},a){let i=Et.parse(o),r=Ie.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/stories/all",method:"GET",headers:n,query:r},a)).json();return ue.parse(s)}async searchSummarizer(o,a){let i=Lt.parse(o),r=He.parse(i),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/summarize",method:"POST",headers:n,query:r,body:i.summaryBody},a)).json();return me.parse(s)}async searchTopics(o={},a){let i=Nt.parse(o),r=ze.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/topics/all",method:"GET",headers:n,query:r},a)).json();return ye.parse(s)}async searchWikipedia(o={},a){let i=Ut.parse(o),r=ve.parse(i),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,c=await l("apiKeyAuth",[]);c&&(n.Authorization=`Bearer ${c}`);}let s=await(await this.request({path:"/v1/wikipedia/all",method:"GET",headers:n,query:r},a)).json();return ge.parse(s)}async updateSourceGroup(o,a){let i=Kt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"PATCH",headers:r,body:i.patchSourceGroupParams},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async updateWatchlist(o,a){let i=Jt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let n=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"PATCH",headers:r,body:i.updateWatchlistParams},a),p=n.headers.get("content-type");if(p&&p.includes("application/json"))return await n.json()}async vectorSearchArticles(o,a){let i=_t.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let p=await(await this.request({path:"/v1/vector/news/all",method:"POST",headers:r,body:i.articleSearchParams},a)).json();return _.parse(p)}async vectorSearchWikipedia(o,a){let i=Zt.parse(o),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let s=this.configuration.accessToken,l=await s("apiKeyAuth",[]);l&&(r.Authorization=`Bearer ${l}`);}let p=await(await this.request({path:"/v1/vector/wikipedia/all",method:"POST",headers:r,body:i.wikipediaSearchParams},a)).json();return be.parse(p)}},so={Hour:"HOUR",Day:"DAY",Week:"WEEK",Month:"MONTH",None:"NONE"},po={CreatedAt:"createdAt",TriggeredAt:"triggeredAt"},uo={Relevance:"relevance",RevisionTsDesc:"revisionTsDesc",RevisionTsAsc:"revisionTsAsc",PageViewsDesc:"pageViewsDesc",PageViewsAsc:"pageViewsAsc",ScrapedAtDesc:"scrapedAtDesc",ScrapedAtAsc:"scrapedAtAsc"};
|
|
2
|
-
export{
|
|
1
|
+
import {z as z$1}from'zod';var $e="https://api.perigon.io".replace(/\/+$/,""),v=class{constructor(o={}){this.configuration=o;}set config(o){this.configuration=o;}get basePath(){return $e}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||$}get accessToken(){let o=this.configuration.apiKey;return o?typeof o=="function"?o:async()=>o:void 0}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},Ke=new v,j=class extends Error{constructor(a,i){super(i);this.cause=a;this.name="FetchError";}},y=class extends Error{constructor(o,a){let i=`HTTP ${o.status}: ${o.statusText}`;super(i),this.name="HttpError",this.status=o.status,this.statusText=o.statusText,this.response=o,this.body=a;}},I=class extends y{constructor(o,a){super(o,a),this.name="BadRequestError",this.message=a?.message||"Bad request - please check your input parameters";}},z=class extends y{constructor(o,a){super(o,a),this.name="UnauthorizedError",this.message="Authentication required - please check your credentials";}},W=class extends y{constructor(o,a){super(o,a),this.name="ForbiddenError",this.message="Access denied - insufficient permissions";}},E=class extends y{constructor(o,a){super(o,a),this.name="NotFoundError",this.message=a?.message||"Resource not found";}},D=class extends y{constructor(o,a){super(o,a),this.name="RateLimitError",this.message="Rate limit exceeded - please try again later";let i=o.headers.get("retry-after");i&&(this.retryAfter=parseInt(i,10));}},G=class extends y{constructor(o,a){super(o,a),this.name="ServerError",this.message="Server error - please try again later";}},U=class extends Error{constructor(o){super("Network error - please check your connection"),this.name="NetworkError",this.cause=o;}};function Qe(u,o){return u.status===400?new I(u,o):u.status===401?new z(u,o):u.status===403?new W(u,o):u.status===404?new E(u,o):u.status===429?new D(u,o):u.status>499?new G(u,o):new y(u,o)}var f=class f{constructor(o=Ke){this.configuration=o;this.fetchApi=async(o,a)=>{let i={url:o,init:a};for(let r of this.middleware)r.pre&&(i=await r.pre({fetch:this.fetchApi,...i})||i);let n;try{n=await(this.configuration.fetchApi||fetch)(i.url,i.init);}catch(r){for(let s of this.middleware)s.onError&&(n=await s.onError({fetch:this.fetchApi,url:i.url,init:i.init,error:r,response:n?n.clone():void 0})||n);if(n===void 0)throw r instanceof Error?new j(r,"The request failed and the interceptors did not return an alternative response"):r}for(let r of this.middleware)r.post&&(n=await r.post({fetch:this.fetchApi,url:i.url,init:i.init,response:n.clone()})||n);return n};this.middleware=o.middleware;}withMiddleware(...o){let a=this.clone();return a.middleware=a.middleware.concat(...o),a}withPreMiddleware(...o){let a=o.map(i=>({pre:i}));return this.withMiddleware(...a)}withPostMiddleware(...o){let a=o.map(i=>({post:i}));return this.withMiddleware(...a)}isJsonMime(o){return o?f.jsonRegex.test(o):false}async request(o,a){let{url:i,init:n}=await this.createFetchParams(o,a),r=await this.fetchApi(i,n);if(r&&r.status>=200&&r.status<300)return r;let s;try{r.headers.get("content-type")?.includes("application/json")&&(s=await r.json());}catch{}throw Qe(r,s)}async createFetchParams(o,a){let i=this.configuration.basePath+o.path;o.query!==void 0&&Object.keys(o.query).length!==0&&(i+="?"+this.configuration.queryParamsStringify(o.query));let n=Object.assign({},this.configuration.headers,o.headers);Object.keys(n).forEach(M=>n[M]===void 0?delete n[M]:{});let r=typeof a=="function"?a:async()=>a,s={method:o.method,headers:n,body:o.body,credentials:this.configuration.credentials},l={...s,...await r({init:s,context:o})},p;Je(l.body)||l.body instanceof URLSearchParams||Ve(l.body)?p=l.body:this.isJsonMime(n["Content-Type"])?p=JSON.stringify(l.body):p=l.body;let c={...l,body:p};return {url:i,init:c}}clone(){let o=this.constructor,a=new o(this.configuration);return a.middleware=this.middleware.slice(),a}};f.jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");var S=f;function Ve(u){return typeof Blob<"u"&&u instanceof Blob}function Je(u){return typeof FormData<"u"&&u instanceof FormData}var yo={csv:",",ssv:" ",tsv:" ",pipes:"|"};function $(u,o=""){return Object.keys(u).map(a=>K(a,u[a],o)).filter(a=>a.length>0).join("&")}function K(u,o,a=""){let i=a+(a.length?`[${u}]`:u);if(o instanceof Array){let n=o.map(r=>encodeURIComponent(String(r))).join(`&${encodeURIComponent(i)}=`);return `${encodeURIComponent(i)}=${n}`}if(o instanceof Set){let n=Array.from(o);return K(u,n,a)}return o instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(o.toISOString())}`:o instanceof Object?$(o,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(o))}`}function ho(u,o){let a=u[o];return a!=null}var T=z$1.enum(["createdAt","updatedAt","relevance","count","totalCount"]),bo={CreatedAt:"createdAt",UpdatedAt:"updatedAt",Relevance:"relevance",Count:"count",TotalCount:"totalCount"},F=z$1.enum(["relevance","date","reverseDate","reverseAddDate","addDate","pubDate","refreshDate"]),So={Relevance:"relevance",Date:"date",ReverseDate:"reverseDate",ReverseAddDate:"reverseAddDate",AddDate:"addDate",PubDate:"pubDate",RefreshDate:"refreshDate"},B=z$1.object({name:z$1.string().optional().nullable()}),Ye=z$1.object({name:z$1.string().optional().nullable(),score:z$1.number().optional().nullable()}),V=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()}),Xe=z$1.object({data:z$1.string().optional().nullable(),type:z$1.string().optional().nullable(),mentions:z$1.number().optional().nullable()}),Ze=z$1.object({name:z$1.string().optional().nullable(),type:z$1.string().optional().nullable()}),et=z$1.object({id:z$1.string().optional().nullable(),name:z$1.string().optional().nullable()}),O=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()}),P=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(O).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()}),tt=z$1.object({name:z$1.string().optional().nullable(),weight:z$1.number().optional().nullable()}),ot=z$1.object({name:z$1.string().optional().nullable()}),at=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()}),J=z$1.object({point:z$1.string().optional().nullable(),references:z$1.array(z$1.string()).optional().nullable()}),nt=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(),count:z$1.number().optional().nullable()}),rt=z$1.object({wikidataId:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),_=z$1.object({wikidataId:z$1.string().optional().nullable(),name:z$1.string().optional().nullable()}),Y=z$1.object({question:z$1.string().optional().nullable(),answer:z$1.string().optional().nullable(),references:z$1.array(z$1.string()).optional().nullable()}),x=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),X=z$1.object({positive:z$1.number().optional().nullable(),negative:z$1.number().optional().nullable(),neutral:z$1.number().optional().nullable()}),Z=z$1.object({lat:z$1.number().optional().nullable(),lon:z$1.number().optional().nullable()}),ee=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:Z.optional().nullable()}),te=z$1.object({domain:z$1.string().optional().nullable(),paywall:z$1.boolean().optional().nullable(),location:ee.optional().nullable()}),oe=z$1.object({name:z$1.string().optional().nullable()}),ae=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:te.optional().nullable(),imageUrl:z$1.string().optional().nullable(),keyPoints:z$1.array(J).optional().nullable(),questions:z$1.array(Y).optional().nullable(),uniqueSources:z$1.array(z$1.string()).optional().nullable(),selectedArticles:z$1.array(z$1.unknown()).optional().nullable(),sentiment:X.optional().nullable(),uniqueCount:z$1.number().optional().nullable(),reprintCount:z$1.number().optional().nullable(),totalCount:z$1.number().optional().nullable(),countries:z$1.array(x).optional().nullable(),topCountries:z$1.array(z$1.string()).optional().nullable(),topics:z$1.array(x).optional().nullable(),topTopics:z$1.array(oe).optional().nullable(),categories:z$1.array(x).optional().nullable(),topCategories:z$1.array(B).optional().nullable(),taxonomies:z$1.array(x).optional().nullable(),topTaxonomies:z$1.array(B).optional().nullable(),people:z$1.array(rt).optional().nullable(),topPeople:z$1.array(_).optional().nullable(),companies:z$1.array(at).optional().nullable(),topCompanies:z$1.array(V).optional().nullable(),locations:z$1.array(nt).optional().nullable(),topLocations:z$1.array(O).optional().nullable(),highlights:z$1.record(z$1.string(),z$1.array(z$1.string())).optional().nullable(),sourceDiversity:z$1.number().optional().nullable()}),it=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:Z.optional().nullable()}),N=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:te.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(),enContentWordCount:z$1.number().optional().nullable(),medium:z$1.string().optional().nullable(),links:z$1.array(z$1.string()).optional().nullable(),labels:z$1.array(ot).optional().nullable(),eventTypes:z$1.array(Ze).optional().nullable(),matchedAuthors:z$1.array(et).optional().nullable(),claim:z$1.string().optional().nullable(),verdict:z$1.string().optional().nullable(),keywords:z$1.array(tt).optional().nullable(),topics:z$1.array(oe).optional().nullable(),categories:z$1.array(B).optional().nullable(),taxonomies:z$1.array(Ye).optional().nullable(),entities:z$1.array(Xe).optional().nullable(),companies:z$1.array(V).optional().nullable(),sentiment:X.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(O).optional().nullable(),reprint:z$1.boolean().optional().nullable(),reprintGroupId:z$1.string().optional().nullable(),places:z$1.array(it).optional().nullable(),people:z$1.array(_).optional().nullable(),cluster:ae.optional().nullable(),journalists:z$1.array(P).optional().nullable(),highlights:z$1.record(z$1.string(),z$1.array(z$1.string())).optional().nullable()}),Q=z$1.object({lat:z$1.number().optional().nullable(),lon:z$1.number().optional().nullable(),radius:z$1.number().optional().nullable()}),lt=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:Q.optional().nullable(),sourceCoordinates:Q.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()}),ne=z$1.object({prompt:z$1.string(),filter:lt.optional().nullable(),pubDateFrom:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),pubDateTo:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),showReprints:z$1.boolean().optional().nullable(),size:z$1.number().optional().nullable(),page:z$1.number().optional().nullable()}),st=z$1.object({score:z$1.number().optional().nullable(),data:N.optional().nullable()}),re=z$1.object({status:z$1.number(),results:z$1.array(st)}),pt=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()}),ut=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()}),ct=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(pt).optional().nullable(),naics:z$1.string().optional().nullable(),sic:z$1.string().optional().nullable(),cusip:z$1.string().optional().nullable(),cik:z$1.string().optional().nullable(),isin:z$1.string().optional().nullable(),yearFounded:z$1.number().optional().nullable(),revenue:z$1.string().optional().nullable(),webResources:ut.optional().nullable()}),ie=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(ct)}),le=z$1.object({name:z$1.string(),displayName:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),domains:z$1.array(z$1.string())}),R=z$1.object({url:z$1.string().optional().nullable()}),d=z$1.object({time:z$1.string().optional().nullable(),precision:z$1.string().optional().nullable()}),b=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable()}),mt=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable(),startTime:d.optional().nullable(),endTime:d.optional().nullable()}),yt=z$1.object({wikidataId:z$1.string().optional().nullable(),label:z$1.string().optional().nullable(),startTime:d.optional().nullable(),endTime:d.optional().nullable(),employer:b.optional().nullable()}),ht=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:b.optional().nullable(),dateOfBirth:d.optional().nullable(),dateOfDeath:d.optional().nullable(),description:z$1.string().optional().nullable(),aliases:z$1.array(z$1.string()).optional().nullable(),occupation:z$1.array(b).optional().nullable(),position:z$1.array(yt).optional().nullable(),politicalParty:z$1.array(mt).optional().nullable(),image:R.optional().nullable(),_abstract:z$1.string().optional().nullable()}),se=z$1.object({name:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),id:z$1.string().optional().nullable(),domain:z$1.string().optional().nullable(),aliases:z$1.array(z$1.string()).optional().nullable()}),pe=z$1.object({name:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),aliases:z$1.array(z$1.string()).optional().nullable(),wikidataId:z$1.string().optional().nullable()}),ue=z$1.object({name:z$1.string(),displayName:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),people:z$1.array(pe),companies:z$1.array(se),visible:z$1.boolean().optional().nullable()}),fo=z$1.object({status:z$1.number().optional().nullable(),message:z$1.string().optional().nullable(),timestamp:z$1.number().optional().nullable()}),ce=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(P)}),me=z$1.object({name:z$1.string().optional().nullable(),displayName:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),domains:z$1.array(z$1.string()).optional().nullable()}),ye=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(ht)}),he=z$1.object({status:z$1.number(),numResults:z$1.number(),articles:z$1.array(N)}),dt=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(b).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()}),gt=z$1.object({score:z$1.number().optional().nullable(),data:dt.optional().nullable()}),w=z$1.object({name:z$1.string().optional().nullable(),count:z$1.number().optional().nullable()}),bt=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:ee.optional().nullable(),topCategories:z$1.array(w).optional().nullable(),topTopics:z$1.array(w).optional().nullable(),topCountries:z$1.array(w).optional().nullable(),topLabels:z$1.array(w).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:R.optional().nullable(),logoFavIcon:R.optional().nullable(),logoSquare:R.optional().nullable()}),de=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(bt)}),ge=z$1.object({status:z$1.number().optional().nullable(),results:z$1.array(z$1.unknown()).optional().nullable()}),St=z$1.object({clusterId:z$1.string().optional().nullable(),createdAt:z$1.string().optional().nullable(),name:z$1.string().optional().nullable(),triggeredAt:z$1.string().optional().nullable(),summary:z$1.string().optional().nullable(),shortSummary:z$1.string().optional().nullable(),changelog:z$1.string().optional().nullable(),keyPoints:z$1.array(J).optional().nullable(),questions:z$1.array(Y).optional().nullable()}),be=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(St)}),Se=z$1.object({status:z$1.number(),numResults:z$1.number(),results:z$1.array(ae)}),fe=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-5.4-mini","gpt-5.4-nano","gpt-5-mini","gpt-5-nano","gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","llama-3.3-70b-versatile","openai/gpt-oss-120b"]).optional().nullable(),temperature:z$1.number().optional().nullable(),topP:z$1.number().optional().nullable(),maxTokens:z$1.number().optional().nullable()}),xe=z$1.object({status:z$1.number(),numResults:z$1.number(),summary:z$1.string(),results:z$1.array(N)}),ft=z$1.object({category:z$1.string().optional().nullable(),subcategory:z$1.string().optional().nullable()}),xt=z$1.object({id:z$1.number().optional().nullable(),createdAt:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),updatedAt:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),name:z$1.string().optional().nullable(),labels:ft.optional().nullable()}),we=z$1.object({total:z$1.number(),data:z$1.array(xt)}),Re=z$1.object({name:z$1.string().optional().nullable(),displayName:z$1.string().optional().nullable(),description:z$1.string().optional().nullable(),people:z$1.array(pe).optional().nullable(),companies:z$1.array(se).optional().nullable(),visible:z$1.boolean().optional().nullable()}),wt=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()}),Rt=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(b).optional().nullable(),redirectTitles:z$1.array(z$1.string()).optional().nullable(),summary:z$1.string().optional().nullable(),sections:z$1.array(wt).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()}),Tt=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()}),Te=z$1.object({prompt:z$1.string(),filter:Tt.optional().nullable(),wikiRevisionFrom:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).optional().nullable(),wikiRevisionTo:z$1.union([z$1.string().date(),z$1.string().datetime()]).transform(u=>new Date(u)).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(Rt)}),ke=z$1.object({status:z$1.number(),results:z$1.array(gt)});var kt=z$1.object({createSourceGroupParams:le}),qt=z$1.object({...kt.shape}),Ct=z$1.object({createWatchlistParams:ue}),At=z$1.object({...Ct.shape}),Ht=z$1.object({id:z$1.number()}),vt=z$1.object({...Ht.shape}),jt=z$1.object({id:z$1.number()}),It=z$1.object({...jt.shape}),zt=z$1.object({id:z$1.string()}),Wt=z$1.object({...zt.shape}),Et=z$1.object({id:z$1.number()}),Dt=z$1.object({...Et.shape}),Ce=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:T.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(),minSourceDiversity: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(),expandArticles:z$1.boolean().optional(),splitBy:z$1.enum(["HOUR","DAY","WEEK","MONTH","NONE"])}),Gt=z$1.object({...Ce.shape}),Ae=z$1.object({clusterId:z$1.array(z$1.string()).optional(),from:z$1.date().optional(),to:z$1.date().optional(),sortBy:z$1.enum(["createdAt","triggeredAt"]).optional(),page:z$1.number().optional(),size:z$1.number().optional(),changelogExists:z$1.boolean().optional()}),Bt=z$1.object({...Ae.shape}),Ft=z$1.object({id:z$1.number()}),Ot=z$1.object({...Ft.shape}),He=z$1.object({name:z$1.string().optional(),domain:z$1.string().optional(),page:z$1.string().optional(),size:z$1.string().optional(),sortBy:z$1.string(),sortOrder:z$1.string()}),Nt=z$1.object({...He.shape}),ve=z$1.object({name:z$1.string().optional(),page:z$1.string().optional(),size:z$1.string().optional(),sortBy:z$1.string(),sortOrder:z$1.string()}),Lt=z$1.object({...ve.shape}),je=z$1.object({name:z$1.array(z$1.string()).optional()}),Mt=z$1.object({...je.shape}),Ie=z$1.object({name:z$1.array(z$1.string()).optional()}),Ut=z$1.object({...Ie.shape}),ze=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),desc:z$1.string().optional(),content:z$1.string().optional(),summary: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:F.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(),watchlist:z$1.array(z$1.string()).optional(),excludeWatchlist: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(),excludeSourceCity:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),excludeSourceCounty:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),excludeSourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),excludeSourceState: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()}),$t=z$1.object({...ze.shape}),We=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()}),Kt=z$1.object({...We.shape}),Ee=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()}),Qt=z$1.object({...Ee.shape}),De=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()}),Vt=z$1.object({...De.shape}),Ge=z$1.object({domain:z$1.array(z$1.string()).optional(),name:z$1.string().optional(),sourceGroup:z$1.string().optional(),sortBy:T.optional(),page:z$1.number().optional(),size:z$1.number().optional(),minMonthlyVisits:z$1.number().optional(),maxMonthlyVisits:z$1.number().optional(),minMonthlyPosts:z$1.number().optional(),maxMonthlyPosts:z$1.number().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()}),Jt=z$1.object({...Ge.shape}),Be=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:T.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(),minSourceDiversity: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(),expandArticles:z$1.boolean().optional()}),_t=z$1.object({...Be.shape}),Fe=z$1.object({q:z$1.string().optional(),title:z$1.string().optional(),desc:z$1.string().optional(),content:z$1.string().optional(),summary: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:F.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(),watchlist:z$1.array(z$1.string()).optional(),excludeWatchlist: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(),excludeSourceCity:z$1.array(z$1.string()).optional(),sourceCounty:z$1.array(z$1.string()).optional(),excludeSourceCounty:z$1.array(z$1.string()).optional(),sourceCountry:z$1.array(z$1.string()).optional(),excludeSourceCountry:z$1.array(z$1.string()).optional(),sourceState:z$1.array(z$1.string()).optional(),excludeSourceState: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()}),Yt=z$1.object({summaryBody:fe}),Xt=z$1.object({...Fe.shape,...Yt.shape}),Oe=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()}),Zt=z$1.object({...Oe.shape}),Ne=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.number().optional(),pageviewsTo:z$1.number().optional(),withPageviews:z$1.boolean().optional(),showNumResults:z$1.boolean().optional(),page:z$1.number().optional(),size:z$1.number().optional(),sortBy:z$1.enum(["relevance","revisionTsDesc","revisionTsAsc","pageViewsDesc","pageViewsAsc","scrapedAtDesc","scrapedAtAsc"]).optional()}),eo=z$1.object({...Ne.shape}),to=z$1.object({patchSourceGroupParams:me}),oo=z$1.object({id:z$1.number()}),ao=z$1.object({...to.shape,...oo.shape}),no=z$1.object({updateWatchlistParams:Re}),ro=z$1.object({id:z$1.number()}),io=z$1.object({...no.shape,...ro.shape}),lo=z$1.object({articleSearchParams:ne}),so=z$1.object({...lo.shape}),po=z$1.object({wikipediaSearchParams:Te}),uo=z$1.object({...po.shape}),qe=class extends S{async createSourceGroup(o,a){let i=qt.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/sourceGroups",method:"POST",headers:n,body:i.createSourceGroupParams},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async createWatchlist(o,a){let i=At.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/watchlists",method:"POST",headers:n,body:i.createWatchlistParams},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async deleteSourceGroup(o,a){let i=vt.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"DELETE",headers:n},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async deleteWatchlist(o,a){let i=It.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"DELETE",headers:n},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async getJournalistById(o,a){let i=Wt.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let s=await(await this.request({path:"/v1/journalists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:n},a)).json();return P.parse(s)}async getSourceGroup(o,a){let i=Dt.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:n},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async getStoryCounts(o,a){let i=Gt.parse(o),n=Ce.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/stories/stats",method:"GET",headers:r,query:n},a)).json();return ge.parse(l)}async getStoryHistory(o={},a){let i=Bt.parse(o),n=Ae.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/stories/history",method:"GET",headers:r,query:n},a)).json();return be.parse(l)}async getWatchlist(o,a){let i=Ot.parse(o),n={};if(this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"GET",headers:n},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async listSourceGroups(o,a){let i=Nt.parse(o),n=He.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let s=await this.request({path:"/v1/api/sourceGroups",method:"GET",headers:r,query:n},a),l=s.headers.get("content-type");if(l&&l.includes("application/json"))return await s.json()}async listWatchlists(o,a){let i=Lt.parse(o),n=ve.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let s=await this.request({path:"/v1/api/watchlists",method:"GET",headers:r,query:n},a),l=s.headers.get("content-type");if(l&&l.includes("application/json"))return await s.json()}async resolveSourceGroups(o={},a){let i=Mt.parse(o),n=je.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let s=await this.request({path:"/v1/api/sourceGroups/resolve",method:"GET",headers:r,query:n},a),l=s.headers.get("content-type");if(l&&l.includes("application/json"))return await s.json()}async resolveWatchlists(o={},a){let i=Ut.parse(o),n=Ie.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let s=await this.request({path:"/v1/api/watchlists/resolve",method:"GET",headers:r,query:n},a),l=s.headers.get("content-type");if(l&&l.includes("application/json"))return await s.json()}async searchArticles(o={},a){let i=$t.parse(o),n=ze.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/articles/all",method:"GET",headers:r,query:n},a)).json();return he.parse(l)}async searchCompanies(o={},a){let i=Kt.parse(o),n=We.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/companies/all",method:"GET",headers:r,query:n},a)).json();return ie.parse(l)}async searchJournalists(o={},a){let i=Qt.parse(o),n=Ee.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/journalists/all",method:"GET",headers:r,query:n},a)).json();return ce.parse(l)}async searchPeople(o={},a){let i=Vt.parse(o),n=De.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/people/all",method:"GET",headers:r,query:n},a)).json();return ye.parse(l)}async searchSources(o={},a){let i=Jt.parse(o),n=Ge.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/sources/all",method:"GET",headers:r,query:n},a)).json();return de.parse(l)}async searchStories(o={},a){let i=_t.parse(o),n=Be.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/stories/all",method:"GET",headers:r,query:n},a)).json();return Se.parse(l)}async searchSummarizer(o,a){let i=Xt.parse(o),n=Fe.parse(i),r={};if(r["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/summarize",method:"POST",headers:r,query:n,body:i.summaryBody},a)).json();return xe.parse(l)}async searchTopics(o={},a){let i=Zt.parse(o),n=Oe.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/topics/all",method:"GET",headers:r,query:n},a)).json();return we.parse(l)}async searchWikipedia(o={},a){let i=eo.parse(o),n=Ne.parse(i),r={};if(this.configuration&&this.configuration.accessToken){let p=this.configuration.accessToken,c=await p("apiKeyAuth",[]);c&&(r.Authorization=`Bearer ${c}`);}let l=await(await this.request({path:"/v1/wikipedia/all",method:"GET",headers:r,query:n},a)).json();return Pe.parse(l)}async updateSourceGroup(o,a){let i=ao.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/sourceGroups/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"PATCH",headers:n,body:i.patchSourceGroupParams},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async updateWatchlist(o,a){let i=io.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let r=await this.request({path:"/v1/api/watchlists/{id}".replace("{id}",encodeURIComponent(String(i.id))),method:"PATCH",headers:n,body:i.updateWatchlistParams},a),s=r.headers.get("content-type");if(s&&s.includes("application/json"))return await r.json()}async vectorSearchArticles(o,a){let i=so.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let s=await(await this.request({path:"/v1/vector/news/all",method:"POST",headers:n,body:i.articleSearchParams},a)).json();return re.parse(s)}async vectorSearchWikipedia(o,a){let i=uo.parse(o),n={};if(n["Content-Type"]="application/json",this.configuration&&this.configuration.accessToken){let l=this.configuration.accessToken,p=await l("apiKeyAuth",[]);p&&(n.Authorization=`Bearer ${p}`);}let s=await(await this.request({path:"/v1/vector/wikipedia/all",method:"POST",headers:n,body:i.wikipediaSearchParams},a)).json();return ke.parse(s)}},Ro={Hour:"HOUR",Day:"DAY",Week:"WEEK",Month:"MONTH",None:"NONE"},To={CreatedAt:"createdAt",TriggeredAt:"triggeredAt"},Po={Relevance:"relevance",RevisionTsDesc:"revisionTsDesc",RevisionTsAsc:"revisionTsAsc",PageViewsDesc:"pageViewsDesc",PageViewsAsc:"pageViewsAsc",ScrapedAtDesc:"scrapedAtDesc",ScrapedAtAsc:"scrapedAtAsc"};var k="perigon-signature";var q=class{constructor(){this.encoder=new TextEncoder;}},C=class extends q{constructor(o){super(),this.byteHexMapping=new Array(256);for(let a=0;a<this.byteHexMapping.length;a++)this.byteHexMapping[a]=a.toString(16).padStart(2,"0");this.subtleCrypto=o??crypto.subtle;}computeHMACSignature(o,a){throw new Error("SubtleCryptoProvider cannot be used in a synchronous context.")}async computeHMACSignatureAsync(o,a){let i=await this.subtleCrypto.importKey("raw",this.encoder.encode(a),{name:"HMAC",hash:{name:"SHA-256"}},false,["sign"]),n=await this.subtleCrypto.sign("hmac",i,this.encoder.encode(o)),r=new Uint8Array(n),s=new Array(r.length);for(let l=0;l<r.length;l++)s[l]=this.byteHexMapping[r[l]];return s.join("")}secureCompareEqualLength(o,a){let i=0;for(let n=0;n<o.length;++n)i|=o.charCodeAt(n)^a.charCodeAt(n);return i===0}secureCompare(o,a){return o.length===a.length?this.secureCompareEqualLength(o,a):this.secureCompareEqualLength(o,o)}};var A=z$1.object({signal_id:z$1.number(),signal_notification_id:z$1.number(),contact_point_notification_id:z$1.number(),sent_at:z$1.string().datetime(),metadata:z$1.record(z$1.any())});var co="v1",mo="t",Le="Signature hash does not match the expected signature hash for payload.",Me="Timestamp outside the tolerance zone.",m=class extends Error{},H=class{constructor(o){this.cryptoProvider=o;this.decoder=new TextDecoder("utf8");}verifyHeader(o,a,i,n){let{signature:r,timestamp:s}=this.parseHeader(a);if(s<Date.now()-n)throw new m(Me);let l=this.computeSignature(o,s,i);if(!this.cryptoProvider.secureCompare(l,r))throw new m(Le)}async verifyHeaderAsync(o,a,i,n){let{signature:r,timestamp:s}=this.parseHeader(a);if(s<Date.now()-n)throw new m(Me);let l=await this.computeSignatureAsync(o,s,i);if(!this.cryptoProvider.secureCompare(l,r))throw new m(Le)}parseHeader(o){if(o==null||o=="")throw new m(`No ${k} header value was provided.`);if(Array.isArray(o))throw new m(`Unexpected: An array was passed as a header, which should not be possible for the ${k} header.`);let a=o instanceof Uint8Array?this.decoder.decode(o):o,[i,n]=a.split(",");if(typeof i>"u"||typeof n>"u")throw new m("Signature or timestamp missing");let[r,s]=i.split("="),l=parseInt(s,10);if(r!==mo||Number.isNaN(l))throw new m("Unable to extract timestamp from header");let[p,c]=n.split("=");if(p!==co||!c)throw new m("No signature found with expected schema.");return {signature:c,timestamp:l}}computeSignedPayload(o,a){if(!o)throw new m("No webhook payload was provided.");let i=o instanceof Uint8Array?this.decoder.decode(o):o;return `${a}.${i}`}computeSignature(o,a,i){let n=this.computeSignedPayload(o,a);return this.cryptoProvider.computeHMACSignature(n,i)}async computeSignatureAsync(o,a,i){let n=this.computeSignedPayload(o,a);return await this.cryptoProvider.computeHMACSignatureAsync(n,i)}};var Ue=5*60*1e3,L=class{constructor(o){this.decoder=new TextDecoder("utf8");this.signatureProvider=new H(o??new C);}constructEvent(o,a,i,n){this.signatureProvider.verifyHeader(o,a,i,n??Ue);let r=this.parseVerifiedPayload(o);return A.parse(r)}async constructEventAsync(o,a,i,n){await this.signatureProvider.verifyHeaderAsync(o,a,i,n??Ue);let r=this.parseVerifiedPayload(o);return A.parseAsync(r)}parseVerifiedPayload(o){return o instanceof Uint8Array?JSON.parse(this.decoder.decode(o)):JSON.parse(o)}};
|
|
2
|
+
export{So as AllEndpointSortBy,F as AllEndpointSortBySchema,N as ArticleSchema,lt as ArticleSearchFilterSchema,ne as ArticleSearchParamsSchema,re as ArticlesVectorSearchResultSchema,$e as BASE_PATH,I as BadRequestError,S as BaseAPI,yo as COLLECTION_FORMATS,B as CategoryHolderSchema,Ye as CategoryWithScoreHolderSchema,at as CompanyCountSchema,V as CompanyHolderSchema,ct as CompanySchema,ie as CompanySearchResultSchema,v as Configuration,Q as CoordinateFilterSchema,Z as CoordinateSchema,kt as CreateSourceGroupBodySchema,le as CreateSourceGroupParamsSchema,qt as CreateSourceGroupRequestSchema,Ct as CreateWatchlistBodySchema,ue as CreateWatchlistParamsSchema,At as CreateWatchlistRequestSchema,q as CryptoProvider,Ke as DefaultConfig,Ht as DeleteSourceGroupPathSchema,vt as DeleteSourceGroupRequestSchema,jt as DeleteWatchlistPathSchema,It as DeleteWatchlistRequestSchema,Xe as EntityHolderSchema,fo as ErrorResponseSchema,Ze as EventTypeHolderSchema,j as FetchError,W as ForbiddenError,zt as GetJournalistByIdPathSchema,Wt as GetJournalistByIdRequestSchema,Et as GetSourceGroupPathSchema,Dt as GetSourceGroupRequestSchema,Ce as GetStoryCountsQuerySchema,Gt as GetStoryCountsRequestSchema,Ro as GetStoryCountsSplitByEnum,Ae as GetStoryHistoryQuerySchema,Bt as GetStoryHistoryRequestSchema,To as GetStoryHistorySortByEnum,Ft as GetWatchlistPathSchema,Ot as GetWatchlistRequestSchema,y as HttpError,et as IdNameHolderSchema,R as ImageHolderSchema,P as JournalistSchema,ce as JournalistSearchResultSchema,J as KeyPointSchema,tt as KeywordHolderSchema,ot as LabelHolderSchema,He as ListSourceGroupsQuerySchema,Nt as ListSourceGroupsRequestSchema,ve as ListWatchlistsQuerySchema,Lt as ListWatchlistsRequestSchema,nt as LocationCountSchema,O as LocationHolderSchema,g as NameCountSchema,U as NetworkError,ae as NewsClusterSchema,E as NotFoundError,me as PatchSourceGroupParamsSchema,ye as PeopleSearchResultSchema,rt as PersonCountSchema,_ as PersonHolderSchema,ht as PersonSchema,it as PlaceSchema,he as QuerySearchResultSchema,Y as QuestionSchema,D as RateLimitError,x as RecordStatHolderSchema,je as ResolveSourceGroupsQuerySchema,Mt as ResolveSourceGroupsRequestSchema,Ie as ResolveWatchlistsQuerySchema,Ut as ResolveWatchlistsRequestSchema,st as ScoredDataArticleSchema,gt as ScoredDataWikiDataSchema,ze as SearchArticlesQuerySchema,$t as SearchArticlesRequestSchema,We as SearchCompaniesQuerySchema,Kt as SearchCompaniesRequestSchema,Ee as SearchJournalistsQuerySchema,Qt as SearchJournalistsRequestSchema,De as SearchPeopleQuerySchema,Vt as SearchPeopleRequestSchema,Ge as SearchSourcesQuerySchema,Jt as SearchSourcesRequestSchema,Be as SearchStoriesQuerySchema,_t as SearchStoriesRequestSchema,Yt as SearchSummarizerBodySchema,Fe as SearchSummarizerQuerySchema,Xt as SearchSummarizerRequestSchema,Oe as SearchTopicsQuerySchema,Zt as SearchTopicsRequestSchema,Ne as SearchWikipediaQuerySchema,eo as SearchWikipediaRequestSchema,Po as SearchWikipediaSortByEnum,X as SentimentHolderSchema,G as ServerError,bo as SortBy,T as SortBySchema,te as SourceHolderSchema,ee as SourceLocationSchema,bt as SourceSchema,de as SourceSearchResultSchema,w as SourceTopStatHolderSchema,ge as StatResultSchema,St as StoryHistoryRecordSchema,be as StoryHistoryResultSchema,Se as StorySearchResultSchema,fe as SummaryBodySchema,xe as SummarySearchResultSchema,pt as SymbolHolderSchema,xt as TopicDtoSchema,oe as TopicHolderSchema,ft as TopicLabelsSchema,we as TopicSearchResultSchema,z as UnauthorizedError,to as UpdateSourceGroupBodySchema,oo as UpdateSourceGroupPathSchema,ao as UpdateSourceGroupRequestSchema,no as UpdateWatchlistBodySchema,Re as UpdateWatchlistParamsSchema,ro as UpdateWatchlistPathSchema,io as UpdateWatchlistRequestSchema,qe as V1Api,lo as VectorSearchArticlesBodySchema,so as VectorSearchArticlesRequestSchema,po as VectorSearchWikipediaBodySchema,uo as VectorSearchWikipediaRequestSchema,k as WEBHOOK_HEADER,se as WatchlistCompanySchema,pe as WatchlistPersonSchema,ut as WebResourcesSchema,A as WebhookEventSchema,L as Webhooks,dt as WikiDataSchema,Rt as WikiPageSchema,wt as WikiPageSectionHolderSchema,d as WikidataDateHolderSchema,b as WikidataLabelHolderSchema,mt as WikidataPoliticalPartyHolderSchema,yt as WikidataPositionHolderSchema,Tt as WikipediaSearchFilterSchema,Te as WikipediaSearchParamsSchema,Pe as WikipediaSearchResultSchema,ke as WikipediaVectorSearchResultSchema,Qe as createHttpError,ho as exists,$ as querystring};//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|