@cfxlabsinc/b2b-services
    Preparing search index...

    Recipient-resolution core for the event-driven email sender. The email-notification-handler lambda resolves who should be emailed through getRecipients and delivers through its own pipeline.

    Recipients are the customer-configured emailAddresses, plus the customer's ACTIVE dashboard members matching the configured userIds / userGroups (their DB role name) or the object's dashboard "creator", each gated by the member's own email preferences; and CFX staff's hidden internalUserIds, admin users still holding user-shadow:r, gated by the company's toggle.

    Index
    instance: (...args: []) => CustomerNotificationService = ...

    The process service: the shared database and the customer notification preferences.

    • Who to email about a self-serve application: every ACTIVE member of its workspace, CFX staff's internal roles aside. The workspace may have no customer yet, and no preference covers these emails.

      Parameters

      • __namedParameters: { workspaceId: string }

      Returns Promise<{ email: string; name?: string }[]>

    • A customer's invoice and receipt recipients: the workspace's ACTIVE Owner and Admin members, then its billing addresses, deduped case-insensitively. Not gated by notification preferences: nobody opts out of a bill.

      Parameters

      • customerId: string

      Returns Promise<{ email: string; name?: string }[]>