import { Event } from './' ; interface StorageEvent { transactionId : string ; } export interface StoreCommand extends StorageEvent { store ? : string ; data ? : any ; error ? : any ; } export interface LoadCommand extends StorageEvent { store : string ; } export const storageStoreEvent = { topic : 'storage/store' , } ; export const storageLoadEvent = { topic : 'storage/load' , } ; export function makeStorageAcknowledgementEvent ( transactionId ) { return { topic : `storage/ack/${ transactionId }` , } ; } export function makeStorageResponseEvent ( transactionId ) { return { topic : `storage/response/${ transactionId }` , } ; } export const storageClearEvent = { topic : 'storage/clear' , } ;