Member Junction
    Preparing search index...
    type GetMessagesParams<T = Record<string, any>> = {
        ContextData?: T;
        Identifier?: string;
        IncludeHeaders?: boolean;
        NumMessages: number;
        ReceivedAfter?: Date;
        ReceivedBefore?: Date;
        UnreadOnly?: boolean;
    }

    Type Parameters

    • T = Record<string, any>
    Index

    Properties

    ContextData?: T

    Optional, any provider-specific parameters that are needed to get messages

    Identifier?: string

    The identifier to get messages for - an email address, mailbox ID, in the case of SMS, could be a phone number. In the case of other systems could be a User ID for FB Messenger/WhatsApp, etc.

    This is optional if the provider supports getting messages based on credentials alone as some credentials/providers can be scoped to a specific mailbox/user.

    IncludeHeaders?: boolean

    Optional, include the headers in the response (defaults to false)

    NumMessages: number

    The number of messages to return

    ReceivedAfter?: Date

    Optional. Restrict results to messages received at or AFTER this instant.

    Inclusive, matching the underlying provider filters this maps onto (Graph ge). Callers doing incremental sync should expect the boundary message back again and de-duplicate on their own key; returning it twice is recoverable, skipping it silently is not.

    NOT every provider can honour this. Check MessageRetrievalCapabilities.FilterByReceivedDate before relying on it, or read GetMessagesResult.AppliedFilters afterwards — a provider that cannot filter by date returns unfiltered results rather than failing, so a caller that assumes support and checks neither will silently process messages it asked to exclude.

    ReceivedBefore?: Date

    Optional. Restrict results to messages received at or BEFORE this instant. Inclusive, and subject to the same capability caveat as ReceivedAfter.

    UnreadOnly?: boolean

    Optional. If true, only messages not marked as read will be returned