-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make internal-only provider, hide client
- Loading branch information
1 parent
0bab27d
commit 2c3aa30
Showing
4 changed files
with
19 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
import { InternalConfig, provideChatCoreInternal } from "@yext/chat-core"; | ||
import { ChatHeadless, ChatHeadlessImpl } from "./ChatHeadless"; | ||
import { HeadlessConfig, ChatClient } from "./models"; | ||
import { HeadlessConfig } from "./models"; | ||
|
||
/** | ||
* Provide an instance of {@link ChatHeadless} with all functionality built in. | ||
* | ||
* @public | ||
*/ | ||
export function provideChatHeadless( | ||
export function provideChatHeadless(config: HeadlessConfig): ChatHeadless { | ||
return new ChatHeadlessImpl(config); | ||
} | ||
|
||
/** | ||
* Provide an instance of {@link ChatHeadless} with all functionality built in, | ||
* including internal-only configuration. | ||
* | ||
* @internal | ||
*/ | ||
export function provideChatHeadlessInternal( | ||
config: HeadlessConfig, | ||
chatClient?: ChatClient | ||
internalConfig: InternalConfig | ||
): ChatHeadless { | ||
return new ChatHeadlessImpl(config, chatClient); | ||
const internalCore = provideChatCoreInternal(config, internalConfig); | ||
return new ChatHeadlessImpl(config, internalCore); | ||
} |