• Create message template handler

    Parameters

    • notificationService: NotificationDataService

      injected service use to handle the notification related operations

      • createMessageTemplate
      • getMessageTemplateByIdAndNormalize
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query].

    Returns Promise<adapter.AdapterHandlerResponse>

    201 Status Created

    • data: message template

    Description

    This handler will create message template by applying the following steps in sequence:

    1. Create message template (chatService.createMessageTemplate)

    2. Get message template by id and normalize (chatService.getMessageTemplateByIdAndNormalize)

    3. Return the message template

    Throws

    500 NBError Internal Server Error

    • create message template failed

Generated using TypeDoc