MemoryTranscriptStore class

記憶體文字記錄存放區會將文字記錄儲存在 Map 中的揮發性記憶體中。

備註

由於這會使用未系結的揮發性字典,因此應該只用於單元測試或非生產環境。

方法

deleteTranscript(string, string)

刪除特定交談及其所有活動。

getTranscriptActivities(string, string, string, Date)

從記憶體文字記錄存放區取得活動。

listTranscripts(string, string)

列出 channelId 中的交談。

logActivity(Activity)

將活動記錄至文字記錄。

方法詳細資料

deleteTranscript(string, string)

刪除特定交談及其所有活動。

function deleteTranscript(channelId: string, conversationId: string): Promise<void>

參數

channelId

string

發生交談的通道標識碼。

conversationId

string

要刪除之交談的標識碼。

傳回

Promise<void>

代表異步作業的承諾。

getTranscriptActivities(string, string, string, Date)

從記憶體文字記錄存放區取得活動。

function getTranscriptActivities(channelId: string, conversationId: string, continuationToken?: string, startDate?: Date): Promise<PagedResult<Activity>>

參數

channelId

string

通道標識碼。

conversationId

string

交談標識碼。

continuationToken

string

逐頁查看結果的接續令牌。

startDate

Date

最早包含的時間。

傳回

Promise<PagedResult<Activity>>

比對活動的頁面。

listTranscripts(string, string)

列出 channelId 中的交談。

function listTranscripts(channelId: string, continuationToken?: string): Promise<PagedResult<TranscriptInfo>>

參數

channelId

string

通道標識碼。

continuationToken

string

逐頁查看結果的接續令牌。

傳回

來自存放區之通道的交談頁面。

logActivity(Activity)

將活動記錄至文字記錄。

function logActivity(activity: Activity): void | Promise<void>

參數

activity

Activity

要記錄的活動。

傳回

void | Promise<void>

代表異步作業的承諾。