bootdesk/chat-sdk

PostableMessage
in package

Table of Contents

Properties

$attachments  : array<string|int, Attachment>
$content  : string|Card|Template
$files  : array<string|int, FileUpload>
$metadata  : array<string|int, mixed>|null
$replyToMessageId  : string|null

Methods

__construct()  : mixed
card()  : self
getTextContent()  : string
isCard()  : bool
isTemplate()  : bool
markdown()  : self
template()  : self
text()  : self
toArray()  : array{id: string, role: string, text: string, attachments: array, card?: array|null}
Serialize for the web adapter JSON response format.

Properties

$metadata read-only

public array<string|int, mixed>|null $metadata = null

$replyToMessageId read-only

public string|null $replyToMessageId = null

Methods

__construct()

public __construct(string|Card|Template $content[, string|null $replyToMessageId = null ][, array<string|int, mixed> $attachments = [] ][, array<string|int, mixed> $files = [] ][, array<string|int, mixed>|null $metadata = null ]) : mixed
Parameters
$content : string|Card|Template
$replyToMessageId : string|null = null
$attachments : array<string|int, mixed> = []
$files : array<string|int, mixed> = []
$metadata : array<string|int, mixed>|null = null

getTextContent()

public getTextContent() : string
Return values
string

markdown()

public static markdown(string $markdown) : self
Parameters
$markdown : string
Return values
self

text()

public static text(string $text) : self
Parameters
$text : string
Return values
self

toArray()

Serialize for the web adapter JSON response format.

public toArray(string $messageId, string $conversationId) : array{id: string, role: string, text: string, attachments: array, card?: array|null}
Parameters
$messageId : string
$conversationId : string
Return values
array{id: string, role: string, text: string, attachments: array, card?: array|null}
On this page

Search results