chore: import upstream snapshot with attribution
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
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
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
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,121 @@
|
||||
import type {
|
||||
EnrichSearchPostReactionsParams,
|
||||
EnrichSearchPostReactionsResponse,
|
||||
} from '@/tools/enrich/types'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const searchPostReactionsTool: ToolConfig<
|
||||
EnrichSearchPostReactionsParams,
|
||||
EnrichSearchPostReactionsResponse
|
||||
> = {
|
||||
id: 'enrich_search_post_reactions',
|
||||
name: 'Enrich Search Post Reactions',
|
||||
description: 'Get reactions on a LinkedIn post with filtering by reaction type.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'Enrich API key',
|
||||
},
|
||||
postUrn: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'LinkedIn activity URN (e.g., urn:li:activity:7231931952839196672)',
|
||||
},
|
||||
reactionType: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description:
|
||||
'Reaction type filter: all, like, love, celebrate, insightful, or funny (default: all)',
|
||||
},
|
||||
page: {
|
||||
type: 'number',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Page number (starts at 1)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
url: (params) => {
|
||||
const url = new URL('https://api.enrich.so/v1/api/search-reactions')
|
||||
url.searchParams.append('post_urn', params.postUrn.trim())
|
||||
url.searchParams.append('reaction_type', params.reactionType)
|
||||
url.searchParams.append('page', String(params.page))
|
||||
return url.toString()
|
||||
},
|
||||
method: 'GET',
|
||||
headers: (params) => ({
|
||||
Authorization: `Bearer ${params.apiKey}`,
|
||||
'Content-Type': 'application/json',
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
const resultData = data.data ?? {}
|
||||
|
||||
const reactions =
|
||||
resultData.data?.map((reaction: any) => ({
|
||||
reactionType: reaction.reaction_type ?? '',
|
||||
reactor: {
|
||||
name: reaction.reactor?.name ?? null,
|
||||
subTitle: reaction.reactor?.sub_title ?? null,
|
||||
profileId: reaction.reactor?.profile_id ?? null,
|
||||
profilePicture: reaction.reactor?.profile_picture ?? null,
|
||||
linkedInUrl: reaction.reactor?.li_url ?? null,
|
||||
},
|
||||
})) ?? []
|
||||
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
page: resultData.page ?? 1,
|
||||
totalPage: resultData.total_page ?? 1,
|
||||
count: resultData.num ?? reactions.length,
|
||||
reactions,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
page: {
|
||||
type: 'number',
|
||||
description: 'Current page number',
|
||||
},
|
||||
totalPage: {
|
||||
type: 'number',
|
||||
description: 'Total number of pages',
|
||||
},
|
||||
count: {
|
||||
type: 'number',
|
||||
description: 'Number of reactions returned',
|
||||
},
|
||||
reactions: {
|
||||
type: 'array',
|
||||
description: 'Reactions',
|
||||
items: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
reactionType: { type: 'string', description: 'Type of reaction' },
|
||||
reactor: {
|
||||
type: 'object',
|
||||
description: 'Person who reacted',
|
||||
properties: {
|
||||
name: { type: 'string', description: 'Name' },
|
||||
subTitle: { type: 'string', description: 'Job title' },
|
||||
profileId: { type: 'string', description: 'Profile ID' },
|
||||
profilePicture: { type: 'string', description: 'Profile picture URL' },
|
||||
linkedInUrl: { type: 'string', description: 'LinkedIn URL' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user