diff --git a/lib/tunnelbroker/tunnelbroker-context.js b/lib/tunnelbroker/tunnelbroker-context.js --- a/lib/tunnelbroker/tunnelbroker-context.js +++ b/lib/tunnelbroker/tunnelbroker-context.js @@ -6,7 +6,6 @@ import { tunnnelbrokerURL } from '../facts/tunnelbroker.js'; import { tunnelbrokerHeartbeatTimeout } from '../shared/timeouts.js'; -import type { Heartbeat } from '../types/tunnelbroker/heartbeat-types.js'; import type { MessageReceiveConfirmation } from '../types/tunnelbroker/message-receive-confirmation-types.js'; import type { MessageSentStatus } from '../types/tunnelbroker/message-to-device-request-status-types.js'; import type { MessageToDeviceRequest } from '../types/tunnelbroker/message-to-device-request-types.js'; @@ -20,6 +19,7 @@ peerToPeerMessageValidator, } from '../types/tunnelbroker/peer-to-peer-message-types.js'; import type { ConnectionInitializationMessage } from '../types/tunnelbroker/session-types.js'; +import type { Heartbeat } from '../types/websocket/heartbeat-types.js'; export type ClientMessageToDevice = { +deviceID: string, diff --git a/lib/types/tunnelbroker/messages.js b/lib/types/tunnelbroker/messages.js --- a/lib/types/tunnelbroker/messages.js +++ b/lib/types/tunnelbroker/messages.js @@ -3,11 +3,6 @@ import type { TUnion } from 'tcomb'; import t from 'tcomb'; -import { - type ConnectionInitializationResponse, - connectionInitializationResponseValidator, -} from './connection-initialization-response-types.js'; -import { type Heartbeat, heartbeatValidator } from './heartbeat-types.js'; import { type MessageReceiveConfirmation, messageReceiveConfirmationValidator, @@ -28,6 +23,14 @@ type ConnectionInitializationMessage, connectionInitializationMessageValidator, } from './session-types.js'; +import { + type ConnectionInitializationResponse, + connectionInitializationResponseValidator, +} from '../websocket/connection-initialization-response-types.js'; +import { + type Heartbeat, + heartbeatValidator, +} from '../websocket/heartbeat-types.js'; /* * This file defines types and validation for messages exchanged diff --git a/lib/types/tunnelbroker/connection-initialization-response-types.js b/lib/types/websocket/connection-initialization-response-types.js rename from lib/types/tunnelbroker/connection-initialization-response-types.js rename to lib/types/websocket/connection-initialization-response-types.js diff --git a/lib/types/tunnelbroker/heartbeat-types.js b/lib/types/websocket/heartbeat-types.js rename from lib/types/tunnelbroker/heartbeat-types.js rename to lib/types/websocket/heartbeat-types.js