-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathsendMessageQuery.d.ts
More file actions
85 lines (85 loc) · 2.74 KB
/
sendMessageQuery.d.ts
File metadata and controls
85 lines (85 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import { FileUpload, IAction } from '@/components/Bot';
import { BaseRequest } from './types';
export type IncomingInput = {
question?: string;
form?: Record<string, unknown>;
uploads?: FileUpload[];
overrideConfig?: Record<string, unknown>;
socketIOClientId?: string;
chatId?: string;
fileName?: string;
leadEmail?: string;
action?: IAction;
humanInput?: Record<string, unknown>;
};
export type MessageRequest = BaseRequest & {
chatflowid?: string;
body?: IncomingInput;
};
export type FeedbackRatingType = 'THUMBS_UP' | 'THUMBS_DOWN';
export type FeedbackInput = {
chatId: string;
messageId: string;
rating: FeedbackRatingType;
content?: string;
};
export type CreateFeedbackRequest = BaseRequest & {
chatflowid?: string;
body?: FeedbackInput;
};
export type UpdateFeedbackRequest = BaseRequest & {
id: string;
body?: Partial<FeedbackInput>;
};
export type UpsertRequest = BaseRequest & {
chatflowid: string;
apiHost?: string;
formData: FormData;
};
export type LeadCaptureInput = {
chatflowid: string;
chatId: string;
name?: string;
email?: string;
phone?: string;
};
export type LeadCaptureRequest = BaseRequest & {
body: Partial<LeadCaptureInput>;
};
export declare const sendFeedbackQuery: ({ chatflowid, apiHost, body, onRequest }: CreateFeedbackRequest) => Promise<{
data?: unknown;
error?: Error | undefined;
}>;
export declare const updateFeedbackQuery: ({ id, apiHost, body, onRequest }: UpdateFeedbackRequest) => Promise<{
data?: unknown;
error?: Error | undefined;
}>;
export declare const sendMessageQuery: ({ chatflowid, apiHost, body, onRequest }: MessageRequest) => Promise<{
data?: any;
error?: Error | undefined;
}>;
export declare const createAttachmentWithFormData: ({ chatflowid, apiHost, formData, onRequest }: UpsertRequest) => Promise<{
data?: unknown;
error?: Error | undefined;
}>;
export declare const upsertVectorStoreWithFormData: ({ chatflowid, apiHost, formData, onRequest }: UpsertRequest) => Promise<{
data?: unknown;
error?: Error | undefined;
}>;
export declare const getChatbotConfig: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{
data?: any;
error?: Error | undefined;
}>;
export declare const isStreamAvailableQuery: ({ chatflowid, apiHost, onRequest }: MessageRequest) => Promise<{
data?: any;
error?: Error | undefined;
}>;
export declare const sendFileDownloadQuery: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{
data?: any;
error?: Error | undefined;
}>;
export declare const addLeadQuery: ({ apiHost, body, onRequest }: LeadCaptureRequest) => Promise<{
data?: any;
error?: Error | undefined;
}>;
//# sourceMappingURL=sendMessageQuery.d.ts.map