general.interface.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* General interface used for office work/ */
  2. export enum ColorCode {
  3. 'GREEN' = 'GREEN',
  4. 'YELLOW' = 'YELLOW',
  5. 'RED' = 'RED'
  6. }
  7. export interface messageTransmissionInterface {
  8. id?: string,
  9. state: '' | 'attempt to send' | 'failed sent' | 'sent successfully',
  10. date?: Date,
  11. msg: string
  12. }
  13. export interface MessageLog { // this one specifically for office work case only. FIS copyright LOL
  14. appLogLocId: string,
  15. appData: {
  16. msgId: string,
  17. msgLogDateTime: string,
  18. msgDateTime: string,s
  19. msgTag: string[],
  20. msgPayload: string
  21. }
  22. }
  23. export interface ServerResponse {
  24. confirmationMessage: string,
  25. msgId: string
  26. }
  27. export interface ReportStatus {
  28. code: ColorCode,
  29. message: string,
  30. payload?: any,
  31. from: string | any
  32. }
  33. // https://grpc.io/docs/what-is-grpc/core-concepts/
  34. export interface GrpcConnectionType {
  35. instanceType: '' | 'server' | 'client'
  36. serviceMethod: '' | 'unary' | 'server streaming' | 'client streaming' | 'bidirectional'
  37. }
  38. export interface GrpcMessage {
  39. id: string,
  40. message: MessageLog | string
  41. }
  42. export type Status = -1 | 0 | 1 // For status chain effect