Skip to content

Commit

Permalink
🖍
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed Jul 22, 2024
1 parent 2b1bd8c commit 410f973
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 36 deletions.
3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 7 additions & 22 deletions src/services/clearbit-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,35 +124,16 @@ export namespace clearbit {

export type EmailLookupResponse = Partial<{
id: string
name: Partial<{
fullName: string
givenName: string
familyName: string
}>
name: Partial<Name>
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<GeoIP>
bio: string
site: string
avatar: string
employment: Partial<{
domain: string
name: string
title: string
role: string
subRole: string
seniority: string
}>
employment: Partial<EmploymentAttributes>
facebook: {
handle: string
}
Expand Down Expand Up @@ -271,6 +252,8 @@ export namespace clearbit {
startDate?: string
endDate?: string
present?: boolean
location?: string
email?: string
highlight?: boolean
}

Expand Down Expand Up @@ -354,6 +337,8 @@ export namespace clearbit {
stateCode: string
country: string
countryCode: string
lat?: number
lng?: number
}

export interface CompanyRevealResponse {
Expand Down
7 changes: 4 additions & 3 deletions src/services/diffbot-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,13 @@ export namespace diffbot {

export interface Employment {
isCurrent?: boolean
title?: string
description?: string
employer?: BasicEntity
from?: DateTime
location?: Location
categories?: Partial<BasicEntity>[]
title?: string
from?: DateTime
to?: DateTime
location?: Location
}

export interface Location {
Expand Down
18 changes: 9 additions & 9 deletions src/services/proxycurl-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1877,7 +1877,7 @@ export namespace proxycurl {
summary: z.string().optional(),
volunteer_work: z.array(StickyVolunteeringExperienceSchema).optional()
})
export type PublicPerson = z.infer<typeof PublicPersonSchema>
export type PersonProfile = z.infer<typeof PersonProfileSchema>

export const PurpleAcquisitionSchema = z.object({
acquired: z.array(PurpleAcquiredCompanySchema).optional(),
Expand Down Expand Up @@ -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<typeof SearchResultSchema>

Expand Down Expand Up @@ -2119,12 +2119,12 @@ export class ProxycurlClient extends AIFunctionsProvider {
})
async getLinkedInPerson(
opts: proxycurl.PersonProfileEndpointParamsQueryClass
) {
): Promise<proxycurl.PersonProfile> {
return this.ky
.get('api/v2/linkedin', {
searchParams: sanitizeSearchParams(opts)
})
.json<proxycurl.PublicPerson>()
.json<proxycurl.PersonProfile>()
}

@aiFunction({
Expand All @@ -2135,15 +2135,15 @@ export class ProxycurlClient extends AIFunctionsProvider {
})
async resolveLinkedInPerson(
opts: proxycurl.PersonLookupEndpointParamsQueryClass
) {
): Promise<proxycurl.PersonProfile> {
return this.ky
.get('api/linkedin/profile/resolve', {
searchParams: sanitizeSearchParams({
enrich_profile: 'enrich',
...opts
})
})
.json<proxycurl.PublicPerson>()
.json<proxycurl.PersonProfile>()
}

@aiFunction({
Expand Down Expand Up @@ -2173,15 +2173,15 @@ export class ProxycurlClient extends AIFunctionsProvider {
})
async resolveLinkedInPersonAtCompanyByRole(
opts: proxycurl.RoleLookupEndpointParamsQueryClass
) {
): Promise<proxycurl.PersonProfile> {
return this.ky
.get('api/find/company/role/', {
searchParams: sanitizeSearchParams({
enrich_profile: 'enrich',
...opts
})
})
.json<proxycurl.PublicPerson>()
.json<proxycurl.PersonProfile>()
}

@aiFunction({
Expand Down

0 comments on commit 410f973

Please sign in to comment.