bootdesk/chat-sdk

ChatFacade extends Facade
in package

Table of Contents

Methods

addReceivingMiddleware()  : self
addSendingMiddleware()  : self
addWebhookMiddleware()  : self
channel()  : Channel
getAndDeleteModalContext()  : array<string|int, mixed>|null
getUser()  : UserInfo|null
handleWebhook()  : ResponseInterface
initialize()  : void
onAction()  : self
onAppHomeOpened()  : self
onAssistantContextChanged()  : self
onAssistantThreadStarted()  : self
onDirectMessage()  : self
onMemberJoinedChannel()  : self
onMessageDelivered()  : self
onMessageRead()  : self
onModalClose()  : self
onModalSubmit()  : self
onNewMention()  : self
onNewMessage()  : self
onOptionsLoad()  : self
onReaction()  : self
onSlashCommand()  : self
onSubscribedMessage()  : self
openDM()  : string|null
processAction()  : void
processAppHomeOpened()  : void
processAssistantContextChanged()  : void
processAssistantThreadStarted()  : void
processMemberJoinedChannel()  : void
processMessage()  : void
processMessageDelivered()  : void
processMessageRead()  : void
processModalClose()  : void
processModalSubmit()  : void
processOptionsLoad()  : array<string|int, mixed>|null
processReaction()  : void
processSlashCommand()  : void
registerAdapter()  : self
resolveAdapter()  : Adapter|null
shutdown()  : void
storeModalContext()  : void
thread()  : Thread
getFacadeAccessor()  : string

Methods

getAndDeleteModalContext()

public static getAndDeleteModalContext(string $adapterName, string $contextId) : array<string|int, mixed>|null
Parameters
$adapterName : string
$contextId : string
Return values
array<string|int, mixed>|null

getUser()

public static getUser(string $adapterName, string $userId) : UserInfo|null
Parameters
$adapterName : string
$userId : string
Return values
UserInfo|null

handleWebhook()

public static handleWebhook(string $adapterName, ServerRequestInterface $request[, array<string|int, mixed> $options = = '[]' ]) : ResponseInterface
Parameters
$adapterName : string
$request : ServerRequestInterface
$options : array<string|int, mixed> = = '[]'
Return values
ResponseInterface

onAction()

public static onAction(string|array<string|int, mixed>|callable $actionId[, callable|null $handler = = 'null' ]) : self
Parameters
$actionId : string|array<string|int, mixed>|callable
$handler : callable|null = = 'null'
Return values
self

onAppHomeOpened()

public static onAppHomeOpened(callable $handler) : self
Parameters
$handler : callable
Return values
self

onAssistantContextChanged()

public static onAssistantContextChanged(callable $handler) : self
Parameters
$handler : callable
Return values
self

onAssistantThreadStarted()

public static onAssistantThreadStarted(callable $handler) : self
Parameters
$handler : callable
Return values
self

onDirectMessage()

public static onDirectMessage(callable $handler) : self
Parameters
$handler : callable
Return values
self

onMemberJoinedChannel()

public static onMemberJoinedChannel(callable $handler) : self
Parameters
$handler : callable
Return values
self

onMessageDelivered()

public static onMessageDelivered(callable $handler) : self
Parameters
$handler : callable
Return values
self

onMessageRead()

public static onMessageRead(callable $handler) : self
Parameters
$handler : callable
Return values
self

onModalClose()

public static onModalClose(string|array<string|int, mixed>|callable $callbackId[, callable|null $handler = = 'null' ]) : self
Parameters
$callbackId : string|array<string|int, mixed>|callable
$handler : callable|null = = 'null'
Return values
self

onModalSubmit()

public static onModalSubmit(string|array<string|int, mixed>|callable $callbackId[, callable|null $handler = = 'null' ]) : self
Parameters
$callbackId : string|array<string|int, mixed>|callable
$handler : callable|null = = 'null'
Return values
self

onNewMention()

public static onNewMention(callable $handler) : self
Parameters
$handler : callable
Return values
self

onNewMessage()

public static onNewMessage(string $pattern, callable $handler) : self
Parameters
$pattern : string
$handler : callable
Return values
self

onOptionsLoad()

public static onOptionsLoad(string|array<string|int, mixed>|callable $actionId[, callable|null $handler = = 'null' ]) : self
Parameters
$actionId : string|array<string|int, mixed>|callable
$handler : callable|null = = 'null'
Return values
self

onReaction()

public static onReaction(string|array<string|int, mixed>|callable $emoji[, callable|null $handler = = 'null' ]) : self
Parameters
$emoji : string|array<string|int, mixed>|callable
$handler : callable|null = = 'null'
Return values
self

onSlashCommand()

public static onSlashCommand(string|array<string|int, mixed>|callable $command[, callable|null $handler = = 'null' ]) : self
Parameters
$command : string|array<string|int, mixed>|callable
$handler : callable|null = = 'null'
Return values
self

onSubscribedMessage()

public static onSubscribedMessage(callable $handler) : self
Parameters
$handler : callable
Return values
self

openDM()

public static openDM(string $adapterName, string $userId) : string|null
Parameters
$adapterName : string
$userId : string
Return values
string|null

processAction()

public static processAction(Adapter $adapter, string $threadId, string $actionId, string|null $value, string $messageId, Author $user[, string|null $triggerId = = 'null' ][, mixed $raw = = 'null' ]) : void
Parameters
$adapter : Adapter
$threadId : string
$actionId : string
$value : string|null
$messageId : string
$user : Author
$triggerId : string|null = = 'null'
$raw : mixed = = 'null'

processAppHomeOpened()

public static processAppHomeOpened(Adapter $adapter, string $channelId, string $userId[, mixed $raw = = 'null' ]) : void
Parameters
$adapter : Adapter
$channelId : string
$userId : string
$raw : mixed = = 'null'

processAssistantContextChanged()

public static processAssistantContextChanged(Adapter $adapter, string $channelId, string $threadId, string $userId, mixed $context[, string|null $threadTs = = 'null' ][, mixed $raw = = 'null' ]) : void
Parameters
$adapter : Adapter
$channelId : string
$threadId : string
$userId : string
$context : mixed
$threadTs : string|null = = 'null'
$raw : mixed = = 'null'

processAssistantThreadStarted()

public static processAssistantThreadStarted(Adapter $adapter, string $channelId, string $threadId, string $userId, mixed $context[, string|null $threadTs = = 'null' ][, mixed $raw = = 'null' ]) : void
Parameters
$adapter : Adapter
$channelId : string
$threadId : string
$userId : string
$context : mixed
$threadTs : string|null = = 'null'
$raw : mixed = = 'null'

processMemberJoinedChannel()

public static processMemberJoinedChannel(Adapter $adapter, string $channelId, string $userId[, string|null $inviterId = = 'null' ][, mixed $raw = = 'null' ]) : void
Parameters
$adapter : Adapter
$channelId : string
$userId : string
$inviterId : string|null = = 'null'
$raw : mixed = = 'null'

processMessageDelivered()

public static processMessageDelivered(string $threadId, array<string|int, mixed> $messageIds, string $userId[, mixed $raw = = 'null' ]) : void
Parameters
$threadId : string
$messageIds : array<string|int, mixed>
$userId : string
$raw : mixed = = 'null'

processMessageRead()

public static processMessageRead(string $threadId, string $userId[, mixed $raw = = 'null' ][, int|null $timestamp = = 'null' ]) : void
Parameters
$threadId : string
$userId : string
$raw : mixed = = 'null'
$timestamp : int|null = = 'null'

processModalClose()

public static processModalClose(Adapter $adapter, string $callbackId, Author $user[, mixed $raw = = 'null' ][, string|null $viewId = = 'null' ][, string|null $contextId = = 'null' ]) : void
Parameters
$adapter : Adapter
$callbackId : string
$user : Author
$raw : mixed = = 'null'
$viewId : string|null = = 'null'
$contextId : string|null = = 'null'

processModalSubmit()

public static processModalSubmit(Adapter $adapter, string $callbackId, array<string|int, mixed> $values, Author $user[, mixed $raw = = 'null' ][, string|null $viewId = = 'null' ][, string|null $contextId = = 'null' ]) : void
Parameters
$adapter : Adapter
$callbackId : string
$values : array<string|int, mixed>
$user : Author
$raw : mixed = = 'null'
$viewId : string|null = = 'null'
$contextId : string|null = = 'null'

processOptionsLoad()

public static processOptionsLoad(Adapter $adapter, string $actionId, string $query, Author $user[, mixed $raw = = 'null' ]) : array<string|int, mixed>|null
Parameters
$adapter : Adapter
$actionId : string
$query : string
$user : Author
$raw : mixed = = 'null'
Return values
array<string|int, mixed>|null

processReaction()

public static processReaction(Adapter $adapter, string $threadId, string $emoji, string $messageId, Author $user[, bool $added = = 'true' ][, string $rawEmoji = = '\'\'' ][, mixed $raw = = 'null' ]) : void
Parameters
$adapter : Adapter
$threadId : string
$emoji : string
$messageId : string
$user : Author
$added : bool = = 'true'
$rawEmoji : string = = '\'\''
$raw : mixed = = 'null'

processSlashCommand()

public static processSlashCommand(Adapter $adapter, string $channelId, string $command, string $text[, Author|null $user = = 'null' ][, mixed $raw = = 'null' ][, string|null $triggerId = = 'null' ]) : void
Parameters
$adapter : Adapter
$channelId : string
$command : string
$text : string
$user : Author|null = = 'null'
$raw : mixed = = 'null'
$triggerId : string|null = = 'null'

registerAdapter()

public static registerAdapter(string $name, Adapter $adapter) : self
Parameters
$name : string
$adapter : Adapter
Return values
self

resolveAdapter()

public static resolveAdapter(string $name[, ServerRequestInterface|null $request = = 'null' ]) : Adapter|null
Parameters
$name : string
$request : ServerRequestInterface|null = = 'null'
Return values
Adapter|null

storeModalContext()

public static storeModalContext(string $adapterName, string $contextId, array<string|int, mixed> $data[, int $ttlMs = = '86400000' ]) : void
Parameters
$adapterName : string
$contextId : string
$data : array<string|int, mixed>
$ttlMs : int = = '86400000'

getFacadeAccessor()

protected static getFacadeAccessor() : string
Return values
string
On this page

Search results