SkillConversationIdFactory class
A SkillConversationIdFactory that stores and retrieves ConversationReference instances.
- Extends
Constructors
Skill |
Creates a new instance of the SkillConversationIdFactory class. |
Methods
create |
Creates a conversation ID for a skill conversation based on the caller's ConversationReference. |
delete |
Deletes the SkillConversationReference from the storage. |
get |
Gets the ConversationReference created using createSkillConversationId() for a skillConversationId. |
Inherited Methods
create |
Creates a conversation ID for a skill conversation based on the caller's ConversationReference. |
get |
Gets the ConversationReference created using createSkillConversationId() for a skillConversationId. |
Constructor Details
SkillConversationIdFactory(Storage)
Creates a new instance of the SkillConversationIdFactory class.
new SkillConversationIdFactory(storage: Storage)
Parameters
- storage
- Storage
The storage for the ConversationReference instances.
Method Details
createSkillConversationIdWithOptions(SkillConversationIdFactoryOptions)
Creates a conversation ID for a skill conversation based on the caller's ConversationReference.
function createSkillConversationIdWithOptions(options: SkillConversationIdFactoryOptions): Promise<string>
Parameters
The SkillConversationIdFactoryOptions to use.
Returns
Promise<string>
A unique conversation ID used to communicate with the skill.
deleteConversationReference(string)
Deletes the SkillConversationReference from the storage.
function deleteConversationReference(skillConversationId: string): Promise<void>
Parameters
- skillConversationId
-
string
The skill conversation id to use as key for the delete.
Returns
Promise<void>
A promise representing the asynchronous operation.
getSkillConversationReference(string)
Gets the ConversationReference created using createSkillConversationId() for a skillConversationId.
function getSkillConversationReference(skillConversationId: string): Promise<SkillConversationReference>
Parameters
- skillConversationId
-
string
A skill conversationId created using createSkillConversationId().
Returns
Promise<SkillConversationReference>
The caller's ConversationReference for a skillConversationId. Null if not found.
Inherited Method Details
createSkillConversationId(ConversationReference)
Warning
This API is now deprecated.
Method is deprecated, please use createSkillConversationIdWithOptions() with SkillConversationIdFactoryOptions instead.
Creates a conversation ID for a skill conversation based on the caller's ConversationReference.
function createSkillConversationId(_conversationReference: ConversationReference): Promise<string>
Parameters
- _conversationReference
-
ConversationReference
The skill's caller ConversationReference.
Returns
Promise<string>
Remarks
It should be possible to use the returned string on a request URL and it should not contain special characters. Returns A unique conversation ID used to communicate with the skill.
Inherited From SkillConversationIdFactoryBase.createSkillConversationId
getConversationReference(string)
Warning
This API is now deprecated.
Method is deprecated, please use getSkillConversationReference() instead.
Gets the ConversationReference created using createSkillConversationId() for a skillConversationId.
function getConversationReference(_skillConversationId: string): Promise<ConversationReference>
Parameters
- _skillConversationId
-
string
A skill conversationId created using createSkillConversationId().
Returns
Promise<ConversationReference>
Remarks
Returns The caller's ConversationReference for a skillConversationId. null if not found.
Inherited From SkillConversationIdFactoryBase.getConversationReference