Skip to content

Commit 8f67680

Browse files
committed
feat(companyenrich): expand company and people API coverage
1 parent 31444f9 commit 8f67680

35 files changed

Lines changed: 12374 additions & 257 deletions

‎apps/docs/content/docs/integrations/companyenrich.mdx‎

Lines changed: 283 additions & 26 deletions
Large diffs are not rendered by default.

‎apps/sim/blocks/blocks/companyenrich.ts‎

Lines changed: 317 additions & 38 deletions
Large diffs are not rendered by default.

‎apps/sim/lib/mothership/generated/docs-manifest.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export const DOCS_MANIFEST: readonly string[] = [
115115
'integrations/cloudwatch.mdx',
116116
'integrations/coda.mdx',
117117
'integrations/codepipeline.mdx',
118+
'integrations/companyenrich.mdx',
118119
'integrations/confluence.mdx',
119120
'integrations/context_dev.mdx',
120121
'integrations/convex.mdx',
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import { companyenrichRequest, responseData } from '@/tools/companyenrich/request'
2+
import type { CompanyEnrichParams, CompanyEnrichResponse } from '@/tools/companyenrich/types'
3+
import type { ToolConfig } from '@/tools/types'
4+
5+
export const companyenrichAdvancedTool: ToolConfig<CompanyEnrichParams, CompanyEnrichResponse> = {
6+
id: 'companyenrich_advanced',
7+
name: 'CompanyEnrich Advanced Request',
8+
description:
9+
'Execute one of 42 allowlisted CompanyEnrich data, lookup or job operations. No retries, pagination, polling or result downloads. Email beta requires explicit opt-in; saved-list administration and account responses are excluded.',
10+
version: '1.1.0',
11+
errorExtractor: 'companyenrich-errors',
12+
params: {
13+
apiKey: {
14+
type: 'string',
15+
required: true,
16+
visibility: 'user-only',
17+
description: 'CompanyEnrich API key without the Bearer prefix',
18+
},
19+
apiOperation: {
20+
type: 'string',
21+
required: true,
22+
visibility: 'user-or-llm',
23+
description:
24+
'Documented operation ID from the advanced selector; exactly one request, without polling or downloads.',
25+
},
26+
body: {
27+
type: 'json',
28+
required: false,
29+
visibility: 'user-or-llm',
30+
description: 'Full documented JSON body; export count must be explicit and at most 50,000.',
31+
},
32+
queryParameters: {
33+
type: 'json',
34+
required: false,
35+
visibility: 'user-or-llm',
36+
description: 'Documented query parameters as an object.',
37+
},
38+
pathParameters: {
39+
type: 'json',
40+
required: false,
41+
visibility: 'user-or-llm',
42+
description: 'Documented path parameters such as jobId or countryCode.',
43+
},
44+
allow_beta: {
45+
type: 'boolean',
46+
required: false,
47+
visibility: 'user-only',
48+
description: 'Explicitly allow beta email operations and their credit costs (default false).',
49+
},
50+
},
51+
request: companyenrichRequest('advanced'),
52+
transformResponse: async (response) => {
53+
const data = await responseData(response)
54+
return { success: true, output: { data } }
55+
},
56+
outputs: {
57+
data: {
58+
type: 'json',
59+
description:
60+
'Complete API response; an object, array or count according to the selected operation.',
61+
},
62+
},
63+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
import { companyenrichRequest, responseData } from '@/tools/companyenrich/request'
2+
import type { CompanyEnrichParams, CompanyEnrichResponse } from '@/tools/companyenrich/types'
3+
import type { ToolConfig } from '@/tools/types'
4+
5+
export const companyenrichCountTool: ToolConfig<CompanyEnrichParams, CompanyEnrichResponse> = {
6+
id: 'companyenrich_count',
7+
name: 'CompanyEnrich Count Companies',
8+
description:
9+
'Count Companies with CompanyEnrich. One request per execution; data requests can consume credits.',
10+
version: '1.1.0',
11+
errorExtractor: 'companyenrich-errors',
12+
params: {
13+
apiKey: {
14+
type: 'string',
15+
required: true,
16+
visibility: 'user-only',
17+
description: 'CompanyEnrich API key without the Bearer prefix',
18+
},
19+
query: {
20+
type: 'string',
21+
required: false,
22+
visibility: 'user-or-llm',
23+
description: 'Literal company name/domain query, up to 250 characters.',
24+
},
25+
semanticQuery: {
26+
type: 'string',
27+
required: false,
28+
visibility: 'user-or-llm',
29+
description: 'Natural-language company description, up to 500 characters.',
30+
},
31+
filters: {
32+
type: 'json',
33+
required: false,
34+
visibility: 'user-or-llm',
35+
description:
36+
'Documented request-body filters, including nested fields. Explicit inputs take precedence; unknown fields are forwarded to the API.',
37+
},
38+
},
39+
request: companyenrichRequest('post_companies_search_count'),
40+
transformResponse: async (response) => {
41+
const data = await responseData(response)
42+
return { success: true, output: { data } }
43+
},
44+
outputs: {
45+
data: {
46+
type: 'json',
47+
description:
48+
'Complete API response; an object, array or count according to the selected operation.',
49+
},
50+
},
51+
}

0 commit comments

Comments
 (0)