somod-chat-service
Version:
Serverless Chat Service from SOMOD
11 lines (10 loc) • 484 B
TypeScript
import { Message, MessageInput } from "./types";
export declare const getMessageTTL: (now?: number) => number;
export declare const putMessage: (tableName: string, userId: string, message: Omit<Message, "seqNo">) => Promise<Message>;
export declare const validateIncomingMessage: (message: MessageInput, userId: string, typeToAllowedActionsMap: Record<string, string[]>) => Promise<{
statusCode: number;
headers: {
"Content-Type": string;
};
body: string;
}>;