kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
fix: proxycurl return types bug
rodzic
57c168d117
commit
f700727e80
|
@ -1879,6 +1879,16 @@ export namespace proxycurl {
|
||||||
})
|
})
|
||||||
export type PersonProfile = z.infer<typeof PersonProfileSchema>
|
export type PersonProfile = z.infer<typeof PersonProfileSchema>
|
||||||
|
|
||||||
|
export type ResolvedPersonProfile = {
|
||||||
|
profile: PersonProfile
|
||||||
|
url?: string
|
||||||
|
name_similarity_score?: number
|
||||||
|
company_similarity_score?: number
|
||||||
|
title_similarity_score?: number
|
||||||
|
location_similarity_score?: number
|
||||||
|
last_updated?: string
|
||||||
|
}
|
||||||
|
|
||||||
export const PurpleAcquisitionSchema = z.object({
|
export const PurpleAcquisitionSchema = z.object({
|
||||||
acquired: z.array(PurpleAcquiredCompanySchema).optional(),
|
acquired: z.array(PurpleAcquiredCompanySchema).optional(),
|
||||||
acquired_by: PurpleAcquisitorSchema.optional()
|
acquired_by: PurpleAcquisitorSchema.optional()
|
||||||
|
@ -2135,15 +2145,16 @@ export class ProxycurlClient extends AIFunctionsProvider {
|
||||||
})
|
})
|
||||||
async resolveLinkedInPerson(
|
async resolveLinkedInPerson(
|
||||||
opts: proxycurl.PersonLookupEndpointParamsQueryClass
|
opts: proxycurl.PersonLookupEndpointParamsQueryClass
|
||||||
): Promise<proxycurl.PersonProfile> {
|
): Promise<proxycurl.ResolvedPersonProfile> {
|
||||||
return this.ky
|
return this.ky
|
||||||
.get('api/linkedin/profile/resolve', {
|
.get('api/linkedin/profile/resolve', {
|
||||||
searchParams: sanitizeSearchParams({
|
searchParams: sanitizeSearchParams({
|
||||||
|
similarity_checks: 'include',
|
||||||
enrich_profile: 'enrich',
|
enrich_profile: 'enrich',
|
||||||
...opts
|
...opts
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.json<proxycurl.PersonProfile>()
|
.json<proxycurl.ResolvedPersonProfile>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@aiFunction({
|
@aiFunction({
|
||||||
|
@ -2173,7 +2184,7 @@ export class ProxycurlClient extends AIFunctionsProvider {
|
||||||
})
|
})
|
||||||
async resolveLinkedInPersonAtCompanyByRole(
|
async resolveLinkedInPersonAtCompanyByRole(
|
||||||
opts: proxycurl.RoleLookupEndpointParamsQueryClass
|
opts: proxycurl.RoleLookupEndpointParamsQueryClass
|
||||||
): Promise<proxycurl.PersonProfile> {
|
): Promise<proxycurl.ResolvedPersonProfile> {
|
||||||
return this.ky
|
return this.ky
|
||||||
.get('api/find/company/role/', {
|
.get('api/find/company/role/', {
|
||||||
searchParams: sanitizeSearchParams({
|
searchParams: sanitizeSearchParams({
|
||||||
|
@ -2181,7 +2192,7 @@ export class ProxycurlClient extends AIFunctionsProvider {
|
||||||
...opts
|
...opts
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.json<proxycurl.PersonProfile>()
|
.json<proxycurl.ResolvedPersonProfile>()
|
||||||
}
|
}
|
||||||
|
|
||||||
@aiFunction({
|
@aiFunction({
|
||||||
|
|
Ładowanie…
Reference in New Issue