2020-10-30 20:34:04 +00:00
|
|
|
// Copyright 2020 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2020-04-13 17:37:29 +00:00
|
|
|
import EventTarget from './EventTarget';
|
|
|
|
import AccountManager from './AccountManager';
|
|
|
|
import MessageReceiver from './MessageReceiver';
|
|
|
|
import utils from './Helpers';
|
|
|
|
import SyncRequest from './SyncRequest';
|
|
|
|
import MessageSender from './SendMessage';
|
2021-06-15 00:09:37 +00:00
|
|
|
import { Storage } from './Storage';
|
2020-04-13 17:37:29 +00:00
|
|
|
import * as WebAPI from './WebAPI';
|
|
|
|
import WebSocketResource from './WebsocketResources';
|
|
|
|
|
2022-06-13 21:39:35 +00:00
|
|
|
export type TextSecureType = {
|
|
|
|
utils: typeof utils;
|
|
|
|
storage: Storage;
|
|
|
|
|
|
|
|
AccountManager: typeof AccountManager;
|
|
|
|
EventTarget: typeof EventTarget;
|
|
|
|
MessageReceiver: typeof MessageReceiver;
|
|
|
|
MessageSender: typeof MessageSender;
|
|
|
|
SyncRequest: typeof SyncRequest;
|
|
|
|
WebAPI: typeof WebAPI;
|
|
|
|
WebSocketResource: typeof WebSocketResource;
|
|
|
|
|
|
|
|
server?: WebAPI.WebAPIType;
|
|
|
|
messaging?: MessageSender;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const textsecure: TextSecureType = {
|
2020-04-13 17:37:29 +00:00
|
|
|
utils,
|
2021-06-15 00:09:37 +00:00
|
|
|
storage: new Storage(),
|
2020-04-13 17:37:29 +00:00
|
|
|
|
|
|
|
AccountManager,
|
|
|
|
EventTarget,
|
|
|
|
MessageReceiver,
|
|
|
|
MessageSender,
|
|
|
|
SyncRequest,
|
|
|
|
WebAPI,
|
|
|
|
WebSocketResource,
|
|
|
|
};
|