import { LinkedDirectMessage, DirectMessageEventContainer } from "../types/GDPRDMs"; import { PartialTweet } from "../types/ClassicTweets"; import { PartialTweetGDPR } from "../types/GDPRTweets"; import { PartialFavorite } from "../types/GDPRExtended"; /** * Iterates over events inside direct messages. * * If you want messages events to be iterated, set {include_messages} to `true`. */ export declare function getEventsFromMessages(msgs: LinkedDirectMessage[], include_messages?: boolean, remove_double_linked_list?: boolean): Generator; /** * Parse a raw date found in `AdImpression.impressionTime` or `AdEngagementAttribute.engagementTime`. * * Should not be used to parse another Twitter Archive date. */ export declare function parseAdDate(date: string): Date; /** * Parse a raw Twitter date, from a `dm.createdAt` or `tweet.created_at`. * * For a tweet, please use `TwitterHelpers.dateFromTweet(tweet)` instead, it's optimized ! * * For dates in ad data (everthing that comes from `AdArchive`), use instead `TwitterHelpers.parseAdDate()` ! * * For a `LinkedDirectMessage`, use property `.createdAtDate` ! */ export declare function parseTwitterDate(date: string): Date; /** Return the `Date` object affiliated to **tweet**. */ export declare function dateFromTweet(tweet: PartialTweet): Date; /** Return the `Date` object affiliated to **favorite**. */ export declare function dateFromFavorite(favorite: PartialFavorite): Date; /** * Parse a date inside a `PushDevice` or a `MessagingDevice` object. * * Should not be used for any other type of object ! */ export declare function parseDeviceDate(date: string): Date; /** * Sort tweets by ID (descending order by default). */ export declare function sortTweets(tweets: T[], order?: "asc" | "desc"): T[]; /** * Sort favorites by ID (descending order by default). */ export declare function sortFavorites(favorites: PartialFavorite[], order?: "asc" | "desc"): PartialFavorite[]; /** * True if given tweet is coming from a GDPR archive. * * Tweets getted by available getters are NOT GDPR tweets, they've been converted ! */ export declare function isGDPRTweet(tweet: PartialTweetGDPR | PartialTweet): tweet is PartialTweetGDPR; /** * Return true if **tweet** contains media(s). * * This includes photos, videos or animated GIF. */ export declare function isWithMedia(tweet: PartialTweet): boolean; /** * Return true if **tweet** contains a video or one animated GIF. * * Twitter's GIF are mp4 encoded. */ export declare function isWithVideo(tweet: PartialTweet): boolean;