-
- All Implemented Interfaces:
public final class ClientDefinitionBuildersKt
-
-
Method Summary
Modifier and Type Method Description final static ClientStoryDefinitionunknownStory(Function1<ClientBus, Unit> handler)Create a story addressing Intent.unknown intent. final static ClientBotDefinitionnewBot(String apiKey, List<ClientStoryDefinition> stories, ClientStoryDefinition unknownStory)Creates a definition for a new bot in bot Api mode final static ClientBotDefinitionnewBot(String apiKey, ClientStoryDefinition stories)Creates a new bot in bot Api mode final static ClientStoryDefinitionnewStory(String mainIntent, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<ClientStep> steps, String storyId, Function1<ClientBus, Unit> handler)Creates a new story in bot Api mode final static ClientStoryDefinitionnewStory(IntentAware mainIntent, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<ClientStep> steps, String storyId, Function1<ClientBus, Unit> handler)Creates a new story ClientStoryDefinition in bot Api mode final static ClientStoryHandlernewStoryHandler(Function1<ClientBus, Unit> handler)Creates a new ClientStoryHandler. -
-
Method Detail
-
unknownStory
final static ClientStoryDefinition unknownStory(Function1<ClientBus, Unit> handler)
Create a story addressing Intent.unknown intent.
- Parameters:
handler- The handler for the story.
-
newBot
final static ClientBotDefinition newBot(String apiKey, List<ClientStoryDefinition> stories, ClientStoryDefinition unknownStory)
Creates a definition for a new bot in bot Api mode
- Parameters:
apiKey- the api key for the bot configuration, as found in Tock Studiostories- List of stories supported by the bot.unknownStory- the story to trigger when theunknownintent is selected
-
newBot
final static ClientBotDefinition newBot(String apiKey, ClientStoryDefinition stories)
Creates a new bot in bot Api mode
- Parameters:
apiKey- the api key for the bot configuration, as found in Tock Studiostories- List of stories supported by the bot.
-
newStory
final static ClientStoryDefinition newStory(String mainIntent, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<ClientStep> steps, String storyId, Function1<ClientBus, Unit> handler)
Creates a new story in bot Api mode
- Parameters:
mainIntent- String The main intent name.otherStarterIntents- other intents that triggers the storysecondaryIntents- other intents available in the story scope when it is triggeredsteps- List of story stepsstoryId- default is mainIntent namehandler- lamdba handler for the story
-
newStory
final static ClientStoryDefinition newStory(IntentAware mainIntent, Set<IntentAware> otherStarterIntents, Set<IntentAware> secondaryIntents, List<ClientStep> steps, String storyId, Function1<ClientBus, Unit> handler)
Creates a new story ClientStoryDefinition in bot Api mode
- Parameters:
mainIntent- IntentAware The main intent name.otherStarterIntents- other intents that triggers the storysecondaryIntents- other intents available in the story scope when it is triggeredsteps- List of steps stories ClientStepstoryId- default is mainIntent with wrappedIntent namehandler- lamdba handler for the story
-
newStoryHandler
final static ClientStoryHandler newStoryHandler(Function1<ClientBus, Unit> handler)
Creates a new ClientStoryHandler.
- Parameters:
handler- lamdba handler for the story
-
-
-
-