datatype.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { Observable } from "rxjs";
  2. import { BaseMessage } from "../dependencies/fisappmessagejsutilty/dependencies/dependencies";
  3. import { LogSetting, MessageLog } from "../dependencies/log/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 & Filtes
  19. interface Tags {
  20. tags: string[]
  21. }
  22. interface Filtes {
  23. filters?: string[]
  24. }
  25. // Acknowledgement Service Class
  26. export interface MessageAuditorServiceInterface {
  27. // Set default setting
  28. init(settings: MessageSynchronisationServiceSetting): void;
  29. // Subscribe to trigger
  30. subscribe(obs: Observable<ErrorTrigger>): Observable<any>;
  31. }
  32. export interface ErrorTrigger {
  33. status: 0 | 1,
  34. message: any | string
  35. }