2020-06-16 02:09:52 +02:00
|
|
|
import { LocalizerType } from '../types/Util';
|
|
|
|
import { LibsignalProtocol } from '../../libtextsecure/libsignal-protocol';
|
|
|
|
import { SignalInterface } from '../../js/modules/signal';
|
2020-06-23 02:44:46 +02:00
|
|
|
import { Libloki } from '../libloki';
|
2020-06-26 03:47:29 +02:00
|
|
|
import { LokiPublicChatFactoryInterface } from '../js/modules/loki_public_chat_api';
|
|
|
|
import { LokiAppDotNetServerInterface } from '../js/modules/loki_app_dot_net_api';
|
2020-07-07 09:46:50 +02:00
|
|
|
|
2020-07-03 02:08:24 +02:00
|
|
|
import { LibTextsecure } from '../libtextsecure';
|
2020-08-28 02:09:17 +02:00
|
|
|
import { ConfirmationDialogParams } from '../background';
|
2021-02-08 06:18:36 +01:00
|
|
|
import {} from 'styled-components/cssprop';
|
2020-10-15 07:43:51 +02:00
|
|
|
|
|
|
|
import { ConversationControllerType } from '../js/ConversationController';
|
2020-10-20 04:20:09 +02:00
|
|
|
import { any } from 'underscore';
|
2020-11-13 04:29:59 +01:00
|
|
|
import { Store } from 'redux';
|
2020-12-02 01:26:31 +01:00
|
|
|
import { MessageController } from './session/messages/MessageController';
|
2020-12-03 03:47:32 +01:00
|
|
|
import { DefaultTheme } from 'styled-components';
|
2020-12-15 07:14:18 +01:00
|
|
|
|
2021-01-29 01:29:24 +01:00
|
|
|
import { ConversationCollection } from './models/conversation';
|
2021-02-15 05:16:38 +01:00
|
|
|
import { ConversationType } from './state/ducks/conversations';
|
2021-01-29 01:29:24 +01:00
|
|
|
|
2020-06-16 02:09:52 +02:00
|
|
|
/*
|
|
|
|
We declare window stuff here instead of global.d.ts because we are importing other declarations.
|
|
|
|
If you import anything in global.d.ts, the type system won't work correctly.
|
|
|
|
*/
|
2020-07-07 09:46:50 +02:00
|
|
|
|
2020-06-16 02:09:52 +02:00
|
|
|
declare global {
|
|
|
|
interface Window {
|
|
|
|
CONSTANTS: any;
|
|
|
|
Events: any;
|
|
|
|
Lodash: any;
|
|
|
|
LokiAppDotNetServerAPI: any;
|
|
|
|
LokiFileServerAPI: any;
|
|
|
|
LokiPublicChatAPI: any;
|
|
|
|
LokiSnodeAPI: any;
|
|
|
|
Session: any;
|
|
|
|
Signal: SignalInterface;
|
|
|
|
StubAppDotNetApi: any;
|
2021-04-15 10:14:04 +02:00
|
|
|
StringView: any;
|
2020-06-16 02:09:52 +02:00
|
|
|
StubMessageAPI: any;
|
|
|
|
Whisper: any;
|
|
|
|
clearLocalData: any;
|
|
|
|
clipboard: any;
|
2020-08-28 02:09:17 +02:00
|
|
|
confirmationDialog: (params: ConfirmationDialogParams) => any;
|
2020-06-16 02:09:52 +02:00
|
|
|
dcodeIO: any;
|
|
|
|
displayNameRegex: any;
|
|
|
|
friends: any;
|
|
|
|
getConversations: any;
|
|
|
|
getFriendsFromContacts: any;
|
|
|
|
getSettingValue: any;
|
|
|
|
i18n: LocalizerType;
|
2020-06-23 02:44:46 +02:00
|
|
|
libloki: Libloki;
|
2020-06-16 02:09:52 +02:00
|
|
|
libsignal: LibsignalProtocol;
|
|
|
|
log: any;
|
2020-08-04 03:23:48 +02:00
|
|
|
lokiFeatureFlags: {
|
2020-08-04 03:42:08 +02:00
|
|
|
useOnionRequests: boolean;
|
|
|
|
useFileOnionRequests: boolean;
|
2020-11-09 04:19:37 +01:00
|
|
|
useFileOnionRequestsV2: boolean;
|
2021-02-12 04:08:11 +01:00
|
|
|
useRequestEncryptionKeyPair: boolean;
|
2021-04-14 06:15:02 +02:00
|
|
|
padOutgoingAttachments: boolean;
|
2020-08-04 03:23:48 +02:00
|
|
|
};
|
2020-06-16 05:02:01 +02:00
|
|
|
lokiFileServerAPI: LokiFileServerInstance;
|
2020-06-26 03:47:29 +02:00
|
|
|
lokiPublicChatAPI: LokiPublicChatFactoryInterface;
|
2020-06-30 10:04:17 +02:00
|
|
|
lokiSnodeAPI: LokiSnodeAPI;
|
2020-06-16 02:09:52 +02:00
|
|
|
onLogin: any;
|
|
|
|
resetDatabase: any;
|
|
|
|
restart: any;
|
|
|
|
seedNodeList: any;
|
|
|
|
setPassword: any;
|
|
|
|
setSettingValue: any;
|
|
|
|
showEditProfileDialog: any;
|
2020-12-16 06:18:42 +01:00
|
|
|
showResetSessionIdDialog: any;
|
2020-06-16 02:09:52 +02:00
|
|
|
storage: any;
|
2020-07-03 02:08:24 +02:00
|
|
|
textsecure: LibTextsecure;
|
2020-06-16 02:09:52 +02:00
|
|
|
toggleLinkPreview: any;
|
|
|
|
toggleMediaPermissions: any;
|
|
|
|
toggleMenuBar: any;
|
|
|
|
toggleSpellCheck: any;
|
2020-10-15 01:07:38 +02:00
|
|
|
setTheme: (newTheme: string) => any;
|
2020-06-26 03:47:29 +02:00
|
|
|
tokenlessFileServerAdnAPI: LokiAppDotNetServerInterface;
|
2020-06-16 02:09:52 +02:00
|
|
|
userConfig: any;
|
|
|
|
versionInfo: any;
|
2021-01-29 01:29:24 +01:00
|
|
|
getStoragePubKey: (key: string) => string;
|
2020-11-13 04:29:59 +01:00
|
|
|
getConversations: () => ConversationCollection;
|
2021-01-06 04:05:13 +01:00
|
|
|
profileImages: any;
|
2020-07-16 03:55:21 +02:00
|
|
|
MediaRecorder: any;
|
2020-10-20 04:20:09 +02:00
|
|
|
dataURLToBlobSync: any;
|
|
|
|
autoOrientImage: any;
|
2020-11-04 06:55:52 +01:00
|
|
|
contextMenuShown: boolean;
|
2021-03-05 01:11:53 +01:00
|
|
|
inboxStore?: Store;
|
2020-11-13 07:17:48 +01:00
|
|
|
actionsCreators: any;
|
2020-11-16 07:33:09 +01:00
|
|
|
extension: {
|
|
|
|
expired: (boolean) => void;
|
|
|
|
expiredStatus: () => boolean;
|
|
|
|
};
|
|
|
|
openUrl: (string) => void;
|
2020-12-03 03:47:32 +01:00
|
|
|
lightTheme: DefaultTheme;
|
|
|
|
darkTheme: DefaultTheme;
|
2021-01-29 01:29:24 +01:00
|
|
|
LokiPushNotificationServer: any;
|
|
|
|
LokiPushNotificationServerApi: any;
|
2020-06-16 02:09:52 +02:00
|
|
|
}
|
|
|
|
}
|