Skip to content

Commit

Permalink
update endpoints from ans to search
Browse files Browse the repository at this point in the history
  • Loading branch information
alextaing committed Aug 4, 2022
1 parent 1ab26d9 commit bdc53ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { Endpoints } from './models/core/Endpoints';
export const defaultApiVersion = 20220511;

export const defaultEndpoints: Required<Endpoints> = {
universalSearch: 'https://liveapi.yext.com/v2/accounts/me/answers/query',
verticalSearch: 'https://liveapi.yext.com/v2/accounts/me/answers/vertical/query',
universalSearch: 'https://liveapi.yext.com/v2/accounts/me/search/query',
verticalSearch: 'https://liveapi.yext.com/v2/accounts/me/search/vertical/query',
questionSubmission: 'https://liveapi.yext.com/v2/accounts/me/createQuestion',
status: 'https://answersstatus.pagescdn.com',
universalAutocomplete: 'https://liveapi-cached.yext.com/v2/accounts/me/answers/autocomplete',
verticalAutocomplete: 'https://liveapi-cached.yext.com/v2/accounts/me/answers/vertical/autocomplete',
filterSearch: 'https://liveapi-cached.yext.com/v2/accounts/me/answers/filtersearch',
universalAutocomplete: 'https://liveapi-cached.yext.com/v2/accounts/me/search/autocomplete',
verticalAutocomplete: 'https://liveapi-cached.yext.com/v2/accounts/me/search/vertical/autocomplete',
filterSearch: 'https://liveapi-cached.yext.com/v2/accounts/me/search/filtersearch',
} as const;

/**
Expand All @@ -18,11 +18,11 @@ export const defaultEndpoints: Required<Endpoints> = {
* @public
*/
export const SandboxEndpoints: Required<Endpoints> = {
universalSearch: 'https://liveapi-sandbox.yext.com/v2/accounts/me/answers/query',
verticalSearch: 'https://liveapi-sandbox.yext.com/v2/accounts/me/answers/vertical/query',
universalSearch: 'https://liveapi-sandbox.yext.com/v2/accounts/me/search/query',
verticalSearch: 'https://liveapi-sandbox.yext.com/v2/accounts/me/search/vertical/query',
questionSubmission: 'https://liveapi-sandbox.yext.com/v2/accounts/me/createQuestion',
status: 'https://answersstatus.pagescdn.com',
universalAutocomplete: 'https://liveapi-sandbox.yext.com/v2/accounts/me/answers/autocomplete',
verticalAutocomplete: 'https://liveapi-sandbox.yext.com/v2/accounts/me/answers/vertical/autocomplete',
filterSearch: 'https://liveapi-sandbox.yext.com/v2/accounts/me/answers/filtersearch',
universalAutocomplete: 'https://liveapi-sandbox.yext.com/v2/accounts/me/search/autocomplete',
verticalAutocomplete: 'https://liveapi-sandbox.yext.com/v2/accounts/me/search/vertical/autocomplete',
filterSearch: 'https://liveapi-sandbox.yext.com/v2/accounts/me/search/filtersearch',
} as const;
4 changes: 2 additions & 2 deletions tests/infra/SearchServiceImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ describe('SearchService', () => {
});

describe('Universal Search', () => {
const expectedUniversalUrl = 'https://liveapi.yext.com/v2/accounts/me/answers/query';
const expectedUniversalUrl = 'https://liveapi.yext.com/v2/accounts/me/search/query';

it('Query params are correct when only required params (without token) are supplied', async () => {
const requestWithRequiredParams: UniversalSearchRequest = {
Expand Down Expand Up @@ -200,7 +200,7 @@ describe('SearchService', () => {
});

describe('Vertical Search', () => {
const expectedVerticalUrl = 'https://liveapi.yext.com/v2/accounts/me/answers/vertical/query';
const expectedVerticalUrl = 'https://liveapi.yext.com/v2/accounts/me/search/vertical/query';

it('Query params are correct when only required params (without token) are supplied', async () => {
const requestWithRequiredParams: VerticalSearchRequest = {
Expand Down

0 comments on commit bdc53ae

Please sign in to comment.