Skip to content

@ahqstore/plugin-api / CommunicationInterface

Type Alias: CommunicationInterface

CommunicationInterface = { data: unknown; event: EventName; eventType: Request; refId: number; } | { data: unknown; event: EventName; eventType: Event; } | { data: unknown; eventType: Response; refId: number; status: ResponseStatus; }

Defined in: communication.ts:65

Experimental

This whole interface is also internally managed by our plugin

Type Declaration

{ data: unknown; event: EventName; eventType: Request; refId: number; }

data

data: unknown

Data to be attested

event

event: EventName

Event Name EventName

eventType

eventType: Request

Event Type EventType

Set to EventType.Request

refId

refId: number

A reference id

This is the communication interface provided if the event is a request

This gives a refId to use to fulfil the request from the Plugin End.

{ data: unknown; event: EventName; eventType: Event; }

data

data: unknown

Data to be attested

event

event: EventName

Event Name EventName

eventType

eventType: Event

Event Type EventType

Set to EventType.Request

{ data: unknown; eventType: Response; refId: number; status: ResponseStatus; }

data

data: unknown

Data whose type is not yet known

eventType

eventType: Response

Event Type EventType

Set to EventType.Response

refId

refId: number

A reference id

status

status: ResponseStatus

This is the communication interface provided if the event is a response

This gives an eventType and finally response data