Options
All
  • Public
  • Public/Protected
  • All
Menu

@conversationlearner/models

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AppDefinitionChange

Variables

Const BOT_CHECKSUM_HEADER_NAME

BOT_CHECKSUM_HEADER_NAME: "x-conversationlearner-bot-checksum" = "x-conversationlearner-bot-checksum"

Const CL_USER_NAME_ID

CL_USER_NAME_ID: "CLTrainer" = "CLTrainer"

Const MAX_ENUM_VALUES

MAX_ENUM_VALUES: 5 = 5

Const MEMORY_KEY_HEADER_NAME

MEMORY_KEY_HEADER_NAME: "x-conversationlearner-memory-key" = "x-conversationlearner-memory-key"

Const cardActionArguments

cardActionArguments: IActionArgument[] = [{parameter: 'p1',value: textPayloadWithNoEntities},{parameter: 'p2',value: {json: {}}}]

Const expectedApiPayloadValue

expectedApiPayloadValue: "myCallback" = "myCallback"

Const expectedCardActionArguments

expectedCardActionArguments: ActionArgument[] = cardActionArguments.map(aa => new ActionArgument(aa))

Const expectedCardPayloadValue

expectedCardPayloadValue: "customTemplateName" = "customTemplateName"

Const expectedSimpleTextPayload

expectedSimpleTextPayload: "simple text payload" = "simple text payload"

Functions

Const createEmptyAction

Const createFilledEntity

Const filledEntityValueAsString

Const getEntityDisplayValueMap

  • getEntityDisplayValueMap(filledEntityMap: FilledEntityMap): Map<string, string>

getEntityIds

  • getEntityIds(node: any): string[]

isPrebuilt

makeFilledEntity

makeFilledEntityMap

makeMemoryValue

Const makeNegative

Const memoryValuesAsString

  • memoryValuesAsString(memories: MemoryValue[]): string

removeOptionalNodesWithoutEntityValues

  • removeOptionalNodesWithoutEntityValues(node: any, entityIds: string[]): any | undefined
  • Given node return filter out optional nodes without matching values provided

    E.g. You are welcome[, $name] -> You are welcome

    Parameters

    • node: any

      Slate Node

    • entityIds: string[]

    Returns any | undefined

serialize

  • serialize(value: any, entityValuesMap: Map<string, string>, userOptions?: Partial<IOptions>): string
  • Parameters

    • value: any
    • entityValuesMap: Map<string, string>
    • Default value userOptions: Partial<IOptions> = {}

    Returns string

serializeNode

  • serializeNode(node: any, entityValues: Map<string, string>, options: IOptions): string

Object literals

Const apiAction

apiAction: object

actionType

actionType: API_LOCAL = ActionTypes.API_LOCAL

payload

payload: string = JSON.stringify({payload: expectedApiPayloadValue,logicArguments: [{parameter: 'p1',value: textPayloadWithNoEntities},{parameter: 'p2',value: {json: {}}}],renderArguments: [{parameter: 'p1',value: textPayloadWithNoEntities},{parameter: 'p2',value: {json: {}}}]} as ActionPayload)

Const cardAction

cardAction: object

actionType

actionType: CARD = ActionTypes.CARD

payload

payload: string = JSON.stringify({payload: expectedCardPayloadValue,arguments: cardActionArguments} as CardPayload)

Const defaultOptions

defaultOptions: object

fallbackToOriginal

fallbackToOriginal: false = false

preserveOptionalNodeWrappingCharacters

preserveOptionalNodeWrappingCharacters: false = false

Const textAction1

textAction1: object

actionType

actionType: TEXT = ActionTypes.TEXT

payload

payload: string = JSON.stringify(textPayloadWithNoEntities)

Const textAction2

textAction2: object

actionType

actionType: TEXT = ActionTypes.TEXT

payload

payload: string = JSON.stringify(textPayloadWithRequiredEntity)

Const textPayloadWithNoEntities

textPayloadWithNoEntities: object

json

json: object

kind

kind: string = "value"

document

document: object

data

data: object

Type declaration

kind

kind: string = "document"

nodes

nodes: object[] = [{kind: 'block',type: 'line',isVoid: false,data: {},nodes: [{kind: 'text',leaves: [{kind: 'leaf',text: expectedSimpleTextPayload,marks: []}]}]}]

Const textPayloadWithRequiredEntity

textPayloadWithRequiredEntity: object

json

json: object

kind

kind: string = "value"

document

document: object

data

data: object

Type declaration

kind

kind: string = "document"

nodes

nodes: object[] = [{kind: 'block',type: 'line',isVoid: false,data: {},nodes: [{kind: 'text',leaves: [{kind: 'leaf',text: 'The value of custom is: ',marks: []}]},{kind: 'inline',type: 'mention-inline-node',isVoid: false,data: {completed: true,option: {id: '627a43be-4675-4b98-84a7-537262561be6',name: 'custom'}},nodes: [{kind: 'text',leaves: [{kind: 'leaf',text: '$custom',marks: []}]}]},{kind: 'text',leaves: [{kind: 'leaf',text: '',marks: []}]}]}]

Generated using TypeDoc