tock
Module Contents
package ai.tock.bot
package ai.tock.bot.admin.answer
package ai.tock.bot.admin.bot
Module Contents
data class ArtifactVersion
data class BotApplicationConfiguration
Module Contents
BotApplicationConfiguration(applicationId: String, botId: String, namespace: String, nlpModel: String, connectorType: ConnectorType, ownerConnectorType: ConnectorType? = null, name: String = applicationId, baseUrl: String? = defaultBaseUrl, parameters: Map<String, String> = emptyMap(), path: String? = null, _id: Id<BotApplicationConfiguration> = newId(), targetConfigurationId: Id<BotApplicationConfiguration>? = null)
val _id: Id<BotApplicationConfiguration>
val applicationId: String
val baseUrl: String?
val botId: String
val connectorType: ConnectorType
val defaultBaseUrl: String
val name: String
val namespace: String
val nlpModel: String
val ownerConnectorType: ConnectorType?
val parameters: Map<String, String>
val path: String?
val targetConfigurationId: Id<BotApplicationConfiguration>?
val targetConnectorType: ConnectorType
fun toConnectorConfiguration(): ConnectorConfiguration
interface BotApplicationConfigurationDAO
data class BotApplicationConfigurationKey
data class BotConfiguration
data class BotVersion
package ai.tock.bot.admin.dialog
Module Contents
data class ActionReport
data class ApplicationDialogFlowData
data class DialogFlowStateData
data class DialogFlowStateTransitionData
data class DialogFlowTransitionStatsData
data class DialogReport
interface DialogReportDAO
data class DialogReportQuery
Module Contents
DialogReportQuery(namespace: String, nlpModel: String, language: Locale? = null, start: Long = 0, size: Int = 1, playerId: PlayerId? = null, text: String? = null, dialogId: String? = null, intentName: String? = null, exactMatch: Boolean = false, from: ZonedDateTime? = null, to: ZonedDateTime? = null, connectorType: ConnectorType? = null, displayTests: Boolean = false, obfuscated: Boolean = false)
val connectorType: ConnectorType?
val dialogId: String?
val displayTests: Boolean
val exactMatch: Boolean
val from: ZonedDateTime?
val intentName: String?
val language: Locale?
val namespace: String
val nlpModel: String
val obfuscated: Boolean
val playerId: PlayerId?
val size: Int
val start: Long
val text: String?
val to: ZonedDateTime?
data class DialogReportQueryResult
package ai.tock.bot.admin.message
Module Contents
data class AttachmentConfiguration : MessageConfiguration
data class ChoiceConfiguration : MessageConfiguration
data class LocationConfiguration : MessageConfiguration
interface MessageConfiguration
data class SentenceConfiguration : MessageConfiguration
data class SentenceElementConfiguration
Module Contents
SentenceElementConfiguration(connectorType: ConnectorType = ConnectorType.none, attachments: List<AttachmentConfiguration> = emptyList(), choices: List<ChoiceConfiguration> = emptyList(), texts: Map<String, I18nLabelValue> = emptyMap(), locations: List<LocationConfiguration> = emptyList(), metadata: Map<String, String> = emptyMap(), subElements: List<SentenceSubElementConfiguration> = emptyList(), connectorMessage: ConnectorMessage? = null)
val attachments: List<AttachmentConfiguration>
val choices: List<ChoiceConfiguration>
val connectorType: ConnectorType
val locations: List<LocationConfiguration>
val metadata: Map<String, String>
val subElements: List<SentenceSubElementConfiguration>
val texts: Map<String, I18nLabelValue>
data class SentenceSubElementConfiguration
package ai.tock.bot.admin.story
Module Contents
data class StoryDefinitionConfiguration : StoryDefinitionAnswersContainer
Module Contents
StoryDefinitionConfiguration(botDefinition: BotDefinition, storyDefinition: StoryDefinition, configurationName: String?)
StoryDefinitionConfiguration(storyId: String, botId: String, intent: IntentWithoutNamespace, currentType: AnswerConfigurationType, answers: List<AnswerConfiguration>, version: Int = 0, namespace: String = defaultNamespace, mandatoryEntities: List<StoryDefinitionConfigurationMandatoryEntity> = emptyList(), steps: List<StoryDefinitionConfigurationStep> = emptyList(), name: String = storyId, category: String = "default", description: String = "", userSentence: String = "", userSentenceLocale: Locale? = null, configurationName: String? = null, features: List<StoryDefinitionConfigurationFeature> = emptyList(), _id: Id<StoryDefinitionConfiguration> = newId(), tags: Set<StoryTag> = emptySet(), configuredAnswers: List<DedicatedAnswerConfiguration> = emptyList(), configuredSteps: List<StoryDefinitionConfigurationByBotStep> = emptyList())
val _id: Id<StoryDefinitionConfiguration>
val answers: List<AnswerConfiguration>
val botId: String
val category: String
val configurationName: String?
val configuredAnswers: List<DedicatedAnswerConfiguration>
val configuredSteps: List<StoryDefinitionConfigurationByBotStep>
val currentType: AnswerConfigurationType
val description: String
val features: List<StoryDefinitionConfigurationFeature>
fun findNextSteps(bus: BotBus, story: StoryDefinitionConfiguration): List<CharSequence>
val intent: IntentWithoutNamespace
val mandatoryEntities: List<StoryDefinitionConfigurationMandatoryEntity>
val name: String
val namespace: String
val steps: List<StoryDefinitionConfigurationStep>
val storyId: String
val tags: Set<StoryTag>
val userSentence: String
val userSentenceLocale: Locale?
val version: Int
data class StoryDefinitionConfigurationByBotStep
interface StoryDefinitionConfigurationDAO
Module Contents
abstract fun createBuiltInStoriesIfNotExist(stories: List<StoryDefinitionConfiguration>): Unit
abstract fun delete(story: StoryDefinitionConfiguration): Unit
abstract fun getConfiguredStoryDefinitionByNamespaceAndBotIdAndIntent(namespace: String, botId: String, intent: String): StoryDefinitionConfiguration?
abstract fun getRuntimeStorySettings(namespace: String, botId: String): List<StoryDefinitionConfiguration>
abstract fun getStoryDefinitionById(id: Id<StoryDefinitionConfiguration>): StoryDefinitionConfiguration?
abstract fun getStoryDefinitionByNamespaceAndBotIdAndIntent(namespace: String, botId: String, intent: String): StoryDefinitionConfiguration?
abstract fun getStoryDefinitionByNamespaceAndBotIdAndStoryId(namespace: String, botId: String, storyId: String): StoryDefinitionConfiguration?
abstract fun getStoryDefinitionsByNamespaceAndBotId(namespace: String, botId: String): List<StoryDefinitionConfiguration>
abstract fun getStoryDefinitionsByNamespaceBotIdStoryId(namespace: String, botId: String, storyId: String): StoryDefinitionConfiguration?
abstract fun listenChanges(listener: () -> Unit): Unit
abstract fun save(story: StoryDefinitionConfiguration): Unit
abstract fun searchStoryDefinitionSummaries(request: StoryDefinitionConfigurationSummaryRequest): List<StoryDefinitionConfigurationSummary>
data class StoryDefinitionConfigurationFeature
data class StoryDefinitionConfigurationFlowNode
data class StoryDefinitionConfigurationMandatoryEntity : StoryDefinitionAnswersContainer
data class StoryDefinitionConfigurationStep : StoryDefinitionAnswersContainer
Module Contents
StoryDefinitionConfigurationStep(step: StoryStep<*>)
StoryDefinitionConfigurationStep(name: String, intent: IntentWithoutNamespace?, targetIntent: IntentWithoutNamespace?, answers: List<AnswerConfiguration>, currentType: AnswerConfigurationType, userSentence: String = "", userSentenceLabel: I18nLabelValue? = null, children: List<StoryDefinitionConfigurationStep> = emptyList(), level: Int = 0, entity: EntityStepSelection? = null)
val answers: List<AnswerConfiguration>
val children: List<StoryDefinitionConfigurationStep>
val currentType: AnswerConfigurationType
val entity: EntityStepSelection?
fun findNextSteps(bus: BotBus, story: StoryDefinitionConfiguration): List<CharSequence>
val hasNoChildren: Boolean
val intent: IntentWithoutNamespace?
val level: Int
val name: String
val targetIntent: IntentWithoutNamespace?
fun toStoryStep(story: StoryDefinitionConfiguration): StoryStep<StoryHandlerDefinition>
val userSentence: String
val userSentenceLabel: I18nLabelValue?
data class StoryDefinitionConfigurationSummary
data class StoryDefinitionConfigurationSummaryRequest
package ai.tock.bot.admin.story.dump
Module Contents
abstract class AnswerConfigurationDump
data class BuiltInAnswerConfigurationDump : AnswerConfigurationDump
data class MediaActionDescriptorDump : MediaMessageDescriptorDump
data class MediaCardDescriptorDump : MediaMessageDescriptorDump
data class MediaCarouselDescriptorDump : MediaMessageDescriptorDump
class MediaFileDescriptorDump
interface MediaMessageDescriptorDump
data class MessageAnswerConfigurationDump : AnswerConfigurationDump
data class ScriptAnswerConfigurationDump : AnswerConfigurationDump
data class ScriptAnswerVersionedConfigurationDump
data class SimpleAnswerConfigurationDump : AnswerConfigurationDump
data class SimpleAnswerDump
data class StoryDefinitionConfigurationDump
Module Contents
StoryDefinitionConfigurationDump(def: StoryDefinitionConfiguration)
StoryDefinitionConfigurationDump(storyId: String, botId: String, intent: IntentWithoutNamespace, currentType: AnswerConfigurationType, answers: List<AnswerConfigurationDump>, version: Int = 0, namespace: String = defaultNamespace, mandatoryEntities: List<StoryDefinitionConfigurationMandatoryEntityDump> = emptyList(), steps: List<StoryDefinitionConfigurationStepDump> = emptyList(), name: String = storyId, category: String = "default", description: String = "", userSentence: String = "", userSentenceLocale: Locale? = null, configurationName: String? = null, features: List<StoryDefinitionConfigurationFeatureDump> = emptyList(), tags: Set<StoryTag> = emptySet(), configuredAnswers: List<DedicatedAnswerConfiguration> = emptyList(), configuredSteps: List<StoryDefinitionConfigurationByBotStep> = emptyList())
val answers: List<AnswerConfigurationDump>
val botId: String
val category: String
val configurationName: String?
val configuredAnswers: List<DedicatedAnswerConfiguration>
val configuredSteps: List<StoryDefinitionConfigurationByBotStep>
val currentType: AnswerConfigurationType
val description: String
val features: List<StoryDefinitionConfigurationFeatureDump>
val intent: IntentWithoutNamespace
val mandatoryEntities: List<StoryDefinitionConfigurationMandatoryEntityDump>
val name: String
val namespace: String
val steps: List<StoryDefinitionConfigurationStepDump>
val storyId: String
val tags: Set<StoryTag>
fun toStoryDefinitionConfiguration(controller: StoryDefinitionConfigurationDumpController): StoryDefinitionConfiguration
val userSentence: String
val userSentenceLocale: Locale?
val version: Int
interface StoryDefinitionConfigurationDumpController
data class StoryDefinitionConfigurationFeatureDump
data class StoryDefinitionConfigurationMandatoryEntityDump
data class StoryDefinitionConfigurationStepDump
Module Contents
StoryDefinitionConfigurationStepDump(def: StoryDefinitionConfigurationStep, namespace: String, category: String)
StoryDefinitionConfigurationStepDump(name: String, intent: IntentWithoutNamespace?, targetIntent: IntentWithoutNamespace?, answers: List<AnswerConfigurationDump>, currentType: AnswerConfigurationType, userSentenceLabel: I18nLabelValue? = null, children: List<StoryDefinitionConfigurationStepDump> = emptyList(), level: Int = 0, entity: EntityStepSelection? = null)
val answers: List<AnswerConfigurationDump>
val children: List<StoryDefinitionConfigurationStepDump>
val currentType: AnswerConfigurationType
val entity: EntityStepSelection?
val intent: IntentWithoutNamespace?
val level: Int
val name: String
val targetIntent: IntentWithoutNamespace?
fun toStep(controller: StoryDefinitionConfigurationDumpController): StoryDefinitionConfigurationStep
val userSentenceLabel: I18nLabelValue?
package ai.tock.bot.admin.test
Module Contents
data class DialogExecutionReport
fun findTestClient(): TestClientService
data class TestActionReport
Module Contents
TestActionReport(playerId: PlayerId, date: Instant, message: Message, connectorType: ConnectorType?, userInterfaceType: UserInterfaceType, id: Id<Action> = newId())
TestActionReport(report: ActionReport)
TestActionReport(playerId: PlayerId, date: Instant, messages: List<Message>, connectorType: ConnectorType?, userInterfaceType: UserInterfaceType = textChat, id: Id<Action>)
val connectorType: ConnectorType?
val date: Instant
fun findFirstMessage(): Message
val id: Id<Action>
val messages: List<Message>
val playerId: PlayerId
val userInterfaceType: UserInterfaceType
interface TestClientService
data class TestDialogReport
data class TestPlan
interface TestPlanDAO
data class TestPlanExecution
enum class TestPlanExecutionStatus
package ai.tock.bot.admin.user
Module Contents
data class AnalyticsQuery
data class UserAnalytics
data class UserAnalyticsQueryResult
data class UserReport
interface UserReportDAO
data class UserReportQuery
Module Contents
UserReportQuery(namespace: String, nlpModel: String, language: Locale, start: Long = 0, size: Int = 1, name: String? = null, from: ZonedDateTime? = null, to: ZonedDateTime? = null, flags: Map<String, String?> = emptyMap(), displayTests: Boolean = false)
val displayTests: Boolean
val flags: Map<String, String?>
val from: ZonedDateTime?
val language: Locale
val name: String?
val namespace: String
val nlpModel: String
val size: Int
val start: Long
val to: ZonedDateTime?
data class UserReportQueryResult
package ai.tock.bot.api.client
Module Contents
class ClientBotDefinition
interface ClientBus : Bus<ClientBus>
Module Contents
abstract val botDefinition: ClientBotDefinition
abstract fun end(card: Card): ClientBus
abstract fun end(carousel: Carousel): ClientBus
abstract fun end(i18nText: CharSequence, suggestions: List<Suggestion>, delay: Long = defaultDelay(currentAnswerIndex), vararg i18nArgs: Any?): ClientBus
open fun end(i18nText: CharSequence, suggestions: List<CharSequence>): ClientBus
abstract val entities: MutableList<Entity>
open fun entity(role: String): Entity?
open fun entityText(role: String): String?
open fun <T : Value> entityValue(role: String): T?
abstract fun handle(): Unit
abstract val message: UserMessage
open fun newAction(title: CharSequence, url: String? = null): Action
open fun newAttachment(url: String, type: AttachmentType? = null): Attachment
open fun newCard(title: CharSequence? = null, subTitle: CharSequence? = null, attachment: Attachment? = null, actions: List<Action> = emptyList(), delay: Long = defaultDelay(currentAnswerIndex)): Card
open fun newCard(title: CharSequence? = null, subTitle: CharSequence? = null, attachment: Attachment? = null, vararg actions: Action, delay: Long = defaultDelay(currentAnswerIndex)): Card
open fun newCarousel(cards: List<Card>, delay: Long = defaultDelay(currentAnswerIndex)): Carousel
open fun newCarousel(vararg cards: Card, delay: Long = defaultDelay(currentAnswerIndex)): Carousel
open fun removeEntity(role: String): Boolean
open fun removeEntity(entity: Entity): Boolean
abstract fun send(card: Card): ClientBus
abstract fun send(carousel: Carousel): ClientBus
abstract fun send(i18nText: CharSequence, suggestions: List<Suggestion>, delay: Long = defaultDelay(currentAnswerIndex), vararg i18nArgs: Any?): ClientBus
open fun send(i18nText: CharSequence, suggestions: List<CharSequence>): ClientBus
abstract var step: ClientStep?
abstract var story: ClientStoryDefinition
open fun translate(text: CharSequence?, vararg args: Any?): I18nText
class ClientStep
class ClientStoryDefinition : IntentAware
interface ClientStoryHandler
fun newBot(apiKey: String, stories: List<ClientStoryDefinition>, unknownStory: ClientStoryDefinition = defaultUnknownStory()): ClientBotDefinition
fun newBot(apiKey: String, vararg stories: ClientStoryDefinition): ClientBotDefinition
fun newStory(mainIntent: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<ClientStep> = emptyList(), storyId: String = mainIntent, handler: ClientBus.() -> Unit): ClientStoryDefinition
fun newStory(mainIntent: IntentAware, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<ClientStep> = emptyList(), storyId: String = mainIntent.wrappedIntent().name, handler: ClientBus.() -> Unit): ClientStoryDefinition
fun newStoryHandler(handler: ClientBus.() -> Unit): ClientStoryHandler
class TockClientBus : ClientBus
Module Contents
TockClientBus(botDefinition: ClientBotDefinition, data: RequestData, sendAnswer: (BotResponse) -> Unit)
TockClientBus(botDefinition: ClientBotDefinition, requestId: String, request: UserRequest, sendAnswer: (BotResponse) -> Unit)
val applicationId: String
val botDefinition: ClientBotDefinition
val botId: PlayerId
val contextId: String?
val currentAnswerIndex: Int
fun defaultDelay(answerIndex: Int): Long
fun end(i18nText: CharSequence, suggestions: List<Suggestion>, delay: Long, vararg i18nArgs: Any?): ClientBus
fun end(card: Card): ClientBus
fun end(carousel: Carousel): ClientBus
fun endRawText(plainText: CharSequence?, delay: Long): ClientBus
val entities: MutableList<Entity>
fun handle(): Unit
fun i18n(defaultLabel: CharSequence, args: List<Any?>): I18nLabelValue
val intent: IntentAware?
val message: UserMessage
val request: UserRequest
val requestId: String
fun send(i18nText: CharSequence, suggestions: List<Suggestion>, delay: Long, vararg i18nArgs: Any?): ClientBus
fun send(carousel: Carousel): ClientBus
fun send(card: Card): ClientBus
val sendAnswer: (BotResponse) -> Unit
fun sendRawText(plainText: CharSequence?, delay: Long): ClientBus
var step: ClientStep?
val stepName: String?
lateinit var story: ClientStoryDefinition
val targetConnectorType: ConnectorType
val test: Boolean
val userId: PlayerId
val userInterfaceType: UserInterfaceType
val userLocale: Locale
fun withMessage(connectorType: ConnectorType, messageProvider: () -> ConnectorMessage): ClientBus
fun withMessage(connectorType: ConnectorType, connectorId: String, messageProvider: () -> ConnectorMessage): ClientBus
fun ClientBotDefinition.toConfiguration(): ClientConfiguration
fun unknownStory(handler: ClientBus.() -> Unit): ClientStoryDefinition
package ai.tock.bot.api.model
package ai.tock.bot.api.model.configuration
package ai.tock.bot.api.model.context
package ai.tock.bot.api.model.message.bot
package ai.tock.bot.api.model.message.user
package ai.tock.bot.api.model.websocket
package ai.tock.bot.api.webhook
package ai.tock.bot.api.websocket
package ai.tock.bot.connector
Module Contents
interface Connector
Module Contents
open fun addSuggestions(text: CharSequence, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
open fun addSuggestions(message: ConnectorMessage, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
abstract val connectorType: ConnectorType
open fun hasFeature(feature: ConnectorFeature, targetConnectorType: ConnectorType): Boolean
open fun loadProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences?
open fun notify(controller: ConnectorController, recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap(), notificationType: ActionNotificationType?, errorListener: (Throwable) -> Unit = {}): Unit
open fun refreshProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences?
abstract fun register(controller: ConnectorController): Unit
abstract fun send(event: Event, callback: ConnectorCallback, delayInMs: Long = 0): Unit
open val supportedFeatures: Set<ConnectorFeature>
open fun toConnectorMessage(message: MediaMessage): BotBus.() -> List<ConnectorMessage>
open fun unregister(controller: ConnectorController): Unit
abstract class ConnectorBase : Connector
interface ConnectorCallback
open class ConnectorCallbackBase : ConnectorCallback
data class ConnectorConfiguration
Module Contents
ConnectorConfiguration(connectorId: String, path: String, type: ConnectorType, applicationName: String, baseUrl: String?, ownerConnectorType: ConnectorType? = null, parameters: Map<String, String> = emptyMap())
ConnectorConfiguration(connectorId: String, path: String, type: ConnectorType, ownerConnectorType: ConnectorType? = null, parameters: Map<String, String> = emptyMap())
val connectorId: String
fun getBaseUrl(): String
fun getName(): String
val ownerConnectorType: ConnectorType?
val parameters: Map<String, String>
val path: String
val type: ConnectorType
open class ConnectorData
class ConnectorException : Exception
enum class ConnectorFeature
@Target([AnnotationTarget.ANNOTATION_CLASS]) annotation class ConnectorHandler
annotation class ConnectorIdHandler
@Target([AnnotationTarget.CLASS]) annotation class ConnectorIdHandlers
interface ConnectorMessage : ConnectorMessageProvider
interface ConnectorMessageProvider
interface ConnectorProvider
class ConnectorQueue
interface ConnectorService
data class ConnectorType
data class ConnectorTypeConfiguration
data class ConnectorTypeConfigurationField
enum class NotifyBotStateModifier
interface SerializableConnectorMessage : ConnectorMessage
package ai.tock.bot.connector.alexa
Module Contents
class AlexaConnector : ConnectorBase
data class AlexaConnectorCallback : ConnectorCallbackBase, SpeechletV2
val alexaConnectorType: ConnectorType
fun alexaEndConversation(): AlexaMessage
@ConnectorHandler("alexa") @Target([AnnotationTarget.CLASS]) annotation class AlexaHandler
data class AlexaInputMessage : ConnectorMessage
data class AlexaMessage : ConnectorMessage
fun I18nTranslator.alexaReprompt(reprompt: CharSequence): AlexaMessage
fun I18nTranslator.alexaStandardCard(title: CharSequence, text: CharSequence, smallImageUrl: String, largeImageUrl: String = smallImageUrl): AlexaMessage
open class AlexaTockMapper
Module Contents
AlexaTockMapper(applicationId: String)
open fun alexaEntityToTockEntity(request: IntentRequest, intent: String, slot: String, botDefinition: BotDefinition): Entity?
open fun alexaEntityToTockEntityValue(request: IntentRequest, intent: String, slot: Slot, botDefinition: BotDefinition, index: Int): NlpEntityValue
open fun alexaIntentToTockIntent(request: IntentRequest, botDefinition: BotDefinition): String
val applicationId: String
open fun getSlots(request: IntentRequest): Map<String, Slot>?
open fun toEndSessionEvent(requestEnvelope: SpeechletRequestEnvelope<SessionEndedRequest>): EndSessionEvent
open fun toEvent(userId: String, request: IntentRequest, botDefinition: BotDefinition): Event
open fun toStartSessionEvent(requestEnvelope: SpeechletRequestEnvelope<SessionStartedRequest>): StartSessionEvent
fun <T : Bus<T>> T.endForAlexa(messageProvider: T.() -> AlexaMessage, delay: Long = defaultDelay(currentAnswerIndex)): T
fun <T : Bus<T>> T.sendToAlexa(messageProvider: T.() -> AlexaMessage, delay: Long = defaultDelay(currentAnswerIndex)): T
fun <T : Bus<T>> T.withAlexa(messageProvider: () -> AlexaMessage): T
package ai.tock.bot.connector.ga
Module Contents
fun I18nTranslator.basicCard(title: CharSequence?, subtitle: CharSequence?, formattedText: CharSequence?, image: GAImage?, buttons: List<GAButton>): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence? = null, subtitle: CharSequence? = null, formattedText: CharSequence? = null, image: GAImage? = null, button: GAButton? = null): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, subtitle: CharSequence, image: GAImage, button: GAButton): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, button: GAButton): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, subtitle: CharSequence): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, image: GAImage): GABasicCard
fun I18nTranslator.basicCard(title: CharSequence, subtitle: CharSequence, image: GAImage): GABasicCard
fun I18nTranslator.basicCard(image: GAImage): GABasicCard
fun <T : Bus<T>> T.carouselItem(targetIntent: IntentAware, title: CharSequence, description: CharSequence? = null, image: GAImage? = null, vararg parameters: Pair<String, String>): GACarouselItem
fun <T : Bus<T>> T.carouselItem(targetIntent: IntentAware, title: CharSequence, description: CharSequence? = null, image: GAImage? = null, parameters: Parameters): GACarouselItem
fun <T : Bus<T>> T.carouselItem(targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, title: CharSequence, description: CharSequence? = null, image: GAImage? = null, parameters: Parameters): GACarouselItem
fun <T : Bus<T>> T.carouselItem(targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, title: CharSequence, description: CharSequence? = null, image: GAImage? = null, vararg parameters: Pair<String, String>): GACarouselItem
fun <T : Bus<T>> T.endForGoogleAssistant(messageProvider: T.() -> GAResponseConnectorMessage, delay: Long = defaultDelay(currentAnswerIndex)): T
fun I18nTranslator.expectedIntentForCarousel(items: List<GACarouselItem>): GAExpectedIntent
fun I18nTranslator.expectedIntentForList(items: List<GAListItem>, title: CharSequence? = null): GAExpectedIntent
fun I18nTranslator.expectedIntentForSimpleSelect(items: List<GASelectItem>): GAExpectedIntent
fun expectedTextIntent(): GAExpectedIntent
fun ConnectorMessage.findTransactionDecisionValueV3(): GATransactionDecisionValueV3?
fun ConnectorMessage.findTransactionRequirementsCheckResultV3(): GATransactionRequirementsCheckResultV3?
fun I18nTranslator.flexibleSimpleResponse(textToSpeech: CharSequence? = null, ssml: CharSequence? = null, displayText: CharSequence? = null): GASimpleResponse
fun I18nTranslator.gaButton(title: CharSequence, url: String): GAButton
class GAConnector : ConnectorBase
val gaConnectorType: ConnectorType
fun I18nTranslator.gaFinalMessage(richResponse: GARichResponse): GAResponseConnectorMessage
fun I18nTranslator.gaFinalMessage(text: CharSequence? = null): GAResponseConnectorMessage
fun I18nTranslator.gaFlexibleMessageForCarousel(items: List<GACarouselItem>, suggestions: List<CharSequence> = emptyList(), oneItemTitle: CharSequence? = null, oneItemSubtitle: CharSequence? = null, oneItemDescription: CharSequence? = null, oneItemSuggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage
fun I18nTranslator.gaFlexibleMessageForCarousel(items: List<GACarouselItem>, suggestions: List<CharSequence> = emptyList(), oneItemSuggestions: List<CharSequence> = emptyList(), oneItemBasicCardProvider: (GACarouselItem) -> GABasicCard = {
basicCard(
it.title.raw,
if (it.image != null) it.description?.raw else null,
if (it.image == null) it.description?.raw else null,
it.image
)
}): GAResponseConnectorMessage
fun I18nTranslator.gaFlexibleMessageForList(items: List<GAListItem>, title: CharSequence? = null, suggestions: List<CharSequence> = emptyList(), oneItemTitle: CharSequence? = null, oneItemSubtitle: CharSequence? = null, oneItemDescription: CharSequence? = null, oneItemSuggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage
@ConnectorHandler("ga") @Target([AnnotationTarget.CLASS]) annotation class GAHandler
fun I18nTranslator.gaImage(url: String, accessibilityText: CharSequence, height: Int? = null, width: Int? = null): GAImage
fun gaLogout(): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(inputPrompt: GAInputPrompt, possibleIntents: List<GAExpectedIntent> = listOf(
expectedTextIntent()
), speechBiasingHints: List<String> = emptyList()): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(text: CharSequence, vararg suggestions: CharSequence): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(text: CharSequence, basicCard: GABasicCard): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(richResponse: GARichResponse): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(possibleIntent: GAExpectedIntent): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(possibleIntents: List<GAExpectedIntent>): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(text: CharSequence, possibleIntents: List<GAExpectedIntent>): GAResponseConnectorMessage
fun I18nTranslator.gaMessage(gaRichResponse: GARichResponse, listItems: List<GAListItem>, title: CharSequence? = null): GAResponseConnectorMessage
fun I18nTranslator.gaMessageForCarousel(items: List<GACarouselItem>, suggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage
fun I18nTranslator.gaMessageForList(items: List<GAListItem>, title: CharSequence? = null, suggestions: List<CharSequence> = emptyList()): GAResponseConnectorMessage
class GaNotificationClient
data class GARequestConnectorMessage : ConnectorMessage
data class GAResponseConnectorMessage : ConnectorMessage
fun I18nTranslator.gaTransactionOrderDecision(order: GAOrder, orderOptions: GAOrderOptionsV3? = null, paymentParameters: GAPaymentParameters? = null, presentationOptions: GAPresentationOptions? = null): GAResponseConnectorMessage
fun I18nTranslator.gaTransactionOrderUpdate(orderUpdate: GAOrderUpdateV3): GAResponseConnectorMessage
fun I18nTranslator.gaTransactionRequirementsCheckV3(): GAResponseConnectorMessage
fun I18nTranslator.inputPrompt(richResponse: GARichResponse, noInputPrompts: List<GASimpleResponse> = emptyList()): GAInputPrompt
fun I18nTranslator.inputPrompt(text: CharSequence, linkOutSuggestion: GALinkOutSuggestion? = null, noInputPrompts: List<GASimpleResponse> = emptyList()): GAInputPrompt
fun I18nTranslator.item(simpleResponse: GASimpleResponse? = null, basicCard: GABasicCard? = null, structuredResponse: GAStructuredResponse? = null): GAItem
fun I18nTranslator.item(basicCard: GABasicCard): GAItem
fun I18nTranslator.item(structuredResponse: GAStructuredResponse): GAItem
fun I18nTranslator.item(simpleResponse: GASimpleResponse): GAItem
fun I18nTranslator.linkOutSuggestion(destinationName: CharSequence, url: String): GALinkOutSuggestion
fun <T : Bus<T>> T.listItem(title: CharSequence, targetIntent: IntentAware, vararg parameters: Pair<String, String>): GAListItem
fun <T : Bus<T>> T.listItem(title: CharSequence, targetIntent: IntentAware, description: CharSequence, imageUrl: String? = null, vararg parameters: Pair<String, String>): GAListItem
fun <T : Bus<T>> T.listItem(title: CharSequence, targetIntent: IntentAware, parameters: Parameters): GAListItem
fun <T : Bus<T>> T.listItem(title: CharSequence, targetIntent: IntentAware, description: CharSequence?, imageUrl: String? = null, parameters: Parameters): GAListItem
fun <T : Bus<T>> T.listItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, parameters: Parameters): GAListItem
fun <T : Bus<T>> T.listItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, vararg parameters: Pair<String, String>): GAListItem
fun <T : Bus<T>> T.listItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, description: CharSequence? = null, imageUrl: String? = null, parameters: Parameters): GAListItem
fun <T : Bus<T>> T.listItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, description: CharSequence? = null, imageUrl: String? = null, vararg parameters: Pair<String, String>): GAListItem
fun <T : Bus<T>> T.optionInfo(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>): GAOptionInfo
fun I18nTranslator.optionValueSpec(simpleSelect: GASimpleSelect? = null, listSelect: GAListSelect? = null, carouselSelect: GACarouselSelect? = null): GAOptionValueSpec
fun I18nTranslator.permissionIntent(optionalContext: CharSequence? = null, vararg permissions: GAPermission): GAExpectedIntent
fun richResponse(items: List<GAItem>, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<GASuggestion>): GARichResponse
fun I18nTranslator.richResponse(items: List<GAItem>, linkOutSuggestion: GALinkOutSuggestion? = null, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(items: List<GAItem>, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(items: List<GAItem>, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(item: GAItem, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(item: GAItem, linkOutSuggestion: GALinkOutSuggestion? = null, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, linkOutSuggestion: GALinkOutSuggestion? = null, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, basicCard: GABasicCard, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, basicCard: GABasicCard, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(text: CharSequence, basicCard: GABasicCard, vararg suggestions: CharSequence): GARichResponse
fun I18nTranslator.richResponse(basicCard: GABasicCard, linkOutSuggestion: GALinkOutSuggestion? = null, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(basicCard: GABasicCard, suggestions: List<CharSequence>): GARichResponse
fun I18nTranslator.richResponse(basicCard: GABasicCard, vararg suggestions: CharSequence): GARichResponse
fun <T : Bus<T>> T.selectItem(title: CharSequence, targetIntent: IntentAware, vararg parameters: Pair<String, String>): GASelectItem
fun <T : Bus<T>> T.selectItem(title: CharSequence, targetIntent: IntentAware, optionTitle: CharSequence? = null, vararg parameters: Pair<String, String>): GASelectItem
fun <T : Bus<T>> T.selectItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>, optionTitle: CharSequence? = null, parameters: Parameters): GASelectItem
fun <T : Bus<T>> T.selectItem(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, optionTitle: CharSequence? = null, vararg parameters: Pair<String, String>): GASelectItem
fun <T : Bus<T>> T.sendToGoogleAssistant(messageProvider: T.() -> GAResponseConnectorMessage, delay: Long = defaultDelay(currentAnswerIndex)): T
fun I18nTranslator.simpleResponse(text: CharSequence): GASimpleResponse
fun I18nTranslator.suggestion(text: CharSequence): GASuggestion
fun I18nTranslator.updatePermissionIntent(intent: String): GAExpectedIntent
fun <T : Bus<T>> T.withGoogleAssistant(messageProvider: () -> GAResponseConnectorMessage): T
fun <T : Bus<T>> T.withGoogleVoiceAssistant(messageProvider: () -> GAResponseConnectorMessage): T
package ai.tock.bot.connector.ga.model
package ai.tock.bot.connector.ga.model.notification
package ai.tock.bot.connector.ga.model.request
Module Contents
data class GAArgument
enum class GAArgumentBuiltInName
abstract class GAArgumentValue
enum class GAArgumentValueType
data class GACapability
data class GAConversation
enum class GAConversationType
data class GADate
data class GADateTime
data class GADevice
data class GAGoogleProvidedPaymentInstrument
enum class GAHoldStatus
data class GAHoldValue : GAArgumentValue
data class GAInput
enum class GAInputType
data class GALatLng
data class GALocation
enum class GANewSurfaceStatus
data class GANewSurfaceValue : GAArgumentValue
enum class GAPermission
data class GAPostalAddress
Module Contents
GAPostalAddress(revision: Double, regionCode: String, languageCode: String?, postalCode: String?, sortingCode: String?, administrativeArea: String?, locality: String?, sublocality: String?, addressLines: List<String>, recipients: List<String>?, organization: String?)
val addressLines: List<String>
val administrativeArea: String?
val languageCode: String?
val locality: String?
val organization: String?
val postalCode: String?
val recipients: List<String>?
val regionCode: String
val revision: Double
val sortingCode: String?
val sublocality: String?
data class GARawInput
data class GARequest
enum class GAResultType
enum class GASignInStatus
data class GASignInValue : GAArgumentValue
data class GASurface
data class GATimeOfDay
data class GATransactionDecisionCheckResult
enum class GATransactionUserDecision
data class GAUser
data class GAUserProfile
enum class GAUserVerificationStatus
package ai.tock.bot.connector.ga.model.request.transaction.v3
package ai.tock.bot.connector.ga.model.response
package ai.tock.bot.connector.ga.model.response.transaction.v3
Module Contents
enum class GAActionDisplayName
data class GAActionV3
data class GAContents
data class GaItemOption
data class GALineItemV3
data class GAMerchantPaymentMethod
data class GAMerchantPaymentOption
enum class GAMoneyType
data class GAMoneyV3
data class GAOrder
Module Contents
GAOrder(googleOrderId: String? = null, merchantOrderId: String, buyerInfo: GAUserInfo? = null, image: GAImage? = null, createTime: String, lastUpdateTime: String? = null, transactionMerchant: GAMerchant? = null, contents: GAContents, priceAttributes: List<GAPriceAttribute>? = emptyList(), followUpActions: List<GAActionV3>? = emptyList(), termsOfServiceUrl: String? = null, note: String? = null, purchase: GAPurchaseOrderExtension? = null, ticket: GATicketOrderExtension? = null)
val buyerInfo: GAUserInfo?
val contents: GAContents
val createTime: String
val followUpActions: List<GAActionV3>?
val googleOrderId: String?
val image: GAImage?
val lastUpdateTime: String?
val merchantOrderId: String
val note: String?
val priceAttributes: List<GAPriceAttribute>?
val purchase: GAPurchaseOrderExtension?
val termsOfServiceUrl: String?
val ticket: GATicketOrderExtension?
val transactionMerchant: GAMerchant?
data class GAOrderOptionsV3
data class GAOrderUpdateV3
data class GAPaymentMethodDisplayInfo
data class GAPaymentMethodStatus
enum class GAPaymentMethodStatusValue
data class GAPaymentParameters
data class GAPhoneNumber
data class GAPresentationOptions
data class GAPriceAttribute
data class GAPriceMoney
enum class GAPriceState
data class GAPurchaseItemExtension
data class GAPurchaseOrderExtension
enum class GAPurchaseStatus
enum class GAPurchaseType
data class GAReservationItemExtension
enum class GAReservationStatus
enum class GAReservationType
data class GAStaffFacilitator
data class GATicketItemExtension
data class GATicketOrderExtension
data class GATime
data class GATransactionDecisionValueSpecV3 : GAInputValueData
class GATransactionRequirementsCheckSpecV3 : GAInputValueData
data class GAUserInfo
data class GAUserInfoOptions
data class TicketEvent
enum class TicketEventType
enum class UserInfoProperty
package ai.tock.bot.connector.media
package ai.tock.bot.connector.messenger
Module Contents
fun <T : Bus<T>> T.attachment(attachmentUrl: String, type: AttachmentType, vararg quickReplies: QuickReply): AttachmentMessage
fun <T : Bus<T>> T.attachment(attachmentUrl: String, type: AttachmentType, quickReplies: List<QuickReply>): AttachmentMessage
fun <T : Bus<T>> T.audio(audioUrl: String, vararg quickReplies: QuickReply): AttachmentMessage
fun <T : Bus<T>> T.audio(audioUrl: String, quickReplies: List<QuickReply>): AttachmentMessage
fun I18nTranslator.buttonsTemplate(text: CharSequence, vararg actions: UserAction): AttachmentMessage
fun I18nTranslator.buttonsTemplate(text: CharSequence, actions: List<UserAction>): AttachmentMessage
fun I18nTranslator.callToButton(title: CharSequence, phoneNumber: String): CallButton
fun emailQuickReply(): QuickReply
fun <T : Bus<T>> T.endForMessenger(delay: Long = defaultDelay(currentAnswerIndex), messageProvider: T.() -> MessengerConnectorMessage): T
fun I18nTranslator.genericElement(title: CharSequence, subtitle: CharSequence? = null, imageUrl: String? = null, buttons: List<Button>? = null): Element
fun genericTemplate(vararg elements: Element): AttachmentMessage
fun genericTemplate(elements: List<Element>, quickReplies: List<QuickReply>): AttachmentMessage
fun genericTemplate(elements: List<Element>, vararg quickReplies: QuickReply): AttachmentMessage
fun <T : Bus<T>> T.image(imageUrl: String, vararg quickReplies: QuickReply): AttachmentMessage
fun <T : Bus<T>> T.image(imageUrl: String, quickReplies: List<QuickReply>): AttachmentMessage
fun loginButton(url: String): LoginButton
fun logoutButton(): LogoutButton
fun mediaTemplate(mediaUrl: String, mediaType: MediaType = MediaType.image, sharable: Boolean = false, vararg actions: UserAction): AttachmentMessage
fun mediaTemplate(mediaUrl: String, mediaType: MediaType = MediaType.image, sharable: Boolean = false, actions: List<UserAction> = emptyList()): AttachmentMessage
class MessengerConnector : ConnectorBase
Module Contents
fun addSuggestions(text: CharSequence, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
fun addSuggestions(message: ConnectorMessage, suggestions: List<CharSequence>): BotBus.() -> ConnectorMessage?
fun getConnectorById(connectorId: String): MessengerConnector?
fun getSecondaryReceivers(): List<SecondaryReceiverData>?
fun getThreadOwner(userId: PlayerId): String?
fun healthcheck(): Boolean
fun loadProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences
fun notify(controller: ConnectorController, recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>?, parameters: Map<String, String>, notificationType: ActionNotificationType?, errorListener: (Throwable) -> Unit): Unit
fun passThreadControl(userId: PlayerId, targetAppId: String, metadata: String? = null): SendResponse?
fun refreshProfile(callback: ConnectorCallback, userId: PlayerId): UserPreferences?
fun register(controller: ConnectorController): Unit
fun requestThreadControl(userId: PlayerId, metadata: String? = null): SendResponse?
fun send(event: Event, callback: ConnectorCallback, delayInMs: Long): Unit
fun sendCustomEvent(customEventRequest: CustomEventRequest): Unit
fun sendEvent(event: Event, transformMessageRequest: (MessageRequest) -> MessageRequest = { it }, postMessage: (String) -> Unit = {}, transformActionRequest: (ActionRequest) -> ActionRequest = { it }, errorListener: (Throwable) -> Unit = {}): SendResponse?
fun sendOptInEvent(event: Event): Unit
fun takeThreadControl(userId: PlayerId, metadata: String? = null): SendResponse?
fun toConnectorMessage(message: MediaMessage): BotBus.() -> List<ConnectorMessage>
fun unregister(controller: ConnectorController): Unit
val messengerConnectorType: ConnectorType
@ConnectorHandler("messenger") @Target([AnnotationTarget.CLASS]) annotation class MessengerHandler
fun I18nTranslator.nlpPostbackButton(title: CharSequence, textToSend: CharSequence = title): PostbackButton
fun I18nTranslator.nlpQuickReply(title: CharSequence, textToSend: CharSequence = title, imageUrl: String? = null): QuickReply
fun <T : Bus<T>> T.postbackButton(title: CharSequence, targetIntent: IntentAware, vararg parameters: Pair<String, String>): PostbackButton
fun <T : Bus<T>> T.postbackButton(title: CharSequence, targetIntent: IntentAware, parameters: Parameters): PostbackButton
fun <T : Bus<T>> T.postbackButton(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters): PostbackButton
fun <T : Bus<T>> T.postbackButton(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>): PostbackButton
fun <T : Bus<T>> T.quickReply(title: CharSequence, targetIntent: IntentAware, parameters: Parameters): QuickReply
fun <T : Bus<T>> T.quickReply(title: CharSequence, targetIntent: IntentAware, imageUrl: String? = null, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters): QuickReply
fun <T : Bus<T>> T.quickReply(title: CharSequence, targetIntent: IntentAware, imageUrl: String? = null, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>): QuickReply
fun <T : Bus<T>> T.quickReply(title: CharSequence, targetIntent: IntentAware, imageUrl: String? = null, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Collection<Pair<String, String>>): QuickReply
fun <T : Bus<T>> T.quickReply(title: CharSequence, targetIntent: IntentAware, imageUrl: String? = null, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String>): QuickReply
fun <T : Bus<T>> T.sendToMessenger(delay: Long = defaultDelay(currentAnswerIndex), messageProvider: T.() -> MessengerConnectorMessage): T
fun standaloneMessengerAnswer(playerId: PlayerId, applicationId: String, recipientId: PlayerId, lastAnswer: Boolean = true, priority: ActionPriority = ActionPriority.normal, notificationType: ActionNotificationType? = null, messageProvider: () -> MessengerConnectorMessage): SendSentence
fun standaloneMessengerAnswers(playerId: PlayerId, applicationId: String, recipientId: PlayerId, priority: ActionPriority = ActionPriority.normal, notificationType: ActionNotificationType? = null, messagesProvider: () -> List<MessengerConnectorMessage>): List<SendSentence>
fun I18nTranslator.standaloneQuickReply(title: CharSequence, targetIntent: IntentAware, parameters: Parameters = Parameters(), step: StoryStep<out StoryHandlerDefinition>? = null, imageUrl: String? = null, busStep: StoryStep<out StoryHandlerDefinition>? = null, currentIntent: Intent? = null, sourceAppId: String?): QuickReply
fun I18nTranslator.text(text: CharSequence, vararg quickReplies: QuickReply): TextMessage
fun I18nTranslator.text(text: CharSequence, quickReplies: List<QuickReply>): TextMessage
fun I18nTranslator.urlButton(title: CharSequence, url: String): UrlButton
fun <T : Bus<T>> T.video(videoUrl: String, vararg quickReplies: QuickReply): AttachmentMessage
fun <T : Bus<T>> T.video(videoUrl: String, quickReplies: List<QuickReply>): AttachmentMessage
fun <T : Bus<T>> T.withMessenger(messageProvider: () -> MessengerConnectorMessage): T
fun <T : Bus<T>> T.withMessenger(connectorId: String, messageProvider: () -> MessengerConnectorMessage): T
package ai.tock.bot.connector.messenger.model
package ai.tock.bot.connector.messenger.model.attachment
package ai.tock.bot.connector.messenger.model.handover
package ai.tock.bot.connector.messenger.model.send
Module Contents
data class ActionRequest
data class Attachment
class AttachmentMessage : Message
enum class AttachmentType
abstract class Button : UserAction
data class ButtonPayload : ModelPayload
enum class ButtonType
data class CallButton : Button
data class CustomEvent
data class CustomEventRequest
Module Contents
CustomEventRequest(customEvent: CustomEvent, pageId: String, pageScopedUserId: String, event: String = "CUSTOM_APP_EVENTS", advertiserTrackingEnabled: Short = 0, applicationTrackingEnabled: Short = 1, extinfo: String = mapper.writeValueAsString(listOf("mb1")))
CustomEventRequest(customEvents: List<CustomEvent>, pageId: String, pageScopedUserId: String, event: String = "CUSTOM_APP_EVENTS", advertiserTrackingEnabled: Short = 0, applicationTrackingEnabled: Short = 1, extinfo: String = mapper.writeValueAsString(listOf("mb1")))
val advertiserTrackingEnabled: Short
val applicationTrackingEnabled: Short
val customEvents: List<CustomEvent>
val event: String
val extinfo: String
val pageId: String
val pageScopedUserId: String
data class Element
class EmailQuickReply : QuickReply
data class GenericPayload : ModelPayload
enum class ListElementStyle
data class ListPayload : ModelPayload
class LocationQuickReply : QuickReply
data class LoginButton : Button
class LogoutButton : Button
data class MediaElement
data class MediaPayload : ModelPayload
enum class MediaType
abstract class Message : MessengerConnectorMessage
data class MessageRequest
enum class MessageTag
enum class MessagingType
abstract class ModelPayload : Payload
enum class NotificationType
abstract class Payload
enum class PayloadType
data class PostbackButton : Button
abstract class QuickReply : UserAction
enum class QuickReplyContentType
enum class ReferralIdentifierType
enum class SenderAction
data class SendResponse
data class SendResponseError
data class SendResponseErrorContainer
enum class SourceType
class TextMessage : Message
data class TextQuickReply : QuickReply
data class UrlButton : Button
data class UrlPayload : Payload
interface UserAction
package ai.tock.bot.connector.messenger.model.webhook
package ai.tock.bot.connector.rocketchat
package ai.tock.bot.connector.slack
Module Contents
fun I18nTranslator.attachmentField(title: String, value: String, short: Boolean = true): AttachmentField
fun emoji(emoji: SlackEmoji): String
fun emojiMessage(emoji: SlackEmoji): SlackMessageOut
fun <T : Bus<T>> T.endForSlack(delay: Long = defaultDelay(currentAnswerIndex), messageProvider: T.() -> SlackConnectorMessage): T
fun I18nTranslator.multiLineMessage(lines: List<CharSequence>, channel: String? = null): SlackMessageOut
fun <T : Bus<T>> T.sendToSlack(delay: Long = defaultDelay(currentAnswerIndex), messageProvider: T.() -> SlackConnectorMessage): T
fun I18nTranslator.slackAttachment(text: CharSequence? = null, vararg buttons: Button): SlackMessageAttachment
fun I18nTranslator.slackAttachment(vararg buttons: Button): SlackMessageAttachment
fun I18nTranslator.slackAttachment(text: CharSequence? = null, buttons: List<Button> = emptyList(), color: String = "good", pretext: String? = null, fallback: String = translate(text).toString(), vararg fields: AttachmentField): SlackMessageAttachment
fun <T : Bus<T>> T.slackButton(title: CharSequence, targetIntent: IntentAware? = null, parameters: Parameters = Parameters(), name: String = "default"): Button
fun <T : Bus<T>> T.slackButton(title: CharSequence, targetIntent: IntentAware?, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters = Parameters(), name: String = "default"): Button
fun <T : Bus<T>> T.slackButton(title: CharSequence, targetIntent: IntentAware?, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>, name: String = "default"): Button
object SlackClient
class SlackConnector : ConnectorBase
val slackConnectorType: ConnectorType
@ConnectorHandler("slack") @Target([AnnotationTarget.CLASS]) annotation class SlackHandler
fun I18nTranslator.slackMessage(message: CharSequence, vararg attachments: SlackMessageAttachment): SlackMessageOut
fun I18nTranslator.slackMessage(message: CharSequence, channel: String? = null, vararg attachments: SlackMessageAttachment): SlackMessageOut
fun I18nTranslator.textMessage(message: CharSequence): SlackMessageOut
fun <T : Bus<T>> T.withSlack(messageProvider: () -> SlackConnectorMessage): T
package ai.tock.bot.connector.slack.model
package ai.tock.bot.connector.slack.model.old
package ai.tock.bot.connector.teams
package ai.tock.bot.connector.teams.auth
package ai.tock.bot.connector.teams.messages
package ai.tock.bot.connector.teams.token
package ai.tock.bot.connector.twitter
Module Contents
fun <T : Bus<T>> T.directMessage(: CharSequence): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithAttachment(: CharSequence, : MediaCategory, : String, : ByteArray, vararg : Option): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithAttachment(: CharSequence, : MediaCategory, : String, : ByteArray, vararg : OptionWithoutDescription): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithButtons(: CharSequence, : List<CTA>): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithButtons(: CharSequence, vararg : CTA): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithGIF(: CharSequence, : String, : ByteArray, vararg : Option): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithGIF(: CharSequence, : String, : ByteArray, vararg : OptionWithoutDescription): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithGIF(: String, : ByteArray, vararg : Option): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithGIF(: String, : ByteArray, vararg : OptionWithoutDescription): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithImage(: CharSequence, : String, : ByteArray, vararg : Option): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithImage(: CharSequence, : String, : ByteArray, vararg : OptionWithoutDescription): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithImage(: String, : ByteArray, vararg : Option): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithImage(: String, : ByteArray, vararg : OptionWithoutDescription): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithOptions(: CharSequence, vararg : Option): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithOptions(: CharSequence, vararg : OptionWithoutDescription): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithVideo(: CharSequence, : String, : ByteArray, vararg : Option): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithVideo(: CharSequence, : String, : ByteArray, vararg : OptionWithoutDescription): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithVideo(: String, : ByteArray, vararg : Option): OutcomingEvent
fun <T : Bus<T>> T.directMessageWithVideo(: String, : ByteArray, vararg : OptionWithoutDescription): OutcomingEvent
fun BotBus.endIfPublicTwitter(): Unit
const val MAX_METADATA: Int
const val MAX_OPTION_DESCRIPTION: Int
const val MAX_OPTION_LABEL: Int
fun I18nTranslator.nlpOption(: CharSequence): OptionWithoutDescription
fun I18nTranslator.nlpOption(: CharSequence, : CharSequence): Option
fun <T : Bus<T>> T.option(label: CharSequence, description: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>): Option
fun <T : Bus<T>> T.option(label: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, vararg parameters: Pair<String, String>): OptionWithoutDescription
fun <T : Bus<T>> T.option(label: CharSequence, description: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String>): Option
fun <T : Bus<T>> T.option(label: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String>): OptionWithoutDescription
fun BotBus.tweet(: CharSequence): Tweet
fun BotBus.tweetWithInviteForDM(: CharSequence, : String? = null, : String? = null): Tweet
class TwitterConnectorCallback : ConnectorCallbackBase
val twitterConnectorType: ConnectorType
@ConnectorHandler("twitter") @Target([AnnotationTarget.CLASS]) annotation class TwitterHandler
fun <T : Bus<T>> T.webUrl(: CharSequence, : CharSequence): WebUrl
fun BotBus.withPublicTwitter(: () -> TwitterPublicConnectorMessage): BotBus
fun BotBus.withTwitter(: () -> TwitterConnectorMessage): BotBus
fun BotBus.withTwitter(: String, : () -> TwitterConnectorMessage): BotBus
package ai.tock.bot.connector.twitter.model
Module Contents
abstract class AbstractOption
data class Application
data class Attachment
data class AttachmentData
data class AttachmentMedia
enum class Command
data class Coordinates
abstract class CTA
data class DirectMessage
data class DirectMessageIndicateTyping
data class Entities
abstract class Entity
data class Hashtag : Entity
data class Image : Media
abstract class Media
enum class MediaCategory
data class MediaEntities
data class MediaUpload
data class Mention : Entity
data class MessageCreate
data class MessageData
data class Option : AbstractOption
data class Options : QuickReply
data class OptionsResponse : QuickReplyResponse
data class OptionWithoutDescription : AbstractOption
data class Poll
data class PollOption
abstract class QuickReply
abstract class QuickReplyResponse
data class Recipient
data class Symbol : Entity
data class Text
fun MediaFile.toMediaCategory(): MediaCategory?
data class Tweet
Module Contents
Tweet(: String, : Long, : String, : String, : Boolean, : User, : Long? = null, : Long? = null, : String? = null, : Boolean, : Coordinates? = null, : Entities, : Entities? = null, : Text? = null)
val contributors: String?
val coordinates: Coordinates?
val created: String
val entities: Entities
val extendedEntities: Entities?
val extendedTweet: Text?
val id: Long
val inReplyToStatusId: Long?
val inReplyToUserId: Long?
val isQuote: Boolean
val lang: String
fun playerId(: PlayerType): PlayerId
val text: String
val truncated: Boolean
val user: User
abstract class TwitterConnectorMessage : ConnectorMessage
abstract class TwitterPublicConnectorMessage : ConnectorMessage
data class Url : Entity
data class User
Module Contents
User(: String, : String?, : String?, : Long? = null, : String? = null, : String? = null, : String? = null, : String, : String, : Boolean, : Boolean, : Int, : Int, : Int, : String? = null, : String? = null)
val created: String?
val createdTimestamp: Long?
val description: String?
val followersCount: Int
val friendsCount: Int
val id: String
val lang: String?
val location: String?
val name: String
val profileImageUrlHttps: String?
val protected: Boolean
val screenName: String
val statusesCount: Int
val url: String?
val utcOffset: String?
val verified: Boolean
data class Video : Media
data class WebUrl : CTA
package ai.tock.bot.connector.twitter.model.incoming
package ai.tock.bot.connector.twitter.model.outcoming
package ai.tock.bot.connector.web
Module Contents
ai.tock.bot.connector.web.send.Button
ai.tock.bot.connector.web.send.WebCard
ai.tock.bot.connector.web.send.WebCarousel
ai.tock.bot.connector.web.send.WebWidget
data class OldWebMessage : WebConnectorMessage
fun <ERROR CLASS>.toGenericMessage(): GenericMessage
fun <ERROR CLASS>.toMediaFile(): MediaFile
fun MediaFile.toWebMediaFile(): <ERROR CLASS>
fun <T : Bus<T>> T.webButton(title: CharSequence, targetIntent: IntentAware? = null, imageUrl: String? = null, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters = Parameters()): WebButton
data class WebButton
fun <T : Bus<T>> T.webCard(card: WebCard): WebMessage
fun <T : Bus<T>> T.webCard(title: CharSequence?, subTitle: CharSequence?, buttons: List<Button> = emptyList()): WebCard
fun <T : Bus<T>> T.webCard(card: MediaCard): OldWebMessage
fun <T : Bus<T>> T.webCardWithAttachment(title: CharSequence?, subTitle: CharSequence?, attachmentUrl: CharSequence, buttons: List<Button>, type: AttachmentType = AttachmentType.file, attachementName: String = ""): WebCard
fun <T : Bus<T>> T.webCarousel(vararg cards: WebCard, buttons: List<Button> = emptyList()): WebMessage
fun <T : Bus<T>> T.webCarousel(cards: List<WebCard>, buttons: List<Button> = emptyList()): WebMessage
fun <T : Bus<T>> T.webCarousel(carousel: MediaCarousel): OldWebMessage
class WebConnector : ConnectorBase, OrchestrationConnector
interface WebConnectorMessage : SerializableConnectorMessage
data class WebConnectorRequest
val webConnectorType: ConnectorType
fun <T : Bus<T>> T.webDeepLink(ref: String): WebMessage
@ConnectorHandler("web") @Target([AnnotationTarget.CLASS]) annotation class WebHandler
fun <T : Bus<T>> T.webImage(imageUrl: String, title: CharSequence): WebMessage
fun <T : Bus<T>> T.webIntentQuickReply(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters = Parameters(), imageUrl: String? = null, style: <ERROR CLASS>): Button
fun <T : Bus<T>> T.webIntentQuickReply(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters = Parameters(), imageUrl: String? = null, style: String? = ButtonStyle.primary.name): Button
fun WebMediaFile(url: String, name: String, type: AttachmentType = attachmentType(url)): <ERROR CLASS>
fun I18nTranslator.webMessage(title: CharSequence, vararg buttons: WebButton): OldWebMessage
fun I18nTranslator.webMessage(title: CharSequence, buttons: List<WebButton>): OldWebMessage
fun I18nTranslator.webMessage(title: CharSequence, vararg buttons: Button): WebMessage
fun I18nTranslator.webMessage(title: CharSequence, buttons: List<Button> = emptyList()): WebMessage
data class WebMessage : WebConnectorMessage
fun <T : Bus<T>> T.webNlpQuickReply(title: CharSequence, nlpText: String? = null, imageUrl: String? = null, style: <ERROR CLASS>): Button
fun <T : Bus<T>> T.webNlpQuickReply(title: CharSequence, nlpText: String? = null, imageUrl: String? = null, style: String? = ButtonStyle.primary.name): Button
fun <T : Bus<T>> T.webPostbackButton(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters = Parameters(), imageUrl: String? = null, style: <ERROR CLASS>): Button
fun <T : Bus<T>> T.webPostbackButton(title: CharSequence, targetIntent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters = Parameters(), imageUrl: String? = null, style: String? = ButtonStyle.primary.name): Button
fun <T : Bus<T>> T.webQuickReply(title: CharSequence, targetIntent: IntentAware? = null, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters = Parameters(), imageUrl: String? = null): Button
data class WebRequestInfos
object WebRequestInfosByEvent
fun <T : Bus<T>> T.webTextButton(text: CharSequence): WebButton
fun <T : Bus<T>> T.webUrlButton(title: CharSequence, url: String, imageUrl: String? = null, target: <ERROR CLASS>, style: <ERROR CLASS>): Button
fun <T : Bus<T>> T.webUrlButton(title: CharSequence, url: String, imageUrl: String? = null, target: String? = HrefTargetType._blank.name, style: <ERROR CLASS>): Button
fun <T : Bus<T>> T.webUrlButton(title: CharSequence, url: String, imageUrl: String? = null, target: <ERROR CLASS>, style: String? = ButtonStyle.primary.name): Button
fun <T : Bus<T>> T.webUrlButton(title: CharSequence, url: String, imageUrl: String? = null, target: String? = HrefTargetType._blank.name, style: String? = ButtonStyle.primary.name): Button
fun <T : Bus<T>> T.webWidget(widget: WebWidget, buttons: List<Button> = emptyList()): WebMessage
fun <T : Bus<T>> T.withWeb(messageProvider: () -> WebConnectorMessage): T
package ai.tock.bot.connector.whatsapp
package ai.tock.bot.connector.whatsapp.model.common
package ai.tock.bot.connector.whatsapp.model.send
package ai.tock.bot.connector.whatsapp.model.webhook
package ai.tock.bot.definition
Module Contents
fun bot(botId: String, stories: List<StoryDefinition>, namespace: String = "app", nlpModelName: String = botId, unknownStory: StoryDefinition = defaultUnknownStory, hello: IntentAware? = null, goodbye: IntentAware? = null, noInput: IntentAware? = null, botDisabled: IntentAware? = null, botEnabled: IntentAware? = null, userLocation: IntentAware? = null, handleAttachment: IntentAware? = null, eventListener: EventListener = EventListenerBase(), keywordStory: StoryDefinition = defaultKeywordStory, conversation: DialogFlowDefinition? = null): SimpleBotDefinition
interface BotAnswerInterceptor
interface BotDefinition : I18nKeyProvider
Module Contents
open val botDisabledStories: List<StoryDefinition>
abstract val botDisabledStory: StoryDefinition?
open val botEnabledListener: (Action) -> Unit
open val botEnabledStories: List<StoryDefinition>
abstract val botEnabledStory: StoryDefinition?
abstract val botId: String
var defaultBreath: Long
open fun defaultDelay(answerIndex: Int): Long
open val defaultStory: StoryDefinition
abstract val defaultUnknownAnswer: I18nLabelValue
open fun disableBot(timeline: UserTimeline, dialog: Dialog, action: Action): Boolean
open fun enableBot(timeline: UserTimeline, dialog: Dialog, action: Action): Boolean
open fun entity(name: String, role: String? = null): Entity
open fun errorAction(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action
abstract val eventListener: EventListener
open fun findIntent(intent: String, applicationId: String): Intent
open fun findStoryByStoryHandler(storyHandler: StoryHandler, applicationId: String): StoryDefinition?
open fun findStoryDefinition(intent: IntentAware?, applicationId: String): StoryDefinition
open fun findStoryDefinition(intent: String?, applicationId: String): StoryDefinition
open fun findStoryDefinitionById(storyId: String, applicationId: String): StoryDefinition
open val flowDefinition: DialogFlowDefinition?
abstract val goodbyeStory: StoryDefinition?
abstract val handleAttachmentStory: StoryDefinition?
open fun hasDisableTagIntent(dialog: Dialog): Boolean
open fun hasToPersistAction(timeline: UserTimeline, action: Action): Boolean
abstract val helloStory: StoryDefinition?
open fun i18n(defaultLabel: CharSequence, args: List<Any?>): I18nLabelValue
open fun i18nTranslator(userLocale: Locale, connectorType: ConnectorType, userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, contextId: String? = null): I18nTranslator
abstract val keywordStory: StoryDefinition
abstract val namespace: String
abstract val nlpModelName: String
abstract val noInputStory: StoryDefinition?
abstract val stories: List<StoryDefinition>
open val testBehaviour: TestBehaviour
abstract val unknownStory: StoryDefinition
abstract val userLocationStory: StoryDefinition?
open class BotDefinitionBase : BotDefinition
Module Contents
BotDefinitionBase(botId: String, stories: Array<out StoryDefinition>)
BotDefinitionBase(botId: String, namespace: String, stories: List<StoryDefinition>, nlpModelName: String = botId, unknownStory: StoryDefinition = defaultUnknownStory, helloStory: StoryDefinition? = null, goodbyeStory: StoryDefinition? = null, noInputStory: StoryDefinition? = null, botDisabledStory: StoryDefinition? = null, botEnabledStory: StoryDefinition? = null, userLocationStory: StoryDefinition? = null, handleAttachmentStory: StoryDefinition? = null, eventListener: EventListener = EventListenerBase(), keywordStory: StoryDefinition = defaultKeywordStory, flowDefinition: DialogFlowDefinition? = null)
open val botDisabledStory: StoryDefinition?
open val botEnabledStory: StoryDefinition?
open val botId: String
val defaultKeywordStory: SimpleStoryDefinition
open val defaultUnknownAnswer: I18nLabelValue
val defaultUnknownStory: SimpleStoryDefinition
fun deleteKeywordHandler(bus: BotBus, sendEnd: Boolean = true): Unit
fun endTestContextKeywordHandler(bus: BotBus, sendEnd: Boolean = true): Unit
open val eventListener: EventListener
open val flowDefinition: DialogFlowDefinition?
fun getKeyword(bus: BotBus): String?
open val goodbyeStory: StoryDefinition?
open val handleAttachmentStory: StoryDefinition?
fun handleWithKeywordListeners(bus: BotBus, keyword: String?): Boolean
open val helloStory: StoryDefinition?
open val keywordStory: StoryDefinition
open val namespace: String
open val nlpModelName: String
open val noInputStory: StoryDefinition?
open val stories: List<StoryDefinition>
fun testContextKeywordHandler(bus: BotBus, sendEnd: Boolean = true): Unit
open fun toString(): String
open val unknownStory: StoryDefinition
open val userLocationStory: StoryDefinition?
interface BotProvider
open class BotProviderBase : BotProvider
data class BotProviderId
open class ConfigurableStoryHandler<out T : StoryHandlerDefinition> : StoryHandlerBase<T>
typealias ConnectorDef<T> = ConnectorStoryHandlerBase<T>
interface ConnectorHandlerProvider
interface ConnectorStoryHandler<out T : StoryHandlerDefinition> : BotBus
abstract class ConnectorStoryHandlerBase<out T : StoryHandlerDefinition> : BotBus, ConnectorStoryHandler<T>
fun <reified T : StoryHandlerDefinition> defaultHandlerStoryDefinitionCreator(): HandlerStoryDefinitionCreator<T>
data class DialogFlowDefinition
data class DialogFlowState
data class DialogFlowStateTransition
enum class DialogFlowStateTransitionType
object EmptyData
data class EntityStepSelection
interface EventListener
open class EventListenerBase : EventListener
typealias Handler<T> = StoryHandlerBase<T>
typealias HandlerDef<T> = StoryHandlerDefinitionBase<T>
interface HandlerStoryDefinitionCreator<T : StoryHandlerDefinition>
data class Intent : IntentAware
interface IntentAware
interface IntentAwareBase : IntentAware
typealias IntentDef = IntentAwareBase
data class IntentWithoutNamespace
val noStep: SimpleStoryStep
fun notify(applicationId: String, namespace: String, botId: String, recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Parameters = Parameters.EMPTY, stateModifier: NotifyBotStateModifier = NotifyBotStateModifier.KEEP_CURRENT_STATE, notificationType: ActionNotificationType? = null, errorListener: (Throwable) -> Unit = {}): Unit
interface ParameterKey
data class Parameters
class SimpleBotDefinition : BotDefinitionBase
Module Contents
SimpleBotDefinition(botId: String, namespace: String, stories: List<StoryDefinition>, nlpModelName: String = botId, unknownStory: StoryDefinition = defaultUnknownStory, helloStory: StoryDefinition? = null, goodbyeStory: StoryDefinition? = null, noInputStory: StoryDefinition? = null, botDisabledStory: StoryDefinition? = null, botEnabledStory: StoryDefinition? = null, userLocationStory: StoryDefinition? = null, handleAttachmentStory: StoryDefinition? = null, eventListener: EventListener = EventListenerBase(), keywordStory: StoryDefinition = defaultKeywordStory, conversation: DialogFlowDefinition? = null)
typealias SimpleHandler = SimpleStoryHandlerBase
open class SimpleStoryDefinition : StoryDefinition
Module Contents
SimpleStoryDefinition(id: String, storyHandler: StoryHandler, steps: Array<out StoryStep<StoryHandlerDefinition>> = emptyArray(), starterIntents: Set<IntentAware>, intents: Set<IntentAware> = starterIntents, unsupportedUserInterfaces: Set<UserInterfaceType> = emptySet())
SimpleStoryDefinition(id: String, storyHandler: StoryHandler, starterIntents: Set<Intent>, intents: Set<Intent> = starterIntents, steps: Set<StoryStep<StoryHandlerDefinition>> = emptySet(), unsupportedUserInterfaces: Set<UserInterfaceType> = emptySet(), tags: Set<StoryTag> = emptySet())
open val id: String
open val intents: Set<Intent>
open val starterIntents: Set<Intent>
open val steps: Set<StoryStep<StoryHandlerDefinition>>
open val storyHandler: StoryHandler
open val tags: Set<StoryTag>
open val unsupportedUserInterfaces: Set<UserInterfaceType>
abstract class SimpleStoryHandlerBase : StoryHandlerBase<StoryHandlerDefinition>
interface SimpleStoryStep : StoryStep<StoryHandlerDefinition>
fun story(handler: SimpleStoryHandlerBase, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase
fun story(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null, handler: BotBus.() -> Unit): StoryDefinitionBase
fun <reified T : StoryHandlerDefinition> story(handler: StoryHandlerBase<T>, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase
fun story(intent: IntentAware, storyHandler: StoryHandler, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase
interface StoryDataStep<T : StoryHandlerDefinition, TD, D> : StoryStep<T>
abstract class StoryDataStepBase<T : StoryHandlerDefinition, TD, D> : StoryDataStep<T, TD, D>
@JvmName("storyDataDefWithSteps") inline fun <reified T : StoryHandlerDefinition, D> storyDef(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null, handlerDefCreator: HandlerStoryDefinitionCreator<T> = defaultHandlerStoryDefinitionCreator(), noinline preconditionsChecker: BotBus.() -> D): StoryDefinitionBase
inline fun <reified T : StoryHandlerDefinition> storyDef(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), steps: List<StoryStep<out StoryHandlerDefinition>> = emptyList(), unsupportedUserInterface: UserInterfaceType? = null, handlerDefCreator: HandlerStoryDefinitionCreator<T> = defaultHandlerStoryDefinitionCreator(), noinline preconditionsChecker: BotBus.() -> Unit): StoryDefinitionBase
interface StoryDefinition : IntentAware
open class StoryDefinitionBase : StoryDefinition
interface StoryDefinitionExtended : StoryDefinition
@JvmName("storyDataDefWithSteps") inline fun <reified T : StoryHandlerDefinition, reified S, D> storyDefWithSteps(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), unsupportedUserInterface: UserInterfaceType? = null, handlerDefCreator: HandlerStoryDefinitionCreator<T> = defaultHandlerStoryDefinitionCreator(), noinline preconditionsChecker: BotBus.() -> D): StoryDefinitionBase where S : Enum<S>, S : StoryStep<out StoryHandlerDefinition>
inline fun <reified T : StoryHandlerDefinition, reified S> storyDefWithSteps(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), unsupportedUserInterface: UserInterfaceType? = null, handlerDefCreator: HandlerStoryDefinitionCreator<T> = defaultHandlerStoryDefinitionCreator(), noinline preconditionsChecker: BotBus.() -> Unit): StoryDefinitionBase where S : Enum<S>, S : StoryStep<out StoryHandlerDefinition>
interface StoryHandler
abstract class StoryHandlerBase<out T : StoryHandlerDefinition> : StoryHandler, I18nKeyProvider, IntentAware
interface StoryHandlerDefinition : BotBus
abstract class StoryHandlerDefinitionBase<T : ConnectorStoryHandlerBase<*>> : BotBus, StoryHandlerDefinition
interface StoryHandlerListener
interface StoryStep<T : StoryHandlerDefinition>
enum class StoryTag
fun <reified T> storyWithSteps(handler: StoryHandlerBase<*>, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase where T : Enum<T>, T : StoryStep<out StoryHandlerDefinition>
fun <reified T> storyWithSteps(intent: IntentAware, storyHandler: StoryHandler, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), unsupportedUserInterface: UserInterfaceType? = null): StoryDefinitionBase where T : Enum<T>, T : StoryStep<out StoryHandlerDefinition>
inline fun <reified T> storyWithSteps(intentName: String, otherStarterIntents: Set<IntentAware> = emptySet(), secondaryIntents: Set<IntentAware> = emptySet(), unsupportedUserInterface: UserInterfaceType? = null, noinline handler: BotBus.() -> Unit): StoryDefinitionBase where T : Enum<T>, T : StoryStep<out StoryHandlerDefinition>
interface TestBehaviour
open class TestBehaviourBase : TestBehaviour
package ai.tock.bot.engine
Module Contents
interface BotBus : Bus<BotBus>
Module Contents
abstract val action: Action
open fun booleanChoice(key: ParameterKey): Boolean
abstract val botDefinition: BotDefinition
open fun changeContextValue(name: String, value: Any?): Unit
open fun changeContextValue(key: ParameterKey, value: Any?): Unit
open fun changeEntityText(entity: Entity, textContent: String?): Unit
open fun changeEntityValue(role: String, newValue: EntityValue?): Unit
open fun changeEntityValue(entity: Entity, newValue: Value?): Unit
open fun changeEntityValue(entity: Entity, newValue: EntityValue): Unit
open fun choice(key: ParameterKey): String?
abstract val connectorData: ConnectorData
open val contextId: String?
open fun <T : Any> contextValue(name: String): T?
open fun <T : Any> contextValue(key: ParameterKey): T?
abstract val currentDialog: Dialog
open val currentIntent: IntentAware?
open fun defaultDelay(answerIndex: Int): Long
abstract val dialog: Dialog
open fun end(message: Message, delay: Long = defaultDelay(currentAnswerIndex)): BotBus
abstract fun end(action: Action, delay: Long = defaultDelay(currentAnswerIndex)): BotBus
open fun end(messages: MessagesList, initialDelay: Long = 0): BotBus
open fun end(delay: Long, messageProvider: BotBus.() -> Any?): BotBus
open fun end(i18nText: CharSequence, delay: Long, vararg i18nArgs: Any?): BotBus
open fun end(i18nText: CharSequence, vararg i18nArgs: Any?): BotBus
open fun end(delay: Long): BotBus
open fun endRawText(plainText: CharSequence?, delay: Long): BotBus
abstract val entities: Map<String, EntityStateValue>
open fun entityText(entity: Entity): String?
open fun entityText(role: String): String?
open fun <T : Value> entityValue(role: String, valueTransformer: (EntityValue) -> T? = @Suppress("UNCHECKED_CAST") { it.value as? T? }): T?
open fun <T : Value> entityValue(entity: Entity, valueTransformer: (EntityValue) -> T? = @Suppress("UNCHECKED_CAST") { it.value as? T? }): T?
open fun entityValueDetails(entity: Entity): EntityValue?
open fun entityValueDetails(role: String): EntityValue?
abstract fun <T> getBusContextValue(name: String): T?
open fun <T> getBusContextValue(key: ParameterKey): T?
open fun handleAndSwitchStory(storyDefinition: StoryDefinition, starterIntent: Intent = storyDefinition.mainIntent()): Unit
open fun hasActionEntity(role: String): Boolean
open fun hasActionEntity(entity: Entity): Boolean
open fun hasChoiceValue(param: ParameterKey, value: ParameterKey): Boolean
open fun i18n(defaultLabel: CharSequence, args: List<Any?>): I18nLabelValue
open fun i18nKey(key: String, defaultLabel: CharSequence, vararg args: Any?): I18nLabelValue
abstract var i18nProvider: I18nKeyProvider
open fun isChoiceAction(): Boolean
open fun isFeatureEnabled(feature: FeatureType, default: Boolean = false): Boolean
open fun isIntent(intentOwner: IntentAware): Boolean
abstract fun markAsUnknown(): Unit
abstract var nextUserActionState: NextUserActionState?
open fun nlpStats(): NlpCallStats?
abstract fun reloadProfile(): Unit
open fun removeAllEntityValues(): Unit
open fun removeEntityValue(role: String): Unit
open fun removeEntityValue(entity: Entity): Unit
open fun resetDialogState(): Unit
fun retrieveCurrentBus(): BotBus?
open fun send(message: Message, delay: Long = defaultDelay(currentAnswerIndex)): BotBus
open fun send(messages: MessagesList, initialDelay: Long = 0): BotBus
abstract fun send(action: Action, delay: Long = defaultDelay(currentAnswerIndex)): BotBus
open fun send(delay: Long, messageProvider: BotBus.() -> Any?): BotBus
open fun send(delay: Long): BotBus
open fun send(i18nText: CharSequence, delay: Long, vararg i18nArgs: Any?): BotBus
open fun send(i18nText: CharSequence, vararg i18nArgs: Any?): BotBus
abstract fun setBusContextValue(key: String, value: Any?): Unit
open fun setBusContextValue(key: ParameterKey, value: Any?): Unit
open fun skipAnswer(): Unit
open var step: StoryStep<out StoryHandlerDefinition>?
open val stepName: String?
abstract var story: Story
open fun switchStory(storyDefinition: StoryDefinition, starterIntent: Intent = storyDefinition.mainIntent()): Unit
open val test: Boolean
abstract val underlyingConnector: Connector
abstract val userPreferences: UserPreferences
open val userText: String?
abstract val userTimeline: UserTimeline
open fun withMessage(message: ConnectorMessage): BotBus
abstract fun withNotificationType(notificationType: ActionNotificationType): BotBus
abstract fun withPriority(priority: ActionPriority): BotBus
abstract fun withVisibility(visibility: ActionVisibility): BotBus
val botModule: Module
object BotRepository
Module Contents
@Synchronized fun checkBotConfigurations(startup: Boolean = false, botConfigurationChanged: Boolean = false): Unit
fun findConnectorProvider(connectorType: ConnectorType): ConnectorProvider?
fun forEachNlpListener(action: (NlpListener) -> Unit): Unit
fun getController(predicate: (BotApplicationConfiguration) -> Boolean): ConnectorController?
var healthcheckHandler: (RoutingContext) -> Unit
fun installBots(routerHandlers: List<(Router) -> Any?>, createApplicationIfNotExists: Boolean = true, startupLock: Lock? = null): Unit
fun notify(applicationId: String, recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap(), stateModifier: NotifyBotStateModifier = NotifyBotStateModifier.KEEP_CURRENT_STATE, notificationType: ActionNotificationType? = null, namespace: String? = null, botId: String? = null, errorListener: (Throwable) -> Unit = {}): Unit
fun registerBotAnswerInterceptor(botAnswerInterceptor: BotAnswerInterceptor): Unit
fun registerBotProvider(bot: BotProvider): Unit
fun registerBuiltInStoryDefinitions(botProvider: BotProvider): Unit
fun registerConnectorService(service: ConnectorService): Unit
fun registerNlpListener(listener: NlpListener): Unit
fun registerStoryHandlerListener(listener: StoryHandlerListener): Unit
var requestTimer: RequestTimer
interface Bus<T : Bus<T>> : I18nTranslator
Module Contents
abstract val applicationId: String
abstract val botId: PlayerId
abstract val currentAnswerIndex: Int
open val currentIntent: IntentAware?
abstract fun defaultDelay(answerIndex: Int): Long
open fun end(i18nText: CharSequence, delay: Long = defaultDelay(currentAnswerIndex), vararg i18nArgs: Any?): T
open fun end(i18nText: CharSequence, vararg i18nArgs: Any?): T
open fun end(delay: Long = defaultDelay(currentAnswerIndex)): T
open fun end(delay: Long = defaultDelay(currentAnswerIndex), messageProvider: T.() -> Any?): T
abstract fun endRawText(plainText: CharSequence?, delay: Long = defaultDelay(currentAnswerIndex)): T
abstract val intent: IntentAware?
open fun send(delay: Long = defaultDelay(currentAnswerIndex)): T
open fun send(i18nText: CharSequence, delay: Long = defaultDelay(currentAnswerIndex), vararg i18nArgs: Any?): T
open fun send(i18nText: CharSequence, vararg i18nArgs: Any?): T
open fun send(delay: Long = defaultDelay(currentAnswerIndex), messageProvider: T.() -> Any?): T
abstract fun sendRawText(plainText: CharSequence?, delay: Long = defaultDelay(currentAnswerIndex)): T
abstract val stepName: String?
abstract val test: Boolean
abstract val userId: PlayerId
open fun withMessage(message: ConnectorMessage): T
abstract fun withMessage(connectorType: ConnectorType, messageProvider: () -> ConnectorMessage): T
abstract fun withMessage(connectorType: ConnectorType, connectorId: String, messageProvider: () -> ConnectorMessage): T
interface ConnectorController
Module Contents
abstract val botDefinition: BotDefinition
abstract val connector: Connector
open val connectorType: ConnectorType
open fun errorMessage(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action
abstract fun handle(event: Event, data: ConnectorData = ConnectorData(ConnectorCallbackBase(event.applicationId, connector.connectorType))): Unit
open fun notify(recipientId: PlayerId, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap(), notificationType: ActionNotificationType?, errorListener: (Throwable) -> Unit = {}): Unit
abstract fun registerServices(serviceIdentifier: String, installer: (Router) -> Unit): Unit
open fun storyDefinitionLoader(applicationId: String): (String) -> StoryDefinition
abstract fun support(action: Action, data: ConnectorData = ConnectorData(ConnectorCallbackBase(action.applicationId, connector.connectorType))): Double
abstract fun unregisterServices(): Unit
interface I18nTranslator : I18nKeyProvider
object WebSocketController
package ai.tock.bot.engine.action
Module Contents
abstract class Action : Event
data class ActionMetadata
enum class ActionNotificationType
enum class ActionPriority
enum class ActionQuote
enum class ActionReply
enum class ActionVisibility
enum class Metadata
open class SendAttachment : Action
class SendChoice : Action
Module Contents
SendChoice(playerId: PlayerId, applicationId: String, recipientId: PlayerId, intentName: String, step: StoryStep<out StoryHandlerDefinition>?, parameters: Map<String, String> = emptyMap(), id: Id<Action> = newId(), date: Instant = Instant.now(), state: EventState = EventState(), metadata: ActionMetadata = ActionMetadata())
SendChoice(playerId: PlayerId, applicationId: String, recipientId: PlayerId, intentName: String, parameters: Map<String, String> = emptyMap(), id: Id<Action> = newId(), date: Instant = Instant.now(), state: EventState = EventState(), metadata: ActionMetadata = ActionMetadata())
fun decodeChoice(id: String, senderId: PlayerId, applicationId: String, recipientId: PlayerId, referralParameter: String? = null): Action
fun decodeChoiceId(id: String): Pair<String, Map<String, String>>
fun encodeChoiceId(bus: Bus<*>, intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap()): String
fun encodeChoiceId(bus: Bus<*>, intent: IntentAware, step: String? = null, parameters: Map<String, String> = emptyMap()): String
fun encodeChoiceId(intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>? = null, parameters: Map<String, String> = emptyMap(), busStep: StoryStep<out StoryHandlerDefinition>? = null, currentIntent: Intent? = null, sourceAppId: String? = null): String
fun encodeChoiceId(intent: IntentAware, step: String?, parameters: Map<String, String>, busStep: String?, currentIntent: Intent?, sourceAppId: String? = null): String
fun encodeNlpChoiceId(text: String): String
const val EXIT_INTENT: String
const val IMAGE_PARAMETER: String
val intentName: String
const val LOGIN_INTENT: String
const val LOGOUT_INTENT: String
const val NLP: String
val parameters: Map<String, String>
const val PHONE_CALL_INTENT: String
const val PREVIOUS_INTENT_PARAMETER: String
const val REFERRAL_PARAMETER: String
val referralParameter: String?
const val SOURCE_APP_ID: String
fun sourceAppId(): String?
fun step(): String?
const val STEP_PARAMETER: String
const val TITLE_PARAMETER: String
fun toEncodedId(): String
fun toMessage(): Message
fun toString(): String
const val URL_PARAMETER: String
class SendLocation : Action
open class SendSentence : Action
Module Contents
SendSentence(playerId: PlayerId, applicationId: String, recipientId: PlayerId, text: CharSequence?, messages: MutableList<ConnectorMessage> = mutableListOf(), id: Id<Action> = newId(), date: Instant = Instant.now(), state: EventState = EventState(), metadata: ActionMetadata = ActionMetadata(), nlpStats: NlpCallStats? = null, precomputedNlp: NlpResult? = null)
fun changeConnectorMessage(message: ConnectorMessage): SendSentence
fun hasEmptyText(): Boolean
fun hasMessage(type: ConnectorType): Boolean
fun message(type: ConnectorType): ConnectorMessage?
open val messages: MutableList<ConnectorMessage>
open var nlpStats: NlpCallStats?
val precomputedNlp: NlpResult?
val stringText: String?
val text: CharSequence?
open fun toMessage(): Message
open fun toString(): String
package ai.tock.bot.engine.config
package ai.tock.bot.engine.dialog
Module Contents
ai.tock.nlp.api.client.model.Entity
data class ArchivedEntityValue
data class Dialog
interface DialogFlowDAO
Module Contents
abstract fun loadApplicationData(namespace: String, botId: String, applicationIds: Set<Id<BotApplicationConfiguration>>, from: ZonedDateTime?, to: ZonedDateTime?, intent: String? = null): ApplicationDialogFlowData
abstract fun saveFlow(bot: BotDefinition, flow: DialogFlowDefinition): Unit
abstract fun search(namespace: String, botId: String, applicationIds: Set<Id<BotApplicationConfiguration>>, from: ZonedDateTime?, to: ZonedDateTime?, intent: String? = null): List<DialogFlowTransitionStatsData>
abstract fun searchByDateWithActionType(namespace: String, botId: String, applicationIds: Set<Id<BotApplicationConfiguration>>, from: ZonedDateTime?, to: ZonedDateTime?, intent: String? = null): Pair<List<DialogFlowTransitionStatsData>, List<String>>
abstract fun searchByDateWithIntent(namespace: String, botId: String, applicationIds: Set<Id<BotApplicationConfiguration>>, from: ZonedDateTime?, to: ZonedDateTime?, intent: String? = null): Pair<List<DialogFlowTransitionStatsData>, List<String>>
abstract fun searchByDateWithStory(namespace: String, botId: String, applicationIds: Set<Id<BotApplicationConfiguration>>, from: ZonedDateTime?, to: ZonedDateTime?, intent: String? = null): Pair<List<DialogFlowTransitionStatsData>, List<String>>
data class DialogState
Module Contents
DialogState(currentIntent: Intent? = null, entityValues: MutableMap<String, EntityStateValue> = mutableMapOf(), context: MutableMap<String, Any> = mutableMapOf(), userLocation: UserLocation? = null, nextActionState: NextUserActionState? = null)
fun changeValue(entity: Entity, newValue: Value?): Unit
fun changeValue(newValue: EntityValue): Unit
fun changeValue(role: String, newValue: EntityValue?): Unit
fun cleanupState(): Unit
val context: MutableMap<String, Any>
var currentIntent: Intent?
val entityValues: MutableMap<String, EntityStateValue>
fun hasEntity(role: String): Boolean
fun hasEntityPredefinedValue(role: String, value: String): Boolean
fun initFromDialogState(dialog: DialogState): DialogState
var nextActionState: NextUserActionState?
fun resetAllEntityValues(): Unit
fun resetState(): Unit
fun resetValue(role: String): Unit
fun setContextValue(name: String, value: Any?): Unit
fun setValue(role: String, value: EntityValue): Unit
fun setValue(entity: Entity, value: Value): Unit
var userLocation: UserLocation?
data class EntityStateValue
data class EntityValue
Module Contents
EntityValue(nlpResult: NlpResult, value: NlpEntityValue)
EntityValue(sentence: String, value: NlpEntityValue)
EntityValue(entity: Entity, value: Value?, content: String? = null)
EntityValue(start: Int?, end: Int?, entity: Entity, content: String?, value: Value? = null, evaluated: Boolean = false, subEntities: List<EntityValue> = emptyList(), probability: Double = 1.0, mergeSupport: Boolean = false)
val content: String?
val end: Int?
val entity: Entity
val evaluated: Boolean
val mergeSupport: Boolean
val probability: Double
val start: Int?
val subEntities: List<EntityValue>
fun toString(): String
val value: Value?
data class EventState
class FlowAnalyticsQuery
class FlowAnalyticsQueryResult
data class NextUserActionState
data class Snapshot
data class Story
package ai.tock.bot.engine.event
package ai.tock.bot.engine.feature
Module Contents
enum class DefaultFeatureType : FeatureType
interface FeatureDAO
Module Contents
open fun addFeature(botId: String, namespace: String, enabled: Boolean, type: FeatureType, startDate: ZonedDateTime?, endDate: ZonedDateTime?, applicationId: String? = null): Unit
abstract fun addFeature(botId: String, namespace: String, enabled: Boolean, category: String, name: String, startDate: ZonedDateTime?, endDate: ZonedDateTime?, applicationId: String? = null): Unit
open fun deleteFeature(botId: String, namespace: String, type: FeatureType, applicationId: String? = null): Unit
abstract fun deleteFeature(botId: String, namespace: String, category: String, name: String, applicationId: String? = null): Unit
abstract fun disable(botId: String, namespace: String, category: String, name: String, applicationId: String? = null): Unit
open fun disable(botId: String, namespace: String, type: FeatureType, applicationId: String? = null): Unit
abstract fun enable(botId: String, namespace: String, category: String, name: String, startDate: ZonedDateTime?, endDate: ZonedDateTime?, applicationId: String? = null): Unit
open fun enable(botId: String, namespace: String, type: FeatureType, startDate: ZonedDateTime? = null, endDate: ZonedDateTime? = null, applicationId: String? = null): Unit
abstract fun getFeatures(botId: String, namespace: String): List<FeatureState>
open fun isEnabled(botId: String, namespace: String, type: FeatureType, default: Boolean = false): Boolean
open fun isEnabled(botId: String, namespace: String, category: String, name: String, default: Boolean = false): Boolean
open fun isEnabled(botId: String, namespace: String, type: FeatureType, applicationId: String? = null, default: Boolean = false): Boolean
abstract fun isEnabled(botId: String, namespace: String, category: String, name: String, applicationId: String? = null, default: Boolean = false): Boolean
data class FeatureState
interface FeatureType
package ai.tock.bot.engine.message
Module Contents
data class ActionWrappedMessage : Message
data class Attachment : Message
data class Choice : Message
Module Contents
Choice(intentName: String, step: StoryStep<out StoryHandlerDefinition>, parameters: Map<String, String> = emptyMap(), delay: Long = 0)
Choice(intentName: String, parameters: Map<String, String> = emptyMap(), delay: Long = 0)
val delay: Long
val eventType: EventType
fun fromText(text: String, nlpText: String? = null, imageUrl: String? = null): Choice
val intentName: String
fun isSimpleMessage(): Boolean
val parameters: Map<String, String>
fun toAction(playerId: PlayerId, applicationId: String, recipientId: PlayerId): Action
fun toPrettyString(): String
data class GenericElement
data class GenericMessage
Module Contents
GenericMessage(connectorMessage: ConnectorMessage, attachments: List<Attachment> = emptyList(), choices: List<Choice> = emptyList(), texts: Map<String, String> = emptyMap(), locations: List<Location> = emptyList(), metadata: Map<String, String> = emptyMap(), subElements: List<GenericElement> = emptyList())
GenericMessage(connectorType: ConnectorType = ConnectorType.none, attachments: List<Attachment> = emptyList(), choices: List<Choice> = emptyList(), texts: Map<String, String> = emptyMap(), locations: List<Location> = emptyList(), metadata: Map<String, String> = emptyMap(), subElements: List<GenericElement> = emptyList(), connectorMessage: ConnectorMessage? = null)
val attachments: List<Attachment>
val choices: List<Choice>
val connectorType: ConnectorType
fun equals(other: Any?): Boolean
fun hashCode(): Int
val locations: List<Location>
val metadata: Map<String, String>
val subElements: List<GenericElement>
const val SUBTITLE_PARAM: String
const val TEXT_PARAM: String
val texts: Map<String, String>
const val TITLE_PARAM: String
data class Location : Message
interface Message
data class MessagesList
data class Sentence : Message
data class Suggestion
data class TextWithSuggestions
package ai.tock.bot.engine.message.parser
package ai.tock.bot.engine.monitoring
package ai.tock.bot.engine.nlp
Module Contents
object BuiltInKeywordListener : NlpListener
interface KeywordService
data class NlpCallStats
interface NlpController
data class NlpEntityMergeContext
data class NlpIntentStat
interface NlpListener
Module Contents
open fun error(query: NlpQuery, dialog: Dialog, throwable: Throwable?): Unit
open fun evaluateEntities(userTimeline: UserTimeline, dialog: Dialog, event: Event, nlpResult: NlpResult): List<EntityValue>
open fun findIntent(userTimeline: UserTimeline, dialog: Dialog, event: Event, nlpResult: NlpResult): IntentAware?
open fun handleKeyword(sentence: String): Intent?
open fun mergeEntityValues(dialogState: DialogState, action: Action, entityToMerge: NlpEntityMergeContext): NlpEntityMergeContext
open fun sortEntitiesToMerge(entities: List<NlpEntityMergeContext>): List<NlpEntityMergeContext>
open fun success(query: NlpQuery, result: NlpResult): Unit
package ai.tock.bot.engine.stt
package ai.tock.bot.engine.user
Module Contents
data class PlayerId
enum class PlayerType
data class TimeBoxedFlag
data class UserLocation
interface UserLock
data class UserPreferences
data class UserState
class UserTimeline
interface UserTimelineDAO
Module Contents
abstract fun getArchivedEntityValues(stateValueId: Id<EntityStateValue>, oldActionsMap: Map<Id<Action>, Action> = emptyMap()): List<ArchivedEntityValue>
abstract fun getClientDialogs(namespace: String, clientId: String, storyDefinitionProvider: (String) -> StoryDefinition): List<Dialog>
abstract fun getDialogsUpdatedFrom(namespace: String, from: Instant, storyDefinitionProvider: (String) -> StoryDefinition): List<Dialog>
abstract fun getLastStoryId(namespace: String, playerId: PlayerId): String?
abstract fun getSnapshots(dialogId: Id<Dialog>): List<Snapshot>
abstract fun loadByTemporaryIdsWithoutDialogs(namespace: String, temporaryIds: List<String>): List<UserTimeline>
abstract fun loadWithLastValidDialog(namespace: String, userId: PlayerId, priorUserId: PlayerId? = null, groupId: String? = null, storyDefinitionProvider: (String) -> StoryDefinition): UserTimeline
abstract fun loadWithoutDialogs(namespace: String, userId: PlayerId): UserTimeline
abstract fun remove(namespace: String, playerId: PlayerId): Unit
abstract fun removeClient(namespace: String, clientId: String): Unit
abstract fun save(userTimeline: UserTimeline, botDefinition: BotDefinition): Unit
abstract fun save(userTimeline: UserTimeline, namespace: String): Unit
abstract fun updatePlayerId(namespace: String, oldPlayerId: PlayerId, newPlayerId: PlayerId): Unit
package ai.tock.bot.test
Module Contents
fun BotBusMockLog.alexa(): AlexaMessage?
fun ConnectorMessage.asGenericMessage(assertionCreator: Assert<GenericMessage>.() -> Unit): Unit
open class BotBusMock : BotBus
Module Contents
BotBusMock(context: BotBusMockContext, action: Action = context.firstAction)
open val action: Action
fun addActionEntity(contextValue: EntityValue): BotBusMock
fun addActionEntity(entity: Entity, newValue: Value?): BotBusMock
fun addActionEntity(entity: Entity, textContent: String): BotBusMock
val answers: List<BotBusMockLog>
open val applicationId: String
fun applyBotAnswerInterceptor(a: Action): Action
fun assert(vararg messages: ConnectorMessageProvider): Unit
open var botDefinition: BotDefinition
open val botId: PlayerId
val busAnswers: List<BotBusMockLog>
fun checkEndCalled(): BotBusMock
open var connectorData: ConnectorData
var connectorType: ConnectorType
val context: BotBusMockContext
fun createBotSentence(plainText: CharSequence?): SendSentence
open val currentAnswerIndex: Int
open val currentDialog: Dialog
open var dialog: Dialog
open fun end(action: Action, delay: Long): BotBus
open val entities: Map<String, EntityStateValue>
val firstAnswer: BotBusMockLog
val firstBusAnswer: BotBusMockLog
open fun <T> getBusContextValue(name: String): T?
open var i18nProvider: I18nKeyProvider
open var intent: IntentAware?
val lastAnswer: BotBusMockLog
val lastBusAnswer: BotBusMockLog
open fun markAsUnknown(): Unit
open var nextUserActionState: NextUserActionState?
open fun reloadProfile(): Unit
fun run(): BotBusMock
val secondAnswer: BotBusMockLog
val secondBusAnswer: BotBusMockLog
open fun send(action: Action, delay: Long): BotBus
open fun sendAction(action: Action, delay: Long): Unit
open fun sendRawText(plainText: CharSequence?, delay: Long): BotBus
open fun setBusContextValue(key: String, value: Any?): Unit
open var story: Story
open var targetConnectorType: ConnectorType
val thirdAnswer: BotBusMockLog
val thirdBusAnswer: BotBusMockLog
open fun translate(key: I18nLabelValue?): TranslatedSequence
val translator: TranslatorEngine
open val underlyingConnector: Connector
open val userId: PlayerId
open var userInterfaceType: UserInterfaceType
open val userLocale: Locale
open val userPreferences: UserPreferences
open var userTimeline: UserTimeline
open fun withMessage(connectorType: ConnectorType, messageProvider: () -> ConnectorMessage): BotBus
open fun withMessage(connectorType: ConnectorType, connectorId: String, messageProvider: () -> ConnectorMessage): BotBus
open fun withNotificationType(notificationType: ActionNotificationType): BotBus
open fun withPriority(priority: ActionPriority): BotBus
open fun withVisibility(visibility: ActionVisibility): BotBus
data class BotBusMockContext
Module Contents
BotBusMockContext(applicationId: String, userId: PlayerId, botId: PlayerId, botDefinition: BotDefinition, storyDefinition: StoryDefinition, action: Action = SendSentence(userId, applicationId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(), connectorType: ConnectorType = defaultTestConnectorType, testContext: TestContext = currentTestContext)
BotBusMockContext(botDefinition: BotDefinition, storyDefinition: StoryDefinition, applicationId: String = botDefinition.botId, userId: PlayerId = PlayerId("user"), botId: PlayerId = PlayerId("bot", PlayerType.bot), action: Action = SendSentence(userId, applicationId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(), connectorType: ConnectorType = defaultTestConnectorType, testContext: TestContext = currentTestContext)
BotBusMockContext(userTimeline: UserTimeline, dialog: Dialog, story: Story, firstAction: Action, botDefinition: BotDefinition, i18nProvider: I18nKeyProvider, userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, connectorType: ConnectorType = defaultTestConnectorType, testContext: TestContext = currentTestContext, snapshots: MutableList<Snapshot> = mutableListOf())
val answers: List<BotBusMockLog>
val applicationId: String
var botDefinition: BotDefinition
val botId: PlayerId
fun choice(intentName: String, vararg parameters: Pair<String, String>): SendChoice
fun choice(intentName: String, step: StoryStep<out StoryHandlerDefinition>, vararg parameters: Pair<String, String>): SendChoice
fun choice(intent: IntentAware, step: StoryStep<out StoryHandlerDefinition>, parameters: Parameters): SendChoice
fun choice(intent: IntentAware, parameters: Parameters = Parameters()): SendChoice
fun choiceOfId(choiceId: String): SendChoice
var connectorType: ConnectorType
var dialog: Dialog
var firstAction: Action
val firstAnswer: BotBusMockLog
var i18nProvider: I18nKeyProvider
val initialUserPreferences: UserPreferences
val lastAnswer: BotBusMockLog
fun resetUserPreferences(userPreferences: UserPreferences): Unit
val secondAnswer: BotBusMockLog
fun sentence(text: String, vararg entityValues: EntityValue): SendSentence
fun sentence(text: String, entityValues: List<EntityValue> = emptyList()): SendSentence
fun sentence(text: String, intent: IntentAware? = null, vararg entityValues: EntityValue): SendSentence
fun sentence(text: String, intent: IntentAware? = null, entityValues: List<EntityValue> = emptyList()): SendSentence
fun sentence(message: ConnectorMessage, vararg entityValues: EntityValue): SendSentence
fun sentence(message: ConnectorMessage, entityValues: List<EntityValue> = emptyList()): SendSentence
fun sentence(message: ConnectorMessage, intent: IntentAware? = null, vararg entityValues: EntityValue): SendSentence
fun sentence(message: ConnectorMessage, intent: IntentAware? = null, entityValues: List<EntityValue> = emptyList()): SendSentence
val snapshots: MutableList<Snapshot>
var story: Story
val testContext: TestContext
val thirdAnswer: BotBusMockLog
val userId: PlayerId
var userInterfaceType: UserInterfaceType
val userPreferences: UserPreferences
var userTimeline: UserTimeline
data class BotBusMockLog
fun busMock(testContext: TestContext = currentTestContext): BotBusMock
ch.tutteli.atrium.creating.AssertionPlant
Module Contents
fun Assert<BotBusMockLog>.asGenericMessage(assertionCreator: Assert<GenericMessage>.() -> Unit): Unit
fun Assert<Attachment>.toBeImage(): AssertionPlant<AttachmentType>
fun Assert<BotBusMockLog>.toBeSimpleTextMessage(expectedText: String): Unit
fun Assert<GenericElement>.toHaveAttachment(assertionCreator: Assert<Attachment>.() -> Unit): AssertionPlant<List<Attachment>>
fun Assert<GenericMessage>.toHaveChoice(title: String, assertionCreator: Assert<Choice>.() -> Unit): AssertionPlant<List<Choice>>
fun Assert<GenericElement>.toHaveChoices(expectedChoice: String, vararg otherExpectedChoices: String): AssertionPlant<List<Choice>>
fun Assert<GenericMessage>.toHaveElement(index: Int, assertionCreator: Assert<GenericElement>.() -> Unit): AssertionPlant<List<GenericElement>>
fun Assert<GenericElement>.toHaveExactlyChoices(expectedChoice: String, vararg otherExpectedChoices: String): AssertionPlant<List<Choice>>
fun Assert<GenericMessage>.toHaveExactlyGlobalChoices(expectedChoice: String, vararg otherExpectedChoices: String): AssertionPlant<List<Choice>>
fun Assert<GenericMessage>.toHaveGlobalChoices(expectedChoice: String, vararg otherExpectedChoices: String): AssertionPlant<List<Choice>>
fun Assert<GenericMessage>.toHaveGlobalText(expectedText: String, textName: String = "text"): AssertionPlant<Map<String, String>>
fun Assert<Choice>.toHaveIntent(intentName: String): Unit
fun Assert<GenericElement>.toHaveNotChoices(unexpectedChoice: String, vararg otherUnexpectedChoices: String): AssertionPlant<List<Choice>>
fun Assert<GenericMessage>.toHaveNotGlobalChoices(unexpectedChoice: String, vararg otherUnexpectedChoices: String): AssertionPlant<List<Choice>>
fun Assert<Choice>.toHaveParameter(key: ParameterKey, value: String): Unit
fun Assert<Choice>.toHaveParameter(key: String, value: String): Unit
fun Assert<GenericElement>.toHaveSubtitle(expectedSubtitle: String): AssertionPlant<Map<String, String>>
fun Assert<GenericElement>.toHaveText(expectedText: String, textName: String): AssertionPlant<Map<String, String>>
fun Assert<GenericElement>.toHaveTitle(expectedTitle: String): AssertionPlant<Map<String, String>>
fun Assert<Choice>.toHaveTitle(title: String): Unit
fun Assert<Attachment>.toHaveUrl(url: String): AssertionPlant<String>
var currentTestContext: TestContext
var defaultTestConnectorType: ConnectorType
fun BotBusMockLog.ga(): GAResponseConnectorMessage?
fun BotBusMockLog.messenger(): MessengerConnectorMessage?
fun BotDefinition.newBusMock(testContext: TestContext = currentTestContext, story: StoryDefinition = testContext.defaultStoryDefinition(this), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
fun BotDefinition.newBusMockContext(testContext: TestContext = currentTestContext, story: StoryDefinition = testContext.defaultStoryDefinition(this), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), action: Action = SendSentence(userId, this.botId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(locale = locale)): BotBusMockContext
fun BotBusMockLog.slack(): SlackConnectorMessage?
fun startBusMock(testContext: TestContext = currentTestContext): BotBusMock
fun BotDefinition.startNewBusMock(testContext: TestContext = currentTestContext, story: StoryDefinition = testContext.defaultStoryDefinition(this), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
open class TestContext
open class TestLifecycle<out T : TestContext>
val testModules: MutableList<Module>
var testTranslatorModule: Module
fun BotBusMockLog.whatsapp(): WhatsAppBotMessage?
package ai.tock.bot.test.junit
Module Contents
open class TockJUnit4Rule<out T : TestContext>
Module Contents
TockJUnit4Rule(botDefinition: BotDefinition, lifecycle: TestLifecycle<T> = TestLifecycle(TestContext() as T))
open fun apply(base: <ERROR CLASS>, description: <ERROR CLASS>): <ERROR CLASS>
val botDefinition: BotDefinition
fun busMock(): BotBusMock
val lifecycle: TestLifecycle<T>
fun newBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
fun newBusMockContext(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMockContext
fun startBusMock(): BotBusMock
fun startNewBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
val testContext: T
open class TockJUnit5Extension : TockJUnit5ExtensionBase<TestContext>
open class TockJUnit5ExtensionBase<out T : TestContext>
Module Contents
TockJUnit5ExtensionBase(botDefinition: BotDefinition, lifecycle: TestLifecycle<T> = TestLifecycle(TestContext() as T))
open fun afterEach(context: <ERROR CLASS>): Unit
open fun beforeEach(context: <ERROR CLASS>): Unit
val botDefinition: BotDefinition
fun busMock(): BotBusMock
val lifecycle: TestLifecycle<T>
fun newBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
fun newBusMockContext(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), action: Action = SendSentence(userId, botDefinition.botId, botId, ""), userInterfaceType: UserInterfaceType = UserInterfaceType.textChat, userPreferences: UserPreferences = UserPreferences(locale = locale)): BotBusMockContext
fun newChoiceRequest(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), parameters: Parameters, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): Unit
fun newRequest(text: String = "", intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), vararg entities: EntityValue, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): Unit
fun newRequest(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), actionProvider: () -> Action, tests: BotBusMock.() -> Unit): Unit
fun selectChoice(busMockLog: BotBusMockLog, buttonTitle: String, tests: BotBusMock.() -> Unit): BotBusMock
fun selectElementChoice(busMockLog: BotBusMockLog, elementIndex: Int, buttonTitle: String, tests: BotBusMock.() -> Unit): BotBusMock
fun send(text: String = "", intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), vararg entities: EntityValue, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), metadata: ActionMetadata = ActionMetadata(), tests: BotBusMock.() -> Unit): BotBusMock
fun send(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), actionProvider: () -> Action, tests: BotBusMock.() -> Unit): BotBusMock
fun sendChoice(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), parameters: Parameters = Parameters(), connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): BotBusMock
fun sendMessage(intent: IntentAware = testContext.defaultStoryDefinition(botDefinition), message: Message, connectorType: ConnectorType = testContext.defaultConnectorType(), userInterfaceType: UserInterfaceType = connectorType.userInterfaceType, locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId(), botId: PlayerId = PlayerId("bot", PlayerType.bot), userPreferences: UserPreferences = UserPreferences(locale = locale), tests: BotBusMock.() -> Unit): BotBusMock
fun startBusMock(): BotBusMock
fun startNewBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock
val testContext: T
package ai.tock.bot.test.mock
package ai.tock.shared
Module Contents
fun basicAuthInterceptor(login: String, password: String): Interceptor
fun basicCredentialsHeader(: String, : String): String
fun booleanProperty(name: String, defaultValue: Boolean): Boolean
fun checkMaxLengthAllowed(text: String): String
com.github.salomonbrys.kodein.KodeinInjector
com.mongodb.client.FindIterable
com.mongodb.client.MongoCollection
com.mongodb.reactivestreams.client.MongoCollection
Module Contents
inline fun <reified T : Any> MongoCollection<T>.watch(fullDocument: FullDocument = FullDocument.DEFAULT, noinline listener: (ChangeStreamDocument<T>) -> Unit): Unit
fun concat(s1: String?, s2: String?): String
const val DEFAULT_APP_NAMESPACE: String
val defaultLocale: Locale
val defaultNamespace: String
val defaultZoneId: ZoneId
val devEnvironment: Boolean
object Dice
interface Executor
object FontLoader
fun getAsyncDatabase(databaseNameProperty: String): MongoDatabase
fun getDatabase(databaseNameProperty: String): MongoDatabase
enum class ImageFormat
class ImageGenerator<T : Any>
interface ImageParametersExtractor<T : Any>
val injector: KodeinInjector
var internalDefaultZoneId: ZoneId
fun intProperty(name: String, defaultValue: Int): Int
fun isDocumentDB(): Boolean
java.util.Enumeration
kotlin.collections.Iterable
kotlin.collections.Iterator
kotlin.String
enum class Level
fun listProperty(name: String, defaultValue: List<String>, separator: String = ","): List<String>
object Loader
fun loadProperties(fileInClasspath: String): Properties
fun longProperty(name: String, defaultValue: Long): Long
fun mapListProperty(name: String, defaultValue: Map<String, List<String>>, entrySeparator: String = "|", keyValueSeparator: String = "=", listSeparator: String = ","): Map<String, List<String>>
fun <K, V> mapNotNullValues(vararg pairs: Pair<K, V?>): Map<K, V>
fun mapProperty(name: String, defaultValue: Map<String, String>, entrySeparator: String = "|", keyValueSeparator: String = "="): Map<String, String>
mu.KLogger
fun pingMongoDatabase(databaseName: String): Boolean
fun property(name: String, defaultValue: String): String
fun propertyExists(name: String): Boolean
fun propertyOrNull(name: String): String?
fun resource(path: String): URL
fun resourceAsStream(path: String): InputStream
fun resourceAsString(path: String): String
retrofit2.Retrofit
retrofit2.Retrofit.Builder
fun retrofitBuilderWithTimeoutAndLogger(ms: Long, logger: KLogger = KotlinLogging.logger {}, level: Level = Level.BODY, interceptors: List<Interceptor> = emptyList(), requestGZipEncoding: Boolean = false, circuitBreaker: Boolean = false, proxy: Proxy? = null): Builder
val sharedModule: Module
val supportedLanguages: Map<String, Locale>
abstract class SvgGenerator<T : Any>
class SvgToPngConverter
@Target([AnnotationTarget.CLASS]) annotation class ThreadSafe
const val TOCK_BOT_DATABASE: String
const val TOCK_CACHE_DATABASE: String
const val TOCK_FRONT_DATABASE: String
const val TOCK_MODEL_DATABASE: String
const val TOCK_NAMESPACE: String
var tockAppDefaultNamespace: String
var tockInternalInjector: KodeinInjector
fun tokenAuthenticationInterceptor(token: String): Interceptor
fun tryToFindLocalIp(): String
package ai.tock.shared.cache
package ai.tock.shared.jackson
package ai.tock.shared.security
package ai.tock.shared.security.auth
package ai.tock.shared.security.mongo
package ai.tock.shared.vertx
Module Contents
class BadRequestException : RestException
var defaultVertxOptions: VertxOptions
fun detailedHealthcheck(tasks: List<Pair<String, () -> Boolean>> = listOf(), selfCheck: () -> Boolean = { true }): (RoutingContext) -> Unit
data class DetailedHealthcheckResults
class ImageGeneratorHandler<T : Any> : Handler<RoutingContext>
io.vertx.core.Vertx
io.vertx.ext.web.Route
class NotFoundException : RestException
interface RequestLogger
open class RestException : Exception
data class TaskResult
class UnauthorizedException : RestException
val vertx: Vertx
abstract class WebVerticle : AbstractVerticle
Module Contents
WebVerticle()
fun addAuth(authProvider: TockAuthProvider = defaultAuthProvider(), pathsToProtect: Set<String> = protectedPaths().map { "$it/*" }.toSet()): Unit
protected open fun addDevCorsHandler(): Unit
open val authenticatePath: String
protected open fun authProvider(): TockAuthProvider?
fun badRequest(message: String): Nothing
open val basePath: String
fun blocking(method: HttpMethod, path: String, role: TockUserRole? = defaultRole(), basePath: String = rootPath, handler: (RoutingContext) -> Unit): Unit
fun blockingDelete(path: String, role: TockUserRole? = defaultRole(), logger: RequestLogger = defaultRequestLogger, handler: (RoutingContext) -> Unit): Unit
protected fun blockingGet(path: String, role: TockUserRole? = defaultRole(), basePath: String = rootPath, handler: (RoutingContext) -> String): Unit
protected fun blockingJsonDelete(path: String, role: TockUserRole? = defaultRole(), logger: RequestLogger = defaultRequestLogger, handler: (RoutingContext) -> Boolean): Unit
fun <O> blockingJsonGet(path: String, role: TockUserRole? = defaultRole(), handler: (RoutingContext) -> O): Unit
inline fun <reified I : Any, O> blockingJsonPost(path: String, role: TockUserRole? = defaultRole(), logger: RequestLogger = defaultRequestLogger, crossinline handler: (RoutingContext, I) -> O): Unit
protected inline fun <reified I : Any, O> blockingJsonPut(path: String, role: TockUserRole? = defaultRole(), logger: RequestLogger = defaultRequestLogger, crossinline handler: (RoutingContext, I) -> O): Unit
protected fun blockingPost(path: String, role: TockUserRole? = defaultRole(), logger: RequestLogger = defaultRequestLogger, handler: (RoutingContext) -> Unit): Unit
protected inline fun <O> blockingUploadBinaryPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, Pair<String, ByteArray>) -> O): Unit
protected inline fun <reified F : Any, O> blockingUploadJsonPost(path: String, role: TockUserRole? = defaultRole(), logger: RequestLogger = defaultRequestLogger, crossinline handler: (RoutingContext, F) -> O): Unit
protected inline fun <O> blockingUploadPost(path: String, role: TockUserRole? = defaultRole(), logger: RequestLogger = defaultRequestLogger, crossinline handler: (RoutingContext, String) -> O): Unit
inline fun <reified I : Any, O> blockingWithBodyJson(method: HttpMethod, path: String, role: TockUserRole?, logger: RequestLogger = defaultRequestLogger, crossinline handler: (RoutingContext, I) -> O): Unit
protected fun bodyHandler(): BodyHandler
abstract fun configure(): Unit
fun corsHandler(origin: String = "*", allowCredentials: Boolean = false, allowedMethods: Set<HttpMethod> = EnumSet.of(GET, POST, PUT, DELETE), allowedHeaders: Set<String> = listOfNotNull(
"X-Requested-With",
"Access-Control-Allow-Origin",
if (allowCredentials) "Authorization" else null,
"Content-Type"
).toSet()): CorsHandler
protected open fun defaultAuthProvider(): TockAuthProvider
protected open val defaultCorsOrigin: String
protected open val defaultCorsWithCredentials: Boolean
open fun defaultErrorHandler(statusCode: Int): Handler<RoutingContext>
open fun defaultHealthcheck(): (RoutingContext) -> Unit
protected open val defaultPort: Int
val defaultRequestLogger: RequestLogger
open fun defaultRole(): TockUserRole?
open fun detailedHealthcheck(): (RoutingContext) -> Unit
fun RoutingContext.endJson(success: Boolean): Unit
fun RoutingContext.endJson(result: Any?): Unit
fun HttpServerResponse.endJson(result: Any?): Unit
protected fun RoutingContext.executeBlocking(handler: (RoutingContext) -> Unit): Unit
fun RoutingContext.firstQueryParam(name: String): String?
open fun healthcheck(): (RoutingContext) -> Unit
open val healthcheckPath: String?
fun RoutingContext.isAuthorized(role: TockUserRole, resultHandler: (AsyncResult<Boolean>) -> Unit): Any
protected inline fun <reified I : Any, O> jsonPost(path: String, role: TockUserRole? = defaultRole(), crossinline handler: (RoutingContext, I, Handler<O>) -> Unit): Unit
open fun livenesscheck(): (RoutingContext) -> Unit
open val livenesscheckPath: String?
open val logger: KLogger
open val logoutPath: String
fun notFound(): Nothing
val RoutingContext.organization: String
fun RoutingContext.path(name: String): String
fun <T> RoutingContext.pathId(name: String): Id<T>
fun RoutingContext.pathToLocale(name: String): Locale
protected open fun protectedPaths(): Set<String>
fun <T> RoutingContext.queryId(name: String): Id<T>?
fun readBytes(upload: FileUpload): ByteArray
open fun readinesscheck(): (RoutingContext) -> Unit
open val readinesscheckPath: String?
fun <reified T : Any> RoutingContext.readJson(): T
fun <reified T : Any> readJson(upload: FileUpload): T
fun readString(upload: FileUpload): String
protected fun register(method: HttpMethod, path: String, role: TockUserRole? = defaultRole(), basePath: String = rootPath, handler: (RoutingContext) -> Unit): Unit
protected open val rootPath: String
val router: Router
protected val server: HttpServer
open fun start(promise: Promise<Void>): Unit
protected open fun startServer(promise: Promise<Void>): Unit
protected open fun startServer(promise: Promise<Void>, port: Int): Unit
open fun stop(stopFuture: Future<Void>?): Unit
fun RoutingContext.success(): Unit
fun unauthorized(): Nothing
val RoutingContext.user: TockUser?
val RoutingContext.userLogin: String
protected fun verticleBooleanProperty(propertyName: String, defaultValue: Boolean): Boolean
protected fun verticleIntProperty(propertyName: String, defaultValue: Int): Int
protected fun verticleLongProperty(propertyName: String, defaultValue: Long): Long
protected fun verticleProperty(propertyName: String, defaultValue: String): String
protected inline fun <reified I : Any, O> withBodyJson(method: HttpMethod, path: String, role: TockUserRole?, crossinline handler: (RoutingContext, I, Handler<O>) -> Unit): Unit