Skip to content

Commit 19cd7ea

Browse files
committed
fix(pdl): name the tools directory after the tool ids
People Data Labs declared `pdl_*` tool ids under `tools/peopledatalabs/`. Every other integration names the directory after its id prefix -- 259 of 260 before this, and PDL was the only exception. The docs generator locates a tool's definition by deriving the directory from the id prefix, so it looked in `tools/pdl/`, found nothing, and returned null for all 11 tools. peopledatalabs.mdx rendered eleven bare `###` headings with no description, no Input table and no Output table. Renaming the directory rather than the ids: tool ids are persisted in saved workflows, so renaming those would break existing users. The directory is internal -- 15 files' imports. Fixed at the source rather than teaching the generator a fallback. A special case would have left the invariant broken and the next integration free to break it again; now 260 of 260 hold, and the generator needs no exception. peopledatalabs.mdx: 11 empty headings -> 456 lines. Repo-wide: zero pages with an empty action body.
1 parent 21dbe2f commit 19cd7ea

18 files changed

Lines changed: 445 additions & 71 deletions

apps/docs/content/docs/en/integrations/peopledatalabs.mdx

Lines changed: 386 additions & 0 deletions
Large diffs are not rendered by default.

apps/sim/blocks/blocks/peopledatalabs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { PeopleDataLabsIcon } from '@/components/icons'
22
import type { BlockConfig, BlockMeta } from '@/blocks/types'
33
import { AuthMode, IntegrationType } from '@/blocks/types'
4-
import type { PdlPersonEnrichResponse } from '@/tools/peopledatalabs/types'
4+
import type { PdlPersonEnrichResponse } from '@/tools/pdl/types'
55

66
export const PeopleDataLabsBlock: BlockConfig<PdlPersonEnrichResponse> = {
77
type: 'peopledatalabs',

apps/sim/tools/peopledatalabs/autocomplete.ts renamed to apps/sim/tools/pdl/autocomplete.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { PdlAutocompleteParams, PdlAutocompleteResponse } from '@/tools/peopledatalabs/types'
2-
import { PEOPLEDATALABS_API_KEY_PREFIX } from '@/tools/peopledatalabs/types'
3-
import { buildQueryString } from '@/tools/peopledatalabs/utils'
1+
import type { PdlAutocompleteParams, PdlAutocompleteResponse } from '@/tools/pdl/types'
2+
import { PEOPLEDATALABS_API_KEY_PREFIX } from '@/tools/pdl/types'
3+
import { buildQueryString } from '@/tools/pdl/utils'
44
import type { OutputProperty, ToolConfig } from '@/tools/types'
55

66
const SUGGESTION_PROPERTIES = {

apps/sim/tools/peopledatalabs/bulk_company_enrich.ts renamed to apps/sim/tools/pdl/bulk_company_enrich.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type {
22
PdlBulkCompanyEnrichParams,
33
PdlBulkCompanyEnrichResponse,
44
PdlBulkCompanyResultItem,
5-
} from '@/tools/peopledatalabs/types'
6-
import { PDL_CREDIT_USD, PEOPLEDATALABS_API_KEY_PREFIX } from '@/tools/peopledatalabs/types'
7-
import { countBulkMatched, projectCompany } from '@/tools/peopledatalabs/utils'
5+
} from '@/tools/pdl/types'
6+
import { PDL_CREDIT_USD, PEOPLEDATALABS_API_KEY_PREFIX } from '@/tools/pdl/types'
7+
import { countBulkMatched, projectCompany } from '@/tools/pdl/utils'
88
import type { OutputProperty, ToolConfig } from '@/tools/types'
99

1010
const BULK_COMPANY_RESULT_PROPERTIES = {

apps/sim/tools/peopledatalabs/bulk_person_enrich.ts renamed to apps/sim/tools/pdl/bulk_person_enrich.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import type {
22
PdlBulkPersonEnrichParams,
33
PdlBulkPersonEnrichResponse,
44
PdlBulkPersonResultItem,
5-
} from '@/tools/peopledatalabs/types'
6-
import { PDL_CREDIT_USD, PEOPLEDATALABS_API_KEY_PREFIX } from '@/tools/peopledatalabs/types'
7-
import { countBulkMatched, projectPerson } from '@/tools/peopledatalabs/utils'
5+
} from '@/tools/pdl/types'
6+
import { PDL_CREDIT_USD, PEOPLEDATALABS_API_KEY_PREFIX } from '@/tools/pdl/types'
7+
import { countBulkMatched, projectPerson } from '@/tools/pdl/utils'
88
import type { OutputProperty, ToolConfig } from '@/tools/types'
99

1010
const BULK_PERSON_RESULT_PROPERTIES = {

apps/sim/tools/peopledatalabs/company_clean.ts renamed to apps/sim/tools/pdl/company_clean.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import type { PdlCleanCompanyParams, PdlCleanCompanyResponse } from '@/tools/peopledatalabs/types'
2-
import {
3-
PDL_COMPANY_OUTPUT_PROPERTIES,
4-
PEOPLEDATALABS_API_KEY_PREFIX,
5-
} from '@/tools/peopledatalabs/types'
6-
import { projectCompany } from '@/tools/peopledatalabs/utils'
1+
import type { PdlCleanCompanyParams, PdlCleanCompanyResponse } from '@/tools/pdl/types'
2+
import { PDL_COMPANY_OUTPUT_PROPERTIES, PEOPLEDATALABS_API_KEY_PREFIX } from '@/tools/pdl/types'
3+
import { projectCompany } from '@/tools/pdl/utils'
74
import type { ToolConfig } from '@/tools/types'
85

96
export const cleanCompanyTool: ToolConfig<PdlCleanCompanyParams, PdlCleanCompanyResponse> = {

apps/sim/tools/peopledatalabs/company_enrich.ts renamed to apps/sim/tools/pdl/company_enrich.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { PdlCompanyEnrichParams, PdlCompanyEnrichResponse } from '@/tools/peopledatalabs/types'
1+
import type { PdlCompanyEnrichParams, PdlCompanyEnrichResponse } from '@/tools/pdl/types'
22
import {
33
PDL_COMPANY_OUTPUT_PROPERTIES,
44
PDL_CREDIT_USD,
55
PEOPLEDATALABS_API_KEY_PREFIX,
6-
} from '@/tools/peopledatalabs/types'
7-
import { buildQueryString, projectCompany } from '@/tools/peopledatalabs/utils'
6+
} from '@/tools/pdl/types'
7+
import { buildQueryString, projectCompany } from '@/tools/pdl/utils'
88
import type { ToolConfig } from '@/tools/types'
99

1010
export const companyEnrichTool: ToolConfig<PdlCompanyEnrichParams, PdlCompanyEnrichResponse> = {

apps/sim/tools/peopledatalabs/company_search.ts renamed to apps/sim/tools/pdl/company_search.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import type { PdlCompanySearchParams, PdlCompanySearchResponse } from '@/tools/peopledatalabs/types'
1+
import type { PdlCompanySearchParams, PdlCompanySearchResponse } from '@/tools/pdl/types'
22
import {
33
PDL_COMPANY_OUTPUT_PROPERTIES,
44
PDL_CREDIT_USD,
55
PEOPLEDATALABS_API_KEY_PREFIX,
6-
} from '@/tools/peopledatalabs/types'
7-
import { projectCompany } from '@/tools/peopledatalabs/utils'
6+
} from '@/tools/pdl/types'
7+
import { projectCompany } from '@/tools/pdl/utils'
88
import type { ToolConfig } from '@/tools/types'
99

1010
export const companySearchTool: ToolConfig<PdlCompanySearchParams, PdlCompanySearchResponse> = {

apps/sim/tools/pdl/index.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { autocompleteTool } from '@/tools/pdl/autocomplete'
2+
import { bulkCompanyEnrichTool } from '@/tools/pdl/bulk_company_enrich'
3+
import { bulkPersonEnrichTool } from '@/tools/pdl/bulk_person_enrich'
4+
import { cleanCompanyTool } from '@/tools/pdl/company_clean'
5+
import { companyEnrichTool } from '@/tools/pdl/company_enrich'
6+
import { companySearchTool } from '@/tools/pdl/company_search'
7+
import { cleanLocationTool } from '@/tools/pdl/location_clean'
8+
import { personEnrichTool } from '@/tools/pdl/person_enrich'
9+
import { personIdentifyTool } from '@/tools/pdl/person_identify'
10+
import { personSearchTool } from '@/tools/pdl/person_search'
11+
import { cleanSchoolTool } from '@/tools/pdl/school_clean'
12+
13+
export const pdlAutocompleteTool = autocompleteTool
14+
export const pdlBulkCompanyEnrichTool = bulkCompanyEnrichTool
15+
export const pdlBulkPersonEnrichTool = bulkPersonEnrichTool
16+
export const pdlCleanCompanyTool = cleanCompanyTool
17+
export const pdlCleanLocationTool = cleanLocationTool
18+
export const pdlCleanSchoolTool = cleanSchoolTool
19+
export const pdlCompanyEnrichTool = companyEnrichTool
20+
export const pdlCompanySearchTool = companySearchTool
21+
export const pdlPersonEnrichTool = personEnrichTool
22+
export const pdlPersonIdentifyTool = personIdentifyTool
23+
export const pdlPersonSearchTool = personSearchTool

apps/sim/tools/peopledatalabs/location_clean.ts renamed to apps/sim/tools/pdl/location_clean.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import type { PdlCleanLocationParams, PdlCleanLocationResponse } from '@/tools/peopledatalabs/types'
2-
import {
3-
PDL_LOCATION_OUTPUT_PROPERTIES,
4-
PEOPLEDATALABS_API_KEY_PREFIX,
5-
} from '@/tools/peopledatalabs/types'
6-
import { projectLocation } from '@/tools/peopledatalabs/utils'
1+
import type { PdlCleanLocationParams, PdlCleanLocationResponse } from '@/tools/pdl/types'
2+
import { PDL_LOCATION_OUTPUT_PROPERTIES, PEOPLEDATALABS_API_KEY_PREFIX } from '@/tools/pdl/types'
3+
import { projectLocation } from '@/tools/pdl/utils'
74
import type { ToolConfig } from '@/tools/types'
85

96
export const cleanLocationTool: ToolConfig<PdlCleanLocationParams, PdlCleanLocationResponse> = {

0 commit comments

Comments
 (0)