UNPKG

@ournet/news-data

Version:
24 lines (23 loc) 809 B
import DynamoDB = require("aws-sdk/clients/dynamodb"); import { DynamoItem } from "dynamo-item"; import { Topic } from "@ournet/news-domain"; import { Locale } from "../common"; export declare type TopicEventKey = { topicId: string; createdAt: string; }; export interface TopicEvent { topicId: string; eventId: string; createdAt: string; expiresAt: number; locale: string; } export declare class TopicEventHelper { static create(locale: Locale, eventId: string, createdAt: string, topics: Topic[]): TopicEvent[]; } export declare class TopicEventModel extends DynamoItem<TopicEventKey, TopicEvent> { localeLastTopicsIndexName(): string; topicLastEventsIndexName(): string; constructor(client: DynamoDB.DocumentClient, tableSuffix: string); }