Files
hereconnect/packages/tg-bot-update-webhook-ddoc/dist/updates/saveUpdate.d.ts
T

23 lines
655 B
TypeScript
Raw Normal View History

2024-12-15 03:14:39 +02:00
import { TgBotUpdateWebhookDesignDocument, TgBotUpdateDocument } from "../types";
export type { TgBotUpdateWebhookDesignDocument };
2024-12-10 13:21:38 +02:00
type CouchRequest = {
body: string;
headers: Record<string, string>;
method: string;
query: Record<string, string>;
userCtx: {
name: string | null;
roles: string[];
};
};
type CouchResponse = [
2024-12-15 03:14:39 +02:00
TgBotUpdateDocument | null,
2024-12-10 13:21:38 +02:00
{
code: number;
body: string;
} | string
];
2024-12-15 03:14:39 +02:00
type UpdateFunction = (doc: TgBotUpdateDocument | null, req: CouchRequest) => CouchResponse;
2024-12-10 13:21:38 +02:00
export declare const saveUpdate: UpdateFunction;
export declare const saveUpdateString: string;