diff --git a/readme.md b/readme.md index d0e232ceb..db68052b2 100644 --- a/readme.md +++ b/readme.md @@ -219,14 +219,13 @@ See the [examples](./examples) directory for examples of how to use each of thes - investigate [autotool](https://github.com/run-llama/LlamaIndexTS/tree/main/packages/autotool) - investigate [alt search engines](https://seirdy.one/posts/2021/03/10/search-engines-with-own-indexes/) - investigate [data connectors](https://github.com/mendableai/data-connectors) +- add unit tests for individual providers ## Contributors - [Travis Fischer](https://x.com/transitive_bs) -- [Kevin Raheja](https://x.com/crabfisher) - [David Zhang](https://x.com/dzhng) - [Philipp Burckhardt](https://x.com/burckhap) -- [Riley Tomasek](https://x.com/rileytomasek) - And all of the [amazing OSS contributors](https://github.com/transitive-bullshit/agentic/graphs/contributors)! ## License diff --git a/src/services/clearbit-client.ts b/src/services/clearbit-client.ts index 5631cca22..f94b6601c 100644 --- a/src/services/clearbit-client.ts +++ b/src/services/clearbit-client.ts @@ -124,35 +124,16 @@ export namespace clearbit { export type EmailLookupResponse = Partial<{ id: string - name: Partial<{ - fullName: string - givenName: string - familyName: string - }> + name: Partial email: string location: string timeZone: string utcOffset: number - geo: Partial<{ - city: string - state: string - stateCode: string - country: string - countryCode: string - lat: number - lng: number - }> + geo: Partial bio: string site: string avatar: string - employment: Partial<{ - domain: string - name: string - title: string - role: string - subRole: string - seniority: string - }> + employment: Partial facebook: { handle: string } @@ -271,6 +252,8 @@ export namespace clearbit { startDate?: string endDate?: string present?: boolean + location?: string + email?: string highlight?: boolean } @@ -354,6 +337,8 @@ export namespace clearbit { stateCode: string country: string countryCode: string + lat?: number + lng?: number } export interface CompanyRevealResponse { diff --git a/src/services/diffbot-client.ts b/src/services/diffbot-client.ts index e21d2ca18..999c4b5a4 100644 --- a/src/services/diffbot-client.ts +++ b/src/services/diffbot-client.ts @@ -573,12 +573,13 @@ export namespace diffbot { export interface Employment { isCurrent?: boolean + title?: string + description?: string employer?: BasicEntity - from?: DateTime + location?: Location categories?: Partial[] - title?: string + from?: DateTime to?: DateTime - location?: Location } export interface Location { diff --git a/src/services/proxycurl-client.ts b/src/services/proxycurl-client.ts index cd8d016c2..64034e40f 100644 --- a/src/services/proxycurl-client.ts +++ b/src/services/proxycurl-client.ts @@ -1839,7 +1839,7 @@ export namespace proxycurl { typeof ReverseEmailUrlEnrichResultProfileSchema > - export const PublicPersonSchema = z.object({ + export const PersonProfileSchema = z.object({ accomplishment_courses: z.array(StickyCourseSchema).optional(), accomplishment_honors_awards: z.array(StickyHonourAwardSchema).optional(), accomplishment_organisations: z @@ -1877,7 +1877,7 @@ export namespace proxycurl { summary: z.string().optional(), volunteer_work: z.array(StickyVolunteeringExperienceSchema).optional() }) - export type PublicPerson = z.infer + export type PersonProfile = z.infer export const PurpleAcquisitionSchema = z.object({ acquired: z.array(PurpleAcquiredCompanySchema).optional(), @@ -1930,7 +1930,7 @@ export namespace proxycurl { export const SearchResultSchema = z.object({ last_updated: z.string().optional(), linkedin_profile_url: z.string().optional(), - profile: PublicPersonSchema.optional() + profile: PersonProfileSchema.optional() }) export type SearchResult = z.infer @@ -2119,12 +2119,12 @@ export class ProxycurlClient extends AIFunctionsProvider { }) async getLinkedInPerson( opts: proxycurl.PersonProfileEndpointParamsQueryClass - ) { + ): Promise { return this.ky .get('api/v2/linkedin', { searchParams: sanitizeSearchParams(opts) }) - .json() + .json() } @aiFunction({ @@ -2135,7 +2135,7 @@ export class ProxycurlClient extends AIFunctionsProvider { }) async resolveLinkedInPerson( opts: proxycurl.PersonLookupEndpointParamsQueryClass - ) { + ): Promise { return this.ky .get('api/linkedin/profile/resolve', { searchParams: sanitizeSearchParams({ @@ -2143,7 +2143,7 @@ export class ProxycurlClient extends AIFunctionsProvider { ...opts }) }) - .json() + .json() } @aiFunction({ @@ -2173,7 +2173,7 @@ export class ProxycurlClient extends AIFunctionsProvider { }) async resolveLinkedInPersonAtCompanyByRole( opts: proxycurl.RoleLookupEndpointParamsQueryClass - ) { + ): Promise { return this.ky .get('api/find/company/role/', { searchParams: sanitizeSearchParams({ @@ -2181,7 +2181,7 @@ export class ProxycurlClient extends AIFunctionsProvider { ...opts }) }) - .json() + .json() } @aiFunction({