zibri
    Preparing search index...

    Interface for a mailing list service.

    interface MailingListServiceInterface {
        confirmSubscribeToList: (
            confirmationTokenValue: string,
        ) => Promise<MailingListSubscriber>;
        getManagePreferencesLink: (subscriberId: string) => string;
        getSubscribeConfirmationLink: (
            listId: string,
            confirmationToken: string,
        ) => string;
        getUnsubscribeLink: (listId: string, subscriberId: string) => string;
        mailingListBaseRoute: `/${string}`;
        queueEmailForList: <T>(
            listId: string,
            data: MailingListQueueEmailData<T>,
        ) => Promise<void>;
        requestSubscribeToList: <T>(
            listId: string,
            subscriber: MailingListSubscriberCreateData,
            emailData: OmitStrict<
                MailingListQueueEmailData<T>,
                "template" | "compile",
            >,
        ) => Promise<void>;
        unsubscribeFromList: (
            listId: string,
            subscriberId: string,
        ) => Promise<void>;
    }

    Implemented by

    Index

    Properties

    confirmSubscribeToList: (
        confirmationTokenValue: string,
    ) => Promise<MailingListSubscriber>

    Confirms that a new subscriber is added to the mailing list.

    getManagePreferencesLink: (subscriberId: string) => string

    Gets the link to the manage preferences page for the subscriber with the given id.

    getSubscribeConfirmationLink: (
        listId: string,
        confirmationToken: string,
    ) => string

    Gets the subscribe confirmation link for the list with the given id and the confirmationToken.

    getUnsubscribeLink: (listId: string, subscriberId: string) => string

    Gets the unsubscribe link for the list with the given id and the subscriber with the given id.

    mailingListBaseRoute: `/${string}`

    The base route for everything regarding mailing lists.

    queueEmailForList: <T>(
        listId: string,
        data: MailingListQueueEmailData<T>,
    ) => Promise<void>

    Queues a new email for the mailing list with the provided id.

    requestSubscribeToList: <T>(
        listId: string,
        subscriber: MailingListSubscriberCreateData,
        emailData: OmitStrict<MailingListQueueEmailData<T>, "template" | "compile">,
    ) => Promise<void>

    Requests for a new subscriber to the be added to the mailing list with the provided id. This should initialize a two step process required by the GDPR.

    unsubscribeFromList: (listId: string, subscriberId: string) => Promise<void>

    Removes a subscriber with the given id from the mailing list with the provided id.