2018-03-13 05:15:40 +00:00
|
|
|
import { UniverseManager } from './smartuniverse.classes.manager';
|
|
|
|
import { UniverseStore } from './smartuniverse.classes.universestore';
|
2018-03-08 22:42:46 +00:00
|
|
|
export interface ISmartUniverseConstructorOptions {
|
2018-03-13 05:15:40 +00:00
|
|
|
messageExpiryInMilliseconds: number;
|
2018-03-08 22:42:46 +00:00
|
|
|
}
|
2018-03-13 05:15:40 +00:00
|
|
|
export interface IServerGetMessagesRequestBody {
|
|
|
|
youngerThan: number;
|
|
|
|
}
|
|
|
|
export interface IServerPutMessageRequestBody {
|
|
|
|
message: string;
|
|
|
|
payload: any;
|
|
|
|
}
|
|
|
|
export declare class Universe {
|
|
|
|
universeStore: UniverseStore;
|
|
|
|
universeManager: UniverseManager;
|
2018-03-08 22:42:46 +00:00
|
|
|
private options;
|
|
|
|
private universeVersionStore;
|
|
|
|
private readonly universeVersion;
|
|
|
|
private smartexpressServer;
|
2018-03-20 07:16:54 +00:00
|
|
|
private smartsocket;
|
2018-03-08 22:42:46 +00:00
|
|
|
constructor(optionsArg: ISmartUniverseConstructorOptions);
|
2018-03-13 05:15:40 +00:00
|
|
|
/**
|
|
|
|
* initiates a server
|
|
|
|
*/
|
|
|
|
initServer(portArg: number | string): Promise<void>;
|
|
|
|
stopServer(): Promise<void>;
|
2018-03-08 22:42:46 +00:00
|
|
|
}
|