d25d482dc2
Publish CLI Package / publish-npm (push) Waiting to run
Publish Python SDK / publish-pypi (push) Waiting to run
Publish TypeScript SDK / publish-npm (push) Waiting to run
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
134 lines
4.2 KiB
TypeScript
134 lines
4.2 KiB
TypeScript
import type {
|
|
EnrichSalesPointerPeopleParams,
|
|
EnrichSalesPointerPeopleResponse,
|
|
} from '@/tools/enrich/types'
|
|
import type { ToolConfig } from '@/tools/types'
|
|
|
|
export const salesPointerPeopleTool: ToolConfig<
|
|
EnrichSalesPointerPeopleParams,
|
|
EnrichSalesPointerPeopleResponse
|
|
> = {
|
|
id: 'enrich_sales_pointer_people',
|
|
name: 'Enrich Sales Pointer People',
|
|
description:
|
|
'Advanced people search with complex filters for location, company size, seniority, experience, and more.',
|
|
version: '1.0.0',
|
|
|
|
params: {
|
|
apiKey: {
|
|
type: 'string',
|
|
required: true,
|
|
visibility: 'user-only',
|
|
description: 'Enrich API key',
|
|
},
|
|
page: {
|
|
type: 'number',
|
|
required: true,
|
|
visibility: 'user-or-llm',
|
|
description: 'Page number (starts at 1)',
|
|
},
|
|
filters: {
|
|
type: 'json',
|
|
required: true,
|
|
visibility: 'user-or-llm',
|
|
description:
|
|
'Array of filter objects. Each filter has type (e.g., POSTAL_CODE, COMPANY_HEADCOUNT), values (array with id, text, selectionType: INCLUDED/EXCLUDED), and optional selectedSubFilter',
|
|
},
|
|
},
|
|
|
|
request: {
|
|
url: 'https://api.enrich.so/v1/api/sales-pointer/people',
|
|
method: 'POST',
|
|
headers: (params) => ({
|
|
Authorization: `Bearer ${params.apiKey}`,
|
|
'Content-Type': 'application/json',
|
|
}),
|
|
body: (params) => ({
|
|
page: params.page,
|
|
filters: params.filters,
|
|
}),
|
|
},
|
|
|
|
transformResponse: async (response: Response) => {
|
|
const data = await response.json()
|
|
const resultData = data.data ?? {}
|
|
|
|
const profiles =
|
|
resultData.data?.map((person: any) => ({
|
|
name:
|
|
person.fullName ??
|
|
person.name ??
|
|
(person.firstName && person.lastName ? `${person.firstName} ${person.lastName}` : null),
|
|
summary: person.summary ?? person.headline ?? null,
|
|
location: person.location ?? person.geoRegion ?? null,
|
|
profilePicture:
|
|
person.profilePicture ?? person.profile_picture ?? person.profilePictureUrl ?? null,
|
|
linkedInUrn: person.linkedInUrn ?? person.linkedin_urn ?? person.urn ?? null,
|
|
positions: (person.positions ?? person.experience ?? []).map((pos: any) => ({
|
|
title: pos.title ?? '',
|
|
company: pos.companyName ?? pos.company ?? '',
|
|
})),
|
|
education: (person.education ?? []).map((edu: any) => ({
|
|
school: edu.schoolName ?? edu.school ?? '',
|
|
degree: edu.degreeName ?? edu.degree ?? null,
|
|
})),
|
|
})) ?? []
|
|
|
|
return {
|
|
success: true,
|
|
output: {
|
|
data: profiles,
|
|
pagination: {
|
|
totalCount: resultData.pagination?.total ?? 0,
|
|
returnedCount: resultData.pagination?.returned ?? 0,
|
|
start: resultData.pagination?.start ?? 0,
|
|
limit: resultData.pagination?.limit ?? 0,
|
|
},
|
|
},
|
|
}
|
|
},
|
|
|
|
outputs: {
|
|
data: {
|
|
type: 'array',
|
|
description: 'People results',
|
|
items: {
|
|
type: 'object',
|
|
properties: {
|
|
name: { type: 'string', description: 'Full name' },
|
|
summary: { type: 'string', description: 'Professional summary' },
|
|
location: { type: 'string', description: 'Location' },
|
|
profilePicture: { type: 'string', description: 'Profile picture URL' },
|
|
linkedInUrn: { type: 'string', description: 'LinkedIn URN' },
|
|
positions: {
|
|
type: 'array',
|
|
description: 'Work positions',
|
|
properties: {
|
|
title: { type: 'string', description: 'Job title' },
|
|
company: { type: 'string', description: 'Company' },
|
|
},
|
|
},
|
|
education: {
|
|
type: 'array',
|
|
description: 'Education',
|
|
properties: {
|
|
school: { type: 'string', description: 'School' },
|
|
degree: { type: 'string', description: 'Degree' },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
pagination: {
|
|
type: 'json',
|
|
description: 'Pagination info',
|
|
properties: {
|
|
totalCount: { type: 'number', description: 'Total results' },
|
|
returnedCount: { type: 'number', description: 'Returned count' },
|
|
start: { type: 'number', description: 'Start position' },
|
|
limit: { type: 'number', description: 'Limit' },
|
|
},
|
|
},
|
|
},
|
|
}
|