2021-01-04 19:46:24 +00:00
|
|
|
// Copyright 2020-2021 Signal Messenger, LLC
|
2020-10-30 20:34:04 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2021-05-28 19:11:19 +00:00
|
|
|
import { UnidentifiedSenderMessageContent } from '@signalapp/signal-client';
|
|
|
|
|
2020-09-09 02:25:05 +00:00
|
|
|
import MessageSender from './textsecure/SendMessage';
|
2021-04-08 16:24:21 +00:00
|
|
|
import SyncRequest from './textsecure/SyncRequest';
|
2020-04-13 17:37:29 +00:00
|
|
|
import EventTarget from './textsecure/EventTarget';
|
2020-08-17 18:38:30 +00:00
|
|
|
import SendMessage, { SendOptionsType } from './textsecure/SendMessage';
|
2020-06-04 18:16:19 +00:00
|
|
|
import { WebAPIType } from './textsecure/WebAPI';
|
2020-07-10 18:28:49 +00:00
|
|
|
import utils from './textsecure/Helpers';
|
2020-09-28 19:02:35 +00:00
|
|
|
import { CallingMessage as CallingMessageClass } from 'ringrtc';
|
2020-11-20 17:30:45 +00:00
|
|
|
import { WhatIsThis } from './window.d';
|
2021-06-15 00:09:37 +00:00
|
|
|
import { Storage } from './textsecure/Storage';
|
|
|
|
import {
|
|
|
|
StorageServiceCallOptionsType,
|
|
|
|
StorageServiceCredentials,
|
2021-07-09 19:36:10 +00:00
|
|
|
ProcessedAttachment,
|
2021-06-15 00:09:37 +00:00
|
|
|
} from './textsecure/Types.d';
|
2020-04-13 17:37:29 +00:00
|
|
|
|
|
|
|
export type UnprocessedType = {
|
|
|
|
attempts: number;
|
|
|
|
decrypted?: string;
|
|
|
|
envelope?: string;
|
|
|
|
id: string;
|
2021-03-04 21:44:57 +00:00
|
|
|
timestamp: number;
|
2021-05-27 20:17:05 +00:00
|
|
|
serverGuid?: string;
|
2020-04-13 17:37:29 +00:00
|
|
|
serverTimestamp?: number;
|
|
|
|
source?: string;
|
|
|
|
sourceDevice?: number;
|
|
|
|
sourceUuid?: string;
|
2021-07-09 19:36:10 +00:00
|
|
|
messageAgeSec?: number;
|
2020-04-13 17:37:29 +00:00
|
|
|
version: number;
|
|
|
|
};
|
|
|
|
|
2021-06-15 00:09:37 +00:00
|
|
|
export { StorageServiceCallOptionsType, StorageServiceCredentials };
|
2020-07-07 00:56:56 +00:00
|
|
|
|
2020-04-13 17:37:29 +00:00
|
|
|
export type TextSecureType = {
|
2021-06-15 00:09:37 +00:00
|
|
|
storage: Storage;
|
2021-07-28 21:37:09 +00:00
|
|
|
server: WebAPIType;
|
2020-09-24 20:57:54 +00:00
|
|
|
messageSender: MessageSender;
|
|
|
|
messaging: SendMessage;
|
2020-07-10 18:28:49 +00:00
|
|
|
utils: typeof utils;
|
2020-04-13 17:37:29 +00:00
|
|
|
|
|
|
|
EventTarget: typeof EventTarget;
|
2020-09-24 20:57:54 +00:00
|
|
|
AccountManager: WhatIsThis;
|
2021-05-03 16:38:20 +00:00
|
|
|
MessageSender: typeof MessageSender;
|
2021-04-08 16:24:21 +00:00
|
|
|
SyncRequest: typeof SyncRequest;
|
2020-04-13 17:37:29 +00:00
|
|
|
};
|