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

23 lines
640 B
TypeScript
Raw Normal View History

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