StatefulChatClient interface
{@Link @azure/communication-chat#ChatClient} を一元的に生成された状態で使用できるようにするメソッドを定義します。
インターフェイスは、プロキシ状態へのアクセスを提供し、状態変更イベントのハンドラーを登録することもできます。
- Extends
メソッド
get |
ChatClient {@Link から ChatClientState {@Link @azure/communication-chat#ChatClient} ChatClientState} からプロキシできるすべての状態を保持します。 |
off |
'stateChanged' イベントの登録解除を許可します。 |
on |
ハンドラーを 'stateChanged' イベントに登録できるようにします。 |
継承されたメソッド
メソッドの詳細
getState()
ChatClient {@Link から ChatClientState {@Link @azure/communication-chat#ChatClient} ChatClientState} からプロキシできるすべての状態を保持します。
function getState(): ChatClientState
戻り値
offStateChange((state: ChatClientState) => void)
'stateChanged' イベントの登録解除を許可します。
function offStateChange(handler: (state: ChatClientState) => void)
パラメーター
- handler
-
(state: ChatClientState) => void
サブスクライブ解除される元のコールバック。
onStateChange((state: ChatClientState) => void)
ハンドラーを 'stateChanged' イベントに登録できるようにします。
function onStateChange(handler: (state: ChatClientState) => void)
パラメーター
- handler
-
(state: ChatClientState) => void
状態を受け取るコールバック。
継承済みメソッドの詳細
createChatThread(CreateChatThreadRequest, CreateChatThreadOptions)
チャット スレッドを作成します。 作成されたスレッドの ID を持つスレッド クライアントを返します。
function createChatThread(request: CreateChatThreadRequest, options?: CreateChatThreadOptions): Promise<CreateChatThreadResult>
パラメーター
- request
- CreateChatThreadRequest
チャット スレッドを作成するための要求。
- options
- CreateChatThreadOptions
操作オプション。
戻り値
Promise<CreateChatThreadResult>
継承元 ChatClient.createChatThread
deleteChatThread(string, OperationOptions)
チャット スレッドを削除します。
function deleteChatThread(threadId: string, options?: OperationOptions): Promise<void>
パラメーター
- threadId
-
string
削除するスレッドの ID。
- options
- OperationOptions
操作オプション。
戻り値
Promise<void>
継承元 ChatClient.deleteChatThread
getChatThreadClient(string)
特定のスレッド ID を持つ ChatThreadClient を返します。
function getChatThreadClient(threadId: string): ChatThreadClient
パラメーター
- threadId
-
string
ChatThreadClient のスレッド ID
戻り値
継承元 ChatClient.getChatThreadClient
listChatThreads(RestListChatThreadsOptions)
ユーザーのチャット スレッドの一覧を取得します。
function listChatThreads(options?: RestListChatThreadsOptions): PagedAsyncIterableIterator<ChatThreadItem, ChatThreadItem[], PageSettings>
パラメーター
- options
- RestListChatThreadsOptions
チャット スレッドのオプションを一覧表示します。
戻り値
継承元 ChatClient.listChatThreads
off("chatMessageDeleted", (e: ChatMessageDeletedEvent) => void)
chatMessageDeleted の登録を解除します。
function off(event: "chatMessageDeleted", listener: (e: ChatMessageDeletedEvent) => void)
パラメーター
- event
-
"chatMessageDeleted"
ChatMessageDeletedEvent。
- listener
-
(e: ChatMessageDeletedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
off("chatMessageEdited", (e: ChatMessageEditedEvent) => void)
chatMessageEdited の登録を解除します。
function off(event: "chatMessageEdited", listener: (e: ChatMessageEditedEvent) => void)
パラメーター
- event
-
"chatMessageEdited"
ChatMessageEditedEvent。
- listener
-
(e: ChatMessageEditedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
off("chatMessageReceived", (e: ChatMessageReceivedEvent) => void)
chatMessageReceived の登録を解除します。
function off(event: "chatMessageReceived", listener: (e: ChatMessageReceivedEvent) => void)
パラメーター
- event
-
"chatMessageReceived"
ChatMessageReceivedEvent。
- listener
-
(e: ChatMessageReceivedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
off("chatThreadCreated", (e: ChatThreadCreatedEvent) => void)
chatThreadCreated の登録を解除します。
function off(event: "chatThreadCreated", listener: (e: ChatThreadCreatedEvent) => void)
パラメーター
- event
-
"chatThreadCreated"
ChatThreadCreatedEvent。
- listener
-
(e: ChatThreadCreatedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
off("chatThreadDeleted", (e: ChatThreadDeletedEvent) => void)
chatThreadDeleted の登録を解除します。
function off(event: "chatThreadDeleted", listener: (e: ChatThreadDeletedEvent) => void)
パラメーター
- event
-
"chatThreadDeleted"
ChatThreadDeletedEvent。
- listener
-
(e: ChatThreadDeletedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
off("chatThreadPropertiesUpdated", (e: ChatThreadPropertiesUpdatedEvent) => void)
chatThreadPropertiesUpdated のサブスクライブを解除します。
function off(event: "chatThreadPropertiesUpdated", listener: (e: ChatThreadPropertiesUpdatedEvent) => void)
パラメーター
- event
-
"chatThreadPropertiesUpdated"
ChatThreadPropertiesUpdatedEvent。
- listener
-
(e: ChatThreadPropertiesUpdatedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
off("participantsAdded", (e: ParticipantsAddedEvent) => void)
参加者の登録を解除する追加。
function off(event: "participantsAdded", listener: (e: ParticipantsAddedEvent) => void)
パラメーター
- event
-
"participantsAdded"
ParticipantsAddedEvent。
- listener
-
(e: ParticipantsAddedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
off("participantsRemoved", (e: ParticipantsRemovedEvent) => void)
参加者の登録を解除するRemoved。
function off(event: "participantsRemoved", listener: (e: ParticipantsRemovedEvent) => void)
パラメーター
- event
-
"participantsRemoved"
ParticipantsRemovedEvent。
- listener
-
(e: ParticipantsRemovedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
off("readReceiptReceived", (e: ReadReceiptReceivedEvent) => void)
readReceiptReceived からサブスクライブを解除します。
function off(event: "readReceiptReceived", listener: (e: ReadReceiptReceivedEvent) => void)
パラメーター
- event
-
"readReceiptReceived"
ReadReceiptReceivedEvent。
- listener
-
(e: ReadReceiptReceivedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
off("typingIndicatorReceived", (e: TypingIndicatorReceivedEvent) => void)
typingIndicatorReceived の登録を解除します。
function off(event: "typingIndicatorReceived", listener: (e: TypingIndicatorReceivedEvent) => void)
パラメーター
- event
-
"typingIndicatorReceived"
TypingIndicatorReceivedEvent。
- listener
-
(e: TypingIndicatorReceivedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.off
on("chatMessageDeleted", (e: ChatMessageDeletedEvent) => void)
chatMessageDeleted の Subscribe 関数。 最初の送信者もこのイベントを受け取ります。
function on(event: "chatMessageDeleted", listener: (e: ChatMessageDeletedEvent) => void)
パラメーター
- event
-
"chatMessageDeleted"
ChatMessageDeletedEvent。
- listener
-
(e: ChatMessageDeletedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("chatMessageEdited", (e: ChatMessageEditedEvent) => void)
chatMessageEdited の Subscribe 関数。 最初の送信者もこのイベントを受け取ります。
function on(event: "chatMessageEdited", listener: (e: ChatMessageEditedEvent) => void)
パラメーター
- event
-
"chatMessageEdited"
ChatMessageEditedEvent。
- listener
-
(e: ChatMessageEditedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("chatMessageReceived", (e: ChatMessageReceivedEvent) => void)
chatMessageReceived の Subscribe 関数。 最初の送信者もこのイベントを受け取ります。 イベントをサブスクライブする前に、startRealtimeNotifications を呼び出す必要があります。
function on(event: "chatMessageReceived", listener: (e: ChatMessageReceivedEvent) => void)
パラメーター
- event
-
"chatMessageReceived"
ChatMessageReceivedEvent。
- listener
-
(e: ChatMessageReceivedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("chatThreadCreated", (e: ChatThreadCreatedEvent) => void)
chatThreadCreated の Subscribe 関数。
function on(event: "chatThreadCreated", listener: (e: ChatThreadCreatedEvent) => void)
パラメーター
- event
-
"chatThreadCreated"
ChatThreadCreatedEvent。
- listener
-
(e: ChatThreadCreatedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("chatThreadDeleted", (e: ChatThreadDeletedEvent) => void)
chatThreadDeleted の Subscribe 関数。
function on(event: "chatThreadDeleted", listener: (e: ChatThreadDeletedEvent) => void)
パラメーター
- event
-
"chatThreadDeleted"
ChatThreadDeletedEvent。
- listener
-
(e: ChatThreadDeletedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("chatThreadPropertiesUpdated", (e: ChatThreadPropertiesUpdatedEvent) => void)
chatThreadPropertiesUpdated の Subscribe 関数。
function on(event: "chatThreadPropertiesUpdated", listener: (e: ChatThreadPropertiesUpdatedEvent) => void)
パラメーター
- event
-
"chatThreadPropertiesUpdated"
ChatThreadPropertiesUpdatedEvent。
- listener
-
(e: ChatThreadPropertiesUpdatedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("participantsAdded", (e: ParticipantsAddedEvent) => void)
participantsAdded のサブスクライブ関数。
function on(event: "participantsAdded", listener: (e: ParticipantsAddedEvent) => void)
パラメーター
- event
-
"participantsAdded"
ParticipantsAddedEvent。
- listener
-
(e: ParticipantsAddedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("participantsRemoved", (e: ParticipantsRemovedEvent) => void)
participantsRemoved のサブスクライブ関数。
function on(event: "participantsRemoved", listener: (e: ParticipantsRemovedEvent) => void)
パラメーター
- event
-
"participantsRemoved"
ParticipantsRemovedEvent。
- listener
-
(e: ParticipantsRemovedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("readReceiptReceived", (e: ReadReceiptReceivedEvent) => void)
readReceiptReceived の Subscribe 関数。
function on(event: "readReceiptReceived", listener: (e: ReadReceiptReceivedEvent) => void)
パラメーター
- event
-
"readReceiptReceived"
ReadReceiptReceivedEvent。
- listener
-
(e: ReadReceiptReceivedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("realTimeNotificationConnected", () => void)
realTimeNotificationConnected の Subscribe 関数。
function on(event: "realTimeNotificationConnected", listener: () => void)
パラメーター
- event
-
"realTimeNotificationConnected"
realTimeNotificationConnected イベント
- listener
-
() => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("realTimeNotificationDisconnected", () => void)
realTimeNotificationDisconnected の Subscribe 関数。
function on(event: "realTimeNotificationDisconnected", listener: () => void)
パラメーター
- event
-
"realTimeNotificationDisconnected"
realTimeNotificationDisconnected イベント
- listener
-
() => void
イベントを処理するリスナー。
継承元 ChatClient.on
on("typingIndicatorReceived", (e: TypingIndicatorReceivedEvent) => void)
TypeIndicatorReceived の Subscribe 関数。 最初の送信者もこのイベントを受け取ります。
function on(event: "typingIndicatorReceived", listener: (e: TypingIndicatorReceivedEvent) => void)
パラメーター
- event
-
"typingIndicatorReceived"
TypingIndicatorReceivedEvent。
- listener
-
(e: TypingIndicatorReceivedEvent) => void
イベントを処理するリスナー。
継承元 ChatClient.on
startRealtimeNotifications()
リアルタイム通知の受信を開始します。 イベントをサブスクライブする前に、この関数を呼び出します。
function startRealtimeNotifications(): Promise<void>
戻り値
Promise<void>
継承元 ChatClient.startRealtimeNotifications
stopRealtimeNotifications()
リアルタイム通知の受信を停止します。 この関数は、すべてのイベントのサブスクライブを解除します。
function stopRealtimeNotifications(): Promise<void>
戻り値
Promise<void>
継承元 ChatClient.stopRealtimeNotifications