UNPKG

component-dbs-core

Version:

DTO objects shared among device backend

26 lines (25 loc) 1.39 kB
import { DocumentClient } from 'aws-sdk/clients/dynamodb'; import { TransactionQueryInput } from '../types.d'; import { DynamodbService } from '../common_services'; /** * Transaction db * used to access transaction database table */ export declare class TransactionDb { private readonly tableName; private readonly dynamodbService; private readonly transactionGsi; private readonly accessTokenGsi; private readonly entityUuidGsi; private readonly siteUuidGsi; type: string; constructor(tableName: string, dynamodbService: DynamodbService, transactionGsi: string, accessTokenGsi: string, entityUuidGsi: string, siteUuidGsi: string); getTransaction: (transactionUuid: string) => Promise<DocumentClient.QueryOutput>; getIndexName: (deviceUuid?: string | undefined, siteUuid?: string | undefined) => string | undefined; getTransactionsMultiQueries: (limit: number, timestampFilter: string, { deviceUuid, siteUuid, entityUuid, }: { deviceUuid?: string | undefined; siteUuid?: string | undefined; entityUuid?: string | undefined; }, nextToken?: DocumentClient.Key | undefined, filter?: string | undefined, prev?: DocumentClient.QueryOutput | undefined) => Promise<DocumentClient.QueryOutput>; getTransactions: (event: TransactionQueryInput, entityUuid?: string | undefined) => Promise<DocumentClient.QueryOutput>; }