12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- /* General interface used for office work/ */
- import { Subject } from "rxjs"
- export enum ColorCode {
- 'GREEN' = 'GREEN',
- 'YELLOW' = 'YELLOW',
- 'RED' = 'RED'
- }
- export enum ConnectionStatus {
- 'GREEN' = 'GREEN',
- 'YELLOW' = 'YELLOW',
- 'RED' = 'RED'
- }
- export interface messageTransmissionInterface {
- id?: string,
- state: '' | 'attempt to send' | 'failed sent' | 'sent successfully',
- date?: Date,
- msg: string
- }
- export interface MessageLog {
- appLogLocId: string,
- appData: {
- msgId: string,
- msgLogDateTime: string,
- msgDateTime: string, s
- msgTag: string[],
- msgPayload: string
- }
- }
- export interface ServerResponse {
- confirmationMessage: string,
- msgId: string
- }
- export interface ReportStatus {
- code: ColorCode,
- message: string,
- payload?: any,
- }
- // https://grpc.io/docs/what-is-grpc/core-concepts/
- export interface GrpcConnectionType {
- instanceType: '' | 'server' | 'client'
- }
- export interface Message {
- id: string,
- message: MessageLog | string
- }
- export type Status = -1 | 0 | 1 // For status chain effect
- export interface ConnectionAttribute {
- ConnectionID: ConnectionID,
- outGoing: ChannelAttribute,
- inComing: ChannelAttribute,
- connectionStatus: Subject<ReportStatus>
- }
- export interface ChannelAttribute {
- ChannelID?: string,
- PublisherID?: string,
- SubscriberID?: string,
- PublisherInstance?: any,
- SubscriberInstance?: any,
- MessageToBePublished: Subject<Message> | null
- MessageToBeReceived: Subject<Message> | null
- }
- export interface ConnectionRequest {
- server: ServerRequest,
- client: ClientRequest
- }
- export interface ServerRequest {
- serverUrl: string,
- connectionType: 'GRPC' | 'HTTP' | 'Socket',
- messageToBePublishedfromApplication: Subject<Message>
- }
- export interface ClientRequest {
- targetServer: string,
- connectionType: 'GRPC' | 'HTTP' | 'Socket',
- messageToBeReceivedFromRemote: Subject<Message>
- }
- export interface ConnectionID {
- local: string,
- remote: string
- }
|