From 2ae6a2e49a1fb7ba635b2b0a03f14e45e8c873bb Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Tue, 4 Jun 2024 06:49:46 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/people-data-labs-client.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/services/people-data-labs-client.ts b/src/services/people-data-labs-client.ts index dc980ee..9405500 100644 --- a/src/services/people-data-labs-client.ts +++ b/src/services/people-data-labs-client.ts @@ -1,7 +1,7 @@ import defaultKy, { type KyInstance } from 'ky' import pThrottle from 'p-throttle' -import { assert, getEnv, throttleKy } from '../utils.js' +import { assert, getEnv, sanitizeSearchParams, throttleKy } from '../utils.js' /** * TODO: I'm holding off on converting this client to an `AIFunctionsProvider` @@ -515,8 +515,7 @@ export class PeopleDataLabsClient { async companyProfile(options: peopledatalabs.CompanyLookupOptions) { return this.ky .get('company/enrich', { - // @ts-expect-error location is a string[] and searchparams shows a TS error heres - searchParams: { ...options } + searchParams: sanitizeSearchParams({ ...options }) }) .json() }