component-dbs-core
Version:
DTO objects shared among device backend
15 lines (14 loc) • 724 B
TypeScript
import { AppSyncClient } from '../common_services';
import { DeviceStatusCheckFn, DbStreamConverterFn } from '../types.d';
export declare abstract class UpdateEventPublisher {
private readonly appSyncClient$;
readonly checkDeviceStatus: DeviceStatusCheckFn;
constructor(appSyncClient$: AppSyncClient, checkDeviceStatus: DeviceStatusCheckFn);
abstract prepareUpdateEventRequest(item: any, keys: any): any;
/**
*
* @param stream stream of update events coming from DynamoDb
* @param streamConverterFn Function used to convert the event records to type interfaces
*/
publishUpdateEventToSubscribers<T>(stream: Array<any>, streamConverterFn: DbStreamConverterFn<T>): Promise<void>;
}