Options
All
  • Public
  • Public/Protected
  • All
Menu

All services related to knowledge base management.

Hierarchy

  • KBService

Implements

  • IGBKBService

Index

Constructors

constructor

  • new KBService(sequelize: Sequelize): KBService

Properties

sequelize

sequelize: Sequelize

Methods

addAnswer

ask

deployKb

  • deployKb(core: IGBCoreService, deployer: GBDeployer, localPath: string, min: GBMinInstance): Promise<void>

getAnswerById

  • getAnswerById(instanceId: number, answerId: number): Promise<GuaribasAnswer>

getAnswerByText

  • getAnswerByText(instanceId: number, text: string): Promise<any>

getAnswerTextByMediaName

  • getAnswerTextByMediaName(instanceId: number, answerMediaName: string): Promise<string>

getFaqBySubjectArray

  • getFaqBySubjectArray(instanceId: number, from: string, subjects: any): Promise<GuaribasQuestion[]>

getQuestionById

  • getQuestionById(instanceId: number, questionId: number): Promise<GuaribasQuestion>

getQuestionIdFromURL

  • getQuestionIdFromURL(core: IGBCoreService, url: string): Promise<GuaribasQuestion[]>

getQuestionsSEO

  • getQuestionsSEO(instanceId: number): Promise<any[]>

getSubjectItems

  • getSubjectItems(instanceId: number, parentId: number): Promise<GuaribasSubject[]>

importKbPackage

  • importKbPackage(localPath: string, packageStorage: GuaribasPackage, instance: IGBInstance): Promise<any>

importKbTabularDirectory

  • importKbTabularDirectory(localPath: string, instance: IGBInstance, packageId: number): Promise<any>

importKbTabularFile

  • importKbTabularFile(filePath: string, instanceId: number, packageId: number): Promise<GuaribasQuestion[]>

importRemainingArticles

  • importRemainingArticles(localPath: string, instance: IGBInstance, packageId: number): Promise<any>
  • Import all .md files in artcles folder that has not been referenced by tabular files.

    Parameters

    • localPath: string
    • instance: IGBInstance
    • packageId: number

    Returns Promise<any>

importSubjectFile

  • importSubjectFile(packageId: number, filename: string, instance: IGBInstance): Promise<any>

Private playAudio

  • playAudio(min: GBMinInstance, answer: GuaribasAnswer, channel: string, step: GBDialogStep, conversationalService: IGBConversationalService): Promise<void>

Private playMarkdown

  • playMarkdown(min: GBMinInstance, answer: GuaribasAnswer, channel: string, step: GBDialogStep, conversationalService: IGBConversationalService): Promise<void>

Private playVideo

  • playVideo(min: any, conversationalService: IGBConversationalService, step: GBDialogStep, answer: GuaribasAnswer, channel: string): Promise<void>

sendAnswer

  • sendAnswer(min: GBMinInstance, channel: string, step: GBDialogStep, answer: GuaribasAnswer): Promise<void>

Private sendMarkdownToWeb

  • sendMarkdownToWeb(min: any, step: GBDialogStep, conversationalService: IGBConversationalService, html: string, answer: GuaribasAnswer): Promise<void>

undeployKbFromStorage

  • undeployKbFromStorage(instance: IGBInstance, deployer: GBDeployer, packageId: number): Promise<void>

Private undeployPackageFromStorage

  • undeployPackageFromStorage(instance: any, packageId: number): Promise<void>

Static getFormattedSubjectItems

Static getSubjectItemsSeparatedBySpaces

Generated using TypeDoc