UNPKG

@ournet/news-data

Version:
22 lines (21 loc) 763 B
import DynamoDB = require('aws-sdk/clients/dynamodb'); import { DynamoItem } from "dynamo-item"; import { NewsEvent } from "@ournet/news-domain"; import { Locale } from "../common"; export interface DynamoLatestEvent { eventId: string; locale: string; createdAt: string; expiresAt: number; } export declare class DynamoLatestEventHelper { static mapFromEvent(data: NewsEvent): DynamoLatestEvent; static createLocaleKey(locale: Locale): string; static expiresAt(date: Date): number; } export declare type LatestEventKey = { eventId: string; }; export declare class LatestEventModel extends DynamoItem<LatestEventKey, DynamoLatestEvent> { constructor(client: DynamoDB.DocumentClient, tableSuffix: string); }