SkillConversationIdFactory class
SkillConversationIdFactory,可儲存和擷取 ConversationReference 實例。
- Extends
建構函式
Skill |
建立 SkillConversationIdFactory 類別的新實例。 |
方法
create |
根據呼叫者的 ConversationReference,建立技能交談的交談標識符。 |
delete |
從記憶體中刪除 SkillConversationReference。 |
get |
取得使用 skillConversationId 的 createSkillConversationId() 建立的 ConversationReference。 |
繼承的方法
create |
根據呼叫端的 ConversationReference 建立技能交談的交談標識碼。 |
get |
取得使用 skillConversationId 的 createSkillConversationId() 建立的 ConversationReference。 |
建構函式詳細資料
SkillConversationIdFactory(Storage)
建立 SkillConversationIdFactory 類別的新實例。
new SkillConversationIdFactory(storage: Storage)
參數
- storage
- Storage
ConversationReference 實例的記憶體。
方法詳細資料
createSkillConversationIdWithOptions(SkillConversationIdFactoryOptions)
根據呼叫者的 ConversationReference,建立技能交談的交談標識符。
function createSkillConversationIdWithOptions(options: SkillConversationIdFactoryOptions): Promise<string>
參數
傳回
Promise<string>
用來與技能通訊的唯一交談標識符。
deleteConversationReference(string)
從記憶體中刪除 SkillConversationReference。
function deleteConversationReference(skillConversationId: string): Promise<void>
參數
- skillConversationId
-
string
要作為刪除金鑰的技能交談標識碼。
傳回
Promise<void>
代表異步操作的承諾。
getSkillConversationReference(string)
取得使用 skillConversationId 的 createSkillConversationId() 建立的 ConversationReference。
function getSkillConversationReference(skillConversationId: string): Promise<SkillConversationReference>
參數
- skillConversationId
-
string
使用 createSkillConversationId() 建立的技能 conversationId。
傳回
Promise<SkillConversationReference>
skillConversationId 的呼叫端 ConversationReference。 如果找不到,則為 Null。
繼承的方法的詳細資料
createSkillConversationId(ConversationReference)
警告
此 API 現已淘汰。
Method is deprecated, please use createSkillConversationIdWithOptions() with SkillConversationIdFactoryOptions instead.
根據呼叫端的 ConversationReference 建立技能交談的交談標識碼。
function createSkillConversationId(_conversationReference: ConversationReference): Promise<string>
參數
- _conversationReference
-
ConversationReference
技能的呼叫端 ConversationReference。
傳回
Promise<string>
備註
應該可以在要求 URL 上使用傳回的字串,而且不應該包含特殊字元。 傳回用來與技能通訊的唯一交談標識碼。
getConversationReference(string)
警告
此 API 現已淘汰。
Method is deprecated, please use getSkillConversationReference() instead.
取得使用 skillConversationId 的 createSkillConversationId() 建立的 ConversationReference。
function getConversationReference(_skillConversationId: string): Promise<ConversationReference>
參數
- _skillConversationId
-
string
使用 createSkillConversationId() 建立的技能 conversationId。
傳回
Promise<ConversationReference>
備註
會傳回 skillConversationId 的呼叫端 ConversationReference。 如果找不到,則為 null。