import { StoreStream, MutateStream } from '../../store.api'; import { Subscription, Observable } from 'rxjs'; import { MessageArgs, MessageFunction, SentFrom } from '../../bus.api'; import { Logger } from '../../log'; export declare type UUID = string; export declare type StoreType = string; export declare class MutationRequestWrapper { value: T; errorHandler: MessageFunction; successHandler: MessageFunction; uuid: UUID; stateChangeType: any; constructor(value: T, successHandler?: MessageFunction, errorHandler?: MessageFunction, uuid?: UUID, stateChangeType?: any); } export declare class BaseStoreState { private changeType; private objectValue; constructor(changeType: T, objectValue: V); get type(): T; get value(): V; } export declare class StoreStateChange extends BaseStoreState { private objectId; constructor(objectId: UUID, changeType: T, objectValue: V); get id(): UUID; } export declare class StoreStateMutation extends BaseStoreState { private pvtErrorHandler; private pvtSuccessHandler; constructor(changeType: T, objectValue: V); set errorHandler(handler: MessageFunction); get errorHandler(): MessageFunction; set successHandler(handler: MessageFunction); get successHandler(): MessageFunction; } /** * StoreMessageArgs contains additional information for store change messages * like the id of the object which was changed and the state change type. */ export declare class StoreMessageArgs implements MessageArgs { stateChangeType: any | undefined; uuid: UUID; version: number; from: SentFrom; constructor(uuid: UUID, changeType?: any); } export declare class StoreStreamImpl implements StoreStream { protected stream: Observable>; protected log: Logger; protected subscription: Subscription; constructor(stream: Observable>, log: Logger); subscribe(successHandler: MessageFunction): Subscription; unsubscribe(): void; } export declare class MutateStreamImpl extends StoreStreamImpl implements MutateStream { protected stream: Observable>; protected mutatorErrorHandler: MessageFunction; protected mutatorSuccessHandler: MessageFunction; constructor(stream: Observable>, log: Logger); subscribe(successHandler: MessageFunction): Subscription; error(error: E): void; success(success: T): void; }