2021-05-31 06:11:20 +02:00
|
|
|
import {} from 'styled-components/cssprop';
|
|
|
|
|
2021-11-30 04:46:06 +01:00
|
|
|
import { LocalizerType } from '../ts/types/Util';
|
2020-06-16 02:09:52 +02:00
|
|
|
import { LibsignalProtocol } from '../../libtextsecure/libsignal-protocol';
|
|
|
|
import { SignalInterface } from '../../js/modules/signal';
|
2020-07-03 02:08:24 +02:00
|
|
|
import { LibTextsecure } from '../libtextsecure';
|
2020-10-15 07:43:51 +02:00
|
|
|
|
2020-11-13 04:29:59 +01:00
|
|
|
import { Store } from 'redux';
|
2020-12-15 07:14:18 +01:00
|
|
|
|
2021-05-28 02:09:35 +02:00
|
|
|
import { ConversationCollection, ConversationModel } 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;
|
2022-02-18 03:03:47 +01:00
|
|
|
SessionSnodeAPI: any;
|
2020-06-16 02:09:52 +02:00
|
|
|
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;
|
|
|
|
dcodeIO: any;
|
2021-10-22 01:39:05 +02:00
|
|
|
getSettingValue: (id: string, comparisonValue?: any) => any;
|
2021-10-21 08:08:38 +02:00
|
|
|
setSettingValue: (id: string, value: any) => void;
|
|
|
|
|
2020-06-16 02:09:52 +02:00
|
|
|
i18n: LocalizerType;
|
|
|
|
libsignal: LibsignalProtocol;
|
|
|
|
log: any;
|
2022-02-18 03:03:47 +01:00
|
|
|
sessionFeatureFlags: {
|
2020-08-04 03:42:08 +02:00
|
|
|
useOnionRequests: boolean;
|
2021-09-21 09:51:23 +02:00
|
|
|
useCallMessage: boolean;
|
2020-08-04 03:23:48 +02:00
|
|
|
};
|
2022-02-18 03:03:47 +01:00
|
|
|
SessionSnodeAPI: SessionSnodeAPI;
|
2020-06-16 02:09:52 +02:00
|
|
|
onLogin: any;
|
2021-08-05 05:15:03 +02:00
|
|
|
persistStore?: Persistor;
|
2020-06-16 02:09:52 +02:00
|
|
|
restart: any;
|
2021-06-03 03:37:45 +02:00
|
|
|
getSeedNodeList: () => Array<any> | undefined;
|
2020-06-16 02:09:52 +02:00
|
|
|
setPassword: any;
|
|
|
|
storage: any;
|
2020-07-03 02:08:24 +02:00
|
|
|
textsecure: LibTextsecure;
|
2021-10-21 04:18:50 +02:00
|
|
|
toggleMediaPermissions: () => Promise<void>;
|
|
|
|
toggleCallMediaPermissionsTo: (enabled: boolean) => Promise<void>;
|
|
|
|
getCallMediaPermissions: () => boolean;
|
2021-10-21 08:08:38 +02:00
|
|
|
updateZoomFactor: () => boolean;
|
|
|
|
toggleMenuBar: () => void;
|
2020-06-16 02:09:52 +02:00
|
|
|
toggleSpellCheck: any;
|
2020-10-15 01:07:38 +02:00
|
|
|
setTheme: (newTheme: string) => any;
|
2021-08-13 06:47:00 +02:00
|
|
|
isDev?: () => boolean;
|
2020-06-16 02:09:52 +02:00
|
|
|
userConfig: any;
|
|
|
|
versionInfo: any;
|
2020-11-13 04:29:59 +01:00
|
|
|
getConversations: () => ConversationCollection;
|
2022-03-21 06:29:07 +01:00
|
|
|
readyForUpdates: () => void;
|
2022-03-23 04:27:10 +01:00
|
|
|
drawAttention: () => void;
|
2020-07-16 03:55:21 +02:00
|
|
|
MediaRecorder: any;
|
2022-01-09 23:36:17 +01:00
|
|
|
|
2022-03-23 04:27:10 +01:00
|
|
|
platform: string;
|
|
|
|
openFromNotification: (convoId: string) => void;
|
2022-03-23 06:35:29 +01:00
|
|
|
getEnvironment: () => string;
|
|
|
|
getNodeVersion: () => string;
|
2022-03-23 04:27:10 +01:00
|
|
|
|
2022-03-24 01:15:21 +01:00
|
|
|
showWindow: () => void;
|
|
|
|
setCallMediaPermissions: (val: boolean) => void;
|
|
|
|
setMediaPermissions: (val: boolean) => void;
|
|
|
|
askForMediaAccess: () => void;
|
|
|
|
getMediaPermissions: () => boolean;
|
|
|
|
nodeSetImmediate: any;
|
|
|
|
globalOnlineStatus: boolean;
|
|
|
|
|
|
|
|
getTitle: () => string;
|
|
|
|
getVersion: () => string;
|
|
|
|
setAutoHideMenuBar: (val: boolean) => void;
|
|
|
|
setMenuBarVisibility: (val: boolean) => void;
|
2020-11-04 06:55:52 +01:00
|
|
|
contextMenuShown: boolean;
|
2021-03-05 01:11:53 +01:00
|
|
|
inboxStore?: Store;
|
2021-07-29 07:29:32 +02:00
|
|
|
openConversationWithMessages: (args: {
|
|
|
|
conversationKey: string;
|
2022-02-14 06:42:53 +01:00
|
|
|
messageId: string | null;
|
2021-07-29 07:29:32 +02:00
|
|
|
}) => Promise<void>;
|
2021-01-29 01:29:24 +01:00
|
|
|
LokiPushNotificationServer: any;
|
2021-08-13 06:47:00 +02:00
|
|
|
getGlobalOnlineStatus: () => boolean;
|
2021-06-09 02:06:23 +02:00
|
|
|
confirmationDialog: any;
|
2021-07-13 03:16:59 +02:00
|
|
|
callWorker: (fnName: string, ...args: any) => Promise<any>;
|
2021-08-10 03:57:27 +02:00
|
|
|
setStartInTray: (val: boolean) => Promise<void>;
|
|
|
|
getStartInTray: () => Promise<boolean>;
|
2021-09-22 09:04:15 +02:00
|
|
|
libsession: any;
|
2020-06-16 02:09:52 +02:00
|
|
|
}
|
|
|
|
}
|