component-dbs-core
Version:
DTO objects shared among device backend
20 lines (19 loc) • 874 B
TypeScript
import { DocumentClient } from 'aws-sdk/clients/dynamodb';
export declare class DynamodbUtils {
convertDbItemToDto<T>(item: DocumentClient.AttributeMap, dbToDtoNameMapping: {
[key: string]: string;
}, attributesToDelete?: string[]): T;
/**
*
* @param params This is the QueryInput parameter that will be populated with the provided arguments
* @param timestampFilter
* @param filter
* @param nextToken
*/
prepareMultiQueryParams(queryInput: DocumentClient.QueryInput, type: string, timestampFilter: string, nextToken?: DocumentClient.Key, filter?: string): DocumentClient.QueryInput;
convertTimestampFilter: (filter: string, type: string) => DocumentClient.QueryInput;
/**
* create a last year time window if the request doesn't have timestamp in the filter
*/
createLastYearQuery: () => string;
}