import * as cdk from "@aws-cdk/core"; import * as dynamodb from "@aws-cdk/aws-dynamodb"; import * as lambdaEventSources from "@aws-cdk/aws-lambda-event-sources"; import { Function as Fn, FunctionProps, FunctionDefinition } from "./Function"; import { KinesisStream } from "./KinesisStream"; import { Permissions } from "./util/permission"; export declare enum TableFieldType { BINARY = "B", NUMBER = "N", STRING = "S" } export interface TableProps { readonly fields?: { [key: string]: TableFieldType; }; readonly primaryIndex?: TableIndexProps; readonly secondaryIndexes?: { [key: string]: TableIndexProps; }; readonly dynamodbTable?: dynamodb.ITable | TableCdkProps; readonly kinesisStream?: KinesisStream; readonly stream?: boolean | dynamodb.StreamViewType; readonly consumers?: { [consumerName: string]: FunctionDefinition | TableConsumerProps; }; readonly defaultFunctionProps?: FunctionProps; } export interface TableConsumerProps { readonly function: FunctionDefinition; readonly consumerProps?: lambdaEventSources.DynamoEventSourceProps; } export interface TableIndexProps { readonly partitionKey: string; readonly sortKey?: string; readonly indexProps?: TableCdkIndexProps; } export declare type TableCdkProps = Omit; export declare type TableCdkIndexProps = Omit; export declare class Table extends cdk.Construct { readonly dynamodbTable: dynamodb.Table; private functions; private readonly permissionsAttachedForAllConsumers; private readonly defaultFunctionProps?; private readonly stream?; constructor(scope: cdk.Construct, id: string, props: TableProps); get tableArn(): string; get tableName(): string; addConsumers(scope: cdk.Construct, consumers: { [consumerName: string]: FunctionDefinition | TableConsumerProps; }): void; attachPermissions(permissions: Permissions): void; attachPermissionsToConsumer(consumerName: string, permissions: Permissions): void; getFunction(consumerName: string): Fn | undefined; private addConsumer; validateFieldsAndIndexes(id: string, props: TableProps): void; private buildAttribute; private buildStreamConfig; private convertTableFieldTypeToAttributeType; private buildKinesisStreamSpec; private checkDeprecatedConsumers; }