@ -39,7 +39,10 @@ export const executeClientSideAction = async ({
|
||||
return executeRedirect(clientSideAction.redirect)
|
||||
}
|
||||
if ('wait' in clientSideAction) {
|
||||
return executeWait(clientSideAction.wait)
|
||||
await executeWait(clientSideAction.wait)
|
||||
return clientSideAction.expectsDedicatedReply
|
||||
? { replyToSend: undefined }
|
||||
: undefined
|
||||
}
|
||||
if ('setVariable' in clientSideAction) {
|
||||
return executeSetVariable(clientSideAction.setVariable.scriptToExecute)
|
||||
|
@ -4,6 +4,7 @@ import { LogicBlockType } from './enums'
|
||||
|
||||
export const waitOptionsSchema = z.object({
|
||||
secondsToWaitFor: z.string().optional(),
|
||||
shouldPause: z.boolean().optional(),
|
||||
})
|
||||
|
||||
export const waitBlockSchema = blockBaseSchema.merge(
|
||||
|
@ -177,6 +177,7 @@ const startPropsToInjectSchema = z.object({
|
||||
const clientSideActionSchema = z
|
||||
.object({
|
||||
lastBubbleBlockId: z.string().optional(),
|
||||
expectsDedicatedReply: z.boolean().optional(),
|
||||
})
|
||||
.and(
|
||||
z
|
||||
|
Reference in New Issue
Block a user