import { Poke } from "../lib"; import { PutBucket, Key, Bucket, DelBucket, Value, PutEntry, DelEntry, SettingsUpdate } from './types'; export const action = (data: T): Poke => ({ app: 'settings-store', mark: 'settings-event', json: data }); export const putBucket = ( key: Key, bucket: Bucket ): Poke => action({ 'put-bucket': { 'bucket-key': key, 'bucket': bucket } }); export const delBucket = ( key: Key ): Poke => action({ 'del-bucket': { 'bucket-key': key } }); export const putEntry = ( bucket: Key, key: Key, value: Value ): Poke => action({ 'put-entry': { 'bucket-key': bucket, 'entry-key': key, value: value } }); export const delEntry = ( bucket: Key, key: Key ): Poke => action({ 'del-entry': { 'bucket-key': bucket, 'entry-key': key } }); export * from './types';