2023-12-13 10:22:02 +01:00
|
|
|
import {
|
|
|
|
ContinueChatResponse,
|
|
|
|
CustomEmbedBubble,
|
2024-06-26 10:13:38 +02:00
|
|
|
Message,
|
2023-12-13 10:22:02 +01:00
|
|
|
SessionState,
|
2024-05-15 14:24:55 +02:00
|
|
|
SetVariableHistoryItem,
|
2023-12-13 10:22:02 +01:00
|
|
|
} from '@typebot.io/schemas'
|
2022-11-29 10:02:40 +01:00
|
|
|
|
|
|
|
export type EdgeId = string
|
|
|
|
|
|
|
|
export type ExecuteLogicResponse = {
|
|
|
|
outgoingEdgeId: EdgeId | undefined
|
|
|
|
newSessionState?: SessionState
|
2024-05-15 14:24:55 +02:00
|
|
|
newSetVariableHistory?: SetVariableHistoryItem[]
|
2023-11-13 15:27:36 +01:00
|
|
|
} & Pick<ContinueChatResponse, 'clientSideActions' | 'logs'>
|
2022-11-29 10:02:40 +01:00
|
|
|
|
|
|
|
export type ExecuteIntegrationResponse = {
|
|
|
|
outgoingEdgeId: EdgeId | undefined
|
|
|
|
newSessionState?: SessionState
|
2023-12-08 13:43:58 +00:00
|
|
|
startTimeShouldBeUpdated?: boolean
|
2023-12-13 10:22:02 +01:00
|
|
|
customEmbedBubble?: CustomEmbedBubble
|
2024-05-15 14:24:55 +02:00
|
|
|
newSetVariableHistory?: SetVariableHistoryItem[]
|
2023-11-13 15:27:36 +01:00
|
|
|
} & Pick<ContinueChatResponse, 'clientSideActions' | 'logs'>
|
2023-08-29 10:01:28 +02:00
|
|
|
|
2024-06-26 10:13:38 +02:00
|
|
|
export type Reply = Message | undefined
|
2024-01-30 08:02:10 +01:00
|
|
|
|
2023-08-29 10:01:28 +02:00
|
|
|
export type ParsedReply =
|
|
|
|
| { status: 'success'; reply: string }
|
|
|
|
| { status: 'fail' }
|
|
|
|
| { status: 'skip' }
|