Skip to content

Commit

Permalink
fix: change related prompts endpoint (#1652)
Browse files Browse the repository at this point in the history
  • Loading branch information
victorcg88 authored Oct 31, 2024
1 parent 99d4d0a commit 61468cd
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ import { endpointAdapterFactory, interpolate } from '@empathyco/x-adapter';
import { RelatedPromptsRequest, RelatedPromptsResponse } from '@empathyco/x-types';
import { relatedPromptsRequestMapper } from '../mappers/requests/related-prompts-request.mapper';
import { relatedPromptsResponseMapper } from '../mappers/responses/related-prompts-response.mapper';
import { getSearchServiceUrl } from './utils';
import { getBeaconServiceUrl } from './utils';

/**
* Default adapter for the related prompt endpoint.
* This endpoint does not support pagination in the request.
*
* @public
*/
export const relatedPromptsEndpointAdapter = endpointAdapterFactory<
RelatedPromptsRequest,
RelatedPromptsResponse
>({
endpoint: from =>
interpolate(`${getSearchServiceUrl(from)}/relatedprompts/{extraParams.instance}`, from),
interpolate(`${getBeaconServiceUrl(from)}/relatedprompts/{extraParams.instance}`, from),
requestMapper: relatedPromptsRequestMapper,
responseMapper: relatedPromptsResponseMapper,
defaultRequestOptions: {
Expand Down

0 comments on commit 61468cd

Please sign in to comment.