Skip to content

@purista/core v2.0.5


PURISTA API / @purista/core / isCustomMessage

Function: isCustomMessage()

isCustomMessage(message): message is { contentEncoding: string; contentType: string; correlationId?: string; eventName: string; id: string; messageType: CustomMessage; otp?: string; payload?: unknown; principalId?: string; receiver?: EBMessageAddress; sender: { instanceId: string; serviceName: string; serviceTarget: string; serviceVersion: string }; tenantId?: string; timestamp: number; traceId?: string }

Defined in: packages/core/src/core/types/isCustomMessage.impl.ts:10

Checks if a PURISTA message is type of custom message

Parameters

message

EBMessage

any PURISTA message

Returns

message is { contentEncoding: string; contentType: string; correlationId?: string; eventName: string; id: string; messageType: CustomMessage; otp?: string; payload?: unknown; principalId?: string; receiver?: EBMessageAddress; sender: { instanceId: string; serviceName: string; serviceTarget: string; serviceVersion: string }; tenantId?: string; timestamp: number; traceId?: string }

true if message is type of custom message