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 @@ -22,10 +22,7 @@ type TunnelbrokerToDeviceMessage, type DeviceToTunnelbrokerRequest, } from '../types/tunnelbroker/messages.js'; -import type { - TunnelbrokerAPNsNotif, - TunnelbrokerFCMNotif, -} from '../types/tunnelbroker/notif-types.js'; +import type { TunnelbrokerNotif } from '../types/tunnelbroker/notif-types.js'; import type { AnonymousInitializationMessage, ConnectionInitializationMessage, @@ -66,9 +63,7 @@ message: TunnelbrokerClientMessageToDevice, messageID: ?string, ) => Promise, - +sendNotif: ( - notif: TunnelbrokerAPNsNotif | TunnelbrokerFCMNotif, - ) => Promise, + +sendNotif: (notif: TunnelbrokerNotif) => Promise, +sendMessageToTunnelbroker: (payload: string) => Promise, +addListener: (listener: TunnelbrokerSocketListener) => void, +removeListener: (listener: TunnelbrokerSocketListener) => void, 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 @@ -14,10 +14,7 @@ messageToDeviceValidator, } from './message-to-device-types.js'; import { type MessageToTunnelbrokerRequest } from './message-to-tunnelbroker-request-types.js'; -import { - type TunnelbrokerAPNsNotif, - type TunnelbrokerFCMNotif, -} from './notif-types.js'; +import { type TunnelbrokerNotif } from './notif-types.js'; import { type AnonymousInitializationMessage, type ConnectionInitializationMessage, @@ -57,8 +54,7 @@ export type DeviceToTunnelbrokerMessage = | ConnectionInitializationMessage | AnonymousInitializationMessage - | TunnelbrokerAPNsNotif - | TunnelbrokerFCMNotif + | TunnelbrokerNotif | MessageToDeviceRequest | MessageReceiveConfirmation | MessageToTunnelbrokerRequest @@ -69,8 +65,7 @@ // and await sending a message until Tunnelbroker responds that // the request was processed. export type DeviceToTunnelbrokerRequest = - | TunnelbrokerAPNsNotif - | TunnelbrokerFCMNotif + | TunnelbrokerNotif | MessageToDeviceRequest | MessageToTunnelbrokerRequest;