@onereach/step-voice 7.0.9-VOIC1575.17 → 7.0.9-VOIC1575.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dst/step.d.ts +1 -0
- package/dst/step.js +4 -0
- package/package.json +1 -1
package/dst/step.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export default class ConvStep<TData extends IConversationData, TIn = unknown, TO
|
|
|
25
25
|
get useQueue(): boolean;
|
|
26
26
|
fetchData(): Promise<TData>;
|
|
27
27
|
getConversation(): Promise<IConversation>;
|
|
28
|
+
getConversationByName(conversation: string): Promise<IConversation>;
|
|
28
29
|
updateData(): Promise<void>;
|
|
29
30
|
hasConversation(): Promise<boolean>;
|
|
30
31
|
runBefore(): Promise<void>;
|
package/dst/step.js
CHANGED
|
@@ -51,6 +51,10 @@ class ConvStep extends step_1.default {
|
|
|
51
51
|
async getConversation() {
|
|
52
52
|
return (await this.fetchData())._conv;
|
|
53
53
|
}
|
|
54
|
+
async getConversationByName(conversation) {
|
|
55
|
+
const convDataThread = this.process.getSafeThread(this.dataThreadId);
|
|
56
|
+
return await convDataThread.get(conversation);
|
|
57
|
+
}
|
|
54
58
|
async updateData() {
|
|
55
59
|
if (this.convDataCache == null)
|
|
56
60
|
throw new Error(`missing conversation cache in state ${this.state.name}`);
|