chore: import upstream snapshot with attribution
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
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
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import type { Rb2bCreditCheckParams, Rb2bCreditCheckResponse } from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bCreditCheckTool: ToolConfig<Rb2bCreditCheckParams, Rb2bCreditCheckResponse> = {
|
||||
id: 'rb2b_credit_check',
|
||||
name: 'RB2B Credit Check',
|
||||
description: 'Check the number of API credits remaining on your RB2B account.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'GET',
|
||||
url: `${RB2B_API_BASE}/credits`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
credits_remaining: data.credits_remaining ?? 0,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
credits_remaining: {
|
||||
type: 'number',
|
||||
description: 'Number of API credits remaining on the account',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import {
|
||||
RB2B_ACTIVITY_RESULT_OUTPUT_PROPERTIES,
|
||||
type Rb2bEmailActivityParams,
|
||||
type Rb2bEmailActivityResponse,
|
||||
} from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bEmailToActivityTool: ToolConfig<
|
||||
Rb2bEmailActivityParams,
|
||||
Rb2bEmailActivityResponse
|
||||
> = {
|
||||
id: 'rb2b_email_to_activity',
|
||||
name: 'RB2B Email to Last Active Date',
|
||||
description: 'Return the last known active date for an email address.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
email: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The email address to look up',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/email_to_activity`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => ({ email: params.email }),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
results: data.results ?? [],
|
||||
match_count: data.match_count ?? 0,
|
||||
credits_charged: data.credits_charged ?? 0,
|
||||
credits_exhausted: data.credits_exhausted ?? false,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
results: {
|
||||
type: 'array',
|
||||
description: 'Activity records for the email',
|
||||
items: { type: 'object', properties: RB2B_ACTIVITY_RESULT_OUTPUT_PROPERTIES },
|
||||
},
|
||||
match_count: { type: 'number', description: 'Number of matches found' },
|
||||
credits_charged: { type: 'number', description: 'Credits charged for this request' },
|
||||
credits_exhausted: { type: 'boolean', description: 'Whether the account is out of credits' },
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
import type { Rb2bIdentifierParams, Rb2bLinkedinUrlResponse } from '@/tools/rb2b/types'
|
||||
import { buildIdentifierBody, RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bHemToBestLinkedinTool: ToolConfig<Rb2bIdentifierParams, Rb2bLinkedinUrlResponse> =
|
||||
{
|
||||
id: 'rb2b_hem_to_best_linkedin',
|
||||
name: 'RB2B Email/HEM to Best LinkedIn URL',
|
||||
description:
|
||||
'Return the most recently active LinkedIn profile URL for an email address or MD5-hashed email.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
email: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'A plaintext email address or an MD5 hash of the email',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/hem_to_best_linkedin`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => buildIdentifierBody(params.email),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
linkedin_url: data.results?.linkedin_url ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
linkedin_url: {
|
||||
type: 'string',
|
||||
description: 'Best LinkedIn profile URL for the email',
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
import {
|
||||
RB2B_BUSINESS_PROFILE_OUTPUT_PROPERTIES,
|
||||
type Rb2bBusinessProfileResponse,
|
||||
type Rb2bIdentifierParams,
|
||||
} from '@/tools/rb2b/types'
|
||||
import { buildIdentifierBody, RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bHemToBusinessProfileTool: ToolConfig<
|
||||
Rb2bIdentifierParams,
|
||||
Rb2bBusinessProfileResponse
|
||||
> = {
|
||||
id: 'rb2b_hem_to_business_profile',
|
||||
name: 'RB2B Email/HEM to Business Profile',
|
||||
description:
|
||||
'Return a full business profile (name, title, company, industry, seniority and more) for an email address or MD5-hashed email.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
email: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'A plaintext email address or an MD5 hash of the email',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/hem_to_business_profile`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => buildIdentifierBody(params.email),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
const result = data.result ?? {}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
first_name: result.first_name ?? undefined,
|
||||
last_name: result.last_name ?? undefined,
|
||||
title: result.title ?? undefined,
|
||||
seniority: result.seniority ?? undefined,
|
||||
linkedinurl: result.linkedinurl ?? undefined,
|
||||
link_email: result.link_email ?? undefined,
|
||||
work_email_confirmed: result.work_email_confirmed ?? undefined,
|
||||
personal_emails: result.personal_emails ?? [],
|
||||
current_company: result.current_company ?? undefined,
|
||||
current_company_url: result.current_company_url ?? undefined,
|
||||
current_company_linkedinurl: result.current_company_linkedinurl ?? undefined,
|
||||
current_industry: result.current_industry ?? undefined,
|
||||
functional_area: result.functional_area ?? undefined,
|
||||
country: result.country ?? undefined,
|
||||
company_employee_count: result.company_employee_count ?? undefined,
|
||||
company_employee_range: result.company_employee_range ?? undefined,
|
||||
company_revenue_range: result.company_revenue_range ?? undefined,
|
||||
md5: result.md5 ?? undefined,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: RB2B_BUSINESS_PROFILE_OUTPUT_PROPERTIES,
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import type { Rb2bIdentifierParams, Rb2bLinkedinSlugResponse } from '@/tools/rb2b/types'
|
||||
import { buildIdentifierBody, RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bHemToLinkedinTool: ToolConfig<Rb2bIdentifierParams, Rb2bLinkedinSlugResponse> = {
|
||||
id: 'rb2b_hem_to_linkedin',
|
||||
name: 'RB2B Email/HEM to LinkedIn Slug',
|
||||
description:
|
||||
'Return the LinkedIn slug (the profile identifier portion of the URL) for an email address or MD5-hashed email.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
email: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'A plaintext email address or an MD5 hash of the email',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/hem_to_linkedin`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => buildIdentifierBody(params.email),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
linkedin_slug: data.results?.linkedin_slug ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
linkedin_slug: {
|
||||
type: 'string',
|
||||
description: 'LinkedIn slug for the email',
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
import {
|
||||
RB2B_MAID_RESULT_OUTPUT_PROPERTIES,
|
||||
type Rb2bIdentifierParams,
|
||||
type Rb2bMaidResponse,
|
||||
} from '@/tools/rb2b/types'
|
||||
import { buildIdentifierBody, RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bHemToMaidTool: ToolConfig<Rb2bIdentifierParams, Rb2bMaidResponse> = {
|
||||
id: 'rb2b_hem_to_maid',
|
||||
name: 'RB2B Email/HEM to MAID',
|
||||
description:
|
||||
'Return up to five mobile advertising identifiers (MAIDs) associated with an email address or MD5-hashed email.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
email: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'A plaintext email address or an MD5 hash of the email',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/hem_to_maid`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => buildIdentifierBody(params.email),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
results: data.results ?? [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
results: {
|
||||
type: 'array',
|
||||
description: 'Mobile advertising identifiers associated with the email',
|
||||
items: { type: 'object', properties: RB2B_MAID_RESULT_OUTPUT_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export { rb2bCreditCheckTool } from '@/tools/rb2b/credit-check'
|
||||
export { rb2bEmailToActivityTool } from '@/tools/rb2b/email-to-activity'
|
||||
export { rb2bHemToBestLinkedinTool } from '@/tools/rb2b/hem-to-best-linkedin'
|
||||
export { rb2bHemToBusinessProfileTool } from '@/tools/rb2b/hem-to-business-profile'
|
||||
export { rb2bHemToLinkedinTool } from '@/tools/rb2b/hem-to-linkedin'
|
||||
export { rb2bHemToMaidTool } from '@/tools/rb2b/hem-to-maid'
|
||||
export { rb2bIpToCompanyTool } from '@/tools/rb2b/ip-to-company'
|
||||
export { rb2bIpToHemTool } from '@/tools/rb2b/ip-to-hem'
|
||||
export { rb2bIpToMaidTool } from '@/tools/rb2b/ip-to-maid'
|
||||
export { rb2bLinkedinSlugSearchTool } from '@/tools/rb2b/linkedin-slug-search'
|
||||
export { rb2bLinkedinToBestPersonalEmailTool } from '@/tools/rb2b/linkedin-to-best-personal-email'
|
||||
export { rb2bLinkedinToBusinessProfileTool } from '@/tools/rb2b/linkedin-to-business-profile'
|
||||
export { rb2bLinkedinToHashedEmailsTool } from '@/tools/rb2b/linkedin-to-hashed-emails'
|
||||
export { rb2bLinkedinToMobilePhoneTool } from '@/tools/rb2b/linkedin-to-mobile-phone'
|
||||
export { rb2bLinkedinToPersonalEmailTool } from '@/tools/rb2b/linkedin-to-personal-email'
|
||||
@@ -0,0 +1,54 @@
|
||||
import {
|
||||
RB2B_COMPANY_RESULT_OUTPUT_PROPERTIES,
|
||||
type Rb2bIpToCompanyParams,
|
||||
type Rb2bIpToCompanyResponse,
|
||||
} from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bIpToCompanyTool: ToolConfig<Rb2bIpToCompanyParams, Rb2bIpToCompanyResponse> = {
|
||||
id: 'rb2b_ip_to_company',
|
||||
name: 'RB2B IP to Company',
|
||||
description: 'Identify the company domains associated with an IP address, ranked by confidence.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
ip_address: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The IP address to resolve (IPv4 or IPv6)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/ip_to_company`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => ({ ip_address: params.ip_address }),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
results: data.results ?? [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
results: {
|
||||
type: 'array',
|
||||
description: 'Company domain matches for the IP address',
|
||||
items: { type: 'object', properties: RB2B_COMPANY_RESULT_OUTPUT_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
import {
|
||||
RB2B_HEM_RESULT_OUTPUT_PROPERTIES,
|
||||
type Rb2bIpToHemParams,
|
||||
type Rb2bIpToHemResponse,
|
||||
} from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bIpToHemTool: ToolConfig<Rb2bIpToHemParams, Rb2bIpToHemResponse> = {
|
||||
id: 'rb2b_ip_to_hem',
|
||||
name: 'RB2B IP to HEM',
|
||||
description:
|
||||
'Convert an IP address (and optional user agent) into hashed email addresses (HEM) with accuracy scores.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
ip_address: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The IP address to resolve (IPv4 or IPv6)',
|
||||
},
|
||||
user_agent: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Optional user agent string to improve match accuracy',
|
||||
},
|
||||
include_sha256: {
|
||||
type: 'boolean',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Whether to include SHA-256 hashes in addition to MD5 hashes',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/ip_to_hem`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => {
|
||||
const body: Record<string, any> = { ip_address: params.ip_address }
|
||||
if (params.user_agent) body.user_agent = params.user_agent
|
||||
if (typeof params.include_sha256 === 'boolean') body.include_sha256 = params.include_sha256
|
||||
return body
|
||||
},
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
results: data.results ?? [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
results: {
|
||||
type: 'array',
|
||||
description: 'Up to 3 hashed email matches for the IP address',
|
||||
items: { type: 'object', properties: RB2B_HEM_RESULT_OUTPUT_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import {
|
||||
RB2B_MAID_RESULT_OUTPUT_PROPERTIES,
|
||||
type Rb2bIpToMaidParams,
|
||||
type Rb2bMaidResponse,
|
||||
} from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bIpToMaidTool: ToolConfig<Rb2bIpToMaidParams, Rb2bMaidResponse> = {
|
||||
id: 'rb2b_ip_to_maid',
|
||||
name: 'RB2B IP to MAID',
|
||||
description:
|
||||
'Resolve an IP address (and optional user agent) into mobile advertising identifiers (MAIDs) observed over the last 60 days.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
ip_address: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The IP address to resolve (IPv4 or IPv6)',
|
||||
},
|
||||
user_agent: {
|
||||
type: 'string',
|
||||
required: false,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'Optional user agent string to improve match accuracy',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/ip_to_maid`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => {
|
||||
const body: Record<string, any> = { ip_address: params.ip_address }
|
||||
if (params.user_agent) body.user_agent = params.user_agent
|
||||
return body
|
||||
},
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
results: data.results ?? [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
results: {
|
||||
type: 'array',
|
||||
description: 'Mobile advertising identifiers observed for the IP address',
|
||||
items: { type: 'object', properties: RB2B_MAID_RESULT_OUTPUT_PROPERTIES },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
import type {
|
||||
Rb2bLinkedinSlugSearchParams,
|
||||
Rb2bLinkedinSlugSearchResponse,
|
||||
} from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bLinkedinSlugSearchTool: ToolConfig<
|
||||
Rb2bLinkedinSlugSearchParams,
|
||||
Rb2bLinkedinSlugSearchResponse
|
||||
> = {
|
||||
id: 'rb2b_linkedin_slug_search',
|
||||
name: 'RB2B LinkedIn Slug Search',
|
||||
description: 'Find a LinkedIn profile URL from a first name, last name, and company domain.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
first_name: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The person’s first name',
|
||||
},
|
||||
last_name: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The person’s last name',
|
||||
},
|
||||
company_domain: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The company domain (e.g. example.com)',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/linkedin_slug_search`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => ({
|
||||
first_name: params.first_name,
|
||||
last_name: params.last_name,
|
||||
company_domain: params.company_domain,
|
||||
}),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
linkedin_url: data.result?.linkedin_url ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
linkedin_url: {
|
||||
type: 'string',
|
||||
description: 'LinkedIn profile URL for the person',
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import type { Rb2bBestPersonalEmailResponse, Rb2bLinkedinParams } from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bLinkedinToBestPersonalEmailTool: ToolConfig<
|
||||
Rb2bLinkedinParams,
|
||||
Rb2bBestPersonalEmailResponse
|
||||
> = {
|
||||
id: 'rb2b_linkedin_to_best_personal_email',
|
||||
name: 'RB2B LinkedIn to Best Personal Email',
|
||||
description:
|
||||
'Return the personal email with the most recent known network activity for a LinkedIn profile.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
linkedin_slug: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The LinkedIn profile slug or URL',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/linkedin_to_best_personal_email`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => ({ linkedin_slug: params.linkedin_slug }),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
email: data.result?.email ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
email: {
|
||||
type: 'string',
|
||||
description: 'Best personal email for the LinkedIn profile',
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
import {
|
||||
RB2B_LINKEDIN_PROFILE_OUTPUT_PROPERTIES,
|
||||
type Rb2bLinkedinParams,
|
||||
type Rb2bLinkedinProfileResponse,
|
||||
} from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bLinkedinToBusinessProfileTool: ToolConfig<
|
||||
Rb2bLinkedinParams,
|
||||
Rb2bLinkedinProfileResponse
|
||||
> = {
|
||||
id: 'rb2b_linkedin_to_business_profile',
|
||||
name: 'RB2B LinkedIn to Business Profile',
|
||||
description:
|
||||
'Return a full business profile (name, title, company, emails and more) for a LinkedIn profile.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
linkedin_slug: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The LinkedIn profile slug or URL',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/linkedin_to_business_profile`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => ({ linkedin_slug: params.linkedin_slug }),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
const result = data.result ?? {}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
first_name: result.first_name ?? undefined,
|
||||
last_name: result.last_name ?? undefined,
|
||||
full_name: result.full_name ?? undefined,
|
||||
headline: result.headline ?? undefined,
|
||||
title: result.title ?? undefined,
|
||||
seniority: result.seniority ?? undefined,
|
||||
country: result.country ?? undefined,
|
||||
current_industry: result.current_industry ?? undefined,
|
||||
functional_area: result.functional_area ?? undefined,
|
||||
linkedin_url: result.linkedin_url ?? undefined,
|
||||
business_email: result.business_email ?? undefined,
|
||||
personal_email: result.personal_email ?? undefined,
|
||||
company: result.company ?? undefined,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: RB2B_LINKEDIN_PROFILE_OUTPUT_PROPERTIES,
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import type { Rb2bHashedEmailsResponse, Rb2bLinkedinParams } from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bLinkedinToHashedEmailsTool: ToolConfig<
|
||||
Rb2bLinkedinParams,
|
||||
Rb2bHashedEmailsResponse
|
||||
> = {
|
||||
id: 'rb2b_linkedin_to_hashed_emails',
|
||||
name: 'RB2B LinkedIn to Hashed Emails',
|
||||
description:
|
||||
'Return the business and personal hashed emails (MD5 and SHA-256) associated with a LinkedIn profile.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
linkedin_slug: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The LinkedIn profile slug or URL',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/linkedin_to_hashed_emails`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => ({ linkedin_slug: params.linkedin_slug }),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
const results = data.results ?? {}
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
linkedin_slug: results.linkedin_slug ?? null,
|
||||
business_md5_array: results.business_md5_array ?? [],
|
||||
business_sha256_array: results.business_sha256_array ?? [],
|
||||
personal_md5_array: results.personal_md5_array ?? [],
|
||||
personal_sha256_array: results.personal_sha256_array ?? [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
linkedin_slug: { type: 'string', description: 'The LinkedIn slug', optional: true },
|
||||
business_md5_array: {
|
||||
type: 'array',
|
||||
description: 'MD5 hashes of business emails',
|
||||
items: { type: 'string' },
|
||||
},
|
||||
business_sha256_array: {
|
||||
type: 'array',
|
||||
description: 'SHA-256 hashes of business emails',
|
||||
items: { type: 'string' },
|
||||
},
|
||||
personal_md5_array: {
|
||||
type: 'array',
|
||||
description: 'MD5 hashes of personal emails',
|
||||
items: { type: 'string' },
|
||||
},
|
||||
personal_sha256_array: {
|
||||
type: 'array',
|
||||
description: 'SHA-256 hashes of personal emails',
|
||||
items: { type: 'string' },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import type { Rb2bLinkedinParams, Rb2bMobilePhoneResponse } from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bLinkedinToMobilePhoneTool: ToolConfig<
|
||||
Rb2bLinkedinParams,
|
||||
Rb2bMobilePhoneResponse
|
||||
> = {
|
||||
id: 'rb2b_linkedin_to_mobile_phone',
|
||||
name: 'RB2B LinkedIn to Mobile Phone',
|
||||
description:
|
||||
'Return the mobile phone number with the most recent known network activity for a LinkedIn profile.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
linkedin_slug: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The LinkedIn profile slug or URL',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/linkedin_to_mobile_phone`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => ({ linkedin_slug: params.linkedin_slug }),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
mobile_phone: data.result?.mobile_phone ?? null,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
mobile_phone: {
|
||||
type: 'string',
|
||||
description: 'Mobile phone number for the LinkedIn profile',
|
||||
optional: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
import type { Rb2bLinkedinParams, Rb2bPersonalEmailsResponse } from '@/tools/rb2b/types'
|
||||
import { RB2B_API_BASE, rb2bHeaders } from '@/tools/rb2b/utils'
|
||||
import type { ToolConfig } from '@/tools/types'
|
||||
|
||||
export const rb2bLinkedinToPersonalEmailTool: ToolConfig<
|
||||
Rb2bLinkedinParams,
|
||||
Rb2bPersonalEmailsResponse
|
||||
> = {
|
||||
id: 'rb2b_linkedin_to_personal_email',
|
||||
name: 'RB2B LinkedIn to Personal Email',
|
||||
description: 'Return the personal email addresses associated with a LinkedIn profile.',
|
||||
version: '1.0.0',
|
||||
|
||||
params: {
|
||||
apiKey: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-only',
|
||||
description: 'RB2B API key',
|
||||
},
|
||||
linkedin_slug: {
|
||||
type: 'string',
|
||||
required: true,
|
||||
visibility: 'user-or-llm',
|
||||
description: 'The LinkedIn profile slug or URL',
|
||||
},
|
||||
},
|
||||
|
||||
request: {
|
||||
method: 'POST',
|
||||
url: `${RB2B_API_BASE}/linkedin_to_personal_email`,
|
||||
headers: (params) => rb2bHeaders(params.apiKey),
|
||||
body: (params) => ({ linkedin_slug: params.linkedin_slug }),
|
||||
},
|
||||
|
||||
transformResponse: async (response: Response) => {
|
||||
const data = await response.json()
|
||||
return {
|
||||
success: true,
|
||||
output: {
|
||||
emails: data.result?.emails ?? [],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
outputs: {
|
||||
emails: {
|
||||
type: 'array',
|
||||
description: 'Personal email addresses for the LinkedIn profile',
|
||||
items: { type: 'string' },
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,325 @@
|
||||
import type { OutputProperty, ToolResponse } from '@/tools/types'
|
||||
|
||||
/**
|
||||
* Shared output property definitions for RB2B API responses.
|
||||
* Based on the RB2B API collection: https://api.rb2b.com/api/v1
|
||||
*/
|
||||
|
||||
/** A single hashed-email match returned by IP to HEM. */
|
||||
export const RB2B_HEM_RESULT_OUTPUT_PROPERTIES = {
|
||||
md5: { type: 'string', description: 'MD5 hash of the matched email' },
|
||||
sha256: {
|
||||
type: 'string',
|
||||
description: 'SHA-256 hash of the matched email (only when include_sha256 is true)',
|
||||
optional: true,
|
||||
},
|
||||
score: {
|
||||
type: 'number',
|
||||
description: 'Match accuracy score (0 = probabilistic, 1 = deterministic)',
|
||||
},
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/** A single mobile advertising identifier. */
|
||||
export const RB2B_MAID_RESULT_OUTPUT_PROPERTIES = {
|
||||
device_id: { type: 'string', description: 'The mobile advertising identifier' },
|
||||
device_type: { type: 'string', description: 'The identifier type (e.g. AAID, IDFA)' },
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/** A single company-domain match returned by IP to Company. */
|
||||
export const RB2B_COMPANY_RESULT_OUTPUT_PROPERTIES = {
|
||||
domain: { type: 'string', description: 'Company domain associated with the IP' },
|
||||
percentage: { type: 'string', description: 'Confidence percentage for the match' },
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/** A single email activity record. */
|
||||
export const RB2B_ACTIVITY_RESULT_OUTPUT_PROPERTIES = {
|
||||
email: { type: 'string', description: 'The email address' },
|
||||
last_active: { type: 'string', description: 'Date the email was last seen active (YYYY-MM-DD)' },
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/** Fields returned by HEM to Business Profile. */
|
||||
export const RB2B_BUSINESS_PROFILE_OUTPUT_PROPERTIES = {
|
||||
first_name: { type: 'string', description: 'First name', optional: true },
|
||||
last_name: { type: 'string', description: 'Last name', optional: true },
|
||||
title: { type: 'string', description: 'Job title', optional: true },
|
||||
seniority: { type: 'string', description: 'Seniority level', optional: true },
|
||||
linkedinurl: { type: 'string', description: 'Personal LinkedIn profile URL', optional: true },
|
||||
link_email: { type: 'string', description: 'Linked business email address', optional: true },
|
||||
work_email_confirmed: {
|
||||
type: 'string',
|
||||
description: 'Whether the work email is confirmed',
|
||||
optional: true,
|
||||
},
|
||||
personal_emails: {
|
||||
type: 'array',
|
||||
description: 'Associated personal emails (hashed or plaintext depending on input)',
|
||||
optional: true,
|
||||
items: { type: 'string' },
|
||||
},
|
||||
current_company: { type: 'string', description: 'Current company name', optional: true },
|
||||
current_company_url: { type: 'string', description: 'Current company website', optional: true },
|
||||
current_company_linkedinurl: {
|
||||
type: 'string',
|
||||
description: 'Current company LinkedIn URL',
|
||||
optional: true,
|
||||
},
|
||||
current_industry: { type: 'string', description: 'Current industry', optional: true },
|
||||
functional_area: { type: 'string', description: 'Functional area', optional: true },
|
||||
country: { type: 'string', description: 'Country', optional: true },
|
||||
company_employee_count: {
|
||||
type: 'string',
|
||||
description: 'Company employee count',
|
||||
optional: true,
|
||||
},
|
||||
company_employee_range: {
|
||||
type: 'string',
|
||||
description: 'Company employee range band',
|
||||
optional: true,
|
||||
},
|
||||
company_revenue_range: {
|
||||
type: 'string',
|
||||
description: 'Company revenue range band',
|
||||
optional: true,
|
||||
},
|
||||
md5: { type: 'string', description: 'MD5 hash of the resolved email', optional: true },
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/** Company sub-object returned by LinkedIn to Business Profile. */
|
||||
export const RB2B_LINKEDIN_COMPANY_OUTPUT_PROPERTIES = {
|
||||
name: { type: 'string', description: 'Company name', optional: true },
|
||||
industry: { type: 'string', description: 'Company industry', optional: true },
|
||||
website_url: { type: 'string', description: 'Company website URL', optional: true },
|
||||
linkedin_url: { type: 'string', description: 'Company LinkedIn URL', optional: true },
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
/** Fields returned by LinkedIn to Business Profile. */
|
||||
export const RB2B_LINKEDIN_PROFILE_OUTPUT_PROPERTIES = {
|
||||
first_name: { type: 'string', description: 'First name', optional: true },
|
||||
last_name: { type: 'string', description: 'Last name', optional: true },
|
||||
full_name: { type: 'string', description: 'Full name', optional: true },
|
||||
headline: { type: 'string', description: 'LinkedIn headline', optional: true },
|
||||
title: { type: 'string', description: 'Job title', optional: true },
|
||||
seniority: { type: 'string', description: 'Seniority level', optional: true },
|
||||
country: { type: 'string', description: 'Country', optional: true },
|
||||
current_industry: { type: 'string', description: 'Current industry', optional: true },
|
||||
functional_area: {
|
||||
type: 'array',
|
||||
description: 'Functional areas',
|
||||
optional: true,
|
||||
items: { type: 'string' },
|
||||
},
|
||||
linkedin_url: { type: 'string', description: 'Personal LinkedIn profile URL', optional: true },
|
||||
business_email: { type: 'string', description: 'Business email address', optional: true },
|
||||
personal_email: { type: 'string', description: 'Personal email address', optional: true },
|
||||
company: {
|
||||
type: 'object',
|
||||
description: 'Current company details',
|
||||
optional: true,
|
||||
properties: RB2B_LINKEDIN_COMPANY_OUTPUT_PROPERTIES,
|
||||
},
|
||||
} as const satisfies Record<string, OutputProperty>
|
||||
|
||||
interface Rb2bMaidResult {
|
||||
device_id: string
|
||||
device_type: string
|
||||
}
|
||||
|
||||
export interface Rb2bCreditCheckParams {
|
||||
apiKey: string
|
||||
}
|
||||
|
||||
export interface Rb2bCreditCheckResponse extends ToolResponse {
|
||||
output: {
|
||||
credits_remaining: number
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bIpToHemParams {
|
||||
apiKey: string
|
||||
ip_address: string
|
||||
user_agent?: string
|
||||
include_sha256?: boolean
|
||||
}
|
||||
|
||||
export interface Rb2bIpToHemResponse extends ToolResponse {
|
||||
output: {
|
||||
results: Array<{
|
||||
md5: string
|
||||
sha256?: string
|
||||
score: number
|
||||
}>
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bIpToMaidParams {
|
||||
apiKey: string
|
||||
ip_address: string
|
||||
user_agent?: string
|
||||
}
|
||||
|
||||
export interface Rb2bIpToCompanyParams {
|
||||
apiKey: string
|
||||
ip_address: string
|
||||
}
|
||||
|
||||
export interface Rb2bIpToCompanyResponse extends ToolResponse {
|
||||
output: {
|
||||
results: Array<{
|
||||
domain: string
|
||||
percentage: string
|
||||
}>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Params for HEM (hashed email) endpoints. The `email` field accepts either a
|
||||
* plaintext email address or an MD5 hash — the tool routes it to the correct
|
||||
* request key automatically.
|
||||
*/
|
||||
export interface Rb2bIdentifierParams {
|
||||
apiKey: string
|
||||
email: string
|
||||
}
|
||||
|
||||
export interface Rb2bMaidResponse extends ToolResponse {
|
||||
output: {
|
||||
results: Rb2bMaidResult[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bLinkedinUrlResponse extends ToolResponse {
|
||||
output: {
|
||||
linkedin_url: string | null
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bLinkedinSlugResponse extends ToolResponse {
|
||||
output: {
|
||||
linkedin_slug: string | null
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bBusinessProfileResponse extends ToolResponse {
|
||||
output: {
|
||||
first_name?: string
|
||||
last_name?: string
|
||||
title?: string
|
||||
seniority?: string
|
||||
linkedinurl?: string
|
||||
link_email?: string
|
||||
work_email_confirmed?: string
|
||||
personal_emails?: string[]
|
||||
current_company?: string
|
||||
current_company_url?: string
|
||||
current_company_linkedinurl?: string
|
||||
current_industry?: string
|
||||
functional_area?: string
|
||||
country?: string
|
||||
company_employee_count?: string
|
||||
company_employee_range?: string
|
||||
company_revenue_range?: string
|
||||
md5?: string
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bEmailActivityParams {
|
||||
apiKey: string
|
||||
email: string
|
||||
}
|
||||
|
||||
export interface Rb2bEmailActivityResponse extends ToolResponse {
|
||||
output: {
|
||||
results: Array<{
|
||||
email: string
|
||||
last_active: string
|
||||
}>
|
||||
match_count: number
|
||||
credits_charged: number
|
||||
credits_exhausted: boolean
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bLinkedinParams {
|
||||
apiKey: string
|
||||
linkedin_slug: string
|
||||
}
|
||||
|
||||
export interface Rb2bBestPersonalEmailResponse extends ToolResponse {
|
||||
output: {
|
||||
email: string | null
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bPersonalEmailsResponse extends ToolResponse {
|
||||
output: {
|
||||
emails: string[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bHashedEmailsResponse extends ToolResponse {
|
||||
output: {
|
||||
linkedin_slug: string | null
|
||||
business_md5_array: string[]
|
||||
business_sha256_array: string[]
|
||||
personal_md5_array: string[]
|
||||
personal_sha256_array: string[]
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bMobilePhoneResponse extends ToolResponse {
|
||||
output: {
|
||||
mobile_phone: string | null
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bLinkedinProfileResponse extends ToolResponse {
|
||||
output: {
|
||||
first_name?: string
|
||||
last_name?: string
|
||||
full_name?: string
|
||||
headline?: string
|
||||
title?: string
|
||||
seniority?: string
|
||||
country?: string
|
||||
current_industry?: string
|
||||
functional_area?: string[]
|
||||
linkedin_url?: string
|
||||
business_email?: string
|
||||
personal_email?: string
|
||||
company?: {
|
||||
name?: string
|
||||
industry?: string
|
||||
website_url?: string
|
||||
linkedin_url?: string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface Rb2bLinkedinSlugSearchParams {
|
||||
apiKey: string
|
||||
first_name: string
|
||||
last_name: string
|
||||
company_domain: string
|
||||
}
|
||||
|
||||
export interface Rb2bLinkedinSlugSearchResponse extends ToolResponse {
|
||||
output: {
|
||||
linkedin_url: string | null
|
||||
}
|
||||
}
|
||||
|
||||
export type Rb2bResponse =
|
||||
| Rb2bCreditCheckResponse
|
||||
| Rb2bIpToHemResponse
|
||||
| Rb2bIpToCompanyResponse
|
||||
| Rb2bMaidResponse
|
||||
| Rb2bLinkedinUrlResponse
|
||||
| Rb2bLinkedinSlugResponse
|
||||
| Rb2bBusinessProfileResponse
|
||||
| Rb2bEmailActivityResponse
|
||||
| Rb2bBestPersonalEmailResponse
|
||||
| Rb2bPersonalEmailsResponse
|
||||
| Rb2bHashedEmailsResponse
|
||||
| Rb2bMobilePhoneResponse
|
||||
| Rb2bLinkedinProfileResponse
|
||||
| Rb2bLinkedinSlugSearchResponse
|
||||
@@ -0,0 +1,18 @@
|
||||
/** Base URL for all RB2B API v1 endpoints. */
|
||||
export const RB2B_API_BASE = 'https://api.rb2b.com/api/v1'
|
||||
|
||||
/** Standard headers for RB2B requests. Auth is an `Api-Key` header. */
|
||||
export function rb2bHeaders(apiKey: string): Record<string, string> {
|
||||
return {
|
||||
'Content-Type': 'application/json',
|
||||
'Api-Key': apiKey,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* HEM endpoints accept either a plaintext email or an MD5 hash under the
|
||||
* `email` / `md5` body key respectively. Route the value to the correct key.
|
||||
*/
|
||||
export function buildIdentifierBody(value: string): Record<string, string> {
|
||||
return value.includes('@') ? { email: value } : { md5: value }
|
||||
}
|
||||
Reference in New Issue
Block a user