@@ -235,6 +235,7 @@ type GetPlacesByQueryArguments = {
235235 addressLocality ?: string ;
236236 addressCountry ?: Country ;
237237 streetAddress ?: string ;
238+ excludeId ?: string ;
238239} ;
239240
240241const getPlacesByQuery = async ( {
@@ -246,6 +247,7 @@ const getPlacesByQuery = async ({
246247 addressCountry,
247248 streetAddress,
248249 searchTerm,
250+ excludeId,
249251} : { headers : Headers } & GetPlacesByQueryArguments ) => {
250252 const termsString = terms . reduce (
251253 ( acc , currentTerm ) => `${ acc } terms.id:${ currentTerm } ` ,
@@ -257,6 +259,7 @@ const getPlacesByQuery = async ({
257259 zip && addressCountry === 'BE' ? `address.\\*.postalCode:"${ zip } "` : '' ,
258260 addressLocality ? `address.\\*.addressLocality:${ addressLocality } ` : '' ,
259261 streetAddress ? `address.\\*.streetAddress:"${ streetAddress } "` : '' ,
262+ excludeId ? `NOT _id:"${ excludeId } "` : '' ,
260263 ] . filter ( ( argument ) => ! ! argument ) ;
261264
262265 const res = await fetchFromApi ( {
@@ -290,6 +293,7 @@ const useGetPlacesByQuery = (
290293 addressCountry,
291294 streetAddress,
292295 searchTerm,
296+ excludeId,
293297 } : GetPlacesByQueryArguments ,
294298 configuration : ExtendQueryOptions < typeof getPlacesByQuery > = { } ,
295299) =>
@@ -304,6 +308,7 @@ const useGetPlacesByQuery = (
304308 addressLocality,
305309 streetAddress,
306310 searchTerm,
311+ excludeId,
307312 } ,
308313 enabled : ( ! ! name && ! ! streetAddress && ! ! zip ) || ! ! searchTerm ,
309314 ...configuration ,
0 commit comments