datatype.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import { Observable } from "rxjs";
  2. import { BaseMessage } from "../dependencies/fisappmessagejsutilty/dependencies/dependencies";
  3. import { LogSetting, MessageLog } from "../dependencies/fisloggingservice/type/datatype";
  4. type IncomingMessageSetting = LogSetting & {
  5. incomingObservable: Observable<BaseMessage>
  6. }
  7. // Incoming message Service Class
  8. export interface IncomingMessageServiceInterface {
  9. // Set default setting
  10. init(settings: IncomingMessageSetting): void;
  11. }
  12. // It can have an incoming and a target logging server. The tags are used to search for specific sets of messages from the logging server.
  13. export interface MessageSynchronisationServiceSetting {
  14. incomingSource: LogSettingwTags,
  15. target: LogSettingwTags
  16. }
  17. // Renew Structure To fix undefined issue at test3a.ts init()
  18. type LogSettingwTags = LogSetting & Tags
  19. interface Tags {
  20. tags: string[]
  21. }
  22. // Acknowledgement Service Class
  23. export interface MessageAuditorServiceInterface {
  24. // Set default setting
  25. init(settings: MessageSynchronisationServiceSetting): void;
  26. // Subscribe to trigger
  27. subscribe(obs: Observable<ErrorTrigger>): Observable<any>;
  28. }
  29. export interface ErrorTrigger {
  30. status: 0 | 1,
  31. message: any | string
  32. }