Skip to content

Commit

Permalink
replace AnswersConfigWithToken with SearchConfigWithToken
Browse files Browse the repository at this point in the history
  • Loading branch information
alextaing committed Jul 5, 2022
1 parent de25c7c commit d184b38
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/models/core/SearchConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface SearchConfigWithApiKey extends BaseSearchConfig {
* options from {@link BaseSearchConfig}, but requires token.
* @public
*/
export interface AnswersConfigWithToken extends BaseSearchConfig {
export interface SearchConfigWithToken extends BaseSearchConfig {
/**
* The authentication token of the answers experience
* which will be passed in the Auth header as a Bearer token.
Expand All @@ -76,7 +76,7 @@ export interface AnswersConfigWithToken extends BaseSearchConfig {
*
* @public
*/
export type SearchConfig = SearchConfigWithApiKey | AnswersConfigWithToken;
export type SearchConfig = SearchConfigWithApiKey | SearchConfigWithToken;

/**
* The AnswersConfig after any defaulting has been done from within answers-core.
Expand Down
9 changes: 8 additions & 1 deletion src/models/deprecated.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { SearchConfig } from './core/SearchConfig';
import { BaseSearchConfig } from './core/SearchConfig';
import { SearchConfigWithApiKey } from './core/SearchConfig';
import { SearchConfigWithToken } from './core/SearchConfig';

/**
* @deprecated AnswersConfig is deprecated and has been replaced by SearchConfig
Expand All @@ -18,4 +19,10 @@ export type BaseAnswersConfig = BaseSearchConfig;
* @deprecated AnswersConfigWithApiKey is deprecated and has been replaced by SearchConfigWithApiKey
* @public
*/
export type AnswersConfigWithApiKey = SearchConfigWithApiKey;
export type AnswersConfigWithApiKey = SearchConfigWithApiKey;

/**
* @deprecated AnswersConfigWithToken is deprecated and has been replaced by SearchConfigWithToken
* @public
*/
export type AnswersConfigWithToken = SearchConfigWithToken;
3 changes: 2 additions & 1 deletion src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
export { AnswersConfig } from './deprecated';
export { BaseAnswersConfig } from './deprecated';
export { AnswersConfigWithApiKey } from './deprecated';
export { AnswersConfigWithToken } from './deprecated';

// Answers API models
export { AnswersError } from './answersapi/AnswersError';
Expand All @@ -11,7 +12,7 @@ export {
SearchConfig,
BaseSearchConfig,
SearchConfigWithApiKey,
AnswersConfigWithToken
SearchConfigWithToken
} from './core/SearchConfig';
export { AnswersRequest } from './core/AnswersRequest';
export { Endpoints } from './core/Endpoints';
Expand Down

0 comments on commit d184b38

Please sign in to comment.