import * as Backbone from 'backbone'; import { LocalizerType } from './types/Util'; import { ColorType } from './types/Colors'; import { ConversationType } from './state/ducks/conversations'; import { CallingClass, CallHistoryDetailsType } from './services/calling'; import { SendOptionsType } from './textsecure/SendMessage'; import { SyncMessageClass } from './textsecure.d'; interface ModelAttributesInterface { [key: string]: any; } type DeletesAttributesType = { fromId: string; serverTimestamp: number; targetSentTimestamp: number; }; declare class DeletesModelType extends Backbone.Model { forMessage(message: MessageModelType): Array; onDelete(doe: DeletesAttributesType): Promise; } type TaskResultType = any; type MessageAttributesType = { id: string; serverTimestamp: number; }; declare class MessageModelType extends Backbone.Model { id: string; static updateTimers(): void; getContact(): ConversationModelType | undefined | null; getConversation(): ConversationModelType | undefined | null; getPropsForSearchResult(): any; getPropsForBubble(): any; cleanup(): Promise; handleDeleteForEveryone( doe: DeletesModelType, shouldPersist: boolean ): Promise; } type ConversationTypeType = 'private' | 'group'; type ConversationAttributesType = { id: string; uuid?: string; e164?: string; active_at?: number | null; draft?: string; groupId?: string; isArchived?: boolean; lastMessage?: string; members?: Array; needsVerification?: boolean; profileFamilyName?: string | null; profileKey?: string | null; profileName?: string | null; profileSharing: boolean; storageID?: string; type: ConversationTypeType; unreadCount?: number; verified?: number; version: number; }; declare class ConversationModelType extends Backbone.Model< ConversationAttributesType > { id: string; cachedProps: ConversationType; initialPromise: Promise; messageRequestEnum: typeof SyncMessageClass.MessageRequestResponse.Type; addCallHistory(details: CallHistoryDetailsType): void; applyMessageRequestResponse( response: number, options?: { fromSync: boolean } ): void; cleanup(): Promise; disableProfileSharing(): void; dropProfileKey(): Promise; generateProps(): void; getAccepted(): boolean; getAvatarPath(): string | undefined; getColor(): ColorType | undefined; getName(): string | undefined; getNumber(): string; getProfileName(): string | undefined; getProfiles(): Promise>>; getRecipients: () => Array; getSendOptions(options?: any): SendOptionsType | undefined; getTitle(): string; idForLogging(): string; isFromOrAddedByTrustedContact(): boolean; isVerified(): boolean; safeGetVerified(): Promise; setProfileKey(profileKey?: string | null): Promise; toggleVerified(): Promise; unblock(): boolean | undefined; updateE164: (e164?: string) => void; updateLastMessage: () => Promise; updateUuid: (uuid?: string) => void; wrapSend: (sendPromise: Promise) => Promise; } declare class ConversationModelCollectionType extends Backbone.Collection< ConversationModelType > { resetLookups(): void; } declare class MessageModelCollectionType extends Backbone.Collection< MessageModelType > {}