feat(bot,wizard): smart message filtering, encrypted standalone wizard, and file persistence

This commit is contained in:
2026-09-30 00:49:04 +03:30
parent 0a7db5ebe9
commit 07643dbdf5
13 changed files with 750 additions and 56 deletions
+32
View File
@@ -1053,6 +1053,38 @@ export const api = {
): Promise<void> => {
await postData(`/drafts/${id}/cancel`, {});
},
verifyToken: async (
token: string,
): Promise<{
id: string;
chat_id: number;
kind: string;
status: string;
payload: Record<string, any>;
missing?: { fields?: { ok: boolean; key: string; label: string; blocking: boolean }[] } | null;
source?: string;
created_at?: string;
updated_at?: string;
}> => {
return getData(`/drafts/verify?token=${encodeURIComponent(token)}`);
},
updateByToken: async (
token: string,
payload: Record<string, any>,
): Promise<void> => {
await patchData(`/drafts/by-token?token=${encodeURIComponent(token)}`, { payload });
},
commitByToken: async (
token: string,
quoteId?: string,
): Promise<void> => {
await postData(`/drafts/by-token/commit?token=${encodeURIComponent(token)}`, { quote_id: quoteId });
},
cancelByToken: async (
token: string,
): Promise<void> => {
await postData(`/drafts/by-token/cancel?token=${encodeURIComponent(token)}`, {});
},
},
suppliers: {